
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().microelly2 wrote: ↑Thu Nov 22, 2018 12:28 pmI think the better way is not to use sweep but to calculate the poles of the border curves by yourself. can you share your testdata to compare the results
Good to hear that.Joel_graff wrote: ↑Thu Nov 22, 2018 2:07 pmIf nothing else, it seems like being able to build alignments purely from the data seems within reach...
I realize I meant to post this Monday, but things got busy...microelly2 wrote: ↑Thu Nov 22, 2018 12:28 pmI think the better way is not to use sweep but to calculate the poles of the border curves by yourself. can you share your testdata to compare the results
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[0].cross(FreeCAD.Vector(0,0,1)).normalize()
pts += [v,v+t[0]*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)
Gorgeous.
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.Joel_graff wrote: ↑Fri Nov 30, 2018 6:00 pmAnyway, it'll be nice to have a real alignment with several sidestreets to develop with. Eventually, we should be able to use it to finish developing the sketcher-based workflow...