set_crosssection_properties#
- Polyline.set_crosssection_properties(type=None, orient=None, width=0, topwidth=0, height=0, num_seg=0, bend_type=None)[source]#
Set the properties of an existing polyline object.
- Parameters:
- type
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
float
orstr
,optional
Width or diameter of the cross-section for all types. The default is
0
.- topwidth
float
orstr
Top width of the cross-section for the type
"Isosceles Trapezoid"
only. The default is0
.- height
float
orstr
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 be0
or 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"
.
- type
- Returns:
- bool
True
when successful,False
when failed.
References
>>> oEditor.ChangeProperty
Examples
>>> P = modeler.create_polyline([[0, 1, 2], [0, 2, 3], [2, 1, 4]]) >>> P.set_crosssection_properties(type="Circle", width="1mm")