#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
//
+#include <GeomAdaptor_Surface.hxx>
+
+//
static
Standard_Boolean FindFacePairs (const TopoDS_Edge& ,
const TopTools_ListOfShape& ,
const gp_Dir& ,
const gp_Dir& );
-//modified by NIZNHY-PKV Tue Jul 14 07:24:10 2009f
static
void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE,
const TopoDS_Face& aF,
gp_Pnt& aPF,
gp_Dir& aDNF,
IntTools_Context& aCtx);
-//modified by NIZNHY-PKV Tue Jul 14 07:24:15 2009t
//=======================================================================
//function : IsInternalFace
// 3
bRet=Standard_False;
//
- //modified by NIZNHY-PKV Tue Jul 14 07:22:38 2009f
GetApproxNormalToFaceOnEdge (aE1, theFace1, aT, aPF1, aDNF1, theContext);
GetApproxNormalToFaceOnEdge (aE2, theFace2, aT, aPF2, aDNF2, theContext);
//BOPTools_Tools3D::GetApproxNormalToFaceOnEdge (aE1, theFace1, aT, aPF1, aDNF1);
//BOPTools_Tools3D::GetApproxNormalToFaceOnEdge (aE2, theFace2, aT, aPF2, aDNF2);
- //modified by NIZNHY-PKV Tue Jul 14 07:22:42 2009t
//
aTwoPI=2.*PI;
gp_Vec aVBF (aPx, aPF );
}
return aBeta;
}
-//modified by NIZNHY-PKV Tue Jul 14 07:49:55 2009f
//=======================================================================
//function : GetApproxNormalToFaceOnEdge
//purpose :
gp_Dir aDTT, aDNFT, aDBT;
gp_Pnt aPFT, aPFx;
Handle(Geom_Curve) aC3D;
+ Handle(Geom_Surface) aS;
+ GeomAdaptor_Surface aGAS;
+ GeomAbs_SurfaceType aTS;
TopoDS_Face aF;
TopoDS_Edge aE;
//
aE.Reverse();
//
aF.Orientation(TopAbs_FORWARD);
- //GEOMAlgo_Tools3D::GetEdgeOnFace(aEx, aF, aE);
}
//
// Point at aT
aDBT=aDNFT^aDTT;
//
dT=BOPTools_Tools3D::MinStepIn2d();//~1.e-5;
+ dT=10.*dT;
+ //----------------------------------------------
+ {
+ aS=BRep_Tool::Surface(aF);
+ aGAS.Load(aS);
+ aTS=aGAS.GetType();
+ if (aTS==GeomAbs_BSplineSurface ||
+ aTS==GeomAbs_BezierSurface ||
+ aTS==GeomAbs_Plane) {//modified by NIZNHY-PKV Fri Dec 4 08:23:24 2009ft
+ Standard_Real aTolEx, aTolFx, aTol, dUR, dVR, dR;
+ //
+ aTolEx=BRep_Tool::Tolerance(aEx);
+ aTolFx=BRep_Tool::Tolerance(aFx);
+ aTol=2.*aTolEx+aTolFx;
+ dUR=aGAS.UResolution(aTol);
+ dVR=aGAS.VResolution(aTol);
+ dR=(dUR>dVR)? dUR : dVR;
+ if (dR>dT) {
+ dT=dR;
+ }
+ }
+ }
+ //----------------------------------------------
+ //
aPFx.SetXYZ(aPFT.XYZ()+dT*aDBT.XYZ());
//
aPF=aPFx;
}
//
GeomAPI_ProjectPointOnSurf& aProjector=aCtx.ProjPS(aF);
+ //
aProjector.Perform(aPFx);
if(aProjector.IsDone()) {
- Handle(Geom_Surface) aS;
- //
aProjector.LowerDistanceParameters (aU, aV);
- aS=BRep_Tool::Surface(aF);
aS->D0(aU, aV, aPF);
BOPTools_Tools3D::GetNormalToSurface (aS, aU, aV, aDNF);
if (bReverse){
}
}
}
-//modified by NIZNHY-PKV Tue Jul 14 07:49:58 2009t