Skip to content

pytha.create_block

fabian-flassig edited this page May 3, 2020 · 24 revisions

Creates a block (mathematically a cuboid) in PYTHA as new part.

Similar to the Parts -> Block function in the PYTHA user interface.

pytha.create_block(length, width, height [,origin [,options]]) 
Parameter Type Description
length number Length of the block (in x-direction)
width number Width of the block (in y-direction)
height number Height of the block (in z-direction)
origin {x,y,z} Optional: origin point of the block
options {...} Optional: a table that may contain the following options:
options.u_axis {x,y,z} Local coordinate u-axis for the orientation of the block
options.v_axis {x,y,z} Local coordinate v-axis for the orientation of the block
Type | Description
---|---
`element_handle` | An element handle of the newly created part

### See also:

[[pytha]], [[element handles|pytha: Element Handles]]

Clone this wiki locally