Now I can suppress an imported part; so the entities still show up,
but the mesh doesn't get combined. That effectively hides it, good for looking inside and such. [git-p4: depot-paths = "//depot/solvespace/": change = 1860]solver
parent
1c66dca5ba
commit
bd0e97bad0
1
file.cpp
1
file.cpp
|
@ -85,6 +85,7 @@ const SolveSpace::SaveTable SolveSpace::SAVED[] = {
|
|||
{ 'g', "Group.predef.negateU", 'b', &(SS.sv.g.predef.negateU) },
|
||||
{ 'g', "Group.predef.negateV", 'b', &(SS.sv.g.predef.negateV) },
|
||||
{ 'g', "Group.visible", 'b', &(SS.sv.g.visible) },
|
||||
{ 'g', "Group.suppress", 'b', &(SS.sv.g.suppress) },
|
||||
{ 'g', "Group.remap", 'M', &(SS.sv.g.remap) },
|
||||
{ 'g', "Group.impFile", 'P', &(SS.sv.g.impFile) },
|
||||
{ 'g', "Group.impFileRel", 'P', &(SS.sv.g.impFileRel) },
|
||||
|
|
|
@ -511,8 +511,9 @@ void Group::GenerateMesh(void) {
|
|||
runningMesh.Clear();
|
||||
|
||||
// If this group contributes no new mesh, then our running mesh is the
|
||||
// same as last time, no combining required.
|
||||
if(thisMesh.l.n == 0) {
|
||||
// same as last time, no combining required. Likewise if we have a mesh
|
||||
// but it's suppressed.
|
||||
if(thisMesh.l.n == 0 || suppress) {
|
||||
runningMesh.MakeFromCopy(PreviousGroupMesh());
|
||||
goto done;
|
||||
}
|
||||
|
|
2
sketch.h
2
sketch.h
|
@ -94,6 +94,8 @@ public:
|
|||
hGroup opA;
|
||||
hGroup opB;
|
||||
bool visible;
|
||||
bool suppress;
|
||||
|
||||
bool clean;
|
||||
bool vvMeshClean;
|
||||
hEntity activeWorkplane;
|
||||
|
|
|
@ -225,6 +225,15 @@ void TextWindow::ScreenChangeMeshCombine(int link, DWORD v) {
|
|||
SS.GenerateAll();
|
||||
SS.GW.ClearSuper();
|
||||
}
|
||||
void TextWindow::ScreenChangeSuppress(int link, DWORD v) {
|
||||
SS.UndoRemember();
|
||||
|
||||
Group *g = SS.GetGroup(SS.TW.shown.group);
|
||||
g->suppress = !(g->suppress);
|
||||
SS.MarkGroupDirty(g->h);
|
||||
SS.GenerateAll();
|
||||
SS.GW.ClearSuper();
|
||||
}
|
||||
void TextWindow::ScreenChangeRightLeftHanded(int link, DWORD v) {
|
||||
SS.UndoRemember();
|
||||
|
||||
|
@ -412,8 +421,16 @@ void TextWindow::ShowGroupInfo(void) {
|
|||
Group::COMBINE_AS_ASSEMBLE,
|
||||
(asy || !asa ? "" : "assemble"), (asy && asa ? "assemble" : ""));
|
||||
}
|
||||
if(g->type == Group::IMPORTED && g->meshError.yes) {
|
||||
Printf(false, "%Fx the parts interfere!");
|
||||
if(g->type == Group::IMPORTED) {
|
||||
if(g->meshError.yes) {
|
||||
Printf(false, "%Fx the parts interfere!");
|
||||
}
|
||||
bool sup = g->suppress;
|
||||
Printf(false, "%FtSUPPRESS%E %Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E",
|
||||
&TextWindow::ScreenChangeSuppress,
|
||||
(sup ? "" : "yes"), (sup ? "yes" : ""),
|
||||
&TextWindow::ScreenChangeSuppress,
|
||||
(!sup ? "" : "no"), (!sup ? "no" : ""));
|
||||
}
|
||||
|
||||
if(g->type == Group::EXTRUDE ||
|
||||
|
|
1
ui.h
1
ui.h
|
@ -131,6 +131,7 @@ public:
|
|||
static void ScreenChangeOneOrTwoSides(int link, DWORD v);
|
||||
static void ScreenChangeSkipFirst(int link, DWORD v);
|
||||
static void ScreenChangeMeshCombine(int link, DWORD v);
|
||||
static void ScreenChangeSuppress(int link, DWORD v);
|
||||
static void ScreenChangeRightLeftHanded(int link, DWORD v);
|
||||
static void ScreenChangeHelixParameter(int link, DWORD v);
|
||||
static void ScreenColor(int link, DWORD v);
|
||||
|
|
Loading…
Reference in New Issue