Model.hm_getunoffsetablenodes#
- Model.hm_getunoffsetablenodes(collection, angle_threshold)#
Saves to the user list the unoffsetable nodes. Useful for CFD BL meshing.
Consider a node and all its surrounding elements. The visibility angle of an element is the signed angle between the node normal and the element normal after subtracting 90 degrees. The visibility angle of the node is the minimum of the element visibility angle for all surrounding elements. The best visibility angle of the node is the maximum of the node visibility angle for all choices on the node normal. A node having zero or negative best visibility angle is considered absolutely unoffsetable. A node having its best visibility angle less than
angle_thresholdis considered unoffsetable.- Parameters:
collection (Collection) – The collection containing the entities to query. Valid values are comps and elems.
angle_threshold (double) – A value ≥ 0.0 and < 45.0 that defines the threshold visibility angle in degrees for determining a node is unoffsetable.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:worstNode (Entity)
minimumAngle (double)
unoffsetableNodes (EntityList)
Example#
Find all unoffsetable nodes in comp1 use an angle threshold of 2.5#import hm import hm.entities as ent model = hm.Model() comps = hm.Collection(model, ent.Component, [1]) _, result = model.hm_getunoffsetablenodes(collection=comps, angle_threshold=2.5) print("worstNode:", result.worstNode) print("minimumAngle:", result.minimumAngle) print("unoffsetableNodes:", result.unoffsetableNodes)