solvespace/test/constraint
EvilSpirit cc07058e48 Rewrite equations generated for pt-on-line constraints.
Before this commit, pt-on-line constraints are buggy. To reproduce,
extrude a circle, then add a datum point and constrain it to the
axis of the circle, then move it. The cylinder will collapse.

To quote Jonathan:

> On investigation, I (a) confirm that the problem is
> the unconstrained extrusion depth going to zero, and (b) retract
> my earlier statement blaming extrude and other similar non-entity
> parameter treatment for this problem; you can easily reproduce it
> with a point in 3d constrained to lie on any line whose length
> is free.
>
> PT_ON_LINE is written using VectorsParallel, for no obvious reason.
> Rewriting that constraint to work on two projected distances (using
> any two basis vectors perpendicular to the line) should fix that
> problem, since replacing the "point on line in 3d" constraint with
> two "point on line in 2d" constraints works. That still has
> the hairy ball problem of choosing the basis vectors, which you
> can't do with a continuous function; you'd need Vector::Normal()
> or equivalent.
>
> You could write three equations and make the constraint itself
> introduce one new parameter for t. I don't know how well that
> would work numerically, but it would avoid the hairy ball problem,
> perhaps elegant at the cost of speed.

Indeed, this commit implements the latter solution: it introduces
an additional free parameter. The point being coincident with
the start of the line corresponds to the parameter being zero, and
point being coincident with the end corresponds to one).

In effect, instead of constraining two of three degrees of freedom
(for which the equations do not exist because of the hairy ball
theorem), it constrains three and adds one more.
2016-11-26 19:35:38 +00:00
..
angle Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
arc_line_tangent Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
at_midpoint Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
comment Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
cubic_line_tangent Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
curve_curve_tangent Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
diameter Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
eq_len_pt_line_d Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
eq_pt_ln_distances Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
equal_angle Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
equal_length_lines Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
equal_line_arc_len Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
equal_radius Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
horizontal Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
length_difference Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
length_ratio Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
parallel Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
perpendicular Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
points_coincident Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
proj_pt_distance Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_face_distance Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_in_plane Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_line_distance Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_on_circle Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_on_face Unbreak Camera::UnProjectPoint3. 2016-11-19 09:50:00 +00:00
pt_on_line Rewrite equations generated for pt-on-line constraints. 2016-11-26 19:35:38 +00:00
pt_plane_distance Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
pt_pt_distance Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
same_orientation Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
symmetric Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
symmetric_horiz Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
symmetric_line Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
symmetric_vert Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
vertical Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
where_dragged Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00