X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_DFLoader.cpp;h=61e28412aab9d44a70420e17db223e8cee585566;hb=b2a662eec6a0258d51a67ee7e341541e7a710752;hp=d309de4a26e573d85a930dae7f92738f839161bf;hpb=9eb5801ea57b763b26db2c7bf897a50b34e2cc31;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_DFLoader.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_DFLoader.cpp index d309de4a2..61e28412a 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_DFLoader.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_DFLoader.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAlgoAPI_DFLoader.cpp // Created: 23 October 2014 // Author: Sergey Zaritchny @@ -21,83 +23,10 @@ const TopoDS_Shape GeomAlgoAPI_DFLoader::refineResult(const TopoDS_Shape& theRe if (nbSubResults == 1) { itr.Initialize(theResult); if (itr.More()) aResult = itr.Value(); + } else { + /// MPV: store compound anyway: it may be Boolean operation that produces two solids from one + aResult = theResult; } } return aResult; } -/* -//======================================================================= -//function : loadDeletedShapes -//purpose : load deleted shapes in DF -//======================================================================= -void GeomAlgoAPI_DFLoader::loadDeletedShapes (BRepBuilderAPI_MakeShape& theMS, - const TopoDS_Shape& theShapeIn, - const TopAbs_ShapeEnum theKindOfShape, - TNaming_Builder& theBuilder) -{ - TopTools_MapOfShape aView; - TopExp_Explorer ShapeExplorer (theShapeIn, theKindOfShape); - for (; ShapeExplorer.More(); ShapeExplorer.Next ()) { - const TopoDS_Shape& aRoot = ShapeExplorer.Current (); - if (!aView.Add(aRoot)) continue; - if (theMS.IsDeleted (aRoot)) { - theBuilder.Delete (aRoot); - } - } -} - -//======================================================================= -//function : loadAndOrientModifiedShapes -//purpose : load modified shapes in DF with preliminary orientation adjustment -//======================================================================= -void GeomAlgoAPI_DFLoader::loadAndOrientModifiedShapes (BRepBuilderAPI_MakeShape& theMS, - const TopoDS_Shape& theShapeIn, - const TopAbs_ShapeEnum theKindOfShape, - TNaming_Builder& theBuilder, - const TopTools_DataMapOfShapeShape& theSubShapes) -{ - TopTools_MapOfShape aView; - TopExp_Explorer aShapeExplorer (theShapeIn, theKindOfShape); - for (; aShapeExplorer.More(); aShapeExplorer.Next ()) { - const TopoDS_Shape& aRoot = aShapeExplorer.Current (); - if (!aView.Add(aRoot)) continue; - const TopTools_ListOfShape& aShapes = theMS.Modified (aRoot); - TopTools_ListIteratorOfListOfShape aShapesIterator (aShapes); - for (;aShapesIterator.More (); aShapesIterator.Next ()) { - TopoDS_Shape aNewShape = aShapesIterator.Value (); - if (theSubShapes.IsBound(aNewShape)) { - aNewShape.Orientation((theSubShapes(aNewShape)).Orientation()); - } - if (!aRoot.IsSame (aNewShape)) theBuilder.Modify (aRoot, aNewShape ); - } - } -} - -//======================================================================= -//function : loadAndOrientGeneratedShapes -//purpose : load generated shapes in DF with preliminary orientation adjustment -//======================================================================= - -void GeomAlgoAPI_DFLoader::loadAndOrientGeneratedShapes (BRepBuilderAPI_MakeShape& theMS, - const TopoDS_Shape& theShapeIn, - const TopAbs_ShapeEnum theKindOfShape, - TNaming_Builder& theBuilder, - const TopTools_DataMapOfShapeShape& theSubShapes) -{ - TopTools_MapOfShape aView; - TopExp_Explorer aShapeExplorer (theShapeIn, theKindOfShape); - for (; aShapeExplorer.More(); aShapeExplorer.Next ()) { - const TopoDS_Shape& aRoot = aShapeExplorer.Current (); - if (!aView.Add(aRoot)) continue; - const TopTools_ListOfShape& aShapes = theMS.Generated (aRoot); - TopTools_ListIteratorOfListOfShape aShapesIterator (aShapes); - for (;aShapesIterator.More (); aShapesIterator.Next ()) { - TopoDS_Shape aNewShape = aShapesIterator.Value (); - if (theSubShapes.IsBound(aNewShape)) { - aNewShape.Orientation((theSubShapes(aNewShape)).Orientation()); - } - if (!aRoot.IsSame (aNewShape)) theBuilder.Generated (aRoot,aNewShape ); - } - } -} -*/ \ No newline at end of file