Solvespace: Add point on line segment constraint

Created on 22 May 2019  路  6Comments  路  Source: solvespace/solvespace

When i set constraint for point to stay on line, it can move past the two points defining the line like this:

image

I think it would be usefull to have constraint that can limit point movement only between these two points, eg.:

image

Can you please add this?

enhancement patch-available

All 6 comments

This will be able with ranged constraints merged. PointOnLine has param and it can be constrained to be 0..1.

Can this be applied to point-on-spline then?

@phkahler I think the problem is the discontiguity between two parts of a spline.

There is no problem to make pt-on-spline if spline is split on cubic bezier segments, but in case of SolveSpace where we have one primitive for several splines (up to 15 pts) we should invent some special derivative-function made of segments. My suggestion is to remove the current spline entity and substitute it with
1) Cubic spline made of 4 pts
2) Tangent constraint of second order derivative

So, we can support old files in the way where we substitute one big spline with small ones and applying special (G2/C2 derivatives smooth) tangency after loading.

Look at NoteCAD where we have pt-to-spline and even pt-to-arbitrary function, but still have no tangent of second derivative (temporary)

I was only thinking of the cubic spline with 4 points. I had forgotten that those are created with the same tool as the many-point splines and may be considered "the same thing" when they're actually sort-of different. I know the more complex version is actually composed of many instances of the simple version internally, but it still begs the question of how to transition a constrained point from one segment to the next. It wouldn't seem right to allow it for one curve and not another when they are created with the same tool.

I'd recommend doing point-on-line-segment first. Then the code will be in place to limit the range of parameters (Revolve angle may want that too).

@phkahler it is already implemented and needs some UI/cosmetic fixes https://github.com/Evil-Spirit/solvespace-master/commit/7cb2b8fb4afd8fbd4bfeb5cc1a6ad7c9f4c7075a

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Symbian9 picture Symbian9  路  6Comments

prototype99 picture prototype99  路  9Comments

phkahler picture phkahler  路  7Comments

whitequark picture whitequark  路  6Comments

jockbert picture jockbert  路  6Comments