JoshM wrote: ↑Thu Jan 10, 2019 8:32 pm
I'm not sure if this helps any or not, but have you looked at scripting a BSpline through your points in Sketcher?
The reason I say I'm unsure if there's merit in this is that I am not sure the reason the Spine curve was incorrect in the macro I posted on here, and this too is a Spine approach.
You had mentioned in that case that there was deviation between the output curves and what you needed, and I didn't have an answer why. I assumed because the points were calculated from the formulas you linked, and because the gross shapes appeared consistent, that this would be what you needed. One thing I've wondered is if the issue is approximation versus interpolation, but then i would assume that if you raised the number of theta point calculations, the opportunity for deviation would decrease, and that's not what I understood you to be seeing.
Any chance you can show where the issue was in that approach?
Hi Josh,
again, thank you for your input! Looks like I need to invest more time on this... and/or hope for your patience, until I completely investigated most of this, til a usable result. Refining it can happen later.
First point, regarding your BSpline script in Draft: I think, it's correct, and I only was in error using the wrong (understanding of) the rolling extension. (Maybe also be a wrong use of my little data base, thus getting in confusion about the rolling extension and the excentricity of the rotating piston.) Only thing I wasn't glad about, was the rough segmentation of the resulting draft spline.
But the spline approach seems to be the only way to make the curve usable for PartDesign. Yesterday, really by coincidence, I noticed the Sketcher's ability to create "periodic B-splines". ATM I'm trying to get this curve by manually picking the points of @DjangoFreeCAD's last posted script.
What - doing this Sketcher WB menu command - shows on Console view, is quite promising: In fact it replicates exactly what I wanted (here shown for one added segment):
Code: Select all
>>> App.ActiveDocument.Sketch.addGeometry(Part.Circle(App.Vector(132.482742,-82.362534,0),App.Vector(0,0,1),10),True)
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Equal',360,401))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',401,3,318,2))
>>>
So far, I haven't found the description on how to automate the Sketcher's "periodic B-spline". I'm still trying to get a manual version to later compare it to your Draft curve and my first geometrically made one.
BTW, I've made a weird observation while creating the B-spline: When picking the points of @DjangoFreeCAD's line-based curve, step-by-step, several but not all of the original segment lines do loose their previous end-point's placement. I really hope, I don't need to worry about.
BR, Manuel