This commit is contained in:
eap 2013-06-17 12:15:50 +00:00
parent adec87681f
commit 407cadd372
176 changed files with 1941 additions and 1936 deletions

View File

@ -238,7 +238,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
} }
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 || TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupPoints->LineEdit3 ) ? myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX; TopAbs_EDGE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType ); GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape; TopoDS_Shape aShape;
@ -300,7 +300,7 @@ void BasicGUI_EllipseDlg::SetEditCurrentArgument()
} }
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 || TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupPoints->LineEdit3 ) ? myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX; TopAbs_EDGE : TopAbs_VERTEX;
globalSelection(); // close local contexts, if any globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), aNeedType ); localSelection( GEOM::GEOM_Object::_nil(), aNeedType );

View File

@ -217,7 +217,7 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId )
} }
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 || TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ? myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX; TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType ); localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
@ -250,7 +250,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
} }
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 || TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ? myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX; TopAbs_FACE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType ); GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape; TopoDS_Shape aShape;
@ -315,7 +315,7 @@ void BasicGUI_LineDlg::SetEditCurrentArgument()
} }
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 || TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ? myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX; TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType ); localSelection( GEOM::GEOM_Object::_nil(), aNeedType );

View File

@ -394,19 +394,19 @@ void BasicGUI_MarkerDlg::onSelectionDone()
} }
else if ( getConstructorId() == 2 ) { // by point and two vectors else if ( getConstructorId() == 2 ) { // by point and two vectors
if ( myEditCurrentArgument == Group2->LineEdit1 ) { if ( myEditCurrentArgument == Group2->LineEdit1 ) {
myPoint = aSelectedObject; myPoint = aSelectedObject;
if (myPoint && !myVectorX) if (myPoint && !myVectorX)
Group2->PushButton2->click(); Group2->PushButton2->click();
} }
else if (myEditCurrentArgument == Group2->LineEdit2) { else if (myEditCurrentArgument == Group2->LineEdit2) {
myVectorX = aSelectedObject; myVectorX = aSelectedObject;
if (myVectorX && !myVectorY) if (myVectorX && !myVectorY)
Group2->PushButton3->click(); Group2->PushButton3->click();
} }
else if ( myEditCurrentArgument == Group2->LineEdit3 ) { else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
myVectorY = aSelectedObject; myVectorY = aSelectedObject;
if (myVectorY && !myPoint) if (myVectorY && !myPoint)
Group2->PushButton1->click(); Group2->PushButton1->click();
} }
} }
} }
@ -531,7 +531,7 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
if ( v1.Magnitude() > gp::Resolution() && v2.Magnitude() > gp::Resolution() ) { if ( v1.Magnitude() > gp::Resolution() && v2.Magnitude() > gp::Resolution() ) {
ok = !v1.IsParallel( v2, Precision::Angular() ); ok = !v1.IsParallel( v2, Precision::Angular() );
if ( !ok ) if ( !ok )
msg += tr( "VEC_PARALLEL" ); msg += tr( "VEC_PARALLEL" );
} }
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end() && ok; ++anIter ) for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end() && ok; ++anIter )
ok = anIter.value()->isValid( msg, !IsPreview()) && ok; ok = anIter.value()->isValid( msg, !IsPreview()) && ok;

View File

@ -695,15 +695,15 @@ bool BasicGUI_PlaneDlg::isValid( QString& msg )
break; break;
case 1: case 1:
ok = Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() ) && ok = Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() ) &&
myPoint1 && myPoint2 && myPoint3 && myPoint1 && myPoint2 && myPoint3 &&
myPoint1 != myPoint2 && myPoint1 != myPoint3 && myPoint2 != myPoint3; myPoint1 != myPoint2 && myPoint1 != myPoint3 && myPoint2 != myPoint3;
break; break;
case 2: case 2:
ok = GroupFace->SpinBox_DX->isValid( msg, !IsPreview() ) && myFace; ok = GroupFace->SpinBox_DX->isValid( msg, !IsPreview() ) && myFace;
break; break;
case 3: case 3:
ok = Group2Vec->SpinBox_DX->isValid( msg, !IsPreview() ) && ok = Group2Vec->SpinBox_DX->isValid( msg, !IsPreview() ) &&
myVec1 && myVec2 && myVec1 != myVec2; myVec1 && myVec2 && myVec1 != myVec2;
break; break;
case 4: case 4:
ok = GroupLCS->SpinBox_DX->isValid( msg, !IsPreview() ); ok = GroupLCS->SpinBox_DX->isValid( msg, !IsPreview() );

View File

@ -114,7 +114,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
Standard_Real anArea = Properties.Mass(); Standard_Real anArea = Properties.Mass();
Standard_Real AreaTol = Radius*Radius*1.e-6; Standard_Real AreaTol = Radius*Radius*1.e-6;
if (anArea > HalfArea - AreaTol) //no chance to avoid singularity if (anArea > HalfArea - AreaTol) //no chance to avoid singularity
return Standard_False; return Standard_False;
/////////////////////////////////////////////// ///////////////////////////////////////////////
gp_Ax3 ax3 = sp.Position(); gp_Ax3 ax3 = sp.Position();
if(Abs(Vmax-Vmin) < PI2) { if(Abs(Vmax-Vmin) < PI2) {

View File

@ -911,7 +911,7 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
// remove trailing zeroes // remove trailing zeroes
QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(), QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(),
QLocale().exponential().toUpper() ) ); QLocale().exponential().toUpper() ) );
int idx = aRes.indexOf( expre ); int idx = aRes.indexOf( expre );
QString aResExp = ""; QString aResExp = "";

View File

@ -1073,10 +1073,10 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) ); Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" ); initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" ); initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" ); initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., "length_precision" ); initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., "length_precision" );
Group4Spin->SpinBox_DX->setValue( myDX ); Group4Spin->SpinBox_DX->setValue( myDX );
Group4Spin->SpinBox_DY->setValue( myDY ); Group4Spin->SpinBox_DY->setValue( myDY );
// myRadius = 100.0; // myRadius = 100.0;
@ -1147,7 +1147,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
TopoDS_Shape myShape = aProfile.GetShape( &isDone ); TopoDS_Shape myShape = aProfile.GetShape( &isDone );
if ( isDone ) { if ( isDone ) {
if ( myShape.ShapeType() != TopAbs_VERTEX ) if ( myShape.ShapeType() != TopAbs_VERTEX )
myCommand.append( ":WW" ); myCommand.append( ":WW" );
} }
} }
else { else {

View File

@ -739,7 +739,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
{ {
TopoDS_Shape aSubShape = anExp.Current(); TopoDS_Shape aSubShape = anExp.Current();
int index = aSubShapesMap.FindIndex(aSubShape); int index = aSubShapesMap.FindIndex(aSubShape);
QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index); QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView); SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) { if (aPrs) {

View File

@ -773,7 +773,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
{ {
TObjectData* data = aStEntry2ObjDataPtrIt->second; TObjectData* data = aStEntry2ObjDataPtrIt->second;
if ( data->_unpublished && !data->_pyName.IsEmpty() ) { if ( data->_unpublished && !data->_pyName.IsEmpty() ) {
aScript += unpublishCmd + data->_pyName + ")"; aScript += unpublishCmd + data->_pyName + ")";
} }
} }
@ -1397,8 +1397,8 @@ void ReplaceVariables(TCollection_AsciiString& theCommand,
if(MYDEBUG) if(MYDEBUG)
cout<<"aParamIndex: "<<aParamIndex<<" aStartParamPos: " <<aStartParamPos<<" aEndParamPos: "<<aEndParamPos<<endl; cout<<"aParamIndex: "<<aParamIndex<<" aStartParamPos: " <<aStartParamPos<<" aEndParamPos: "<<aEndParamPos<<endl;
if ( aStartParamPos == aEndParamPos) if ( aStartParamPos == aEndParamPos)
continue; continue;
aParameter = aSection.SubString(aStartParamPos, aEndParamPos-1); aParameter = aSection.SubString(aStartParamPos, aEndParamPos-1);
if(MYDEBUG) if(MYDEBUG)

View File

@ -204,8 +204,8 @@ protected:
//! theSolid are in the list: theInternalFaces <br> //! theSolid are in the list: theInternalFaces <br>
Standard_EXPORT Standard_EXPORT
void BuildDraftSolid(const TopoDS_Shape& theSolid, void BuildDraftSolid(const TopoDS_Shape& theSolid,
TopoDS_Shape& theDraftSolid, TopoDS_Shape& theDraftSolid,
TopTools_ListOfShape& theInternalFaces) ; TopTools_ListOfShape& theInternalFaces) ;
NMTTools_PPaveFiller myPaveFiller; NMTTools_PPaveFiller myPaveFiller;

View File

@ -100,7 +100,7 @@ static
static static
Standard_Boolean RefineShell(const TopoDS_Shell& , Standard_Boolean RefineShell(const TopoDS_Shell& ,
TopoDS_Shell& ); TopoDS_Shell& );
//======================================================================= //=======================================================================
//function : //function :
@ -189,7 +189,7 @@ void GEOMAlgo_BuilderSolid::PerformShapesToAvoid()
} }
/* /*
else { else {
int a=0; int a=0;
} }
*/ */
} }
@ -396,7 +396,7 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
// //
bRefine=RefineShell(aShell, aShx); bRefine=RefineShell(aShell, aShx);
if (bRefine) { if (bRefine) {
myLoops.Append(aShx); myLoops.Append(aShx);
} }
} }
} // for (; aItF.More(); aItF.Next()) { } // for (; aItF.More(); aItF.Next()) {
@ -640,8 +640,8 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
{ {
TopExp_Explorer aExp(aSolid, TopAbs_FACE); TopExp_Explorer aExp(aSolid, TopAbs_FACE);
while (aExp.More()) { while (aExp.More()) {
aMFS.Add(aExp.Current()); aMFS.Add(aExp.Current());
aExp.Next(); aExp.Next();
} }
} }
//modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t //modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t
@ -655,10 +655,10 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key())); const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
//modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f //modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
if (!aMFS.Contains(aF)) { if (!aMFS.Contains(aF)) {
bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext); bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
if (bFlag) { if (bFlag) {
aMFP.Add(aF); aMFP.Add(aF);
} }
} }
//if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) { //if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
// aMFP.Add(aF); // aMFP.Add(aF);
@ -850,7 +850,7 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean RefineShell(const TopoDS_Shell& aShell, Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
TopoDS_Shell& aShx) TopoDS_Shell& aShx)
{ {
Standard_Boolean bRet; Standard_Boolean bRet;
@ -881,7 +881,7 @@ Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First())); const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
if (aNbF==1) { if (aNbF==1) {
if (aOrE==TopAbs_INTERNAL) { if (aOrE==TopAbs_INTERNAL) {
continue; continue;
} }
aMFx.Add(aF1); aMFx.Add(aF1);
} }
@ -889,14 +889,14 @@ Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
else if (aNbF==2) { else if (aNbF==2) {
const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last())); const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
if (aF2.IsSame(aF1)) { if (aF2.IsSame(aF1)) {
if (BRep_Tool::IsClosed(aE, aF1)) { if (BRep_Tool::IsClosed(aE, aF1)) {
continue; continue;
} }
if (aOrE==TopAbs_INTERNAL) { if (aOrE==TopAbs_INTERNAL) {
continue; continue;
} }
aMFx.Add(aF1); aMFx.Add(aF1);
aMFx.Add(aF2); aMFx.Add(aF2);
} }
} }
} }

View File

@ -40,7 +40,7 @@ class GEOMAlgo_BuilderTools
public: public:
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsHole(const TopoDS_Shape& aW, static Standard_Boolean IsHole(const TopoDS_Shape& aW,
const TopoDS_Shape& aF) ; const TopoDS_Shape& aF) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ; static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ;

View File

@ -153,7 +153,7 @@ static
//modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f //modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f
aNbLB=aLB.Extent(); aNbLB=aLB.Extent();
if (aIsCB && aNbLB<2) { if (aIsCB && aNbLB<2) {
aIsCB=0; aIsCB=0;
} }
//modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t //modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t
// //

View File

@ -103,8 +103,8 @@ static
static static
Standard_Boolean IsClosed(const TopoDS_Edge& , Standard_Boolean IsClosed(const TopoDS_Edge& ,
const TopoDS_Face&, const TopoDS_Face&,
Standard_Boolean& ); Standard_Boolean& );
//======================================================================= //=======================================================================
//function : FillImagesFaces //function : FillImagesFaces
@ -347,15 +347,15 @@ void GEOMAlgo_Builder::BuildSplitFaces()
} }
continue; continue;
}// if (bIsClosed){ }// if (bIsClosed){
// //
//modified by NIZNHY-PKV Wed Nov 28 13:50:34 2012f //modified by NIZNHY-PKV Wed Nov 28 13:50:34 2012f
if (!bIsClosed && bFlagClosed) { if (!bIsClosed && bFlagClosed) {
if (!BRep_Tool::IsClosed(aSp, aF)){ if (!BRep_Tool::IsClosed(aSp, aF)){
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
} }
} }
//modified by NIZNHY-PKV Wed Nov 28 13:50:36 2012t //modified by NIZNHY-PKV Wed Nov 28 13:50:36 2012t
// //
// //
aSp.Orientation(anOriE); aSp.Orientation(anOriE);
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
@ -612,7 +612,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
for (k=1; k<=aNbMFj; ++k) { for (k=1; k<=aNbMFj; ++k) {
const TopoDS_Shape& aFk=aMFj(k); const TopoDS_Shape& aFk=aMFj(k);
if (!aDMSI.IsBound(aFk)) { if (!aDMSI.IsBound(aFk)) {
aDMSI.Bind(aFk, j); aDMSI.Bind(aFk, j);
} }
} }
} }
@ -629,20 +629,20 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
bIsImage=mySplitFaces.IsImage(aFSD); bIsImage=mySplitFaces.IsImage(aFSD);
aFOld=aFSD; aFOld=aFSD;
if (bIsImage) { if (bIsImage) {
aFOld=mySplitFaces.ImageFrom(aFSD); aFOld=mySplitFaces.ImageFrom(aFSD);
} }
// //
aIx=aDMSI.Find(aFOld); aIx=aDMSI.Find(aFOld);
if (j==1) { if (j==1) {
aIxMin=aIx; aIxMin=aIx;
aFSDmin=aFSD; aFSDmin=aFSD;
continue; continue;
} }
else { else {
if (aIx<aIxMin) { if (aIx<aIxMin) {
aIxMin=aIx; aIxMin=aIx;
aFSDmin=aFSD; aFSDmin=aFSD;
} }
} }
} }
// //
@ -948,8 +948,8 @@ void UpdateCandidates(const Standard_Integer theNF,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean IsClosed(const TopoDS_Edge& aE, Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Face& aF, const TopoDS_Face& aF,
Standard_Boolean& bFlag) Standard_Boolean& bFlag)
{ {
Standard_Boolean bRet; Standard_Boolean bRet;
// //
@ -966,15 +966,15 @@ Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Shape& aEx=aExp.Current(); const TopoDS_Shape& aEx=aExp.Current();
// //
if (aEx.IsSame(aE)) { if (aEx.IsSame(aE)) {
++iCnt; ++iCnt;
if (iCnt==1) { if (iCnt==1) {
aE1=aEx; aE1=aEx;
} }
else if (iCnt==2){ else if (iCnt==2){
aE1.Reverse(); aE1.Reverse();
bRet=(aE1==aEx); bRet=(aE1==aEx);
break; break;
} }
} }
} }
} }

View File

@ -691,12 +691,12 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI); const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
aNbSx=aLSx.Extent(); aNbSx=aLSx.Extent();
if (aNbSx) { if (aNbSx) {
//modified by NIZNHY-PKV Wed Mar 27 11:39:15 2013f //modified by NIZNHY-PKV Wed Mar 27 11:39:15 2013f
//aMSI.Remove(aSI); //aMSI.Remove(aSI);
if (aMSI.Remove(aSI)) { if (aMSI.Remove(aSI)) {
aItM.Initialize(aMSI); aItM.Initialize(aMSI);
} }
//modified by NIZNHY-PKV Wed Mar 27 11:39:18 2013t //modified by NIZNHY-PKV Wed Mar 27 11:39:18 2013t
} }
} }
} }

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:05:01 2012 // Created: Wed Feb 22 11:05:01 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:58:14 2012 // Created: Wed Feb 22 10:58:14 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:01:34 2012 // Created: Wed Feb 22 11:01:34 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:53:47 2012 // Created: Wed Feb 22 10:53:47 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:08:26 2012 // Created: Wed Feb 22 11:08:26 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:11:09 2012 // Created: Wed Feb 22 11:11:09 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:49:11 2012 // Created: Wed Feb 22 10:49:11 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx // File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:39:02 2012 // Created: Wed Feb 22 08:39:02 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile #ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx // File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:03:36 2012 // Created: Wed Feb 22 11:03:36 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile #ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfPassKeyInteger.hxx // File: GEOMAlgo_DataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:55:55 2012 // Created: Wed Feb 22 10:55:55 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile #ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx // File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:00:16 2012 // Created: Wed Feb 22 11:00:16 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile #ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfRealListOfShape.hxx // File: GEOMAlgo_DataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:51:48 2012 // Created: Wed Feb 22 10:51:48 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile #ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx // File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:07:16 2012 // Created: Wed Feb 22 11:07:16 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile #ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfShapePnt.hxx // File: GEOMAlgo_DataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:10:15 2012 // Created: Wed Feb 22 11:10:15 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile #ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfShapeReal.hxx // File: GEOMAlgo_DataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:47:23 2012 // Created: Wed Feb 22 10:47:23 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile #ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_DataMapOfShapeShapeSet.hxx // File: GEOMAlgo_DataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:36:15 2012 // Created: Wed Feb 22 08:36:15 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile #ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile

View File

@ -81,9 +81,9 @@ class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo
Standard_EXPORT Standard_EXPORT
static void CopySource(const TopoDS_Shape& aS, static void CopySource(const TopoDS_Shape& aS,
TopTools_DataMapOfShapeShape& aImages, TopTools_DataMapOfShapeShape& aImages,
TopTools_DataMapOfShapeShape& aOriginals, TopTools_DataMapOfShapeShape& aOriginals,
TopoDS_Shape& aSC) ; TopoDS_Shape& aSC) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ; static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;

View File

@ -715,33 +715,33 @@ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
aHatcher.Trim(aIx); aHatcher.Trim(aIx);
bIsDone=aHatcher.TrimDone(aIx); bIsDone=aHatcher.TrimDone(aIx);
if (!bIsDone) { if (!bIsDone) {
myErrorStatus=42; myErrorStatus=42;
return; return;
} }
// //
aHatcher.ComputeDomains(aIx); aHatcher.ComputeDomains(aIx);
bIsDone=aHatcher.IsDone(aIx); bIsDone=aHatcher.IsDone(aIx);
if (!bIsDone) { if (!bIsDone) {
continue; continue;
} }
// //
aNbDomains=aHatcher.NbDomains(aIx); aNbDomains=aHatcher.NbDomains(aIx);
for (j=1; j<=aNbDomains; ++j) { for (j=1; j<=aNbDomains; ++j) {
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, j) ; const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, j) ;
// 1 // 1
bHasFirstPoint=aDomain.HasFirstPoint(); bHasFirstPoint=aDomain.HasFirstPoint();
bHasSecondPoint=aDomain.HasSecondPoint(); bHasSecondPoint=aDomain.HasSecondPoint();
if (!bHasFirstPoint || !bHasSecondPoint) { if (!bHasFirstPoint || !bHasSecondPoint) {
continue; continue;
} }
// 2 // 2
aV1=aDomain.FirstPoint().Parameter(); aV1=aDomain.FirstPoint().Parameter();
aV2=aDomain.SecondPoint().Parameter(); aV2=aDomain.SecondPoint().Parameter();
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2); aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
// 3 // 3
aS->D0(aUx, aVx, aPx); aS->D0(aUx, aVx, aPx);
aLP.Append(aPx); aLP.Append(aPx);
break; break;
} }
}// for (i=1; i<aNb; ++i) { }// for (i=1; i<aNb; ++i) {
}// if (!aNb && myNbPntsMin) { }// if (!aNb && myNbPntsMin) {
@ -877,7 +877,7 @@ if (!aNb && myNbPntsMin) {
// //
aN1=(Standard_Integer)aPK.Id(1); aN1=(Standard_Integer)aPK.Id(1);
aN2=(Standard_Integer)aPK.Id(2); aN2=(Standard_Integer)aPK.Id(2);
// //
aP1=aNodes(aN1).Transformed(aTrsf); aP1=aNodes(aN1).Transformed(aTrsf);
aP2=aNodes(aN2).Transformed(aTrsf); aP2=aNodes(aN2).Transformed(aTrsf);
// //

View File

@ -112,16 +112,16 @@ protected:
Standard_EXPORT Standard_EXPORT
void InnerPoints(const TopoDS_Face& aF, void InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP) ; GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT Standard_EXPORT
void InnerPoints(const TopoDS_Edge& aE, void InnerPoints(const TopoDS_Edge& aE,
GEOMAlgo_ListOfPnt& aLP) ; GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT Standard_EXPORT
void InnerPoints(const TopoDS_Edge& aE, void InnerPoints(const TopoDS_Edge& aE,
const Standard_Integer aNbPnts, const Standard_Integer aNbPnts,
GEOMAlgo_ListOfPnt& aLP) ; GEOMAlgo_ListOfPnt& aLP) ;
TopAbs_ShapeEnum myShapeType; TopAbs_ShapeEnum myShapeType;

View File

@ -92,7 +92,7 @@ class GEOMAlgo_GetInPlaceIterator {
*/ */
//Standard_EXPORT //Standard_EXPORT
void Initialize(const TopAbs_ShapeEnum theT1, void Initialize(const TopAbs_ShapeEnum theT1,
const TopAbs_ShapeEnum theT2) ; const TopAbs_ShapeEnum theT2) ;
/** /**
* Check the existence of pairs to iterare. * Check the existence of pairs to iterare.
* @return * @return
@ -296,15 +296,15 @@ protected:
Standard_EXPORT Standard_EXPORT
void FillShapesIn(const TopoDS_Shape& theS1, void FillShapesIn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ; const TopoDS_Shape& theS2) ;
Standard_EXPORT Standard_EXPORT
void FillShapesOn(const TopoDS_Shape& theS1, void FillShapesOn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ; const TopoDS_Shape& theS2) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1, Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2); const TopoDS_Shape& theS2);
TopoDS_Shape myShapeWhere; TopoDS_Shape myShapeWhere;

View File

@ -20,8 +20,8 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_GetInPlace_1.cxx // File: GEOMAlgo_GetInPlace_1.cxx
// Author: Peter KURNEV // Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx> #include <GEOMAlgo_GetInPlace.hxx>
@ -66,22 +66,22 @@
static static
Standard_Integer PntInEdge(const TopoDS_Edge& aF, Standard_Integer PntInEdge(const TopoDS_Edge& aF,
gp_Pnt& aP); gp_Pnt& aP);
static static
Standard_Integer PntInEdge(const TopoDS_Edge& aF, Standard_Integer PntInEdge(const TopoDS_Edge& aF,
gp_Pnt& aP, gp_Pnt& aP,
Standard_Real& aT); Standard_Real& aT);
static static
Standard_Integer PntInFace(const TopoDS_Face& aF, Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP); gp_Pnt& aP);
static static
Standard_Integer PntInFace(const TopoDS_Face& aF, Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP, gp_Pnt& aP,
gp_Pnt2d& theP2D); gp_Pnt2d& theP2D);
static static
Standard_Integer PntInSolid(const TopoDS_Solid& aZ, Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
const Standard_Real aTol, const Standard_Real aTol,
gp_Pnt& aP); gp_Pnt& aP);
//======================================================================= //=======================================================================
@ -89,7 +89,7 @@ static
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) const TopoDS_Shape& aS2)
{ {
Standard_Boolean bOk; Standard_Boolean bOk;
Standard_Integer iErr; Standard_Integer iErr;
@ -157,11 +157,11 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
aDmin=aPPC.LowerDistance(); aDmin=aPPC.LowerDistance();
aT=aPPC.LowerDistanceParameter(); aT=aPPC.LowerDistanceParameter();
if (aDmin < myTolerance) { if (aDmin < myTolerance) {
dT=1.e-12; dT=1.e-12;
BRep_Tool::Curve(aE1, aT1, aT2); BRep_Tool::Curve(aE1, aT1, aT2);
if(aT > (aT1-dT) && aT < (aT2+dT)) { if(aT > (aT1-dT) && aT < (aT2+dT)) {
bOk=Standard_True; bOk=Standard_True;
} }
} }
} }
//else { //else {
@ -197,7 +197,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE, Standard_Integer PntInEdge(const TopoDS_Edge& aE,
gp_Pnt& aP) gp_Pnt& aP)
{ {
Standard_Integer iErr; Standard_Integer iErr;
@ -212,8 +212,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE, Standard_Integer PntInEdge(const TopoDS_Edge& aE,
gp_Pnt& aP, gp_Pnt& aP,
Standard_Real& aT) Standard_Real& aT)
{ {
Standard_Integer iErr; Standard_Integer iErr;
Standard_Real aT1, aT2; Standard_Real aT1, aT2;
@ -232,8 +232,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer PntInSolid(const TopoDS_Solid& aZ, Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
const Standard_Real aTol, const Standard_Real aTol,
gp_Pnt& aP) gp_Pnt& aP)
{ {
Standard_Integer iErr; Standard_Integer iErr;
Standard_Real aUx, aVx, aCoef; Standard_Real aUx, aVx, aCoef;
@ -271,7 +271,7 @@ Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF, Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP) gp_Pnt& aP)
{ {
Standard_Integer iErr; Standard_Integer iErr;
// //
@ -286,8 +286,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF, Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& theP, gp_Pnt& theP,
gp_Pnt2d& theP2D) gp_Pnt2d& theP2D)
{ {
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i; Standard_Integer iErr, aIx, aNbDomains, i;
@ -312,8 +312,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
// //
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
Geom2dHatch_Hatcher aHatcher(aIntr, Geom2dHatch_Hatcher aHatcher(aIntr,
aTolHatch2D, aTolHatch3D, aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False); Standard_True, Standard_False);
// //
iErr=0; iErr=0;
aEpsT=1.e-12; aEpsT=1.e-12;

View File

@ -19,9 +19,9 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_GetInPlace_2.cxx // File: GEOMAlgo_GetInPlace_2.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx> #include <GEOMAlgo_GetInPlace.hxx>
@ -51,7 +51,7 @@ static
Standard_Integer Dimension(const TopAbs_ShapeEnum aType); Standard_Integer Dimension(const TopAbs_ShapeEnum aType);
static static
void PointProperties(const TopoDS_Shape& aS, void PointProperties(const TopoDS_Shape& aS,
GProp_GProps& aGProps); GProp_GProps& aGProps);
//======================================================================= //=======================================================================
//function : CheckGProps //function : CheckGProps
@ -87,7 +87,7 @@ void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1)
const TopoDS_Shape& aS1x=aIt.Value(); const TopoDS_Shape& aS1x=aIt.Value();
CheckGProps(aS1x); CheckGProps(aS1x);
if (!myFound) { if (!myFound) {
return; return;
} }
} }
} }

View File

@ -19,9 +19,9 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_GetInPlaceIterator.cxx // File: GEOMAlgo_GetInPlaceIterator.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx> #include <GEOMAlgo_GetInPlace.hxx>
@ -29,7 +29,7 @@
static static
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2); const TopAbs_ShapeEnum aType2);
//======================================================================= //=======================================================================
//function : //function :
@ -82,7 +82,7 @@ void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1, void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2) const TopAbs_ShapeEnum aType2)
{ {
Standard_Integer iX; Standard_Integer iX;
// //
@ -123,7 +123,7 @@ const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2) const TopAbs_ShapeEnum aType2)
{ {
Standard_Integer iRet; Standard_Integer iRet;
// //

View File

@ -20,10 +20,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_Gluer.cxx // File: GEOMAlgo_Gluer.cxx
// Created: Sat Dec 04 12:45:53 2004 // Created: Sat Dec 04 12:45:53 2004
// Author: Peter KURNEV // Author: Peter KURNEV
// <peter@PREFEX> // <peter@PREFEX>
// //
#include <GEOMAlgo_Gluer.hxx> #include <GEOMAlgo_Gluer.hxx>
@ -96,7 +96,7 @@
// //
static static
void GetSubShapes(const TopoDS_Shape& aS, void GetSubShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aMSS); TopTools_IndexedMapOfShape& aMSS);
//======================================================================= //=======================================================================
//function : GEOMAlgo_Gluer //function : GEOMAlgo_Gluer
@ -278,53 +278,53 @@ void GEOMAlgo_Gluer::MakeVertices()
aNbIP=aMIP.Extent(); aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP); aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) { for(; aIt1.More(); aIt1.Next()) {
aIP=aIt1.Key(); aIP=aIt1.Key();
if (aMIPC.Contains(aIP)) { if (aMIPC.Contains(aIP)) {
continue; continue;
} }
// //
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f //modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP); const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
//const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); //const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t //modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
// //
aSelector.Clear(); aSelector.Clear();
aSelector.SetBox(aBoxVP); aSelector.SetBox(aBoxVP);
// //
aNbVSD=aBBTree.Select(aSelector); aNbVSD=aBBTree.Select(aSelector);
if (!aNbVSD) { if (!aNbVSD) {
continue; // it must not be continue; // it must not be
} }
// //
const TColStd_ListOfInteger& aLI=aSelector.Indices(); const TColStd_ListOfInteger& aLI=aSelector.Indices();
// //
aIt.Initialize(aLI); aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
aIP1=aIt.Value(); aIP1=aIt.Value();
if (aMIP.Contains(aIP1)) { if (aMIP.Contains(aIP1)) {
continue; continue;
} }
aMIP1.Add(aIP1); aMIP1.Add(aIP1);
} //for (; aIt.More(); aIt.Next()) { } //for (; aIt.More(); aIt.Next()) {
}//for(; aIt1.More(); aIt1.Next()) { }//for(; aIt1.More(); aIt1.Next()) {
// //
aNbIP1=aMIP1.Extent(); aNbIP1=aMIP1.Extent();
if (!aNbIP1) { if (!aNbIP1) {
break; break;
} }
// //
aIt1.Initialize(aMIP); aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) { for(; aIt1.More(); aIt1.Next()) {
aIP=aIt1.Key(); aIP=aIt1.Key();
aMIPC.Add(aIP); aMIPC.Add(aIP);
} }
// //
aMIP.Clear(); aMIP.Clear();
aIt1.Initialize(aMIP1); aIt1.Initialize(aMIP1);
for(; aIt1.More(); aIt1.Next()) { for(; aIt1.More(); aIt1.Next()) {
aIP=aIt1.Key(); aIP=aIt1.Key();
aMIP.Add(aIP); aMIP.Add(aIP);
} }
aMIP1.Clear(); aMIP1.Clear();
}// while(1) }// while(1)
@ -340,13 +340,13 @@ void GEOMAlgo_Gluer::MakeVertices()
else { // SD vertices founded [ aMIPC ] else { // SD vertices founded [ aMIPC ]
aIt1.Initialize(aMIPC); aIt1.Initialize(aMIPC);
for(j=0; aIt1.More(); aIt1.Next(), ++j) { for(j=0; aIt1.More(); aIt1.Next(), ++j) {
aIP=aIt1.Key(); aIP=aIt1.Key();
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
if (!j) { if (!j) {
aVF=aVP; aVF=aVP;
} }
aLVSD.Append(aVP); aLVSD.Append(aVP);
aMVProcessed.Add(aVP); aMVProcessed.Add(aVP);
} }
} }
myImages.Bind(aVF, aLVSD); myImages.Bind(aVF, aLVSD);
@ -391,7 +391,7 @@ void GEOMAlgo_Gluer::MakeVertices()
for (; aItS.More(); aItS.Next()) { for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aVSD=aItS.Value(); const TopoDS_Shape& aVSD=aItS.Value();
if (!myOrigins.IsBound(aVSD)) { if (!myOrigins.IsBound(aVSD)) {
myOrigins.Bind(aVSD, aV); myOrigins.Bind(aVSD, aV);
} }
} }
} }
@ -556,12 +556,12 @@ void GEOMAlgo_Gluer::MakeShells()
const TopoDS_Face& aF=TopoDS::Face(aExp.Current()); const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
aFR=TopoDS::Face(myOrigins.Find(aF)); aFR=TopoDS::Face(myOrigins.Find(aF));
if (aFR.IsSame(aF)) { if (aFR.IsSame(aF)) {
aBB.Add(aNewShell, aF); aBB.Add(aNewShell, aF);
continue; continue;
} }
bIsToReverse=IsToReverse(aFR, aF); bIsToReverse=IsToReverse(aFR, aF);
if (bIsToReverse) { if (bIsToReverse) {
aFR.Reverse(); aFR.Reverse();
} }
aBB.Add(aNewShell, aFR); aBB.Add(aNewShell, aFR);
} }
@ -662,25 +662,25 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
if (aNbSDF==1) { if (aNbSDF==1) {
bHasNewSubShape=HasNewSubShape(aS1); bHasNewSubShape=HasNewSubShape(aS1);
if (!bHasNewSubShape) { if (!bHasNewSubShape) {
aNewShape=aS1; aNewShape=aS1;
aNewShape.Orientation(TopAbs_FORWARD); aNewShape.Orientation(TopAbs_FORWARD);
} }
} }
// //
if (bHasNewSubShape) { if (bHasNewSubShape) {
if (aType==TopAbs_FACE) { if (aType==TopAbs_FACE) {
TopoDS_Face aNewFace; TopoDS_Face aNewFace;
// //
const TopoDS_Face& aF1=TopoDS::Face(aS1); const TopoDS_Face& aF1=TopoDS::Face(aS1);
MakeFace(aF1, aNewFace); MakeFace(aF1, aNewFace);
aNewShape=aNewFace; aNewShape=aNewFace;
} }
else if (aType==TopAbs_EDGE) { else if (aType==TopAbs_EDGE) {
TopoDS_Edge aNewEdge; TopoDS_Edge aNewEdge;
// //
const TopoDS_Edge& aE1=TopoDS::Edge(aS1); const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
MakeEdge(aE1, aNewEdge); MakeEdge(aE1, aNewEdge);
aNewShape=aNewEdge; aNewShape=aNewEdge;
} }
} }
// //
@ -690,7 +690,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
for (; aItS.More(); aItS.Next()) { for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aFSD=aItS.Value(); const TopoDS_Shape& aFSD=aItS.Value();
if (!myOrigins.IsBound(aFSD)) { if (!myOrigins.IsBound(aFSD)) {
myOrigins.Bind(aFSD, aNewShape); myOrigins.Bind(aFSD, aNewShape);
} }
} }
} }
@ -730,12 +730,12 @@ void GEOMAlgo_Gluer::CheckResult()
for (j=1; j<=aNbFS; ++j) { for (j=1; j<=aNbFS; ++j) {
const TopoDS_Shape& aFS=aMFS(j); const TopoDS_Shape& aFS=aMFS(j);
if (aMFR.Contains(aFS)) { if (aMFR.Contains(aFS)) {
const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS); const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
aNbSx=aLSx.Extent(); aNbSx=aLSx.Extent();
if (aNbSx==2) { if (aNbSx==2) {
bFound=!bFound; bFound=!bFound;
break; break;
} }
} }
} }
// //
@ -797,7 +797,7 @@ void GEOMAlgo_Gluer::InnerTolerance()
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK) GEOMAlgo_PassKeyShape& aPK)
{ {
Standard_Integer i, aNbE; Standard_Integer i, aNbE;
TopTools_ListOfShape aLE; TopTools_ListOfShape aLE;
@ -822,7 +822,7 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
GEOMAlgo_PassKeyShape& aPK) GEOMAlgo_PassKeyShape& aPK)
{ {
TopoDS_Vertex aV1, aV2; TopoDS_Vertex aV1, aV2;
// //
@ -841,7 +841,7 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
TopoDS_Vertex& aNewVertex) TopoDS_Vertex& aNewVertex)
{ {
Standard_Integer aNbV; Standard_Integer aNbV;
Standard_Real aTolV, aD, aDmax; Standard_Real aTolV, aD, aDmax;
@ -887,7 +887,7 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
TopoDS_Edge& aNewEdge) TopoDS_Edge& aNewEdge)
{ {
myErrorStatus=0; myErrorStatus=0;
// //
@ -941,7 +941,7 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
TopoDS_Face& aNewFace) TopoDS_Face& aNewFace)
{ {
myErrorStatus=0; myErrorStatus=0;
// //
@ -977,20 +977,20 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
// //
aER.Orientation(TopAbs_FORWARD); aER.Orientation(TopAbs_FORWARD);
if (!BRep_Tool::Degenerated(aER)) { if (!BRep_Tool::Degenerated(aER)) {
// build p-curve // build p-curve
if (bIsUPeriodic) { if (bIsUPeriodic) {
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
} }
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
// orient image // orient image
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
if (bIsToReverse) { if (bIsToReverse) {
aER.Reverse(); aER.Reverse();
} }
} }
else { else {
aER.Orientation(aE.Orientation()); aER.Orientation(aE.Orientation());
} }
// //
aBB.Add(newWire, aER); aBB.Add(newWire, aER);
@ -1011,7 +1011,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
const TopoDS_Face& aF) const TopoDS_Face& aF)
{ {
Standard_Boolean bRet; Standard_Boolean bRet;
Standard_Real aT, aT1, aT2, aTR, aScPr; Standard_Real aT, aT1, aT2, aTR, aScPr;
@ -1090,7 +1090,7 @@ Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
//purpose : //purpose :
//======================================================================= //=======================================================================
void GetSubShapes(const TopoDS_Shape& aS, void GetSubShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aMSS) TopTools_IndexedMapOfShape& aMSS)
{ {
Standard_Integer aR; Standard_Integer aR;
TopAbs_ShapeEnum aType; TopAbs_ShapeEnum aType;
@ -1129,7 +1129,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
if(myOrigins.IsBound(aS)) { if(myOrigins.IsBound(aS)) {
const TopoDS_Shape& aSnew=myOrigins.Find(aS); const TopoDS_Shape& aSnew=myOrigins.Find(aS);
if (!aSnew.IsSame(aS)) { if (!aSnew.IsSame(aS)) {
myGenerated.Append(aSnew); myGenerated.Append(aSnew);
} }
} }
} }

View File

@ -21,10 +21,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_Gluer.hxx // File: GEOMAlgo_Gluer.hxx
// Created: Sat Dec 04 12:45:53 2004 // Created: Sat Dec 04 12:45:53 2004
// Author: Peter KURNEV // Author: Peter KURNEV
// <peter@PREFEX> // <peter@PREFEX>
// //
#ifndef _GEOMAlgo_Gluer_HeaderFile #ifndef _GEOMAlgo_Gluer_HeaderFile
#define _GEOMAlgo_Gluer_HeaderFile #define _GEOMAlgo_Gluer_HeaderFile
@ -122,35 +122,35 @@ public:
Standard_EXPORT Standard_EXPORT
void EdgePassKey(const TopoDS_Edge& aE, void EdgePassKey(const TopoDS_Edge& aE,
GEOMAlgo_PassKeyShape& aPK) ; GEOMAlgo_PassKeyShape& aPK) ;
Standard_EXPORT Standard_EXPORT
void FacePassKey(const TopoDS_Face& aF, void FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK) ; GEOMAlgo_PassKeyShape& aPK) ;
Standard_EXPORT Standard_EXPORT
void MakeVertex(const TopTools_ListOfShape& aLV, void MakeVertex(const TopTools_ListOfShape& aLV,
TopoDS_Vertex& aNewV) ; TopoDS_Vertex& aNewV) ;
Standard_EXPORT Standard_EXPORT
void MakeEdge(const TopoDS_Edge& aEdge, void MakeEdge(const TopoDS_Edge& aEdge,
TopoDS_Edge& aNewEdge) ; TopoDS_Edge& aNewEdge) ;
Standard_EXPORT Standard_EXPORT
void MakeFace(const TopoDS_Face& aFace, void MakeFace(const TopoDS_Face& aFace,
TopoDS_Face& aNewEdge) ; TopoDS_Face& aNewEdge) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean IsToReverse(const TopoDS_Face& aFR, Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
const TopoDS_Face& aF) ; const TopoDS_Face& aF) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const; Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
Standard_EXPORT Standard_EXPORT
void MakeSubShapes(const TopoDS_Shape& aS, void MakeSubShapes(const TopoDS_Shape& aS,
TopTools_MapOfShape& aM, TopTools_MapOfShape& aM,
TopoDS_Compound& aC) ; TopoDS_Compound& aC) ;
Standard_Boolean myCheckGeometry; Standard_Boolean myCheckGeometry;

View File

@ -19,10 +19,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_Gluer2_2.cxx // File: GEOMAlgo_Gluer2_2.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <peter@PREFEX> // <peter@PREFEX>
// //
#include <GEOMAlgo_Gluer2.hxx> #include <GEOMAlgo_Gluer2.hxx>
@ -75,7 +75,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS)
// //
aType=theS.ShapeType(); aType=theS.ShapeType();
if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE || if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
aType==TopAbs_FACE || aType==TopAbs_SOLID)) { aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
return myHistShapes; return myHistShapes;
} }
// //
@ -143,7 +143,7 @@ Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS)
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS, void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS,
TopTools_MapOfShape& theM) TopTools_MapOfShape& theM)
{ {
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
// //

View File

@ -19,10 +19,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_GluerAlgo.cxx // File: GEOMAlgo_GluerAlgo.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <peter@PREFEX> // <peter@PREFEX>
// //
#include <GEOMAlgo_GluerAlgo.hxx> #include <GEOMAlgo_GluerAlgo.hxx>
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx // File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
// Created: Wed Feb 22 11:22:18 2012 // Created: Wed Feb 22 11:22:18 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile #ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx // File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
// Created: Wed Feb 22 11:24:27 2012 // Created: Wed Feb 22 11:24:27 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx // File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx
// Created: Wed Feb 22 11:14:14 2012 // Created: Wed Feb 22 11:14:14 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile #ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx // File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
// Created: Wed Feb 22 11:16:54 2012 // Created: Wed Feb 22 11:16:54 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile #ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile

View File

@ -33,10 +33,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_IndexedDataMapOfShapeState.hxx // File: GEOMAlgo_IndexedDataMapOfShapeState.hxx
// Created: Wed Feb 22 11:19:56 2012 // Created: Wed Feb 22 11:19:56 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx // File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:26:34 2012 // Created: Wed Feb 22 08:26:34 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile #ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile #define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_ListIteratorOfListOfPnt.hxx // File: GEOMAlgo_ListIteratorOfListOfPnt.hxx
// Created: Wed Feb 22 08:33:12 2012 // Created: Wed Feb 22 08:33:12 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile #ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_ListOfCoupleOfShapes.hxx // File: GEOMAlgo_ListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:23:27 2012 // Created: Wed Feb 22 08:23:27 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile #ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile #define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_ListOfPnt.hxx // File: GEOMAlgo_ListOfPnt.hxx
// Created: Wed Feb 22 08:31:47 2012 // Created: Wed Feb 22 08:31:47 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListOfPnt_HeaderFile #ifndef GEOMAlgo_ListOfPnt_HeaderFile

View File

@ -65,18 +65,18 @@ class GEOMAlgo_PassKey {
Standard_EXPORT Standard_EXPORT
void SetIds(const Standard_Integer aI1, void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2) ; const Standard_Integer aI2) ;
Standard_EXPORT Standard_EXPORT
void SetIds(const Standard_Integer aI1, void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2, const Standard_Integer aI2,
const Standard_Integer aI3) ; const Standard_Integer aI3) ;
Standard_EXPORT Standard_EXPORT
void SetIds(const Standard_Integer aI1, void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2, const Standard_Integer aI2,
const Standard_Integer aI3, const Standard_Integer aI3,
const Standard_Integer aI4) ; const Standard_Integer aI4) ;
Standard_EXPORT Standard_EXPORT
void SetIds(const TColStd_ListOfInteger& aLS) ; void SetIds(const TColStd_ListOfInteger& aLS) ;

View File

@ -42,10 +42,10 @@ class GEOMAlgo_PassKeyMapHasher {
public: public:
Standard_EXPORT Standard_EXPORT
static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey, static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,
const Standard_Integer Upper) ; const Standard_Integer Upper) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1, static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,
const GEOMAlgo_PassKey& aPKey2) ; const GEOMAlgo_PassKey& aPKey2) ;
}; };
#endif #endif

View File

@ -65,18 +65,18 @@ class GEOMAlgo_PassKeyShape {
Standard_EXPORT Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1, void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) ; const TopoDS_Shape& aS2) ;
Standard_EXPORT Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1, void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2, const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3) ; const TopoDS_Shape& aS3) ;
Standard_EXPORT Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1, void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2, const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3, const TopoDS_Shape& aS3,
const TopoDS_Shape& aS4) ; const TopoDS_Shape& aS4) ;
Standard_EXPORT Standard_EXPORT
void SetShapes(const TopTools_ListOfShape& aLS) ; void SetShapes(const TopTools_ListOfShape& aLS) ;

View File

@ -43,10 +43,10 @@ class GEOMAlgo_PassKeyShapeMapHasher
public: public:
Standard_EXPORT Standard_EXPORT
static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey, static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey,
const Standard_Integer Upper) ; const Standard_Integer Upper) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1, static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1,
const GEOMAlgo_PassKeyShape& aPKey2) ; const GEOMAlgo_PassKeyShape& aPKey2) ;
}; };
#endif #endif

View File

@ -150,10 +150,10 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
const TopTools_ListOfShape& aLSx=aMFS(i); const TopTools_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent(); aNbSx=aLSx.Extent();
if (aNbSx==1) { if (aNbSx==1) {
aSFS.Append(aFx); aSFS.Append(aFx);
} }
else if (aNbSx==2) { else if (aNbSx==2) {
++aNbF2; ++aNbF2;
} }
} }
} }
@ -172,10 +172,10 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
for (; aIt2.More(); aIt2.Next()) { for (; aIt2.More(); aIt2.Next()) {
const TopoDS_Shape& aSi=aIt2.Value(); const TopoDS_Shape& aSi=aIt2.Value();
if (aSi.ShapeType()!=TopAbs_SHELL) { if (aSi.ShapeType()!=TopAbs_SHELL) {
aOr=aSi.Orientation(); aOr=aSi.Orientation();
if (aOr==TopAbs_INTERNAL) { if (aOr==TopAbs_INTERNAL) {
aMSI.Add(aSi); aMSI.Add(aSi);
} }
} }
} }
} }
@ -212,7 +212,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR, void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
const TopTools_IndexedMapOfShape& aMSI) const TopTools_IndexedMapOfShape& aMSI)
{ {
Standard_Integer i, aNbSI; Standard_Integer i, aNbSI;
TopAbs_State aState; TopAbs_State aState;
@ -233,10 +233,10 @@ void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
// //
aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx); aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
if (aState==TopAbs_IN) { if (aState==TopAbs_IN) {
aBB.Add(aSd, aSI); aBB.Add(aSd, aSI);
// //
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd); BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd);
aSC.Load(aSd); aSC.Load(aSd);
} }
} }
} }

View File

@ -68,7 +68,7 @@ protected:
Standard_EXPORT Standard_EXPORT
static void AddInternalShapes(const TopTools_ListOfShape& , static void AddInternalShapes(const TopTools_ListOfShape& ,
const TopTools_IndexedMapOfShape& ); const TopTools_IndexedMapOfShape& );
// //
}; };

View File

@ -56,36 +56,36 @@ class GEOMAlgo_SurfaceTools
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsCoaxial(const gp_Pnt& aP1, static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,
const gp_Pnt& aP2, const gp_Pnt& aP2,
const gp_Cylinder& aCyl, const gp_Cylinder& aCyl,
const Standard_Real aTol) ; const Standard_Real aTol) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsConformState(const TopAbs_State aST1, static Standard_Boolean IsConformState(const TopAbs_State aST1,
const GEOMAlgo_State aST2) ; const GEOMAlgo_State aST2) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer GetState(const gp_Pnt& aP, static Standard_Integer GetState(const gp_Pnt& aP,
const GeomAdaptor_Surface& aS, const GeomAdaptor_Surface& aS,
const Standard_Real aTol,TopAbs_State& aSt) ; const Standard_Real aTol,TopAbs_State& aSt) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer GetState(const gp_Pnt& aP, static Standard_Integer GetState(const gp_Pnt& aP,
const Handle(Geom_Surface)& aS, const Handle(Geom_Surface)& aS,
const Standard_Real aTol, const Standard_Real aTol,
TopAbs_State& aSt) ; TopAbs_State& aSt) ;
Standard_EXPORT Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP, static Standard_Real Distance(const gp_Pnt& aP,
const gp_Pln& aPln) ; const gp_Pln& aPln) ;
Standard_EXPORT Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP, static Standard_Real Distance(const gp_Pnt& aP,
const gp_Cylinder& aCyl) ; const gp_Cylinder& aCyl) ;
Standard_EXPORT Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP, static Standard_Real Distance(const gp_Pnt& aP,
const gp_Sphere& aSph) ; const gp_Sphere& aSph) ;
Standard_EXPORT Standard_EXPORT
static TopAbs_State ReverseState(const TopAbs_State aSt) ; static TopAbs_State ReverseState(const TopAbs_State aSt) ;

View File

@ -56,54 +56,54 @@ public:
Standard_EXPORT Standard_EXPORT
static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD, static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
const Standard_Real aTol, const Standard_Real aTol,
const Handle(IntTools_Context)& aCtx) ; const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE, static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE, TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
const Handle(IntTools_Context)& aCtx) ; const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1, static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
const TopTools_ListOfShape& aLE, const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_ListOfShape& aLESD, TopTools_ListOfShape& aLESD,
const Handle(IntTools_Context)& aCtx) ; const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1, static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS,gp_Pnt& aP2, const TopoDS_Shape& aS,gp_Pnt& aP2,
const Handle(IntTools_Context)& aCtx) ; const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT Standard_EXPORT
static void PointOnShape(const TopoDS_Shape& aS, static void PointOnShape(const TopoDS_Shape& aS,
gp_Pnt& aP3D) ; gp_Pnt& aP3D) ;
Standard_EXPORT Standard_EXPORT
static void PointOnEdge(const TopoDS_Edge& aE, static void PointOnEdge(const TopoDS_Edge& aE,
gp_Pnt& aP3D) ; gp_Pnt& aP3D) ;
Standard_EXPORT Standard_EXPORT
static void PointOnEdge(const TopoDS_Edge& aE, static void PointOnEdge(const TopoDS_Edge& aE,
const Standard_Real aT,gp_Pnt& aP3D) ; const Standard_Real aT,gp_Pnt& aP3D) ;
Standard_EXPORT Standard_EXPORT
static void PointOnFace(const TopoDS_Face& aF, static void PointOnFace(const TopoDS_Face& aF,
gp_Pnt& aP3D) ; gp_Pnt& aP3D) ;
Standard_EXPORT Standard_EXPORT
static void PointOnFace(const TopoDS_Face& aF, static void PointOnFace(const TopoDS_Face& aF,
const Standard_Real aU, const Standard_Real aU,
const Standard_Real aV, const Standard_Real aV,
gp_Pnt& aP3D) ; gp_Pnt& aP3D) ;
Standard_EXPORT Standard_EXPORT
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE, static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Face& aF, const TopoDS_Face& aF,
const Standard_Real aU1, const Standard_Real aU1,
const Standard_Real aU2) ; const Standard_Real aU2) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ; static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
@ -113,9 +113,9 @@ public:
Standard_EXPORT Standard_EXPORT
static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE, static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Edge& aEold, const TopoDS_Edge& aEold,
const TopoDS_Face& aF, const TopoDS_Face& aF,
const Handle(IntTools_Context)& aCtx) ; const Handle(IntTools_Context)& aCtx) ;
}; };
#endif #endif

View File

@ -1185,8 +1185,8 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
gp_Pnt& theP, gp_Pnt& theP,
gp_Pnt2d& theP2D) gp_Pnt2d& theP2D)
{ {
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i; Standard_Integer iErr, aIx, aNbDomains, i;
@ -1211,8 +1211,8 @@ Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
// //
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
Geom2dHatch_Hatcher aHatcher(aIntr, Geom2dHatch_Hatcher aHatcher(aIntr,
aTolHatch2D, aTolHatch3D, aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False); Standard_True, Standard_False);
// //
iErr=0; iErr=0;
aEpsT=1.e-12; aEpsT=1.e-12;

View File

@ -60,8 +60,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br> //! theContext - cashed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit, static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Returns True if normal direction of the face <br> //! Returns True if normal direction of the face <br>
//! theShape is not the same as for the face <br> //! theShape is not the same as for the face <br>
@ -69,8 +69,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br> //! theContext - cashed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit, static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit,
const TopoDS_Face& theShape, const TopoDS_Face& theShape,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Returns True if tangent direction of the edge <br> //! Returns True if tangent direction of the edge <br>
//! theEdge is not the same as for the edge <br> //! theEdge is not the same as for the edge <br>
@ -78,8 +78,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br> //! theContext - cashed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge, static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge,
const TopoDS_Edge& theSplit, const TopoDS_Edge& theSplit,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! For the couple of faces theF1, theF2 <br> //! For the couple of faces theF1, theF2 <br>
//! computes sense value <br> //! computes sense value <br>
@ -88,18 +88,18 @@ class GEOMAlgo_Tools3D {
//! Returns 2 if the faces have opposite sense <br> //! Returns 2 if the faces have opposite sense <br>
Standard_EXPORT Standard_EXPORT
static Standard_Integer Sense(const TopoDS_Face& theF1, static Standard_Integer Sense(const TopoDS_Face& theF1,
const TopoDS_Face& theF2) ; const TopoDS_Face& theF2) ;
//! Makes new face theF2 from surface and wires <br> //! Makes new face theF2 from surface and wires <br>
//! of the face theF1 <br> //! of the face theF1 <br>
Standard_EXPORT Standard_EXPORT
static void CopyFace(const TopoDS_Face& theF1, static void CopyFace(const TopoDS_Face& theF1,
TopoDS_Face& theF2) ; TopoDS_Face& theF2) ;
//! Makes empty shape theShape of the type theType <br> //! Makes empty shape theShape of the type theType <br>
Standard_EXPORT Standard_EXPORT
static void MakeContainer(const TopAbs_ShapeEnum theType, static void MakeContainer(const TopAbs_ShapeEnum theType,
TopoDS_Shape& theShape) ; TopoDS_Shape& theShape) ;
//! For the list of faces theLS build block <br> //! For the list of faces theLS build block <br>
//! theLSCB in terms of connexity by edges <br> //! theLSCB in terms of connexity by edges <br>
@ -107,8 +107,8 @@ class GEOMAlgo_Tools3D {
//! the treatment <br> //! the treatment <br>
Standard_EXPORT Standard_EXPORT
static void MakeConnexityBlock(const TopTools_ListOfShape& theLS, static void MakeConnexityBlock(const TopTools_ListOfShape& theLS,
const TopTools_IndexedMapOfShape& theMapAvoid, const TopTools_IndexedMapOfShape& theMapAvoid,
TopTools_ListOfShape& theLSCB) ; TopTools_ListOfShape& theLSCB) ;
//! Computes the 3-D state of the shape theShape <br> //! Computes the 3-D state of the shape theShape <br>
//! toward solid theSolid. <br> //! toward solid theSolid. <br>
@ -117,9 +117,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br> //! Returns 3-D state. <br>
Standard_EXPORT Standard_EXPORT
static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape, static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const Standard_Real theTol, const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the point thePoint <br> //! Computes the 3-D state of the point thePoint <br>
//! toward solid theSolid. <br> //! toward solid theSolid. <br>
@ -128,9 +128,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br> //! Returns 3-D state. <br>
Standard_EXPORT Standard_EXPORT
static TopAbs_State ComputeState(const gp_Pnt& thePoint, static TopAbs_State ComputeState(const gp_Pnt& thePoint,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const Standard_Real theTol, const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the vertex theVertex <br> //! Computes the 3-D state of the vertex theVertex <br>
//! toward solid theSolid. <br> //! toward solid theSolid. <br>
@ -139,9 +139,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br> //! Returns 3-D state. <br>
Standard_EXPORT Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const Standard_Real theTol, const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the edge theEdge <br> //! Computes the 3-D state of the edge theEdge <br>
//! toward solid theSolid. <br> //! toward solid theSolid. <br>
@ -150,9 +150,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br> //! Returns 3-D state. <br>
Standard_EXPORT Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, static TopAbs_State ComputeState(const TopoDS_Edge& theEdge,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const Standard_Real theTol, const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the face theFace <br> //! Computes the 3-D state of the face theFace <br>
//! toward solid theSolid. <br> //! toward solid theSolid. <br>
@ -162,10 +162,10 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br> //! Returns 3-D state. <br>
Standard_EXPORT Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Face& theFace, static TopAbs_State ComputeState(const TopoDS_Face& theFace,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const Standard_Real theTol, const Standard_Real theTol,
const TopTools_IndexedMapOfShape& theBounds, const TopTools_IndexedMapOfShape& theBounds,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br> //! Returns True if the face theFace is inside of the <br>
//! couple of faces theFace1, theFace2. <br> //! couple of faces theFace1, theFace2. <br>
@ -173,10 +173,10 @@ class GEOMAlgo_Tools3D {
//! share the edge theEdge <br> //! share the edge theEdge <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge, const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace1, const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2, const TopoDS_Face& theFace2,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br> //! Returns True if the face theFace is inside of the <br>
//! appropriate couple of faces (from the set theLF) . <br> //! appropriate couple of faces (from the set theLF) . <br>
@ -184,9 +184,9 @@ class GEOMAlgo_Tools3D {
//! share the edge theEdge <br> //! share the edge theEdge <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge, const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF, const TopTools_ListOfShape& theLF,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside the <br> //! Returns True if the face theFace is inside the <br>
//! solid theSolid. <br> //! solid theSolid. <br>
@ -195,10 +195,10 @@ class GEOMAlgo_Tools3D {
//! theContext- cahed geometrical tools <br> //! theContext- cahed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Solid& theSolid, const TopoDS_Solid& theSolid,
const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
const Standard_Real theTol, const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ; const Handle(IntTools_Context)& theContext) ;
//! For the face theFace and its edge theEdge <br> //! For the face theFace and its edge theEdge <br>
//! finds the face suitable to produce shell. <br> //! finds the face suitable to produce shell. <br>
@ -206,9 +206,9 @@ class GEOMAlgo_Tools3D {
//! from theLCEF must share edge theEdge <br> //! from theLCEF must share edge theEdge <br>
Standard_EXPORT Standard_EXPORT
static void GetFaceOff(const TopoDS_Edge& theEdge, static void GetFaceOff(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace, const TopoDS_Face& theFace,
const NMTTools_ListOfCoupleOfShape& theLCEF, const NMTTools_ListOfCoupleOfShape& theLCEF,
TopoDS_Face& theFaceOff) ; TopoDS_Face& theFaceOff) ;
//! For the face theFace gets the edge theEdgeOnF <br> //! For the face theFace gets the edge theEdgeOnF <br>
//! that is the same as theEdge <br> //! that is the same as theEdge <br>
@ -216,8 +216,8 @@ class GEOMAlgo_Tools3D {
//! Returns False if there is no such edge <br> //! Returns False if there is no such edge <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge, static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace, const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOnF) ; TopoDS_Edge& theEdgeOnF) ;
//! Returns True if the face theFace contains <br> //! Returns True if the face theFace contains <br>
//! the edge theEdge but with opposite orientation. <br> //! the edge theEdge but with opposite orientation. <br>
@ -225,8 +225,8 @@ class GEOMAlgo_Tools3D {
//! edge founded <br> //! edge founded <br>
Standard_EXPORT Standard_EXPORT
static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge, static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace, const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOff) ; TopoDS_Edge& theEdgeOff) ;
//! Computes a point <theP> inside the face <theF>. <br> //! Computes a point <theP> inside the face <theF>. <br>
//! <theP2D> - 2D representation of <theP> <br> //! <theP2D> - 2D representation of <theP> <br>
@ -234,7 +234,7 @@ class GEOMAlgo_Tools3D {
//! Returns 0 in case of success. <br> //! Returns 0 in case of success. <br>
Standard_EXPORT Standard_EXPORT
static Standard_Integer PntInFace(const TopoDS_Face& theF, static Standard_Integer PntInFace(const TopoDS_Face& theF,
gp_Pnt& theP, gp_Pnt& theP,
gp_Pnt2d& theP2D) ; gp_Pnt2d& theP2D) ;
}; };
#endif #endif

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_WESScaler.cxx // File: GEOMAlgo_WESScaler.cxx
// Created: // Created:
// Author: // Author:
// <pkv@VORTEX> // <pkv@VORTEX>
#include <GEOMAlgo_WESScaler.hxx> #include <GEOMAlgo_WESScaler.hxx>

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_WESScaler.hxx // File: GEOMAlgo_WESScaler.hxx
// Created: // Created:
// Author: // Author:
// <pkv@VORTEX> // <pkv@VORTEX>
#ifndef _GEOMAlgo_WESScaler_HeaderFile #ifndef _GEOMAlgo_WESScaler_HeaderFile
#define _GEOMAlgo_WESScaler_HeaderFile #define _GEOMAlgo_WESScaler_HeaderFile

View File

@ -117,7 +117,7 @@ static
//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f //modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f
static static
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
const BOP_ListOfEdgeInfo& aLEInfo); const BOP_ListOfEdgeInfo& aLEInfo);
//static //static
// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& ); // Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t //modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t
@ -578,7 +578,7 @@ static
// //
if (anIsOut && anIsNotPassed) { if (anIsOut && anIsNotPassed) {
if (aE.IsSame(aEOuta)) { if (aE.IsSame(aEOuta)) {
continue; continue;
} }
// //
if (iCnt==1) { if (iCnt==1) {
@ -852,7 +852,7 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
// purpose: // purpose:
//======================================================================= //=======================================================================
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
const BOP_ListOfEdgeInfo& aLEInfo) const BOP_ListOfEdgeInfo& aLEInfo)
{ {
Standard_Boolean bIsOut, bIsNotPassed; Standard_Boolean bIsOut, bIsNotPassed;
Standard_Integer iCnt=0; Standard_Integer iCnt=0;
@ -866,7 +866,7 @@ Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
bIsNotPassed=!aEI.Passed(); bIsNotPassed=!aEI.Passed();
if (bIsOut && bIsNotPassed) { if (bIsOut && bIsNotPassed) {
if (!aE.IsSame(aEOuta)) { if (!aE.IsSame(aEOuta)) {
iCnt++; iCnt++;
} }
} }
} }

View File

@ -115,8 +115,8 @@ TopoDS_Shape GEOMBase::GetTopoFromSelection( const SALOME_ListIO& IObjects )
_PTR(SObject) obj( studyDS->FindObjectID( IO->getEntry() ) ); _PTR(SObject) obj( studyDS->FindObjectID( IO->getEntry() ) );
_PTR(GenericAttribute) anAttr; _PTR(GenericAttribute) anAttr;
if ( obj && obj->FindAttribute( anAttr, "AttributeIOR" ) ) { if ( obj && obj->FindAttribute( anAttr, "AttributeIOR" ) ) {
_PTR(AttributeIOR) anIOR( anAttr ); _PTR(AttributeIOR) anIOR( anAttr );
shape = GetShapeFromIOR( anIOR->Value().c_str() ); shape = GetShapeFromIOR( anIOR->Value().c_str() );
} }
} }
} }
@ -140,13 +140,13 @@ int GEOMBase::GetNameOfSelectedIObjects( const SALOME_ListIO& IObjects,
Handle(SALOME_InteractiveObject) anIObj = IObjects.First(); Handle(SALOME_InteractiveObject) anIObj = IObjects.First();
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() ); SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
if ( anIObj->hasEntry() && study ) { if ( anIObj->hasEntry() && study ) {
_PTR(Study) studyDS = study->studyDS(); _PTR(Study) studyDS = study->studyDS();
_PTR(SObject) obj( studyDS->FindObjectID( anIObj->getEntry() ) ); _PTR(SObject) obj( studyDS->FindObjectID( anIObj->getEntry() ) );
_PTR(GenericAttribute) anAttr; _PTR(GenericAttribute) anAttr;
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) { if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
_PTR(AttributeName) aNameAttr ( anAttr ); _PTR(AttributeName) aNameAttr ( anAttr );
name = aNameAttr->Value().c_str(); name = aNameAttr->Value().c_str();
} }
} }
} }
} }
@ -176,88 +176,88 @@ QString GEOMBase::GetShapeTypeString(const TopoDS_Shape& shape)
switch ( shape.ShapeType() ) { switch ( shape.ShapeType() ) {
case TopAbs_COMPOUND: case TopAbs_COMPOUND:
{ {
aTypeString = QObject::tr( "GEOM_COMPOUND" ); aTypeString = QObject::tr( "GEOM_COMPOUND" );
break; break;
} }
case TopAbs_COMPSOLID: case TopAbs_COMPSOLID:
{ {
aTypeString = QObject::tr( "GEOM_COMPOUNDSOLID" ); aTypeString = QObject::tr( "GEOM_COMPOUNDSOLID" );
break; break;
} }
case TopAbs_SOLID: case TopAbs_SOLID:
{ {
aTypeString = QObject::tr( "GEOM_SOLID" ); aTypeString = QObject::tr( "GEOM_SOLID" );
break; break;
} }
case TopAbs_SHELL: case TopAbs_SHELL:
{ {
aTypeString = QObject::tr( "GEOM_SHELL" ); aTypeString = QObject::tr( "GEOM_SHELL" );
break; break;
} }
case TopAbs_FACE: case TopAbs_FACE:
{ {
BRepAdaptor_Surface surf( TopoDS::Face( shape ) ); BRepAdaptor_Surface surf( TopoDS::Face( shape ) );
switch ( surf.GetType() ) { switch ( surf.GetType() ) {
case GeomAbs_Plane: case GeomAbs_Plane:
{ {
aTypeString = QObject::tr( "GEOM_PLANE" ); aTypeString = QObject::tr( "GEOM_PLANE" );
break; break;
} }
case GeomAbs_Cylinder: case GeomAbs_Cylinder:
{ {
aTypeString = QObject::tr( "GEOM_SURFCYLINDER" ); aTypeString = QObject::tr( "GEOM_SURFCYLINDER" );
break; break;
} }
case GeomAbs_Sphere: case GeomAbs_Sphere:
{ {
aTypeString = QObject::tr( "GEOM_SURFSPHERE" ); aTypeString = QObject::tr( "GEOM_SURFSPHERE" );
break; break;
} }
case GeomAbs_Torus: case GeomAbs_Torus:
{ {
aTypeString = QObject::tr( "GEOM_SURFTORUS" ); aTypeString = QObject::tr( "GEOM_SURFTORUS" );
break; break;
} }
case GeomAbs_Cone: case GeomAbs_Cone:
{ {
aTypeString = QObject::tr( "GEOM_SURFCONE" ); aTypeString = QObject::tr( "GEOM_SURFCONE" );
break; break;
} }
default: default:
{ {
aTypeString = QObject::tr( "GEOM_FACE" ); aTypeString = QObject::tr( "GEOM_FACE" );
break; break;
} }
} }
break; break;
} }
case TopAbs_WIRE: case TopAbs_WIRE:
{ {
aTypeString = QObject::tr( "GEOM_WIRE" ); aTypeString = QObject::tr( "GEOM_WIRE" );
break; break;
} }
case TopAbs_EDGE: case TopAbs_EDGE:
{ {
BRepAdaptor_Curve curv( TopoDS::Edge( shape ) ); BRepAdaptor_Curve curv( TopoDS::Edge( shape ) );
switch ( curv.GetType() ) { switch ( curv.GetType() ) {
case GeomAbs_Line: case GeomAbs_Line:
{ {
aTypeString = ( qAbs( curv.FirstParameter() ) >= 1E6 || qAbs( curv.LastParameter() ) >= 1E6 ) ? aTypeString = ( qAbs( curv.FirstParameter() ) >= 1E6 || qAbs( curv.LastParameter() ) >= 1E6 ) ?
QObject::tr( "GEOM_LINE" ) : QObject::tr( "GEOM_EDGE" ); QObject::tr( "GEOM_LINE" ) : QObject::tr( "GEOM_EDGE" );
break; break;
} }
case GeomAbs_Circle: case GeomAbs_Circle:
{ {
aTypeString = curv.IsClosed() ? QObject::tr( "GEOM_CIRCLE" ) : QObject::tr( "GEOM_ARC" ); aTypeString = curv.IsClosed() ? QObject::tr( "GEOM_CIRCLE" ) : QObject::tr( "GEOM_ARC" );
break; break;
} }
default: default:
{ {
aTypeString = QObject::tr( "GEOM_EDGE" ); aTypeString = QObject::tr( "GEOM_EDGE" );
break; break;
} }
} }
break; break;
} }
case TopAbs_VERTEX: case TopAbs_VERTEX:
{ {
@ -271,7 +271,7 @@ QString GEOMBase::GetShapeTypeString(const TopoDS_Shape& shape)
} }
default: default:
{ {
break; break;
} }
} }
} }
@ -294,31 +294,31 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const QString& IOR, boo
if ( obj ) { if ( obj ) {
QList<SUIT_ViewWindow*> views; QList<SUIT_ViewWindow*> views;
if ( onlyInActiveView ) if ( onlyInActiveView )
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() ); views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
else else
views = SUIT_Session::session()->activeApplication()->desktop()->windows(); views = SUIT_Session::session()->activeApplication()->desktop()->windows();
foreach ( SUIT_ViewWindow* view, views ) { foreach ( SUIT_ViewWindow* view, views ) {
if ( view && view->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { if ( view && view->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
Handle(AIS_InteractiveContext) ic = ((OCCViewer_Viewer*)view->getViewManager()->getViewModel())->getAISContext(); Handle(AIS_InteractiveContext) ic = ((OCCViewer_Viewer*)view->getViewManager()->getViewModel())->getAISContext();
AIS_ListOfInteractive displayed; AIS_ListOfInteractive displayed;
ic->DisplayedObjects( displayed ); ic->DisplayedObjects( displayed );
ic->ObjectsInCollector( displayed ); ic->ObjectsInCollector( displayed );
AIS_ListIteratorOfListOfInteractive it( displayed ); AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && shape.IsNull() ) { while ( it.More() && shape.IsNull() ) {
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) { if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() ); Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() );
if ( !sh.IsNull() && sh->hasIO() ) { if ( !sh.IsNull() && sh->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( sh->getIO() ); Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( sh->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() ) if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
shape = sh; shape = sh;
} }
} }
it.Next(); it.Next();
} }
} }
if ( !shape.IsNull() ) break; if ( !shape.IsNull() ) break;
} }
} }
} }
@ -341,31 +341,31 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const QString& IOR, bool onlyInActiv
if ( obj ) { if ( obj ) {
QList<SUIT_ViewWindow*> views; QList<SUIT_ViewWindow*> views;
if ( onlyInActiveView ) if ( onlyInActiveView )
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() ); views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
else else
views = SUIT_Session::session()->activeApplication()->desktop()->windows(); views = SUIT_Session::session()->activeApplication()->desktop()->windows();
foreach ( SUIT_ViewWindow* view, views ) { foreach ( SUIT_ViewWindow* view, views ) {
if ( view && view->getViewManager()->getType() == SVTK_Viewer::Type() ) { if ( view && view->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_ViewWindow* aVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>( view ); SVTK_ViewWindow* aVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>( view );
if( !aVTKViewWindow ) if( !aVTKViewWindow )
continue; continue;
vtkRenderer* Renderer = aVTKViewWindow->getRenderer(); vtkRenderer* Renderer = aVTKViewWindow->getRenderer();
vtkActorCollection* theActors = Renderer->GetActors(); vtkActorCollection* theActors = Renderer->GetActors();
theActors->InitTraversal(); theActors->InitTraversal();
vtkActor* a = theActors->GetNextActor(); vtkActor* a = theActors->GetNextActor();
while( a && !actor ) { while( a && !actor ) {
if ( a->IsA( "GEOM_Actor" ) ) { if ( a->IsA( "GEOM_Actor" ) ) {
GEOM_Actor* ga = GEOM_Actor::SafeDownCast( a ); GEOM_Actor* ga = GEOM_Actor::SafeDownCast( a );
if ( ga && ga->hasIO() ) { if ( ga && ga->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( ga->getIO() ); Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( ga->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() ) if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
actor = ga; actor = ga;
} }
} }
a = theActors->GetNextActor(); a = theActors->GetNextActor();
} }
} }
if ( actor ) break; if ( actor ) break;
} }
} }
} }
@ -611,25 +611,25 @@ bool GEOMBase::SelectionByNameInDialogs( QWidget* widget, const QString& objectU
if ( listSO.size() < 1 ) { if ( listSO.size() < 1 ) {
SUIT_MessageBox::critical( widget, SUIT_MessageBox::critical( widget,
QObject::tr( "GEOM_WRN_WARNING" ), QObject::tr( "GEOM_WRN_WARNING" ),
QObject::tr( "GEOM_NAME_INCORRECT" ), QObject::tr( "GEOM_NAME_INCORRECT" ),
QObject::tr( "GEOM_BUT_OK" ) ); QObject::tr( "GEOM_BUT_OK" ) );
return false; return false;
} }
/* More than one object with same name */ /* More than one object with same name */
if ( listSO.size() > 1 ) { if ( listSO.size() > 1 ) {
SUIT_MessageBox::critical( widget, SUIT_MessageBox::critical( widget,
QObject::tr("GEOM_WRN_WARNING"), QObject::tr("GEOM_WRN_WARNING"),
QObject::tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"), QObject::tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"),
QObject::tr("GEOM_BUT_OK") ); QObject::tr("GEOM_BUT_OK") );
return false; return false;
} }
/* Create a SALOME_InteractiveObject with a SALOME::SObject */ /* Create a SALOME_InteractiveObject with a SALOME::SObject */
Handle(SALOME_InteractiveObject) IO = new SALOME_InteractiveObject( listSO[0]->GetID().c_str(), Handle(SALOME_InteractiveObject) IO = new SALOME_InteractiveObject( listSO[0]->GetID().c_str(),
"GEOM", "GEOM",
objectUserName.toLatin1().constData() ); objectUserName.toLatin1().constData() );
/* Add as a selected object */ /* Add as a selected object */
/* Clear any previous selection : */ /* Clear any previous selection : */
@ -671,7 +671,7 @@ QString GEOMBase::GetDefaultName( const QString& operation, bool extractPrefix )
if ( component ) { if ( component ) {
_PTR(ChildIterator) it( studyDS->NewChildIterator( component ) ); _PTR(ChildIterator) it( studyDS->NewChildIterator( component ) );
for ( it->InitEx( true ); it->More(); it->Next() ) { for ( it->InitEx( true ); it->More(); it->Next() ) {
names.insert( it->Value()->GetName() ); names.insert( it->Value()->GetName() );
} }
} }
@ -683,13 +683,13 @@ QString GEOMBase::GetDefaultName( const QString& operation, bool extractPrefix )
if ( extractPrefix ) { if ( extractPrefix ) {
QStringList parts = prefix.split( "_", QString::KeepEmptyParts ); QStringList parts = prefix.split( "_", QString::KeepEmptyParts );
if ( parts.count() > 1 ) { if ( parts.count() > 1 ) {
bool ok; bool ok;
aNumber = parts.last().toLong( &ok ); aNumber = parts.last().toLong( &ok );
if ( ok ) { if ( ok ) {
parts.removeLast(); parts.removeLast();
prefix = parts.join( "_" ); prefix = parts.join( "_" );
aNumber--; aNumber--;
} }
} }
} }
@ -716,9 +716,9 @@ void GEOMBase::ShowErrorMessage( const QString& errorCode, const QString& commen
text << QObject::tr( comment.toLatin1().constData() ); text << QObject::tr( comment.toLatin1().constData() );
SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(), SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
QObject::tr( "GEOM_ERROR" ), QObject::tr( "GEOM_ERROR" ),
text.join( "\n" ), text.join( "\n" ),
QObject::tr( "GEOM_BUT_OK" ) ); QObject::tr( "GEOM_BUT_OK" ) );
} }
@ -771,26 +771,26 @@ QString GEOMBase::GetName( GEOM::GEOM_Object_ptr object )
_PTR(SObject) aSObj( study->studyDS()->FindObjectIOR( std::string( IOR.in() ) ) ); _PTR(SObject) aSObj( study->studyDS()->FindObjectIOR( std::string( IOR.in() ) ) );
_PTR(GenericAttribute) anAttr; _PTR(GenericAttribute) anAttr;
if ( aSObj && aSObj->FindAttribute( anAttr, "AttributeName") ) { if ( aSObj && aSObj->FindAttribute( anAttr, "AttributeName") ) {
_PTR(AttributeName) aNameAttr( anAttr ); _PTR(AttributeName) aNameAttr( anAttr );
name = aNameAttr->Value().c_str(); name = aNameAttr->Value().c_str();
} }
} }
// 2. if object is not found in the study, try default name // 2. if object is not found in the study, try default name
if ( name.isEmpty() ) { if ( name.isEmpty() ) {
if ( object->IsMainShape() ) { if ( object->IsMainShape() ) {
name = GetDefaultName( "geomObj" ); name = GetDefaultName( "geomObj" );
} }
else { else {
GEOM::GEOM_Object_var mainShape = object->GetMainShape(); GEOM::GEOM_Object_var mainShape = object->GetMainShape();
if ( !CORBA::is_nil( mainShape ) ) { if ( !CORBA::is_nil( mainShape ) ) {
GEOM::ListOfLong_var indices = object->GetSubShapeIndices(); GEOM::ListOfLong_var indices = object->GetSubShapeIndices();
if ( indices->length() > 0 ) { if ( indices->length() > 0 ) {
TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)( object->GetShapeType() ); TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)( object->GetShapeType() );
name = QString( "%1:%2_%3" ).arg( GetName( mainShape.in() ) ) name = QString( "%1:%2_%3" ).arg( GetName( mainShape.in() ) )
.arg( TypeName( type ) ).arg( indices[0] ); .arg( TypeName( type ) ).arg( indices[0] );
} }
} }
} }
} }
} }
@ -871,7 +871,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object )
if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) { if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
QString name = GetName( object ); QString name = GetName( object );
GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ), GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
object, name.toLatin1().data(), father.in() ); object, name.toLatin1().data(), father.in() );
} }
} }
} }

View File

@ -57,37 +57,37 @@ public :
static int GetIndex( const TopoDS_Shape& subshape, const TopoDS_Shape& shape ); static int GetIndex( const TopoDS_Shape& subshape, const TopoDS_Shape& shape );
static TopoDS_Shape GetShapeFromIOR( const QString& IOR ); static TopoDS_Shape GetShapeFromIOR( const QString& IOR );
static bool GetShape( GEOM::GEOM_Object_ptr object, static bool GetShape( GEOM::GEOM_Object_ptr object,
TopoDS_Shape& shape, TopoDS_Shape& shape,
const TopAbs_ShapeEnum type = TopAbs_SHAPE ); const TopAbs_ShapeEnum type = TopAbs_SHAPE );
static TopoDS_Shape GetTopoFromSelection( const SALOME_ListIO& IObjects ); static TopoDS_Shape GetTopoFromSelection( const SALOME_ListIO& IObjects );
static int GetNameOfSelectedIObjects( const SALOME_ListIO& IObjects, static int GetNameOfSelectedIObjects( const SALOME_ListIO& IObjects,
QString& name, QString& name,
const bool shapesOnly = false ); const bool shapesOnly = false );
static QString GetShapeTypeString( const TopoDS_Shape& shape ); static QString GetShapeTypeString( const TopoDS_Shape& shape );
/* Convertions */ /* Convertions */
static Handle(GEOM_AISShape) static Handle(GEOM_AISShape)
ConvertIOinGEOMAISShape( const Handle(SALOME_InteractiveObject)& IO, ConvertIOinGEOMAISShape( const Handle(SALOME_InteractiveObject)& IO,
bool onlyInActiveView = false ); bool onlyInActiveView = false );
static Handle(AIS_InteractiveObject) static Handle(AIS_InteractiveObject)
GetAIS( const Handle(SALOME_InteractiveObject)& IO, GetAIS( const Handle(SALOME_InteractiveObject)& IO,
bool onlyInActiveView = false, bool onlyInActiveView = false,
bool onlyGeom = false ); bool onlyGeom = false );
static QStringList ConvertListOfIOInListOfIOR( const SALOME_ListIO& IObjects ); static QStringList ConvertListOfIOInListOfIOR( const SALOME_ListIO& IObjects );
static Handle(GEOM_AISShape) static Handle(GEOM_AISShape)
ConvertIORinGEOMAISShape( const QString& IOR, ConvertIORinGEOMAISShape( const QString& IOR,
bool onlyInActiveView = false ); bool onlyInActiveView = false );
static GEOM_Actor* ConvertIORinGEOMActor( const QString& IOR, static GEOM_Actor* ConvertIORinGEOMActor( const QString& IOR,
bool onlyInActiveView = false ); bool onlyInActiveView = false );
static GEOM::GEOM_Object_ptr static GEOM::GEOM_Object_ptr
ConvertIOinGEOMObject( const Handle(SALOME_InteractiveObject)& IO ); ConvertIOinGEOMObject( const Handle(SALOME_InteractiveObject)& IO );
static void ConvertListOfIOInListOfGO( const SALOME_ListIO& IObjects, static void ConvertListOfIOInListOfGO( const SALOME_ListIO& IObjects,
GEOM::ListOfGO& geomObjects, GEOM::ListOfGO& geomObjects,
bool shapesOnly = false ); bool shapesOnly = false );
static GEOM::GEOM_Object_ptr static GEOM::GEOM_Object_ptr
GetObjectFromIOR( const QString& IOR ); GetObjectFromIOR( const QString& IOR );
@ -99,17 +99,17 @@ public :
/* Used just by Plane and Prism */ /* Used just by Plane and Prism */
static bool LinearEdgeExtremities( const TopoDS_Shape& shape, static bool LinearEdgeExtremities( const TopoDS_Shape& shape,
gp_Pnt& point1, gp_Pnt& point2 ); gp_Pnt& point1, gp_Pnt& point2 );
static void GetBipointDxDyDz( const gp_Pnt& point1, const gp_Pnt& point2, static void GetBipointDxDyDz( const gp_Pnt& point1, const gp_Pnt& point2,
double& dx, double& dy, double& dz ); double& dx, double& dy, double& dz );
/* Simulation management */ /* Simulation management */
static TopoDS_Shape CreateArrowForLinearEdge( const TopoDS_Shape& tds ); static TopoDS_Shape CreateArrowForLinearEdge( const TopoDS_Shape& tds );
/* Generates default names */ /* Generates default names */
static bool SelectionByNameInDialogs( QWidget* widget, static bool SelectionByNameInDialogs( QWidget* widget,
const QString& userObjectName, const QString& userObjectName,
const SALOME_ListIO& IObjects ); const SALOME_ListIO& IObjects );
/* Shows message box with error code */ /* Shows message box with error code */
static void DefineDlgPosition( QWidget* dlg, int& x, int& y ); static void DefineDlgPosition( QWidget* dlg, int& x, int& y );

