Cylinder

Model ElementThe Cylinder element allows you to represent a geometric figure with straight parallel sides and a circular cross section.

Class Name

Cylinder

Attribute Summary

Name Property Modifiable by command? Designable?
end_caps Enum (“OPEN CLOSE TOP_ONLY BOTTOM_ONLY”) NO  
cm Reference(Marker) Yes
radius Double () Yes
length Double() Yes
seg Int ()  
material_inside Bool ()  
color String()  

Usage

Cylinder (cm=Marker(), radius=120, length=200)

Attributes

end_caps
Enum ()
This property allows you to control the appearance of the cylinder. Four options are available:
  • OPEN
  • CLOSED
  • TOP_ONLY
  • BOTTOM_ONLY
cm
Reference (Marker)
The marker is used as a coordinate system for the cylinder graphic. It represents the center of the circular section at the base of the cylinder.
radius
Double()
The radius of the cylinder graphic.
length
Double()
The length of the cylinder graphic.
seg
Int ()
Specifies the number of segments used to represents the Cylinder.
material_inside
Bool ()
Specifies if the graphic has material inside or outside. material_inside is a Boolean flag (TRUE/FALSE).
TRUE means the geometry is solid. In other words, it is filled with material and its exterior is devoid of material. Consequently, the surface normals of the geometry point outward.
FALSE means the converse: The exterior of the geometry is filled with material and the interior is devoid of material. In this case, the surface normals of the geometry point inward.
color
String()
The color of the graphic for H3D animation. Specified as RGB (Red : Green : Blue).

Examples

Define cylinder geometry.
Cylinder (cm=Marker(), radius=120, length=200)

Comments

  1. See Properties for an explanation about what properties are, why they are used, and how you can extend these.