Add an ability to create a workplane with another workplane.
This is useful in case one wants to create a workplane based on one of the reference ones, to be explicit, or to avoid fishing out again the line segments used to create a workplane at an angle.pull/109/merge
parent
c7277521f3
commit
3c451586d7
|
@ -9,6 +9,7 @@ New sketch features:
|
||||||
boolean operation, to increase performance.
|
boolean operation, to increase performance.
|
||||||
* Translate and rotate groups can create n-dimensional arrays using
|
* Translate and rotate groups can create n-dimensional arrays using
|
||||||
the "difference" and "assembly" boolean operations.
|
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
|
* TTF text request has two additional points on the right side, which allow
|
||||||
constraining the width of text.
|
constraining the width of text.
|
||||||
* Irrelevant points (e.g. arc center point) are not counted when estimating
|
* Irrelevant points (e.g. arc center point) are not counted when estimating
|
||||||
|
|
|
@ -120,13 +120,27 @@ void Group::MenuGroup(Command id) {
|
||||||
}
|
}
|
||||||
if(SS.GW.projRight.Dot(ut) < 0) g.predef.negateU = true;
|
if(SS.GW.projRight.Dot(ut) < 0) g.predef.negateU = true;
|
||||||
if(SS.GW.projUp. Dot(vt) < 0) g.predef.negateV = 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 {
|
} else {
|
||||||
Error("Bad selection for new sketch in workplane. This "
|
Error("Bad selection for new sketch in workplane. This "
|
||||||
"group can be created with:\n\n"
|
"group can be created with:\n\n"
|
||||||
" * a point (orthogonal to coordinate axes, "
|
" * a point (orthogonal to coordinate axes, "
|
||||||
"through the point)\n"
|
"through the point)\n"
|
||||||
" * a point and two line segments (parallel to the "
|
" * 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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue