Modeling Data - Enforce construction-time initialization for Prop and GridEval classes (#1118)

Replace two-step initialization (default constructor + Initialize) with
direct construction for 8 non-copyable/non-movable property and grid
evaluator classes. Objects are now always in a valid state after construction.

Refactored classes:
- GeomProp_Curve, GeomProp_Surface (TKG3d)
- Geom2dProp_Curve (TKG2d)
- BRepProp_Curve, BRepProp_Surface (TKBRep)
- GeomGridEval_Curve, GeomGridEval_Surface (TKG3d)
- Geom2dGridEval_Curve (TKG2d)

Changes per class:
- Remove default constructor and IsInitialized() method.
- Add constructors matching each former Initialize overload.
- Rename Initialize to protected initialization method for internal
  and derived class use.

All callers updated across production code (Extrema, BndLib,
IntCurveSurface, IntPatch, HLRBRep, GeomGridEval derived classes)
and test files to use constructor-based initialization.
This commit is contained in:
Pasukhin Dmitry
2026-02-25 15:06:57 +00:00
committed by GitHub
parent 33ef11ca53
commit 12b54504ee
43 changed files with 670 additions and 958 deletions

View File

@@ -22,7 +22,28 @@
//==================================================================================================
void BRepProp_Curve::Initialize(const TopoDS_Edge& theEdge)
BRepProp_Curve::BRepProp_Curve(const TopoDS_Edge& theEdge)
{
initialization(theEdge);
}
//==================================================================================================
BRepProp_Curve::BRepProp_Curve(const BRepAdaptor_Curve& theCurve)
{
initialization(theCurve);
}
//==================================================================================================
BRepProp_Curve::BRepProp_Curve(const occ::handle<BRepAdaptor_Curve>& theCurve)
{
initialization(theCurve);
}
//==================================================================================================
void BRepProp_Curve::initialization(const TopoDS_Edge& theEdge)
{
if (theEdge.IsNull())
{
@@ -36,7 +57,7 @@ void BRepProp_Curve::Initialize(const TopoDS_Edge& theEdge)
//==================================================================================================
void BRepProp_Curve::Initialize(const BRepAdaptor_Curve& theCurve)
void BRepProp_Curve::initialization(const BRepAdaptor_Curve& theCurve)
{
myOwned.Nullify();
myPtr = &theCurve;
@@ -44,7 +65,7 @@ void BRepProp_Curve::Initialize(const BRepAdaptor_Curve& theCurve)
//==================================================================================================
void BRepProp_Curve::Initialize(const occ::handle<BRepAdaptor_Curve>& theCurve)
void BRepProp_Curve::initialization(const occ::handle<BRepAdaptor_Curve>& theCurve)
{
myOwned = theCurve;
myPtr = myOwned.get();
@@ -54,10 +75,6 @@ void BRepProp_Curve::Initialize(const occ::handle<BRepAdaptor_Curve>& theCurve)
GeomProp::TangentResult BRepProp_Curve::Tangent(const double theParam, const double theTol) const
{
if (!IsInitialized())
{
return {{}, false};
}
gp_Pnt aPnt;
gp_Vec aD1, aD2, aD3;
myPtr->D3(theParam, aPnt, aD1, aD2, aD3);
@@ -69,10 +86,6 @@ GeomProp::TangentResult BRepProp_Curve::Tangent(const double theParam, const dou
GeomProp::CurvatureResult BRepProp_Curve::Curvature(const double theParam,
const double theTol) const
{
if (!IsInitialized())
{
return {};
}
gp_Pnt aPnt;
gp_Vec aD1, aD2;
myPtr->D2(theParam, aPnt, aD1, aD2);
@@ -83,10 +96,6 @@ GeomProp::CurvatureResult BRepProp_Curve::Curvature(const double theParam,
GeomProp::NormalResult BRepProp_Curve::Normal(const double theParam, const double theTol) const
{
if (!IsInitialized())
{
return {{}, false};
}
gp_Pnt aPnt;
gp_Vec aD1, aD2;
myPtr->D2(theParam, aPnt, aD1, aD2);
@@ -98,10 +107,6 @@ GeomProp::NormalResult BRepProp_Curve::Normal(const double theParam, const doubl
GeomProp::CentreResult BRepProp_Curve::CentreOfCurvature(const double theParam,
const double theTol) const
{
if (!IsInitialized())
{
return {{}, false};
}
gp_Pnt aPnt;
gp_Vec aD1, aD2;
myPtr->D2(theParam, aPnt, aD1, aD2);
@@ -139,9 +144,8 @@ GeomAbs_Shape BRepProp_Curve::Continuity(const BRepAdaptor_Curve& theCurve1,
aN2 = 1;
// Evaluate properties at junction points.
BRepProp_Curve aProp1, aProp2;
aProp1.Initialize(theCurve1);
aProp2.Initialize(theCurve2);
BRepProp_Curve aProp1(theCurve1);
BRepProp_Curve aProp2(theCurve2);
// Check point coincidence.
gp_Pnt aPnt1, aPnt2;

View File

@@ -35,8 +35,7 @@ class TopoDS_Edge;
//!
//! Usage:
//! @code
//! BRepProp_Curve aProp;
//! aProp.Initialize(myEdge);
//! BRepProp_Curve aProp(myEdge);
//! GeomProp::CurvatureResult aCurv = aProp.Curvature(0.5, Precision::Confusion());
//! if (aCurv.IsDefined)
//! {
@@ -48,8 +47,21 @@ class BRepProp_Curve
public:
DEFINE_STANDARD_ALLOC
//! Default constructor - uninitialized state.
BRepProp_Curve() = default;
//! Construct from a TopoDS_Edge.
//! Creates an internal BRepAdaptor_Curve (owning).
//! @param[in] theEdge the edge to evaluate
Standard_EXPORT BRepProp_Curve(const TopoDS_Edge& theEdge);
//! Construct from an existing BRepAdaptor_Curve.
//! The adaptor is referenced without copying (non-owning);
//! the caller must ensure the adaptor outlives this object.
//! @param[in] theCurve the adaptor to reference
Standard_EXPORT BRepProp_Curve(const BRepAdaptor_Curve& theCurve);
//! Construct from a handle to BRepAdaptor_Curve.
//! Shares ownership of the adaptor (no copy).
//! @param[in] theCurve handle to the adaptor
Standard_EXPORT BRepProp_Curve(const occ::handle<BRepAdaptor_Curve>& theCurve);
//! Non-copyable and non-movable.
BRepProp_Curve(const BRepProp_Curve&) = delete;
@@ -57,25 +69,6 @@ public:
BRepProp_Curve(BRepProp_Curve&&) = delete;
BRepProp_Curve& operator=(BRepProp_Curve&&) = delete;
//! Initialize from a TopoDS_Edge.
//! Creates an internal BRepAdaptor_Curve (owning).
//! @param[in] theEdge the edge to evaluate
Standard_EXPORT void Initialize(const TopoDS_Edge& theEdge);
//! Initialize from an existing BRepAdaptor_Curve.
//! The adaptor is referenced without copying (non-owning);
//! the caller must ensure the adaptor outlives this object.
//! @param[in] theCurve the adaptor to reference
Standard_EXPORT void Initialize(const BRepAdaptor_Curve& theCurve);
//! Initialize from a handle to BRepAdaptor_Curve.
//! Shares ownership of the adaptor (no copy).
//! @param[in] theCurve handle to the adaptor
Standard_EXPORT void Initialize(const occ::handle<BRepAdaptor_Curve>& theCurve);
//! Returns true if properly initialized.
bool IsInitialized() const { return myPtr != nullptr; }
//! Returns the underlying adaptor.
const BRepAdaptor_Curve& Adaptor() const { return *myPtr; }
@@ -125,6 +118,19 @@ public:
double theU1,
double theU2);
protected:
//! Initialize from a TopoDS_Edge.
//! @param[in] theEdge the edge to evaluate
Standard_EXPORT void initialization(const TopoDS_Edge& theEdge);
//! Initialize from an existing BRepAdaptor_Curve (non-owning).
//! @param[in] theCurve the adaptor to reference
Standard_EXPORT void initialization(const BRepAdaptor_Curve& theCurve);
//! Initialize from a handle to BRepAdaptor_Curve.
//! @param[in] theCurve handle to the adaptor
Standard_EXPORT void initialization(const occ::handle<BRepAdaptor_Curve>& theCurve);
private:
occ::handle<BRepAdaptor_Curve> myOwned; //!< Owns the adaptor when created from TopoDS_Edge.
const BRepAdaptor_Curve* myPtr = nullptr; //!< Non-owning pointer to the active adaptor.

View File

@@ -17,7 +17,28 @@
//==================================================================================================
void BRepProp_Surface::Initialize(const TopoDS_Face& theFace)
BRepProp_Surface::BRepProp_Surface(const TopoDS_Face& theFace)
{
initialization(theFace);
}
//==================================================================================================
BRepProp_Surface::BRepProp_Surface(const BRepAdaptor_Surface& theSurface)
{
initialization(theSurface);
}
//==================================================================================================
BRepProp_Surface::BRepProp_Surface(const occ::handle<BRepAdaptor_Surface>& theSurface)
{
initialization(theSurface);
}
//==================================================================================================
void BRepProp_Surface::initialization(const TopoDS_Face& theFace)
{
if (theFace.IsNull())
{
@@ -31,7 +52,7 @@ void BRepProp_Surface::Initialize(const TopoDS_Face& theFace)
//==================================================================================================
void BRepProp_Surface::Initialize(const BRepAdaptor_Surface& theSurface)
void BRepProp_Surface::initialization(const BRepAdaptor_Surface& theSurface)
{
myOwned.Nullify();
myPtr = &theSurface;
@@ -39,7 +60,7 @@ void BRepProp_Surface::Initialize(const BRepAdaptor_Surface& theSurface)
//==================================================================================================
void BRepProp_Surface::Initialize(const occ::handle<BRepAdaptor_Surface>& theSurface)
void BRepProp_Surface::initialization(const occ::handle<BRepAdaptor_Surface>& theSurface)
{
myOwned = theSurface;
myPtr = myOwned.get();
@@ -51,7 +72,7 @@ GeomProp::SurfaceNormalResult BRepProp_Surface::Normal(const double theU,
const double theV,
const double theTol) const
{
if (!IsInitialized())
if (myPtr == nullptr)
{
return {{}, false};
}
@@ -67,7 +88,7 @@ GeomProp::SurfaceCurvatureResult BRepProp_Surface::Curvatures(const double theU,
const double theV,
const double theTol) const
{
if (!IsInitialized())
if (myPtr == nullptr)
{
return {};
}
@@ -83,7 +104,7 @@ GeomProp::MeanGaussianResult BRepProp_Surface::MeanGaussian(const double theU,
const double theV,
const double theTol) const
{
if (!IsInitialized())
if (myPtr == nullptr)
{
return {};
}

View File

@@ -34,8 +34,7 @@ class TopoDS_Face;
//!
//! Usage:
//! @code
//! BRepProp_Surface aProp;
//! aProp.Initialize(myFace);
//! BRepProp_Surface aProp(myFace);
//! GeomProp::SurfaceNormalResult aNorm = aProp.Normal(0.5, 0.5, Precision::Confusion());
//! if (aNorm.IsDefined)
//! {
@@ -47,8 +46,21 @@ class BRepProp_Surface
public:
DEFINE_STANDARD_ALLOC
//! Default constructor - uninitialized state.
BRepProp_Surface() = default;
//! Construct from a TopoDS_Face.
//! Creates an internal BRepAdaptor_Surface (owning).
//! @param[in] theFace the face to evaluate
Standard_EXPORT BRepProp_Surface(const TopoDS_Face& theFace);
//! Construct from an existing BRepAdaptor_Surface.
//! The adaptor is referenced without copying (non-owning);
//! the caller must ensure the adaptor outlives this object.
//! @param[in] theSurface the adaptor to reference
Standard_EXPORT BRepProp_Surface(const BRepAdaptor_Surface& theSurface);
//! Construct from a handle to BRepAdaptor_Surface.
//! Shares ownership of the adaptor (no copy).
//! @param[in] theSurface handle to the adaptor
Standard_EXPORT BRepProp_Surface(const occ::handle<BRepAdaptor_Surface>& theSurface);
//! Non-copyable and non-movable.
BRepProp_Surface(const BRepProp_Surface&) = delete;
@@ -56,25 +68,6 @@ public:
BRepProp_Surface(BRepProp_Surface&&) = delete;
BRepProp_Surface& operator=(BRepProp_Surface&&) = delete;
//! Initialize from a TopoDS_Face.
//! Creates an internal BRepAdaptor_Surface (owning).
//! @param[in] theFace the face to evaluate
Standard_EXPORT void Initialize(const TopoDS_Face& theFace);
//! Initialize from an existing BRepAdaptor_Surface.
//! The adaptor is referenced without copying (non-owning);
//! the caller must ensure the adaptor outlives this object.
//! @param[in] theSurface the adaptor to reference
Standard_EXPORT void Initialize(const BRepAdaptor_Surface& theSurface);
//! Initialize from a handle to BRepAdaptor_Surface.
//! Shares ownership of the adaptor (no copy).
//! @param[in] theSurface handle to the adaptor
Standard_EXPORT void Initialize(const occ::handle<BRepAdaptor_Surface>& theSurface);
//! Returns true if properly initialized.
bool IsInitialized() const { return myPtr != nullptr; }
//! Returns the underlying adaptor.
const BRepAdaptor_Surface& Adaptor() const { return *myPtr; }
@@ -105,6 +98,19 @@ public:
double theV,
double theTol) const;
protected:
//! Initialize from a TopoDS_Face.
//! @param[in] theFace the face to evaluate
Standard_EXPORT void initialization(const TopoDS_Face& theFace);
//! Initialize from an existing BRepAdaptor_Surface (non-owning).
//! @param[in] theSurface the adaptor to reference
Standard_EXPORT void initialization(const BRepAdaptor_Surface& theSurface);
//! Initialize from a handle to BRepAdaptor_Surface.
//! @param[in] theSurface handle to the adaptor
Standard_EXPORT void initialization(const occ::handle<BRepAdaptor_Surface>& theSurface);
private:
occ::handle<BRepAdaptor_Surface> myOwned; //!< Owns the adaptor when created from TopoDS_Face.
const BRepAdaptor_Surface* myPtr = nullptr; //!< Non-owning pointer to the active adaptor.

View File

@@ -52,31 +52,13 @@ constexpr double THE_POINT_TOL = Precision::Confusion();
// BRepProp_Curve tests
// ============================================================
TEST(BRepProp_CurveTest, UninitializedState)
{
BRepProp_Curve aProp;
EXPECT_FALSE(aProp.IsInitialized());
const GeomProp::TangentResult aTan = aProp.Tangent(0.0, THE_LIN_TOL);
const GeomProp::CurvatureResult aCurv = aProp.Curvature(0.0, THE_LIN_TOL);
const GeomProp::NormalResult aNorm = aProp.Normal(0.0, THE_LIN_TOL);
const GeomProp::CentreResult aCent = aProp.CentreOfCurvature(0.0, THE_LIN_TOL);
EXPECT_FALSE(aTan.IsDefined);
EXPECT_FALSE(aCurv.IsDefined);
EXPECT_FALSE(aNorm.IsDefined);
EXPECT_FALSE(aCent.IsDefined);
}
TEST(BRepProp_CurveTest, InitializeFromEdge_Line)
{
BRepBuilderAPI_MakeEdge aMakeEdge(gp_Lin(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)), 0.0, 10.0);
ASSERT_TRUE(aMakeEdge.IsDone());
const TopoDS_Edge& anEdge = aMakeEdge.Edge();
BRepProp_Curve aProp;
aProp.Initialize(anEdge);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Curve aProp(anEdge);
// Tangent on a line should be defined.
const GeomProp::TangentResult aTan = aProp.Tangent(5.0, THE_LIN_TOL);
@@ -97,9 +79,7 @@ TEST(BRepProp_CurveTest, InitializeFromEdge_Circle)
ASSERT_TRUE(aMakeEdge.IsDone());
const TopoDS_Edge& anEdge = aMakeEdge.Edge();
BRepProp_Curve aProp;
aProp.Initialize(anEdge);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Curve aProp(anEdge);
// Check curvature = 1/R at midpoint.
const GeomProp::CurvatureResult aCurv = aProp.Curvature(M_PI, THE_LIN_TOL);
@@ -125,9 +105,7 @@ TEST(BRepProp_CurveTest, InitializeFromAdaptor)
BRepAdaptor_Curve anAdaptor(aMakeEdge.Edge());
BRepProp_Curve aProp;
aProp.Initialize(anAdaptor);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Curve aProp(anAdaptor);
const GeomProp::CurvatureResult aCurv = aProp.Curvature(M_PI / 2.0, THE_LIN_TOL);
ASSERT_TRUE(aCurv.IsDefined);
@@ -145,9 +123,7 @@ TEST(BRepProp_CurveTest, BoxEdge_Tangent)
ASSERT_TRUE(anExp.More());
const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
BRepProp_Curve aProp;
aProp.Initialize(anEdge);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Curve aProp(anEdge);
double aFirst = 0.0, aLast = 0.0;
BRep_Tool::Range(anEdge, aFirst, aLast);
@@ -174,9 +150,7 @@ TEST(BRepProp_CurveTest, CylinderEdge_Curvature)
for (TopExp_Explorer anExp(aCyl, TopAbs_EDGE); anExp.More(); anExp.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
BRepProp_Curve aProp;
aProp.Initialize(anEdge);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Curve aProp(anEdge);
double aFirst = 0.0, aLast = 0.0;
BRep_Tool::Range(anEdge, aFirst, aLast);
@@ -198,21 +172,6 @@ TEST(BRepProp_CurveTest, CylinderEdge_Curvature)
// BRepProp_Surface tests
// ============================================================
TEST(BRepProp_SurfaceTest, UninitializedState)
{
BRepProp_Surface aProp;
EXPECT_FALSE(aProp.IsInitialized());
const GeomProp::SurfaceNormalResult aNorm = aProp.Normal(0.0, 0.0, THE_LIN_TOL);
EXPECT_FALSE(aNorm.IsDefined);
const GeomProp::SurfaceCurvatureResult aCurv = aProp.Curvatures(0.0, 0.0, THE_LIN_TOL);
EXPECT_FALSE(aCurv.IsDefined);
const GeomProp::MeanGaussianResult aMG = aProp.MeanGaussian(0.0, 0.0, THE_LIN_TOL);
EXPECT_FALSE(aMG.IsDefined);
}
TEST(BRepProp_SurfaceTest, BoxFace_PlanarNormal)
{
BRepPrimAPI_MakeBox aBoxMaker(10.0, 20.0, 30.0);
@@ -223,9 +182,7 @@ TEST(BRepProp_SurfaceTest, BoxFace_PlanarNormal)
ASSERT_TRUE(anExp.More());
const TopoDS_Face& aFace = TopoDS::Face(anExp.Current());
BRepProp_Surface aProp;
aProp.Initialize(aFace);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Surface aProp(aFace);
const GeomProp::SurfaceNormalResult aNorm = aProp.Normal(0.5, 0.5, THE_LIN_TOL);
ASSERT_TRUE(aNorm.IsDefined);
@@ -253,9 +210,7 @@ TEST(BRepProp_SurfaceTest, InitializeFromAdaptor)
const TopoDS_Face& aFace = TopoDS::Face(anExp.Current());
BRepAdaptor_Surface anAdaptor(aFace);
BRepProp_Surface aProp;
aProp.Initialize(anAdaptor);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Surface aProp(anAdaptor);
const GeomProp::SurfaceNormalResult aNorm = aProp.Normal(0.5, 0.5, THE_LIN_TOL);
ASSERT_TRUE(aNorm.IsDefined);
@@ -273,9 +228,7 @@ TEST(BRepProp_SurfaceTest, SphereFace_Curvatures)
ASSERT_TRUE(anExp.More());
const TopoDS_Face& aFace = TopoDS::Face(anExp.Current());
BRepProp_Surface aProp;
aProp.Initialize(aFace);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Surface aProp(aFace);
// Evaluate at equator-like parameter (away from poles).
const double aU = M_PI;
@@ -313,9 +266,7 @@ TEST(BRepProp_SurfaceTest, CylinderFace_Curvatures)
continue;
}
BRepProp_Surface aProp;
aProp.Initialize(aFace);
ASSERT_TRUE(aProp.IsInitialized());
BRepProp_Surface aProp(aFace);
const double aU = M_PI / 4.0;
const double aV = aHeight / 2.0;

View File

@@ -58,8 +58,7 @@ void compareCurveTangent(const TopoDS_Edge& theEdge, const double theParam)
BRepAdaptor_Curve anAdaptor(theEdge);
// New API
BRepProp_Curve aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Curve aNewProp(anAdaptor);
const GeomProp::TangentResult aNew = aNewProp.Tangent(theParam, THE_LIN_TOL);
// Old API
@@ -79,8 +78,7 @@ void compareCurveCurvature(const TopoDS_Edge& theEdge, const double theParam)
{
BRepAdaptor_Curve anAdaptor(theEdge);
BRepProp_Curve aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Curve aNewProp(anAdaptor);
const GeomProp::CurvatureResult aNew = aNewProp.Curvature(theParam, THE_LIN_TOL);
BRepLProp_CLProps anOld(anAdaptor, theParam, 2, THE_LIN_TOL);
@@ -96,8 +94,7 @@ void compareCurveNormal(const TopoDS_Edge& theEdge, const double theParam)
{
BRepAdaptor_Curve anAdaptor(theEdge);
BRepProp_Curve aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Curve aNewProp(anAdaptor);
const GeomProp::NormalResult aNew = aNewProp.Normal(theParam, THE_LIN_TOL);
BRepLProp_CLProps anOld(anAdaptor, theParam, 2, THE_LIN_TOL);
@@ -116,8 +113,7 @@ void compareCurveCentre(const TopoDS_Edge& theEdge, const double theParam)
{
BRepAdaptor_Curve anAdaptor(theEdge);
BRepProp_Curve aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Curve aNewProp(anAdaptor);
const GeomProp::CentreResult aNew = aNewProp.CentreOfCurvature(theParam, THE_LIN_TOL);
BRepLProp_CLProps anOld(anAdaptor, theParam, 2, THE_LIN_TOL);
@@ -139,8 +135,7 @@ void compareSurfaceNormal(const TopoDS_Face& theFace, const double theU, const d
{
BRepAdaptor_Surface anAdaptor(theFace);
BRepProp_Surface aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Surface aNewProp(anAdaptor);
const GeomProp::SurfaceNormalResult aNew = aNewProp.Normal(theU, theV, THE_LIN_TOL);
BRepLProp_SLProps anOld(anAdaptor, theU, theV, 2, THE_LIN_TOL);
@@ -159,8 +154,7 @@ void compareSurfaceCurvatures(const TopoDS_Face& theFace, const double theU, con
{
BRepAdaptor_Surface anAdaptor(theFace);
BRepProp_Surface aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Surface aNewProp(anAdaptor);
const GeomProp::SurfaceCurvatureResult aNew = aNewProp.Curvatures(theU, theV, THE_LIN_TOL);
BRepLProp_SLProps anOld(anAdaptor, theU, theV, 2, THE_LIN_TOL);
@@ -178,8 +172,7 @@ void compareSurfaceMeanGaussian(const TopoDS_Face& theFace, const double theU, c
{
BRepAdaptor_Surface anAdaptor(theFace);
BRepProp_Surface aNewProp;
aNewProp.Initialize(anAdaptor);
BRepProp_Surface aNewProp(anAdaptor);
const GeomProp::MeanGaussianResult aNew = aNewProp.MeanGaussian(theU, theV, THE_LIN_TOL);
BRepLProp_SLProps anOld(anAdaptor, theU, theV, 2, THE_LIN_TOL);