Pyramid
Create solid or surface rectangular pyramid or frustum in 3D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Pyramid");
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>,"Pyramid") to create a pyramid. The following properties are available:
Direction of the axis orthogonal to the bottom rectangle. Vector has length 3 if axistype is cartesian, and length 2 if axistype is spherical.
x | y | z | cartesian | spherical
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.
solid | surface
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.
this | Part Instance feature
xyplane | Work plane feature
Work Plane feature that defines the coordinate system. The default, xyplane, is the global Cartesian coordinate system.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
The following attributes are available:
Table 3-136: Valid attributes
on | off
Compatibility
model.component(<ctag>).geom(<tag>).create(<ftag>,"pyramid3") creates a solid pyramid.
model.component(<ctag>).geom(<tag>).create(<ftag>,"pyramid2") creates a surface pyramid.
The following properties are also available:
Alias for axis when axistype is spherical.
Alias for axis when axistype is cartesian.
The property const is no longer available.
Example
Create a pyramid frustum with the base face in the xy-plane:
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("e1","Pyramid");
g.feature("e1").set("a",10).set("b",40);
g.feature("e1").set("h",20);
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',3);
g.create('e1','Pyramid');
g.feature('e1').set('a',10).set('b',40);
g.feature('e1').set('h',20);
Create a pyramid with an apex:
Code for Use with Java
g.create("e2","Pyramid");
g.feature("e2").set("a",1).set("b",2);
g.feature("e2").set("h",4);
g.feature("e2").set("rat",0);
g.feature("e2").set("pos","100 100 100");
g.feature("e2").set("axis","0 1 4");
g.feature("e2").set("rot",45);
g.run();
Code for Use with MATLAB
g.create('e2','Pyramid');
g.feature('e2').set('a',1).set('b',2);
g.feature('e2').set('h',4);
g.feature('e2').set('rat',0);
g.feature('e2').set('pos','100 100 100');
g.feature('e2').set('axis','0 1 4');
g.feature('e2').set('rot',45);
g.run;
See Also
 Cone, ECone