View File

@ -116,11 +116,11 @@ void GEOMGUI_Selection::init( const QString& context, LightApp_SelectionMgr* sel
for ( int idx = 0; idx < count(); idx++ ) { for ( int idx = 0; idx < count(); idx++ ) {
QString anEntry = entry( idx ); QString anEntry = entry( idx );
if ( study && !anEntry.isEmpty() ) { if ( study && !anEntry.isEmpty() ) {
_PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
if ( aSO ) { if ( aSO ) {
CORBA::Object_var varObj = GeometryGUI::ClientSObjectToObject( aSO ); CORBA::Object_var varObj = GeometryGUI::ClientSObjectToObject( aSO );
myObjects[idx] = GEOM::GEOM_Object::_narrow( varObj ); myObjects[idx] = GEOM::GEOM_Object::_narrow( varObj );
} }
} }
} }
} }
@ -301,44 +301,44 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) { if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs; SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst; AIS_ListOfInteractive lst;
occPrs->GetObjects( lst ); occPrs->GetObjects( lst );
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; int dm;
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io); Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if(!aSh.IsNull()) { if(!aSh.IsNull()) {
dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode(); dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
} else { } else {
dm = io->DisplayMode(); 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()->
desktop()->activeWindow()->getViewManager()->getViewModel(); desktop()->activeWindow()->getViewManager()->getViewModel();
Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
dm = ic->DisplayMode(); dm = ic->DisplayMode();
OCC_DISPLAY_MODE_TO_STRING( res, dm ); OCC_DISPLAY_MODE_TO_STRING( res, dm );
} }
} }
} }
} }
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs ); SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0; vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) { if ( lst ) {
lst->InitTraversal(); lst->InitTraversal();
vtkActor* actor = lst->GetNextActor(); vtkActor* actor = lst->GetNextActor();
if ( actor ) { if ( actor ) {
SALOME_Actor* salActor = dynamic_cast<SALOME_Actor*>( actor ); SALOME_Actor* salActor = dynamic_cast<SALOME_Actor*>( actor );
if ( salActor ) { if ( salActor ) {
int dm = salActor->getDisplayMode(); int dm = salActor->getDisplayMode();
VTK_DISPLAY_MODE_TO_STRING( res, dm ); VTK_DISPLAY_MODE_TO_STRING( res, dm );
} // if ( salome actor ) } // if ( salome actor )
} // if ( actor ) } // if ( actor )
} // if ( lst == vtkPrs->GetObjects() ) } // if ( lst == vtkPrs->GetObjects() )
} // if VTK } // if VTK
} }
} }
@ -362,30 +362,30 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) { if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs; SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst; AIS_ListOfInteractive lst;
occPrs->GetObjects( lst ); occPrs->GetObjects( lst );
if ( lst.Extent() ) { if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First(); Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) { if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io); Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() ) if ( !aSh.IsNull() )
res = aSh->isShowVectors(); res = aSh->isShowVectors();
} }
} }
} }
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs ); SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0; vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) { if ( lst ) {
lst->InitTraversal(); lst->InitTraversal();
vtkActor* actor = lst->GetNextActor(); vtkActor* actor = lst->GetNextActor();
if ( actor ) { if ( actor ) {
GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor); GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor);
if ( aGeomActor ) if ( aGeomActor )
res = aGeomActor->GetVectorMode(); res = aGeomActor->GetVectorMode();
} }
} }
} }
} }
} }
@ -549,17 +549,17 @@ bool GEOMGUI_Selection::topLevel( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) { if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs; SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst; AIS_ListOfInteractive lst;
occPrs->GetObjects( lst ); occPrs->GetObjects( lst );
if ( lst.Extent() ) { if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First(); Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) { if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io); Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() ) if ( !aSh.IsNull() )
res = (bool)aSh->isTopLevel(); res = (bool)aSh->isTopLevel();
} }
} }
} }
} }
} }
@ -585,33 +585,33 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const
SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() ); SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() );
if ( prs ) { if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs; SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst; AIS_ListOfInteractive lst;
occPrs->GetObjects( lst ); occPrs->GetObjects( lst );
if ( lst.Extent() ) { if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First(); Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) { if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io); Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() ) if ( !aSh.IsNull() )
res = (bool) aSh->Attributes()->ShadingAspect()-> res = (bool) aSh->Attributes()->ShadingAspect()->
Material(Aspect_TOFM_BOTH_SIDE).MaterialType( Graphic3d_MATERIAL_PHYSIC ); Material(Aspect_TOFM_BOTH_SIDE).MaterialType( Graphic3d_MATERIAL_PHYSIC );
} }
} }
} }
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs ); SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0; vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) { if ( lst ) {
lst->InitTraversal(); lst->InitTraversal();
vtkActor* actor = lst->GetNextActor(); vtkActor* actor = lst->GetNextActor();
if ( actor ) { if ( actor ) {
GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor ); GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor );
if ( aGeomGActor ) { if ( aGeomGActor ) {
GEOM_VTKPropertyMaterial* mat = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty()); GEOM_VTKPropertyMaterial* mat = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty());
res = mat->GetPhysical(); res = mat->GetPhysical();
} // if ( salome actor ) } // if ( salome actor )
} // if ( actor ) } // if ( actor )
} // if ( lst == vtkPrs->GetObjects() ) } // if ( lst == vtkPrs->GetObjects() )
} }
} }
} }

View File

@ -625,25 +625,25 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// - wireframe color // - wireframe color
Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect(); Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) ); SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetLineAspect( anAspect ); AISShape->Attributes()->SetLineAspect( anAspect );
// - unfree boundaries color // - unfree boundaries color
anAspect = AISShape->Attributes()->UnFreeBoundaryAspect(); anAspect = AISShape->Attributes()->UnFreeBoundaryAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) ); SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect ); AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
// - free boundaries color // - free boundaries color
anAspect = AISShape->Attributes()->FreeBoundaryAspect(); anAspect = AISShape->Attributes()->FreeBoundaryAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) ); SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetFreeBoundaryAspect( anAspect ); AISShape->Attributes()->SetFreeBoundaryAspect( anAspect );
// - standalone edges color // - standalone edges color
anAspect = AISShape->Attributes()->WireAspect(); anAspect = AISShape->Attributes()->WireAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() : anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::LineColor ) ).value<QColor>() ) ); SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::LineColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetWireAspect( anAspect ); AISShape->Attributes()->SetWireAspect( anAspect );
// - color for edges in shading+edges mode // - color for edges in shading+edges mode
@ -654,10 +654,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// set display mode // set display mode
AISShape->SetDisplayMode( HasDisplayMode() ? AISShape->SetDisplayMode( HasDisplayMode() ?
// predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function // predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
GetDisplayMode() : GetDisplayMode() :
// display mode from properties // display mode from properties
propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() ); propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() );
// set display vectors flag // set display vectors flag
AISShape->SetDisplayVectors( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() ); AISShape->SetDisplayVectors( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
@ -697,10 +697,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// set line width // set line width
AISShape->SetWidth( HasWidth() ? AISShape->SetWidth( HasWidth() ?
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function // predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() : GetWidth() :
// libe width from properties // libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() ); propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// set top-level flag // set top-level flag
AISShape->setTopLevel( propMap.value( GEOM::propertyName( GEOM::TopLevel ) ).toBool() ); AISShape->setTopLevel( propMap.value( GEOM::propertyName( GEOM::TopLevel ) ).toBool() );
@ -716,10 +716,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
anAspect->SetScale( aScaleOfMarker ); anAspect->SetScale( aScaleOfMarker );
anAspect->SetTypeOfMarker( (Aspect_TypeOfMarker)( aTypeOfMarker-1 ) ); anAspect->SetTypeOfMarker( (Aspect_TypeOfMarker)( aTypeOfMarker-1 ) );
anAspect->SetColor( HasColor() ? anAspect->SetColor( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() : (Quantity_NameOfColor)GetColor() :
// color from properties // color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ) ); SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetPointAspect( anAspect ); AISShape->Attributes()->SetPointAspect( anAspect );
} }
else if ( aList.size() == 1 ) { else if ( aList.size() == 1 ) {
@ -729,21 +729,21 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 #if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
Handle(TColStd_HArray1OfByte) aTexture = Handle(TColStd_HArray1OfByte) aTexture =
#else #else
Handle(Graphic3d_HArray1OfBytes) aTexture = Handle(Graphic3d_HArray1OfBytes) aTexture =
#endif #endif
GeometryGUI::getTexture( study, textureId, aWidth, aHeight ); GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
if ( !aTexture.IsNull() ) { if ( !aTexture.IsNull() ) {
static int TextureId = 0; static int TextureId = 0;
Handle(Prs3d_PointAspect) aTextureAspect = Handle(Prs3d_PointAspect) aTextureAspect =
new Prs3d_PointAspect( HasColor() ? new Prs3d_PointAspect( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() : (Quantity_NameOfColor)GetColor() :
// color from properties // color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ), SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
++TextureId, ++TextureId,
aWidth, aHeight, aWidth, aHeight,
aTexture ); aTexture );
AISShape->Attributes()->SetPointAspect( aTextureAspect ); AISShape->Attributes()->SetPointAspect( aTextureAspect );
} }
} }
} }
@ -864,10 +864,10 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
// set line width // set line width
actor->SetWidth( HasWidth() ? actor->SetWidth( HasWidth() ?
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function // predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() : GetWidth() :
// libe width from properties // libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() ); propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// set display vectors flag // set display vectors flag
actor->SetVectorMode( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() ); actor->SetVectorMode( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
@ -967,26 +967,26 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
if ( occPrs->IsNull() ) if ( occPrs->IsNull() )
{ {
// new presentation is being created // new presentation is being created
aTrh = new GEOM_AISTrihedron( aPlc ); aTrh = new GEOM_AISTrihedron( aPlc );
occPrs->AddObject( aTrh ); occPrs->AddObject( aTrh );
} }
else else
{ {
// presentation is being updated // presentation is being updated
AIS_ListOfInteractive aList; AIS_ListOfInteractive aList;
occPrs->GetObjects( aList ); occPrs->GetObjects( aList );
AIS_ListIteratorOfListOfInteractive anIter( aList ); AIS_ListIteratorOfListOfInteractive anIter( aList );
for ( ; anIter.More() && aTrh.IsNull(); anIter.Next() ) { for ( ; anIter.More() && aTrh.IsNull(); anIter.Next() ) {
aTrh = Handle(GEOM_AISTrihedron)::DownCast( anIter.Value() ); aTrh = Handle(GEOM_AISTrihedron)::DownCast( anIter.Value() );
} }
} }
if ( !aTrh.IsNull() ) { if ( !aTrh.IsNull() ) {
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
if ( HasColor() ) if ( HasColor() )
aTrh->SetColor( (Quantity_NameOfColor)GetColor() ); aTrh->SetColor( (Quantity_NameOfColor)GetColor() );
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function // predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
if ( HasWidth() ) if ( HasWidth() )
aTrh->SetWidth( GetWidth() ); aTrh->SetWidth( GetWidth() );
@ -995,8 +995,8 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
aTrh->setIO( myIO ); aTrh->setIO( myIO );
aTrh->SetOwner( myIO ); aTrh->SetOwner( myIO );
} }
aTrh->SetComponent( aPlc ); aTrh->SetComponent( aPlc );
aTrh->SetToUpdate(); aTrh->SetToUpdate();
} }
occPrs->SetToActivate( ToActivate() ); occPrs->SetToActivate( ToActivate() );
} }
@ -1012,7 +1012,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
{ {
// create presentation (specific for vectors) // create presentation (specific for vectors)
Handle(GEOM_AISShape) AISShape = ( myType == GEOM_VECTOR ) ? new GEOM_AISVector( myShape, "" ) Handle(GEOM_AISShape) AISShape = ( myType == GEOM_VECTOR ) ? new GEOM_AISVector( myShape, "" )
: new GEOM_AISShape ( myShape, "" ); : new GEOM_AISShape ( myShape, "" );
// update shape properties // update shape properties
updateShapeProperties( AISShape, true ); updateShapeProperties( AISShape, true );
@ -1024,18 +1024,18 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
occPrs->SetToActivate( ToActivate() ); occPrs->SetToActivate( ToActivate() );
if ( AISShape->isTopLevel() && GEOM_AISShape::topLevelDisplayMode() == GEOM_AISShape::TopShowAdditionalWActor ) { if ( AISShape->isTopLevel() && GEOM_AISShape::topLevelDisplayMode() == GEOM_AISShape::TopShowAdditionalWActor ) {
// 21671: EDF 1829 GEOM : Bring to front selected objects (continuation): // 21671: EDF 1829 GEOM : Bring to front selected objects (continuation):
// create additional wireframe shape // create additional wireframe shape
Handle(GEOM_TopWireframeShape) aWirePrs = new GEOM_TopWireframeShape(myShape); Handle(GEOM_TopWireframeShape) aWirePrs = new GEOM_TopWireframeShape(myShape);
aWirePrs->SetWidth(AISShape->Width()); aWirePrs->SetWidth(AISShape->Width());
if ( !myIO.IsNull() ) { if ( !myIO.IsNull() ) {
aWirePrs->setIO( myIO ); aWirePrs->setIO( myIO );
aWirePrs->SetOwner( myIO ); aWirePrs->SetOwner( myIO );
} }
// add shape to the presentation // add shape to the presentation
occPrs->AddObject( aWirePrs ); occPrs->AddObject( aWirePrs );
} }
} }
// if presentation is found -> set again shape for it // if presentation is found -> set again shape for it
@ -1046,20 +1046,20 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
AIS_ListIteratorOfListOfInteractive Iter( IOList ); AIS_ListIteratorOfListOfInteractive Iter( IOList );
for ( ; Iter.More(); Iter.Next() ) for ( ; Iter.More(); Iter.Next() )
{ {
Handle(GEOM_AISShape) AISShape = Handle(GEOM_AISShape)::DownCast( Iter.Value() ); Handle(GEOM_AISShape) AISShape = Handle(GEOM_AISShape)::DownCast( Iter.Value() );
if ( AISShape.IsNull() ) if ( AISShape.IsNull() )
continue; continue;
// re-set shape (it might be changed) // re-set shape (it might be changed)
if ( AISShape->Shape() != myShape ) if ( AISShape->Shape() != myShape )
AISShape->Set( myShape ); AISShape->Set( myShape );
// update shape properties // update shape properties
updateShapeProperties( AISShape, false ); updateShapeProperties( AISShape, false );
// force updating // force updating
AISShape->UpdateSelection(); AISShape->UpdateSelection();
AISShape->SetToUpdate(); AISShape->SetToUpdate();
} }
} }
} }
@ -1095,42 +1095,42 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
GEOM_VTKTrihedron* aTrh = 0; GEOM_VTKTrihedron* aTrh = 0;
if ( vtkPrs->IsNull() ) { if ( vtkPrs->IsNull() ) {
// new presentation is being created // new presentation is being created
aTrh = GEOM_VTKTrihedron::New(); aTrh = GEOM_VTKTrihedron::New();
vtkPrs->AddObject( aTrh ); vtkPrs->AddObject( aTrh );
} }
else { else {
// presentation is being updated // presentation is being updated
vtkActorCollection* actors = vtkPrs->GetObjects(); vtkActorCollection* actors = vtkPrs->GetObjects();
if ( actors ) { if ( actors ) {
actors->InitTraversal(); actors->InitTraversal();
vtkActor* a = actors->GetNextActor(); vtkActor* a = actors->GetNextActor();
while ( a && !aTrh ) { while ( a && !aTrh ) {
aTrh = GEOM_VTKTrihedron::SafeDownCast( a ); aTrh = GEOM_VTKTrihedron::SafeDownCast( a );
a = actors->GetNextActor(); a = actors->GetNextActor();
} }
} }
} }
if ( aTrh ) { if ( aTrh ) {
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
if ( HasColor() ) { if ( HasColor() ) {
Quantity_Color aColor( (Quantity_NameOfColor)GetColor() ); Quantity_Color aColor( (Quantity_NameOfColor)GetColor() );
aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() ); aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() );
} }
#ifdef VTK_TRIHEDRON_WIDTH #ifdef VTK_TRIHEDRON_WIDTH
// //
// VSR: currently isn't supported // VSR: currently isn't supported
// //
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function // predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
if ( HasWidth() ) if ( HasWidth() )
aTrh->SetWidth( GetWidth() ); aTrh->SetWidth( GetWidth() );
#endif #endif
if ( !myIO.IsNull() ) if ( !myIO.IsNull() )
aTrh->setIO( myIO ); aTrh->setIO( myIO );
aTrh->SetPlacement( aPlc ); aTrh->SetPlacement( aPlc );
} }
} }
} }
@ -1154,16 +1154,16 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
// presentation is being updated // presentation is being updated
vtkActorCollection* actors = vtkPrs->GetObjects(); vtkActorCollection* actors = vtkPrs->GetObjects();
if ( actors ) { if ( actors ) {
actors->InitTraversal(); actors->InitTraversal();
vtkActor* a = actors->GetNextActor(); vtkActor* a = actors->GetNextActor();
while ( a ) { while ( a ) {
GEOM_Actor* actor = GEOM_Actor::SafeDownCast( a ); GEOM_Actor* actor = GEOM_Actor::SafeDownCast( a );
if ( actor ) { if ( actor ) {
// update actor properties // update actor properties
updateActorProperties( actor, false ); updateActorProperties( actor, false );
a = actors->GetNextActor(); a = actors->GetNextActor();
} }
} }
} }
} }
} }
@ -1824,8 +1824,8 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
} }
PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study, PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
const QString& entry, const QString& entry,
SALOME_View* view ) SALOME_View* view )
{ {
// get default properties for the explicitly specified default view type // get default properties for the explicitly specified default view type
PropMap propMap = GEOM_Displayer::getDefaultPropertyMap(); PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
@ -1840,62 +1840,62 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
PropMap storedMap = study->getObjectPropMap( viewId, entry ); PropMap storedMap = study->getObjectPropMap( viewId, entry );
// overwrite default properties from stored ones (that are specified) // overwrite default properties from stored ones (that are specified)
for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) { for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) ) if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
propMap.insert( GEOM::propertyName( (GEOM::Property)prop ), propMap.insert( GEOM::propertyName( (GEOM::Property)prop ),
storedMap.value( GEOM::propertyName( (GEOM::Property)prop ) ) ); storedMap.value( GEOM::propertyName( (GEOM::Property)prop ) ) );
} }
// ... specific processing for color // ... specific processing for color
// ... current implementation is to use same stored color for all aspects // ... current implementation is to use same stored color for all aspects
// ... (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here // ... (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here
if ( storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) { if ( storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) {
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) ); propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) ); propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) ); propMap.insert( GEOM::propertyName( GEOM::LineColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) ); propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) ); propMap.insert( GEOM::propertyName( GEOM::PointColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
} }
if ( !entry.isEmpty() ) { if ( !entry.isEmpty() ) {
// get CORBA reference to geom object // get CORBA reference to geom object
_PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) ); _PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
if ( SO ) { if ( SO ) {
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO ); CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
if ( !CORBA::is_nil( object ) ) { if ( !CORBA::is_nil( object ) ) {
GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_narrow( object ); GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_narrow( object );
// check that geom object has color properly set // check that geom object has color properly set
bool hasColor = false; bool hasColor = false;
SALOMEDS::Color aSColor = getColor( geomObject, hasColor ); SALOMEDS::Color aSColor = getColor( geomObject, hasColor );
// set color from geometry object (only once, if it is not yet set in GUI) // set color from geometry object (only once, if it is not yet set in GUI)
// current implementation is to use same color for all aspects // current implementation is to use same color for all aspects
// (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here // (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here
if ( hasColor && !storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) { if ( hasColor && !storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) {
QColor objColor = QColor::fromRgbF( aSColor.R, aSColor.G, aSColor.B ); QColor objColor = QColor::fromRgbF( aSColor.R, aSColor.G, aSColor.B );
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), objColor ); propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), objColor ); propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), objColor ); propMap.insert( GEOM::propertyName( GEOM::LineColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), objColor ); propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), objColor ); propMap.insert( GEOM::propertyName( GEOM::PointColor ), objColor );
} }
// check that object has point marker properly set // check that object has point marker properly set
GEOM::marker_type mType = geomObject->GetMarkerType(); GEOM::marker_type mType = geomObject->GetMarkerType();
GEOM::marker_size mSize = geomObject->GetMarkerSize(); GEOM::marker_size mSize = geomObject->GetMarkerSize();
int mTextureId = geomObject->GetMarkerTexture(); int mTextureId = geomObject->GetMarkerTexture();
bool hasMarker = ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER && mSize > GEOM::MS_NONE && mSize <= GEOM::MS_70 ) || bool hasMarker = ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER && mSize > GEOM::MS_NONE && mSize <= GEOM::MS_70 ) ||
( mType == GEOM::MT_USER && mTextureId > 0 ); ( mType == GEOM::MT_USER && mTextureId > 0 );
// set point marker from geometry object (only once, if it is not yet set in GUI) // set point marker from geometry object (only once, if it is not yet set in GUI)
if ( hasMarker && !storedMap.contains( GEOM::propertyName( GEOM::PointMarker ) ) ) { if ( hasMarker && !storedMap.contains( GEOM::propertyName( GEOM::PointMarker ) ) ) {
if ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER ) { if ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER ) {
// standard type // standard type
propMap.insert( GEOM::propertyName( GEOM::PointMarker ), propMap.insert( GEOM::propertyName( GEOM::PointMarker ),
QString( "%1%2%3" ).arg( (int)mType ).arg( GEOM::subSectionSeparator() ).arg( (int)mSize ) ); QString( "%1%2%3" ).arg( (int)mType ).arg( GEOM::subSectionSeparator() ).arg( (int)mSize ) );
} }
else if ( mType == GEOM::MT_USER ) { else if ( mType == GEOM::MT_USER ) {
// custom texture // custom texture
propMap.insert( GEOM::propertyName( GEOM::PointMarker ), QString::number( mTextureId ) ); propMap.insert( GEOM::propertyName( GEOM::PointMarker ), QString::number( mTextureId ) );
} }
} }
} }
} }
} }
} }
} }
@ -1916,52 +1916,52 @@ PropMap GEOM_Displayer::getDefaultPropertyMap()
// - nb isos (take default value from preferences) // - nb isos (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::NbIsos ), propMap.insert( GEOM::propertyName( GEOM::NbIsos ),
QString( "%1%2%3" ). QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "iso_number_u", 1 ) ). arg( resMgr->integerValue( "Geometry", "iso_number_u", 1 ) ).
arg( GEOM::subSectionSeparator() ). arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "iso_number_v", 1 ) ) ); arg( resMgr->integerValue( "Geometry", "iso_number_v", 1 ) ) );
// - transparency (opacity = 1-transparency) // - transparency (opacity = 1-transparency)
propMap.insert( GEOM::propertyName( GEOM::Transparency ), 0.0 ); propMap.insert( GEOM::propertyName( GEOM::Transparency ), 0.0 );
// - display mode (take default value from preferences) // - display mode (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::DisplayMode ), propMap.insert( GEOM::propertyName( GEOM::DisplayMode ),
resMgr->integerValue( "Geometry", "display_mode", 0 ) ); resMgr->integerValue( "Geometry", "display_mode", 0 ) );
// - show edges direction flag (false by default) // - show edges direction flag (false by default)
propMap.insert( GEOM::propertyName( GEOM::EdgesDirection ), false ); propMap.insert( GEOM::propertyName( GEOM::EdgesDirection ), false );
// - shading color (take default value from preferences) // - shading color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), propMap.insert( GEOM::propertyName( GEOM::ShadingColor ),
colorFromResources( "shading_color", QColor( 255, 255, 0 ) ) ); colorFromResources( "shading_color", QColor( 255, 255, 0 ) ) );
// - wireframe color (take default value from preferences) // - wireframe color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), propMap.insert( GEOM::propertyName( GEOM::WireframeColor ),
colorFromResources( "wireframe_color", QColor( 255, 255, 0 ) ) ); colorFromResources( "wireframe_color", QColor( 255, 255, 0 ) ) );
// - standalone edges color (take default value from preferences) // - standalone edges color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::LineColor ), propMap.insert( GEOM::propertyName( GEOM::LineColor ),
colorFromResources( "line_color", QColor( 255, 0, 0 ) ) ); colorFromResources( "line_color", QColor( 255, 0, 0 ) ) );
// - free boundaries color (take default value from preferences) // - free boundaries color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ),
colorFromResources( "free_bound_color", QColor( 0, 255, 0 ) ) ); colorFromResources( "free_bound_color", QColor( 0, 255, 0 ) ) );
// - points color (take default value from preferences) // - points color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::PointColor ), propMap.insert( GEOM::propertyName( GEOM::PointColor ),
colorFromResources( "point_color", QColor( 255, 255, 0 ) ) ); colorFromResources( "point_color", QColor( 255, 255, 0 ) ) );
// - isos color (take default value from preferences) // - isos color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::IsosColor ), propMap.insert( GEOM::propertyName( GEOM::IsosColor ),
colorFromResources( "isos_color", QColor( 200, 200, 200 ) ) ); colorFromResources( "isos_color", QColor( 200, 200, 200 ) ) );
// - outlines color (take default value from preferences) // - outlines color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::OutlineColor ), propMap.insert( GEOM::propertyName( GEOM::OutlineColor ),
colorFromResources( "edges_in_shading_color", QColor( 180, 180, 180 ) ) ); colorFromResources( "edges_in_shading_color", QColor( 180, 180, 180 ) ) );
// - deflection coefficient (take default value from preferences) // - deflection coefficient (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::Deflection ), propMap.insert( GEOM::propertyName( GEOM::Deflection ),
resMgr->doubleValue( "Geometry", "deflection_coeff", 0.001 ) ); resMgr->doubleValue( "Geometry", "deflection_coeff", 0.001 ) );
// - material (take default value from preferences) // - material (take default value from preferences)
Material_Model material; Material_Model material;
@ -1970,18 +1970,18 @@ PropMap GEOM_Displayer::getDefaultPropertyMap()
// - edge width (take default value from preferences) // - edge width (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::LineWidth ), propMap.insert( GEOM::propertyName( GEOM::LineWidth ),
resMgr->integerValue( "Geometry", "edge_width", 1 ) ); resMgr->integerValue( "Geometry", "edge_width", 1 ) );
// - isos width (take default value from preferences) // - isos width (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::IsosWidth ), propMap.insert( GEOM::propertyName( GEOM::IsosWidth ),
resMgr->integerValue( "Geometry", "isolines_width", 1 ) ); resMgr->integerValue( "Geometry", "isolines_width", 1 ) );
// - point marker (take default value from preferences) // - point marker (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::PointMarker ), propMap.insert( GEOM::propertyName( GEOM::PointMarker ),
QString( "%1%2%3" ). QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "type_of_marker", 1 ) + 1 ). arg( resMgr->integerValue( "Geometry", "type_of_marker", 1 ) + 1 ).
arg( GEOM::subSectionSeparator() ). arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "marker_scale", 1 ) ) ); arg( resMgr->integerValue( "Geometry", "marker_scale", 1 ) ) );
// - top-level flag (false by default) // - top-level flag (false by default)
propMap.insert( GEOM::propertyName( GEOM::TopLevel ), false ); propMap.insert( GEOM::propertyName( GEOM::TopLevel ), false );
@ -2005,39 +2005,39 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0; hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0;
if ( !hasColor ) { if ( !hasColor ) {
#ifdef GENERAL_AUTOCOLOR // auto-color for all sub-shapes #ifdef GENERAL_AUTOCOLOR // auto-color for all sub-shapes
bool general_autocolor = true; bool general_autocolor = true;
#else // auto-color for groups only #else // auto-color for groups only
bool general_autocolor = false; bool general_autocolor = false;
#endif // GENERAL_AUTOCOLOR #endif // GENERAL_AUTOCOLOR
if ( general_autocolor || theGeomObject->GetType() == GEOM_GROUP ) { if ( general_autocolor || theGeomObject->GetType() == GEOM_GROUP ) {
GEOM::GEOM_Object_var aMainObject = theGeomObject->GetMainShape(); GEOM::GEOM_Object_var aMainObject = theGeomObject->GetMainShape();
if ( !CORBA::is_nil( aMainObject ) && aMainObject->GetAutoColor() ) { if ( !CORBA::is_nil( aMainObject ) && aMainObject->GetAutoColor() ) {
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors #ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
aSColor = getPredefinedUniqueColor(); aSColor = getPredefinedUniqueColor();
hasColor = true; hasColor = true;
#else // old algorithm for auto-colors #else // old algorithm for auto-colors
QList<SALOMEDS::Color> aReservedColors; QList<SALOMEDS::Color> aReservedColors;
CORBA::String_var IOR = app->orb()->object_to_string( aMainObject ); CORBA::String_var IOR = app->orb()->object_to_string( aMainObject );
_PTR(SObject) aMainSObject( aStudy->FindObjectIOR( IOR.in() ) ); _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( IOR.in() ) );
if ( aMainSObject ) { if ( aMainSObject ) {
_PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) ); _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) );
for ( ; it->More(); it->Next() ) { for ( ; it->More(); it->Next() ) {
_PTR(SObject) aChildSObject( it->Value() ); _PTR(SObject) aChildSObject( it->Value() );
GEOM::GEOM_Object_var aChildObject = GEOM::GEOM_Object_var aChildObject =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject)); GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject));
if ( CORBA::is_nil( aChildObject ) ) if ( CORBA::is_nil( aChildObject ) )
continue; continue;
SALOMEDS::Color aReservedColor = aChildObject->GetColor(); SALOMEDS::Color aReservedColor = aChildObject->GetColor();
if ( aReservedColor.R >= 0 && aReservedColor.G >= 0 && aReservedColor.B >= 0 ) if ( aReservedColor.R >= 0 && aReservedColor.G >= 0 && aReservedColor.B >= 0 )
aReservedColors.append( aReservedColor ); aReservedColors.append( aReservedColor );
} }
} }
aSColor = getUniqueColor( aReservedColors ); aSColor = getUniqueColor( aReservedColors );
hasColor = true; hasColor = true;
#endif // SIMPLE_AUTOCOLOR #endif // SIMPLE_AUTOCOLOR
} }
} }
} }
} }
} }

