mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 21:44:17 +05:00
Implementation of the issue "0021671: EDF 1829 GEOM : Bring to front selected objects (continuation)"
This commit is contained in:
parent
12efffce9b
commit
8002d3e86f
@ -50,6 +50,7 @@
|
|||||||
<parameter name="point_color" value="255, 255, 0" />
|
<parameter name="point_color" value="255, 255, 0" />
|
||||||
<parameter name="isos_color" value="200, 200, 200" />
|
<parameter name="isos_color" value="200, 200, 200" />
|
||||||
<parameter name="toplevel_color" value="170, 85, 0" />
|
<parameter name="toplevel_color" value="170, 85, 0" />
|
||||||
|
<parameter name="toplevel_dm" value="0" />
|
||||||
<parameter name="type_of_marker" value="1" />
|
<parameter name="type_of_marker" value="1" />
|
||||||
<parameter name="deflection_coeff" value="0.001" />
|
<parameter name="deflection_coeff" value="0.001" />
|
||||||
<parameter name="auto_create_base_objects" value="false" />
|
<parameter name="auto_create_base_objects" value="false" />
|
||||||
|
@ -386,8 +386,13 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
|||||||
while( ite.More() ) {
|
while( ite.More() ) {
|
||||||
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||||
|
if(aSh->isTopLevel()) {
|
||||||
|
aSh->setPrevDisplayMode(Standard_Integer( newmode ));
|
||||||
|
}
|
||||||
|
else {
|
||||||
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ite.Next();
|
ite.Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,6 +544,9 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
|||||||
AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes );
|
AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes );
|
||||||
AIS_ListIteratorOfListOfInteractive interIter( shapes );
|
AIS_ListIteratorOfListOfInteractive interIter( shapes );
|
||||||
for ( ; interIter.More(); interIter.Next() ) {
|
for ( ; interIter.More(); interIter.Next() ) {
|
||||||
|
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
|
||||||
|
if ( !aSh.IsNull() ) {
|
||||||
|
if(!aSh->isTopLevel()) {
|
||||||
if ( mode == 0 )
|
if ( mode == 0 )
|
||||||
ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
|
ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
|
||||||
else if ( mode == 1 )
|
else if ( mode == 1 )
|
||||||
@ -547,9 +555,10 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
|||||||
ic->SetDisplayMode( interIter.Value(), GEOM_AISShape::ShadingWithEdges, false );
|
ic->SetDisplayMode( interIter.Value(), GEOM_AISShape::ShadingWithEdges, false );
|
||||||
else if ( mode == 3 )
|
else if ( mode == 3 )
|
||||||
ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
|
ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
|
||||||
else if (mode == 4 ) {
|
} else {
|
||||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
|
aSh->setPrevDisplayMode(mode);
|
||||||
if ( !aSh.IsNull() ) {
|
}
|
||||||
|
if (mode == 4 ) {
|
||||||
vectorMode = !aSh->isShowVectors();
|
vectorMode = !aSh->isShowVectors();
|
||||||
aSh->SetDisplayVectors(vectorMode);
|
aSh->SetDisplayVectors(vectorMode);
|
||||||
ic->RecomputePrsOnly(interIter.Value());
|
ic->RecomputePrsOnly(interIter.Value());
|
||||||
|
@ -311,7 +311,13 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
|
|||||||
if ( lst.Extent() ) {
|
if ( lst.Extent() ) {
|
||||||
Handle(AIS_InteractiveObject) io = lst.First();
|
Handle(AIS_InteractiveObject) io = lst.First();
|
||||||
if ( !io.IsNull() ) {
|
if ( !io.IsNull() ) {
|
||||||
int dm = io->DisplayMode();
|
int dm;
|
||||||
|
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
|
||||||
|
if(!aSh.IsNull()) {
|
||||||
|
dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
|
||||||
|
} else {
|
||||||
|
dm = io->DisplayMode();
|
||||||
|
}
|
||||||
OCC_DISPLAY_MODE_TO_STRING( res, dm );
|
OCC_DISPLAY_MODE_TO_STRING( res, dm );
|
||||||
if ( res.isEmpty() ) { // return default display mode of AIS_InteractiveContext
|
if ( res.isEmpty() ) { // return default display mode of AIS_InteractiveContext
|
||||||
OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*)SUIT_Session::session()->activeApplication()->
|
OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*)SUIT_Session::session()->activeApplication()->
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include <GEOM_Actor.h>
|
#include <GEOM_Actor.h>
|
||||||
#include <GEOM_AISShape.hxx>
|
#include <GEOM_AISShape.hxx>
|
||||||
|
#include <GEOM_TopWireframeShape.hxx>
|
||||||
#include <GEOM_AISVector.hxx>
|
#include <GEOM_AISVector.hxx>
|
||||||
#include <GEOM_AISTrihedron.hxx>
|
#include <GEOM_AISTrihedron.hxx>
|
||||||
#include <GEOM_VTKTrihedron.hxx>
|
#include <GEOM_VTKTrihedron.hxx>
|
||||||
@ -673,11 +674,14 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup shape properties here ..., e.g. display mode, color, transparency, etc
|
// Setup shape properties here ..., e.g. display mode, color, transparency, etc
|
||||||
AISShape->SetDisplayMode( aPropMap.value(DISPLAY_MODE_PROP).toInt() );
|
Standard_Boolean isTopLevel = Standard_False;
|
||||||
AISShape->SetDisplayVectors(aPropMap.value(VECTOR_MODE_PROP).toInt());
|
|
||||||
if(aPropMap.contains(TOP_LEVEL_PROP)) {
|
if(aPropMap.contains(TOP_LEVEL_PROP)) {
|
||||||
AISShape->setTopLevel( aPropMap.value(TOP_LEVEL_PROP).value<Standard_Boolean>() );
|
isTopLevel = aPropMap.value(TOP_LEVEL_PROP).value<Standard_Boolean>();
|
||||||
}
|
}
|
||||||
|
AISShape->SetDisplayMode( aPropMap.value(DISPLAY_MODE_PROP).toInt() );
|
||||||
|
AISShape->setTopLevel(isTopLevel);
|
||||||
|
|
||||||
|
AISShape->SetDisplayVectors(aPropMap.value(VECTOR_MODE_PROP).toInt());
|
||||||
}else {
|
}else {
|
||||||
MESSAGE("myDisplayMode = "<< myDisplayMode)
|
MESSAGE("myDisplayMode = "<< myDisplayMode)
|
||||||
AISShape->SetDisplayMode( myDisplayMode );
|
AISShape->SetDisplayMode( myDisplayMode );
|
||||||
@ -697,7 +701,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
QStringList uv = anIsos.split(DIGIT_SEPARATOR);
|
QStringList uv = anIsos.split(DIGIT_SEPARATOR);
|
||||||
anUIsoNumber = uv[0].toInt();
|
anUIsoNumber = uv[0].toInt();
|
||||||
aVIsoNumber = uv[1].toInt();
|
aVIsoNumber = uv[1].toInt();
|
||||||
//AISShape->SetTransparency(aPropMap.value(TRANSPARENCY_PROP).toDouble());
|
AISShape->SetTransparency(aPropMap.value(TRANSPARENCY_PROP).toDouble());
|
||||||
} else {
|
} else {
|
||||||
anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
|
anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
|
||||||
aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
|
aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
|
||||||
@ -758,7 +762,6 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( onlyVertex )
|
if ( onlyVertex )
|
||||||
@ -976,14 +979,10 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
|
|
||||||
// Set material for the selected shape
|
// Set material for the selected shape
|
||||||
AISShape->SetMaterial( material.getMaterialOCCAspect() );
|
AISShape->SetMaterial( material.getMaterialOCCAspect() );
|
||||||
|
|
||||||
if(HasWidth())
|
if(HasWidth())
|
||||||
aStudy->setObjectProperty( aMgrId, anIO->getEntry(), EDGE_WIDTH_PROP, GetWidth() );
|
aStudy->setObjectProperty( aMgrId, anIO->getEntry(), EDGE_WIDTH_PROP, GetWidth() );
|
||||||
|
|
||||||
if(HasIsosWidth())
|
if(HasIsosWidth())
|
||||||
aStudy->setObjectProperty( aMgrId, anIO->getEntry(), ISOS_WIDTH_PROP, GetIsosWidth() );
|
aStudy->setObjectProperty( aMgrId, anIO->getEntry(), ISOS_WIDTH_PROP, GetIsosWidth() );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AISShape->SetName(???); ??? necessary to set name ???
|
// AISShape->SetName(???); ??? necessary to set name ???
|
||||||
@ -992,6 +991,18 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
// In accordance with ToActivate() value object will be activated/deactivated
|
// In accordance with ToActivate() value object will be activated/deactivated
|
||||||
// when it will be displayed
|
// when it will be displayed
|
||||||
occPrs->SetToActivate( ToActivate() );
|
occPrs->SetToActivate( ToActivate() );
|
||||||
|
|
||||||
|
if( AISShape->isTopLevel() && AISShape->topLevelDisplayMode() == GEOM_AISShape::TopShowAdditionalWActor) {
|
||||||
|
//21671: EDF 1829 GEOM : Bring to front selected objects (continuation):
|
||||||
|
// Display wireframe presentation additionally
|
||||||
|
Handle(GEOM_TopWireframeShape) aWirePrs = new GEOM_TopWireframeShape(myShape);
|
||||||
|
aWirePrs->SetWidth(AISShape->Width());
|
||||||
|
if ( !myIO.IsNull() ) {
|
||||||
|
aWirePrs->setIO( myIO );
|
||||||
|
aWirePrs->SetOwner( myIO );
|
||||||
|
}
|
||||||
|
occPrs->AddObject(aWirePrs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if presentation is found -> set again shape for it
|
// if presentation is found -> set again shape for it
|
||||||
|
@ -2962,6 +2962,18 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
<source>PREF_TOPLEVEL_COLOR</source>
|
<source>PREF_TOPLEVEL_COLOR</source>
|
||||||
<translation>Top level color</translation>
|
<translation>Top level color</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>PREF_TOPLEVEL_DM</source>
|
||||||
|
<translation>Top level display mode</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_KEEP_CURRENT_DM</source>
|
||||||
|
<translation>Keep current display mode</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_SHOW_ADD_WACTOR</source>
|
||||||
|
<translation>Show additional wireframe actor</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_LINE_COLOR</source>
|
<source>PREF_LINE_COLOR</source>
|
||||||
<translation>Color of edges, vectors, wires</translation>
|
<translation>Color of edges, vectors, wires</translation>
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <SalomeApp_DataObject.h>
|
#include <SalomeApp_DataObject.h>
|
||||||
#include <SalomeApp_Study.h>
|
#include <SalomeApp_Study.h>
|
||||||
|
#include <SalomeApp_Tools.h>
|
||||||
|
|
||||||
#include <LightApp_SelectionMgr.h>
|
#include <LightApp_SelectionMgr.h>
|
||||||
#include <LightApp_VTKSelector.h>
|
#include <LightApp_VTKSelector.h>
|
||||||
@ -1338,6 +1339,14 @@ void GeometryGUI::initialize( CAM_Application* app )
|
|||||||
mgr->setRule( action( GEOMOp::OpReimport ), QString("$imported in {'true'} and selcount>0"), QtxPopupMgr::VisibleRule );
|
mgr->setRule( action( GEOMOp::OpReimport ), QString("$imported in {'true'} and selcount>0"), QtxPopupMgr::VisibleRule );
|
||||||
|
|
||||||
mgr->hide( mgr->actionId( action( myEraseAll ) ) );
|
mgr->hide( mgr->actionId( action( myEraseAll ) ) );
|
||||||
|
|
||||||
|
|
||||||
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
if(resMgr) {
|
||||||
|
GEOM_AISShape::setTopLevelDisplayMode((GEOM_AISShape::TopLevelDispMode)resMgr->integerValue("Geometry", "toplevel_dm", 0));
|
||||||
|
QColor c = resMgr->colorValue( "Geometry", "toplevel_color", QColor( 170, 85, 0 ) );
|
||||||
|
GEOM_AISShape::setTopLevelColor(SalomeApp_Tools::color(c));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -1712,8 +1721,8 @@ void GeometryGUI::createPreferences()
|
|||||||
addPreference( tr( "PREF_TOPLEVEL_COLOR" ), genGroup,
|
addPreference( tr( "PREF_TOPLEVEL_COLOR" ), genGroup,
|
||||||
LightApp_Preferences::Color, "Geometry", "toplevel_color" );
|
LightApp_Preferences::Color, "Geometry", "toplevel_color" );
|
||||||
|
|
||||||
addPreference( "", genGroup, LightApp_Preferences::Space );
|
int top_lev_dm = addPreference( tr( "PREF_TOPLEVEL_DM" ), genGroup,
|
||||||
|
LightApp_Preferences::Selector, "Geometry", "toplevel_dm" );
|
||||||
|
|
||||||
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
|
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
|
||||||
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
|
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
|
||||||
@ -1800,6 +1809,25 @@ void GeometryGUI::createPreferences()
|
|||||||
setPreferenceProperty( dispmode, "strings", aModesList );
|
setPreferenceProperty( dispmode, "strings", aModesList );
|
||||||
setPreferenceProperty( dispmode, "indexes", anIndexesList );
|
setPreferenceProperty( dispmode, "indexes", anIndexesList );
|
||||||
|
|
||||||
|
|
||||||
|
// Set property for top level display mode
|
||||||
|
QStringList aTopModesList;
|
||||||
|
aTopModesList.append( tr("MEN_KEEP_CURRENT_DM") );
|
||||||
|
aTopModesList.append( tr("MEN_WIREFRAME") );
|
||||||
|
aTopModesList.append( tr("MEN_SHADING") );
|
||||||
|
aTopModesList.append( tr("MEN_SHADING_WITH_EDGES") );
|
||||||
|
aTopModesList.append( tr("MEN_SHOW_ADD_WACTOR") );
|
||||||
|
|
||||||
|
QList<QVariant> aTopIndexesList;
|
||||||
|
aTopIndexesList.append(0);
|
||||||
|
aTopIndexesList.append(1);
|
||||||
|
aTopIndexesList.append(2);
|
||||||
|
aTopIndexesList.append(3);
|
||||||
|
aTopIndexesList.append(4);
|
||||||
|
|
||||||
|
setPreferenceProperty( top_lev_dm, "strings", aTopModesList );
|
||||||
|
setPreferenceProperty( top_lev_dm, "indexes", aTopIndexesList );
|
||||||
|
|
||||||
// Set property for step value for spinboxes
|
// Set property for step value for spinboxes
|
||||||
setPreferenceProperty( step, "min", 1 );
|
setPreferenceProperty( step, "min", 1 );
|
||||||
setPreferenceProperty( step, "max", 10000 );
|
setPreferenceProperty( step, "max", 10000 );
|
||||||
@ -1868,6 +1896,11 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
|||||||
if (param == QString("SettingsGeomStep")) {
|
if (param == QString("SettingsGeomStep")) {
|
||||||
double spin_step = aResourceMgr->doubleValue(section, param, 100.);
|
double spin_step = aResourceMgr->doubleValue(section, param, 100.);
|
||||||
EmitSignalDefaultStepValueChanged(spin_step);
|
EmitSignalDefaultStepValueChanged(spin_step);
|
||||||
|
} else if(param == QString("toplevel_color")) {
|
||||||
|
QColor c = aResourceMgr->colorValue( "Geometry", "toplevel_color", QColor( 170, 85, 0 ) );
|
||||||
|
GEOM_AISShape::setTopLevelColor(SalomeApp_Tools::color(c));
|
||||||
|
} else if(param == QString("toplevel_dm")) {
|
||||||
|
GEOM_AISShape::setTopLevelDisplayMode((GEOM_AISShape::TopLevelDispMode)aResourceMgr->integerValue("Geometry", "toplevel_dm", 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -990,6 +990,7 @@ void GEOMToolsGUI::OnEdgeWidth()
|
|||||||
if (isOCC) { // if is OCCViewer
|
if (isOCC) { // if is OCCViewer
|
||||||
OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>(window->getViewManager()->getViewModel());
|
OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>(window->getViewManager()->getViewModel());
|
||||||
Handle (AIS_InteractiveContext) ic = vm->getAISContext();
|
Handle (AIS_InteractiveContext) ic = vm->getAISContext();
|
||||||
|
SALOME_View* view = GEOM_Displayer::GetActiveView();
|
||||||
ic->InitCurrent();
|
ic->InitCurrent();
|
||||||
if (ic->MoreCurrent()) {
|
if (ic->MoreCurrent()) {
|
||||||
Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
|
Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
|
||||||
@ -1006,8 +1007,17 @@ void GEOMToolsGUI::OnEdgeWidth()
|
|||||||
if (ok) {
|
if (ok) {
|
||||||
for(; ic->MoreCurrent(); ic->NextCurrent()) {
|
for(; ic->MoreCurrent(); ic->NextCurrent()) {
|
||||||
CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
|
CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
|
||||||
CurObject->SetWidth(aNewWidth);
|
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(view->CreatePrs(CurObject->getIO()->getEntry()));
|
||||||
ic->Redisplay(CurObject);
|
AIS_ListOfInteractive anAISObjects;
|
||||||
|
aPrs->GetObjects( anAISObjects );
|
||||||
|
AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
|
||||||
|
for ( ; aIter.More(); aIter.Next() ) {
|
||||||
|
Handle(SALOME_AISShape) cur = Handle(SALOME_AISShape)::DownCast(aIter.Value());
|
||||||
|
if ( !cur.IsNull() ) {
|
||||||
|
cur->SetWidth(aNewWidth);
|
||||||
|
ic->Redisplay(cur);
|
||||||
|
}
|
||||||
|
}
|
||||||
appStudy->setObjectProperty(mgrId, CurObject->getIO()->getEntry(), EDGE_WIDTH_PROP, aNewWidth);
|
appStudy->setObjectProperty(mgrId, CurObject->getIO()->getEntry(), EDGE_WIDTH_PROP, aNewWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,11 +73,18 @@
|
|||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
|
|
||||||
|
#include <TColStd_SequenceOfInteger.hxx>
|
||||||
|
|
||||||
|
#include <V3d_View.hxx>
|
||||||
|
|
||||||
#include <SalomeApp_Tools.h>
|
#include <SalomeApp_Tools.h>
|
||||||
|
|
||||||
#include <SUIT_Session.h>
|
#include <SUIT_Session.h>
|
||||||
#include <SUIT_ResourceMgr.h>
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
|
||||||
|
GEOM_AISShape::TopLevelDispMode GEOM_AISShape::myTopLevelDm = GEOM_AISShape::TopKeepCurrent;
|
||||||
|
Quantity_Color GEOM_AISShape::myTopLevelColor;
|
||||||
|
|
||||||
|
|
||||||
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
|
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
|
||||||
const Handle(AIS_InteractiveContext)& theIC,
|
const Handle(AIS_InteractiveContext)& theIC,
|
||||||
@ -138,9 +145,10 @@ GEOM_AISShape::GEOM_AISShape(const TopoDS_Shape& shape,
|
|||||||
: SALOME_AISShape(shape), myName(aName), myDisplayVectors(false)
|
: SALOME_AISShape(shape), myName(aName), myDisplayVectors(false)
|
||||||
{
|
{
|
||||||
myShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD );
|
myShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD );
|
||||||
|
myPrevDisplayMode = 0;
|
||||||
storeBoundaryColors();
|
storeBoundaryColors();
|
||||||
|
|
||||||
|
|
||||||
myEdgesInShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD );
|
myEdgesInShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD );
|
||||||
|
|
||||||
myUIsoNumber = -1;
|
myUIsoNumber = -1;
|
||||||
@ -198,41 +206,33 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
|
|||||||
Handle(AIS_InteractiveContext) anIC = GetContext();
|
Handle(AIS_InteractiveContext) anIC = GetContext();
|
||||||
|
|
||||||
// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
|
// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
|
||||||
|
bool isTopLev = (isTopLevel() && topLevelDisplayMode() != TopShowAdditionalWActor);
|
||||||
switch (aMode) {
|
switch (aMode) {
|
||||||
case 0://StdSelect_DM_Wireframe:
|
case 0://StdSelect_DM_Wireframe:
|
||||||
{
|
{
|
||||||
|
|
||||||
restoreIsoNumbers();
|
restoreIsoNumbers();
|
||||||
|
|
||||||
// Restore wireframe edges colors
|
// Restore wireframe edges colors
|
||||||
restoreBoundaryColors();
|
restoreBoundaryColors();
|
||||||
|
if(isTopLev) {
|
||||||
|
|
||||||
if(isTopLevel()) {
|
|
||||||
SetColor(topLevelColor());
|
SetColor(topLevelColor());
|
||||||
Handle(Prs3d_LineAspect) anAspect = Attributes()->WireAspect();
|
Handle(Prs3d_LineAspect) anAspect = Attributes()->WireAspect();
|
||||||
anAspect->SetColor( topLevelColor() );
|
anAspect->SetColor( topLevelColor() );
|
||||||
Attributes()->SetWireAspect( anAspect );
|
Attributes()->SetWireAspect( anAspect );
|
||||||
}
|
}
|
||||||
|
|
||||||
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
|
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1://StdSelect_DM_Shading:
|
case 1://StdSelect_DM_Shading:
|
||||||
{
|
{
|
||||||
restoreIsoNumbers();
|
restoreIsoNumbers();
|
||||||
|
|
||||||
shadingMode(aPresentationManager, aPrs, aMode);
|
shadingMode(aPresentationManager, aPrs, aMode);
|
||||||
|
|
||||||
// Store wireframe edges colors
|
// Store wireframe edges colors
|
||||||
storeBoundaryColors();
|
storeBoundaryColors();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: //StdSelect_DM_HLR:
|
case 3: //StdSelect_DM_HLR:
|
||||||
{
|
{
|
||||||
if(!isTopLevel())
|
if(!isTopLev)
|
||||||
AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
|
AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
|
||||||
else
|
else
|
||||||
shadingMode(aPresentationManager, aPrs, AIS_Shaded);
|
shadingMode(aPresentationManager, aPrs, AIS_Shaded);
|
||||||
@ -396,7 +396,7 @@ void GEOM_AISShape::shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPre
|
|||||||
// P->SetPrimitivesAspect(a4bis);
|
// P->SetPrimitivesAspect(a4bis);
|
||||||
// G->SetGroupPrimitivesAspect(a4bis);
|
// G->SetGroupPrimitivesAspect(a4bis);
|
||||||
//a4bis->SetInteriorColor(myShadingColor);
|
//a4bis->SetInteriorColor(myShadingColor);
|
||||||
if( isTopLevel() )
|
if( isTopLevel() && topLevelDisplayMode() != TopShowAdditionalWActor )
|
||||||
myDrawer->ShadingAspect()->SetColor( topLevelColor() );
|
myDrawer->ShadingAspect()->SetColor( topLevelColor() );
|
||||||
else {
|
else {
|
||||||
if(myDrawer->ShadingAspect()->Aspect()->FrontMaterial().MaterialType( Graphic3d_MATERIAL_ASPECT ))
|
if(myDrawer->ShadingAspect()->Aspect()->FrontMaterial().MaterialType( Graphic3d_MATERIAL_ASPECT ))
|
||||||
@ -470,12 +470,47 @@ Standard_Boolean GEOM_AISShape::isTopLevel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GEOM_AISShape::setTopLevel(Standard_Boolean f) {
|
void GEOM_AISShape::setTopLevel(Standard_Boolean f) {
|
||||||
|
if(f) {
|
||||||
|
if(f != myTopLevel)
|
||||||
|
myPrevDisplayMode = DisplayMode();
|
||||||
|
Standard_Integer dm;
|
||||||
|
switch(topLevelDisplayMode()) {
|
||||||
|
case TopKeepCurrent : dm = myPrevDisplayMode; break;
|
||||||
|
case TopWireFrame : dm = AIS_WireFrame; break;
|
||||||
|
case TopShadingWithEdges : dm = ShadingWithEdges; break;
|
||||||
|
default : dm = AIS_Shaded; break;
|
||||||
|
}
|
||||||
|
SetDisplayMode(dm);
|
||||||
|
} else {
|
||||||
|
if(f != myTopLevel)
|
||||||
|
SetDisplayMode(myPrevDisplayMode);
|
||||||
|
}
|
||||||
myTopLevel = f;
|
myTopLevel = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Quantity_Color GEOM_AISShape::topLevelColor() {
|
void GEOM_AISShape::setPrevDisplayMode(const Standard_Integer mode) {
|
||||||
SUIT_Session* session = SUIT_Session::session();
|
myPrevDisplayMode = mode;
|
||||||
SUIT_ResourceMgr* resMgr = session->resourceMgr();
|
}
|
||||||
QColor c = resMgr->colorValue( "Geometry", "toplevel_color", QColor( 170, 85, 0 ) );
|
|
||||||
return SalomeApp_Tools::color(c);
|
Quantity_Color GEOM_AISShape::topLevelColor() {
|
||||||
|
return myTopLevelColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GEOM_AISShape::setTopLevelColor(const Quantity_Color c) {
|
||||||
|
myTopLevelColor = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOM_AISShape::TopLevelDispMode GEOM_AISShape::topLevelDisplayMode() {
|
||||||
|
return myTopLevelDm;
|
||||||
|
}
|
||||||
|
void GEOM_AISShape::setTopLevelDisplayMode(const GEOM_AISShape::TopLevelDispMode dm) {
|
||||||
|
myTopLevelDm = dm;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_AISShape::switchTopLevel() {
|
||||||
|
return myTopLevelDm != TopShowAdditionalWActor;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_AISShape::toActivate() {
|
||||||
|
return Standard_True;
|
||||||
}
|
}
|
@ -77,6 +77,16 @@ public:
|
|||||||
TexturedShape = ShadingWithEdges+1 //!< the same as AIS_ExactHLR
|
TexturedShape = ShadingWithEdges+1 //!< the same as AIS_ExactHLR
|
||||||
} DispMode;
|
} DispMode;
|
||||||
|
|
||||||
|
//! Enumeration of top level display modes
|
||||||
|
typedef enum {
|
||||||
|
TopKeepCurrent = 0 , //!< Keep current display mode
|
||||||
|
TopWireFrame,
|
||||||
|
TopShading,
|
||||||
|
TopShadingWithEdges,
|
||||||
|
TopShowAdditionalWActor
|
||||||
|
} TopLevelDispMode;
|
||||||
|
|
||||||
|
|
||||||
inline void* operator new(size_t,void* anAddress)
|
inline void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
@ -116,6 +126,8 @@ public:
|
|||||||
const Standard_Integer aMode = 0) ;
|
const Standard_Integer aMode = 0) ;
|
||||||
|
|
||||||
virtual bool isShowVectors () { return myDisplayVectors; }
|
virtual bool isShowVectors () { return myDisplayVectors; }
|
||||||
|
virtual Standard_Boolean switchTopLevel();
|
||||||
|
virtual Standard_Boolean toActivate();
|
||||||
|
|
||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
@ -130,6 +142,14 @@ public:
|
|||||||
void storeBoundaryColors();
|
void storeBoundaryColors();
|
||||||
|
|
||||||
static Quantity_Color topLevelColor();
|
static Quantity_Color topLevelColor();
|
||||||
|
static void setTopLevelColor(const Quantity_Color c);
|
||||||
|
|
||||||
|
static TopLevelDispMode topLevelDisplayMode();
|
||||||
|
static void setTopLevelDisplayMode(const TopLevelDispMode dm);
|
||||||
|
|
||||||
|
void setPrevDisplayMode(const Standard_Integer mode);
|
||||||
|
Standard_Integer prevDisplayMode() const {return myPrevDisplayMode;}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
|
void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
|
||||||
@ -153,7 +173,10 @@ private:
|
|||||||
bool myDisplayVectors;
|
bool myDisplayVectors;
|
||||||
Standard_Boolean myTopLevel;
|
Standard_Boolean myTopLevel;
|
||||||
Graphic3d_MaterialAspect myCurrentMaterial;
|
Graphic3d_MaterialAspect myCurrentMaterial;
|
||||||
|
Standard_Integer myPrevDisplayMode;
|
||||||
|
|
||||||
|
static TopLevelDispMode myTopLevelDm;
|
||||||
|
static Quantity_Color myTopLevelColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
102
src/OBJECT/GEOM_TopWireframeShape.cxx
Executable file
102
src/OBJECT/GEOM_TopWireframeShape.cxx
Executable file
@ -0,0 +1,102 @@
|
|||||||
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// GEOM OBJECT : interactive object for Geometry entities visualization
|
||||||
|
// File : GEOM_TopWireframeShape.cxx
|
||||||
|
// Author :
|
||||||
|
// Module : GEOM
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class GEOM_TopWireframeShape GEOM_TopWireframeShape.hxx
|
||||||
|
\brief This class designed for drawing special OCC wireframe
|
||||||
|
presentation on the top level of the viewer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Local includes
|
||||||
|
#include "GEOM_TopWireframeShape.ixx"
|
||||||
|
#include "GEOM_AISShape.hxx"
|
||||||
|
|
||||||
|
//GUI includes
|
||||||
|
#include <SALOME_InteractiveObject.hxx>
|
||||||
|
|
||||||
|
//Open CASCADE includes
|
||||||
|
#include <AIS_Drawer.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <Prs3d_IsoAspect.hxx>
|
||||||
|
|
||||||
|
GEOM_TopWireframeShape::GEOM_TopWireframeShape(const TopoDS_Shape& shape)
|
||||||
|
: SALOME_AISShape(shape)
|
||||||
|
{
|
||||||
|
SetDisplayMode(AIS_WireFrame);
|
||||||
|
Handle(Prs3d_IsoAspect) anAspect = Attributes()->UIsoAspect();
|
||||||
|
anAspect->SetNumber( 0 );
|
||||||
|
Attributes()->SetUIsoAspect( anAspect );
|
||||||
|
anAspect = Attributes()->VIsoAspect();
|
||||||
|
anAspect->SetNumber( 0 );
|
||||||
|
Attributes()->SetVIsoAspect( anAspect );
|
||||||
|
SetColor(GEOM_AISShape::topLevelColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(SALOME_InteractiveObject) GEOM_TopWireframeShape::getIO(){
|
||||||
|
Handle(SALOME_InteractiveObject) IO;
|
||||||
|
if ( !GetOwner().IsNull() )
|
||||||
|
IO = Handle(SALOME_InteractiveObject)::DownCast( GetOwner() );
|
||||||
|
return IO;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_TopWireframeShape::hasIO(){
|
||||||
|
return !getIO().IsNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GEOM_TopWireframeShape::setName(const Standard_CString /*aName*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_CString GEOM_TopWireframeShape::getName(){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GEOM_TopWireframeShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& /*aIndexMap*/,
|
||||||
|
const Standard_Boolean /*aHighlight*/ )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_TopWireframeShape::isTopLevel() {
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GEOM_TopWireframeShape::setTopLevel(Standard_Boolean /*f*/) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_TopWireframeShape::toActivate() {
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean GEOM_TopWireframeShape::switchTopLevel() {
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GEOM_TopWireframeShape::setIO(const Handle(SALOME_InteractiveObject)& io){
|
||||||
|
SetOwner( io );
|
||||||
|
}
|
110
src/OBJECT/GEOM_TopWireframeShape.hxx
Executable file
110
src/OBJECT/GEOM_TopWireframeShape.hxx
Executable file
@ -0,0 +1,110 @@
|
|||||||
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// GEOM OBJECT : interactive object for Geometry entities visualization
|
||||||
|
// File : GEOM_TopWireframeShape.hxx
|
||||||
|
// Module : GEOM
|
||||||
|
//
|
||||||
|
#ifndef _GEOM_TopWireframeShape_HeaderFile
|
||||||
|
#define _GEOM_TopWireframeShape_HeaderFile
|
||||||
|
|
||||||
|
#include "GEOM_OBJECT_defs.hxx"
|
||||||
|
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Handle_GEOM_TopWireframeShape_HeaderFile
|
||||||
|
#include "Handle_GEOM_TopWireframeShape.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SALOME_AISShape_HeaderFile
|
||||||
|
#include "SALOME_AISShape.hxx"
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class GEOM_OBJECT_EXPORT GEOM_TopWireframeShape : public SALOME_AISShape {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
inline void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
inline void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
inline void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// inline void operator delete(void *anAddress, size_t size)
|
||||||
|
// {
|
||||||
|
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Methods PUBLIC
|
||||||
|
//
|
||||||
|
GEOM_TopWireframeShape(const TopoDS_Shape& shape);
|
||||||
|
virtual Handle_SALOME_InteractiveObject getIO();
|
||||||
|
virtual Standard_Boolean hasIO();
|
||||||
|
virtual Standard_Boolean isTopLevel();
|
||||||
|
virtual Standard_Boolean switchTopLevel();
|
||||||
|
virtual Standard_Boolean toActivate();
|
||||||
|
virtual void setTopLevel(Standard_Boolean);
|
||||||
|
virtual Standard_CString getName();
|
||||||
|
virtual void setName(const Standard_CString aName);
|
||||||
|
virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight );
|
||||||
|
~GEOM_TopWireframeShape();
|
||||||
|
|
||||||
|
// Type management
|
||||||
|
//
|
||||||
|
friend Handle_Standard_Type& GEOM_TopWireframeShape_Type_();
|
||||||
|
const Handle(Standard_Type)& DynamicType() const;
|
||||||
|
Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
|
|
||||||
|
void setIO(const Handle(SALOME_InteractiveObject)& io);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Methods PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
// Fields PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Methods PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
// Fields PRIVATE
|
||||||
|
//
|
||||||
|
};
|
||||||
|
|
||||||
|
// other inline functions and methods (like "C++: function call" methods)
|
||||||
|
//
|
||||||
|
|
||||||
|
#endif
|
89
src/OBJECT/GEOM_TopWireframeShape.ixx
Executable file
89
src/OBJECT/GEOM_TopWireframeShape.ixx
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// GEOM OBJECT : interactive object for Geometry entities visualization
|
||||||
|
// File : GEOM_AISShape.ixx
|
||||||
|
// Module : GEOM
|
||||||
|
//
|
||||||
|
#include "GEOM_TopWireframeShape.jxx"
|
||||||
|
|
||||||
|
#ifndef _Standard_TypeMismatch_HeaderFile
|
||||||
|
#include <Standard_TypeMismatch.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
GEOM_TopWireframeShape::~GEOM_TopWireframeShape() {}
|
||||||
|
|
||||||
|
Standard_EXPORT Handle_Standard_Type& GEOM_TopWireframeShape_Type_()
|
||||||
|
{
|
||||||
|
|
||||||
|
static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_AISShape);
|
||||||
|
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_AISShape);
|
||||||
|
static Handle_Standard_Type aType2 = STANDARD_TYPE(AIS_Shape);
|
||||||
|
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(AIS_Shape);
|
||||||
|
static Handle_Standard_Type aType3 = STANDARD_TYPE(AIS_InteractiveObject);
|
||||||
|
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(AIS_InteractiveObject);
|
||||||
|
static Handle_Standard_Type aType4 = STANDARD_TYPE(SelectMgr_SelectableObject);
|
||||||
|
if ( aType4.IsNull()) aType4 = STANDARD_TYPE(SelectMgr_SelectableObject);
|
||||||
|
static Handle_Standard_Type aType5 = STANDARD_TYPE(PrsMgr_PresentableObject);
|
||||||
|
if ( aType5.IsNull()) aType5 = STANDARD_TYPE(PrsMgr_PresentableObject);
|
||||||
|
static Handle_Standard_Type aType6 = STANDARD_TYPE(MMgt_TShared);
|
||||||
|
if ( aType6.IsNull()) aType6 = STANDARD_TYPE(MMgt_TShared);
|
||||||
|
static Handle_Standard_Type aType7 = STANDARD_TYPE(Standard_Transient);
|
||||||
|
if ( aType7.IsNull()) aType7 = STANDARD_TYPE(Standard_Transient);
|
||||||
|
|
||||||
|
|
||||||
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,aType6,aType7,NULL};
|
||||||
|
static Handle_Standard_Type _aType = new Standard_Type("GEOM_TopWireframeShape",
|
||||||
|
sizeof(GEOM_TopWireframeShape),
|
||||||
|
1,
|
||||||
|
(Standard_Address)_Ancestors,
|
||||||
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
|
return _aType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// DownCast method
|
||||||
|
// allow safe downcasting
|
||||||
|
//
|
||||||
|
const Handle(GEOM_TopWireframeShape) Handle(GEOM_TopWireframeShape)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||||
|
{
|
||||||
|
Handle(GEOM_TopWireframeShape) _anOtherObject;
|
||||||
|
|
||||||
|
if (!AnObject.IsNull()) {
|
||||||
|
if (AnObject->IsKind(STANDARD_TYPE(GEOM_TopWireframeShape))) {
|
||||||
|
_anOtherObject = Handle(GEOM_TopWireframeShape)((Handle(GEOM_TopWireframeShape)&)AnObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return _anOtherObject ;
|
||||||
|
}
|
||||||
|
const Handle(Standard_Type)& GEOM_TopWireframeShape::DynamicType() const
|
||||||
|
{
|
||||||
|
return STANDARD_TYPE(GEOM_TopWireframeShape) ;
|
||||||
|
}
|
||||||
|
Standard_Boolean GEOM_TopWireframeShape::IsKind(const Handle(Standard_Type)& AType) const
|
||||||
|
{
|
||||||
|
return (STANDARD_TYPE(GEOM_TopWireframeShape) == AType || SALOME_AISShape::IsKind(AType));
|
||||||
|
}
|
||||||
|
Handle_GEOM_TopWireframeShape::~Handle_GEOM_TopWireframeShape() {}
|
||||||
|
|
33
src/OBJECT/GEOM_TopWireframeShape.jxx
Executable file
33
src/OBJECT/GEOM_TopWireframeShape.jxx
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// GEOM OBJECT : interactive object for Geometry entities visualization
|
||||||
|
// File : GEOM_AISShape.jxx
|
||||||
|
// Module : GEOM
|
||||||
|
//
|
||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GEOM_TopWireframeShape_HeaderFile
|
||||||
|
#include "GEOM_TopWireframeShape.hxx"
|
||||||
|
#endif
|
100
src/OBJECT/Handle_GEOM_TopWireframeShape.hxx
Executable file
100
src/OBJECT/Handle_GEOM_TopWireframeShape.hxx
Executable file
@ -0,0 +1,100 @@
|
|||||||
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
//
|
||||||
|
|
||||||
|
// GEOM OBJECT : interactive object for Geometry entities visualization
|
||||||
|
// File : Handle_GEOM_TopWireframeShape.hxx
|
||||||
|
// Module : GEOM
|
||||||
|
//
|
||||||
|
#ifndef _Handle_GEOM_TopWireframeShape_HeaderFile
|
||||||
|
#define _Handle_GEOM_TopWireframeShape_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _Handle_SALOME_AISShape_HeaderFile
|
||||||
|
#include "Handle_SALOME_AISShape.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle_Standard_Type;
|
||||||
|
class Handle(SALOME_AISShape);
|
||||||
|
class GEOM_TopWireframeShape;
|
||||||
|
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_TopWireframeShape);
|
||||||
|
|
||||||
|
class Handle(GEOM_TopWireframeShape) : public Handle(SALOME_AISShape) {
|
||||||
|
public:
|
||||||
|
inline void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
inline void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
inline void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// inline void operator delete(void *anAddress, size_t size)
|
||||||
|
// {
|
||||||
|
// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
|
||||||
|
// }
|
||||||
|
Handle(GEOM_TopWireframeShape)():Handle(SALOME_AISShape)() {}
|
||||||
|
Handle(GEOM_TopWireframeShape)(const Handle(GEOM_TopWireframeShape)& aHandle) : Handle(SALOME_AISShape)(aHandle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOM_TopWireframeShape)(const GEOM_TopWireframeShape* anItem) : Handle(SALOME_AISShape)((SALOME_AISShape *)anItem)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOM_TopWireframeShape)& operator=(const Handle(GEOM_TopWireframeShape)& aHandle)
|
||||||
|
{
|
||||||
|
Assign(aHandle.Access());
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOM_TopWireframeShape)& operator=(const GEOM_TopWireframeShape* anItem)
|
||||||
|
{
|
||||||
|
Assign((Standard_Transient *)anItem);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOM_TopWireframeShape* operator->()
|
||||||
|
{
|
||||||
|
return (GEOM_TopWireframeShape *)ControlAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOM_TopWireframeShape* operator->() const
|
||||||
|
{
|
||||||
|
return (GEOM_TopWireframeShape *)ControlAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT ~Handle(GEOM_TopWireframeShape)();
|
||||||
|
|
||||||
|
Standard_EXPORT static const Handle(GEOM_TopWireframeShape) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||||
|
};
|
||||||
|
#endif
|
@ -32,6 +32,10 @@ salomeinclude_HEADERS = \
|
|||||||
GEOM_AISShape.ixx \
|
GEOM_AISShape.ixx \
|
||||||
GEOM_AISShape.jxx \
|
GEOM_AISShape.jxx \
|
||||||
Handle_GEOM_AISShape.hxx \
|
Handle_GEOM_AISShape.hxx \
|
||||||
|
GEOM_TopWireframeShape.hxx \
|
||||||
|
GEOM_TopWireframeShape.ixx \
|
||||||
|
GEOM_TopWireframeShape.jxx \
|
||||||
|
Handle_GEOM_TopWireframeShape.hxx \
|
||||||
GEOM_InteractiveObject.hxx \
|
GEOM_InteractiveObject.hxx \
|
||||||
GEOM_InteractiveObject.ixx \
|
GEOM_InteractiveObject.ixx \
|
||||||
GEOM_InteractiveObject.jxx \
|
GEOM_InteractiveObject.jxx \
|
||||||
@ -54,6 +58,7 @@ dist_libGEOMObject_la_SOURCES = \
|
|||||||
GEOM_Actor.cxx \
|
GEOM_Actor.cxx \
|
||||||
GEOM_OCCReader.cxx \
|
GEOM_OCCReader.cxx \
|
||||||
GEOM_AISShape.cxx \
|
GEOM_AISShape.cxx \
|
||||||
|
GEOM_TopWireframeShape.cxx \
|
||||||
GEOM_InteractiveObject.cxx \
|
GEOM_InteractiveObject.cxx \
|
||||||
GEOM_AISTrihedron.cxx \
|
GEOM_AISTrihedron.cxx \
|
||||||
GEOM_VTKTrihedron.cxx \
|
GEOM_VTKTrihedron.cxx \
|
||||||
|
Loading…
Reference in New Issue
Block a user