USER FORUM

(you are viewing a thread; or go back to list of threads)

Contraint along a curve ? (by Pilou)
Thu Sep 26 2013, 04:26:37
(no subject) (by Jonathan Westhues)
SolveSpace has constraints for point-on-line and point-on-circular-arc, but not point-on-cubic-spline. The first two have a simple implicit form, which makes it easy to write the constraint equation. It's a difficult problem already to implicitize a cubic curve in parametric form, even before considering the piecewise thing.

The easiest way to implement that constraint would be to write a constraint equation with no closed form, and solve numerically for the distance from the point to the cubic and the relevant partials. We'd end up with numerical methods within numerical methods, that solve within the greater Newton's method.

It would also be possible to represent the point by its parameter along the spline, instead of its coordinates (u, v) in the workplane or (x, y, z). That's faster and more numerically stable, but wouldn't e.g. let a point be constrained on two splines.
Thu Sep 26 2013, 11:35:05
(no subject) (by Jonathan Westhues)
Oh, and for completeness: that parametric representation would permit the illusion of points constrained on multiple splines (or other parametric curves), but that would need to be implemented as multiple points (by the parameter along each curve) with x and y constrained equal. That should be pretty straightforward, even for piecewise curves, as long as the first derivatives are continuous.

That gets even more complicated when e.g. a control point for a spline is constrained on another spline. It might still be the best way to do it, though.
Thu Sep 26 2013, 11:57:17
(no subject) (by Pilou)
Thx for the infos!
Thu Sep 26 2013, 12:40:26
Post a reply to this comment: