Skip to content

pytha.create_sweep

fabian-flassig edited this page May 6, 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 reserved for further options in the future

Return value

Type Description
{element_handle, ...} A table containing the element handles of the newly created parts (Often it is just one).

Additional information

The base_part is not deleted. If base_part contains multiple faces, profiles over all faces will be created.

See also:

pytha, element handles, create_block, create_cylinder, create_sweep

Clone this wiki locally