I don't really have test data - I just randomly built a spline and swept along it. What I actually do is discretize the target edge based on the resolution (with a minimum of three points), and build a BSpline on the points that are returned from edge.discretize().
I realize I meant to post this Monday, but things got busy...
Here the idea to get a simple and smooth street volumeJoel_graff wrote: ↑Fri Nov 30, 2018 4:54 pmhttps://drive.google.com/open?id=1yLCsY ... moL1cwl8Ks
On another note, I've got vertical curve data importing quite nicely, now - it creates a separate FPO for each vertical curve. Horizontal curves are next. Once that data's loaded, it's an easy thing to generate splines for each curve. Not sure how well they will mesh together, but that's probably another week or two out yet...
Code: Select all
import Draft import Part s=App.ActiveDocument.BSpline.Shape c=s.Curve [a,b]=s.ParameterRange bm=int(round(b))+1 ff=App.ActiveDocument.Template.Shape comps= pts= h=FreeCAD.Vector(0,0,1) for i in range(bm): v=c.value(i) t=c.tangent(i) n=t.cross(FreeCAD.Vector(0,0,1)).normalize() pts += [v,v+t*2,v,v+n*2,v] ff2=ff.copy() pm=ff2.Placement v0=pm.Base pm2=FreeCAD.Placement() pm2.Base=v ptsa=[v,v+2*n,v+2*n+h,v+h,v] ff2=Part.makePolygon(ptsa) comps += [ff2] Draft.makeWire(pts) Part.show(Part.Compound(comps)) la=Part.makeLoft(comps) Part.show(la)
Well, we will go forward, I'm working at the moment on fine tuning the methods for the shoe project. But I still have always a look on this project here and will contribute whenever possible.