Allow point-on-face for up to 3 faces at once
parent
3609f8a7e9
commit
3833dd0246
|
@ -274,22 +274,29 @@ void Constraint::MenuConstrain(Command id) {
|
|||
c.type = Type::POINTS_COINCIDENT;
|
||||
c.ptA = gs.point[0];
|
||||
c.ptB = gs.point[1];
|
||||
newcons.push_back(c);
|
||||
} else if(gs.points == 1 && gs.workplanes == 1 && gs.n == 2) {
|
||||
c.type = Type::PT_IN_PLANE;
|
||||
c.ptA = gs.point[0];
|
||||
c.entityA = gs.entity[0];
|
||||
newcons.push_back(c);
|
||||
} else if(gs.points == 1 && gs.lineSegments == 1 && gs.n == 2) {
|
||||
c.type = Type::PT_ON_LINE;
|
||||
c.ptA = gs.point[0];
|
||||
c.entityA = gs.entity[0];
|
||||
newcons.push_back(c);
|
||||
} else if(gs.points == 1 && gs.circlesOrArcs == 1 && gs.n == 2) {
|
||||
c.type = Type::PT_ON_CIRCLE;
|
||||
c.ptA = gs.point[0];
|
||||
c.entityA = gs.entity[0];
|
||||
} else if(gs.points == 1 && gs.faces == 1 && gs.n == 2) {
|
||||
newcons.push_back(c);
|
||||
} else if(gs.points == 1 && gs.faces >= 1 && gs.n == gs.points+gs.faces) {
|
||||
c.type = Type::PT_ON_FACE;
|
||||
c.ptA = gs.point[0];
|
||||
c.entityA = gs.face[0];
|
||||
for (int k=0; k<gs.faces; k++) {
|
||||
c.entityA = gs.face[k];
|
||||
newcons.push_back(c);
|
||||
}
|
||||
} else {
|
||||
Error(_("Bad selection for on point / curve / plane constraint. "
|
||||
"This constraint can apply to:\n\n"
|
||||
|
@ -300,8 +307,8 @@ void Constraint::MenuConstrain(Command id) {
|
|||
" * a point and a plane face (point on face)\n"));
|
||||
return;
|
||||
}
|
||||
AddConstraint(&c);
|
||||
newcons.push_back(c);
|
||||
for (auto&& nc : newcons)
|
||||
AddConstraint(&nc);
|
||||
break;
|
||||
|
||||
case Command::EQUAL:
|
||||
|
|
Loading…
Reference in New Issue