set_crosssection_properties#
- Polyline.set_crosssection_properties(section=None, orient=None, width=0, topwidth=0, height=0, num_seg=0, bend_type=None)#
Set the properties of an existing polyline object.
- Parameters:
- section
str,optional Types of the cross-sections. Options are
"Line","Circle","Rectangle", and"Isosceles Trapezoid". The default isNone.- orient
str,optional Direction of the normal vector to the width of the cross-section. Options are
"X","Y","Z", and"Auto". The default isNone, which sets the orientation to"Auto".- width
floatorstr,optional Width or diameter of the cross-section for all types. The default is
0.- topwidth
floatorstr Top width of the cross-section for the type
"Isosceles Trapezoid"only. The default is0.- height
floatorstr Height of the cross-section for the types
"Rectangle"and “Isosceles Trapezoid”` only. The default is0.- num_seg
int,optional Number of segments in the cross-section surface for the types
"Circle","Rectangle", and"Isosceles Trapezoid". The default is0. The value must be0or greater than2.- bend_type
str,optional Type of the bend. The default is
None, in which case the bend type is set to"Corner". For the type"Circle", the bend type should be set to"Curved".
- section
- Returns:
- bool
Truewhen successful,Falsewhen failed.
References
>>> oEditor.ChangeProperty
Examples
>>> P = modeler.create_polyline([[0, 1, 2], [0, 2, 3], [2, 1, 4]]) >>> P.set_crosssection_properties(section="Circle", width="1mm")