Merge from V5_1_4_BR 23/06/2010

This commit is contained in:
vsr 2010-06-23 13:38:25 +00:00
parent 4804fa97d3
commit 1c577b65eb
4 changed files with 277 additions and 240 deletions

View File

@ -129,7 +129,8 @@ int GEOMGUI_Selection::typeId( const int index ) const
int aType = -1;
GEOM::GEOM_Object_var anObj = getObject( index );
if ( !CORBA::is_nil( anObj ) )
aType = anObj->GetType();
//aType = anObj->GetType();
aType = (int)anObj->GetShapeType();
return aType;
}

View File

@ -1088,7 +1088,8 @@ void GeometryGUI::initialize( CAM_Application* app )
mgr->insert( action( GEOMOp::OpDeflection ), -1, -1 ); // deflection
mgr->setRule( action( GEOMOp::OpDeflection ), "selcount>0 and isVisible and client='OCCViewer'", QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpPointMarker ), -1, -1 ); // point marker
mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg( GEOM_POINT ), QtxPopupMgr::VisibleRule );
//mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg(GEOM_POINT ), QtxPopupMgr::VisibleRule );
mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg(GEOM::VERTEX), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( GEOMOp::OpAutoColor ), -1, -1 ); // auto color
mgr->setRule( action( GEOMOp::OpAutoColor ), autoColorPrefix + " and isAutoColor=false", QtxPopupMgr::VisibleRule );

View File

@ -3169,6 +3169,11 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
if( min_l < fabs(aYmax - aYmin) ) min_l = fabs(aYmax - aYmin);
if( min_l < fabs(aZmax - aZmin) ) min_l = fabs(aZmax - aZmin);
min_l /= dl_l;
// Mantis issue 0020908 BEGIN
if (!Exp_Edge.More()) {
min_l = Precision::Confusion();
}
// Mantis issue 0020908 END
for ( Standard_Integer nbEdge = 0; Exp_Edge.More(); Exp_Edge.Next(), nbEdge++ ) {
TopExp_Explorer Exp_Vertex( Exp_Edge.Current(), TopAbs_VERTEX);
for ( Standard_Integer nbVertex = 0; Exp_Vertex.More(); Exp_Vertex.Next(), nbVertex++ ) {

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifdef WNT
#pragma warning( disable:4786 )
@ -915,6 +914,13 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr theStudy,
// set the color of the transformed shape to the color of initial shape
theObject->SetColor(aList[0]->GetColor());
// set the texture
if (theObject->GetShapeType() == GEOM::VERTEX) {
theObject->SetMarkerStd(aList[0]->GetMarkerType(), aList[0]->GetMarkerSize());
if (aList[0]->GetMarkerType() == GEOM::MT_USER)
theObject->SetMarkerTexture(aList[0]->GetMarkerTexture());
}
anArgSO->Destroy();
}
else {
@ -1004,6 +1010,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr theStudy,
aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
// Restore color
aSubO->SetColor(anArgO->GetColor());
// set the texture
if (aSubO->GetShapeType() == GEOM::VERTEX) {
aSubO->SetMarkerStd(anArgO->GetMarkerType(), anArgO->GetMarkerSize());
if (anArgO->GetMarkerType() == GEOM::MT_USER)
aSubO->SetMarkerTexture(anArgO->GetMarkerTexture());
}
}
if (!CORBA::is_nil(anArgSO)) {
@ -1055,6 +1067,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr theStudy,
aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString());
// Restore color
aSubO->SetColor(anArgO->GetColor());
// set the texture
if (aSubO->GetShapeType() == GEOM::VERTEX) {
aSubO->SetMarkerStd(anArgO->GetMarkerType(), anArgO->GetMarkerSize());
if (anArgO->GetMarkerType() == GEOM::MT_USER)
aSubO->SetMarkerTexture(anArgO->GetMarkerTexture());
}
}
}
else if (!CORBA::is_nil(aSubSO)) {
@ -1243,6 +1261,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr th
aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
// Restore color
aNewSubO->SetColor(anOldSubO->GetColor());
// set the texture
if (aNewSubO->GetShapeType() == GEOM::VERTEX) {
aNewSubO->SetMarkerStd(anOldSubO->GetMarkerType(), anOldSubO->GetMarkerSize());
if (anOldSubO->GetMarkerType() == GEOM::MT_USER)
aNewSubO->SetMarkerTexture(anOldSubO->GetMarkerTexture());
}
}
// Restore published sub-shapes of the argument
GEOM::ListOfGO_var aSubParts;
@ -1295,6 +1319,12 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr th
aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString());
// Restore color
aNewSubO->SetColor(anOldSubO->GetColor());
// set the texture
if (aNewSubO->GetShapeType() == GEOM::VERTEX) {
aNewSubO->SetMarkerStd(anOldSubO->GetMarkerType(), anOldSubO->GetMarkerSize());
if (anOldSubO->GetMarkerType() == GEOM::MT_USER)
aNewSubO->SetMarkerTexture(anOldSubO->GetMarkerTexture());
}
}
}
}