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.negateU", 'b', &(SS.sv.g.predef.negateU) },
|
||||||
{ 'g', "Group.predef.negateV", 'b', &(SS.sv.g.predef.negateV) },
|
{ 'g', "Group.predef.negateV", 'b', &(SS.sv.g.predef.negateV) },
|
||||||
{ 'g', "Group.visible", 'b', &(SS.sv.g.visible) },
|
{ '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.remap", 'M', &(SS.sv.g.remap) },
|
||||||
{ 'g', "Group.impFile", 'P', &(SS.sv.g.impFile) },
|
{ 'g', "Group.impFile", 'P', &(SS.sv.g.impFile) },
|
||||||
{ 'g', "Group.impFileRel", 'P', &(SS.sv.g.impFileRel) },
|
{ 'g', "Group.impFileRel", 'P', &(SS.sv.g.impFileRel) },
|
||||||
|
|
|
@ -511,8 +511,9 @@ void Group::GenerateMesh(void) {
|
||||||
runningMesh.Clear();
|
runningMesh.Clear();
|
||||||
|
|
||||||
// If this group contributes no new mesh, then our running mesh is the
|
// If this group contributes no new mesh, then our running mesh is the
|
||||||
// same as last time, no combining required.
|
// same as last time, no combining required. Likewise if we have a mesh
|
||||||
if(thisMesh.l.n == 0) {
|
// but it's suppressed.
|
||||||
|
if(thisMesh.l.n == 0 || suppress) {
|
||||||
runningMesh.MakeFromCopy(PreviousGroupMesh());
|
runningMesh.MakeFromCopy(PreviousGroupMesh());
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
2
sketch.h
2
sketch.h
|
@ -94,6 +94,8 @@ public:
|
||||||
hGroup opA;
|
hGroup opA;
|
||||||
hGroup opB;
|
hGroup opB;
|
||||||
bool visible;
|
bool visible;
|
||||||
|
bool suppress;
|
||||||
|
|
||||||
bool clean;
|
bool clean;
|
||||||
bool vvMeshClean;
|
bool vvMeshClean;
|
||||||
hEntity activeWorkplane;
|
hEntity activeWorkplane;
|
||||||
|
|
|
@ -225,6 +225,15 @@ void TextWindow::ScreenChangeMeshCombine(int link, DWORD v) {
|
||||||
SS.GenerateAll();
|
SS.GenerateAll();
|
||||||
SS.GW.ClearSuper();
|
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) {
|
void TextWindow::ScreenChangeRightLeftHanded(int link, DWORD v) {
|
||||||
SS.UndoRemember();
|
SS.UndoRemember();
|
||||||
|
|
||||||
|
@ -412,8 +421,16 @@ void TextWindow::ShowGroupInfo(void) {
|
||||||
Group::COMBINE_AS_ASSEMBLE,
|
Group::COMBINE_AS_ASSEMBLE,
|
||||||
(asy || !asa ? "" : "assemble"), (asy && asa ? "assemble" : ""));
|
(asy || !asa ? "" : "assemble"), (asy && asa ? "assemble" : ""));
|
||||||
}
|
}
|
||||||
if(g->type == Group::IMPORTED && g->meshError.yes) {
|
if(g->type == Group::IMPORTED) {
|
||||||
Printf(false, "%Fx the parts interfere!");
|
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 ||
|
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 ScreenChangeOneOrTwoSides(int link, DWORD v);
|
||||||
static void ScreenChangeSkipFirst(int link, DWORD v);
|
static void ScreenChangeSkipFirst(int link, DWORD v);
|
||||||
static void ScreenChangeMeshCombine(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 ScreenChangeRightLeftHanded(int link, DWORD v);
|
||||||
static void ScreenChangeHelixParameter(int link, DWORD v);
|
static void ScreenChangeHelixParameter(int link, DWORD v);
|
||||||
static void ScreenColor(int link, DWORD v);
|
static void ScreenColor(int link, DWORD v);
|
||||||
|
|
Loading…
Reference in New Issue