1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0022769: Optimization of sewing algorithm

This commit is contained in:
ama
2011-12-02 14:29:24 +00:00
committed by bugmaster
parent d4cc0c5eb5
commit 041bfce9c0
11 changed files with 159 additions and 44 deletions

View File

@@ -45,10 +45,12 @@ is
---Purpose: ConstructionError is raised if Ufirst>Ulast
Load(me : in out; C : Curve from Geom2d);
---C++: inline
Load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
raises
ConstructionError from Standard;
---C++: inline
---Purpose: ConstructionError is raised if Ufirst>Ulast
Curve(me) returns Curve from Geom2d
@@ -228,6 +230,9 @@ is
LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs
is static private;
load(me : in out; C : Curve from Geom2d; UFirst,ULast : Real)
is private;
fields

View File

@@ -34,6 +34,7 @@
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_NotImplemented.hxx>
#define myBspl (*((Handle(Geom2d_BSplineCurve)*)&myCurve))
@@ -109,6 +110,9 @@ GeomAbs_Shape Geom2dAdaptor_Curve::LocalContinuity(const Standard_Real U1,
//=======================================================================
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve()
: myTypeCurve(GeomAbs_OtherCurve),
myFirst(0.),
myLast(0.)
{
}
@@ -117,8 +121,9 @@ Geom2dAdaptor_Curve::Geom2dAdaptor_Curve()
//purpose :
//=======================================================================
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C) {
Load(C,C->FirstParameter(),C->LastParameter());
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C)
{
Load(C);
}
//=======================================================================
@@ -128,29 +133,21 @@ Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C) {
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C,
const Standard_Real UFirst,
const Standard_Real ULast) {
if ( UFirst > ULast) Standard_ConstructionError::Raise();
const Standard_Real ULast)
{
Load(C,UFirst,ULast);
}
//=======================================================================
//function : Load
//purpose :
//=======================================================================
void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C) {
Load(C,C->FirstParameter(),C->LastParameter());
}
//=======================================================================
//function : Load
//purpose :
//=======================================================================
void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C,
const Standard_Real UFirst,
const Standard_Real ULast) {
if ( UFirst > ULast) Standard_ConstructionError::Raise();
void Geom2dAdaptor_Curve::load(const Handle(Geom2d_Curve)& C,
const Standard_Real UFirst,
const Standard_Real ULast)
{
myFirst = UFirst;
myLast = ULast;

View File

@@ -6,6 +6,8 @@
#include <gp_Pnt2d.hxx>
#include <Geom2d_Curve.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
//=======================================================================
//function : FirstParameter
@@ -47,3 +49,30 @@ inline GeomAbs_CurveType Geom2dAdaptor_Curve::GetType() const
return myTypeCurve;
}
//=======================================================================
//function : Load
//purpose :
//=======================================================================
inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C)
{
if ( C.IsNull()) Standard_NullObject::Raise();
load(C,C->FirstParameter(),C->LastParameter());
}
//=======================================================================
//function : Load
//purpose :
//=======================================================================
inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C,
const Standard_Real UFirst,
const Standard_Real ULast)
{
if ( C.IsNull()) Standard_NullObject::Raise();
if ( UFirst > ULast) Standard_ConstructionError::Raise();
load(C,UFirst,ULast);
}