Extrude
Extrude planar faces into 3D objects.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Extrude");
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);
Description
Use model.component(<ctag>).geom(<tag>).create(<ftag>,"Extrude") to extrude objects from a work plane or planar faces in the 3D geometry.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input") to select the work plane objects to extrude. The default selection is all available objects from the last preceding work plane.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("inputface") to select the faces to extrude. Faces are extruded when the workplane property is none; otherwise work plane objects are extruded.
The following properties are available:
none | custom | integer between 1 and the number of colors in the current theme
on | off
The color to use. Active when color is set to custom.
double[nd][2]
workplane | faces
on | off
double[nd][2]
distances | vertices
Specification of extrusion distances: as distances using the distance property or by specifying vertices in the 3D geometry using the vertex property.
Vertices to extrude to. Used if specify is set to vertices.
on | off
all | obj | dom | bnd | edg | pnt | off
Show selections, if selresult is on, of resulting objects in physics, materials, and so on, or in part instances. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
Each planar input is extruded in nd layers defined by a local coordinate system. By default, nd=1. The property distance is the extrusion distance (of each layer) in the z-axis direction of the local system. The properties displ, scale, and twist define the translation displacements, scale factors and rotation of the top (of each layer) with respect to the bottom of the extruded object. The last array dimension in the properties displ, scale, and twist can be omitted if the same value is desired for all layers.
When extruding work plane objects, the local system is defined as the local system of the work plane. When extruding faces, the local system is defined by the face with the smallest face number in the object that comes first in the geometry sequence. The local z-axis is parallel to the face normal and located at the center of the face. The local x-axis is defined by the tangent direction corresponding to the first parameter in the surface representation for the face.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Compatibility
The cubic interpolated extrusion is no longer supported.
The following property is also supported:
all | none
on | off
Alias for unite property with opposite value.
Example
Creation of a cylinder of height 1.3:
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("wp1","WorkPlane");
g.feature("wp1").geom().create("c1","Circle");
g.run("wp1");
g.create("e1","Extrude");
g.feature("e1").set("distance",1.3);
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',3);
g.create('wp1','WorkPlane');
g.feature('wp1').geom.create('c1','Circle');
g.run('wp1');
g.create('e1','Extrude');
g.feature('e1').set('distance',1.3);
g.run;
See Also
Revolve, WorkPlane