rsuar
Aerospace
- Nov 30, 2018
- 1
Hi there!
As part of my workflow, I assign face names in NX11 to reduce my workload later on during meshing, FEM, and postprocessing.
However, setting face names in NX (as in face -> property -> name) is quite cumbersome due to:
a) having to select each face by click / lasso / long workarounds with colours
b) face names getting lost when geometry changes are introduced.
Group Face (Synchronous Modeling) retains faces from related features very well after geometry changes. Therefore, I was wondering if it is possible to assign face names from the Group Face Properties, from a Feature, or similar.
I have made some trials using NXOpen and journals as a workaround, and it seems possible to select all faces in a Group Face and assign them a face name. However, before going down this road, I'd rather know from you guys if there is an easier way to do this. Let me know your thoughts!
As part of my workflow, I assign face names in NX11 to reduce my workload later on during meshing, FEM, and postprocessing.
However, setting face names in NX (as in face -> property -> name) is quite cumbersome due to:
a) having to select each face by click / lasso / long workarounds with colours
b) face names getting lost when geometry changes are introduced.
Group Face (Synchronous Modeling) retains faces from related features very well after geometry changes. Therefore, I was wondering if it is possible to assign face names from the Group Face Properties, from a Feature, or similar.
I have made some trials using NXOpen and journals as a workaround, and it seems possible to select all faces in a Group Face and assign them a face name. However, before going down this road, I'd rather know from you guys if there is an easier way to do this. Let me know your thoughts!
Code:
import math
import NXOpen
import NXOpen.Features
def main() :
theSession = NXOpen.Session.GetSession()
workPart = theSession.Parts.Work
displayPart = theSession.Parts.Display
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Start")
objects1 = [NXOpen.NXObject.Null] * 1
groupFace1 = workPart.Features.FindObject("PUT HERE FACE GROUP NAME")
facessel = groupFace1.GetFaces()
objectGeneralPropertiesBuilder1 = workPart.PropertiesManager.CreateObjectGeneralPropertiesBuilder(facessel)
objectGeneralPropertiesBuilder1.Name = "TRIAL"
objectGeneralPropertiesBuilder1.Commit()
if __name__ == '__main__':
main()