Model.assignsystemfromcurveswithnormals#
- Model.assignsystemfromcurveswithnormals(collection, geomCollection, color=1, flipnormal=0, normalentity=Entity(), onlyorient=0, rebar=0, size=0, table=Entity())#
Assigns a system to an entity type based on curves with surface normal. The axis of the system is then projected on the element/property plane. Reorients 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 OptiStruct.- Parameters:
collection (Collection) – The collection containing the entities to update. Only element and property entities which are solid are supported.
geomCollection (Collection) – The collection containing the entities from which the system will be referenced. Valid entities are lines and nodes.
color (unsigned int) – The color of the vectors or lines. Valid values are 1-64.
flipnormal (unsigned int) –
0 - The line’s direction will not be flipped
1 - The line’s direction will be flipped
normalentity (Entity) – The object describing the entity considered for normal calculations.
onlyorient (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.size (unsigned int) – If set to 0, the size will be determined automatically. Otherwise, if
only_orient=1this defines the size of the displayed vectors.table (Entity) – The object describing the (distribution) table entity. For Abaqus, the distribution table will be updated accordingly. For Nastran and OptiStruct, the valid value will be
None, i.e. a distribution table will be created internally which will be updated.
Example#
Project the axis of the line with ID 100 on the element plane of all the elements and display the projection ascolor=7withsize=3.0, without flip the direction , and with surface normal from surface with ID 1#import hm import hm.entities as ent model = hm.Model() elem_col = hm.Collection(model, ent.Element) line_col = hm.Collection(model, ent.Line, [100]) model.assignsystemfromcurveswithnormals( collection=elem_col, geom_collection=line_col, size=3.0, color=7, only_orient=1, normalentity=ent.Surface(model, 1) )