PAL10015. Add virtual GetPointState()

This commit is contained in:
eap 2005-11-01 13:24:14 +00:00
parent 98de978f52
commit 4bbe364fed
3 changed files with 21 additions and 3 deletions

View File

@ -15,6 +15,7 @@ uses
Surface from GeomAdaptor, Surface from GeomAdaptor,
ShapeEnum from TopAbs, ShapeEnum from TopAbs,
State from TopAbs,
Face from TopoDS, Face from TopoDS,
Edge from TopoDS, Edge from TopoDS,
ListOfShape from TopTools, ListOfShape from TopTools,
@ -105,6 +106,9 @@ is
returns IndexedDataMapOfShapeState from GEOMAlgo; returns IndexedDataMapOfShapeState from GEOMAlgo;
---C++:return const & ---C++:return const &
GetPointState(me:out; aP: Pnt from gp)
returns State from TopAbs is virtual protected;
fields fields
mySurface : Surface from Geom is protected; mySurface : Surface from Geom is protected;
myShapeType : ShapeEnum from TopAbs is protected; myShapeType : ShapeEnum from TopAbs is protected;

View File

@ -252,7 +252,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices()
const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i)); const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i));
aP=BRep_Tool::Pnt(aV); aP=BRep_Tool::Pnt(aV);
// //
GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); aSt = GetPointState( aP );
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
// //
if (myShapeType==TopAbs_VERTEX){ if (myShapeType==TopAbs_VERTEX){
@ -344,7 +344,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
} }
// //
const gp_Pnt& aP=aIt.Value(); const gp_Pnt& aP=aIt.Value();
GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); aSt = GetPointState( aP );
bIsToBreak=aSC.AppendState(aSt); bIsToBreak=aSC.AppendState(aSt);
if (bIsToBreak) { if (bIsToBreak) {
break; break;
@ -434,7 +434,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
} }
// //
const gp_Pnt& aP=aIt.Value(); const gp_Pnt& aP=aIt.Value();
GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); aSt = GetPointState( aP );
bIsToBreak=aSC.AppendState(aSt); bIsToBreak=aSC.AppendState(aSt);
if (bIsToBreak) { if (bIsToBreak) {
break; break;
@ -755,6 +755,19 @@ void GEOMAlgo_FinderShapeOn1::CheckData()
} }
} }
//=======================================================================
//function : GetPointState
//purpose :
//=======================================================================
TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP)
{
TopAbs_State aSt;
GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt);
return aSt;
}
// //
// myErrorStatus : // myErrorStatus :
// //

View File

@ -111,6 +111,7 @@ Standard_EXPORT void ProcessSolids() ;
Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ; Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ; Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ; Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
// Fields PROTECTED // Fields PROTECTED