-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.create_sweep
fabian-flassig edited this page May 7, 2020
·
23 revisions
Creates a sweep along a line in PYTHA as new part. It uses an element handle to a face-part (e.g. a poly_face) as its cross section.
Similar to the Parts -> Sweep function in the PYTHA user interface.
pytha.create_sweep(base_part, cross_section [,options]) | Parameter | Type | Description |
|---|---|---|
base_part |
element_handle |
The face (or faces) in the base part is used as the cross section of the profile |
cross_section |
element_handle or {...}
|
Either an element handle to a face-part or a table specifying the cross section: |
cross_section.type |
string |
Specifies the shape of the cross section: "rectangle" or "circle"
|
cross_section.length |
number |
For rectangles: Length |
cross_section.width |
number |
For rectangles: Width |
cross_section.radius |
number |
For circles: Radius |
cross_section.segments |
number |
For circles: Optional: Number of segments |
options |
{...} |
Optional: a table that may contain the following options: |
options.orientation |
string |
"natural_twist" (default), "keep_vertical", "keep_leveled"
|
options.twist_angle |
number |
Additional twist along the sweep (only if orientation is not "natural_twist") |
| Type | Description |
|---|---|
{element_handle, ...} |
A table containing the element handles of the newly created parts (Often it is just one). |
The base_part is not deleted.
pytha, element handles, create_block, create_cylinder, create_profile