View File

@ -101,7 +101,7 @@ public:
const bool updateViewer = true ); const bool updateViewer = true );
void EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO, void EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
const bool eraseOnlyChildren = false); const bool eraseOnlyChildren = false);
/* Display/Erase list of objects methods */ /* Display/Erase list of objects methods */

View File

@ -544,11 +544,11 @@ void GEOMToolsGUI::OnEditDelete()
else { else {
// GEOM component is not selected: check if selected objects are in use // GEOM component is not selected: check if selected objects are in use
if ( inUse( aStudy, geomComp, allDeleted ) && if ( inUse( aStudy, geomComp, allDeleted ) &&
SUIT_MessageBox::question( app->desktop(), SUIT_MessageBox::question( app->desktop(),
QObject::tr("WRN_WARNING"), QObject::tr("WRN_WARNING"),
QObject::tr("DEP_OBJECT"), QObject::tr("DEP_OBJECT"),
SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes | SUIT_MessageBox::No,
SUIT_MessageBox::No ) != SUIT_MessageBox::Yes ) { SUIT_MessageBox::No ) != SUIT_MessageBox::Yes ) {
return; // object(s) in use return; // object(s) in use
} }
// ... and then delete all objects // ... and then delete all objects

View File

@ -543,8 +543,8 @@ void GEOMToolsGUI::OnMaterialProperties()
void GEOMToolsGUI::OnMaterialsLibrary() void GEOMToolsGUI::OnMaterialsLibrary()
{ {
GEOMToolsGUI_MaterialPropertiesDlg dlg( SUIT_Session::session()->activeApplication()->desktop(), false, true, QtxDialog::Standard ); GEOMToolsGUI_MaterialPropertiesDlg dlg( SUIT_Session::session()->activeApplication()->desktop(), false, true, QtxDialog::Standard );
dlg.setWindowTitle( tr( "MATERIAL_LIBRARY_TLT" ) ); dlg.setWindowTitle( tr( "MATERIAL_LIBRARY_TLT" ) );
dlg.exec(); dlg.exec();
} }

View File

@ -625,10 +625,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onChanged()
// it is no allowed to change global material // it is no allowed to change global material
// user is asked about creating of a new user material model based on the currently selected one // user is asked about creating of a new user material model based on the currently selected one
if ( SUIT_MessageBox::question( this, if ( SUIT_MessageBox::question( this,
tr( "GEOM_WRN_WARNING" ), tr( "GEOM_WRN_WARNING" ),
tr( "QUE_CREATE_NEW_MATERIAL" ), tr( "QUE_CREATE_NEW_MATERIAL" ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) { QMessageBox::Yes ) == QMessageBox::Yes ) {
// user has chosen creation of new user model // user has chosen creation of new user model
onAddMaterial(); onAddMaterial();
} }
@ -708,10 +708,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onDeleteMaterial()
QListWidgetItem* item = myMaterials->currentItem(); QListWidgetItem* item = myMaterials->currentItem();
if ( item && item->data( TypeRole ).toInt() == User ) { if ( item && item->data( TypeRole ).toInt() == User ) {
if ( SUIT_MessageBox::question( this, if ( SUIT_MessageBox::question( this,
tr( "GEOM_WRN_WARNING" ), tr( "GEOM_WRN_WARNING" ),
tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ), tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) { QMessageBox::Yes ) == QMessageBox::Yes ) {
myResourceMgr.remove( item->data( NameRole ).toString() ); myResourceMgr.remove( item->data( NameRole ).toString() );
delete item; delete item;
} }
@ -758,7 +758,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SetEditCurrentArgument()
// enable line edit // enable line edit
myLineEditCurArg->setEnabled(true); myLineEditCurArg->setEnabled(true);
myLineEditCurArg->setFocus(); myLineEditCurArg->setFocus();
SelectionIntoArgument(); SelectionIntoArgument();
// after setFocus(), because it will be setDown(false) when loses focus // after setFocus(), because it will be setDown(false) when loses focus
send->setDown(true); send->setDown(true);
} }
@ -778,7 +778,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SelectionIntoArgument()
if ( study ) { if ( study ) {
SALOME_ListIO aSelList; SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList); aSelMgr->selectedObjects(aSelList);
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true); int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
} }
myLineEditCurArg->setText( aString ); myLineEditCurArg->setText( aString );
} }

