--- /dev/null
+/*!
+
+\page bring_to_front_page Bring To Front
+
+\n This option is relevant for better viewing of the complex 3D models.
+This item allow to bring to front of viewer selected geometrical object.
+
+\image html bring_example.png
+
+*/
viewer and from the Object Browser.</li>
<li>\subpage display_mode_page "Display Mode" - allows to select between
Wireframe and Shading presentation.</li>
+<li>\subpage bring_to_front_page "Bring To Front" - allows to bring to
+front of the viewer selected geometrical object.</li>
+<li><b>Clear Top Level State</b> - allows to remove from foregroung of the viewer
+geometrical objects which were added there via <b>Bring To Front</b> command.</li>
<li>\subpage color_page "Color" - allows to change the filling color in
the standard <b>Select Color</b> menu.</li>
<li>\subpage transparency_page "Transparency" - allows to change the
<parameter name="line_color" value="255, 0, 0" />
<parameter name="point_color" value="255, 255, 0" />
<parameter name="isos_color" value="200, 200, 200" />
+ <parameter name="toplevel_color" value="170, 85, 0" />
<parameter name="type_of_marker" value="1" />
<parameter name="deflection_coeff" value="0.001" />
<parameter name="auto_create_base_objects" value="false" />
v = isAutoColor( idx );
else if ( p == "isVectorsMode" )
v = isVectorsMode( idx );
+ else if ( p == "topLevel" )
+ v = topLevel( idx );
else if ( p == "hasHiddenChildren" )
v = hasHiddenChildren( idx );
else if ( p == "hasShownChildren" )
}
return "";
}
+
+bool GEOMGUI_Selection::topLevel( const int index ) const {
+ bool res = false;
+
+#ifdef USE_VISUAL_PROP_MAP
+ bool found = false;
+ QVariant v = visibleProperty( entry( index ), TOP_LEVEL_PROP );
+ if ( v.canConvert<bool>() ) {
+ res = v.toBool();
+ found = true;
+ }
+
+ if ( !found ) {
+#endif
+ SALOME_View* view = GEOM_Displayer::GetActiveView();
+ QString viewType = activeViewType();
+ if ( view && viewType == OCCViewer_Viewer::Type() ) {
+ SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
+ if ( prs ) {
+ if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
+ SOCC_Prs* occPrs = (SOCC_Prs*) prs;
+ AIS_ListOfInteractive lst;
+ occPrs->GetObjects( lst );
+ if ( lst.Extent() ) {
+ Handle(AIS_InteractiveObject) io = lst.First();
+ if ( !io.IsNull() ) {
+ Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
+ if ( !aSh.IsNull() )
+ res = (bool)aSh->isTopLevel();
+ }
+ }
+ }
+ }
+ }
+ }
+ return res;
+}
bool hasHiddenChildren( const int ) const;
bool hasShownChildren( const int ) const;
bool compoundOfVertices( const int ) const;
+ bool topLevel( const int ) const;
bool isComponent( const int ) const;
GEOM::GEOM_Object_ptr getObject( const int ) const;
AISShape->SetDisplayMode( aPropMap.value(DISPLAY_MODE_PROP).toInt() );
AISShape->SetDisplayVectors(aPropMap.value(VECTOR_MODE_PROP).toInt());
- //Color property
- if(aPropMap.contains(COLOR_PROP)) {
+ if(aPropMap.contains(TOP_LEVEL_PROP)) {
+ AISShape->setTopLevel( aPropMap.value(TOP_LEVEL_PROP).value<Standard_Boolean>() );
+ }
+
+ if(aPropMap.contains(COLOR_PROP)) {
Quantity_Color quant_col = SalomeApp_Tools::color( aPropMap.value(COLOR_PROP).value<QColor>());
AISShape->SetShadingColor( quant_col );
} else
useObjColor = true;
}else {
MESSAGE("myDisplayMode = "<< myDisplayMode)
- AISShape->SetDisplayMode( myDisplayMode );
+ AISShape->SetDisplayMode( myDisplayMode );
AISShape->SetShadingColor( myShadingColor );
}
AISShape->SetOwnDeviationCoefficient(aDC);
}
}
-
+
if ( HasTexture() )
{
AISShape->SetTextureFileName(TCollection_AsciiString(myTexture.c_str()));
AISShape->DisableTextureModulate();
AISShape->SetDisplayMode(3);
}
-
+
if ( HasWidth() )
AISShape->SetWidth( GetWidth() );
anAspect->SetTypeOfMarker( myTypeOfMarker );
AISShape->Attributes()->SetPointAspect( anAspect );
}
- } else if(!hasColor) {
+ } else if( !hasColor ) {
//In case if color wasn't defined in the property map of the object
//and GEOM_Object color also wasn't defined get default color from Resource Mgr.
QColor col = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
//11. Width of iso-lines
aDefaultMap.insert( ISOS_WIDTH_PROP , aResMgr->integerValue("Geometry", "isolines_width", 1));
+ if(viewer_type == SOCC_Viewer::Type()) {
+
+ aDefaultMap.insert(TOP_LEVEL_PROP, Standard_False);
+ }
return aDefaultMap;
}
<source>MEN_DISPLAY_ONLY</source>
<translation>Show Only</translation>
</message>
+ <message>
+ <source>MEN_BRING_TO_FRONT</source>
+ <translation>Bring To Front</translation>
+ </message>
+ <message>
+ <source>TOP_BRING_TO_FRONT</source>
+ <translation>Bring To Front</translation>
+ </message>
+ <message>
+ <source>STB_BRING_TO_FRONT</source>
+ <translation>Bring To Front</translation>
+ </message>
+ <message>
+ <source>MEN_CLS_BRING_TO_FRONT</source>
+ <translation>Clear Top Level State</translation>
+ </message>
+ <message>
+ <source>TOP_CLS_BRING_TO_FRONT</source>
+ <translation>Clear Top Level State</translation>
+ </message>
+ <message>
+ <source>STB_CLS_BRING_TO_FRONT</source>
+ <translation>Clear Top Level State</translation>
+ </message>
<message>
<source>MEN_EDGE</source>
<translation>Edge</translation>
<source>PREF_ISOS_COLOR</source>
<translation>Color of isolines</translation>
</message>
+ <message>
+ <source>PREF_TOPLEVEL_COLOR</source>
+ <translation>Top level color</translation>
+ </message>
<message>
<source>PREF_LINE_COLOR</source>
<translation>Color of edges, vectors, wires</translation>
case GEOMOp::OpMaterialProperties: // POPUP MENU - MATERIAL PROPERTIES
case GEOMOp::OpEdgeWidth: // POPUP MENU - LINE WIDTH - EDGE WIDTH
case GEOMOp::OpIsosWidth: // POPUP MENU - LINE WIDTH - ISOS WIDTH
+ case GEOMOp::OpBringToFront: // POPUP MENU - BRING TO FRONT
+ case GEOMOp::OpClsBringToFront: //
libName = "GEOMToolsGUI";
break;
case GEOMOp::OpDisplayMode: // MENU VIEW - WIREFRAME/SHADING
createGeomAction( GEOMOp::OpSelectCompound, "COMPOUND_SEL_ONLY", "", 0, true );
createGeomAction( GEOMOp::OpSelectAll, "ALL_SEL_ONLY", "", 0, true );
createGeomAction( GEOMOp::OpShowOnly, "DISPLAY_ONLY" );
+ createGeomAction( GEOMOp::OpBringToFront, "BRING_TO_FRONT", "", 0, true );
+ createGeomAction( GEOMOp::OpClsBringToFront, "CLS_BRING_TO_FRONT" );
createGeomAction( GEOMOp::OpHide, "ERASE" );
createGeomAction( GEOMOp::OpWireframe, "POP_WIREFRAME", "", 0, true );
mgr->insert( action( GEOMOp::OpGroupEdit ), -1, -1 ); // edit group
mgr->setRule( action( GEOMOp::OpGroupEdit ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // -----------
+
+#if OCC_VERSION_LARGE > 0x06050200
+ //QString bringRule = clientOCCorOB + " and ($component={'GEOM'}) and (selcount>0) and isOCC=true and topLevel=false";
+ QString bringRule = clientOCCorOB + " and ($component={'GEOM'}) and (selcount>0) and isOCC=true";
+ mgr->insert( action(GEOMOp::OpBringToFront ), -1, -1 ); // bring to front
+ mgr->setRule(action(GEOMOp::OpBringToFront), bringRule, QtxPopupMgr::VisibleRule );
+ mgr->setRule(action(GEOMOp::OpBringToFront), "topLevel=true", QtxPopupMgr::ToggleRule );
+ mgr->insert( action(GEOMOp::OpClsBringToFront ), -1, -1 ); // clear bring to front
+ mgr->setRule( action(GEOMOp::OpClsBringToFront ), clientOCC, QtxPopupMgr::VisibleRule );
+#endif
+ mgr->insert( separator(), -1, -1 ); // -----------
dispmodeId = mgr->insert( tr( "MEN_DISPLAY_MODE" ), -1, -1 ); // display mode menu
mgr->insert( action( GEOMOp::OpWireframe ), dispmodeId, -1 ); // wireframe
mgr->setRule( action( GEOMOp::OpWireframe ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
mgr->setRule(action(GEOMOp::OpSelectAll), selectOnly + " and selectionmode='ALL'", QtxPopupMgr::ToggleRule);
mgr->insert( action(GEOMOp::OpShowOnly ), -1, -1 ); // display only
mgr->setRule(action(GEOMOp::OpShowOnly ), rule.arg( types ).arg( "true" ), QtxPopupMgr::VisibleRule );
- mgr->insert( separator(), -1, -1 );
mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( GEOMOp::OpUnpublishObject ), -1, -1 ); // Unpublish object
addPreference( tr( "PREF_ISOS_COLOR" ), genGroup,
LightApp_Preferences::Color, "Geometry", "isos_color" );
+ addPreference( tr( "PREF_TOPLEVEL_COLOR" ), genGroup,
+ LightApp_Preferences::Color, "Geometry", "toplevel_color" );
+
+ addPreference( "", genGroup, LightApp_Preferences::Space );
+
+
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
param = occParam + TRANSPARENCY_PROP;
ip->setParameter(entry, param, QString::number(aProps.value(TRANSPARENCY_PROP).toDouble()).toLatin1().data());
}
+
+ if(aProps.contains(TOP_LEVEL_PROP)) {
+ param = occParam + TOP_LEVEL_PROP;
+ Standard_Boolean val = aProps.value(TOP_LEVEL_PROP).value<Standard_Boolean>();
+ if (val == Standard_True)
+ ip->setParameter(entry, param, "1");
+ }
}
if(aProps.contains(ISOS_PROP)) {
} else if(paramNameStr == OPACITY_PROP) {
aListOfMap[viewIndex].insert(TRANSPARENCY_PROP, 1. - val.toDouble());
- } else if(paramNameStr == TRANSPARENCY_PROP) {
- aListOfMap[viewIndex].insert(TRANSPARENCY_PROP, val.toDouble());
+ } else if(paramNameStr == TRANSPARENCY_PROP) {
+ aListOfMap[viewIndex].insert( TRANSPARENCY_PROP, val.toDouble() );
+ } else if(paramNameStr == TOP_LEVEL_PROP) {
+ aListOfMap[viewIndex].insert( TRANSPARENCY_PROP, val == "1" ? Standard_True : Standard_False );
+
} else if(paramNameStr == DISPLAY_MODE_PROP) {
aListOfMap[viewIndex].insert( DISPLAY_MODE_PROP, val.toInt());
}
}
+/*!
+ \brief Return action by id
+ \param id identifier of the action
+ \return action
+*/
+QAction* GeometryGUI::getAction(const int id) {
+ return action(id);
+}
+
/*!
\brief Check if this object is can't be renamed in place
class QDialog;
class QMenu;
+class QAction;
class GEOMGUI_OCCSelector;
class LightApp_VTKSelector;
class LightApp_Selection;
virtual void storeVisualParameters (int savePoint);
virtual void restoreVisualParameters(int savePoint);
+ QAction* getAction(const int id);
+
public slots:
virtual bool deactivateModule( SUIT_Study* );
virtual bool activateModule( SUIT_Study* );
OpShadingWithEdges = 2202, // POPUP MENU - DISPLAY MODE - SHADING WITH EDGES
OpVectors = 2203, // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
OpTexture = 2204, // POPUP MENU - DISPLAY MODE - TEXTURE
+ OpBringToFront = 2205, // POPUP MENU - BRING TO FRONT
+ OpClsBringToFront = 2206,
// BasicGUI ------------------//--------------------------------
OpPoint = 3000, // MENU NEW ENTITY - BASIC - POINT
OpLine = 3001, // MENU NEW ENTITY - BASIC - LINE
case GEOMOp::OpIsosWidth:
OnIsosWidth();
break;
+ case GEOMOp::OpBringToFront:
+ OnBringToFront();
+ break;
+ case GEOMOp::OpClsBringToFront:
+ OnClsBringToFront();
+ break;
default:
SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
break;
void OnMaterialProperties();
void OnEdgeWidth();
void OnIsosWidth();
+ void OnBringToFront();
+ void OnClsBringToFront();
// Shortcut commands
void OnChangeTransparency( bool );
// File : GEOMToolsGUI_1.cxx
// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
+#define protected public
+
#include <PyConsole_Console.h>
#include "GEOMToolsGUI.h"
#include <Prs3d_PointAspect.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
+#include <AIS_ListIteratorOfListOfInteractive.hxx>
+#include <AIS_ListOfInteractive.hxx>
+
#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_HArray1OfByte.hxx>
#endif
// QT Includes
+#include <QAction>
#include <QColorDialog>
#include <QInputDialog>
#include <QFileDialog>
// VTK includes
#include <vtkRenderer.h>
-
void GEOMToolsGUI::OnCheckGeometry()
{
SalomeApp_Application* app =
}
} // if ( isVTK )
else if ( isOCC ) {
- Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( selected.First() );
+ Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( selected.First() );
if ( !io.IsNull() ) {
Quantity_Color aColor;
- io->Color( aColor );
- QColor initcolor ((int)( aColor.Red() * 255.0 ),
- (int)( aColor.Green() * 255.0 ),
- (int)( aColor.Blue() * 255.0 ));
+ io->Color( aColor );
+ QColor ic = QColor((int )( aColor.Red() * 255.0 ),
+ (int)( aColor.Green() * 255.0 ),
+ (int)( aColor.Blue() * 255.0 ));
+
+ QVariant v = appStudy->getObjectProperty(mgrId,selected.First()->getEntry(), COLOR_PROP, ic);
+
+ QColor initcolor = v.value<QColor>();
QColor c = QColorDialog::getColor( initcolor, app->desktop() );
if ( c.isValid() ) {
SUIT_OverrideCursor();
ic->SetLocalAttributes(io, aCurDrawer, Standard_False);
}
}
-
+
io->SetColor( aColor );
if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) {
Handle(GEOM_AISShape) aGAISShape = Handle(GEOM_AISShape)::DownCast( io );
aGAISShape->SetShadingColor( aColor );
aGAISShape->storeBoundaryColors();
}
-
+
appStudy->setObjectProperty(mgrId,It.Value()->getEntry(), COLOR_PROP, c);
-
+
io->Redisplay( Standard_True );
// store color to GEOM_Object
aSColor.G = (double)c.green() / 255.0;
aSColor.B = (double)c.blue() / 255.0;
anObject->SetColor( aSColor );
- anObject->SetAutoColor( false );
+ anObject->SetAutoColor( false );
}
} // for
ic->UpdateCurrentViewer();
io = GEOMBase::GetAIS( It.Value(), true );
if ( !io.IsNull() ) {
if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) )
- Handle(GEOM_AISShape)::DownCast( io )->SetTextureFileName(TCollection_AsciiString(aTexture.toStdString().c_str()));
- io->Redisplay( Standard_True );
+ Handle(GEOM_AISShape)::DownCast( io )->SetTextureFileName(TCollection_AsciiString(aTexture.toStdString().c_str()));
+ io->Redisplay( Standard_True );
} // if ( !io.IsNull() )
} // for
ic->UpdateCurrentViewer();
Handle(AIS_Drawer) CurDrawer = CurObject->Attributes();
QVariant v = aStudy->getObjectProperty( aMgrId, CurObject->getIO()->getEntry(), EDGE_WIDTH_PROP , QVariant() );
-
+
int width = v.isValid() ? v.toInt() : 1;
CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, width , newNbUIso) );
GeometryGUI::Modified();
} // end vtkviewer
}
+
+void GEOMToolsGUI::OnBringToFront() {
+ SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if ( !app )
+ return;
+
+ SalomeApp_Module* mod = dynamic_cast<SalomeApp_Module*>(app->activeModule());
+ if(!mod)
+ return;
+
+ GEOM_Displayer* disp = dynamic_cast<GEOM_Displayer*>(mod->displayer());
+
+ if(!disp)
+ return;
+
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ if ( !aSelMgr )
+ return;
+
+ SALOME_ListIO selected;
+ aSelMgr->selectedObjects( selected );
+ if ( selected.IsEmpty() )
+ return;
+
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+ if(!appStudy)
+ return;
+
+ SUIT_ViewWindow* window = app->desktop()->activeWindow();
+
+ OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
+ if ( !vm )
+ return;
+
+ bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
+
+ QAction* a = getGeometryGUI()->action( GEOMOp::OpBringToFront );
+ bool checked = a->isChecked();
+
+ if ( isOCC ) {
+ GEOMBase* gb = new GEOMBase();
+ Handle(GEOM_AISShape) aisShape;
+
+ Handle(AIS_InteractiveContext) ic = vm->getAISContext();
+ SALOME_ListIO anIOlst;
+ for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+ aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), true );
+ if ( !aisShape.IsNull() ) {
+ aisShape->setTopLevel(checked);
+ int aMgrId = window->getViewManager()->getGlobalId();
+ appStudy->setObjectProperty( aMgrId, aisShape->getIO()->getEntry(), TOP_LEVEL_PROP, checked );
+ anIOlst.Append(aisShape->getIO());
+ }
+ } // for...
+ disp->Redisplay(anIOlst);
+ GeometryGUI::Modified();
+ } // if ( isOCC )
+}
+
+void GEOMToolsGUI::OnClsBringToFront() {
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if(!app)
+ return;
+
+ SalomeApp_Module* mod = dynamic_cast<SalomeApp_Module*>(app->activeModule());
+ if(!mod)
+ return;
+
+ GEOM_Displayer* disp = dynamic_cast<GEOM_Displayer*>(mod->displayer());
+
+ if(!disp)
+ return;
+
+
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+ if(!appStudy)
+ return;
+
+ SUIT_ViewWindow* window = app->desktop()->activeWindow();
+
+ bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
+
+ if(isOCC){ // if is OCCViewer
+
+ OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
+ Handle (AIS_InteractiveContext) ic = vm->getAISContext();
+
+ SALOME_ListIO anIOlst;
+ AIS_ListOfInteractive aList;
+ ic->DisplayedObjects( aList );
+ for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() ) {
+
+ Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(it.Value());
+
+ if(CurObject.IsNull())
+ continue;
+
+ CurObject->setTopLevel(Standard_False);
+
+ int aMgrId = window->getViewManager()->getGlobalId();
+ appStudy->setObjectProperty( aMgrId, QString(CurObject->getIO()->getEntry()), TOP_LEVEL_PROP, Standard_False );
+ anIOlst.Append(CurObject->getIO());
+ }
+ disp->Redisplay(anIOlst);
+ GeometryGUI::Modified();
+ }
+}
+
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
+#include <SalomeApp_Tools.h>
+
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
const Handle(AIS_InteractiveContext)& theIC,
myUIsoNumber = -1;
myVIsoNumber = -1;
+
+ myTopLevel = Standard_False;
}
void GEOM_AISShape::setIO(const Handle(SALOME_InteractiveObject)& io){
const Standard_Integer aMode)
{
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
+
+ Handle(AIS_InteractiveContext) anIC = GetContext();
-// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
+ // StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
switch (aMode) {
case 0://StdSelect_DM_Wireframe:
{
+
restoreIsoNumbers();
// Restore wireframe edges colors
restoreBoundaryColors();
+
+ if(isTopLevel()) {
+ SetColor(topLevelColor());
+
+ Handle(Prs3d_LineAspect) anAspect = Attributes()->WireAspect();
+ anAspect->SetColor( topLevelColor() );
+ Attributes()->SetWireAspect( anAspect );
+ }
+
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
+
break;
}
case 1://StdSelect_DM_Shading:
}
case 3: //StdSelect_DM_HLR:
{
- AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
+ if(!isTopLevel())
+ AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
+ else
+ shadingMode(aPresentationManager, aPrs, AIS_Shaded);
break;
}
}
// P->SetPrimitivesAspect(a4bis);
// G->SetGroupPrimitivesAspect(a4bis);
//a4bis->SetInteriorColor(myShadingColor);
- myDrawer->ShadingAspect()->SetColor(myShadingColor);
+ myDrawer->ShadingAspect()->SetColor(isTopLevel() ? topLevelColor() : myShadingColor);
// PAL12113: AIS_Shape::Compute() works correctly with shapes containing no faces
//StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
anAspect->SetColor( myUnFreeBoundaryColor );
myDrawer->SetUnFreeBoundaryAspect( anAspect );
}
+
+
+Standard_Boolean GEOM_AISShape::isTopLevel() {
+ return myTopLevel;
+}
+
+void GEOM_AISShape::setTopLevel(Standard_Boolean f) {
+ myTopLevel = f;
+}
+
+Quantity_Color GEOM_AISShape::topLevelColor() {
+ SUIT_Session* session = SUIT_Session::session();
+ SUIT_ResourceMgr* resMgr = session->resourceMgr();
+ QColor c = resMgr->colorValue( "Geometry", "toplevel_color", QColor( 170, 85, 0 ) );
+ return SalomeApp_Tools::color(c);
+}
void setIO(const Handle(SALOME_InteractiveObject)& name) ;
void setName(const Standard_CString aName) ;
Standard_CString getName() ;
+ Standard_Boolean isTopLevel();
+ void setTopLevel(Standard_Boolean);
Handle_SALOME_InteractiveObject getIO() ;
void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight );
~GEOM_AISShape();
void storeBoundaryColors();
+ static Quantity_Color topLevelColor();
+
protected:
void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPrs,
private:
TCollection_AsciiString myName;
bool myDisplayVectors;
+ Standard_Boolean myTopLevel;
};
}
int GEOM_Actor::GetIsosWidth() const {
- return myWireframeFaceActor->GetProperty()->GetLineWidth();
+ return (int)myWireframeFaceActor->GetProperty()->GetLineWidth();
}
void GEOM_Actor::SetWidth(const int width) {
}
int GEOM_Actor::GetWidth() const {
- return myIsolatedEdgeActor->GetProperty()->GetLineWidth();
+ return (int)myIsolatedEdgeActor->GetProperty()->GetLineWidth();
}
void GEOM_Actor::RestoreIsoNumbers()
#define FRONT_MATERIAL_PROP "FrontMaterial" //Object front material property
#define BACK_MATERIAL_PROP "BackMaterial" //Object back material property
#define EDGE_WIDTH_PROP "EdgeWidth" //Width of the edge
-#define ISOS_WIDTH_PROP "IsosWidth" //Width of the iso-lines
+#define ISOS_WIDTH_PROP "IsosWidth" //Width of the iso-lines
+#define TOP_LEVEL_PROP "TopLevelFlag" //Top level flag
#endif //GEOM_CONSTANTS_H