From 74cc5094772d4e4d0c2de21edaa0496e21ad984e Mon Sep 17 00:00:00 2001 From: Thomas Boleman <bolemann@iag.uni-stuttgart.de> Date: Tue, 15 Nov 2011 11:05:12 +0000 Subject: [PATCH] Renamed compound_only parameter to showCompound. Enable to fix issue with invisible discrete meshes. --- Common/CommandLine.cpp | 6 +++--- Common/Context.cpp | 2 +- Common/Context.h | 2 +- Geo/GEdge.cpp | 2 +- Geo/GFace.cpp | 2 +- Geo/GModelIO_Geo.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 8ce0e199dc..7151ef9749 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -101,7 +101,7 @@ void PrintUsage(const char *name) Msg::Direct(" -fontsize int Specify the font size for the GUI"); Msg::Direct(" -theme string Specify FLTK GUI theme"); Msg::Direct(" -display string Specify display"); - Msg::Direct(" -compound_only Hide underlying surfaces/edges of compounds"); + Msg::Direct(" -showCompounds Shows the underlying surfaces/edges/mesh of compounds"); #endif Msg::Direct("Other options:"); Msg::Direct(" - Parse input files, then exit"); @@ -747,8 +747,8 @@ void GetOptions(int argc, char *argv[]) else Msg::Fatal("Missing argument"); } - else if(!strcmp(argv[i] + 1, "compound_only")) { - CTX::instance()->compoundOnly = 1; + else if(!strcmp(argv[i] + 1, "showCompounds")) { + CTX::instance()->showCompounds = 1; i++; } #endif diff --git a/Common/Context.cpp b/Common/Context.cpp index 4bd4443120..fbcfc7b7e3 100644 --- a/Common/Context.cpp +++ b/Common/Context.cpp @@ -62,7 +62,7 @@ CTX::CTX() #endif forcedBBox = 0; hideUnselected = 0; - compoundOnly = 1; + showCompounds = 0; numWindows = numTiles = 1; deltaFontSize = 0; recentFiles.resize(5); diff --git a/Common/Context.h b/Common/Context.h index 680f373b26..f76ebcb882 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -193,7 +193,7 @@ class CTX { // hide all unselected entities? int hideUnselected; // hide underlying curves and surfaces of compounds (makes work a lot easier) - int compoundOnly; + int showCompounds; // temporary storage of rotation, translation, scale (until the GUI // is ready) double tmpRotation[3], tmpTranslation[3], tmpScale[3], tmpQuaternion[4]; diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index f6fbe98c42..ee12f22516 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -163,7 +163,7 @@ SOrientedBoundingBox GEdge::getOBB() void GEdge::setVisibility(char val, bool recursive) { - if (getCompound() && CTX::instance()->compoundOnly) { + if (getCompound() && !CTX::instance()->showCompounds) { // use visibility info of compound edge if this edge belongs to it GEntity::setVisibility(0); if(v0) v0->setVisibility(0); diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index 6392736926..881338882c 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -242,7 +242,7 @@ std::list<GVertex*> GFace::vertices() const void GFace::setVisibility(char val, bool recursive) { - if (getCompound() && CTX::instance()->compoundOnly) { + if (getCompound() && !CTX::instance()->showCompounds) { GEntity::setVisibility(0); for (std::list<GEdge*>::iterator it = l_edges.begin(); it != l_edges.end(); ++it) (*it)->setVisibility(0, true); diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp index 3442fcf88a..dad32884e4 100644 --- a/Geo/GModelIO_Geo.cpp +++ b/Geo/GModelIO_Geo.cpp @@ -199,7 +199,7 @@ int GModel::importGEOInternals() f->meshAttributes.Method = s->Method; f->meshAttributes.extrude = s->Extrude; add(f); - if (CTX::instance()->compoundOnly) + if (!CTX::instance()->showCompounds) for (std::list<GFace*>::iterator it = comp.begin(); it != comp.end(); ++it) (*it)->setVisibility(0,true); if(s->EmbeddedCurves){ -- GitLab