Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
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 occ::handle< Adaptor3d_Surface > &Caro1, const occ::handle< Adaptor3d_Surface > &Caro2, const double TolTangency, const double Epsilon, const double Deflection, const double 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 (const occ::handle< Adaptor3d_Surface > &Caro1, const occ::handle< Adaptor3d_Surface > &Caro2, const double TolTangency, const double Epsilon, const double Deflection, const double Increment, const double U1, const double V1, const double U2, const double 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.
 
void Perform (const NCollection_Array1< double > &ParDep)
 calculate the line of intersection
 
void Perform (const NCollection_Array1< double > &ParDep, const double u1min, const double v1min, const double u2min, const double v2min, const double u1max, const double v1max, const double u2max, const double 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).
 
bool PerformFirstPoint (const NCollection_Array1< double > &ParDep, IntSurf_PntOn2S &FirstPoint)
 calculate the first point of a line of intersection
 
bool IsDone () const
 Returns true if the calculus was successful.
 
int NbPoints () const
 Returns the number of points of the resulting polyline. An exception is raised if IsDone returns False.
 
const IntSurf_PntOn2SValue (const int 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.
 
const occ::handle< IntSurf_LineOn2S > & Line () const
 
bool TangentAtFirst () const
 Returns True if the surface are tangent at the first point of the line. An exception is raised if IsDone returns False.
 
bool TangentAtLast () const
 Returns true if the surface are tangent at the last point of the line. An exception is raised if IsDone returns False.
 
bool IsClosed () const
 Returns True if the line is closed. An exception is raised if IsDone returns False.
 
const gp_DirTangentAtLine (int &Index) const
 
IntWalk_StatusDeflection TestDeflection (const IntImp_ConstIsoparametric ChoixIso, const IntWalk_StatusDeflection theStatus)
 
bool TestArret (const bool DejaReparti, NCollection_Array1< double > &Param, IntImp_ConstIsoparametric &ChoixIso)
 
void RepartirOuDiviser (bool &DejaReparti, IntImp_ConstIsoparametric &ChoixIso, bool &Arrive)
 
void AddAPoint (const IntSurf_PntOn2S &thePOn2S)
 Inserts thePOn2S in the end of line.
 
void RemoveAPoint (const int 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.
 
bool PutToBoundary (const occ::handle< Adaptor3d_Surface > &theASurf1, const occ::handle< Adaptor3d_Surface > &theASurf2)
 
bool SeekAdditionalPoints (const occ::handle< Adaptor3d_Surface > &theASurf1, const occ::handle< Adaptor3d_Surface > &theASurf2, const int theMinNbPoints)
 
double MaxStep (int theIndex)
 

Protected Member Functions

void ComputePasInit (const double theDeltaU1, const double theDeltaV1, const double theDeltaU2, const double theDeltaV2)
 
bool DistanceMinimizeByGradient (const occ::handle< Adaptor3d_Surface > &theASurf1, const occ::handle< Adaptor3d_Surface > &theASurf2, NCollection_Array1< double > &theInit, const double *theStep0=nullptr)
 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}.
 
bool DistanceMinimizeByExtrema (const occ::handle< Adaptor3d_Surface > &theASurf, const gp_Pnt &theP0, double &theU0, double &theV0, const double *theStep0=nullptr)
 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}.
 
bool SeekPointOnBoundary (const occ::handle< Adaptor3d_Surface > &theASurf1, const occ::handle< Adaptor3d_Surface > &theASurf2, const double theU1, const double theV1, const double theU2, const double theV2, const bool 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.
 
bool HandleSingleSingularPoint (const occ::handle< Adaptor3d_Surface > &theASurf1, const occ::handle< Adaptor3d_Surface > &theASurf2, const double the3DTol, NCollection_Array1< double > &thePnt)
 
bool ExtendLineInCommonZone (const IntImp_ConstIsoparametric theChoixIso, const bool 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 occ::handle< Adaptor3d_Surface > & Caro1,
const occ::handle< Adaptor3d_Surface > & Caro2,
const double TolTangency,
const double Epsilon,
const double Deflection,
const double 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 occ::handle< Adaptor3d_Surface > & Caro1,
const occ::handle< Adaptor3d_Surface > & Caro2,
const double TolTangency,
const double Epsilon,
const double Deflection,
const double Increment,
const double U1,
const double V1,
const double U2,
const double 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 double theDeltaU1,
const double theDeltaV1,
const double theDeltaU2,
const double theDeltaV2 )
protected

◆ DistanceMinimizeByExtrema()

bool IntWalk_PWalking::DistanceMinimizeByExtrema ( const occ::handle< Adaptor3d_Surface > & theASurf,
const gp_Pnt & theP0,
double & theU0,
double & theV0,
const double * theStep0 = nullptr )
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()

bool IntWalk_PWalking::DistanceMinimizeByGradient ( const occ::handle< Adaptor3d_Surface > & theASurf1,
const occ::handle< Adaptor3d_Surface > & theASurf2,
NCollection_Array1< double > & theInit,
const double * theStep0 = nullptr )
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()

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

◆ HandleSingleSingularPoint()

bool IntWalk_PWalking::HandleSingleSingularPoint ( const occ::handle< Adaptor3d_Surface > & theASurf1,
const occ::handle< Adaptor3d_Surface > & theASurf2,
const double the3DTol,
NCollection_Array1< double > & thePnt )
protected

◆ IsClosed()

bool IntWalk_PWalking::IsClosed ( ) const

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

◆ IsDone()

bool IntWalk_PWalking::IsDone ( ) const

Returns true if the calculus was successful.

◆ Line()

const occ::handle< IntSurf_LineOn2S > & IntWalk_PWalking::Line ( ) const

◆ MaxStep()

double IntWalk_PWalking::MaxStep ( int theIndex)
inline

◆ NbPoints()

int 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 NCollection_Array1< double > & ParDep)

calculate the line of intersection

◆ Perform() [2/2]

void IntWalk_PWalking::Perform ( const NCollection_Array1< double > & ParDep,
const double u1min,
const double v1min,
const double u2min,
const double v2min,
const double u1max,
const double v1max,
const double u2max,
const double 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()

bool IntWalk_PWalking::PerformFirstPoint ( const NCollection_Array1< double > & ParDep,
IntSurf_PntOn2S & FirstPoint )

calculate the first point of a line of intersection

◆ PutToBoundary()

bool IntWalk_PWalking::PutToBoundary ( const occ::handle< Adaptor3d_Surface > & theASurf1,
const occ::handle< Adaptor3d_Surface > & theASurf2 )

◆ RemoveAPoint()

void IntWalk_PWalking::RemoveAPoint ( const int 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 ( bool & DejaReparti,
IntImp_ConstIsoparametric & ChoixIso,
bool & Arrive )

◆ SeekAdditionalPoints()

bool IntWalk_PWalking::SeekAdditionalPoints ( const occ::handle< Adaptor3d_Surface > & theASurf1,
const occ::handle< Adaptor3d_Surface > & theASurf2,
const int theMinNbPoints )

◆ SeekPointOnBoundary()

bool IntWalk_PWalking::SeekPointOnBoundary ( const occ::handle< Adaptor3d_Surface > & theASurf1,
const occ::handle< Adaptor3d_Surface > & theASurf2,
const double theU1,
const double theV1,
const double theU2,
const double theV2,
const bool 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()

bool 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()

bool 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 ( int & Index) const

◆ TestArret()

bool IntWalk_PWalking::TestArret ( const bool DejaReparti,
NCollection_Array1< double > & Param,
IntImp_ConstIsoparametric & ChoixIso )

◆ TestDeflection()

IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection ( const IntImp_ConstIsoparametric ChoixIso,
const IntWalk_StatusDeflection theStatus )

◆ Value()

const IntSurf_PntOn2S & IntWalk_PWalking::Value ( const int 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: