how does sketcher defines local x and y
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
how does sketcher defines local x and y
if a face lies totally wired in space and a sketch is made from this face. How does the sketcher defines which direction is in Sketcher lokal x and lokal y from this face?
Re: how does sketcher defines local x and y
I think from normal vector of the face. Edit: Oops, that is not enough. Hm. Maybe it use simple the UV mapping.
Code: Select all
doc = App.ActiveDocument
plane = doc.addObject('Part::Plane','Plane')
plane.Length=10
plane.Width=10
plane.Placement=App.Placement(App.Vector(-5.00,-5.00,0.00),App.Rotation(App.Vector(0.12,0.62,0.78),35.82))
plane.Label='TestPlane'
App.ActiveDocument.recompute()
face = plane.Shape.Faces[0]
sp = face.valueAt(0,0) # start point
face.valueAt(1,0).sub(sp) # x-axis
face.valueAt(0,1).sub(sp) # y-axis
Re: how does sketcher defines local x and y
I believe there is an open issue in the tracker (or probably just a forum post) requesting for the option to choose the axes. It seemed it was quite old, predating the introduction of datum coordinates.