USER FORUM

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

**Contraint along a curve ?**

*(by Pilou)*

http://solvespacefr.weebly.com...3620514/moving_along_curve.jpg

A such function is existing ?

A such function is existing ?

**(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.

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.

**(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.

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.

**(no subject)**

*(by Pilou)*

Thx for the infos!

**Post a reply to this comment:**