-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_Builder_4.cxx
-// Created:
-// Author: Peter KURNEV
+// File: GEOMAlgo_Builder_4.cxx
+// Created:
+// Author: Peter KURNEV
+//
#include <GEOMAlgo_Builder.hxx>
#include <TopoDS_Iterator.hxx>
static
void MapShapes(const TopoDS_Shape& aS,
- TopTools_MapOfShape& aM);
+ TopTools_MapOfShape& aM);
//=======================================================================
//function : Generated
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp=aIt.Value();
if (mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
- //
- if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- aSpR.Orientation(theS.Orientation());
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
- if (bToReverse) {
- aSpR.Reverse();
- }
- }
- //
- myHistShapes.Append(aSpR);
- }
+ if (myMapShape.Contains(aSp)) {
+ TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
+ //
+ if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
+ aSpR.Orientation(theS.Orientation());
+ }
+ else {
+ bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
+ if (bToReverse) {
+ aSpR.Reverse();
+ }
+ }
+ //
+ myHistShapes.Append(aSpR);
+ }
}
}
}
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape aSp=aIt.Value();
if (!mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- //
- if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- aSp.Orientation(theS.Orientation());
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
- if (bToReverse) {
- aSp.Reverse();
- }
- }
- //
- myHistShapes.Append(aSp);
- }
+ if (myMapShape.Contains(aSp)) {
+ //
+ if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
+ aSp.Orientation(theS.Orientation());
+ }
+ else {
+ bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
+ if (bToReverse) {
+ aSp.Reverse();
+ }
+ }
+ //
+ myHistShapes.Append(aSp);
+ }
}
}
}
TopoDS_Shape aSp=aIt.Value();
//
if (!mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- return bRet; //false
- }
+ if (myMapShape.Contains(aSp)) {
+ return bRet; //false
+ }
}
else {
- TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
- if (myMapShape.Contains(aSpR)) {
- return bRet; //false
- }
+ TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
+ if (myMapShape.Contains(aSpR)) {
+ return bRet; //false
+ }
}
}
}
bHasImage=myImages.HasImage(aSx);
if (!bHasImage) {
if (myMapShape.Contains(aSx)) {
- aLSx.Append(aSx);
- myImagesResult.Add(aSx, aLSx);
+ aLSx.Append(aSx);
+ myImagesResult.Add(aSx, aLSx);
}
}
else {
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- if (myMapShape.Contains(aSp)) {
- aLSx.Append(aSp);
- }
+ const TopoDS_Shape& aSp=aIt.Value();
+ if (myMapShape.Contains(aSp)) {
+ aLSx.Append(aSp);
+ }
}
myImagesResult.Add(aSx, aLSx);
}
//
if (!myHasGenerated || !myHasModified) {
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
- aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
- //bHasImage=myImages.HasImage(aSx);
- //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
- if (bHasImage) {
- const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- //
- if (myMapShape.Contains(aSp)) {
- bContainsSD=mySameDomainShapes.Contains(aSp);
- //
- if (!myHasGenerated) {
- if (bContainsSD) {
- myHasGenerated=Standard_True;
- }
- }
- if (!myHasModified) {
- if (!bContainsSD) {
- myHasModified=Standard_True;
- }
- }
- } // if (myMapShape.Contains(aSp))
- }
- }
+ aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
+ //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
+ //bHasImage=myImages.HasImage(aSx);
+ //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
+ if (bHasImage) {
+ const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
+ aIt.Initialize(aLSp);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aSp=aIt.Value();
+ //
+ if (myMapShape.Contains(aSp)) {
+ bContainsSD=mySameDomainShapes.Contains(aSp);
+ //
+ if (!myHasGenerated) {
+ if (bContainsSD) {
+ myHasGenerated=Standard_True;
+ }
+ }
+ if (!myHasModified) {
+ if (!bContainsSD) {
+ myHasModified=Standard_True;
+ }
+ }
+ } // if (myMapShape.Contains(aSp))
+ }
+ }
}
}
}
//purpose :
//=======================================================================
void MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM)
+ TopTools_MapOfShape& theM)
{
theM.Add(theS);
TopoDS_Iterator anIt;