returns Boolean from Standard;
---Purpose: Returns true if the solid <theFace> has
-- infinite bounds
+
+ SetPOnSProjectionTolerance(me:mutable; theValue: Real from Standard);
+ ---Purpose: Sets tolerance to be used for projection of point on surface.
+ -- Clears map of already cached projectors in order to maintain
+ -- correct value for all projectors
+
+ clearCachedPOnSProjectors(me: mutable)
+ is private;
+ ---Purpose: Clears map of already cached projectors.
fields
myAllocator : BaseAllocator from BOPCol is protected;
myProjSDataMap:DataMapOfShapeAddress from BOPCol is protected;
myBndBoxDataMap:DataMapOfShapeAddress from BOPCol is protected;
myCreateFlag :Integer from Standard is protected;
+ myPOnSTolerance :Real from Standard is protected;
end Context;
myHatcherMap(100, myAllocator),
myProjSDataMap(100, myAllocator),
myBndBoxDataMap(100, myAllocator),
- myCreateFlag(0)
+ myCreateFlag(0),
+ myPOnSTolerance(1.e-12)
{
}
//=======================================================================
myHatcherMap(100, myAllocator),
myProjSDataMap(100, myAllocator),
myBndBoxDataMap(100, myAllocator),
- myCreateFlag(1)
+ myCreateFlag(1),
+ myPOnSTolerance(1.e-12)
{
}
//=======================================================================
}
myFClass2dMap.Clear();
//
- GeomAPI_ProjectPointOnSurf* pProjPS;
- aIt.Initialize(myProjPSMap);
- for (; aIt.More(); aIt.Next()) {
- anAdr=aIt.Value();
- pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
- (*pProjPS).~GeomAPI_ProjectPointOnSurf();
- myAllocator->Free(anAdr);
- }
- myProjPSMap.Clear();
+ clearCachedPOnSProjectors();
//
GeomAPI_ProjectPointOnCurve* pProjPC;
aIt.Initialize(myProjPCMap);
GeomAPI_ProjectPointOnSurf* pProjPS;
if (!myProjPSMap.IsBound(aF)) {
- Standard_Real Umin, Usup, Vmin, Vsup, anEpsT=1.e-12 ;
+ Standard_Real Umin, Usup, Vmin, Vsup;
BRepAdaptor_Surface aBAS;
//
const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF);
//
pProjPS=(GeomAPI_ProjectPointOnSurf*)myAllocator->Allocate(sizeof(GeomAPI_ProjectPointOnSurf));
new (pProjPS) GeomAPI_ProjectPointOnSurf();
- pProjPS->Init(aS ,Umin, Usup, Vmin, Vsup, anEpsT/*, Extrema_ExtAlgo_Tree*/);
+ pProjPS->Init(aS ,Umin, Usup, Vmin, Vsup, myPOnSTolerance/*, Extrema_ExtAlgo_Tree*/);
Extrema_ExtPS& anExtAlgo = const_cast<Extrema_ExtPS&>(pProjPS->Extrema());
anExtAlgo.SetFlag(Extrema_ExtFlag_MIN);
//
return Standard_False;
}
+//=======================================================================
+//function : SetPOnSProjectionTolerance
+//purpose :
+//=======================================================================
+void IntTools_Context::SetPOnSProjectionTolerance(const Standard_Real theValue)
+{
+ myPOnSTolerance = theValue;
+ clearCachedPOnSProjectors();
+}
+
+//=======================================================================
+//function : clearCachedPOnSProjectors
+//purpose :
+//=======================================================================
+void IntTools_Context::clearCachedPOnSProjectors()
+{
+ GeomAPI_ProjectPointOnSurf* pProjPS;
+ BOPCol_DataMapIteratorOfDataMapOfShapeAddress aIt(myProjPSMap);
+ for (; aIt.More(); aIt.Next()) {
+ Standard_Address anAdr=aIt.Value();
+ pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
+ (*pProjPS).~GeomAPI_ProjectPointOnSurf();
+ myAllocator->Free(anAdr);
+ }
+ myProjPSMap.Clear();
+}