CSProperties (Base Class)
- class CSXCAD.CSProperties.CSProperties
Bases:
object- AddAttribute(name, val)
Set a new or change an existing attribute
- Parameters:
name – str – Attribute name
val – str – Attribute value
- AddBox(start, stop, **kw)
Add a box to this property.
See also
CSXCAD.CSPrimitives.CSPrimBoxSee here for details on primitive arguments
- AddCurve(points, **kw)
Add a curve to this property.
See also
CSXCAD.CSPrimitives.CSPrimCurveSee here for details on primitive arguments
- AddCylinder(start, stop, radius, **kw)
Add a cylinder to this property.
See also
CSXCAD.CSPrimitives.CSPrimCylinderSee here for details on primitive arguments
- AddCylindricalShell(start, stop, radius, shell_width, **kw)
Add a cylindrical shell to this property.
See also
CSXCAD.CSPrimitives.CSPrimCylindricalShellSee here for details on primitive arguments
- AddLinPoly(points, norm_dir, elevation, length, **kw)
Add a linear extruded polygon to this property.
See also
CSXCAD.CSPrimitives.CSPrimLinPolySee here for details on primitive arguments
- AddPoint(coord, **kw)
Add a point to this property.
See also
CSXCAD.CSPrimitives.CSPrimPointSee here for details on primitive arguments
- AddPolygon(points, norm_dir, elevation, **kw)
Add a polygon to this property.
See also
CSXCAD.CSPrimitives.CSPrimPolygonSee here for details on primitive arguments
- AddPolyhedron(**kw)
Add a polyhedron to this property.
See also
CSXCAD.CSPrimitives.CSPrimPolyhedronSee here for details on primitive arguments
- AddPolyhedronReader(filename, **kw)
Add a polyhedron from file to this property.
See also
CSXCAD.CSPrimitives.CSPrimPolyhedronReaderSee here for details on primitive arguments
- AddRotPoly(points, norm_dir, elevation, rot_axis, angle, **kw)
Add a rotated polygon to this property.
See also
CSXCAD.CSPrimitives.CSPrimRotPolySee here for details on primitive arguments
- AddSphere(center, radius, **kw)
Add a sphere to this property.
See also
CSXCAD.CSPrimitives.CSPrimSphereSee here for details on primitive arguments
- AddSphericalShell(center, radius, shell_width, **kw)
Add a spherical shell to this property.
See also
CSXCAD.CSPrimitives.CSPrimSphericalShellSee here for details on primitive arguments
- AddWire(points, radius, **kw)
Add a wire to this property.
See also
CSXCAD.CSPrimitives.CSPrimWireSee here for details on primitive arguments
- ExistAttribute(name)
Check if an attribute with the given name exists
- Parameters:
name – str – Attribute name
- Returns:
bool
- GetAttributeValue(name)
Get the value of the attribute with the given name
- Parameters:
name – str – Attribute name
- Returns:
str – Attribute value
- GetCopy(incl_prim=False)
Get a copy of this property
- Parameters:
incl_prim – Include a copy of all primitive
- Returns:
CSProperties – Copy of this property
- GetEdgeColor()
Get the edge color of this property
- Returns:
(R,G,B,a) – tuple for red, green, blue, alpha
- GetFillColor()
Get the fill color of this property
- Returns:
(R,G,B,a) – tuple for red, green, blue, alpha
- GetName()
Get the name of this property
- Returns:
str – Name for this property
- GetParameterSet()
Get the parameter set assigned to this class
- GetQtyPrimitives()
Get the number of primitives assigned to this property
- Returns:
int – Number of primitives
- GetType()
Get the type of the property
- Returns:
int – Type ID of this property
- GetTypeString()
Get the type of the property as a string
- Returns:
str – Type name of this property type
- RemoveAttribute(name)
Remove an existing attribute
- Parameters:
name – str – Attribute name
- SetAttributeValue(name, val)
Set a new or change an existing attribute
- Parameters:
name – str – Attribute name
val – str – Attribute value
- SetColor(color, alpha=255)
Set the fill and edge color for this property.
- Parameters:
color – color value (e.g. ‘red’,’#1234ab’, (50, 128, 200))
alpha – opacity value (0 .. 255)
- SetEdgeColor(color, alpha=255)
Set the edge color for this property.
- Parameters:
color – color value (e.g. ‘red’,’#1234ab’, (50, 128, 200))
alpha – opacity value (0 .. 255)
- SetFillColor(color, alpha=255)
Set the fill color for this property.
- Parameters:
color – color value (e.g. ‘red’,’#1234ab’, (50, 128, 200))
alpha – opacity value (0.0 .. 255)
- SetName(name)
Set the name of this property
- Params name:
str – Name for this property
- copy(incl_prim=False)
Get a copy of this property
- Parameters:
incl_prim – Include a copy of all primitive
- Returns:
CSProperties – Copy of this property
- static fromType(p_type, pset, no_init=False, **kw)
Create a property specified by the p_type
- Parameters:
p_type – Property type
pset – ParameterSet to assign to the new primitive
no_init – do not create an actual C++ instance
- static fromTypeName(type_str, pset, no_init=False, **kw)
Create a property specified by the type_str
- Parameters:
type_str – Property type name string
pset – ParameterSet to assign to the new primitive
no_init – do not create an actual C++ instance