mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
Coding - Refactor HLRBRep algorithms to replace Standard_Address (#961)
- Updated multiple files in the HLRBRep module to replace occurrences of Standard_Address with new type aliases HLRBRep_CurvePtr and HLRBRep_SurfacePtr. - Introduced HLRBRep_TypeDef.hxx to define these type aliases for better clarity and maintainability. - Adjusted constructors, method signatures, and internal variable types to use the new pointer types. - Ensured compatibility with existing functionality while enhancing type safety and readability.
This commit is contained in:
@@ -124,6 +124,7 @@ set(OCCT_HLRBRep_FILES
|
||||
HLRBRep_ThePolyhedronToolOfInterCSurf_0.cxx
|
||||
HLRBRep_TheProjPCurOfCInter.hxx
|
||||
HLRBRep_TheProjPCurOfCInter_0.cxx
|
||||
HLRBRep_TypeDef.hxx
|
||||
HLRBRep_TheQuadCurvExactInterCSurf.hxx
|
||||
HLRBRep_TheQuadCurvExactInterCSurf.cxx
|
||||
HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntCurve_IntConicConic.hxx>
|
||||
#include <HLRBRep_TheIntConicCurveOfCInter.hxx>
|
||||
#include <HLRBRep_TheIntPCurvePCurveOfCInter.hxx>
|
||||
@@ -48,83 +49,83 @@ public:
|
||||
HLRBRep_CInter();
|
||||
|
||||
//! Self Intersection of a curve
|
||||
HLRBRep_CInter(const Standard_Address& C, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Self Intersection of a curve with a domain.
|
||||
HLRBRep_CInter(const Standard_Address& C,
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C,
|
||||
const IntRes2d_Domain& D,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
HLRBRep_CInter(const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C1,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
HLRBRep_CInter(const Standard_Address& C1,
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
HLRBRep_CInter(const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C1,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
HLRBRep_CInter(const Standard_Address& C1,
|
||||
HLRBRep_CInter(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
Standard_EXPORT void Perform(const Standard_Address& C1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
void Perform(const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
Standard_EXPORT void Perform(const Standard_Address& C1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
Standard_EXPORT void Perform(const Standard_Address& C1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
void Perform(const Standard_Address& C1,
|
||||
void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
void Perform(const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
void Perform(const HLRBRep_CurvePtr& C1,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Create a domain from a curve
|
||||
Standard_EXPORT IntRes2d_Domain ComputeDomain(const Standard_Address& C1,
|
||||
Standard_EXPORT IntRes2d_Domain ComputeDomain(const HLRBRep_CurvePtr& C1,
|
||||
const Standard_Real TolDomain) const;
|
||||
|
||||
//! Set / get minimum number of points in polygon intersection.
|
||||
@@ -134,9 +135,9 @@ public:
|
||||
protected:
|
||||
private:
|
||||
//! Intersection between 2 curves.
|
||||
Standard_EXPORT void InternalPerform(const Standard_Address& C1,
|
||||
Standard_EXPORT void InternalPerform(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -144,12 +145,12 @@ private:
|
||||
|
||||
//! Part of InternalCompositePerform function
|
||||
Standard_EXPORT void InternalCompositePerform_noRecurs(const Standard_Integer NbInterC1,
|
||||
const Standard_Address& C1,
|
||||
const HLRBRep_CurvePtr& C1,
|
||||
const Standard_Integer NumInterC1,
|
||||
const TColStd_Array1OfReal& Tab1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Integer NbInterC2,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Integer NumInterC2,
|
||||
const TColStd_Array1OfReal& Tab2,
|
||||
const IntRes2d_Domain& D2,
|
||||
@@ -157,12 +158,12 @@ private:
|
||||
const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 curves.
|
||||
Standard_EXPORT void InternalCompositePerform(const Standard_Address& C1,
|
||||
Standard_EXPORT void InternalCompositePerform(const HLRBRep_CurvePtr& C1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Integer N1,
|
||||
const Standard_Integer NB1,
|
||||
const TColStd_Array1OfReal& Tab1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Integer N2,
|
||||
const Standard_Integer NB2,
|
||||
@@ -180,8 +181,8 @@ private:
|
||||
HLRBRep_TheIntPCurvePCurveOfCInter intcurvcurv;
|
||||
};
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_CurvePtr.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define IntCurve_TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define IntCurve_TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Integer HLRBRep_CurveTool::NbSamples(const Standard_Address C)
|
||||
Standard_Integer HLRBRep_CurveTool::NbSamples(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
GeomAbs_CurveType typC = ((HLRBRep_Curve*)C)->GetType();
|
||||
static Standard_Real nbsOther = 10.0;
|
||||
@@ -42,7 +42,7 @@ Standard_Integer HLRBRep_CurveTool::NbSamples(const Standard_Address C)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Integer HLRBRep_CurveTool::NbSamples(const Standard_Address C,
|
||||
Standard_Integer HLRBRep_CurveTool::NbSamples(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real u1,
|
||||
const Standard_Real u2)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
@@ -42,54 +43,54 @@ class HLRBRep_CurveTool
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
static Standard_Real FirstParameter(const Standard_Address C);
|
||||
static Standard_Real FirstParameter(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Standard_Real LastParameter(const Standard_Address C);
|
||||
static Standard_Real LastParameter(const HLRBRep_CurvePtr C);
|
||||
|
||||
static GeomAbs_Shape Continuity(const Standard_Address C);
|
||||
static GeomAbs_Shape Continuity(const HLRBRep_CurvePtr C);
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(myclass) >= <S>
|
||||
static Standard_Integer NbIntervals(const Standard_Address C);
|
||||
static Standard_Integer NbIntervals(const HLRBRep_CurvePtr C);
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accommodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
static void Intervals(const Standard_Address C, TColStd_Array1OfReal& T);
|
||||
static void Intervals(const HLRBRep_CurvePtr C, TColStd_Array1OfReal& T);
|
||||
|
||||
//! output the bounds of interval of index <Index>
|
||||
//! used if Type == Composite.
|
||||
static void GetInterval(const Standard_Address C,
|
||||
static void GetInterval(const HLRBRep_CurvePtr C,
|
||||
const Standard_Integer Index,
|
||||
const TColStd_Array1OfReal& Tab,
|
||||
Standard_Real& U1,
|
||||
Standard_Real& U2);
|
||||
|
||||
static Standard_Boolean IsClosed(const Standard_Address C);
|
||||
static Standard_Boolean IsClosed(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Standard_Boolean IsPeriodic(const Standard_Address C);
|
||||
static Standard_Boolean IsPeriodic(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Standard_Real Period(const Standard_Address C);
|
||||
static Standard_Real Period(const HLRBRep_CurvePtr C);
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
static gp_Pnt2d Value(const Standard_Address C, const Standard_Real U);
|
||||
static gp_Pnt2d Value(const HLRBRep_CurvePtr C, const Standard_Real U);
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
static void D0(const Standard_Address C, const Standard_Real U, gp_Pnt2d& P);
|
||||
static void D0(const HLRBRep_CurvePtr C, const Standard_Real U, gp_Pnt2d& P);
|
||||
|
||||
//! Computes the point of parameter U on the curve
|
||||
//! with its first derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C1.
|
||||
static void D1(const Standard_Address C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V);
|
||||
static void D1(const HLRBRep_CurvePtr C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V);
|
||||
|
||||
//! Returns the point P of parameter U, the first and second
|
||||
//! derivatives V1 and V2.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C2.
|
||||
static void D2(const Standard_Address C,
|
||||
static void D2(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& V1,
|
||||
@@ -99,7 +100,7 @@ public:
|
||||
//! and the third derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C3.
|
||||
static void D3(const Standard_Address C,
|
||||
static void D3(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& V1,
|
||||
@@ -111,45 +112,45 @@ public:
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not CN.
|
||||
//! Raised if N < 1.
|
||||
static gp_Vec2d DN(const Standard_Address C, const Standard_Real U, const Standard_Integer N);
|
||||
static gp_Vec2d DN(const HLRBRep_CurvePtr C, const Standard_Real U, const Standard_Integer N);
|
||||
|
||||
//! Returns the parametric resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
static Standard_Real Resolution(const Standard_Address C, const Standard_Real R3d);
|
||||
static Standard_Real Resolution(const HLRBRep_CurvePtr C, const Standard_Real R3d);
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval: Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
static GeomAbs_CurveType GetType(const Standard_Address C);
|
||||
static GeomAbs_CurveType GetType(const HLRBRep_CurvePtr C);
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval: Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
static GeomAbs_CurveType TheType(const Standard_Address C);
|
||||
static GeomAbs_CurveType TheType(const HLRBRep_CurvePtr C);
|
||||
|
||||
static gp_Lin2d Line(const Standard_Address C);
|
||||
static gp_Lin2d Line(const HLRBRep_CurvePtr C);
|
||||
|
||||
static gp_Circ2d Circle(const Standard_Address C);
|
||||
static gp_Circ2d Circle(const HLRBRep_CurvePtr C);
|
||||
|
||||
static gp_Elips2d Ellipse(const Standard_Address C);
|
||||
static gp_Elips2d Ellipse(const HLRBRep_CurvePtr C);
|
||||
|
||||
static gp_Hypr2d Hyperbola(const Standard_Address C);
|
||||
static gp_Hypr2d Hyperbola(const HLRBRep_CurvePtr C);
|
||||
|
||||
static gp_Parab2d Parabola(const Standard_Address C);
|
||||
static gp_Parab2d Parabola(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Handle(Geom2d_BezierCurve) Bezier(const Standard_Address C);
|
||||
static Handle(Geom2d_BezierCurve) Bezier(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Handle(Geom2d_BSplineCurve) BSpline(const Standard_Address C);
|
||||
static Handle(Geom2d_BSplineCurve) BSpline(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Standard_Real EpsX(const Standard_Address C);
|
||||
static Standard_Real EpsX(const HLRBRep_CurvePtr C);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamples(const Standard_Address C,
|
||||
Standard_EXPORT static Standard_Integer NbSamples(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real U1);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamples(const Standard_Address C);
|
||||
Standard_EXPORT static Standard_Integer NbSamples(const HLRBRep_CurvePtr C);
|
||||
|
||||
static Standard_Integer Degree(const Standard_Address C);
|
||||
static Standard_Integer Degree(const HLRBRep_CurvePtr C);
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
@@ -31,28 +31,28 @@
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Real HLRBRep_CurveTool::FirstParameter(const Standard_Address C)
|
||||
inline Standard_Real HLRBRep_CurveTool::FirstParameter(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->FirstParameter());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Real HLRBRep_CurveTool::LastParameter(const Standard_Address C)
|
||||
inline Standard_Real HLRBRep_CurveTool::LastParameter(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->LastParameter());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline GeomAbs_Shape HLRBRep_CurveTool::Continuity(const Standard_Address C)
|
||||
inline GeomAbs_Shape HLRBRep_CurveTool::Continuity(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Continuity());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Integer HLRBRep_CurveTool::NbIntervals(const Standard_Address C)
|
||||
inline Standard_Integer HLRBRep_CurveTool::NbIntervals(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
#if IS_C2_COMPOSITE
|
||||
return (((HLRBRep_Curve*)C)->NbIntervals(GeomAbs_C2));
|
||||
@@ -63,7 +63,7 @@ inline Standard_Integer HLRBRep_CurveTool::NbIntervals(const Standard_Address C)
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::Intervals(const Standard_Address C, TColStd_Array1OfReal& Tab)
|
||||
inline void HLRBRep_CurveTool::Intervals(const HLRBRep_CurvePtr C, TColStd_Array1OfReal& Tab)
|
||||
{
|
||||
#if IS_C2_COMPOSITE
|
||||
((HLRBRep_Curve*)C)->Intervals(Tab, GeomAbs_C2);
|
||||
@@ -74,7 +74,7 @@ inline void HLRBRep_CurveTool::Intervals(const Standard_Address C, TColStd_Array
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::GetInterval(const Standard_Address /*C*/,
|
||||
inline void HLRBRep_CurveTool::GetInterval(const HLRBRep_CurvePtr /*C*/,
|
||||
const Standard_Integer i,
|
||||
const TColStd_Array1OfReal& Tab,
|
||||
Standard_Real& a,
|
||||
@@ -86,42 +86,42 @@ inline void HLRBRep_CurveTool::GetInterval(const Standard_Address /*C*/,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Boolean HLRBRep_CurveTool::IsClosed(const Standard_Address C)
|
||||
inline Standard_Boolean HLRBRep_CurveTool::IsClosed(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->IsClosed());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Boolean HLRBRep_CurveTool::IsPeriodic(const Standard_Address C)
|
||||
inline Standard_Boolean HLRBRep_CurveTool::IsPeriodic(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->IsPeriodic());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Real HLRBRep_CurveTool::Period(const Standard_Address C)
|
||||
inline Standard_Real HLRBRep_CurveTool::Period(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Period());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Pnt2d HLRBRep_CurveTool::Value(const Standard_Address C, const Standard_Real U)
|
||||
inline gp_Pnt2d HLRBRep_CurveTool::Value(const HLRBRep_CurvePtr C, const Standard_Real U)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Value(U));
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::D0(const Standard_Address C, const Standard_Real U, gp_Pnt2d& P)
|
||||
inline void HLRBRep_CurveTool::D0(const HLRBRep_CurvePtr C, const Standard_Real U, gp_Pnt2d& P)
|
||||
{
|
||||
((HLRBRep_Curve*)C)->D0(U, P);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::D1(const Standard_Address C,
|
||||
inline void HLRBRep_CurveTool::D1(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& T)
|
||||
@@ -131,7 +131,7 @@ inline void HLRBRep_CurveTool::D1(const Standard_Address C,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::D2(const Standard_Address C,
|
||||
inline void HLRBRep_CurveTool::D2(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& T,
|
||||
@@ -142,7 +142,7 @@ inline void HLRBRep_CurveTool::D2(const Standard_Address C,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_CurveTool::D3(const Standard_Address C,
|
||||
inline void HLRBRep_CurveTool::D3(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& V1,
|
||||
@@ -154,7 +154,7 @@ inline void HLRBRep_CurveTool::D3(const Standard_Address C,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Vec2d HLRBRep_CurveTool::DN(const Standard_Address C,
|
||||
inline gp_Vec2d HLRBRep_CurveTool::DN(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real U,
|
||||
const Standard_Integer N)
|
||||
{
|
||||
@@ -163,7 +163,7 @@ inline gp_Vec2d HLRBRep_CurveTool::DN(const Standard_Address C,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Real HLRBRep_CurveTool::Resolution(const Standard_Address C,
|
||||
inline Standard_Real HLRBRep_CurveTool::Resolution(const HLRBRep_CurvePtr C,
|
||||
const Standard_Real R3d)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Resolution(R3d));
|
||||
@@ -171,56 +171,56 @@ inline Standard_Real HLRBRep_CurveTool::Resolution(const Standard_Address C,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline GeomAbs_CurveType HLRBRep_CurveTool::GetType(const Standard_Address C)
|
||||
inline GeomAbs_CurveType HLRBRep_CurveTool::GetType(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->GetType());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline GeomAbs_CurveType HLRBRep_CurveTool::TheType(const Standard_Address C)
|
||||
inline GeomAbs_CurveType HLRBRep_CurveTool::TheType(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->GetType());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Lin2d HLRBRep_CurveTool::Line(const Standard_Address C)
|
||||
inline gp_Lin2d HLRBRep_CurveTool::Line(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Line());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Circ2d HLRBRep_CurveTool::Circle(const Standard_Address C)
|
||||
inline gp_Circ2d HLRBRep_CurveTool::Circle(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Circle());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Elips2d HLRBRep_CurveTool::Ellipse(const Standard_Address C)
|
||||
inline gp_Elips2d HLRBRep_CurveTool::Ellipse(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Ellipse());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Parab2d HLRBRep_CurveTool::Parabola(const Standard_Address C)
|
||||
inline gp_Parab2d HLRBRep_CurveTool::Parabola(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Parabola());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Hypr2d HLRBRep_CurveTool::Hyperbola(const Standard_Address C)
|
||||
inline gp_Hypr2d HLRBRep_CurveTool::Hyperbola(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Hyperbola());
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Handle(Geom2d_BezierCurve) HLRBRep_CurveTool::Bezier(const Standard_Address /*C*/)
|
||||
inline Handle(Geom2d_BezierCurve) HLRBRep_CurveTool::Bezier(const HLRBRep_CurvePtr /*C*/)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout << " HLRBRep_CurveTool::Bezier : Not Implemented " << std::endl;
|
||||
@@ -231,7 +231,7 @@ inline Handle(Geom2d_BezierCurve) HLRBRep_CurveTool::Bezier(const Standard_Addre
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Handle(Geom2d_BSplineCurve) HLRBRep_CurveTool::BSpline(const Standard_Address /*C*/)
|
||||
inline Handle(Geom2d_BSplineCurve) HLRBRep_CurveTool::BSpline(const HLRBRep_CurvePtr /*C*/)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
std::cout << " HLRBRep_CurveTool::BSpline : Not Implemented " << std::endl;
|
||||
@@ -242,14 +242,14 @@ inline Handle(Geom2d_BSplineCurve) HLRBRep_CurveTool::BSpline(const Standard_Add
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Real HLRBRep_CurveTool::EpsX(const Standard_Address /*C*/)
|
||||
inline Standard_Real HLRBRep_CurveTool::EpsX(const HLRBRep_CurvePtr /*C*/)
|
||||
{
|
||||
return (1e-10);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Integer HLRBRep_CurveTool::Degree(const Standard_Address C)
|
||||
inline Standard_Integer HLRBRep_CurveTool::Degree(const HLRBRep_CurvePtr C)
|
||||
{
|
||||
return (((HLRBRep_Curve*)C)->Degree());
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue(const Standard_Address F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg)
|
||||
Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue(const HLRBRep_SurfacePtr F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg)
|
||||
{
|
||||
gp_Pnt P;
|
||||
gp_Vec D1U, D1V, D2U, D2V, D2UV;
|
||||
@@ -58,11 +58,11 @@ Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue(const Standard_Address F,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
|
||||
const Standard_Address E,
|
||||
const Standard_Address F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V)
|
||||
Standard_Boolean HLRBRep_EdgeFaceTool::UVPoint(const Standard_Real Par,
|
||||
const HLRBRep_CurvePtr E,
|
||||
const HLRBRep_SurfacePtr F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V)
|
||||
{
|
||||
Standard_Real pfbid, plbid;
|
||||
if (BRep_Tool::CurveOnSurface(((HLRBRep_Curve*)E)->Curve().Edge(),
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
|
||||
class gp_Dir;
|
||||
|
||||
//! The EdgeFaceTool computes the UV coordinates at a
|
||||
@@ -31,17 +33,17 @@ class HLRBRep_EdgeFaceTool
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT static Standard_Real CurvatureValue(const Standard_Address F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg);
|
||||
Standard_EXPORT static Standard_Real CurvatureValue(const HLRBRep_SurfacePtr F,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const gp_Dir& Tg);
|
||||
|
||||
//! return True if U and V are found.
|
||||
Standard_EXPORT static Standard_Boolean UVPoint(const Standard_Real Par,
|
||||
const Standard_Address E,
|
||||
const Standard_Address F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V);
|
||||
Standard_EXPORT static Standard_Boolean UVPoint(const Standard_Real Par,
|
||||
const HLRBRep_CurvePtr E,
|
||||
const HLRBRep_SurfacePtr F,
|
||||
Standard_Real& U,
|
||||
Standard_Real& V);
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
@@ -36,8 +37,8 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter(
|
||||
const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
const HLRBRep_CurvePtr& C1,
|
||||
const HLRBRep_CurvePtr& C2,
|
||||
const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT void Perform(const HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter& Poly1,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include <HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx>
|
||||
#include <HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx>
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntCurve_IntConicConic.hxx>
|
||||
#include <HLRBRep_TheIntConicCurveOfCInter.hxx>
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
@@ -47,7 +48,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Lin2d& L,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -55,7 +56,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Circ2d& C,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -63,7 +64,7 @@ public:
|
||||
//! Intersection between an ellipse and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Elips2d& E,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -71,7 +72,7 @@ public:
|
||||
//! Intersection between a parabola and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Parab2d& Prb,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -80,7 +81,7 @@ public:
|
||||
//! and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Hypr2d& H,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -88,7 +89,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
Standard_EXPORT void Perform(const gp_Lin2d& L,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -96,7 +97,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
Standard_EXPORT void Perform(const gp_Circ2d& C,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -104,7 +105,7 @@ public:
|
||||
//! Intersection between an ellipse and a parametric curve.
|
||||
Standard_EXPORT void Perform(const gp_Elips2d& E,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -112,7 +113,7 @@ public:
|
||||
//! Intersection between a parabola and a parametric curve.
|
||||
Standard_EXPORT void Perform(const gp_Parab2d& Prb,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -121,7 +122,7 @@ public:
|
||||
//! and a parametric curve.
|
||||
Standard_EXPORT void Perform(const gp_Hypr2d& H,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -130,7 +131,7 @@ protected:
|
||||
private:
|
||||
Standard_EXPORT void InternalPerform(const gp_Lin2d& Lin1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -138,7 +139,7 @@ private:
|
||||
|
||||
Standard_EXPORT void InternalPerform(const gp_Circ2d& Circ1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -146,7 +147,7 @@ private:
|
||||
|
||||
Standard_EXPORT void InternalPerform(const gp_Elips2d& Eli1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -154,7 +155,7 @@ private:
|
||||
|
||||
Standard_EXPORT void InternalPerform(const gp_Parab2d& Prb1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -162,7 +163,7 @@ private:
|
||||
|
||||
Standard_EXPORT void InternalPerform(const gp_Hypr2d& Hpr1,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#define TheImpTool IntCurve_IConicTool
|
||||
#define TheImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ThePCurve Standard_Address
|
||||
#define ThePCurve_hxx <Standard_Address.hxx>
|
||||
#define ThePCurve HLRBRep_CurvePtr
|
||||
#define ThePCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define ThePCurveTool HLRBRep_CurveTool
|
||||
#define ThePCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define TheIntConicCurve HLRBRep_TheIntConicCurveOfCInter
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <math_FunctionWithDerivative.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
@@ -36,7 +37,7 @@ public:
|
||||
//! Constructor of the class.
|
||||
Standard_EXPORT HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(
|
||||
const IntCurve_IConicTool& IT,
|
||||
const Standard_Address& PC);
|
||||
const HLRBRep_CurvePtr& PC);
|
||||
|
||||
//! Computes the value of the signed distance between
|
||||
//! the implicit curve and the point at parameter Param
|
||||
@@ -56,7 +57,7 @@ public:
|
||||
|
||||
protected:
|
||||
private:
|
||||
Standard_Address TheParCurve;
|
||||
HLRBRep_CurvePtr TheParCurve;
|
||||
IntCurve_IConicTool TheImpTool;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::
|
||||
HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& ITool,
|
||||
const Standard_Address& PC)
|
||||
const HLRBRep_CurvePtr& PC)
|
||||
: TheImpTool(ITool)
|
||||
{
|
||||
TheParCurve = (Standard_Address)(&PC);
|
||||
TheParCurve = (HLRBRep_CurvePtr)(&PC);
|
||||
}
|
||||
|
||||
Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter::Value(
|
||||
@@ -34,7 +34,7 @@ Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter:
|
||||
Standard_Real& ApproxDistance)
|
||||
{
|
||||
ApproxDistance =
|
||||
TheImpTool.Distance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
|
||||
TheImpTool.Distance(HLRBRep_CurveTool::Value((*((HLRBRep_CurvePtr*)(TheParCurve))), Param));
|
||||
return (Standard_True);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ Standard_Boolean HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter:
|
||||
gp_Pnt2d Pt;
|
||||
gp_Vec2d TanParCurve;
|
||||
gp_Vec2d Grad =
|
||||
TheImpTool.GradDistance(HLRBRep_CurveTool::Value((*((Standard_Address*)(TheParCurve))), Param));
|
||||
HLRBRep_CurveTool::D1((*((Standard_Address*)(TheParCurve))), Param, Pt, TanParCurve);
|
||||
TheImpTool.GradDistance(HLRBRep_CurveTool::Value((*((HLRBRep_CurvePtr*)(TheParCurve))), Param));
|
||||
HLRBRep_CurveTool::D1((*((HLRBRep_CurvePtr*)(TheParCurve))), Param, Pt, TanParCurve);
|
||||
D_ApproxDistance_DV = Grad.Dot(TanParCurve);
|
||||
return (Standard_True);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <Extrema_GFuncExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
//! Type alias for 2D curve extremum function using HLRBRep_CurveTool.
|
||||
using HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter =
|
||||
Extrema_GFuncExtPC<Standard_Address,
|
||||
Extrema_GFuncExtPC<HLRBRep_CurvePtr,
|
||||
HLRBRep_CurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
@@ -49,17 +50,17 @@ public:
|
||||
//! only the tangent, N should be equal to 1.
|
||||
//! <Resolution> is the linear tolerance (it is used to test
|
||||
//! if a vector is null).
|
||||
Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer N,
|
||||
const Standard_Real Resolution);
|
||||
Standard_EXPORT HLRBRep_SLProps(const HLRBRep_SurfacePtr& S,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer N,
|
||||
const Standard_Real Resolution);
|
||||
|
||||
//! idem as previous constructor but without setting the value
|
||||
//! of parameters <U> and <V>.
|
||||
Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S,
|
||||
const Standard_Integer N,
|
||||
const Standard_Real Resolution);
|
||||
Standard_EXPORT HLRBRep_SLProps(const HLRBRep_SurfacePtr& S,
|
||||
const Standard_Integer N,
|
||||
const Standard_Real Resolution);
|
||||
|
||||
//! idem as previous constructor but without setting the value
|
||||
//! of parameters <U> and <V> and the surface.
|
||||
@@ -68,7 +69,7 @@ public:
|
||||
|
||||
//! Initializes the local properties of the surface S
|
||||
//! for the new surface.
|
||||
Standard_EXPORT void SetSurface(const Standard_Address& S);
|
||||
Standard_EXPORT void SetSurface(const HLRBRep_SurfacePtr& S);
|
||||
|
||||
//! Initializes the local properties of the surface S
|
||||
//! for the new parameter values (<U>, <V>).
|
||||
@@ -144,31 +145,31 @@ public:
|
||||
|
||||
protected:
|
||||
private:
|
||||
Standard_Address mySurf;
|
||||
Standard_Real myU;
|
||||
Standard_Real myV;
|
||||
Standard_Integer myDerOrder;
|
||||
Standard_Integer myCN;
|
||||
Standard_Real myLinTol;
|
||||
gp_Pnt myPnt;
|
||||
gp_Vec myD1u;
|
||||
gp_Vec myD1v;
|
||||
gp_Vec myD2u;
|
||||
gp_Vec myD2v;
|
||||
gp_Vec myDuv;
|
||||
gp_Dir myNormal;
|
||||
Standard_Real myMinCurv;
|
||||
Standard_Real myMaxCurv;
|
||||
gp_Dir myDirMinCurv;
|
||||
gp_Dir myDirMaxCurv;
|
||||
Standard_Real myMeanCurv;
|
||||
Standard_Real myGausCurv;
|
||||
Standard_Integer mySignificantFirstDerivativeOrderU;
|
||||
Standard_Integer mySignificantFirstDerivativeOrderV;
|
||||
LProp_Status myUTangentStatus;
|
||||
LProp_Status myVTangentStatus;
|
||||
LProp_Status myNormalStatus;
|
||||
LProp_Status myCurvatureStatus;
|
||||
HLRBRep_SurfacePtr mySurf;
|
||||
Standard_Real myU;
|
||||
Standard_Real myV;
|
||||
Standard_Integer myDerOrder;
|
||||
Standard_Integer myCN;
|
||||
Standard_Real myLinTol;
|
||||
gp_Pnt myPnt;
|
||||
gp_Vec myD1u;
|
||||
gp_Vec myD1v;
|
||||
gp_Vec myD2u;
|
||||
gp_Vec myD2v;
|
||||
gp_Vec myDuv;
|
||||
gp_Dir myNormal;
|
||||
Standard_Real myMinCurv;
|
||||
Standard_Real myMaxCurv;
|
||||
gp_Dir myDirMinCurv;
|
||||
gp_Dir myDirMaxCurv;
|
||||
Standard_Real myMeanCurv;
|
||||
Standard_Real myGausCurv;
|
||||
Standard_Integer mySignificantFirstDerivativeOrderU;
|
||||
Standard_Integer mySignificantFirstDerivativeOrderV;
|
||||
LProp_Status myUTangentStatus;
|
||||
LProp_Status myVTangentStatus;
|
||||
LProp_Status myNormalStatus;
|
||||
LProp_Status myCurvatureStatus;
|
||||
};
|
||||
|
||||
#endif // _HLRBRep_SLProps_HeaderFile
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
@@ -32,51 +33,51 @@ public:
|
||||
|
||||
//! Computes the point <P> of parameter <U> and <V>
|
||||
//! on the Surface <A>.
|
||||
static void Value(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P);
|
||||
static void Value(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P);
|
||||
|
||||
//! Computes the point <P> and first derivative <D1*>
|
||||
//! of parameter <U> and <V> on the Surface <A>.
|
||||
static void D1(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V);
|
||||
static void D1(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V);
|
||||
|
||||
//! Computes the point <P>, the first derivative <D1*>
|
||||
//! and second derivative <D2*> of parameter <U> and
|
||||
//! <V> on the Surface <A>.
|
||||
static void D2(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V,
|
||||
gp_Vec& D2U,
|
||||
gp_Vec& D2V,
|
||||
gp_Vec& DUV);
|
||||
static void D2(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V,
|
||||
gp_Vec& D2U,
|
||||
gp_Vec& D2V,
|
||||
gp_Vec& DUV);
|
||||
|
||||
static gp_Vec DN(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer Nu,
|
||||
const Standard_Integer Nv);
|
||||
static gp_Vec DN(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer Nu,
|
||||
const Standard_Integer Nv);
|
||||
|
||||
//! returns the order of continuity of the Surface <A>.
|
||||
//! returns 1 : first derivative only is computable
|
||||
//! returns 2 : first and second derivative only are
|
||||
//! computable.
|
||||
static Standard_Integer Continuity(const Standard_Address A);
|
||||
static Standard_Integer Continuity(const HLRBRep_SurfacePtr A);
|
||||
|
||||
//! returns the bounds of the Surface.
|
||||
static void Bounds(const Standard_Address A,
|
||||
Standard_Real& U1,
|
||||
Standard_Real& V1,
|
||||
Standard_Real& U2,
|
||||
Standard_Real& V2);
|
||||
static void Bounds(const HLRBRep_SurfacePtr A,
|
||||
Standard_Real& U1,
|
||||
Standard_Real& V1,
|
||||
Standard_Real& U2,
|
||||
Standard_Real& V2);
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
||||
@@ -20,62 +20,62 @@
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_SLPropsATool::Value(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P)
|
||||
inline void HLRBRep_SLPropsATool::Value(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P)
|
||||
{
|
||||
P = ((HLRBRep_Surface*)A)->Value(U, V);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_SLPropsATool::D1(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V)
|
||||
inline void HLRBRep_SLPropsATool::D1(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V)
|
||||
{
|
||||
((HLRBRep_Surface*)A)->D1(U, V, P, D1U, D1V);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_SLPropsATool::D2(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V,
|
||||
gp_Vec& D2U,
|
||||
gp_Vec& D2V,
|
||||
gp_Vec& DUV)
|
||||
inline void HLRBRep_SLPropsATool::D2(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& D1U,
|
||||
gp_Vec& D1V,
|
||||
gp_Vec& D2U,
|
||||
gp_Vec& D2V,
|
||||
gp_Vec& DUV)
|
||||
{
|
||||
((HLRBRep_Surface*)A)->D2(U, V, P, D1U, D1V, D2U, D2V, DUV);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline gp_Vec HLRBRep_SLPropsATool::DN(const Standard_Address A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer Nu,
|
||||
const Standard_Integer Nv)
|
||||
inline gp_Vec HLRBRep_SLPropsATool::DN(const HLRBRep_SurfacePtr A,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Integer Nu,
|
||||
const Standard_Integer Nv)
|
||||
{
|
||||
return ((HLRBRep_Surface*)A)->DN(U, V, Nu, Nv);
|
||||
}
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline Standard_Integer HLRBRep_SLPropsATool::Continuity(const Standard_Address)
|
||||
inline Standard_Integer HLRBRep_SLPropsATool::Continuity(const HLRBRep_SurfacePtr)
|
||||
{
|
||||
return 2;
|
||||
} // et boum ! cky le 27 - 04 - 1993
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
inline void HLRBRep_SLPropsATool::Bounds(const Standard_Address,
|
||||
inline void HLRBRep_SLPropsATool::Bounds(const HLRBRep_SurfacePtr,
|
||||
Standard_Real& U1,
|
||||
Standard_Real& V1,
|
||||
Standard_Real& U2,
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
|
||||
#define Surface Standard_Address
|
||||
#define Surface_hxx <Standard_Address.hxx>
|
||||
#define Surface HLRBRep_SurfacePtr
|
||||
#define Surface_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define Tool HLRBRep_SLPropsATool
|
||||
#define Tool_hxx <HLRBRep_SLPropsATool.hxx>
|
||||
#define LProp_SLProps HLRBRep_SLProps
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
|
||||
#include <Extrema_GCurveLocator.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
|
||||
//! Type alias for curve locator using HLRBRep_CurveTool.
|
||||
using HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter =
|
||||
Extrema_GCurveLocator<Standard_Address, HLRBRep_CurveTool, Extrema_POnCurv2d, gp_Pnt2d>;
|
||||
Extrema_GCurveLocator<HLRBRep_CurvePtr, HLRBRep_CurveTool, Extrema_POnCurv2d, gp_Pnt2d>;
|
||||
|
||||
#endif // _HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
@@ -34,8 +35,8 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter(
|
||||
const Standard_Address& curve1,
|
||||
const Standard_Address& curve2);
|
||||
const HLRBRep_CurvePtr& curve1,
|
||||
const HLRBRep_CurvePtr& curve2);
|
||||
|
||||
//! returns 2.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
@@ -63,8 +64,8 @@ public:
|
||||
|
||||
protected:
|
||||
private:
|
||||
Standard_Address thecurve1;
|
||||
Standard_Address thecurve2;
|
||||
HLRBRep_CurvePtr thecurve1;
|
||||
HLRBRep_CurvePtr thecurve2;
|
||||
};
|
||||
|
||||
#endif // _HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter_HeaderFile
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define IntCurve_DistBetweenPCurvesGen HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
class IntCurve_IConicTool;
|
||||
class HLRBRep_CurveTool;
|
||||
@@ -44,7 +45,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
HLRBRep_TheIntConicCurveOfCInter(const gp_Lin2d& L,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -52,7 +53,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Circ2d& C,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -60,7 +61,7 @@ public:
|
||||
//! Intersection between an ellipse and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Elips2d& E,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -68,7 +69,7 @@ public:
|
||||
//! Intersection between a parabola and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Parab2d& Prb,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -77,7 +78,7 @@ public:
|
||||
//! and a parametric curve.
|
||||
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Hypr2d& H,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
void Perform(const gp_Lin2d& L,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -93,7 +94,7 @@ public:
|
||||
//! Intersection between a line and a parametric curve.
|
||||
void Perform(const gp_Circ2d& C,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -101,7 +102,7 @@ public:
|
||||
//! Intersection between an ellipse and a parametric curve.
|
||||
void Perform(const gp_Elips2d& E,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -109,7 +110,7 @@ public:
|
||||
//! Intersection between a parabola and a parametric curve.
|
||||
void Perform(const gp_Parab2d& Prb,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -118,7 +119,7 @@ public:
|
||||
//! and a parametric curve.
|
||||
void Perform(const gp_Hypr2d& H,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -129,7 +130,7 @@ private:
|
||||
//! and a parametric curve.
|
||||
void Perform(const IntCurve_IConicTool& ICurve,
|
||||
const IntRes2d_Domain& D1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& D2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -137,8 +138,8 @@ private:
|
||||
|
||||
#define TheImpTool IntCurve_IConicTool
|
||||
#define TheImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ThePCurve Standard_Address
|
||||
#define ThePCurve_hxx <Standard_Address.hxx>
|
||||
#define ThePCurve HLRBRep_CurvePtr
|
||||
#define ThePCurve_hxx <HLRBRep_CurvePtr.hxx>
|
||||
#define ThePCurveTool HLRBRep_CurveTool
|
||||
#define ThePCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
#define TheImpTool IntCurve_IConicTool
|
||||
#define TheImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ThePCurve Standard_Address
|
||||
#define ThePCurve_hxx <Standard_Address.hxx>
|
||||
#define ThePCurve HLRBRep_CurvePtr
|
||||
#define ThePCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define ThePCurveTool HLRBRep_CurveTool
|
||||
#define ThePCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
@@ -37,14 +38,14 @@ public:
|
||||
|
||||
Standard_EXPORT HLRBRep_TheIntPCurvePCurveOfCInter();
|
||||
|
||||
Standard_EXPORT void Perform(const Standard_Address& Curve1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& Curve1,
|
||||
const IntRes2d_Domain& Domain1,
|
||||
const Standard_Address& Curve2,
|
||||
const HLRBRep_CurvePtr& Curve2,
|
||||
const IntRes2d_Domain& Domain2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT void Perform(const Standard_Address& Curve1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& Curve1,
|
||||
const IntRes2d_Domain& Domain1,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -54,9 +55,9 @@ public:
|
||||
Standard_EXPORT Standard_Integer GetMinNbSamples() const;
|
||||
|
||||
protected:
|
||||
Standard_EXPORT void Perform(const Standard_Address& Curve1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& Curve1,
|
||||
const IntRes2d_Domain& Domain1,
|
||||
const Standard_Address& Curve2,
|
||||
const HLRBRep_CurvePtr& Curve2,
|
||||
const IntRes2d_Domain& Domain2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -64,7 +65,7 @@ protected:
|
||||
const Standard_Real DeltaU,
|
||||
const Standard_Real DeltaV);
|
||||
|
||||
Standard_EXPORT void Perform(const Standard_Address& Curve1,
|
||||
Standard_EXPORT void Perform(const HLRBRep_CurvePtr& Curve1,
|
||||
const IntRes2d_Domain& Domain1,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
@@ -79,9 +80,9 @@ private:
|
||||
//! : for case when point of intersection was found
|
||||
//! : during prelimanary search for line (case of bad parameterization of Bspline for example).
|
||||
Standard_EXPORT Standard_Boolean
|
||||
findIntersect(const Standard_Address& Curve1,
|
||||
findIntersect(const HLRBRep_CurvePtr& Curve1,
|
||||
const IntRes2d_Domain& Domain1,
|
||||
const Standard_Address& Curve2,
|
||||
const HLRBRep_CurvePtr& Curve2,
|
||||
const IntRes2d_Domain& Domain2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol,
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define TheProjPCur HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
@@ -46,7 +47,7 @@ public:
|
||||
//! and HasLastPoint return True.
|
||||
Standard_EXPORT HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& ITool,
|
||||
const IntRes2d_Domain& Dom1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& Dom2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
@@ -58,27 +59,27 @@ public:
|
||||
//! and HasLastPoint return True.
|
||||
Standard_EXPORT void Perform(const IntCurve_IConicTool& ITool,
|
||||
const IntRes2d_Domain& Dom1,
|
||||
const Standard_Address& PCurve,
|
||||
const HLRBRep_CurvePtr& PCurve,
|
||||
const IntRes2d_Domain& Dom2,
|
||||
const Standard_Real TolConf,
|
||||
const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT Standard_Real FindU(const Standard_Real parameter,
|
||||
gp_Pnt2d& point,
|
||||
const Standard_Address& TheParCurev,
|
||||
const HLRBRep_CurvePtr& TheParCurev,
|
||||
const IntCurve_IConicTool& TheImpTool) const;
|
||||
|
||||
Standard_EXPORT Standard_Real FindV(const Standard_Real parameter,
|
||||
gp_Pnt2d& point,
|
||||
const IntCurve_IConicTool& TheImpTool,
|
||||
const Standard_Address& ParCurve,
|
||||
const HLRBRep_CurvePtr& ParCurve,
|
||||
const IntRes2d_Domain& TheParCurveDomain,
|
||||
const Standard_Real V0,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real Tolerance) const;
|
||||
|
||||
Standard_EXPORT void And_Domaine_Objet1_Intersections(const IntCurve_IConicTool& TheImpTool,
|
||||
const Standard_Address& TheParCurve,
|
||||
const HLRBRep_CurvePtr& TheParCurve,
|
||||
const IntRes2d_Domain& TheImpCurveDomain,
|
||||
const IntRes2d_Domain& TheParCurveDomain,
|
||||
Standard_Integer& NbResultats,
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#define ImpTool IntCurve_IConicTool
|
||||
#define ImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ParCurve Standard_Address
|
||||
#define ParCurve_hxx <Standard_Address.hxx>
|
||||
#define ParCurve HLRBRep_CurvePtr
|
||||
#define ParCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define ParTool HLRBRep_CurveTool
|
||||
#define ParTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define ProjectOnPCurveTool HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <Extrema_GenLocateExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
@@ -26,7 +27,7 @@
|
||||
|
||||
//! Type alias for HLRBRep local extremum search.
|
||||
using HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter =
|
||||
Extrema_GenLocateExtPC<Standard_Address,
|
||||
Extrema_GenLocateExtPC<HLRBRep_CurvePtr,
|
||||
HLRBRep_CurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
@@ -38,7 +39,7 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Compute a polygon on the domain of the curve.
|
||||
Standard_EXPORT HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter(const Standard_Address& Curve,
|
||||
Standard_EXPORT HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter(const HLRBRep_CurvePtr& Curve,
|
||||
const Standard_Integer NbPnt,
|
||||
const IntRes2d_Domain& Domain,
|
||||
const Standard_Real Tol);
|
||||
@@ -48,7 +49,7 @@ public:
|
||||
//! outside the box <OtherBox>. In this
|
||||
//! situation, bounds are computed to build
|
||||
//! a polygon inside or near the OtherBox.
|
||||
Standard_EXPORT void ComputeWithBox(const Standard_Address& Curve, const Bnd_Box2d& OtherBox);
|
||||
Standard_EXPORT void ComputeWithBox(const HLRBRep_CurvePtr& Curve, const Bnd_Box2d& OtherBox);
|
||||
|
||||
virtual Standard_Real DeflectionOverEstimation() const Standard_OVERRIDE;
|
||||
|
||||
@@ -104,8 +105,8 @@ private:
|
||||
Standard_Real Bsup;
|
||||
};
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_CurvePtr.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define IntCurve_Polygon2dGen HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include <Bnd_Box2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#define TheCurve Standard_Address
|
||||
#define TheCurve_hxx <Standard_Address.hxx>
|
||||
#define TheCurve HLRBRep_CurvePtr
|
||||
#define TheCurve_hxx <HLRBRep_TypeDef.hxx>
|
||||
#define TheCurveTool HLRBRep_CurveTool
|
||||
#define TheCurveTool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define IntCurve_Polygon2dGen HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <HLRBRep_TypeDef.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class HLRBRep_CurveTool;
|
||||
class gp_Pnt2d;
|
||||
@@ -42,7 +43,7 @@ public:
|
||||
//! In that case, no bounds are given. The research of
|
||||
//! the right parameter has to be made on the natural
|
||||
//! parametric domain of the curve.
|
||||
Standard_EXPORT static Standard_Real FindParameter(const Standard_Address& C,
|
||||
Standard_EXPORT static Standard_Real FindParameter(const HLRBRep_CurvePtr& C,
|
||||
const gp_Pnt2d& Pnt,
|
||||
const Standard_Real Tol);
|
||||
|
||||
@@ -60,7 +61,7 @@ public:
|
||||
//! implement a more efficient algorithm. So, it is not
|
||||
//! necessary to check that the returned value verifies
|
||||
//! LowParameter <= Value <= HighParameter.
|
||||
Standard_EXPORT static Standard_Real FindParameter(const Standard_Address& C,
|
||||
Standard_EXPORT static Standard_Real FindParameter(const HLRBRep_CurvePtr& C,
|
||||
const gp_Pnt2d& Pnt,
|
||||
const Standard_Real LowParameter,
|
||||
const Standard_Real HighParameter,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
|
||||
Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
|
||||
Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const HLRBRep_CurvePtr& C,
|
||||
const gp_Pnt2d& P,
|
||||
const Standard_Real LowParameter,
|
||||
const Standard_Real HighParameter,
|
||||
@@ -63,7 +63,7 @@ Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address&
|
||||
return theparam;
|
||||
}
|
||||
|
||||
Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const Standard_Address& C,
|
||||
Standard_Real HLRBRep_TheProjPCurOfCInter::FindParameter(const HLRBRep_CurvePtr& C,
|
||||
const gp_Pnt2d& P,
|
||||
const Standard_Real Tol)
|
||||
{
|
||||
|
||||
29
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_TypeDef.hxx
Normal file
29
src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_TypeDef.hxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2025 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _HLRBRep_TypeDef_HeaderFile
|
||||
#define _HLRBRep_TypeDef_HeaderFile
|
||||
|
||||
//! Type alias for curve pointer used in HLRBRep algorithms.
|
||||
//! This provides a named type (void*) for curve pointers used in generic
|
||||
//! algorithm interfaces, replacing the deprecated Standard_Address.
|
||||
//! The void* type is required for compatibility with the generic template
|
||||
//! instantiation system that uses const reference parameters.
|
||||
typedef void* HLRBRep_CurvePtr;
|
||||
|
||||
//! Type alias for surface pointer used in HLRBRep algorithms.
|
||||
//! This provides a named type (void*) for surface pointers used in generic
|
||||
//! algorithm interfaces, replacing the deprecated Standard_Address.
|
||||
typedef void* HLRBRep_SurfacePtr;
|
||||
|
||||
#endif // _HLRBRep_TypeDef_HeaderFile
|
||||
Reference in New Issue
Block a user