View File

@ -57,8 +57,8 @@ private:
void toModel( Material_Model& ) const; void toModel( Material_Model& ) const;
void fromModel( const Material_Model& ); void fromModel( const Material_Model& );
QString findUniqueName( const QString&, QString findUniqueName( const QString&,
QListWidgetItem* = 0, QListWidgetItem* = 0,
bool = false ); bool = false );
signals: signals:
void changed(); void changed();

View File

@ -193,26 +193,26 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(_PTR(Study) theStudy, S
QString targetEntry = aParrent->entry(); QString targetEntry = aParrent->entry();
if( !(aResult = myEntryToItem.value(targetEntry)) ) { if( !(aResult = myEntryToItem.value(targetEntry)) ) {
if( aParrent != myGeomRoot ) { if( aParrent != myGeomRoot ) {
QString aName; QString aName;
_PTR(SObject) aSO ( theStudy->FindObjectID(qPrintable(aParrent->entry()))); _PTR(SObject) aSO ( theStudy->FindObjectID(qPrintable(aParrent->entry())));
_PTR(GenericAttribute) anAttr; _PTR(GenericAttribute) anAttr;
if ( aSO->FindAttribute(anAttr, "AttributeName") ) { if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) anAttrName (anAttr); _PTR(AttributeName) anAttrName (anAttr);
aName = anAttrName->Value().c_str(); aName = anAttrName->Value().c_str();
} }
theList.push_front(qMakePair(targetEntry, aName)); theList.push_front(qMakePair(targetEntry, aName));
aResult = findParentItem(theStudy,aParrent,theList); aResult = findParentItem(theStudy,aParrent,theList);
} else { } else {
//Publish List //Publish List
for(int i = 0; i < theList.size(); i++ ) { for(int i = 0; i < theList.size(); i++ ) {
aResult = createItem(aResult, theList[i], false); aResult = createItem(aResult, theList[i], false);
} }
theList.clear(); theList.clear();
} }
} else { } else {
//Publish List //Publish List
for(int i = 0; i < theList.size(); i++ ) { for(int i = 0; i < theList.size(); i++ ) {
aResult = createItem(aResult, theList[i], false); aResult = createItem(aResult, theList[i], false);
} }
theList.clear(); theList.clear();
} }
@ -242,8 +242,8 @@ void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObje
if(!isDrawable) { if(!isDrawable) {
QString aName; QString aName;
if ( SO->FindAttribute(anAttr, "AttributeName") ) { if ( SO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) aAttrName (anAttr); _PTR(AttributeName) aAttrName (anAttr);
aName = aAttrName->Value().c_str(); aName = aAttrName->Value().c_str();
} }
BufferedList aList; BufferedList aList;
QTreeWidgetItem* parentItem = findParentItem(theStudy, theItem, aList); QTreeWidgetItem* parentItem = findParentItem(theStudy, theItem, aList);
@ -291,12 +291,12 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() {
aDrw->SetDrawable( true ); aDrw->SetDrawable( true );
//Remove or change item //Remove or change item
if( item != myTreeWidget->invisibleRootItem() ){ if( item != myTreeWidget->invisibleRootItem() ){
if( item->data(0,Qt::UserRole).toBool() ) { if( item->data(0,Qt::UserRole).toBool() ) {
delete item; delete item;
} else { } else {
item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable); item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable);
item->setData(0,Qt::CheckStateRole,QVariant()); item->setData(0,Qt::CheckStateRole,QVariant());
} }
} }
} }
} }

View File

@ -317,7 +317,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
if ( !aisShape.IsNull() ) { if ( !aisShape.IsNull() ) {
ic->SetTransparency( aisShape, newValue, false ); ic->SetTransparency( aisShape, newValue, false );
ic->Redisplay( aisShape, Standard_False, Standard_True ); ic->Redisplay( aisShape, Standard_False, Standard_True );
aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), GEOM::propertyName( GEOM::Transparency ) , newValue ); aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), GEOM::propertyName( GEOM::Transparency ) , newValue );
} }
} // for... } // for...
ic->UpdateCurrentViewer(); ic->UpdateCurrentViewer();

View File

