Created
November 7, 2025 04:11
-
-
Save Erhannis/88573e6d4112eed7db6f54ebf22fab03 to your computer and use it in GitHub Desktop.
In FreeCAD, click a face, then run the macro, to select the edges of that face
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| s = Gui.Selection.getSelectionEx()[0] | |
| f = s.SubObjects[0] | |
| edgeOfFace=f.Edges | |
| edgeAll=s.Object.Shape.Edges | |
| edges=[] | |
| for i in edgeOfFace: | |
| for j in enumerate(edgeAll): | |
| if j[1].isSame(i): | |
| name = "Edge%d" % (j[0]+1) | |
| edges.append(name) | |
| Gui.Selection.clearSelection() | |
| Gui.Selection.addSelection(s.Object, edges) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment