Open CASCADE Technology  7.3.0
Public Member Functions | Protected Member Functions
IntWalk_PWalking Class Reference

This class implements an algorithm to determine the intersection between 2 parametrized surfaces, marching from a starting point. The intersection line starts and ends on the natural surface's boundaries . More...

#include <IntWalk_PWalking.hxx>

Public Member Functions

 IntWalk_PWalking (const Handle< Adaptor3d_HSurface > &Caro1, const Handle< Adaptor3d_HSurface > &Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment)
 Constructor used to set the data to compute intersection lines between Caro1 and Caro2. Deflection is the maximum deflection admitted between two consecutive points on the resulting polyline. TolTangency is the tolerance to find a tangent point. Func is the criterion which has to be evaluated at each solution point (each point of the line). It is necessary to call the Perform method to compute the intersection lines. The line found starts at a point on or in 2 natural domains of surfaces. It can be closed in the standard case if it is open it stops and begins at the border of one of the domains. If an open line stops at the middle of a domain, one stops at the tangent point. Epsilon is SquareTolerance of points confusion. More...
 
 IntWalk_PWalking (const Handle< Adaptor3d_HSurface > &Caro1, const Handle< Adaptor3d_HSurface > &Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2)
 Returns the intersection line containing the exact point Poin. This line is a polygonal line. Deflection is the maximum deflection admitted between two consecutive points on the resulting polyline. TolTangency is the tolerance to find a tangent point. Func is the criterion which has to be evaluated at each solution point (each point of the line). The line found starts at a point on or in 2 natural domains of surfaces. It can be closed in the standard case if it is open it stops and begins at the border of one of the domains. If an open line stops at the middle of a domain, one stops at the tangent point. Epsilon is SquareTolerance of points confusion. More...
 
void Perform (const TColStd_Array1OfReal &ParDep)
 calculate the line of intersection More...
 
void Perform (const TColStd_Array1OfReal &ParDep, const Standard_Real u1min, const Standard_Real v1min, const Standard_Real u2min, const Standard_Real v2min, const Standard_Real u1max, const Standard_Real v1max, const Standard_Real u2max, const Standard_Real v2max)
 calculate the line of intersection. The regulation of steps is done using min and max values on u and v. (if this data is not presented as in the previous method, the initial steps are calculated starting from min and max uv of faces). More...
 
Standard_Boolean PerformFirstPoint (const TColStd_Array1OfReal &ParDep, IntSurf_PntOn2S &FirstPoint)
 calculate the first point of a line of intersection More...
 
Standard_Boolean IsDone () const
 Returns true if the calculus was successful. More...
 
Standard_Integer NbPoints () const
 Returns the number of points of the resulting polyline. An exception is raised if IsDone returns False. More...
 
const IntSurf_PntOn2SValue (const Standard_Integer Index) const
 Returns the point of range Index on the polyline. An exception is raised if IsDone returns False. An exception is raised if Index<=0 or Index>NbPoints. More...
 
const Handle< IntSurf_LineOn2S > & Line () const
 
Standard_Boolean TangentAtFirst () const
 Returns True if the surface are tangent at the first point of the line. An exception is raised if IsDone returns False. More...
 
Standard_Boolean TangentAtLast () const
 Returns true if the surface are tangent at the last point of the line. An exception is raised if IsDone returns False. More...
 
Standard_Boolean IsClosed () const
 Returns True if the line is closed. An exception is raised if IsDone returns False. More...
 
const gp_DirTangentAtLine (Standard_Integer &Index) const
 
IntWalk_StatusDeflection TestDeflection (const IntImp_ConstIsoparametric ChoixIso)
 
Standard_Boolean TestArret (const Standard_Boolean DejaReparti, TColStd_Array1OfReal &Param, IntImp_ConstIsoparametric &ChoixIso)
 
void RepartirOuDiviser (Standard_Boolean &DejaReparti, IntImp_ConstIsoparametric &ChoixIso, Standard_Boolean &Arrive)
 
void AddAPoint (const IntSurf_PntOn2S &thePOn2S)
 Inserts thePOn2S in the end of line. More...
 
