My goal is to write a script where the user selects an edge (in this particular case it's a circle displayed in a view in a TechDraw page)
I want to access the center point and the radius.
I have done this by hand at the python console, but I used:
Code: Select all
myobj.FreeCAD.ActiveDocument.View.getEdgeByIndex(4)
myobj.Curve.Location # the center, returns a Vector
myobj.Curve.Radius # returns a real
Problem is I want to use what the user has selected, but, I can't figure out to get the same info from:
Code: Select all
sel = FreeCADGui.Selection.getSelection()
I have gone through lots of examples and looked at the api wiki pages...but, have not been able to sort it out of what I've seen to this point.
It seems I can never figure out how to drill down to the bits I need.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."