Model.assignsystem_fromcurves#
- Model.assignsystem_fromcurves(collection, geom_collection, size, color, only_orient, rebar=0, table_id=0, reverse_flag=0)#
Assigns a system to an entity type based on lines. The axis of the system is then projected on the element/property plane. It also re-orients and visualizes the element (material) coordinate system for selected entities. When review is complete, the function
Model.vectorsoff()must be run. This function is currently supported for Abaqus, Nastran and OptiStructsolvers.- Parameters:
collection (Collection) – The collection containing the entities. Supported entities are elements and properties.
geom_collection (Collection) – The collection containing the entities from which the system will be referenced. Supported entities are nodes and lines.
size (double) – If
only_orient=1, this defines the size of the displayed vectors. If set to 0, the size will be determined automatically.color (int) – The color of the vectors or lines. Valid values are 1 through 64.
only_orient (unsigned int) –
0 - The new x-element directions are shown as continuous gradient lines starting and ending on free edges.
1 - The new x-element directions are displayed as vectors starting from the element centroid.
rebar (unsigned int) – The
rebarvalue, valid only for Abaqus user profile.table_id (int) – The ID of the distribution table. For Abaqus, the distribution table with this table ID will be updated accordingly. For Nastran and Optistruct, the only valid value is 0 and a distribution table is created and updated internally.
reverse_flag (unsigned int) –
0 - The line’s direction will not be flipped.
1 - The line’s direction will be flipped.
Example#
Project the axis of the line with ID 210 on the element plane of all the elements , and display the projection as cyan vectors (color=7) withsize=3.0, without flip the direction#import hm import hm.entities as ent model = hm.Model() elem_col = hm.Collection(model, ent.Element) line_col = hm.Collection(model, ent.Line, [210]) model.assignsystem_fromcurves( collection=elem_col, geom_collection=line_col, size=3.0, color=7, only_orient=1, reverse_flag=0, )