Fix normal issue, when a workplane is created from a point and normal we were only storing the numeric normal so the plane (and subsequent extrusion) wouldn't follow if the sketch was on the face of a revolve. Now we store the handle to the defining normal it predef.entityB so it can update properly on regeneration.
parent
7fa72500c8
commit
465506670c
|
@ -140,6 +140,7 @@ void Group::MenuGroup(Command id, Platform::Path linkFile) {
|
||||||
}
|
}
|
||||||
} else if(gs.anyNormals == 1 && gs.points == 1 && gs.n == 2) {
|
} else if(gs.anyNormals == 1 && gs.points == 1 && gs.n == 2) {
|
||||||
g.subtype = Subtype::WORKPLANE_BY_POINT_NORMAL;
|
g.subtype = Subtype::WORKPLANE_BY_POINT_NORMAL;
|
||||||
|
g.predef.entityB = gs.anyNormal[0];
|
||||||
g.predef.q = SK.GetEntity(gs.anyNormal[0])->NormalGetNum();
|
g.predef.q = SK.GetEntity(gs.anyNormal[0])->NormalGetNum();
|
||||||
g.predef.origin = gs.point[0];
|
g.predef.origin = gs.point[0];
|
||||||
//} else if(gs.faces == 1 && gs.points == 1 && gs.n == 2) {
|
//} else if(gs.faces == 1 && gs.points == 1 && gs.n == 2) {
|
||||||
|
@ -455,9 +456,11 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
||||||
if(predef.negateU) u = u.ScaledBy(-1);
|
if(predef.negateU) u = u.ScaledBy(-1);
|
||||||
if(predef.negateV) v = v.ScaledBy(-1);
|
if(predef.negateV) v = v.ScaledBy(-1);
|
||||||
q = Quaternion::From(u, v);
|
q = Quaternion::From(u, v);
|
||||||
} else if(subtype == Subtype::WORKPLANE_BY_POINT_ORTHO || subtype == Subtype::WORKPLANE_BY_POINT_NORMAL /*|| subtype == Subtype::WORKPLANE_BY_POINT_FACE*/) {
|
} else if(subtype == Subtype::WORKPLANE_BY_POINT_ORTHO) {
|
||||||
// Already given, numerically.
|
// Already given, numerically.
|
||||||
q = predef.q;
|
q = predef.q;
|
||||||
|
} else if(subtype == Subtype::WORKPLANE_BY_POINT_NORMAL) {
|
||||||
|
q = SK.GetEntity(predef.entityB)->NormalGetNum();
|
||||||
} else ssassert(false, "Unexpected workplane subtype");
|
} else ssassert(false, "Unexpected workplane subtype");
|
||||||
|
|
||||||
Entity normal = {};
|
Entity normal = {};
|
||||||
|
|
Loading…
Reference in New Issue