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;
// 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) {
#include "GEOM_Object.hxx"
#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <Geom_Curve.hxx>
#include <Precision.hxx>
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();