Tangent
Create a tangent line segment to one or two 2D edges.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Tangent");
model.component(<ctag>).geom(<tag>).feature(<ftag>).selection(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).setAttribute(attribute,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getAttribute(attribute);
Description
Use model.component(<ctag>).geom(<tag>).create(<ftag>,"Tangent") to create a line segment tangent to two edges or tangent to one edge with a fixed endpoint. The following properties are available:
on | off
all | obj | bnd | edg | pnt | off
Show selections, if selresult is on, in physics, materials, and so on; in part instances; or in 3D from a plane geometry. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
edge | point | coord
If type is edge a common tangent line to two edges are constructed. Then, the following additional properties are available:
If type is point a tangent line through a given point is constructed. Then, the following additional property is available:
If type is coord a tangent line through a point with given coordinates are constructed. Then, the following additional property is available:
If a tangent cannot be found, a tangent to some adjacent edge is constructed, if possible.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
The following attributes are available:
Table 3-167: Valid attributes
on | off
Compatibility
model.component(<ctag>).geom(gname).create(fname,"tangent") creates a Tangent feature.
The following properties are no longer supported:
0 | 1
Starting point element dimension: 0 for vertex, 1 for edge.
0 | 1
Ending point element dimension: 0 for vertex, 1 for edge.
Example
The following sequence generates a tangent from the unit circle to the point (2, 0):
Code for Use with Java
Model model = ModelUtil.create("Model1");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1",2);
g.create("c1","Circle");
g.run("c1");
g.create("tan1","Tangent");
g.feature("tan1").set("type","coord");
g.feature("tan1").selection("edge").set("c1",3);
g.feature("tan1").set("coord","2 0");
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',2);
g.create('c1','Circle');
g.run('c1');
g.create('tan1','Tangent');
g.feature('tan1').set('type','coord');
g.feature('tan1').selection('edge').set('c1',3);
g.feature('tan1').set('coord','2 0');
g.run;
The following sequence generates a common tangent between two circles:
Code for Use with Java
Model model = ModelUtil.create("Model1");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1",2);
g.create("c1","Circle");
g.create("c2","Circle");
g.feature("c2").set("pos", "2 2");
g.run("c2");
g.create("tan1","Tangent");
g.feature("tan1").selection("edge").set("c1",4);
g.feature("tan1").selection("edge2").set("c2",4);
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',2);
g.create('c1','Circle');
g.create('c2','Circle');
g.feature('c2').set('pos', '2 2');
g.run('c2');
g.create('tan1','Tangent');
g.feature('tan1').selection('edge').set('c1',4);
g.feature('tan1').selection('edge2').set('c2',4);
g.run;
See Also
BezierPolygon