I'm cutting the contours of my object with a relatively big endmill, that leaves the issue that corners won't be as accurate as they should be.
Instead of generating a complete contour again with a smaller endmill I thought about generating helper segments, picking points on the object, generating a 2d face and running eg. an adaptive algorithm.
or does anyone have a better idea?
Code: Select all
def createFaceFromPoints(pts):
start=FreeCAD.Vector(pts[0][0], pts[0][1], 0)
begin=start
segments=[]
for i in pts[1:]:
beginv=FreeCAD.Vector(begin[0], begin[1], 0)
endv=FreeCAD.Vector(i[0], i[1], 0)
segments.append(Part.Edge(Part.LineSegment(beginv, endv)))
begin=endv
segments.append(Part.Edge(Part.LineSegment(begin, start)))
return segments
f=Part.Face(Part.Wire(createFaceFromPoints(s.PickedPoints)))
Part.show(f)