CubicBezier
Create a rational Bézier curve of degree 3 in 2D or 3D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"CubicBezier");
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>,"CubicBezier") to create a cubic Bézier curve in 2D or 3D. 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.
on | off
all | obj | dom | bnd | 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.
this | Part Instance feature
xyplane | Work Plane feature
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see CubicBezier.
The following attributes are available:
Table 3-58: Valid attributes
on | off
Example
The following commands creates a cubic Bézier curve in 2D with control points in (0, 0); (1, 3); (2, 2); and (3, 0):
Code for Use with Java
Model model = ModelUtil.create("Model1");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1",3);
g.create("cb1", "CubicBezier");
g.feature("cb1").setIndex("p", 1, 0, 1);
g.feature("cb1").setIndex("p", 3, 1, 1);
g.feature("cb1").setIndex("p", 2, 0, 2);
g.feature("cb1").setIndex("p", -2, 1, 2);
g.feature("cb1").setIndex("p", 3, 0, 3);
g.run();
The zero values are default values and are therefore not set.
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 3);
g.create('cb1','CubicBezier');
g.feature('cb1').setIndex('p', 1, 0, 1);
g.feature('cb1').setIndex('p', 3, 1, 1);
g.feature('cb1').setIndex('p', 2, 0, 2);
g.feature('cb1').setIndex('p', -2, 1, 2);
g.feature('cb1').setIndex('p', 3, 0, 3);
g.run;
The zero values are default values and are therefore not set.
See Also
CompositeCurve, QuadraticBezier