I need to find the sketch object used to create a surface. For example: I have the surface of an extruded box and want to know the associated object (line) that defines the surface. I think I can work out the details; I just need some help navigating the API (java preferred).
I have tried:
UFModl.AskEntityParentsData data1 = ufs.modl().askEntityParents(1, face.tag());
but that returns with an empty parent list.
UF_MODL_ask_entity_parents is used while transforming entities to determine if there are any parent objects that need to be transformed too. I think the input for this would be a body or any other entity that could be transformed.
For what you need to do you should be getting the feature of the face like UF_MODL_ask_face_feats and then query its parents.
Thank you. That is helpful information.
I am here:
From the face I am able to find the sketch and objects within the sketch but am having trouble determining which of the sketch objects correspondes to the particular face.
I am currently working through the extrude API, with the expectation that if I find the solution here I will repeat it for the most common feature types (extrude, revolve, and sweep).