void RemoveAPoint (const Standard_Integer theIndex)
 Removes point with index theIndex from line. If theIndex is greater than the number of points in line then the last point will be removed. theIndex must be started with 1. More...
 
Standard_Boolean PutToBoundary (const Handle< Adaptor3d_HSurface > &theASurf1, const Handle< Adaptor3d_HSurface > &theASurf2)
 
Standard_Boolean SeekAdditionalPoints (const Handle< Adaptor3d_HSurface > &theASurf1, const Handle< Adaptor3d_HSurface > &theASurf2, const Standard_Integer theMinNbPoints)
 
Standard_Real MaxStep (Standard_Integer theIndex)
 

Protected Member Functions

void ComputePasInit (const Standard_Real theDeltaU1, const Standard_Real theDeltaV1, const Standard_Real theDeltaU2, const Standard_Real theDeltaV2)
 
Standard_Boolean DistanceMinimizeByGradient (const Handle< Adaptor3d_HSurface > &theASurf1, const Handle< Adaptor3d_HSurface > &theASurf2, TColStd_Array1OfReal &theInit, const Standard_Real *theStep0=0)
 Uses Gradient method in order to find intersection point between the given surfaces Arrays theInit (initial point to be precise) and theStep0 (steps-array) must contain four items and must be filled strictly in following order: {U-parameter on S1, V-parameter on S1, U-parameter on S2, V-parameter on S2}. More...
 
Standard_Boolean DistanceMinimizeByExtrema (const Handle< Adaptor3d_HSurface > &theASurf, const gp_Pnt &theP0, Standard_Real &theU0, Standard_Real &theV0, const Standard_Real *theStep0=0)
 Finds the point on theASurf which is the nearest point to theP0. theU0 and theV0 must be initialized (before calling the method) by initial parameters on theASurf. Their values are changed while algorithm being launched. Array theStep0 (steps-array) must contain two items and must be filled strictly in following order: {U-parameter, V-parameter}. More...
 
Standard_Boolean SeekPointOnBoundary (const Handle< Adaptor3d_HSurface > &theASurf1, const Handle< Adaptor3d_HSurface > &theASurf2, const Standard_Real theU1, const Standard_Real theV1, const Standard_Real theU2, const Standard_Real theV2, const Standard_Boolean isTheFirst)
 Searches an intersection point which lies on the some surface boundary. Found point (in case of successful result) is added in the line. theU1, theV1, theU2 and theV2 parameters are initial parameters in for used numeric algorithms. If isTheFirst == TRUE then a point on theASurf1 is searched. Otherwise, the point on theASurf2 is searched. More...
 
Standard_Boolean HandleSingleSingularPoint (const Handle< Adaptor3d_HSurface > &theASurf1, const Handle< Adaptor3d_HSurface > &theASurf2, const Standard_Real the3DTol, TColStd_Array1OfReal &thePnt)
 
Standard_Boolean ExtendLineInCommonZone (const IntImp_ConstIsoparametric theChoixIso, const Standard_Boolean theDirectionFlag)
 

Detailed Description

This class implements an algorithm to determine the intersection between 2 parametrized surfaces, marching from a starting point. The intersection line starts and ends on the natural surface's boundaries .

Constructor & Destructor Documentation

◆ IntWalk_PWalking() [1/2]

IntWalk_PWalking::IntWalk_PWalking ( const Handle< Adaptor3d_HSurface > &  Caro1,
const Handle< Adaptor3d_HSurface > &  Caro2,
const Standard_Real  TolTangency,
const Standard_Real  Epsilon,
const Standard_Real  Deflection,
const Standard_Real  Increment 
)

Constructor used to set the data to compute intersection lines between Caro1 and Caro2. Deflection is the maximum deflection admitted between two consecutive points on the resulting polyline. TolTangency is the tolerance to find a tangent point. Func is the criterion which has to be evaluated at each solution point (each point of the line). It is necessary to call the Perform method to compute the intersection lines. The line found starts at a point on or in 2 natural domains of surfaces. It can be closed in the standard case if it is open it stops and begins at the border of one of the domains. If an open line stops at the middle of a domain, one stops at the tangent point. Epsilon is SquareTolerance of points confusion.

◆ IntWalk_PWalking() [2/2]

IntWalk_PWalking::IntWalk_PWalking ( const Handle< Adaptor3d_HSurface > &  Caro1,
const Handle< Adaptor3d_HSurface > &  Caro2,
const Standard_Real  TolTangency,
const Standard_Real  Epsilon,
const Standard_Real  Deflection,
const Standard_Real  Increment,
const Standard_Real  U1,
const Standard_Real  V1,
const Standard_Real  U2,
const Standard_Real  V2 
)

Returns the intersection line containing the exact point Poin. This line is a polygonal line. Deflection is the maximum deflection admitted between two consecutive points on the resulting polyline. TolTangency is the tolerance to find a tangent point. Func is the criterion which has to be evaluated at each solution point (each point of the line). The line found starts at a point on or in 2 natural domains of surfaces. It can be closed in the standard case if it is open it stops and begins at the border of one of the domains. If an open line stops at the middle of a domain, one stops at the tangent point. Epsilon is SquareTolerance of points confusion.

Member Function Documentation

◆ AddAPoint()

void IntWalk_PWalking::AddAPoint ( const IntSurf_PntOn2S thePOn2S)

Inserts thePOn2S in the end of line.

◆ ComputePasInit()

void IntWalk_PWalking::ComputePasInit ( const Standard_Real  theDeltaU1,
const Standard_Real  theDeltaV1,
const Standard_Real  theDeltaU2,
const Standard_Real  theDeltaV2 
)
protected

◆ DistanceMinimizeByExtrema()

Standard_Boolean IntWalk_PWalking::DistanceMinimizeByExtrema ( const Handle< Adaptor3d_HSurface > &  theASurf,
const gp_Pnt theP0,
Standard_Real theU0,
Standard_Real theV0,
const Standard_Real theStep0 = 0 
)
protected

Finds the point on theASurf which is the nearest point to theP0. theU0 and theV0 must be initialized (before calling the method) by initial parameters on theASurf. Their values are changed while algorithm being launched. Array theStep0 (steps-array) must contain two items and must be filled strictly in following order: {U-parameter, V-parameter}.

◆ DistanceMinimizeByGradient()

Standard_Boolean IntWalk_PWalking::DistanceMinimizeByGradient ( const Handle< Adaptor3d_HSurface > &  theASurf1,
const Handle< Adaptor3d_HSurface > &  theASurf2,
TColStd_Array1OfReal theInit,
const Standard_Real theStep0 = 0 
)
protected

Uses Gradient method in order to find intersection point between the given surfaces Arrays theInit (initial point to be precise) and theStep0 (steps-array) must contain four items and must be filled strictly in following order: {U-parameter on S1, V-parameter on S1, U-parameter on S2, V-parameter on S2}.

◆ ExtendLineInCommonZone()

Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone ( const IntImp_ConstIsoparametric  theChoixIso,
const Standard_Boolean  theDirectionFlag 
)
protected

◆ HandleSingleSingularPoint()

Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint ( const Handle< Adaptor3d_HSurface > &  theASurf1,
const Handle< Adaptor3d_HSurface > &  theASurf2,
const Standard_Real  the3DTol,
TColStd_Array1OfReal thePnt 
)
protected

◆ IsClosed()

Standard_Boolean IntWalk_PWalking::IsClosed ( ) const

Returns True if the line is closed. An exception is raised if IsDone returns False.

◆ IsDone()

Standard_Boolean IntWalk_PWalking::IsDone ( ) const

Returns true if the calculus was successful.

◆ Line()

const Handle< IntSurf_LineOn2S >& IntWalk_PWalking::Line ( ) const

◆ MaxStep()

Standard_Real IntWalk_PWalking::MaxStep ( Standard_Integer  theIndex)
inline

◆ NbPoints()

Standard_Integer IntWalk_PWalking::NbPoints ( ) const

Returns the number of points of the resulting polyline. An exception is raised if IsDone returns False.

◆ Perform() [1/2]

void IntWalk_PWalking::Perform ( const TColStd_Array1OfReal ParDep)

calculate the line of intersection

◆ Perform() [2/2]

void IntWalk_PWalking::Perform ( const TColStd_Array1OfReal ParDep,
const Standard_Real  u1min,
const Standard_Real  v1min,
const Standard_Real  u2min,
const Standard_Real  v2min,
const Standard_Real  u1max,
const Standard_Real  v1max,
const Standard_Real  u2max,
const Standard_Real  v2max 
)

calculate the line of intersection. The regulation of steps is done using min and max values on u and v. (if this data is not presented as in the previous method, the initial steps are calculated starting from min and max uv of faces).

◆ PerformFirstPoint()

Standard_Boolean IntWalk_PWalking::PerformFirstPoint ( const TColStd_Array1OfReal ParDep,
IntSurf_PntOn2S FirstPoint 
)

calculate the first point of a line of intersection

◆ PutToBoundary()

Standard_Boolean IntWalk_PWalking::PutToBoundary ( const Handle< Adaptor3d_HSurface > &  theASurf1,
const Handle< Adaptor3d_HSurface > &  theASurf2 
)

◆ RemoveAPoint()

void IntWalk_PWalking::RemoveAPoint ( const Standard_Integer  theIndex)
inline

Removes point with index theIndex from line. If theIndex is greater than the number of points in line then the last point will be removed. theIndex must be started with 1.

◆ RepartirOuDiviser()

void IntWalk_PWalking::RepartirOuDiviser ( Standard_Boolean DejaReparti,
IntImp_ConstIsoparametric ChoixIso,
Standard_Boolean Arrive 
)

◆ SeekAdditionalPoints()

Standard_Boolean IntWalk_PWalking::SeekAdditionalPoints ( const Handle< Adaptor3d_HSurface > &  theASurf1,
const Handle< Adaptor3d_HSurface > &  theASurf2,
const Standard_Integer  theMinNbPoints 
)

◆ SeekPointOnBoundary()

Standard_Boolean IntWalk_PWalking::SeekPointOnBoundary ( const Handle< Adaptor3d_HSurface > &  theASurf1,
const Handle< Adaptor3d_HSurface > &  theASurf2,
const Standard_Real  theU1,
const Standard_Real  theV1,
const Standard_Real  theU2,
const Standard_Real  theV2,
const Standard_Boolean  isTheFirst 
)
protected

Searches an intersection point which lies on the some surface boundary. Found point (in case of successful result) is added in the line. theU1, theV1, theU2 and theV2 parameters are initial parameters in for used numeric algorithms. If isTheFirst == TRUE then a point on theASurf1 is searched. Otherwise, the point on theASurf2 is searched.

ATTENTION!!! This method can delete some points from the curve if it is necessary (in order to obtain correct result after insertion). Returns TRUE in case of success adding (i.e. can return FALSE even after removing some points).

◆ TangentAtFirst()

Standard_Boolean IntWalk_PWalking::TangentAtFirst ( ) const

Returns True if the surface are tangent at the first point of the line. An exception is raised if IsDone returns False.

◆ TangentAtLast()

Standard_Boolean IntWalk_PWalking::TangentAtLast ( ) const

Returns true if the surface are tangent at the last point of the line. An exception is raised if IsDone returns False.

◆ TangentAtLine()

const gp_Dir& IntWalk_PWalking::TangentAtLine ( Standard_Integer Index) const

◆ TestArret()

Standard_Boolean IntWalk_PWalking::TestArret ( const Standard_Boolean  DejaReparti,
TColStd_Array1OfReal Param,
IntImp_ConstIsoparametric ChoixIso 
)

◆ TestDeflection()

IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection ( const IntImp_ConstIsoparametric  ChoixIso)

◆ Value()

const IntSurf_PntOn2S& IntWalk_PWalking::Value ( const Standard_Integer  Index) const

Returns the point of range Index on the polyline. An exception is raised if IsDone returns False. An exception is raised if Index<=0 or Index>NbPoints.


The documentation for this class was generated from the following file: