CSPrimLinPoly

class CSXCAD.CSPrimitives.CSPrimLinPoly

Bases: CSPrimPolygon

Linear Extruded Polygon

A linear extruded polygon is a polygon that is extruded in normal direction for a certain length above the elevation.

Parameters:
lengthfloat

Extrusion length in normal direction

Examples

Define a half circle with a height (in z direction) of 1

>>> linpoly = CSPrimitives.CSPrimLinPoly(pset, metal, norm_dir='z', elevation=0.5)
>>> ang     = np.linspace(0, np.pi, 21)
>>> linpoly.SetCoords(5*np.cos(ang), 5*np.sin(ang))
>>> linpoly.SetLength(1.0)
GetLength()

Get the extrusion length in normal direction.

Return val:

float – Get the extrusion length in normal direction.

SetLength(val)

Set the extrusion length in normal direction.

Parameters:

val – float – Extrusion length in normal direction.