Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Static Public Member Functions
GeomLib Class Reference

Geom Library. This package provides an implementation of functions for basic computation on geometric entity from packages Geom and Geom2d. More...

#include <GeomLib.hxx>

Static Public Member Functions

static occ::handle< Geom_CurveTo3d (const gp_Ax2 &Position, const occ::handle< Geom2d_Curve > &Curve2d)
 Computes the curve 3d from package Geom corresponding to curve 2d from package Geom2d, on the plan defined with the local coordinate system Position.
 
static occ::handle< Geom2d_CurveGTransform (const occ::handle< Geom2d_Curve > &Curve, const gp_GTrsf2d &GTrsf)
 Computes the curve 3d from package Geom corresponding to the curve 3d from package Geom, transformed with the transformation <GTrsf> WARNING : this method may return a null Handle if it's impossible to compute the transformation of a curve. It's not implemented when : 1) the curve is an infinite parabola or hyperbola 2) the curve is an offsetcurve.
 
static void SameRange (const double Tolerance, const occ::handle< Geom2d_Curve > &Curve2dPtr, const double First, const double Last, const double RequestedFirst, const double RequestedLast, occ::handle< Geom2d_Curve > &NewCurve2dPtr)
 Make the curve Curve2dPtr have the imposed range First to List the most economic way, that is if it can change the range without changing the nature of the curve it will try to do that. Otherwise it will produce a Bspline curve that has the required range.
 
static void BuildCurve3d (const double Tolerance, Adaptor3d_CurveOnSurface &CurvePtr, const double FirstParameter, const double LastParameter, occ::handle< Geom_Curve > &NewCurvePtr, double &MaxDeviation, double &AverageDeviation, const GeomAbs_Shape Continuity=GeomAbs_C1, const int MaxDegree=14, const int MaxSegment=30)
 
static void AdjustExtremity (occ::handle< Geom_BoundedCurve > &Curve, const gp_Pnt &P1, const gp_Pnt &P2, const gp_Vec &T1, const gp_Vec &T2)
 
static void ExtendCurveToPoint (occ::handle< Geom_BoundedCurve > &Curve, const gp_Pnt &Point, const int Cont, const bool After)
 Extends the bounded curve Curve to the point Point. The extension is built:
 
static void ExtendSurfByLength (occ::handle< Geom_BoundedSurface > &Surf, const double Length, const int Cont, const bool InU, const bool After)
 Extends the bounded surface Surf along one of its boundaries. The chord length of the extension is equal to Length. The direction of the extension is given as:
 
static void AxeOfInertia (const NCollection_Array1< gp_Pnt > &Points, gp_Ax2 &Axe, bool &IsSingular, const double Tol=1.0e-7)
 Compute axes of inertia, of some points <Axe>.Location() is the BaryCentre <Axe>.XDirection is the axe of upper inertia <Axe>.Direction is the Normal to the average plane IsSingular is True if points are on line Tol is used to determine singular cases.
 
static void Inertia (const NCollection_Array1< gp_Pnt > &Points, gp_Pnt &Bary, gp_Dir &XDir, gp_Dir &YDir, double &Xgap, double &YGap, double &ZGap)
 Compute principale axes of inertia, and dispersion value of some points.
 
static void RemovePointsFromArray (const int NumPoints, const NCollection_Array1< double > &InParameters, occ::handle< NCollection_HArray1< double > > &OutParameters)
 Warning! This assume that the InParameter is an increasing sequence of real number and it will not check for that : Unpredictable result can happen if this is not satisfied. It is the caller responsibility to check for that property.
 
static void DensifyArray1OfReal (const int MinNumPoints, const NCollection_Array1< double > &InParameters, occ::handle< NCollection_HArray1< double > > &OutParameters)
 this makes sure that there is at least MinNumPoints in OutParameters taking into account the parameters in the InParameters array provided those are in order, that is the sequence of real in the InParameter is strictly non decreasing
 
static void FuseIntervals (const NCollection_Array1< double > &Interval1, const NCollection_Array1< double > &Interval2, NCollection_Sequence< double > &Fusion, const double Confusion=1.0e-9, const bool IsAdjustToFirstInterval=false)
 This method fuse intervals Interval1 and Interval2 with specified Confusion.
 
static void EvalMaxParametricDistance (const Adaptor3d_Curve &Curve, const Adaptor3d_Curve &AReferenceCurve, const double Tolerance, const NCollection_Array1< double > &Parameters, double &MaxDistance)
 this will compute the maximum distance at the parameters given in the Parameters array by evaluating each parameter the two curves and taking the maximum of the evaluated distance
 
static void EvalMaxDistanceAlongParameter (const Adaptor3d_Curve &Curve, const Adaptor3d_Curve &AReferenceCurve, const double Tolerance, const NCollection_Array1< double > &Parameters, double &MaxDistance)
 this will compute the maximum distance at the parameters given in the Parameters array by projecting from the Curve to the reference curve and taking the minimum distance Than the maximum will be taken on those minimas.
 
static void CancelDenominatorDerivative (occ::handle< Geom_BSplineSurface > &BSurf, const bool UDirection, const bool VDirection)
 Cancel,on the boundaries,the denominator first derivative in the directions wished by the user and set its value to 1.
 
static int NormEstim (const occ::handle< Geom_Surface > &theSurf, const gp_Pnt2d &theUV, const double theTol, gp_Dir &theNorm)
 Estimate surface normal at the given (U, V) point.
 
static void IsClosed (const occ::handle< Geom_Surface > &S, const double Tol, bool &isUClosed, bool &isVClosed)
 This method defines if opposite boundaries of surface coincide with given tolerance.
 
static bool IsBSplUClosed (const occ::handle< Geom_BSplineSurface > &S, const double U1, const double U2, const double Tol)
 Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked.
 
static bool IsBSplVClosed (const occ::handle< Geom_BSplineSurface > &S, const double V1, const double V2, const double Tol)
 Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked.
 
static bool IsBzUClosed (const occ::handle< Geom_BezierSurface > &S, const double U1, const double U2, const double Tol)
 Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion.
 
static bool IsBzVClosed (const occ::handle< Geom_BezierSurface > &S, const double V1, const double V2, const double Tol)
 Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion.
 
static bool isIsoLine (const occ::handle< Adaptor2d_Curve2d > &theC2D, bool &theIsU, double &theParam, bool &theIsForward)
 Checks whether the 2d curve is a isoline. It can be represented by b-spline, bezier, or geometric line. This line should have natural parameterization.
 
static occ::handle< Geom_CurvebuildC3dOnIsoLine (const occ::handle< Adaptor2d_Curve2d > &theC2D, const occ::handle< Adaptor3d_Surface > &theSurf, const double theFirst, const double theLast, const double theTolerance, const bool theIsU, const double theParam, const bool theIsForward)
 Builds 3D curve for a isoline. This method takes corresponding isoline from the input surface.
 

Detailed Description

Geom Library. This package provides an implementation of functions for basic computation on geometric entity from packages Geom and Geom2d.

Member Function Documentation

◆ AdjustExtremity()

static void GeomLib::AdjustExtremity ( occ::handle< Geom_BoundedCurve > & Curve,
const gp_Pnt & P1,
const gp_Pnt & P2,
const gp_Vec & T1,
const gp_Vec & T2 )
static

◆ AxeOfInertia()

static void GeomLib::AxeOfInertia ( const NCollection_Array1< gp_Pnt > & Points,
gp_Ax2 & Axe,
bool & IsSingular,
const double Tol = 1.0e-7 )
static

Compute axes of inertia, of some points <Axe>.Location() is the BaryCentre <Axe>.XDirection is the axe of upper inertia <Axe>.Direction is the Normal to the average plane IsSingular is True if points are on line Tol is used to determine singular cases.

◆ buildC3dOnIsoLine()

static occ::handle< Geom_Curve > GeomLib::buildC3dOnIsoLine ( const occ::handle< Adaptor2d_Curve2d > & theC2D,
const occ::handle< Adaptor3d_Surface > & theSurf,
const double theFirst,
const double theLast,
const double theTolerance,
const bool theIsU,
const double theParam,
const bool theIsForward )
static

Builds 3D curve for a isoline. This method takes corresponding isoline from the input surface.

Parameters
theC2DTrimmed curve to be approximated.
theIsUFlag indicating that line is u const.
theParamLine parameter.
theIsForwardFlag indicating forward parameterization on a isoline.
Returns
true when 3d curve is built and false otherwise.

◆ BuildCurve3d()

static void GeomLib::BuildCurve3d ( const double Tolerance,
Adaptor3d_CurveOnSurface & CurvePtr,
const double FirstParameter,
const double LastParameter,
occ::handle< Geom_Curve > & NewCurvePtr,
double & MaxDeviation,
double & AverageDeviation,
const GeomAbs_Shape Continuity = GeomAbs_C1,
const int MaxDegree = 14,
const int MaxSegment = 30 )
static

◆ CancelDenominatorDerivative()

static void GeomLib::CancelDenominatorDerivative ( occ::handle< Geom_BSplineSurface > & BSurf,
const bool UDirection,
const bool VDirection )
static

Cancel,on the boundaries,the denominator first derivative in the directions wished by the user and set its value to 1.

◆ DensifyArray1OfReal()

static void GeomLib::DensifyArray1OfReal ( const int MinNumPoints,
const NCollection_Array1< double > & InParameters,
occ::handle< NCollection_HArray1< double > > & OutParameters )
static

this makes sure that there is at least MinNumPoints in OutParameters taking into account the parameters in the InParameters array provided those are in order, that is the sequence of real in the InParameter is strictly non decreasing

◆ EvalMaxDistanceAlongParameter()

static void GeomLib::EvalMaxDistanceAlongParameter ( const Adaptor3d_Curve & Curve,
const Adaptor3d_Curve & AReferenceCurve,
const double Tolerance,
const NCollection_Array1< double > & Parameters,
double & MaxDistance )
static

this will compute the maximum distance at the parameters given in the Parameters array by projecting from the Curve to the reference curve and taking the minimum distance Than the maximum will be taken on those minimas.

◆ EvalMaxParametricDistance()

static void GeomLib::EvalMaxParametricDistance ( const Adaptor3d_Curve & Curve,
const Adaptor3d_Curve & AReferenceCurve,
const double Tolerance,
const NCollection_Array1< double > & Parameters,
double & MaxDistance )
static

this will compute the maximum distance at the parameters given in the Parameters array by evaluating each parameter the two curves and taking the maximum of the evaluated distance

◆ ExtendCurveToPoint()

static void GeomLib::ExtendCurveToPoint ( occ::handle< Geom_BoundedCurve > & Curve,
const gp_Pnt & Point,
const int Cont,
const bool After )
static

Extends the bounded curve Curve to the point Point. The extension is built:

  • at the end of the curve if After equals true, or
  • at the beginning of the curve if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded curve Curve into a BSpline curve. Warning
  • Nothing is done, and Curve is not modified if Cont is not equal to 1, 2 or 3.
  • It is recommended that the extension should not be too large with respect to the size of the bounded curve Curve: Point must not be located too far from one of the extremities of Curve.

◆ ExtendSurfByLength()

static void GeomLib::ExtendSurfByLength ( occ::handle< Geom_BoundedSurface > & Surf,
const double Length,
const int Cont,
const bool InU,
const bool After )
static

Extends the bounded surface Surf along one of its boundaries. The chord length of the extension is equal to Length. The direction of the extension is given as:

  • the u parametric direction of Surf, if InU equals true, or
  • the v parametric direction of Surf, if InU equals false. In this parametric direction, the extension is built on the side of:
  • the last parameter of Surf, if After equals true, or
  • the first parameter of Surf, if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded surface Surf into a BSpline surface. Warning
  • Nothing is done, and Surf is not modified if Cont is not equal to 1, 2 or 3.
  • It is recommended that Length, the size of the extension should not be too large with respect to the size of the bounded surface Surf.
  • Surf must not be a periodic BSpline surface in the parametric direction corresponding to the direction of extension.

◆ FuseIntervals()

static void GeomLib::FuseIntervals ( const NCollection_Array1< double > & Interval1,
const NCollection_Array1< double > & Interval2,
NCollection_Sequence< double > & Fusion,
const double Confusion = 1.0e-9,
const bool IsAdjustToFirstInterval = false )
static

This method fuse intervals Interval1 and Interval2 with specified Confusion.

Parameters
[in]Interval1first interval to fuse
[in]Interval2second interval to fuse
[in]Confisiontolerance to compare intervals
[in]IsAdjustToFirstIntervalflag to set method of fusion, if intervals are close if false, intervals are fusing by half-division method if true, intervals are fusing by selecting value from Interval1
[out]Fusionoutput interval

◆ GTransform()

static occ::handle< Geom2d_Curve > GeomLib::GTransform ( const occ::handle< Geom2d_Curve > & Curve,
const gp_GTrsf2d & GTrsf )
static

Computes the curve 3d from package Geom corresponding to the curve 3d from package Geom, transformed with the transformation <GTrsf> WARNING : this method may return a null Handle if it's impossible to compute the transformation of a curve. It's not implemented when : 1) the curve is an infinite parabola or hyperbola 2) the curve is an offsetcurve.

◆ Inertia()

static void GeomLib::Inertia ( const NCollection_Array1< gp_Pnt > & Points,
gp_Pnt & Bary,
gp_Dir & XDir,
gp_Dir & YDir,
double & Xgap,
double & YGap,
double & ZGap )
static

Compute principale axes of inertia, and dispersion value of some points.

◆ IsBSplUClosed()

static bool GeomLib::IsBSplUClosed ( const occ::handle< Geom_BSplineSurface > & S,
const double U1,
const double U2,
const double Tol )
static

Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked.

◆ IsBSplVClosed()

static bool GeomLib::IsBSplVClosed ( const occ::handle< Geom_BSplineSurface > & S,
const double V1,
const double V2,
const double Tol )
static

Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion. For rational surfaces Weights(i)*Poles(i) are checked.

◆ IsBzUClosed()

static bool GeomLib::IsBzUClosed ( const occ::handle< Geom_BezierSurface > & S,
const double U1,
const double U2,
const double Tol )
static

Returns true if the poles of U1 isoline and the poles of U2 isoline of surface are identical according to tolerance criterion.

◆ IsBzVClosed()

static bool GeomLib::IsBzVClosed ( const occ::handle< Geom_BezierSurface > & S,
const double V1,
const double V2,
const double Tol )
static

Returns true if the poles of V1 isoline and the poles of V2 isoline of surface are identical according to tolerance criterion.

◆ IsClosed()

static void GeomLib::IsClosed ( const occ::handle< Geom_Surface > & S,
const double Tol,
bool & isUClosed,
bool & isVClosed )
static

This method defines if opposite boundaries of surface coincide with given tolerance.

◆ isIsoLine()

static bool GeomLib::isIsoLine ( const occ::handle< Adaptor2d_Curve2d > & theC2D,
bool & theIsU,
double & theParam,
bool & theIsForward )
static

Checks whether the 2d curve is a isoline. It can be represented by b-spline, bezier, or geometric line. This line should have natural parameterization.

Parameters
theC2DTrimmed curve to be checked.
theIsUFlag indicating that line is u const.
theParamLine parameter.
theIsForwardFlag indicating forward parameterization on a isoline.
Returns
true when 2d curve is a line and false otherwise.

◆ NormEstim()

static int GeomLib::NormEstim ( const occ::handle< Geom_Surface > & theSurf,
const gp_Pnt2d & theUV,
const double theTol,
gp_Dir & theNorm )
static

Estimate surface normal at the given (U, V) point.

Parameters
[in]theSurfinput surface
[in]theUV(U, V) point coordinates on the surface
[in]theTolestimation tolerance
[out]theNormcomputed normal
Returns
0 if normal estimated from D1, 1 if estimated from D2 (quasysingular), >=2 in case of failure (undefined or infinite solutions)

◆ RemovePointsFromArray()

static void GeomLib::RemovePointsFromArray ( const int NumPoints,
const NCollection_Array1< double > & InParameters,
occ::handle< NCollection_HArray1< double > > & OutParameters )
static

Warning! This assume that the InParameter is an increasing sequence of real number and it will not check for that : Unpredictable result can happen if this is not satisfied. It is the caller responsibility to check for that property.

This method makes uniform NumPoints segments S1,...SNumPoints out of the segment defined by the first parameter and the last parameter of the InParameter ; keeps only one point of the InParameters set of parameter in each of the uniform segments taking care of the first and the last parameters. For the ith segment the element of the InParameter is the one that is the first to exceed the midpoint of the segment and to fall before the midpoint of the next segment There will be at the end at most NumPoints + 1 if NumPoints > 2 in the OutParameters Array

◆ SameRange()

static void GeomLib::SameRange ( const double Tolerance,
const occ::handle< Geom2d_Curve > & Curve2dPtr,
const double First,
const double Last,
const double RequestedFirst,
const double RequestedLast,
occ::handle< Geom2d_Curve > & NewCurve2dPtr )
static

Make the curve Curve2dPtr have the imposed range First to List the most economic way, that is if it can change the range without changing the nature of the curve it will try to do that. Otherwise it will produce a Bspline curve that has the required range.

◆ To3d()

static occ::handle< Geom_Curve > GeomLib::To3d ( const gp_Ax2 & Position,
const occ::handle< Geom2d_Curve > & Curve2d )
static

Computes the curve 3d from package Geom corresponding to curve 2d from package Geom2d, on the plan defined with the local coordinate system Position.


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