Model.normalsadjustbynodes#
- Model.normalsadjustbynodes(collection, node_collection, size, display)#
Adjusts the normals of 3D elements according to nodes of a solid element.
- Parameters:
collection (Collection) – The collection containing the input entities to adjust normals for. Valid entities are elements and components.
node_collection (Collection) – The collection containing the node entities that define the selected solid element face.
size (double) – Specifies the size of the normal graphics to be drawn. If set to zero, the vector is drawn at 10% of the screen size.
display (int) –
0 - Display all elements normals upon function completion.
1 - Display only adjusted element normals upon function completion.
Example#
Adjust the normals of elements with IDs 1 - 10 based on faces defined by nodes with IDs 5 , 7 and 9 use a display size of 10.0#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements with IDs 1-10 filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 11))) elements_collection = hm.Collection(model, filter_elements) model.normalsadjustbynodes( entity_type=ent.Element, collection=elements_collection, node_collection=(model, ent.Node, [5, 7, 9]), size=10.0, display=1, )