Open CASCADE Technology  7.4.0
Public Member Functions

IntPolyh_MaillageAffinage Class Reference

Low-level algorithm to compute intersection of the surfaces by computing the intersection of their triangulations. More...

#include <IntPolyh_MaillageAffinage.hxx>

Public Member Functions

 IntPolyh_MaillageAffinage (const Handle< Adaptor3d_HSurface > &S1, const Standard_Integer NbSU1, const Standard_Integer NbSV1, const Handle< Adaptor3d_HSurface > &S2, const Standard_Integer NbSU2, const Standard_Integer NbSV2, const Standard_Integer PRINT)
 
 IntPolyh_MaillageAffinage (const Handle< Adaptor3d_HSurface > &S1, const Handle< Adaptor3d_HSurface > &S2, const Standard_Integer PRINT)
 
void MakeSampling (const Standard_Integer SurfID, TColStd_Array1OfReal &theUPars, TColStd_Array1OfReal &theVPars)
 Makes the sampling of the surface - Fills the arrays with the parametric values of the sampling points (triangulation nodes). More...
 
void FillArrayOfPnt (const Standard_Integer SurfID)
 Computes points on one surface and fills an array of points; standard (default) method. More...
 
void FillArrayOfPnt (const Standard_Integer SurfID, const Standard_Boolean isShiftFwd)
 isShiftFwd flag is added. The purpose is to define shift of points along normal to the surface in this point. The shift length represents maximal deflection of triangulation. The direction (forward or reversed regarding to normal direction) is defined by isShiftFwd flag. Compute points on one surface and fill an array of points; advanced method More...
 
void FillArrayOfPnt (const Standard_Integer SurfID, const TColStd_Array1OfReal &Upars, const TColStd_Array1OfReal &Vpars, const Standard_Real *theDeflTol=NULL)
 Compute points on one surface and fill an array of points; If given, <theDeflTol> is the deflection tolerance of the given sampling. standard (default) method. More...
 
void FillArrayOfPnt (const Standard_Integer SurfID, const Standard_Boolean isShiftFwd, const TColStd_Array1OfReal &Upars, const TColStd_Array1OfReal &Vpars, const Standard_Real *theDeflTol=NULL)
 isShiftFwd flag is added. The purpose is to define shift of points along normal to the surface in this point. The shift length represents maximal deflection of triangulation. The direction (forward or reversed regarding to normal direction) is defined by isShiftFwd flag. Compute points on one surface and fill an array of points; If given, <theDeflTol> is the deflection tolerance of the given sampling. advanced method More...
 
void FillArrayOfPnt (const Standard_Integer SurfID, const Standard_Boolean isShiftFwd, const IntPolyh_ArrayOfPointNormal &thePoints, const TColStd_Array1OfReal &theUPars, const TColStd_Array1OfReal &theVPars, const Standard_Real theDeflTol)
 Fills the array of points for the surface taking into account the shift. More...
 
void CommonBox ()
 Looks for the common box of the surfaces and marks the points of the surfaces inside that common box for possible intersection. More...
 
void CommonBox (const Bnd_Box &B1, const Bnd_Box &B2, Standard_Real &xMin, Standard_Real &yMin, Standard_Real &zMin, Standard_Real &xMax, Standard_Real &yMax, Standard_Real &zMax)
 Compute the common box witch is the intersection of the two bounding boxes, and mark the points of the two surfaces that are inside. More...
 
void FillArrayOfEdges (const Standard_Integer SurfID)
 Compute edges from the array of points. More...
 
void FillArrayOfTriangles (const Standard_Integer SurfID)
 Compute triangles from the array of points, and – mark the triangles that use marked points by the CommonBox function. More...
 
void CommonPartRefinement ()
 Refine systematicaly all marked triangles of both surfaces. More...
 
void LocalSurfaceRefinement (const Standard_Integer SurfId)
 Refine systematicaly all marked triangles of ONE surface. More...
 
void ComputeDeflections (const Standard_Integer SurfID)
 Compute deflection for all triangles of one surface,and sort min and max of deflections. More...
 
void TrianglesDeflectionsRefinementBSB ()
 Refine both surfaces using BoundSortBox as – rejection. The criterions used to refine a – triangle are: The deflection The size of the – bounding boxes (one surface may be very small compared to the other) More...
 
Standard_Integer TriContact (const IntPolyh_Point &P1, const IntPolyh_Point &P2, const IntPolyh_Point &P3, const IntPolyh_Point &Q1, const IntPolyh_Point &Q2, const IntPolyh_Point &Q3, Standard_Real &Angle) const
 This fonction Check if two triangles are in contact or no, return 1 if yes, return 0 if no. More...
 
Standard_Integer TriangleEdgeContact (const Standard_Integer TriSurfID, const Standard_Integer EdgeIndice, const IntPolyh_Triangle &Tri1, const IntPolyh_Triangle &Tri2, const IntPolyh_Point &P1, const IntPolyh_Point &P2, const IntPolyh_Point &P3, const IntPolyh_Point &C1, const IntPolyh_Point &C2, const IntPolyh_Point &C3, const IntPolyh_Point &Pe1, const IntPolyh_Point &Pe2, const IntPolyh_Point &E, const IntPolyh_Point &N, IntPolyh_StartPoint &SP1, IntPolyh_StartPoint &SP2) const
 
Standard_Integer StartingPointsResearch (const Standard_Integer T1, const Standard_Integer T2, IntPolyh_StartPoint &SP1, IntPolyh_StartPoint &SP2) const
 From two triangles compute intersection points. If I found more than two intersection points that's mean that those triangle are coplanar. More...
 
Standard_Integer NextStartingPointsResearch (const Standard_Integer T1, const Standard_Integer T2, const IntPolyh_StartPoint &SPInit, IntPolyh_StartPoint &SPNext) const
 from two triangles and an intersection point I seach the other point (if it exist). This function is used by StartPointChain More...
 
Standard_Integer TriangleCompare ()
 Analyse each couple of triangles from the two – array of triangles, to see if they are in contact, and compute the incidence. Then put couples in contact in the array of couples. More...
 
Standard_Integer StartPointsChain (IntPolyh_ArrayOfSectionLines &TSectionLines, IntPolyh_ArrayOfTangentZones &TTangentZones)
 Loop on the array of couples. Compute StartPoints. Try to chain the StartPoints into SectionLines or put the point in the ArrayOfTangentZones if chaining it, is not possible. More...
 
Standard_Integer GetNextChainStartPoint (const IntPolyh_StartPoint &SPInit, IntPolyh_StartPoint &SPNext, IntPolyh_SectionLine &MySectionLine, IntPolyh_ArrayOfTangentZones &TTangentZones, const Standard_Boolean Prepend=Standard_False)
 Mainly used by StartPointsChain(), this function try to compute the next StartPoint. More...
 
const IntPolyh_ArrayOfPointsGetArrayOfPoints (const Standard_Integer SurfID) const
 
const IntPolyh_ArrayOfEdgesGetArrayOfEdges (const Standard_Integer SurfID) const
 
const IntPolyh_ArrayOfTrianglesGetArrayOfTriangles (const Standard_Integer SurfID) const
 
Standard_Integer GetFinTE (const Standard_Integer SurfID) const
 
Standard_Integer GetFinTT (const Standard_Integer SurfID) const
 
Bnd_Box GetBox (const Standard_Integer SurfID) const
 
IntPolyh_ListOfCouplesGetCouples ()
 This method returns list of couples of contact triangles. More...
 
void SetEnlargeZone (const Standard_Boolean EnlargeZone)
 
Standard_Boolean GetEnlargeZone () const
 
Standard_Real GetMinDeflection (const Standard_Integer SurfID) const
 returns FlecheMin More...
 
Standard_Real GetMaxDeflection (const Standard_Integer SurfID) const
 returns FlecheMax More...
 

Detailed Description

Low-level algorithm to compute intersection of the surfaces by computing the intersection of their triangulations.

Constructor & Destructor Documentation

◆ IntPolyh_MaillageAffinage() [1/2]

IntPolyh_MaillageAffinage::IntPolyh_MaillageAffinage ( const Handle< Adaptor3d_HSurface > &  S1,
const Standard_Integer  NbSU1,
const Standard_Integer  NbSV1,
const Handle< Adaptor3d_HSurface > &  S2,
const Standard_Integer  NbSU2,
const Standard_Integer  NbSV2,
const Standard_Integer  PRINT 
)

◆ IntPolyh_MaillageAffinage() [2/2]

IntPolyh_MaillageAffinage::IntPolyh_MaillageAffinage ( const Handle< Adaptor3d_HSurface > &  S1,
const Handle< Adaptor3d_HSurface > &  S2,
const Standard_Integer  PRINT 
)

Member Function Documentation

◆ CommonBox() [1/2]

void IntPolyh_MaillageAffinage::CommonBox ( )

Looks for the common box of the surfaces and marks the points of the surfaces inside that common box for possible intersection.

◆ CommonBox() [2/2]

void IntPolyh_MaillageAffinage::CommonBox ( const Bnd_Box B1,
const Bnd_Box B2,
Standard_Real xMin,
Standard_Real yMin,
Standard_Real zMin,
Standard_Real xMax,
Standard_Real yMax,
Standard_Real zMax 
)

Compute the common box witch is the intersection of the two bounding boxes, and mark the points of the two surfaces that are inside.

◆ CommonPartRefinement()

void IntPolyh_MaillageAffinage::CommonPartRefinement ( )

Refine systematicaly all marked triangles of both surfaces.

◆ ComputeDeflections()

void IntPolyh_MaillageAffinage::ComputeDeflections ( const Standard_Integer  SurfID)

Compute deflection for all triangles of one surface,and sort min and max of deflections.

◆ FillArrayOfEdges()

void IntPolyh_MaillageAffinage::FillArrayOfEdges ( const Standard_Integer  SurfID)

Compute edges from the array of points.

◆ FillArrayOfPnt() [1/5]

void IntPolyh_MaillageAffinage::FillArrayOfPnt ( const Standard_Integer  SurfID)

Computes points on one surface and fills an array of points; standard (default) method.

◆ FillArrayOfPnt() [2/5]

void IntPolyh_MaillageAffinage::FillArrayOfPnt ( const Standard_Integer  SurfID,
const Standard_Boolean  isShiftFwd 
)

isShiftFwd flag is added. The purpose is to define shift of points along normal to the surface in this point. The shift length represents maximal deflection of triangulation. The direction (forward or reversed regarding to normal direction) is defined by isShiftFwd flag. Compute points on one surface and fill an array of points; advanced method

◆ FillArrayOfPnt() [3/5]

void IntPolyh_MaillageAffinage::FillArrayOfPnt ( const Standard_Integer  SurfID,
const TColStd_Array1OfReal Upars,
const TColStd_Array1OfReal Vpars,
const Standard_Real theDeflTol = NULL 
)

Compute points on one surface and fill an array of points; If given, <theDeflTol> is the deflection tolerance of the given sampling. standard (default) method.

◆ FillArrayOfPnt() [4/5]

void IntPolyh_MaillageAffinage::FillArrayOfPnt ( const Standard_Integer  SurfID,
const Standard_Boolean  isShiftFwd,
const TColStd_Array1OfReal Upars,
const TColStd_Array1OfReal Vpars,
const Standard_Real theDeflTol = NULL 
)

isShiftFwd flag is added. The purpose is to define shift of points along normal to the surface in this point. The shift length represents maximal deflection of triangulation. The direction (forward or reversed regarding to normal direction) is defined by isShiftFwd flag. Compute points on one surface and fill an array of points; If given, <theDeflTol> is the deflection tolerance of the given sampling. advanced method

◆ FillArrayOfPnt() [5/5]

void IntPolyh_MaillageAffinage::FillArrayOfPnt ( const Standard_Integer  SurfID,
const Standard_Boolean  isShiftFwd,
const IntPolyh_ArrayOfPointNormal thePoints,
const TColStd_Array1OfReal theUPars,
const TColStd_Array1OfReal theVPars,
const Standard_Real  theDeflTol 
)

Fills the array of points for the surface taking into account the shift.

◆ FillArrayOfTriangles()

void IntPolyh_MaillageAffinage::FillArrayOfTriangles ( const Standard_Integer  SurfID)

Compute triangles from the array of points, and – mark the triangles that use marked points by the CommonBox function.

◆ GetArrayOfEdges()

const IntPolyh_ArrayOfEdges& IntPolyh_MaillageAffinage::GetArrayOfEdges ( const Standard_Integer  SurfID) const

◆ GetArrayOfPoints()

const IntPolyh_ArrayOfPoints& IntPolyh_MaillageAffinage::GetArrayOfPoints ( const Standard_Integer  SurfID) const

◆ GetArrayOfTriangles()

const IntPolyh_ArrayOfTriangles& IntPolyh_MaillageAffinage::GetArrayOfTriangles ( const Standard_Integer  SurfID) const

◆ GetBox()

Bnd_Box IntPolyh_MaillageAffinage::GetBox ( const Standard_Integer  SurfID) const

◆ GetCouples()

IntPolyh_ListOfCouples& IntPolyh_MaillageAffinage::GetCouples ( )

This method returns list of couples of contact triangles.

◆ GetEnlargeZone()

Standard_Boolean IntPolyh_MaillageAffinage::GetEnlargeZone ( ) const

◆ GetFinTE()

Standard_Integer IntPolyh_MaillageAffinage::GetFinTE ( const Standard_Integer  SurfID) const

◆ GetFinTT()

Standard_Integer IntPolyh_MaillageAffinage::GetFinTT ( const Standard_Integer  SurfID) const

◆ GetMaxDeflection()

Standard_Real IntPolyh_MaillageAffinage::GetMaxDeflection ( const Standard_Integer  SurfID) const

returns FlecheMax

◆ GetMinDeflection()

Standard_Real IntPolyh_MaillageAffinage::GetMinDeflection ( const Standard_Integer  SurfID) const

returns FlecheMin

◆ GetNextChainStartPoint()

Standard_Integer IntPolyh_MaillageAffinage::GetNextChainStartPoint ( const IntPolyh_StartPoint SPInit,
IntPolyh_StartPoint SPNext,
IntPolyh_SectionLine MySectionLine,
IntPolyh_ArrayOfTangentZones TTangentZones,
const Standard_Boolean  Prepend = Standard_False 
)

Mainly used by StartPointsChain(), this function try to compute the next StartPoint.

◆ LocalSurfaceRefinement()

void IntPolyh_MaillageAffinage::LocalSurfaceRefinement ( const Standard_Integer  SurfId)

Refine systematicaly all marked triangles of ONE surface.

◆ MakeSampling()

void IntPolyh_MaillageAffinage::MakeSampling ( const Standard_Integer  SurfID,
TColStd_Array1OfReal theUPars,
TColStd_Array1OfReal theVPars 
)

Makes the sampling of the surface - Fills the arrays with the parametric values of the sampling points (triangulation nodes).

◆ NextStartingPointsResearch()

Standard_Integer IntPolyh_MaillageAffinage::NextStartingPointsResearch ( const Standard_Integer  T1,
const Standard_Integer  T2,
const IntPolyh_StartPoint SPInit,
IntPolyh_StartPoint SPNext 
) const

from two triangles and an intersection point I seach the other point (if it exist). This function is used by StartPointChain

◆ SetEnlargeZone()

void IntPolyh_MaillageAffinage::SetEnlargeZone ( const Standard_Boolean  EnlargeZone)

◆ StartingPointsResearch()

Standard_Integer IntPolyh_MaillageAffinage::StartingPointsResearch ( const Standard_Integer  T1,
const Standard_Integer  T2,
IntPolyh_StartPoint SP1,
IntPolyh_StartPoint SP2 
) const

From two triangles compute intersection points. If I found more than two intersection points that's mean that those triangle are coplanar.

◆ StartPointsChain()

Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain ( IntPolyh_ArrayOfSectionLines TSectionLines,
IntPolyh_ArrayOfTangentZones TTangentZones 
)

Loop on the array of couples. Compute StartPoints. Try to chain the StartPoints into SectionLines or put the point in the ArrayOfTangentZones if chaining it, is not possible.

◆ TriangleCompare()

Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ( )

Analyse each couple of triangles from the two – array of triangles, to see if they are in contact, and compute the incidence. Then put couples in contact in the array of couples.

◆ TriangleEdgeContact()

Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact ( const Standard_Integer  TriSurfID,
const Standard_Integer  EdgeIndice,
const IntPolyh_Triangle Tri1,
const IntPolyh_Triangle Tri2,
const IntPolyh_Point P1,
const IntPolyh_Point P2,
const IntPolyh_Point P3,
const IntPolyh_Point C1,
const IntPolyh_Point C2,
const IntPolyh_Point C3,
const IntPolyh_Point Pe1,
const IntPolyh_Point Pe2,
const IntPolyh_Point E,
const IntPolyh_Point N,
IntPolyh_StartPoint SP1,
IntPolyh_StartPoint SP2 
) const

◆ TrianglesDeflectionsRefinementBSB()

void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB ( )

Refine both surfaces using BoundSortBox as – rejection. The criterions used to refine a – triangle are: The deflection The size of the – bounding boxes (one surface may be very small compared to the other)

◆ TriContact()

Standard_Integer IntPolyh_MaillageAffinage::TriContact ( const IntPolyh_Point P1,
const IntPolyh_Point P2,
const IntPolyh_Point P3,
const IntPolyh_Point Q1,
const IntPolyh_Point Q2,
const IntPolyh_Point Q3,
Standard_Real Angle 
) const

This fonction Check if two triangles are in contact or no, return 1 if yes, return 0 if no.


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