I am experimenting with Part.Geom2d package.
It offers interesting possibilities like mapping edges ( or sketches ) on curved surfaces : Unfortunately, the edges, once mapped on a surface, are not valid ( but visible in 3D view ).
Some operations fail on them later ( like mirroring ).
This piece of code shows the error :
Code: Select all
from FreeCAD import Base
import Part
obj = App.ActiveDocument.addObject("Part::Cylinder","Cylinder")
App.ActiveDocument.recompute()
shp = obj.Shape
elt = shp.Face1
l2d = Part.Geom2d.Line2dSegment(Base.Vector2d(0,0),Base.Vector2d(6.283185307179586,10.0))
edge = l2d.toShape(elt.Surface)
Part.show(edge)
edge.Curve
edge.check()
Code: Select all
>>> edge.Curve
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: undefined curve type
>>>
>>> edge.check()
StandardError: No 3D curve
Chris