bos #16247: EDF - Problem of partition

This commit is contained in:
jfa 2020-08-12 13:52:36 +03:00
parent fde5bbfe1c
commit 95c850c1c0
2 changed files with 15 additions and 5 deletions

View 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) {

View 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,7 +121,11 @@ 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();