diff --git a/CHANGELOG.md b/CHANGELOG.md index 39cb699..b315eb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ New sketch features: boolean operation, to increase performance. * Translate and rotate groups can create n-dimensional arrays using the "difference" and "assembly" boolean operations. + * A new sketch in workplane group can be created based on existing workplane. * TTF text request has two additional points on the right side, which allow constraining the width of text. * Irrelevant points (e.g. arc center point) are not counted when estimating diff --git a/src/group.cpp b/src/group.cpp index f8d1c27..6f1b9e7 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -120,13 +120,27 @@ void Group::MenuGroup(Command id) { } if(SS.GW.projRight.Dot(ut) < 0) g.predef.negateU = true; if(SS.GW.projUp. Dot(vt) < 0) g.predef.negateV = true; + } else if(gs.workplanes == 1 && gs.n == 1) { + Group *wrkplg = SK.GetGroup(gs.entity[0].group()); + g.subtype = wrkplg->subtype; + g.predef.origin = wrkplg->predef.origin; + if (wrkplg->subtype == Subtype::WORKPLANE_BY_LINE_SEGMENTS) { + g.predef.entityB = wrkplg->predef.entityB; + g.predef.entityC = wrkplg->predef.entityC; + g.predef.swapUV = wrkplg->predef.swapUV; + g.predef.negateU = wrkplg->predef.negateU; + g.predef.negateV = wrkplg->predef.negateV; + } else { + g.predef.q = wrkplg->predef.q; + } } else { Error("Bad selection for new sketch in workplane. This " "group can be created with:\n\n" " * a point (orthogonal to coordinate axes, " "through the point)\n" " * a point and two line segments (parallel to the " - "lines, through the point)\n"); + "lines, through the point)\n" + " * a workplane (copy of the workplane)\n"); return; } break;