From 3bcc3762249031c329fcbd5c0b861d9c6abdcf19 Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Tue, 14 Feb 2017 00:08:06 +0700 Subject: [PATCH] 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. --- src/constrainteq.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/constrainteq.cpp b/src/constrainteq.cpp index fb1106c..ef963b0 100644 --- a/src/constrainteq.cpp +++ b/src/constrainteq.cpp @@ -611,7 +611,9 @@ void ConstraintBase::GenerateEquations(IdList *l, bn = b->NormalExprsN(); 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 *d2 = au.Dot(bu); // Allow either orientation for the coordinate system, depending