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
Jonathan Westhues 2008-02-15 03:35:15 -08:00
parent 1c66dca5ba
commit bd0e97bad0
5 changed files with 26 additions and 4 deletions

View File

@ -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) },

View File

@ -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;
}

View File

@ -94,6 +94,8 @@ public:
hGroup opA;
hGroup opB;
bool visible;
bool suppress;
bool clean;
bool vvMeshClean;
hEntity activeWorkplane;

View File

@ -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,9 +421,17 @@ void TextWindow::ShowGroupInfo(void) {
Group::COMBINE_AS_ASSEMBLE,
(asy || !asa ? "" : "assemble"), (asy && asa ? "assemble" : ""));
}
if(g->type == Group::IMPORTED && g->meshError.yes) {
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 ||
g->type == Group::LATHE ||

1
ui.h
View File

@ -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);