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:
@@ -52,6 +52,7 @@ is
|
||||
Load(me : in out; C : Curve from Geom; UFirst,ULast : Real)
|
||||
raises
|
||||
ConstructionError from Standard;
|
||||
---C++: inline
|
||||
---Purpose: ConstructionError is raised if Ufirst>Ulast
|
||||
|
||||
Curve(me) returns Curve from Geom
|
||||
@@ -263,6 +264,9 @@ is
|
||||
|
||||
LocalContinuity(me; U1, U2 : Real) returns Shape from GeomAbs
|
||||
is static private;
|
||||
|
||||
load(me : in out; C : Curve from Geom; UFirst,ULast : Real)
|
||||
is private;
|
||||
|
||||
fields
|
||||
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Geom_OffsetCurve.hxx>
|
||||
|
||||
@@ -109,11 +110,10 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void GeomAdaptor_Curve::Load(const Handle(Geom_Curve)& C,
|
||||
void GeomAdaptor_Curve::load(const Handle(Geom_Curve)& C,
|
||||
const Standard_Real UFirst,
|
||||
const Standard_Real ULast)
|
||||
{
|
||||
if ( UFirst > ULast) Standard_ConstructionError::Raise();
|
||||
myFirst = UFirst;
|
||||
myLast = ULast;
|
||||
|
||||
|
@@ -5,6 +5,9 @@
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomAdaptor_Curve
|
||||
@@ -12,6 +15,9 @@
|
||||
//=======================================================================
|
||||
|
||||
inline GeomAdaptor_Curve::GeomAdaptor_Curve()
|
||||
: myTypeCurve(GeomAbs_OtherCurve),
|
||||
myFirst(0.),
|
||||
myLast(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -22,7 +28,7 @@ inline GeomAdaptor_Curve::GeomAdaptor_Curve()
|
||||
|
||||
inline GeomAdaptor_Curve::GeomAdaptor_Curve(const Handle(Geom_Curve)& C)
|
||||
{
|
||||
Load(C,C->FirstParameter(),C->LastParameter());
|
||||
Load(C);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -34,7 +40,6 @@ inline GeomAdaptor_Curve::GeomAdaptor_Curve(const Handle(Geom_Curve)& C,
|
||||
const Standard_Real UFirst,
|
||||
const Standard_Real ULast)
|
||||
{
|
||||
if (UFirst > ULast) Standard_ConstructionError::Raise();
|
||||
Load(C,UFirst,ULast);
|
||||
}
|
||||
|
||||
@@ -45,9 +50,28 @@ inline GeomAdaptor_Curve::GeomAdaptor_Curve(const Handle(Geom_Curve)& C,
|
||||
|
||||
inline void GeomAdaptor_Curve::Load(const Handle(Geom_Curve)& C)
|
||||
{
|
||||
Load(C,C->FirstParameter(),C->LastParameter());
|
||||
if ( C.IsNull()) Standard_NullObject::Raise();
|
||||
|
||||
load(C,C->FirstParameter(),C->LastParameter());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Load
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void GeomAdaptor_Curve::Load(const Handle(Geom_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);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FirstParameter
|
||||
//purpose :
|
||||
|
@@ -59,7 +59,8 @@ is
|
||||
TolU : Real = 0.0;
|
||||
TolV : Real = 0.0)
|
||||
raises ConstructionError from Standard;
|
||||
---Purpose: ConstructionError is raised if UFirst>ULast or VFirst>VLast
|
||||
---C++: inline
|
||||
---Purpose: ConstructionError is raised if UFirst>ULast or VFirst>VLast
|
||||
|
||||
Surface(me) returns Surface from Geom
|
||||
---C++: return const&
|
||||
@@ -358,17 +359,22 @@ is
|
||||
is redefined static;
|
||||
|
||||
|
||||
Span (me;Side :Integer; Ideb,Ifin:Integer;
|
||||
OutIdeb,OutIfin:out Integer;
|
||||
NbKnots : Integer )
|
||||
is private;
|
||||
Span (me;Side :Integer; Ideb,Ifin:Integer;
|
||||
OutIdeb,OutIfin:out Integer;
|
||||
NbKnots : Integer )
|
||||
is private;
|
||||
|
||||
IfUVBound (me;U,V :Real;Ideb,Ifin,IVdeb,IVfin :out Integer;
|
||||
USide,VSide: Integer)
|
||||
returns Boolean from Standard
|
||||
is private;
|
||||
|
||||
|
||||
is private;
|
||||
|
||||
load (me : in out; S : Surface from Geom;
|
||||
UFirst,ULast,VFirst,VLast : Real;
|
||||
TolU : Real = 0.0;
|
||||
TolV : Real = 0.0)
|
||||
is private;
|
||||
|
||||
fields
|
||||
|
||||
mySurface : Surface from Geom;
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include <BSplCLib.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
|
||||
#define myBspl (*((Handle(Geom_BSplineSurface)*)&mySurface))
|
||||
#define myExtSurf (*((Handle(Geom_SurfaceOfLinearExtrusion)*)&mySurface))
|
||||
@@ -97,7 +98,7 @@ GeomAbs_Shape LocalContinuity(Standard_Integer Degree,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S,
|
||||
void GeomAdaptor_Surface::load(const Handle(Geom_Surface)& S,
|
||||
const Standard_Real UFirst,
|
||||
const Standard_Real ULast,
|
||||
const Standard_Real VFirst,
|
||||
@@ -105,9 +106,6 @@ void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S,
|
||||
const Standard_Real TolU,
|
||||
const Standard_Real TolV)
|
||||
{
|
||||
if(UFirst>ULast || VFirst>VLast)
|
||||
Standard_ConstructionError::Raise("GeomAdaptor_Surface::Load");
|
||||
|
||||
myTolU = TolU;
|
||||
myTolV = TolV;
|
||||
myUFirst = UFirst;
|
||||
|
@@ -4,6 +4,8 @@
|
||||
// Copyright: OPEN CASCADE 1993
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Standard_NullObject.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomAdaptor_Surface
|
||||
@@ -11,8 +13,15 @@
|
||||
//=======================================================================
|
||||
|
||||
inline GeomAdaptor_Surface::GeomAdaptor_Surface()
|
||||
: myTolU(0.), myTolV(0.)
|
||||
{}
|
||||
: mySurfaceType(GeomAbs_OtherSurface),
|
||||
myUFirst(0.),
|
||||
myULast(0.),
|
||||
myVFirst(0.),
|
||||
myVLast (0.),
|
||||
myTolU(0.),
|
||||
myTolV(0.)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GeomAdaptor_Surface
|
||||
@@ -48,11 +57,35 @@ inline GeomAdaptor_Surface::GeomAdaptor_Surface(const Handle(Geom_Surface)& S,
|
||||
|
||||
inline void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S)
|
||||
{
|
||||
if ( S.IsNull()) Standard_NullObject::Raise("GeomAdaptor_Surface::Load");
|
||||
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
S->Bounds(U1,U2,V1,V2);
|
||||
Load(S,U1,U2,V1,V2);
|
||||
load(S,U1,U2,V1,V2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Load
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void GeomAdaptor_Surface::Load(const Handle(Geom_Surface)& S,
|
||||
const Standard_Real UFirst,
|
||||
const Standard_Real ULast,
|
||||
const Standard_Real VFirst,
|
||||
const Standard_Real VLast,
|
||||
const Standard_Real TolU,
|
||||
const Standard_Real TolV)
|
||||
{
|
||||
if ( S.IsNull()) Standard_NullObject::Raise("GeomAdaptor_Surface::Load");
|
||||
|
||||
if(UFirst>ULast || VFirst>VLast)
|
||||
Standard_ConstructionError::Raise("GeomAdaptor_Surface::Load");
|
||||
|
||||
load(S,UFirst,ULast,VFirst,VLast,TolU,TolV);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Surface
|
||||
//purpose :
|
||||
|
Reference in New Issue
Block a user