Interpolation Curve
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>).importToTable();
model.component(<ctag>).geom(<tag>).feature(<ftag>).importData();
Description
To create an interpolation curve use model.component(<ctag>).geom(<tag>).create(<ftag>,"InterpolationCurve") The following properties are available:
table | file | vectors
sectionwise | spreadsheet
open | closed | solid
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.
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.
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.
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
BezierPolygon