py4design.shapeattributes module

class py4design.shapeattributes.ShapeAttributes

Bases: object

An object that allows the documentation of topology objects and append attributes to them.

Attributes

dictionary (dictionary) The dictionary of attributes appended to the object.
set_shape(occtopo)

Appends the geometry as the “shape” attribute to the object

Parameters:

occtopo : OCCtopology

The OCCtopology to be documented and append with attributes. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex

shape

Retrieve the the geometry from the object.

Parameters:

occtopo : OCCtopology

The OCCtopology to be documented and append with attributes. OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex

set_analysis_rule_item(key, val)

Sets analysis rule condition for the BaseAnalysisRule base class.

Parameters:

key : str

The name of the base analysis rule.

val : bool

The value of the base analysis rule, True or False.

get_value(key)

Retrieve the value of the attribute specified.

Parameters:

key : str

The name of the attribute value to retrieve.

set_key_value(key, value)

Sets an attribute for the object.

Parameters:

key : str

The name of the attribute.

val : str, float, int, bool

The value of the attribute.