Geometry > Geometry Commands > Cylinder

Cylinder
Create a solid or hollow (surface) cylinder in 3D. The cylinder is a right circular cylinder; that is, a cylinder that has circles as bases aligned one directly above the other.
Syntax
model.geom(<tag>).create(<ftag>,"Cylinder");
model.geom(<tag>).feature(<ftag>).set(property,<value>);
model.geom(<tag>).feature(<ftag>).getType(property);
Description
Use model.geom(<tag>).create(<ftag>,"Cylinder") to create a cylinder. The following properties are available:
Direction of the axis. Vector has length 3 if axistype is cartesian, and length 2 if axistype is spherical.
x | y | z | cartesian | spherical
on | off
on | off
on | off
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.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Compatibility
model.geom(<tag>).create(<ftag>,"cylinder3") creates a solid cylinder.
model.geom(<tag>).create(<ftag>,"cylinder2") creates a surface cylinder.
The following properties are also available:
Alias for axis when axistype is spherical
Alias for axis when axistype is cartesian
x, y, z
The property const is no longer available.
Example
The following commands generate a surface cylinder and a solid cylinder:
Code for use with Java
Model model = ModelUtil.create("Model1");
GeomSequence g = model.geom().create("geom1",3);
g.angularUnit("rad");
g.create("c2","Cylinder");
g.feature("c2").set("type","surface");
g.feature("c2").set("r",0.5);
g.feature("c2").set("h",4);
g.feature("c2").set("pos","1 1 0");
g.feature("c2").set("axis","pi/2 0");
g.create("c3","Cylinder");
g.feature("c3").set("r",20);
g.feature("c3").set("h",40);
g.feature("c3").set("pos","0 0 -100");
g.feature("c3").set("axis","1 1 1");
g.run();
Code for use with MATLAB
model = ModelUtil.create('Model1');
g = model.geom.create('geom1',3);
g.angularUnit('rad');
g.create('c2','Cylinder');
g.feature('c2').set('type','surface');
g.feature('c2').set('r',0.5);
g.feature('c2').set('h',4);
g.feature('c2').set('pos','1 1 0');
g.feature('c2').set('axis','pi/2 0');
g.create('c3','Cylinder');
g.feature('c3').set('r',20);
g.feature('c3').set('h',40);
g.feature('c3').set('pos','0 0 -100');
g.feature('c3').set('axis','1 1 1');
g.run;
See Also
 Cone, ECone