USER FORUM

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

Constrain point on line segment (by PetrST)
Folks,

is there a way how to constrain a point to lay on a line segment and not to escape its boundaries? The built-in constrain "On line/ curve /plane" let the point to be anywhere on straight line projected through the segment, i.e. even beyond its extremes.

Thanks,
Petr
Mon Sep 3 2018, 06:18:07
(no subject) (by app4soft)
There two ways how to fix point on line segment for "not to escape its boundaries":

1. Constrain point as "Midpoint" (select line, select point & press "M" key)

2. Constrain "Point on Line" using "Distance" from line end-points.
Tue Sep 4 2018, 17:27:40
(no subject) (by Andrew)
I think what you are trying to achieve can be accomplished by couple of construction lines. An orthogonal line at the mid point of the line you want to constrain the point to, and a line from the point you want to constrain to this line. Make this line half the length of the line you want to constrain the point to, and cannot go past the ends of that line.

The attached sketch shows on point of the triangle constrained like this.

I hope this helps.
RE: Constrain point on line segment (by PetrST)
@app4soft
If understand correctly this would fix the point at specific position on the line (midpoint or at certain distance from the extremes). What I wanted is that point could be "anywhere" on the line between the endpoints. What would help is if I could put expression in the Distance constraint. The I could fix the point on the line and "less than" half of line lenght from midpoint.

@Andrew
Yes, this is what I was looking for. Thank you.
Wed Sep 5 2018, 08:45:09
(no subject) (by EvilSpirit)
You should look into branch https://github.com/Evil-Spirit/solvespace-master/commits/master where you can specify value range for constraints
Mon Sep 10 2018, 23:56:41
Rolled in? (by caseyjames)
Were the value range constraints ever rolled in?

Any thing to know before trying to get this going in 2023?
Tue Jan 17 2023, 19:31:26
(no subject) (by ruevs)
It is neither finished nor merged.
Look in the "Constraints" section here. https://github.com/solvespace/solvespace/issues/1024

The specific issue is this
https://github.com/solvespace/solvespace/issues/422

And the general issue is this
https://github.com/solvespace/solvespace/issues/77
Wed Jan 18 2023, 14:23:14
In Python? (by caseyjames)
I went through the threads — fascinating, is work on that underway?

My use case only requires the solver engine (via Python),
would the value range constraint branch work in its present state in that context?
Wed Jan 18 2023, 15:28:57
(no subject) (by ruevs)
The last comments in #77 reflect (the little) that is currently happening.

Whether the branch can be merged into the Python wrapper and work I do not know.
Thu Jan 19 2023, 07:05:51
Post a reply to this comment: