InterpolationCurve
Create a curve interpolating or approximating a sequence of points in 2D or 3D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"InterpolationCurve");
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>).importToTable();
model.component(<ctag>).geom(<tag>).feature(<ftag>).importData();
model.component(<ctag>).geom(<tag>).feature(<ftag>).setAttribute(attribute,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getAttribute(attribute);
Description
To create an interpolation curve use model.component(<ctag>).geom(<tag>).create(<ftag>,"InterpolationCurve") The following properties are available:
none | custom | integer between 1 and the number of colors in the current theme
The color to use. Active when color is set to custom.
none | zerocurv | tangent
{1,0} or {1,0,0}
table | file | vectors
on | off
all | obj | dom | bnd | edg | pnt | off
dom in 2D; edg in 3D
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.
none | zerocurv | tangent
{1,0} or {1,0,0}
sectionwise | spreadsheet
open | closed | solid
this | part-instance feature
xyplane | work-plane feature
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).importToTable() to read data from the file defined by the filename property and store the data in the table property. The source property is also changed to table.
When building the feature, if the start condition or end condition is zero curvature, the corresponding (currently inactive) tangent direction property should be set to the tangent vector of the resulting curve.
If source is file, the interpolation curve is not automatically rebuilt when the data in the file changes. Use model.component(<ctag>).geom(<tag>).feature(<ftag>).importData() to rebuild the interpolation curve after such a change.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see InterpolationCurve.
The following attributes are available:
Table 3-101: Valid attributes
on | off
Example
The following commands create a curve interpolating four points in 2D:
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 2);
g.create("ic1","InterpolationCurve");
g.feature("ic1").set("table",new double[][]{{0,0}, {1,0}, {1,1}, {0,1}});
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 2);
g.create('ic1','InterpolationCurve');
g.feature('ic1').set('table',[[0,0]; [1,0]; [1,1]; [0,1]]);
g.run;
See Also
CubicBezier, QuadraticBezier