- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to understand how an existing sketch made through the GUI is drawn and constrained through Python. I know how to get lists for each of the objects within a sketch, such as points, lines, arc, circles, and constraints. But I'm having a hard time figuring out how to know the names of the curves each constraint is referring to. Or basically how everything is interconnected/linked.
For example:
- I can get a list of points and give them all variable names.
- I can then get a list of all lines and give them all variable names
- I can use the start and end points on each line to refer back to the point name instead of hard coding locations.
- I can go through each line and list out which GeometricConstraints constraint it.
- I can also go through all the constraints in a sketch and get the entities or points they constrain.
Is there an ID I can use to identify each constraint or curve or object in a sketch?
Or after Step #4, I could dig deeper by getting the other line or point in the constraint... but I still don't have a way of knowing which line that is.
Should I be adding an attribute to each curve so that I can figure out which one it is while I'm traversing the constraint web?
How does Fusion 360 recreate a sketch when the file is opened? Does it draw the curves, then add the constraints?
Solved! Go to Solution.