Salome HOME
refs #1330: basic implementation of the not zoomable polyline arrows
[modules/hydro.git] / src / HYDROData / HYDROData_Region.cxx
index 226e0e46c550d8f5bdc9927b47d84aebdc7e01ab..f4b58faaef1f05900f5faacd1cb1fa7a1a997576 100644 (file)
 #include <QStringList>
 #include <QColor>
 
-#include "Handle_Geom_Plane.hxx"
 #include "Geom_Plane.hxx"
 #include "gp_Pln.hxx"
 #include "BRepTools_ReShape.hxx"
 
 //#define DEB_GET_REGION_SHAPE
 
-IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity)
 
 
@@ -246,7 +244,6 @@ void getUsedGroups( const TopoDS_Shape&                     theShape,
 }
 
 
-
 TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups, const TopTools_SequenceOfShape* IntSh ) const
 {
   HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfGroups;
@@ -365,6 +362,8 @@ TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs*
     HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Fused face edges:", aFuseShape, TopAbs_EDGE );
 #endif
 
+    aFuseShape = HYDROData_Tool::RebuildCmp(aFuseShape);
+
     BRep_Builder BB;
     TopoDS_Face DF;
     if (!IE.IsEmpty())
@@ -374,7 +373,7 @@ TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs*
       //USD algo will skip such edges and will not perform unifying through them 
       //(more than 2 faces are connected to one edge + non same domain surfaces)
       TopoDS_Wire DW;
-      Handle_Geom_Plane DPl = new Geom_Plane(gp_Pln (gp_Pnt(0,0,0), gp_Dir(0,1,0))); //non same domain with the main surf
+      Handle(Geom_Plane) DPl = new Geom_Plane(gp_Pln (gp_Pnt(0,0,0), gp_Dir(0,1,0))); //non same domain with the main surf
       BB.MakeFace(DF, DPl, Precision::Confusion());
       BB.MakeWire(DW);
       for (int i = 1; i <= IE.Extent(); i++)
@@ -383,7 +382,7 @@ TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs*
       BB.Add(aFuseShape, DF);
     }
 
-    ShapeUpgrade_UnifySameDomain unif( aFuseShape );
+    ShapeUpgrade_UnifySameDomain unif( aFuseShape, Standard_False, Standard_True, Standard_False );
     unif.Build();
     TopoDS_Shape anUnitedShape;
     const TopoDS_Shape& out = unif.Shape();