You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, great macro!
it works but it is very laggy for me, I gained some performance by converting to an approximate BSpline. I was thinking that others may also benefit from this. Here is the code I changed
defrun(self):
# generate coordinates# thetaList = [j / self.steps * 2 * pi for j in range(self.steps + 1)]thetaList= [rescale_func(j/self.steps, 0.8) forjinrange(self.steps+1)]
points= []
# thetaList = [rescale_func(theta, 0.8) for theta in thetaList]xList= [epi.x(theta*2*pi) forthetainthetaList]
yList= [epi.y(theta*2*pi) forthetainthetaList]
# add lines to the sketchforjinrange(self.steps):
x1, x2=xList[j:j+2]
y1, y2=yList[j:j+2]
# self.sketch.addGeometry(Part.LineSegment(App.Vector(x1, y1, 0),# App.Vector(x2, y2, 0)), False)points.append(App.Vector(x1,y1,0))
points.append(points[0]) # to close the loopbs=Part.BSplineCurve()
bs.approximate(points)
self.sketch.addGeometry(bs)
# self.sketch.addConstraint(Sketcher.Constraint("Coincident", 0, 1, self.steps - 1, 2))self.doc.recompute()
The text was updated successfully, but these errors were encountered:
Good point. I will add it as a kwarg. I also tried this once, but went back to using line segments because my CAM software (EstlCAM) had trouble reading DXF sketches with splines.
Hey, great macro!
it works but it is very laggy for me, I gained some performance by converting to an approximate BSpline. I was thinking that others may also benefit from this. Here is the code I changed
The text was updated successfully, but these errors were encountered: