Skip to main content
Version: 2026R1

Rosette

class compolyx.Rosette(graph, obj, parent=None)

Rosette class.

Access:

>>> model = db.models['class40.1']
>>> rosette_1 = model.rosettes['Rosette.1']
>>> rosette_2 = model.create_rosette(name='Rosette.2', origin=(1.5, 5.75, 7.), dir1=(-0.4, -0.4, 0.8), dir2=(-6.0, 0.6, 0.75), rosette_type='parallel' )

Attributes

NameDescription
Rosette.activeActive status of object
Rosette.changedStatus boolean
Rosette.dir1Direction 1 of the Rosette
Rosette.dir2Direction 2 of the Rosette
Rosette.edge_setEdge Set for Rosette
Rosette.enabledWhether this object is currently enabled or not
Rosette.idID of object
Rosette.is_dict_itemSpecifies wether the object is an item of a dict
Rosette.is_list_itemSpecifies wether the object is an item of a list
Rosette.link_pathRoot path of the current node in the tree for links to this object
Rosette.lockedRosette is generated from an imported rosette and cannot be changed
Rosette.nameName of object
Rosette.originOrigin of the Rosette
Rosette.parentParent object in tree
Rosette.root_pathRoot path of the current node in the tree
Rosette.rosette_typeRosette Types. Available options: parallel, radial, cylindrical, spherical, edge_wise
Rosette.statusStatus of the object
Rosette.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
Rosette.uidUID of object
Rosette.vertexThis will throw an error if the object has been removed from the graph

Methods

NameDescription
Rosette.find_parent(type)Function steps up the tree and returns the first parent with given type
Rosette.get_global_coordinates(coordinates)Evaluates the global coordinates of a point given in local rosette coordinates: CYLINDRICAL, RADIAL, and SPHERICAL
Rosette.get_global_vector_components(vector)Gets global vector components from local rosette vector components CYLINDRICAL, RADIAL and SPHERICAL coord sys type: Give phi and theta in RAD
Rosette.get_local_coordinates(coordinates)Evaluates the local rosette coordinates of a point given in global coordinates
Rosette.get_local_vector_components(vector)Returns local rosette vector components from global vector components
Rosette.get_short_description()
Rosette.local_direction(point, angle)Get local orientation for a given relative angle and position in space
Rosette.obj_exists()Checks if __obj still references the c++ object (i.e. has not been reset to None by self._delete) AND exists in the graph
Rosette.rotate(rot_x_angle_deg, ...)Rotate the Rosette around its X, Y and Z axes as an intrisic rotation
Rosette.serialize()Serialize to Python string
Rosette.serialize_name_and_id()Helper function to serialize name and ID
Rosette.set_Xy()Sets dir2 orthogonal to dir1 as y- and x-axis
Rosette.set_Xz()Sets dir2 orthogonal to dir1 as z- and x-axis
Rosette.set_Yz()Sets dir2 orthogonal to dir1 as z- and y-axis
Rosette.set_xY()Sets dir1 orthogonal to dir2 as x- and y-axis
Rosette.set_xZ()Sets dir1 orthogonal to dir2 as x- and z-axis
Rosette.set_yZ()Sets dir1 orthogonal to dir2 as y- and z-axis
Rosette.translate(translation_x, ...)Translate the rosette, either along its own axes or the global one depending on the type of translation
Rosette.update()
Rosette.visit(visitor)Walk through the tree and let the visitor perform action on every descendant node