@ -100,7 +100,7 @@ void GEOM_Swig::init()
// update Object browser // update Object browser
if ( dynamic_cast<SalomeApp_Application*>( app ) ) if ( dynamic_cast<SalomeApp_Application*>( app ) )
dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true ); dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true );
} }
}; };
@ -157,11 +157,11 @@ void GEOM_Swig::createAndDisplayFitAllGO( const char* theEntry )
{ {
SUIT_Application* app = SUIT_Session::session()->activeApplication(); SUIT_Application* app = SUIT_Session::session()->activeApplication();
if ( app ) { if ( app ) {
SUIT_ViewWindow* window = app->desktop()->activeWindow(); SUIT_ViewWindow* window = app->desktop()->activeWindow();
if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
dynamic_cast<SVTK_ViewWindow*>( window )->onFitAll(); dynamic_cast<SVTK_ViewWindow*>( window )->onFitAll();
else if ( dynamic_cast<OCCViewer_ViewFrame*>( window ) ) else if ( dynamic_cast<OCCViewer_ViewFrame*>( window ) )
dynamic_cast<OCCViewer_ViewFrame*>( window )->onViewFitAll(); dynamic_cast<OCCViewer_ViewFrame*>( window )->onViewFitAll();
} }
} }
}; };
@ -308,9 +308,9 @@ const char* GEOM_Swig::getShapeTypeIcon( const char* theIOR )
if ( !CORBA::is_nil( anObject ) ) { if ( !CORBA::is_nil( anObject ) ) {
GEOM::GEOM_Object_var aShape = GEOM::GEOM_Object::_narrow( anObject.in() ); GEOM::GEOM_Object_var aShape = GEOM::GEOM_Object::_narrow( anObject.in() );
if ( !CORBA::is_nil( aShape ) ) { if ( !CORBA::is_nil( aShape ) ) {
GEOM::shape_type aType = aShape->GetShapeType(); GEOM::shape_type aType = aShape->GetShapeType();
if ( aType >= GEOM::COMPOUND && aType < GEOM::SHAPE ) if ( aType >= GEOM::COMPOUND && aType < GEOM::SHAPE )
anIcon = icons[ (int)aType ]; anIcon = icons[ (int)aType ];
} }
} }
} }
@ -329,16 +329,16 @@ class TSetPropertyEvent: public SALOME_Event
public: public:
TSetPropertyEvent( const QString& _entry, TSetPropertyEvent( const QString& _entry,
const QString& _property, const QString& _property,
const QVariant& _value, const QVariant& _value,
bool _update = true ); bool _update = true );
virtual void Execute(); virtual void Execute();
}; };
TSetPropertyEvent::TSetPropertyEvent( const QString& _entry, TSetPropertyEvent::TSetPropertyEvent( const QString& _entry,
const QString& _property, const QString& _property,
const QVariant& _value, const QVariant& _value,
bool _update ): bool _update ):
myEntry( _entry ), myEntry( _entry ),
myProperty( _property ), myProperty( _property ),
myValue( _value ), myValue( _value ),
@ -376,7 +376,7 @@ void TSetPropertyEvent::Execute()
void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer ) void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::DisplayMode ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::DisplayMode ),
theMode, theUpdateViewer ) ); theMode, theUpdateViewer ) );
} }
/*! /*!
@ -388,7 +388,7 @@ void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdat
void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer ) void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::EdgesDirection ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::EdgesDirection ),
theOn, theUpdateViewer ) ); theOn, theUpdateViewer ) );
} }
/*! /*!
@ -402,7 +402,7 @@ void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdate
void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer ) void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Color ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Color ),
QColor( theRed, theGreen, theBlue ), theUpdateViewer ) ); QColor( theRed, theGreen, theBlue ), theUpdateViewer ) );
} }
/*! /*!
@ -415,8 +415,8 @@ void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int th
void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer ) void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::NbIsos ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::NbIsos ),
QString( "%1%2%3" ).arg( theNbU ).arg( GEOM::subSectionSeparator() ).arg( theNbV ), QString( "%1%2%3" ).arg( theNbU ).arg( GEOM::subSectionSeparator() ).arg( theNbV ),
theUpdateViewer ) ); theUpdateViewer ) );
} }
/*! /*!
@ -428,7 +428,7 @@ void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theU
void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer ) void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Transparency ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Transparency ),
theTransparency, theUpdateViewer ) ); theTransparency, theUpdateViewer ) );
} }
/*! /*!
@ -440,7 +440,7 @@ void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bo
void GEOM_Swig::setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer ) void GEOM_Swig::setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Deflection ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Deflection ),
theDeflection, theUpdateViewer ) ); theDeflection, theUpdateViewer ) );
} }
/*! /*!
@ -454,7 +454,7 @@ void GEOM_Swig::setMaterial( const char* theEntry, const char* theMaterial, bool
Material_Model material; Material_Model material;
material.fromResources( theMaterial ); material.fromResources( theMaterial );
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ),
material.toProperties(), theUpdateViewer ) ); material.toProperties(), theUpdateViewer ) );
} }
/*! /*!
@ -466,7 +466,7 @@ void GEOM_Swig::setMaterial( const char* theEntry, const char* theMaterial, bool
void GEOM_Swig::setMaterialProperty( const char* theEntry, const char* theMaterial, bool theUpdateViewer ) void GEOM_Swig::setMaterialProperty( const char* theEntry, const char* theMaterial, bool theUpdateViewer )
{ {
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ), ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ),
theMaterial, theUpdateViewer ) ); theMaterial, theUpdateViewer ) );
} }
class TInitGeomGenEvent: public SALOME_Event class TInitGeomGenEvent: public SALOME_Event

View File

@ -245,7 +245,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
GEOM::shape_type maxallowed = getConstructorId() == 1 ? GEOM::FACE : GEOM::SHELL; GEOM::shape_type maxallowed = getConstructorId() == 1 ? GEOM::FACE : GEOM::SHELL;
GEOM::shape_type minallowed = getConstructorId() == 1 ? GEOM::EDGE : GEOM::VERTEX; GEOM::shape_type minallowed = getConstructorId() == 1 ? GEOM::EDGE : GEOM::VERTEX;
if ( stype < maxallowed || stype > minallowed ) if ( stype < maxallowed || stype > minallowed )
continue; continue;
myBaseObjects << objects[i]; myBaseObjects << objects[i];
} }
if ( !myBaseObjects.isEmpty() ) { if ( !myBaseObjects.isEmpty() ) {
@ -261,9 +261,9 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myPath.get() ); QString aName = GEOMBase::GetName( myPath.get() );
myEditCurrentArgument->setText( aName ); myEditCurrentArgument->setText( aName );
if ( getConstructorId() == 1 && !myVec ) if ( getConstructorId() == 1 && !myVec )
GroupPoints->PushButton3->click(); GroupPoints->PushButton3->click();
else if ( myBaseObjects.isEmpty() ) else if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click(); GroupPoints->PushButton1->click();
} }
} }
else if (myEditCurrentArgument == GroupPoints->LineEdit3) { else if (myEditCurrentArgument == GroupPoints->LineEdit3) {
@ -272,9 +272,9 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myVec.get() ); QString aName = GEOMBase::GetName( myVec.get() );
myEditCurrentArgument->setText( aName ); myEditCurrentArgument->setText( aName );
if ( myBaseObjects.isEmpty() ) if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click(); GroupPoints->PushButton1->click();
else if ( !myPath ) else if ( !myPath )
GroupPoints->PushButton2->click(); GroupPoints->PushButton2->click();
} }
} }

View File

@ -203,9 +203,9 @@ void GenerationGUI_PipePathDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName(myShape.get()); QString aName = GEOMBase::GetName(myShape.get());
myEditCurrentArgument->setText(aName); myEditCurrentArgument->setText(aName);
if (myBase1Objects.isEmpty()) if (myBase1Objects.isEmpty())
GroupPoints->PushButton2->click(); GroupPoints->PushButton2->click();
else if (myBase2Objects.isEmpty()) else if (myBase2Objects.isEmpty())
GroupPoints->PushButton3->click(); GroupPoints->PushButton3->click();
} }
} }
else if (myEditCurrentArgument == GroupPoints->LineEdit2) { else if (myEditCurrentArgument == GroupPoints->LineEdit2) {

View File

@ -195,7 +195,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
for ( int i = 0; i < objects.count(); i++ ) { for ( int i = 0; i < objects.count(); i++ ) {
GEOM::shape_type stype = objects[i]->GetMaxShapeType(); GEOM::shape_type stype = objects[i]->GetMaxShapeType();
if ( stype < GEOM::SHELL || stype > GEOM::VERTEX ) if ( stype < GEOM::SHELL || stype > GEOM::VERTEX )
continue; continue;
myBaseObjects << objects[i]; myBaseObjects << objects[i];
} }
if ( !myBaseObjects.isEmpty() ) { if ( !myBaseObjects.isEmpty() ) {
@ -209,7 +209,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myAxis.get() ); QString aName = GEOMBase::GetName( myAxis.get() );
myEditCurrentArgument->setText( aName ); myEditCurrentArgument->setText( aName );
if ( myBaseObjects.isEmpty() ) if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click(); GroupPoints->PushButton1->click();
} }
} }
processPreview(); processPreview();

View File

@ -425,10 +425,12 @@ double Material_Model::reflection( ReflectionType type, bool theIsFront ) const
{ {
double value = 0.0; double value = 0.0;
if ( type >= 0 && type < 4 ) if ( type >= 0 && type < 4 )
{
if ( theIsFront ) if ( theIsFront )
value = myReflection[ type ].front_coef; value = myReflection[ type ].front_coef;
else else
value = myReflection[ type ].back_coef; value = myReflection[ type ].back_coef;
}
return value; return value;
} }
@ -442,10 +444,12 @@ double Material_Model::reflection( ReflectionType type, bool theIsFront ) const
void Material_Model::setReflection( ReflectionType type, double value, bool theIsFront ) void Material_Model::setReflection( ReflectionType type, double value, bool theIsFront )
{ {
if ( type >= 0 && type < 4 ) if ( type >= 0 && type < 4 )
{
if ( theIsFront ) if ( theIsFront )
myReflection[ type ].front_coef = value; myReflection[ type ].front_coef = value;
else else
myReflection[ type ].back_coef = value; myReflection[ type ].back_coef = value;
}
} }
/*! /*!

View File

@ -178,7 +178,7 @@ void Material_ResourceMgr::watchUserFile( bool on )
myWatcher = new QFileSystemWatcher( this ); myWatcher = new QFileSystemWatcher( this );
QFileInfo ufile = userFileName( appName() ); QFileInfo ufile = userFileName( appName() );
if ( ufile.exists() ) { if ( ufile.exists() ) {
myWatcher->addPath( ufile.filePath() ); myWatcher->addPath( ufile.filePath() );
} }
connect( myWatcher, SIGNAL( fileChanged( QString ) ), this, SLOT( update() ) ); connect( myWatcher, SIGNAL( fileChanged( QString ) ), this, SLOT( update() ) );
} }

View File

@ -381,11 +381,11 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
anIO->SetArrowSize(arrowSize); anIO->SetArrowSize(arrowSize);
} }
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int w = resMgr->integerValue("Geometry", "measures_line_width", 1); int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
Handle(Prs3d_AngleAspect) asp = new Prs3d_AngleAspect(); Handle(Prs3d_AngleAspect) asp = new Prs3d_AngleAspect();
asp->LineAspect()->SetWidth(w); asp->LineAspect()->SetWidth(w);
anIO->Attributes()->SetAngleAspect(asp); anIO->Attributes()->SetAngleAspect(asp);
SOCC_Prs* aPrs = SOCC_Prs* aPrs =
dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0)); dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));

View File

@ -371,7 +371,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged()
TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] ); TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] );
QString aType = GEOMBase::GetShapeTypeString( aSubShape ); QString aType = GEOMBase::GetShapeTypeString( aSubShape );
if ( !aType.isEmpty() ) if ( !aType.isEmpty() )
aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) ); aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
} }
} }
myGrp->ListBox2->clear(); myGrp->ListBox2->clear();

View File

@ -595,8 +595,8 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
{ {
QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() ); QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() );
aKindStr = tr( strid.toLatin1().constData() ) == strid ? aKindStr = tr( strid.toLatin1().constData() ) == strid ?
tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) : tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
tr( strid.toLatin1().constData() ); tr( strid.toLatin1().constData() );
break; break;
} }
default: default:

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphere.cxx // File: NMTDS_BndSphere.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
// //
#include <NMTDS_BndSphere.hxx> #include <NMTDS_BndSphere.hxx>

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphere.hxx // File: NMTDS_BndSphere.hxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
#ifndef _NMTDS_BndSphere_HeaderFile #ifndef _NMTDS_BndSphere_HeaderFile
#define _NMTDS_BndSphere_HeaderFile #define _NMTDS_BndSphere_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphere.lxx // File: NMTDS_BndSphere.lxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
//======================================================================= //=======================================================================
//function : SetCenter //function : SetCenter
//purpose : //purpose :

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphereTree.cxx // File: NMTDS_BndSphereTree.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
// //
#include <NMTDS_BndSphereTree.hxx> #include <NMTDS_BndSphereTree.hxx>
//======================================================================= //=======================================================================

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphereTree.hxx // File: NMTDS_BndSphereTree.hxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
// //
#ifndef NMTDS_BndSphereTree_HeaderFile #ifndef NMTDS_BndSphereTree_HeaderFile
#define NMTDS_BndSphereTree_HeaderFile #define NMTDS_BndSphereTree_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_CArray1OfIndexRange.hxx // File: NMTDS_CArray1OfIndexRange.hxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
#include <NMTDS_CArray1OfIndexRange.hxx> #include <NMTDS_CArray1OfIndexRange.hxx>

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_BndSphere.hxx // File: NMTDS_BndSphere.hxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile #ifndef _NMTDS_CArray1OfIndexRange_HeaderFile
#define _NMTDS_CArray1OfIndexRange_HeaderFile #define _NMTDS_CArray1OfIndexRange_HeaderFile
@ -46,7 +46,7 @@ class NMTDS_CArray1OfIndexRange {
Standard_EXPORT Standard_EXPORT
NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0, NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,
const Standard_Integer BlockLength = 5); const Standard_Integer BlockLength = 5);
Standard_EXPORT Standard_EXPORT
void Resize(const Standard_Integer theNewLength) ; void Resize(const Standard_Integer theNewLength) ;

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx // File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:31:43 2012 // Created: Mon Feb 20 09:31:43 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile #ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_DataMapOfIntegerMapOfInteger.hxx // File: NMTDS_DataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:27:40 2012 // Created: Mon Feb 20 09:27:40 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile #ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile

View File

@ -16,10 +16,10 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_IndexedDataMapOfIntegerShape.hxx // File: NMTDS_IndexedDataMapOfIntegerShape.hxx
// Created: Mon Feb 20 09:20:07 2012 // Created: Mon Feb 20 09:20:07 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile #ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx // File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx
// Created: Mon Feb 20 09:17:01 2012 // Created: Mon Feb 20 09:17:01 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile #ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_IndexedDataMapOfShapeBox.hxx // File: NMTDS_IndexedDataMapOfShapeBox.hxx
// Created: Mon Feb 20 09:17:01 2012 // Created: Mon Feb 20 09:17:01 2012
// Author: // Author:
// <pkv@BDEURI37616> // <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile #ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile

View File

@ -52,7 +52,7 @@ NMTDS_InterfPool::NMTDS_InterfPool()
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB, Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
const NMTDS_InterfType aType) const NMTDS_InterfType aType)
{ {
Standard_Boolean bRet; Standard_Boolean bRet;
Standard_Integer iType; Standard_Integer iType;
@ -70,8 +70,8 @@ Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1, Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
const Standard_Integer aInd2, const Standard_Integer aInd2,
const NMTDS_InterfType aType) const NMTDS_InterfType aType)
{ {
NMTDS_PairBoolean aPKB; NMTDS_PairBoolean aPKB;
// //
@ -83,9 +83,9 @@ Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1, Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
const Standard_Integer aInd2, const Standard_Integer aInd2,
const Standard_Boolean bFlag, const Standard_Boolean bFlag,
const NMTDS_InterfType aType) const NMTDS_InterfType aType)
{ {
NMTDS_PairBoolean aPKB; NMTDS_PairBoolean aPKB;
// //

View File

@ -53,25 +53,25 @@ class NMTDS_InterfPool {
Standard_EXPORT Standard_EXPORT
Standard_Boolean Add(const NMTDS_PairBoolean& aPKB, Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,
const NMTDS_InterfType aType) ; const NMTDS_InterfType aType) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean Add(const Standard_Integer aInd1, Standard_Boolean Add(const Standard_Integer aInd1,
const Standard_Integer aInd2, const Standard_Integer aInd2,
const NMTDS_InterfType aType) ; const NMTDS_InterfType aType) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean Add(const Standard_Integer aInd1, Standard_Boolean Add(const Standard_Integer aInd1,
const Standard_Integer aInd2, const Standard_Integer aInd2,
const Standard_Boolean bFlag, const Standard_Boolean bFlag,
const NMTDS_InterfType aType) ; const NMTDS_InterfType aType) ;
Standard_EXPORT Standard_EXPORT
Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const; Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;
Standard_EXPORT Standard_EXPORT
Standard_Boolean Contains(const Standard_Integer aInd1, Standard_Boolean Contains(const Standard_Integer aInd1,
const Standard_Integer aInd2) const; const Standard_Integer aInd2) const;
Standard_EXPORT Standard_EXPORT
const NMTDS_ListOfPairBoolean& Get() const; const NMTDS_ListOfPairBoolean& Get() const;
@ -84,7 +84,7 @@ class NMTDS_InterfPool {
Standard_EXPORT Standard_EXPORT
const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd, const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,
const NMTDS_InterfType aType) const; const NMTDS_InterfType aType) const;
//! Returns the reference to array Of F/F interferences <br> //! Returns the reference to array Of F/F interferences <br>
Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ; Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ;

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: NMTDS_InterfType.hxx // File: NMTDS_InterfType.hxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
// <pkv@irinox> // <pkv@irinox>
#ifndef _NMTDS_InterfType_HeaderFile #ifndef _NMTDS_InterfType_HeaderFile

View File

@ -125,7 +125,7 @@ Standard_Integer NMTDS_Iterator::BlockLength() const
// purpose: // purpose:
//======================================================================= //=======================================================================
void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1, void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2) const TopAbs_ShapeEnum aType2)
{ {
Standard_Integer iX; Standard_Integer iX;
// //
@ -160,8 +160,8 @@ void NMTDS_Iterator::Next()
// purpose: // purpose:
//======================================================================= //=======================================================================
void NMTDS_Iterator::Current(Standard_Integer& aIndex1, void NMTDS_Iterator::Current(Standard_Integer& aIndex1,
Standard_Integer& aIndex2, Standard_Integer& aIndex2,
Standard_Boolean& aWithSubShape) const Standard_Boolean& aWithSubShape) const
{ {
const NMTDS_PairBoolean& aPKB=myIterator.Value(); const NMTDS_PairBoolean& aPKB=myIterator.Value();
aPKB.Ids(aIndex1, aIndex2); aPKB.Ids(aIndex1, aIndex2);
@ -323,11 +323,11 @@ void NMTDS_Iterator::Intersect()
aMPKXB.Remove(aPKXB); aMPKXB.Remove(aPKXB);
} }
} }
// //
aNbLV1=aLV1.Extent(); aNbLV1=aLV1.Extent();
if (aNbLV1) { if (aNbLV1) {
aMVSD.Bind(i, aLV1); aMVSD.Bind(i, aLV1);
} }
} }
}//for (i=i1; i<=i2; ++i) { }//for (i=i1; i<=i2; ++i) {
}//for (iR=1; iR<aNbR; ++iR) { }//for (iR=1; iR<aNbR; ++iR) {
@ -348,7 +348,7 @@ void NMTDS_Iterator::Intersect()
//purpose : //purpose :
//======================================================================= //=======================================================================
void NMTDS_Iterator::FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD, void NMTDS_Iterator::FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD,
TColStd_DataMapOfIntegerListOfInteger& bMVSD) TColStd_DataMapOfIntegerListOfInteger& bMVSD)
{ {
Standard_Boolean bFound; Standard_Boolean bFound;
Standard_Integer aNbVSD, iCnt, i, j, k; Standard_Integer aNbVSD, iCnt, i, j, k;

Some files were not shown because too many files have changed in this diff Show More