Same orientation constraint doesn't exist in a workplane.

Before this commit, a same orientation constraint created with
a workplane selected would only remove 2 of 3 DOFs. After
this commit, it properly removes all 3 DOFs.
pull/216/head
EvilSpirit 2017-02-14 00:08:06 +07:00 committed by whitequark
parent 6bc2ed9771
commit 3bcc376224
1 changed files with 3 additions and 1 deletions

View File

@ -611,7 +611,9 @@ void ConstraintBase::GenerateEquations(IdList<Equation,hEquation> *l,
bn = b->NormalExprsN(); bn = b->NormalExprsN();
ExprVector eq = VectorsParallel3d(an, bn, valP); ExprVector eq = VectorsParallel3d(an, bn, valP);
AddEq(l, eq); AddEq(l, eq.x, 0);
AddEq(l, eq.y, 1);
AddEq(l, eq.z, 2);
Expr *d1 = au.Dot(bv); Expr *d1 = au.Dot(bv);
Expr *d2 = au.Dot(bu); Expr *d2 = au.Dot(bu);
// Allow either orientation for the coordinate system, depending // Allow either orientation for the coordinate system, depending