]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
bos #16247: EDF - Problem of partition
authorjfa <jfa@opencascade.com>
Wed, 12 Aug 2020 10:52:36 +0000 (13:52 +0300)
committerjfa <jfa@opencascade.com>
Wed, 12 Aug 2020 10:52:36 +0000 (13:52 +0300)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx
src/GEOMImpl/GEOMImpl_VectorDriver.cxx

index c459ed6274c6805f99c023708f964b4a603d9db0..a2bcdd27a611616d768d6b4560dc2324f393a1f7 100644 (file)
@@ -1677,9 +1677,10 @@ TopoDS_Shape GEOMImpl_ShapeDriver::MakeIsoline
   Handle(Geom_Surface) aSurface   = BRep_Tool::Surface(theFace);
   Handle(Geom_Curve)   anIsoCurve = (IsUIso ?
     aSurface->UIso(theParameter) : aSurface->VIso(theParameter));
-  Handle(Geom2d_Curve) aPIsoCurve =
-    aHatcher.GetHatching(aHatchingIndex);
-  const Standard_Real  aTol = Precision::Confusion();
+  Handle(Geom2d_Curve) aPIsoCurve = aHatcher.GetHatching(aHatchingIndex);
+
+  Standard_Real aTol = BRep_Tool::MaxTolerance(theFace, TopAbs_EDGE);
+
   Standard_Integer     anIDom = 1;
   Standard_Real        aV1;
   Standard_Real        aV2;
@@ -1695,6 +1696,10 @@ TopoDS_Shape GEOMImpl_ShapeDriver::MakeIsoline
 
         // Update it with a parametric curve on face.
         aBuilder.UpdateEdge(anEdge, aPIsoCurve, theFace, aTol);
+        for (TopExp_Explorer ExV (anEdge, TopAbs_VERTEX); ExV.More(); ExV.Next()) {
+          TopoDS_Vertex V = TopoDS::Vertex(ExV.Current());
+          aBuilder.UpdateVertex(V, aTol);
+        }
         aNbEdges++;
 
         if (aNbEdges > 1) {
index fcd648aef4eb6609e65338e888c7bdeda5ce211a..52152f0fc2fa12ba4e93ed60627605f8999b33d6 100644 (file)
@@ -28,6 +28,7 @@
 #include "GEOM_Object.hxx"
 
 #include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Curve.hxx>
 #include <Precision.hxx>
@@ -120,8 +121,12 @@ Standard_Integer GEOMImpl_VectorDriver::Execute(Handle(TFunction_Logbook)& log)
     if (P1.Distance(P2) < Precision::Confusion()) {
       Standard_ConstructionError::Raise("The end points are too close");
     }
-    aShape = BRepBuilderAPI_MakeEdge(V1, V2).Shape();
-  } 
+    TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(V1, V2);
+    Standard_Real aTol = Max(BRep_Tool::Tolerance(V1), BRep_Tool::Tolerance(V2));
+    BRep_Builder aBuilder;
+    aBuilder.UpdateEdge(anEdge, aTol);
+    aShape = anEdge;
+  }
   else if (aType == VECTOR_TANGENT_CURVE_PAR) {
     Handle(GEOM_Function) aRefCurve = aPI.GetCurve();
     TopoDS_Shape aRefShape = aRefCurve->GetValue();