1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes

Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.

Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.

Removed obsolete adaptor classes with H suffix.
This commit is contained in:
kgv 2020-12-03 17:36:19 +03:00 committed by bugmaster
parent 266877a7c3
commit c22b52d60e
710 changed files with 6144 additions and 14175 deletions

View File

@ -72,6 +72,28 @@ BOPCol_Box2DBndTreeSelector BOPTools_BoxSelector<Bnd_Box2d>
BiTgte_DataMapOfShapeBox TopTools_DataMapOfShapeBox
CDM_MessageDriver Message_Messenger
Message_ProgressSentry Message_ProgressScope
Adaptor2d_HCurve2d Adaptor2d_Curve2d
Adaptor2d_HLine2d Adaptor2d_Line2d
Adaptor2d_HOffsetCurve Adaptor2d_OffsetCurve
Adaptor3d_HCurve Adaptor3d_Curve
Adaptor3d_HCurveOnSurface Adaptor3d_CurveOnSurface
Adaptor3d_HIsoCurve Adaptor3d_IsoCurve
Adaptor3d_HSurface Adaptor3d_Surface
BRepAdaptor_HCompCurve BRepAdaptor_CompCurve
BRepAdaptor_HCurve BRepAdaptor_Curve
BRepAdaptor_HCurve2d BRepAdaptor_Curve2d
BRepAdaptor_HSurface BRepAdaptor_Surface
BiTgte_HCurveOnEdge BiTgte_CurveOnEdge
BiTgte_HCurveOnVertex BiTgte_CurveOnVertex
ChFiDS_HElSpine ChFiDS_ElSpine
Geom2dAdaptor_GHCurve Geom2dAdaptor_Curve
Geom2dAdaptor_HCurve Geom2dAdaptor_Curve
GeomAdaptor_GHCurve GeomAdaptor_Curve
GeomAdaptor_GHSurface GeomAdaptor_Surface
GeomAdaptor_HCurve GeomAdaptor_Curve
GeomAdaptor_HSurface GeomAdaptor_Surface
GeomAdaptor_HSurfaceOfLinearExtrusion GeomAdaptor_SurfaceOfLinearExtrusion
GeomAdaptor_HSurfaceOfRevolution GeomAdaptor_SurfaceOfRevolution
[tcollection]
AdvApp2Var_SequenceOfNode

View File

@ -2159,6 +2159,15 @@ Existing message files containing 8-bit characters (previously interpreted as ch
@section upgrade_occt760 Upgrade to OCCT 7.6.0
@subsection upgrade_760_handle_adaptors Simplification of surface/curve adaptor
Interfaces *Adaptor2d_Curve2d*, *Adaptor3d_Curve* and *Adaptor3d_Surface* now inherit Standard_Transient and can be Handle-managed.
No more necessary parallel hiererchy of classes *Adaptor2d_HCurve2d*, *Adaptor3d_HCurve* and *Adaptor3d_HSurface* (generated from generic templates by WOK) has been eliminated.
Existing code using old Handle classes should be updated to:
* Rename occurrences of old names (remove H suffix); upgrade.bat could be used for that purpose.
* Replace redundant calls to previously declared methods .GetCurve2d()/.GetCurve()/.GetSurface() with the common operator->() syntax.
* Pay attention on code calling GetSurface()/GetCurve() methods of removed handle classes. Such places should be replaced with Handle dereference.
@subsection upgrade_760_extendedstring_cout Output of TCollection_ExtendedString to stream
Behavior of the method TCollection_ExtendedString::Print(Standard_OStream&) and corresponding operator << has changed.

View File

@ -3036,13 +3036,13 @@ void GeomSources::gpTest39(CGeometryDoc* aDoc)
Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve();
Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve();
Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1);
Handle(GeomAdaptor_Curve) SPL1Adaptor = new GeomAdaptor_Curve(SPL1);
Handle(GeomFill_SimpleBound) B1 =
new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular());
Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2);
Handle(GeomAdaptor_Curve) SPL2Adaptor = new GeomAdaptor_Curve(SPL2);
Handle(GeomFill_SimpleBound) B2 =
new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular());
Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3);
Handle(GeomAdaptor_Curve) SPL3Adaptor = new GeomAdaptor_Curve(SPL3);
Handle(GeomFill_SimpleBound) B3 =
new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular());
Standard_Boolean NoCheck= Standard_False;
@ -3064,13 +3064,13 @@ Handle(Geom_BSplineCurve) SPL1 = GeomAPI_PointsToBSpline(array1).Curve();
Handle(Geom_BSplineCurve) SPL2 = GeomAPI_PointsToBSpline(array2).Curve(); \n\
Handle(Geom_BSplineCurve) SPL3 = GeomAPI_PointsToBSpline(array3).Curve(); \n\
\n\
Handle(GeomAdaptor_HCurve) SPL1Adaptor = new GeomAdaptor_HCurve(SPL1); \n\
Handle(GeomAdaptor_Curve) SPL1Adaptor = new GeomAdaptor_Curve(SPL1); \n\
Handle(GeomFill_SimpleBound) B1 = \n\
new GeomFill_SimpleBound(SPL1Adaptor,Precision::Approximation(),Precision::Angular()); \n\
Handle(GeomAdaptor_HCurve) SPL2Adaptor = new GeomAdaptor_HCurve(SPL2); \n\
Handle(GeomAdaptor_Curve) SPL2Adaptor = new GeomAdaptor_Curve(SPL2); \n\
Handle(GeomFill_SimpleBound) B2 = \n\
new GeomFill_SimpleBound(SPL2Adaptor,Precision::Approximation(),Precision::Angular()); \n\
Handle(GeomAdaptor_HCurve) SPL3Adaptor = new GeomAdaptor_HCurve(SPL3); \n\
Handle(GeomAdaptor_Curve) SPL3Adaptor = new GeomAdaptor_Curve(SPL3); \n\
Handle(GeomFill_SimpleBound) B3 = \n\
new GeomFill_SimpleBound(SPL3Adaptor,Precision::Approximation(),Precision::Angular()); \n\
Standard_Boolean NoCheck= Standard_False; \n\

View File

@ -5,7 +5,7 @@
#include "stdafx.h"
#include "..\\GeometryApp.h"
#include "ISession_Surface.h"
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <StdPrs_ShadedSurface.hxx>
#include <StdPrs_WFPoleSurface.hxx>
#include <StdPrs_WFSurface.hxx>
@ -23,7 +23,7 @@ void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
const Standard_Integer theMode)
{
GeomAdaptor_Surface anAdaptorSurface (mySurface);
Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface (mySurface);
Handle(GeomAdaptor_Surface) anAdaptorHSurface = new GeomAdaptor_Surface (mySurface);
Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_YELLOW3, Aspect_TOL_SOLID, 1.0));

View File

@ -161,9 +161,7 @@
#include <Geom2dLProp_CLProps2d.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAPI.hxx>
#include <GeomAPI_ExtremaSurfaceSurface.hxx>
#include <GeomAPI_IntCS.hxx>

View File

@ -12,7 +12,6 @@
#include "ISession_Direction.h"
#include "..\res\resource.h"
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <AIS_ColoredShape.hxx>
#include <AIS_ListOfInteractive.hxx>
@ -4660,14 +4659,14 @@ void CModelingDoc::OnStopStop()
BRepAdaptor_Surface S(F);
GeomAdaptor_Surface aGAS = S.Surface();
Handle(GeomAdaptor_HSurface) aHGAS = new GeomAdaptor_HSurface(aGAS);
Handle(GeomAdaptor_Surface) aHGAS = new GeomAdaptor_Surface(aGAS);
Handle(BRepAdaptor_HCurve2d) C = new BRepAdaptor_HCurve2d();
C->ChangeCurve2d().Initialize(E,F);
Handle(BRepAdaptor_Curve2d) C = new BRepAdaptor_Curve2d();
C->Initialize(E,F);
Adaptor3d_CurveOnSurface ConS(C,aHGAS);
Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
Handle (Adaptor3d_CurveOnSurface) HConS = new Adaptor3d_CurveOnSurface(ConS);
Fronts->SetValue(i,HConS);
}
GeomPlate_BuildPlateSurface abuildplate(NbPtsCur,Fronts,Tang,3);

View File

@ -111,8 +111,8 @@
#include <GeomPlate_HArray1OfHCurve.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <GeomPlate_BuildPlateSurface.hxx>
#include <GeomPlate_MakeApprox.hxx>
#include <TopTools_Array1OfShape.hxx>

View File

@ -16,7 +16,6 @@
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <gp_Circ2d.hxx>
@ -31,6 +30,8 @@
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient)
//=======================================================================
//function : ~Adaptor2d_Curve2d
//purpose : Destructor
@ -103,10 +104,10 @@ void Adaptor2d_Curve2d::Intervals(TColStd_Array1OfReal& ,
//purpose :
//=======================================================================
//Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real First,
//Handle(Adaptor2d_Curve2d) Adaptor2d_Curve2d::Trim(const Standard_Real First,
// const Standard_Real Last ,
// const Standard_Real Tol) const
Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real ,
Handle(Adaptor2d_Curve2d) Adaptor2d_Curve2d::Trim(const Standard_Real ,
const Standard_Real ,
const Standard_Real ) const
{

View File

@ -17,30 +17,27 @@
#ifndef _Adaptor2d_Curve2d_HeaderFile
#define _Adaptor2d_Curve2d_HeaderFile
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_Shape.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Parab2d.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_CurveType.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor2d_HCurve2d;
class gp_Pnt2d;
class gp_Vec2d;
class gp_Lin2d;
class gp_Circ2d;
class gp_Elips2d;
class gp_Hypr2d;
class gp_Parab2d;
class Geom2d_BezierCurve;
class Geom2d_BSplineCurve;
DEFINE_STANDARD_HANDLE(Adaptor2d_Curve2d, Standard_Transient)
//! Root class for 2D curves on which geometric
//! algorithms work.
@ -53,12 +50,10 @@ class Geom2d_BSplineCurve;
//! Polynomial coefficients of BSpline curves used for their evaluation are
//! cached for better performance. Therefore these evaluations are not
//! thread-safe and parallel evaluations need to be prevented.
class Adaptor2d_Curve2d
class Adaptor2d_Curve2d : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient)
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual Standard_Real FirstParameter() const;
@ -82,7 +77,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Standard_Boolean IsClosed() const;
@ -158,27 +153,6 @@ public:
Standard_EXPORT virtual Handle(Geom2d_BSplineCurve) BSpline() const;
Standard_EXPORT virtual ~Adaptor2d_Curve2d();
protected:
private:
};
#endif // _Adaptor2d_Curve2d_HeaderFile

View File

@ -1,48 +0,0 @@
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : Adaptor2d_GenHCurve2d
//purpose :
//=======================================================================
Adaptor2d_GenHCurve2d::Adaptor2d_GenHCurve2d () {}
//=======================================================================
//function : Adaptor2d_GenHCurve2d
//purpose :
//=======================================================================
Adaptor2d_GenHCurve2d::Adaptor2d_GenHCurve2d (const TheCurve& C):
myCurve(C)
{}
//=======================================================================
//function : Set
//purpose :
//=======================================================================
void Adaptor2d_GenHCurve2d::Set(const TheCurve& C)
{
myCurve = C;
}
//=======================================================================
//function : Curve2d
//purpose :
//=======================================================================
const Adaptor2d_Curve2d& Adaptor2d_GenHCurve2d::Curve2d () const
{
return myCurve;
}

View File

@ -1,20 +0,0 @@
// Created on: 1995-05-09
// Created by: Xavier BENVENISTE
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
inline TheCurve& Adaptor2d_GenHCurve2d::ChangeCurve2d()
{
return myCurve;
}

View File

@ -1,27 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_HCurve2d,Standard_Transient)

View File

@ -1,127 +0,0 @@
// Created on: 1994-02-23
// Created by: model
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor2d_HCurve2d_HeaderFile
#define _Adaptor2d_HCurve2d_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <GeomAbs_CurveType.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Parab2d.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
class Adaptor2d_Curve2d;
class gp_Pnt2d;
class gp_Vec2d;
class Adaptor2d_HCurve2d;
DEFINE_STANDARD_HANDLE(Adaptor2d_HCurve2d, Standard_Transient)
//! Root class for 2D curves manipulated by handles, on
//! which geometric algorithms work.
//! An adapted curve is an interface between the
//! services provided by a curve, and those required of
//! the curve by algorithms, which use it.
//! A derived specific class is provided:
//! Geom2dAdaptor_HCurve for a curve from the Geom2d package.
class Adaptor2d_HCurve2d : public Standard_Transient
{
public:
//! Returns a reference to the Curve2d inside the HCurve2d.
Standard_EXPORT virtual const Adaptor2d_Curve2d& Curve2d() const = 0;
Standard_Real FirstParameter() const;
Standard_Real LastParameter() const;
GeomAbs_Shape Continuity() const;
Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
//! If <First> >= <Last>
Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_Boolean IsClosed() const;
Standard_Boolean IsPeriodic() const;
Standard_Real Period() const;
gp_Pnt2d Value (const Standard_Real U) const;
void D0 (const Standard_Real U, gp_Pnt2d& P) const;
void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const;
void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const;
void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const;
gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const;
Standard_Real Resolution (const Standard_Real R3d) const;
GeomAbs_CurveType GetType() const;
gp_Lin2d Line() const;
gp_Circ2d Circle() const;
gp_Elips2d Ellipse() const;
gp_Hypr2d Hyperbola() const;
gp_Parab2d Parabola() const;
Standard_Integer Degree() const;
Standard_Boolean IsRational() const;
Standard_Integer NbPoles() const;
Standard_Integer NbKnots() const;
Handle(Geom2d_BezierCurve) Bezier() const;
virtual Handle(Geom2d_BSplineCurve) BSpline() const;
DEFINE_STANDARD_RTTIEXT(Adaptor2d_HCurve2d,Standard_Transient)
};
#include <Adaptor2d_HCurve2d.lxx>
#endif // _Adaptor2d_HCurve2d_HeaderFile

View File

@ -1,296 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor2d_Curve2d.hxx>
//=======================================================================
//function : FirstParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_HCurve2d::FirstParameter() const
{
return Curve2d().FirstParameter();
}
//=======================================================================
//function : LastParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_HCurve2d::LastParameter() const
{
return Curve2d().LastParameter();
}
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
inline GeomAbs_Shape Adaptor2d_HCurve2d::Continuity() const
{
return Curve2d().Continuity();
}
//=======================================================================
//function : NbIntervals
//purpose :
//=======================================================================
inline Standard_Integer Adaptor2d_HCurve2d::NbIntervals(const GeomAbs_Shape S) const
{
return Curve2d().NbIntervals(S);
}
//=======================================================================
//function : Intervals
//purpose :
//=======================================================================
inline void Adaptor2d_HCurve2d::Intervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S) const
{
Curve2d().Intervals(T,S);
}
//=======================================================================
//function : Trim
//purpose :
//=======================================================================
inline Handle(Adaptor2d_HCurve2d) Adaptor2d_HCurve2d::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
return Curve2d().Trim(First,Last,Tol);
}
//=======================================================================
//function : IsClosed
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor2d_HCurve2d::IsClosed() const
{
return Curve2d().IsClosed();
}
//=======================================================================
//function : IsPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor2d_HCurve2d::IsPeriodic() const
{
return Curve2d().IsPeriodic();
}
//=======================================================================
//function : Period
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_HCurve2d::Period() const
{
return Curve2d().Period();
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
inline gp_Pnt2d Adaptor2d_HCurve2d::Value(const Standard_Real U) const
{
return Curve2d().Value(U);
}
//=======================================================================
//function : D0
//purpose :
//=======================================================================
inline void Adaptor2d_HCurve2d::D0(const Standard_Real U, gp_Pnt2d& P) const
{
Curve2d().D0(U,P);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
inline void Adaptor2d_HCurve2d::D1(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const
{
Curve2d().D1(U,P,V);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
inline void Adaptor2d_HCurve2d::D2(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const
{
Curve2d().D2(U,P,V1,V2);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
inline void Adaptor2d_HCurve2d::D3(const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const
{
Curve2d().D3(U,P,V1,V2,V3);
}
//=======================================================================
//function : DN
//purpose :
//=======================================================================
inline gp_Vec2d Adaptor2d_HCurve2d::DN(const Standard_Real U, const Standard_Integer N) const
{
return Curve2d().DN(U,N);
}
//=======================================================================
//function : Resolution
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_HCurve2d::Resolution(const Standard_Real R3d) const
{
return Curve2d().Resolution(R3d);
}
//=======================================================================
//function : GetType
//purpose :
//=======================================================================
inline GeomAbs_CurveType Adaptor2d_HCurve2d::GetType() const
{
return Curve2d().GetType();
}
//=======================================================================
//function : Line
//purpose :
//=======================================================================
inline gp_Lin2d Adaptor2d_HCurve2d::Line() const
{
return Curve2d().Line();
}
//=======================================================================
//function : Circle
//purpose :
//=======================================================================
inline gp_Circ2d Adaptor2d_HCurve2d::Circle() const
{
return Curve2d().Circle();
}
//=======================================================================
//function : Ellipse
//purpose :
//=======================================================================
inline gp_Elips2d Adaptor2d_HCurve2d::Ellipse() const
{
return Curve2d().Ellipse();
}
//=======================================================================
//function : Hyperbola
//purpose :
//=======================================================================
inline gp_Hypr2d Adaptor2d_HCurve2d::Hyperbola() const
{
return Curve2d().Hyperbola();
}
//=======================================================================
//function : Parabola
//purpose :
//=======================================================================
inline gp_Parab2d Adaptor2d_HCurve2d::Parabola() const
{
return Curve2d().Parabola();
}
//=======================================================================
//function : Degree
//purpose :
//=======================================================================
inline Standard_Integer Adaptor2d_HCurve2d::Degree() const
{
return Curve2d().Degree() ;
}
//=======================================================================
//function : IsRational
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor2d_HCurve2d::IsRational() const
{
return Curve2d().IsRational() ;
}
//=======================================================================
//function : NbPoles
//purpose :
//=======================================================================
inline Standard_Integer Adaptor2d_HCurve2d::NbPoles() const
{
return Curve2d().NbPoles() ;
}
//=======================================================================
//function : NbKnots
//purpose :
//=======================================================================
inline Standard_Integer Adaptor2d_HCurve2d::NbKnots() const
{
return Curve2d().NbKnots() ;
}
//=======================================================================
//function : Bezier
//purpose :
//=======================================================================
inline Handle(Geom2d_BezierCurve) Adaptor2d_HCurve2d::Bezier() const
{
return Curve2d().Bezier();
}
//=======================================================================
//function : BSpline
//purpose :
//=======================================================================
inline Handle(Geom2d_BSplineCurve) Adaptor2d_HCurve2d::BSpline() const
{
return Curve2d().BSpline();
}

View File

@ -1,93 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor2d_HLine2d_HeaderFile
#define _Adaptor2d_HLine2d_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor2d_Line2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor2d_Line2d;
class Adaptor2d_Curve2d;
class Adaptor2d_HLine2d;
DEFINE_STANDARD_HANDLE(Adaptor2d_HLine2d, Adaptor2d_HCurve2d)
class Adaptor2d_HLine2d : public Adaptor2d_HCurve2d
{
public:
//! Creates an empty GenHCurve2d.
Standard_EXPORT Adaptor2d_HLine2d();
//! Creates a GenHCurve2d from a Curve
Standard_EXPORT Adaptor2d_HLine2d(const Adaptor2d_Line2d& C);
//! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const Adaptor2d_Line2d& C);
//! Returns the curve used to create the GenHCurve2d.
//! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
Adaptor2d_Line2d& ChangeCurve2d();
DEFINE_STANDARD_RTTI_INLINE(Adaptor2d_HLine2d,Adaptor2d_HCurve2d)
protected:
Adaptor2d_Line2d myCurve;
private:
};
#define TheCurve Adaptor2d_Line2d
#define TheCurve_hxx <Adaptor2d_Line2d.hxx>
#define Adaptor2d_GenHCurve2d Adaptor2d_HLine2d
#define Adaptor2d_GenHCurve2d_hxx <Adaptor2d_HLine2d.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HLine2d)
#include <Adaptor2d_GenHCurve2d.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor2d_GenHCurve2d
#undef Adaptor2d_GenHCurve2d_hxx
#undef Handle_Adaptor2d_GenHCurve2d
#endif // _Adaptor2d_HLine2d_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <Adaptor2d_HLine2d.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <Adaptor2d_Line2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define TheCurve Adaptor2d_Line2d
#define TheCurve_hxx <Adaptor2d_Line2d.hxx>
#define Adaptor2d_GenHCurve2d Adaptor2d_HLine2d
#define Adaptor2d_GenHCurve2d_hxx <Adaptor2d_HLine2d.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HLine2d)
#include <Adaptor2d_GenHCurve2d.gxx>

View File

@ -1,93 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor2d_HOffsetCurve_HeaderFile
#define _Adaptor2d_HOffsetCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor2d_OffsetCurve.hxx>
#include <Adaptor2d_HCurve2d.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor2d_OffsetCurve;
class Adaptor2d_Curve2d;
class Adaptor2d_HOffsetCurve;
DEFINE_STANDARD_HANDLE(Adaptor2d_HOffsetCurve, Adaptor2d_HCurve2d)
class Adaptor2d_HOffsetCurve : public Adaptor2d_HCurve2d
{
public:
//! Creates an empty GenHCurve2d.
Standard_EXPORT Adaptor2d_HOffsetCurve();
//! Creates a GenHCurve2d from a Curve
Standard_EXPORT Adaptor2d_HOffsetCurve(const Adaptor2d_OffsetCurve& C);
//! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const Adaptor2d_OffsetCurve& C);
//! Returns the curve used to create the GenHCurve2d.
//! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
Adaptor2d_OffsetCurve& ChangeCurve2d();
DEFINE_STANDARD_RTTI_INLINE(Adaptor2d_HOffsetCurve,Adaptor2d_HCurve2d)
protected:
Adaptor2d_OffsetCurve myCurve;
private:
};
#define TheCurve Adaptor2d_OffsetCurve
#define TheCurve_hxx <Adaptor2d_OffsetCurve.hxx>
#define Adaptor2d_GenHCurve2d Adaptor2d_HOffsetCurve
#define Adaptor2d_GenHCurve2d_hxx <Adaptor2d_HOffsetCurve.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HOffsetCurve)
#include <Adaptor2d_GenHCurve2d.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor2d_GenHCurve2d
#undef Adaptor2d_GenHCurve2d_hxx
#undef Handle_Adaptor2d_GenHCurve2d
#endif // _Adaptor2d_HOffsetCurve_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <Adaptor2d_HOffsetCurve.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <Adaptor2d_OffsetCurve.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define TheCurve Adaptor2d_OffsetCurve
#define TheCurve_hxx <Adaptor2d_OffsetCurve.hxx>
#define Adaptor2d_GenHCurve2d Adaptor2d_HOffsetCurve
#define Adaptor2d_GenHCurve2d_hxx <Adaptor2d_HOffsetCurve.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor2d_HOffsetCurve)
#include <Adaptor2d_GenHCurve2d.gxx>

View File

@ -11,10 +11,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_HLine2d.hxx>
#include <Adaptor2d_Line2d.hxx>
#include <ElCLib.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
@ -31,6 +29,8 @@
#include <Standard_NoSuchObject.hxx>
#include <Standard_OutOfRange.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_Line2d, Adaptor2d_Curve2d)
//=======================================================================
//function : Adaptor2d_Line2d
//purpose :
@ -136,13 +136,13 @@ void Adaptor2d_Line2d::Intervals(TColStd_Array1OfReal& T,
//purpose :
//=======================================================================
Handle(Adaptor2d_HCurve2d) Adaptor2d_Line2d::Trim
Handle(Adaptor2d_Curve2d) Adaptor2d_Line2d::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real) const
{
Handle(Adaptor2d_HLine2d) HL = new Adaptor2d_HLine2d();
HL->ChangeCurve2d().Load(gp_Lin2d(myAx2d),First,Last);
Handle(Adaptor2d_Line2d) HL = new Adaptor2d_Line2d();
HL->Load(gp_Lin2d(myAx2d),First,Last);
return HL;
}

View File

@ -35,7 +35,6 @@ class Standard_DomainError;
class gp_Pnt2d;
class gp_Dir2d;
class gp_Lin2d;
class Adaptor2d_HCurve2d;
class gp_Vec2d;
class gp_Circ2d;
class gp_Elips2d;
@ -48,11 +47,9 @@ class Geom2d_BSplineCurve;
class Adaptor2d_Line2d : public Adaptor2d_Curve2d
{
DEFINE_STANDARD_RTTIEXT(Adaptor2d_Line2d, Adaptor2d_Curve2d)
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Adaptor2d_Line2d();
Standard_EXPORT Adaptor2d_Line2d(const gp_Pnt2d& P, const gp_Dir2d& D, const Standard_Real UFirst, const Standard_Real ULast);
@ -83,7 +80,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
@ -129,30 +126,14 @@ public:
Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
Standard_Real myUfirst;
Standard_Real myUlast;
gp_Ax2d myAx2d;
};
DEFINE_STANDARD_HANDLE(Adaptor2d_Line2d, Adaptor2d_Curve2d)
#endif // _Adaptor2d_Line2d_HeaderFile

View File

@ -11,9 +11,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_HOffsetCurve.hxx>
#include <Adaptor2d_OffsetCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
@ -36,6 +33,8 @@
#include <Standard_NotImplemented.hxx>
#include <Standard_TypeMismatch.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d)
//=======================================================================
//function : Adaptor2d_OffsetCurve
//purpose :
@ -52,7 +51,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve()
//purpose :
//=======================================================================
Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& theCurve)
Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& theCurve)
: myCurve (theCurve),
myOffset(0.0),
myFirst (0.0),
@ -66,7 +65,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& t
//=======================================================================
Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve
(const Handle(Adaptor2d_HCurve2d)& theCurve, const Standard_Real theOffset)
(const Handle(Adaptor2d_Curve2d)& theCurve, const Standard_Real theOffset)
: myCurve (theCurve),
myOffset(theOffset),
myFirst (theCurve->FirstParameter()),
@ -80,7 +79,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve
//=======================================================================
Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(
const Handle(Adaptor2d_HCurve2d)& theCurve,
const Handle(Adaptor2d_Curve2d)& theCurve,
const Standard_Real theOffset,
const Standard_Real theWFirst,
const Standard_Real theWLast )
@ -96,7 +95,7 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve(
//purpose :
//=======================================================================
void Adaptor2d_OffsetCurve::Load(const Handle(Adaptor2d_HCurve2d)& C )
void Adaptor2d_OffsetCurve::Load(const Handle(Adaptor2d_Curve2d)& C )
{
myCurve = C;
myOffset = 0.;
@ -226,13 +225,13 @@ void Adaptor2d_OffsetCurve::Intervals(TColStd_Array1OfReal& TI,
//purpose :
//=======================================================================
Handle(Adaptor2d_HCurve2d) Adaptor2d_OffsetCurve::Trim
Handle(Adaptor2d_Curve2d) Adaptor2d_OffsetCurve::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real) const
{
Handle(Adaptor2d_HOffsetCurve) HO = new Adaptor2d_HOffsetCurve(*this);
HO->ChangeCurve2d().Load(myOffset,First,Last);
Handle(Adaptor2d_OffsetCurve) HO = new Adaptor2d_OffsetCurve(*this);
HO->Load(myOffset,First,Last);
return HO;
}
@ -610,7 +609,7 @@ Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const
return myCurve->BSpline();
}
static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
static Standard_Integer nbPoints(const Handle(Adaptor2d_Curve2d)& theCurve)
{
Standard_Integer nbs = 20;

View File

@ -17,18 +17,12 @@
#ifndef _Adaptor2d_OffsetCurve_HeaderFile
#define _Adaptor2d_OffsetCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_CurveType.hxx>
class Adaptor2d_HCurve2d;
class Standard_NoSuchObject;
class Standard_DomainError;
class Standard_OutOfRange;
@ -43,46 +37,43 @@ class gp_Parab2d;
class Geom2d_BezierCurve;
class Geom2d_BSplineCurve;
//! Defines an Offset curve (algorithmic 2d curve).
class Adaptor2d_OffsetCurve : public Adaptor2d_Curve2d
{
DEFINE_STANDARD_RTTIEXT(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d)
public:
DEFINE_STANDARD_ALLOC
//! The Offset is set to 0.
Standard_EXPORT Adaptor2d_OffsetCurve();
//! The curve is loaded. The Offset is set to 0.
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C);
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C);
//! Creates an OffsetCurve curve.
//! The Offset is set to Offset.
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset);
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset);
//! Create an Offset curve.
//! WFirst,WLast define the bounds of the Offset curve.
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast);
Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast);
//! Changes the curve. The Offset is reset to 0.
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& S);
Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& S);
//! Changes the Offset on the current Curve.
Standard_EXPORT void Load (const Standard_Real Offset);
//! Changes the Offset Curve on the current Curve.
Standard_EXPORT void Load (const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast);
const Handle(Adaptor2d_HCurve2d)& Curve() const;
Standard_Real Offset() const;
Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_Real LastParameter() const Standard_OVERRIDE;
const Handle(Adaptor2d_Curve2d)& Curve() const { return myCurve; }
Standard_Real Offset() const { return myOffset; }
virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; }
virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; }
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
//! If necessary, breaks the curve in intervals of
@ -101,7 +92,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
@ -176,30 +167,15 @@ public:
Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE;
protected:
private:
Handle(Adaptor2d_HCurve2d) myCurve;
Handle(Adaptor2d_Curve2d) myCurve;
Standard_Real myOffset;
Standard_Real myFirst;
Standard_Real myLast;
};
#include <Adaptor2d_OffsetCurve.lxx>
DEFINE_STANDARD_HANDLE(Adaptor2d_OffsetCurve, Adaptor2d_Curve2d)
#endif // _Adaptor2d_OffsetCurve_HeaderFile

View File

@ -1,54 +0,0 @@
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : Curve
//purpose :
//=======================================================================
inline const Handle(Adaptor2d_HCurve2d)& Adaptor2d_OffsetCurve::Curve() const
{
return myCurve;
}
//=======================================================================
//function : Offset
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_OffsetCurve::Offset() const
{
return myOffset;
}
//=======================================================================
//function : FirstParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_OffsetCurve::FirstParameter() const
{
return myFirst;
}
//=======================================================================
//function : LastParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor2d_OffsetCurve::LastParameter() const
{
return myLast;
}

View File

@ -1,16 +1,6 @@
Adaptor2d_Curve2d.cxx
Adaptor2d_Curve2d.hxx
Adaptor2d_GenHCurve2d.gxx
Adaptor2d_GenHCurve2d.lxx
Adaptor2d_HCurve2d.cxx
Adaptor2d_HCurve2d.hxx
Adaptor2d_HCurve2d.lxx
Adaptor2d_HLine2d.hxx
Adaptor2d_HLine2d_0.cxx
Adaptor2d_HOffsetCurve.hxx
Adaptor2d_HOffsetCurve_0.cxx
Adaptor2d_Line2d.cxx
Adaptor2d_Line2d.hxx
Adaptor2d_OffsetCurve.cxx
Adaptor2d_OffsetCurve.hxx
Adaptor2d_OffsetCurve.lxx

View File

@ -14,9 +14,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_OffsetCurve.hxx>
@ -32,6 +31,8 @@
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient)
//=======================================================================
//function : ~Adaptor3d_Curve
//purpose : Destructor
@ -100,8 +101,8 @@ void Adaptor3d_Curve::Intervals(TColStd_Array1OfReal& , const GeomAbs_Shape ) co
//purpose :
//=======================================================================
//Handle(Adaptor3d_HCurve) Adaptor3d_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_HCurve) Adaptor3d_Curve::Trim(const Standard_Real , const Standard_Real , const Standard_Real ) const
//Handle(Adaptor3d_Curve) Adaptor3d_Curve::Trim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_Curve) Adaptor3d_Curve::Trim(const Standard_Real , const Standard_Real , const Standard_Real ) const
{
throw Standard_NotImplemented("Adaptor3d_Curve::Trim");
}

View File

@ -17,31 +17,28 @@
#ifndef _Adaptor3d_Curve_HeaderFile
#define _Adaptor3d_Curve_HeaderFile
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Hypr.hxx>
#include <gp_Parab.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_CurveType.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor3d_HCurve;
class gp_Pnt;
class gp_Vec;
class gp_Lin;
class gp_Circ;
class gp_Elips;
class gp_Hypr;
class gp_Parab;
class Geom_BezierCurve;
class Geom_BSplineCurve;
class Geom_OffsetCurve;
DEFINE_STANDARD_HANDLE(Adaptor3d_Curve, Standard_Transient)
//! Root class for 3D curves on which geometric
//! algorithms work.
@ -56,13 +53,11 @@ class Geom_OffsetCurve;
//! Polynomial coefficients of BSpline curves used for their evaluation are
//! cached for better performance. Therefore these evaluations are not
//! thread-safe and parallel evaluations need to be prevented.
class Adaptor3d_Curve
class Adaptor3d_Curve : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient)
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual Standard_Real FirstParameter() const;
Standard_EXPORT virtual Standard_Real LastParameter() const;
@ -84,7 +79,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Standard_Boolean IsClosed() const;
@ -161,27 +156,6 @@ public:
Standard_EXPORT virtual ~Adaptor3d_Curve();
protected:
private:
};
#endif // _Adaptor3d_Curve_HeaderFile

View File

@ -14,11 +14,10 @@
#define No_Standard_OutOfRange
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_InterFunc.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
@ -58,6 +57,8 @@
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HSequenceOfReal.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_CurveOnSurface, Adaptor3d_Curve)
static gp_Pnt to3d(const gp_Pln& Pl, const gp_Pnt2d& P)
{
return ElSLib::Value(P.X(),P.Y(),Pl);
@ -697,7 +698,7 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface()
//=======================================================================
Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface
(const Handle(Adaptor3d_HSurface)& S)
(const Handle(Adaptor3d_Surface)& S)
: myType(GeomAbs_OtherCurve), myIntCont(GeomAbs_CN)
{
Load(S);
@ -709,8 +710,8 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface
//=======================================================================
Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface
(const Handle(Adaptor2d_HCurve2d)& C,
const Handle(Adaptor3d_HSurface)& S)
(const Handle(Adaptor2d_Curve2d)& C,
const Handle(Adaptor3d_Surface)& S)
: myType(GeomAbs_OtherCurve), myIntCont(GeomAbs_CN)
{
Load(S);
@ -722,7 +723,7 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface
//purpose :
//=======================================================================
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S)
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_Surface)& S)
{
mySurface = S;
if (!myCurve.IsNull()) EvalKPart();
@ -733,7 +734,7 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S)
//purpose :
//=======================================================================
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_Curve2d)& C)
{
myCurve = C;
if (mySurface.IsNull())
@ -762,8 +763,8 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
//purpose :
//=======================================================================
void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_HCurve2d)& C,
const Handle(Adaptor3d_HSurface)& S)
void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_Curve2d)& C,
const Handle(Adaptor3d_Surface)& S)
{
Load (C);
Load (S);
@ -926,14 +927,14 @@ void Adaptor3d_CurveOnSurface::Intervals(TColStd_Array1OfReal& T,
//purpose :
//=======================================================================
Handle(Adaptor3d_HCurve) Adaptor3d_CurveOnSurface::Trim
Handle(Adaptor3d_Curve) Adaptor3d_CurveOnSurface::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
Handle(Adaptor3d_HCurveOnSurface) HCS = new Adaptor3d_HCurveOnSurface();
HCS->ChangeCurve().Load(mySurface);
HCS->ChangeCurve().Load(myCurve->Trim(First,Last,Tol));
Handle(Adaptor3d_CurveOnSurface) HCS = new Adaptor3d_CurveOnSurface();
HCS->Load(mySurface);
HCS->Load(myCurve->Trim(First,Last,Tol));
return HCS;
}
@ -1398,7 +1399,7 @@ Handle(Geom_BSplineCurve) Adaptor3d_CurveOnSurface::BSpline() const
//purpose :
//=======================================================================
const Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::GetCurve() const
const Handle(Adaptor2d_Curve2d)& Adaptor3d_CurveOnSurface::GetCurve() const
{
return myCurve;
}
@ -1408,7 +1409,7 @@ const Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::GetCurve() const
//purpose :
//=======================================================================
const Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::GetSurface() const
const Handle(Adaptor3d_Surface)& Adaptor3d_CurveOnSurface::GetSurface() const
{
return mySurface;
}
@ -1418,7 +1419,7 @@ const Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::GetSurface() const
//purpose :
//=======================================================================
Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::ChangeCurve()
Handle(Adaptor2d_Curve2d)& Adaptor3d_CurveOnSurface::ChangeCurve()
{
return myCurve;
}
@ -1428,7 +1429,7 @@ Handle(Adaptor2d_HCurve2d)& Adaptor3d_CurveOnSurface::ChangeCurve()
//purpose :
//=======================================================================
Handle(Adaptor3d_HSurface)& Adaptor3d_CurveOnSurface::ChangeSurface() {
Handle(Adaptor3d_Surface)& Adaptor3d_CurveOnSurface::ChangeSurface() {
return mySurface;
}
@ -1705,11 +1706,11 @@ void Adaptor3d_CurveOnSurface::EvalFirstLastSurf()
Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV,
const gp_Vec2d& DUV,
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_Surface)& S,
gp_Pnt2d& LeftBot,
gp_Pnt2d& RightTop) const
{
Handle(Adaptor3d_HCurve) AHC = S->BasisCurve();
Handle(Adaptor3d_Curve) AHC = S->BasisCurve();
if (AHC->GetType() == GeomAbs_BSplineCurve) {
Handle( Geom_BSplineCurve) BSplC;
@ -1743,11 +1744,11 @@ Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV,
Standard_Boolean Adaptor3d_CurveOnSurface::
LocatePart_Offset(const gp_Pnt2d& UV, const gp_Vec2d& DUV,
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_Surface)& S,
gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const
{
Standard_Boolean Ok = Standard_True;
Handle( Adaptor3d_HSurface) AHS;
Handle( Adaptor3d_Surface) AHS;
Handle( Geom_BSplineSurface) BSplS;
AHS = S->BasisSurface();
GeomAbs_SurfaceType BasisSType = AHS->GetType();
@ -1773,7 +1774,7 @@ Standard_Boolean Adaptor3d_CurveOnSurface::
//=======================================================================
void Adaptor3d_CurveOnSurface::LocatePart(const gp_Pnt2d& UV, const gp_Vec2d& DUV,
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_Surface)& S,
gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const
{
Handle( Geom_BSplineSurface) BSplS;

View File

@ -17,38 +17,15 @@
#ifndef _Adaptor3d_CurveOnSurface_HeaderFile
#define _Adaptor3d_CurveOnSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAbs_CurveType.hxx>
#include <gp_Circ.hxx>
#include <gp_Lin.hxx>
#include <TColStd_HSequenceOfReal.hxx>
#include <GeomAbs_Shape.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
class Adaptor3d_HSurface;
class Adaptor2d_HCurve2d;
class Standard_NoSuchObject;
class Standard_DomainError;
class Standard_OutOfRange;
class Adaptor3d_HCurve;
class gp_Pnt;
class gp_Vec;
class gp_Lin;
class gp_Circ;
class gp_Elips;
class gp_Hypr;
class gp_Parab;
class Geom_BezierCurve;
class Geom_BSplineCurve;
class gp_Pnt2d;
class gp_Vec2d;
#include <TColStd_HSequenceOfReal.hxx>
DEFINE_STANDARD_HANDLE(Adaptor3d_CurveOnSurface, Adaptor3d_Curve)
//! An interface between the services provided by a curve
//! lying on a surface from the package Geom and those
@ -57,35 +34,33 @@ class gp_Vec2d;
//! package, in the parametric space of the surface.
class Adaptor3d_CurveOnSurface : public Adaptor3d_Curve
{
DEFINE_STANDARD_RTTIEXT(Adaptor3d_CurveOnSurface, Adaptor3d_Curve)
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Adaptor3d_CurveOnSurface();
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_Surface)& S);
//! Creates a CurveOnSurface from the 2d curve <C> and
//! the surface <S>.
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S);
//! Changes the surface.
Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S);
//! Changes the 2d curve.
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C);
Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C);
//! Load both curve and surface.
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S);
Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetCurve() const;
Standard_EXPORT const Handle(Adaptor2d_Curve2d)& GetCurve() const;
Standard_EXPORT const Handle(Adaptor3d_HSurface)& GetSurface() const;
Standard_EXPORT const Handle(Adaptor3d_Surface)& GetSurface() const;
Standard_EXPORT Handle(Adaptor2d_HCurve2d)& ChangeCurve();
Standard_EXPORT Handle(Adaptor2d_Curve2d)& ChangeCurve();
Standard_EXPORT Handle(Adaptor3d_HSurface)& ChangeSurface();
Standard_EXPORT Handle(Adaptor3d_Surface)& ChangeSurface();
Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
@ -108,7 +83,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
@ -181,17 +156,7 @@ public:
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
Standard_EXPORT void EvalKPart();
@ -202,35 +167,29 @@ private:
//! for trimming the curve on surface.
Standard_EXPORT void EvalFirstLastSurf();
Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_Surface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
//! Extracts the numbers of knots which equal
//! the point and checks derivative components
//! by zero equivalence.
Standard_EXPORT void FindBounds (const TColStd_Array1OfReal& Arr, const Standard_Real XYComp, const Standard_Real DUVComp, Standard_Integer& Bnd1, Standard_Integer& Bnd2, Standard_Boolean& DerIsNull) const;
private:
Handle(Adaptor3d_HSurface) mySurface;
Handle(Adaptor2d_HCurve2d) myCurve;
Handle(Adaptor3d_Surface) mySurface;
Handle(Adaptor2d_Curve2d) myCurve;
GeomAbs_CurveType myType;
gp_Circ myCirc;
gp_Lin myLin;
Handle(Adaptor3d_HSurface) myFirstSurf;
Handle(Adaptor3d_HSurface) myLastSurf;
Handle(Adaptor3d_Surface) myFirstSurf;
Handle(Adaptor3d_Surface) myLastSurf;
Handle(TColStd_HSequenceOfReal) myIntervals;
GeomAbs_Shape myIntCont;
};
#endif // _Adaptor3d_CurveOnSurface_HeaderFile

View File

@ -1,52 +0,0 @@
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : Adaptor3d_GenHCurve
//purpose :
//=======================================================================
Adaptor3d_GenHCurve::Adaptor3d_GenHCurve () {}
//=======================================================================
//function : Adaptor3d_GenHCurve
//purpose :
//=======================================================================
Adaptor3d_GenHCurve::Adaptor3d_GenHCurve (const TheCurve& C)
{myCurve = C;}
//=======================================================================
//function : Set
//purpose :
//=======================================================================
void Adaptor3d_GenHCurve::Set(const TheCurve& C)
{
myCurve = C;
}
//=======================================================================
//function : Curve
//purpose :
//=======================================================================
const Adaptor3d_Curve& Adaptor3d_GenHCurve::Curve () const
{
return myCurve;
}
Adaptor3d_Curve& Adaptor3d_GenHCurve::GetCurve ()
{
return myCurve;
}

View File

@ -1,20 +0,0 @@
// Created on: 1995-05-09
// Created by: Xavier BENVENISTE
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
inline TheCurve& Adaptor3d_GenHCurve::ChangeCurve()
{
return myCurve;
}

View File

@ -1,49 +0,0 @@
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : Adaptor3d_GenHSurface
//purpose :
//=======================================================================
Adaptor3d_GenHSurface::Adaptor3d_GenHSurface () {}
//=======================================================================
//function : Adaptor3d_GenHSurface
//purpose :
//=======================================================================
Adaptor3d_GenHSurface::Adaptor3d_GenHSurface (const TheSurface& S):
mySurf(S)
{}
//=======================================================================
//function : Set
//purpose :
//=======================================================================
void Adaptor3d_GenHSurface::Set (const TheSurface& S)
{
mySurf = S;
}
//=======================================================================
//function : Surface
//purpose :
//=======================================================================
const Adaptor3d_Surface& Adaptor3d_GenHSurface::Surface () const
{
return mySurf;
}

View File

@ -1,20 +0,0 @@
// Created on: 1995-05-09
// Created by: Xavier BENVENISTE
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
inline TheSurface& Adaptor3d_GenHSurface::ChangeSurface()
{
return mySurf;
}

View File

@ -1,26 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_HCurve,Standard_Transient)

View File

@ -1,162 +0,0 @@
// Created on: 1994-02-23
// Created by: model
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor3d_HCurve_HeaderFile
#define _Adaptor3d_HCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <GeomAbs_CurveType.hxx>
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Hypr.hxx>
#include <gp_Parab.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor3d_Curve;
class gp_Pnt;
class gp_Vec;
class Geom_BezierCurve;
class Geom_BSplineCurve;
class Geom_OffsetCurve;
class Adaptor3d_HCurve;
DEFINE_STANDARD_HANDLE(Adaptor3d_HCurve, Standard_Transient)
//! Root class for 3D curves manipulated by handles, on
//! which geometric algorithms work.
//! An adapted curve is an interface between the
//! services provided by a curve and those required of
//! the curve by algorithms which use it.
//! Two derived concrete classes are provided:
//! - GeomAdaptor_HCurve for a curve from the Geom package
//! - Adaptor3d_HCurveOnSurface for a curve lying
//! on a surface from the Geom package.
class Adaptor3d_HCurve : public Standard_Transient
{
public:
//! Returns a pointer to the Curve inside the HCurve.
Standard_EXPORT virtual const Adaptor3d_Curve& Curve() const = 0;
//! Returns a pointer to the Curve inside the HCurve.
Standard_EXPORT virtual Adaptor3d_Curve& GetCurve() = 0;
Standard_Real FirstParameter() const;
Standard_Real LastParameter() const;
GeomAbs_Shape Continuity() const;
Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
//! 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()
void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
//! Returns a curve equivalent of <me> between
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//!
//! If <First> >= <Last>
Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_Boolean IsClosed() const;
Standard_Boolean IsPeriodic() const;
Standard_Real Period() const;
gp_Pnt Value (const Standard_Real U) const;
void D0 (const Standard_Real U, gp_Pnt& P) const;
void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const;
void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const;
gp_Vec DN (const Standard_Real U, const Standard_Integer N) const;
Standard_Real Resolution (const Standard_Real R3d) const;
GeomAbs_CurveType GetType() const;
gp_Lin Line() const;
gp_Circ Circle() const;
gp_Elips Ellipse() const;
gp_Hypr Hyperbola() const;
gp_Parab Parabola() const;
Standard_Integer Degree() const;
Standard_Boolean IsRational() const;
Standard_Integer NbPoles() const;
Standard_Integer NbKnots() const;
Handle(Geom_BezierCurve) Bezier() const;
Handle(Geom_BSplineCurve) BSpline() const;
Handle(Geom_OffsetCurve) OffsetCurve() const;
DEFINE_STANDARD_RTTIEXT(Adaptor3d_HCurve,Standard_Transient)
protected:
private:
};
#include <Adaptor3d_HCurve.lxx>
#endif // _Adaptor3d_HCurve_HeaderFile

View File

@ -1,304 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_Curve.hxx>
//=======================================================================
//function : FirstParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HCurve::FirstParameter() const
{
return Curve().FirstParameter();
}
//=======================================================================
//function : LastParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HCurve::LastParameter() const
{
return Curve().LastParameter();
}
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
inline GeomAbs_Shape Adaptor3d_HCurve::Continuity() const
{
return Curve().Continuity();
}
//=======================================================================
//function : NbIntervals
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HCurve::NbIntervals(const GeomAbs_Shape S) const
{
return Curve().NbIntervals(S);
}
//=======================================================================
//function : Intervals
//purpose :
//=======================================================================
inline void Adaptor3d_HCurve::Intervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S) const
{
Curve().Intervals(T,S);
}
//=======================================================================
//function : Trim
//purpose :
//=======================================================================
inline Handle(Adaptor3d_HCurve) Adaptor3d_HCurve::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
return Curve().Trim(First,Last,Tol);
}
//=======================================================================
//function : IsClosed
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HCurve::IsClosed() const
{
return Curve().IsClosed();
}
//=======================================================================
//function : IsPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HCurve::IsPeriodic() const
{
return Curve().IsPeriodic();
}
//=======================================================================
//function : Period
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HCurve::Period() const
{
return Curve().Period();
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
inline gp_Pnt Adaptor3d_HCurve::Value(const Standard_Real U) const
{
return Curve().Value(U);
}
//=======================================================================
//function : D0
//purpose :
//=======================================================================
inline void Adaptor3d_HCurve::D0(const Standard_Real U, gp_Pnt& P) const
{
Curve().D0(U,P);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
inline void Adaptor3d_HCurve::D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V) const
{
Curve().D1(U,P,V);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
inline void Adaptor3d_HCurve::D2(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const
{
Curve().D2(U,P,V1,V2);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
inline void Adaptor3d_HCurve::D3(const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const
{
Curve().D3(U,P,V1,V2,V3);
}
//=======================================================================
//function : DN
//purpose :
//=======================================================================
inline gp_Vec Adaptor3d_HCurve::DN(const Standard_Real U, const Standard_Integer N) const
{
return Curve().DN(U,N);
}
//=======================================================================
//function : Resolution
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HCurve::Resolution(const Standard_Real R3d) const
{
return Curve().Resolution(R3d);
}
//=======================================================================
//function : GetType
//purpose :
//=======================================================================
inline GeomAbs_CurveType Adaptor3d_HCurve::GetType() const
{
return Curve().GetType();
}
//=======================================================================
//function : Line
//purpose :
//=======================================================================
inline gp_Lin Adaptor3d_HCurve::Line() const
{
return Curve().Line();
}
//=======================================================================
//function : Circle
//purpose :
//=======================================================================
inline gp_Circ Adaptor3d_HCurve::Circle() const
{
return Curve().Circle();
}
//=======================================================================
//function : Ellipse
//purpose :
//=======================================================================
inline gp_Elips Adaptor3d_HCurve::Ellipse() const
{
return Curve().Ellipse();
}
//=======================================================================
//function : Hyperbola
//purpose :
//=======================================================================
inline gp_Hypr Adaptor3d_HCurve::Hyperbola() const
{
return Curve().Hyperbola();
}
//=======================================================================
//function : Parabola
//purpose :
//=======================================================================
inline gp_Parab Adaptor3d_HCurve::Parabola() const
{
return Curve().Parabola();
}
//=======================================================================
//function : Degree
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HCurve::Degree() const
{
return Curve().Degree() ;
}
//=======================================================================
//function : IsRational
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HCurve::IsRational() const
{
return Curve().IsRational() ;
}
//=======================================================================
//function : NbPoles
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HCurve::NbPoles() const
{
return Curve().NbPoles() ;
}
//=======================================================================
//function : NbKnots
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HCurve::NbKnots() const
{
return Curve().NbKnots() ;
}
//=======================================================================
//function : Bezier
//purpose :
//=======================================================================
inline Handle(Geom_BezierCurve) Adaptor3d_HCurve::Bezier() const
{
return Curve().Bezier();
}
//=======================================================================
//function : BSpline
//purpose :
//=======================================================================
inline Handle(Geom_BSplineCurve) Adaptor3d_HCurve::BSpline() const
{
return Curve().BSpline();
}
//=======================================================================
//function : BasisCurve
//purpose :
//=======================================================================
inline Handle(Geom_OffsetCurve) Adaptor3d_HCurve::OffsetCurve() const
{
return Curve().OffsetCurve();
}

View File

@ -1,97 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor3d_HCurveOnSurface_HeaderFile
#define _Adaptor3d_HCurveOnSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor3d_CurveOnSurface;
class Adaptor3d_Curve;
class Adaptor3d_HCurveOnSurface;
DEFINE_STANDARD_HANDLE(Adaptor3d_HCurveOnSurface, Adaptor3d_HCurve)
class Adaptor3d_HCurveOnSurface : public Adaptor3d_HCurve
{
public:
//! Creates an empty GenHCurve.
Standard_EXPORT Adaptor3d_HCurveOnSurface();
//! Creates a GenHCurve from a Curve
Standard_EXPORT Adaptor3d_HCurveOnSurface(const Adaptor3d_CurveOnSurface& C);
//! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const Adaptor3d_CurveOnSurface& C);
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
Adaptor3d_CurveOnSurface& ChangeCurve();
DEFINE_STANDARD_RTTI_INLINE(Adaptor3d_HCurveOnSurface,Adaptor3d_HCurve)
protected:
Adaptor3d_CurveOnSurface myCurve;
private:
};
#define TheCurve Adaptor3d_CurveOnSurface
#define TheCurve_hxx <Adaptor3d_CurveOnSurface.hxx>
#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HCurveOnSurface.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface)
#include <Adaptor3d_GenHCurve.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor3d_GenHCurve
#undef Adaptor3d_GenHCurve_hxx
#undef Handle_Adaptor3d_GenHCurve
#endif // _Adaptor3d_HCurveOnSurface_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_Curve.hxx>
#define TheCurve Adaptor3d_CurveOnSurface
#define TheCurve_hxx <Adaptor3d_CurveOnSurface.hxx>
#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HCurveOnSurface.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface)
#include <Adaptor3d_GenHCurve.gxx>

View File

@ -1,97 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor3d_HIsoCurve_HeaderFile
#define _Adaptor3d_HIsoCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor3d_IsoCurve.hxx>
#include <Adaptor3d_HCurve.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor3d_IsoCurve;
class Adaptor3d_Curve;
class Adaptor3d_HIsoCurve;
DEFINE_STANDARD_HANDLE(Adaptor3d_HIsoCurve, Adaptor3d_HCurve)
class Adaptor3d_HIsoCurve : public Adaptor3d_HCurve
{
public:
//! Creates an empty GenHCurve.
Standard_EXPORT Adaptor3d_HIsoCurve();
//! Creates a GenHCurve from a Curve
Standard_EXPORT Adaptor3d_HIsoCurve(const Adaptor3d_IsoCurve& C);
//! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const Adaptor3d_IsoCurve& C);
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
Adaptor3d_IsoCurve& ChangeCurve();
DEFINE_STANDARD_RTTI_INLINE(Adaptor3d_HIsoCurve,Adaptor3d_HCurve)
protected:
Adaptor3d_IsoCurve myCurve;
private:
};
#define TheCurve Adaptor3d_IsoCurve
#define TheCurve_hxx <Adaptor3d_IsoCurve.hxx>
#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HIsoCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve)
#include <Adaptor3d_GenHCurve.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor3d_GenHCurve
#undef Adaptor3d_GenHCurve_hxx
#undef Handle_Adaptor3d_GenHCurve
#endif // _Adaptor3d_HIsoCurve_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1992-10-08
// Created by: Isabelle GRIGNON
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_HIsoCurve.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <Adaptor3d_IsoCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#define TheCurve Adaptor3d_IsoCurve
#define TheCurve_hxx <Adaptor3d_IsoCurve.hxx>
#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HIsoCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve)
#include <Adaptor3d_GenHCurve.gxx>

View File

@ -1,28 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_HSurface,Standard_Transient)

View File

@ -1,188 +0,0 @@
// Created on: 1994-02-14
// Created by: model
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _Adaptor3d_HSurface_HeaderFile
#define _Adaptor3d_HSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Pln.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Sphere.hxx>
#include <gp_Torus.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Standard_NotImplemented;
class Adaptor3d_Surface;
class gp_Pnt;
class gp_Vec;
class Geom_BezierSurface;
class Geom_BSplineSurface;
class Adaptor3d_HCurve;
class Adaptor3d_HSurface;
DEFINE_STANDARD_HANDLE(Adaptor3d_HSurface, Standard_Transient)
//! Root class for surfaces manipulated by handles, on
//! which geometric algorithms work.
//! An adapted surface is an interface between the
//! services provided by a surface and those required of
//! the surface by algorithms which use it.
//! A derived concrete class is provided:
//! GeomAdaptor_HSurface for a surface from the Geom package.
class Adaptor3d_HSurface : public Standard_Transient
{
public:
//! Returns a reference to the Surface inside the HSurface.
Standard_EXPORT virtual const Adaptor3d_Surface& Surface() const = 0;
Standard_Real FirstUParameter() const;
Standard_Real LastUParameter() const;
Standard_Real FirstVParameter() const;
Standard_Real LastVParameter() const;
GeomAbs_Shape UContinuity() const;
GeomAbs_Shape VContinuity() const;
Standard_Integer NbUIntervals (const GeomAbs_Shape S) const;
Standard_Integer NbVIntervals (const GeomAbs_Shape S) const;
void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_Boolean IsUClosed() const;
Standard_Boolean IsVClosed() const;
Standard_Boolean IsUPeriodic() const;
Standard_Real UPeriod() const;
Standard_Boolean IsVPeriodic() const;
Standard_Real VPeriod() const;
gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
void D2 (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& D2UV) const;
void D3 (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& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const;
gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const;
Standard_Real UResolution (const Standard_Real R3d) const;
Standard_Real VResolution (const Standard_Real R3d) const;
GeomAbs_SurfaceType GetType() const;
gp_Pln Plane() const;
gp_Cylinder Cylinder() const;
gp_Cone Cone() const;
gp_Sphere Sphere() const;
gp_Torus Torus() const;
Standard_Integer UDegree() const;
Standard_Integer NbUPoles() const;
Standard_Integer VDegree() const;
Standard_Integer NbVPoles() const;
Standard_Integer NbUKnots() const;
Standard_Integer NbVKnots() const;
Standard_Boolean IsURational() const;
Standard_Boolean IsVRational() const;
Handle(Geom_BezierSurface) Bezier() const;
Handle(Geom_BSplineSurface) BSpline() const;
gp_Ax1 AxeOfRevolution() const;
gp_Dir Direction() const;
Handle(Adaptor3d_HCurve) BasisCurve() const;
Handle(Adaptor3d_HSurface) BasisSurface() const;
Standard_Real OffsetValue() const;
DEFINE_STANDARD_RTTIEXT(Adaptor3d_HSurface,Standard_Transient)
protected:
private:
};
#include <Adaptor3d_HSurface.lxx>
#endif // _Adaptor3d_HSurface_HeaderFile

View File

@ -1,485 +0,0 @@
// Copyright (c) 1999-2014 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.
#include <Adaptor3d_Surface.hxx>
//=======================================================================
//function : FirstUParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::FirstUParameter() const
{
return Surface().FirstUParameter();
}
//=======================================================================
//function : LastUParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::LastUParameter() const
{
return Surface().LastUParameter();
}
//=======================================================================
//function : FirstVParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::FirstVParameter() const
{
return Surface().FirstVParameter();
}
//=======================================================================
//function : LastVParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::LastVParameter() const
{
return Surface().LastVParameter();
}
//=======================================================================
//function : UContinuity
//purpose :
//=======================================================================
inline GeomAbs_Shape Adaptor3d_HSurface::UContinuity() const
{
return Surface().UContinuity();
}
//=======================================================================
//function : VContinuity
//purpose :
//=======================================================================
inline GeomAbs_Shape Adaptor3d_HSurface::VContinuity() const
{
return Surface().VContinuity();
}
//=======================================================================
//function : NbUIntervals
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbUIntervals(const GeomAbs_Shape S) const
{
return Surface().NbUIntervals(S);
}
//=======================================================================
//function : NbVIntervals
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbVIntervals(const GeomAbs_Shape S) const
{
return Surface().NbVIntervals(S);
}
//=======================================================================
//function : UInterval
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::UIntervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S) const
{
Surface().UIntervals(T,S);
}
//=======================================================================
//function : VInterval
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::VIntervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S) const
{
Surface().VIntervals(T, S);
}
//=======================================================================
//function : inline
//purpose :
//=======================================================================
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::UTrim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
return Surface().UTrim(First,Last,Tol);
}
//=======================================================================
//function : inline
//purpose :
//=======================================================================
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::VTrim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
return Surface().VTrim(First,Last,Tol);
}
//=======================================================================
//function : IsUClosed
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsUClosed() const
{
return Surface().IsUClosed();
}
//=======================================================================
//function : IsVClosed
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsVClosed() const
{
return Surface().IsVClosed();
}
//=======================================================================
//function : IsUPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsUPeriodic() const
{
return Surface().IsUPeriodic();
}
//=======================================================================
//function : UPeriod
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::UPeriod() const
{
return Surface().UPeriod();
}
//=======================================================================
//function : IsVPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsVPeriodic() const
{
return Surface().IsVPeriodic();
}
//=======================================================================
//function : VPeriod
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::VPeriod() const
{
return Surface().VPeriod();
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
inline gp_Pnt Adaptor3d_HSurface::Value(const Standard_Real U, const Standard_Real V) const
{
return Surface().Value(U,V);
}
//=======================================================================
//function : D0
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::D0(const Standard_Real U, const Standard_Real V, gp_Pnt& P) const
{
Surface().D0(U,V,P);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::D1(const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const
{
Surface().D1(U,V,P,D1U,D1V);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::D2(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& D2UV) const
{
Surface().D2(U,V,P,D1U,D1V,D2U,D2V,D2UV);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
inline void Adaptor3d_HSurface::D3(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& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const
{
Surface().D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
}
//=======================================================================
//function : DN
//purpose :
//=======================================================================
inline gp_Vec Adaptor3d_HSurface::DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const
{
return Surface().DN(U,V,Nu,Nv);
}
//=======================================================================
//function : UResolution
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::UResolution(const Standard_Real R3d) const
{
return Surface().UResolution(R3d);
}
//=======================================================================
//function : VResolution
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::VResolution(const Standard_Real R3d) const
{
return Surface().VResolution(R3d);
}
//=======================================================================
//function : GetType
//purpose :
//=======================================================================
inline GeomAbs_SurfaceType Adaptor3d_HSurface::GetType() const
{
return Surface().GetType();
}
//=======================================================================
//function : Plane
//purpose :
//=======================================================================
inline gp_Pln Adaptor3d_HSurface::Plane() const
{
return Surface().Plane();
}
//=======================================================================
//function : Cylinder
//purpose :
//=======================================================================
inline gp_Cylinder Adaptor3d_HSurface::Cylinder() const
{
return Surface().Cylinder();
}
//=======================================================================
//function : Cone
//purpose :
//=======================================================================
inline gp_Cone Adaptor3d_HSurface::Cone() const
{
return Surface().Cone();
}
//=======================================================================
//function : Sphere
//purpose :
//=======================================================================
inline gp_Sphere Adaptor3d_HSurface::Sphere() const
{
return Surface().Sphere();
}
//=======================================================================
//function : Torus
//purpose :
//=======================================================================
inline gp_Torus Adaptor3d_HSurface::Torus() const
{
return Surface().Torus();
}
//=======================================================================
//function : UDegree
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::UDegree() const
{
return Surface().UDegree();
}
//=======================================================================
//function : NbUPoles
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbUPoles() const
{
return Surface().NbUPoles();
}
//=======================================================================
//function : VDegree
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::VDegree() const
{
return Surface().VDegree();
}
//=======================================================================
//function : NbVPoles
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbVPoles() const
{
return Surface().NbVPoles();
}
//=======================================================================
//function : NbUKnots
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbUKnots() const
{
return Surface().NbUKnots();
}
//=======================================================================
//function : NbVKnots
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HSurface::NbVKnots() const
{
return Surface().NbVKnots();
}
//=======================================================================
//function : IsURational
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsURational() const
{
return Surface().IsURational();
}
//=======================================================================
//function : NbVKnots
//purpose :
//=======================================================================
inline Standard_Boolean Adaptor3d_HSurface::IsVRational() const
{
return Surface().IsVRational();
}
//=======================================================================
//function : Bezier
//purpose :
//=======================================================================
inline Handle(Geom_BezierSurface) Adaptor3d_HSurface::Bezier() const
{
return Surface().Bezier();
}
//=======================================================================
//function : BSpline
//purpose :
//=======================================================================
inline Handle(Geom_BSplineSurface) Adaptor3d_HSurface::BSpline() const
{
return Surface().BSpline();
}
//=======================================================================
//function : Axis
//purpose :
//=======================================================================
inline gp_Ax1 Adaptor3d_HSurface::AxeOfRevolution() const
{
return Surface().AxeOfRevolution();
}
//=======================================================================
//function : Direction
//purpose :
//=======================================================================
inline gp_Dir Adaptor3d_HSurface::Direction() const
{
return Surface().Direction();
}
//=======================================================================
//function : BasisCurve
//purpose :
//=======================================================================
inline Handle(Adaptor3d_HCurve) Adaptor3d_HSurface::BasisCurve() const
{
return Surface().BasisCurve();
}
//=======================================================================
//function : BasisSurface
//purpose :
//=======================================================================
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurface::BasisSurface() const
{
return Surface().BasisSurface();
}
//=======================================================================
//function : OffsetValue
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_HSurface::OffsetValue() const
{
return Surface().OffsetValue();
}

View File

@ -13,10 +13,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_HSurfaceTool.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <gp_Pnt.hxx>
@ -24,7 +24,7 @@
#include <Standard_NoSuchObject.hxx>
#include <Standard_OutOfRange.hxx>
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurface)& S)
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_Surface)& S)
{
switch (S->GetType())
{
@ -42,7 +42,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf
return 10;
}
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurface)& S)
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_Surface)& S)
{
switch (S->GetType())
{
@ -65,7 +65,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurf
return 10;
}
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurface)& S,
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_Surface)& S,
const Standard_Real u1,
const Standard_Real u2)
{
@ -82,7 +82,7 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurf
return n;
}
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_HSurface)& S,
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_Surface)& S,
const Standard_Real v1,
const Standard_Real v2)
{

View File

@ -17,35 +17,26 @@
#ifndef _Adaptor3d_HSurfaceTool_HeaderFile
#define _Adaptor3d_HSurfaceTool_HeaderFile
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Sphere.hxx>
#include <gp_Torus.hxx>
#include <gp_Vec.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Pln.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Torus.hxx>
#include <gp_Sphere.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
class Standard_NoSuchObject;
class Standard_OutOfRange;
class Adaptor3d_HSurface;
class gp_Pnt;
class gp_Vec;
class Geom_BezierSurface;
class Geom_BSplineSurface;
class Adaptor3d_HCurve;
#include <TColStd_Array1OfReal.hxx>
class Adaptor3d_HSurfaceTool
{
@ -53,113 +44,135 @@ public:
DEFINE_STANDARD_ALLOC
static Standard_Real FirstUParameter (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real FirstVParameter (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real LastUParameter (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real LastVParameter (const Handle(Adaptor3d_HSurface)& S);
static Standard_Integer NbUIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh);
static Standard_Integer NbVIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh);
static void UIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
static void VIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
static Standard_Real FirstUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstUParameter(); }
static Standard_Real FirstVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->FirstVParameter(); }
static Standard_Real LastUParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastUParameter(); }
static Standard_Real LastVParameter (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->LastVParameter(); }
static Standard_Integer NbUIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbUIntervals (theSh); }
static Standard_Integer NbVIntervals (const Handle(Adaptor3d_Surface)& theSurf, const GeomAbs_Shape theSh) { return theSurf->NbVIntervals (theSh); }
static void UIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->UIntervals (theTab, theSh); }
static void VIntervals (const Handle(Adaptor3d_Surface)& theSurf, TColStd_Array1OfReal& theTab, const GeomAbs_Shape theSh) { theSurf->VIntervals (theTab, theSh); }
//! If <First> >= <Last>
static Handle(Adaptor3d_HSurface) UTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
static Handle(Adaptor3d_Surface) UTrim (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol)
{
return theSurf->UTrim (theFirst, theLast, theTol);
}
//! If <First> >= <Last>
static Handle(Adaptor3d_HSurface) VTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
static Handle(Adaptor3d_Surface) VTrim (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTol)
{
return theSurf->VTrim (theFirst, theLast, theTol);
}
static Standard_Boolean IsUClosed (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean IsVClosed (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real UPeriod (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real VPeriod (const Handle(Adaptor3d_HSurface)& S);
static gp_Pnt Value (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v);
static void D0 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P);
static void D1 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v);
static void D2 (const Handle(Adaptor3d_HSurface)& S, 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& D2UV);
static void D3 (const Handle(Adaptor3d_HSurface)& S, 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& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV);
static gp_Vec DN (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv);
static Standard_Real UResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d);
static Standard_Real VResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d);
static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_HSurface)& S);
static gp_Pln Plane (const Handle(Adaptor3d_HSurface)& S);
static gp_Cylinder Cylinder (const Handle(Adaptor3d_HSurface)& S);
static gp_Cone Cone (const Handle(Adaptor3d_HSurface)& S);
static gp_Torus Torus (const Handle(Adaptor3d_HSurface)& S);
static gp_Sphere Sphere (const Handle(Adaptor3d_HSurface)& S);
static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_HSurface)& S);
static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_HSurface)& S);
static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_HSurface)& S);
static gp_Dir Direction (const Handle(Adaptor3d_HSurface)& S);
static Handle(Adaptor3d_HCurve) BasisCurve (const Handle(Adaptor3d_HSurface)& S);
static Handle(Adaptor3d_HSurface) BasisSurface (const Handle(Adaptor3d_HSurface)& S);
static Standard_Real OffsetValue (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2);
static Standard_Boolean IsUClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUClosed(); }
static Standard_Boolean IsVClosed (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVClosed(); }
static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsUPeriodic(); }
static Standard_Real UPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->UPeriod(); }
static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->IsVPeriodic(); }
static Standard_Real VPeriod (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->VPeriod(); }
protected:
static gp_Pnt Value (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theU, const Standard_Real theV) { return theSurf->Value (theU, theV); }
static void D0 (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theU, const Standard_Real theV,
gp_Pnt& thePnt)
{
theSurf->D0 (theU, theV, thePnt);
}
static void D1 (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theU, const Standard_Real theV,
gp_Pnt& thePnt,
gp_Vec& theD1U, gp_Vec& theD1V)
{
theSurf->D1 (theU, theV, thePnt, theD1U, theD1V);
}
static void D2 (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theU, const Standard_Real theV,
gp_Pnt& thePnt,
gp_Vec& theD1U, gp_Vec& theD1V,
gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV)
{
theSurf->D2 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV);
}
static void D3 (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theU, const Standard_Real theV,
gp_Pnt& thePnt,
gp_Vec& theD1U, gp_Vec& theD1V,
gp_Vec& theD2U, gp_Vec& theD2V, gp_Vec& theD2UV,
gp_Vec& theD3U, gp_Vec& theD3V, gp_Vec& theD3UUV, gp_Vec& theD3UVV)
{
theSurf->D3 (theU, theV, thePnt, theD1U, theD1V, theD2U, theD2V, theD2UV, theD3U, theD3V, theD3UUV, theD3UVV);
}
private:
static gp_Vec DN (const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theU, const Standard_Real theV,
const Standard_Integer theNU, const Standard_Integer theNV)
{
return theSurf->DN (theU, theV, theNU, theNV);
}
static Standard_Real UResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d)
{
return theSurf->UResolution (theR3d);
}
static Standard_Real VResolution (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theR3d)
{
return theSurf->VResolution (theR3d);
}
static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->GetType(); }
static gp_Pln Plane (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Plane(); }
static gp_Cylinder Cylinder (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cylinder(); }
static gp_Cone Cone (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Cone(); }
static gp_Torus Torus (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Torus(); }
static gp_Sphere Sphere (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Sphere(); }
static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Bezier(); }
static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BSpline(); }
static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->AxeOfRevolution(); }
static gp_Dir Direction (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->Direction(); }
static Handle(Adaptor3d_Curve) BasisCurve (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisCurve(); }
static Handle(Adaptor3d_Surface) BasisSurface (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->BasisSurface(); }
static Standard_Real OffsetValue (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->OffsetValue(); }
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S);
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& , const Standard_Real v1, const Standard_Real v2);
};
#include <Adaptor3d_HSurfaceTool.lxx>
#endif // _Adaptor3d_HSurfaceTool_HeaderFile

View File

@ -1,260 +0,0 @@
// Created by: Laurent BUCHARD
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Pln.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Torus.hxx>
#include <gp_Sphere.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
inline Standard_Real Adaptor3d_HSurfaceTool::FirstUParameter(const Handle(Adaptor3d_HSurface)& Surf)
{
return Surf->FirstUParameter();
}
inline Standard_Real Adaptor3d_HSurfaceTool::FirstVParameter(const Handle(Adaptor3d_HSurface)& Surf)
{
return Surf->FirstVParameter();
}
inline Standard_Real Adaptor3d_HSurfaceTool::LastUParameter(const Handle(Adaptor3d_HSurface)& Surf)
{
return Surf->LastUParameter();
}
inline Standard_Real Adaptor3d_HSurfaceTool::LastVParameter(const Handle(Adaptor3d_HSurface)& Surf)
{
return Surf->LastVParameter();
}
inline Standard_Integer Adaptor3d_HSurfaceTool::NbUIntervals(const Handle(Adaptor3d_HSurface)& Surf, const GeomAbs_Shape S)
{
return Surf->NbUIntervals(S);
}
inline Standard_Integer Adaptor3d_HSurfaceTool::NbVIntervals(const Handle(Adaptor3d_HSurface)& Surf, const GeomAbs_Shape S)
{
return Surf->NbVIntervals(S);
}
inline void Adaptor3d_HSurfaceTool::UIntervals(const Handle(Adaptor3d_HSurface)& Surf,
TColStd_Array1OfReal& Tab,
const GeomAbs_Shape S)
{
Surf->UIntervals(Tab,S);
}
inline void Adaptor3d_HSurfaceTool::VIntervals(const Handle(Adaptor3d_HSurface)& Surf,
TColStd_Array1OfReal& Tab,
const GeomAbs_Shape S)
{
Surf->VIntervals(Tab,S);
}
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::UTrim(const Handle(Adaptor3d_HSurface)& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol)
{
return Surf->UTrim(F,L,Tol);
}
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::VTrim(const Handle(Adaptor3d_HSurface)& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol)
{
return Surf->VTrim(F,L,Tol);
}
inline Standard_Boolean Adaptor3d_HSurfaceTool::IsUClosed(const Handle(Adaptor3d_HSurface)& S)
{
return S->IsUClosed();
}
inline Standard_Boolean Adaptor3d_HSurfaceTool::IsVClosed(const Handle(Adaptor3d_HSurface)& S)
{
return S->IsVClosed();
}
inline Standard_Boolean Adaptor3d_HSurfaceTool::IsUPeriodic(const Handle(Adaptor3d_HSurface)& S)
{
return S->IsUPeriodic();
}
inline Standard_Real Adaptor3d_HSurfaceTool::UPeriod(const Handle(Adaptor3d_HSurface)& S)
{
return S->UPeriod();
}
inline Standard_Boolean Adaptor3d_HSurfaceTool::IsVPeriodic(const Handle(Adaptor3d_HSurface)& S)
{
return S->IsVPeriodic();
}
inline Standard_Real Adaptor3d_HSurfaceTool::VPeriod(const Handle(Adaptor3d_HSurface)& S)
{
return S->VPeriod();
}
inline gp_Pnt Adaptor3d_HSurfaceTool::Value(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V )
{
return S->Value(U,V);
}
inline void Adaptor3d_HSurfaceTool::D0(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P)
{
S->D0(U,V,P);
}
inline void Adaptor3d_HSurfaceTool::D1(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P,
gp_Vec& D1U,
gp_Vec& D1V)
{
S->D1(U,V,P,D1U,D1V);
}
inline void Adaptor3d_HSurfaceTool::D2(const Handle(Adaptor3d_HSurface)& S,
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& D2UV)
{
S->D2(U,V,P,D1U,D1V,D2U,D2V,D2UV);
}
inline void Adaptor3d_HSurfaceTool::D3(const Handle(Adaptor3d_HSurface)& S,
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& D2UV,
gp_Vec& D3U,
gp_Vec& D3V,
gp_Vec& D3UUV,
gp_Vec& D3UVV)
{
S->D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
}
inline gp_Vec Adaptor3d_HSurfaceTool::DN(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
const Standard_Integer Nu,
const Standard_Integer Nv)
{
return S->DN(U,V,Nu,Nv);
}
inline Standard_Real Adaptor3d_HSurfaceTool::UResolution(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real R3d)
{
return S->UResolution(R3d);
}
inline Standard_Real Adaptor3d_HSurfaceTool::VResolution(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real R3d)
{
return S->VResolution(R3d);
}
inline GeomAbs_SurfaceType Adaptor3d_HSurfaceTool::GetType(const Handle(Adaptor3d_HSurface)& S )
{
return S->GetType();
}
inline gp_Pln Adaptor3d_HSurfaceTool::Plane(const Handle(Adaptor3d_HSurface)& S)
{
return S->Plane();
}
inline gp_Cylinder Adaptor3d_HSurfaceTool::Cylinder(const Handle(Adaptor3d_HSurface)& S)
{
return S->Cylinder();
}
inline gp_Cone Adaptor3d_HSurfaceTool::Cone(const Handle(Adaptor3d_HSurface)& S)
{
return S->Cone();
}
inline gp_Sphere Adaptor3d_HSurfaceTool::Sphere(const Handle(Adaptor3d_HSurface)& S)
{
return S->Sphere();
}
inline gp_Torus Adaptor3d_HSurfaceTool::Torus(const Handle(Adaptor3d_HSurface)& S)
{
return S->Torus();
}
inline Handle(Geom_BezierSurface) Adaptor3d_HSurfaceTool::Bezier(const Handle(Adaptor3d_HSurface)& S)
{
return(S->Bezier());
}
inline Handle(Geom_BSplineSurface) Adaptor3d_HSurfaceTool::BSpline(const Handle(Adaptor3d_HSurface)& S)
{
return(S->BSpline());
}
inline gp_Ax1 Adaptor3d_HSurfaceTool::AxeOfRevolution(const Handle(Adaptor3d_HSurface)& S)
{
return(S->AxeOfRevolution());
}
inline gp_Dir Adaptor3d_HSurfaceTool::Direction(const Handle(Adaptor3d_HSurface)& S)
{
return(S->Direction());
}
inline Handle(Adaptor3d_HCurve) Adaptor3d_HSurfaceTool::BasisCurve(const Handle(Adaptor3d_HSurface)& S)
{
return(S->BasisCurve());
}
inline Handle(Adaptor3d_HSurface) Adaptor3d_HSurfaceTool::BasisSurface(const Handle(Adaptor3d_HSurface)& S)
{
return(S->BasisSurface());
}
inline Standard_Real Adaptor3d_HSurfaceTool::OffsetValue(const Handle(Adaptor3d_HSurface)& S)
{
return(S->OffsetValue());
}

View File

@ -12,8 +12,9 @@
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_HVertex.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <ElCLib.hxx>
#include <gp_Pnt2d.hxx>
#include <Precision.hxx>
@ -39,12 +40,12 @@ gp_Pnt2d Adaptor3d_HVertex::Value ()
return myPnt;
}
Standard_Real Adaptor3d_HVertex::Parameter (const Handle(Adaptor2d_HCurve2d)& C)
Standard_Real Adaptor3d_HVertex::Parameter (const Handle(Adaptor2d_Curve2d)& C)
{
return ElCLib::Parameter(C->Line(),myPnt);
}
Standard_Real Adaptor3d_HVertex::Resolution (const Handle(Adaptor2d_HCurve2d)&)
Standard_Real Adaptor3d_HVertex::Resolution (const Handle(Adaptor2d_Curve2d)&)
{
return myTol;
}

View File

@ -17,17 +17,11 @@
#ifndef _Adaptor3d_HVertex_HeaderFile
#define _Adaptor3d_HVertex_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
#include <TopAbs_Orientation.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx>
class gp_Pnt2d;
class Adaptor2d_HCurve2d;
class gp_Pnt2d;
class Adaptor3d_HVertex;
DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, Standard_Transient)
@ -45,10 +39,10 @@ public:
Standard_EXPORT virtual gp_Pnt2d Value();
Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_HCurve2d)& C);
Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_Curve2d)& C);
//! Parametric resolution (2d).
Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C);
Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_Curve2d)& C);
Standard_EXPORT virtual TopAbs_Orientation Orientation();

View File

@ -14,14 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_InterFunc.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_ConstructionError.hxx>
Adaptor3d_InterFunc::Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix) : myCurve2d(C),myFixVal(FixVal),myFix(Fix)
Adaptor3d_InterFunc::Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix) : myCurve2d(C),myFixVal(FixVal),myFix(Fix)
{
if(Fix != 1 && Fix != 2 ) throw Standard_ConstructionError();

View File

@ -17,17 +17,9 @@
#ifndef _Adaptor3d_InterFunc_HeaderFile
#define _Adaptor3d_InterFunc_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
class Adaptor2d_HCurve2d;
class Standard_ConstructionError;
class Adaptor2d_Curve2d;
//! Used to find the points U(t) = U0 or V(t) = V0 in
//! order to determine the Cn discontinuities of an
@ -43,7 +35,7 @@ public:
//! build the function U(t)=FixVal if Fix =1 or
//! V(t)=FixVal if Fix=2
Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix);
Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix);
//! computes the value <F>of the function for the variable <X>.
//! Returns True if the calculation were successfully done,
@ -62,30 +54,12 @@ public:
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D);
protected:
private:
Handle(Adaptor2d_HCurve2d) myCurve2d;
Handle(Adaptor2d_Curve2d) myCurve2d;
Standard_Real myFixVal;
Standard_Integer myFix;
};
#endif // _Adaptor3d_InterFunc_HeaderFile

View File

@ -11,11 +11,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HIsoCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_IsoCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <BSplCLib.hxx>
#include <BSplSLib.hxx>
#include <ElCLib.hxx>
@ -41,6 +40,8 @@
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve)
//=======================================================================
//function : Adaptor3d_IsoCurve
//purpose :
@ -58,7 +59,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve()
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S)
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S)
: mySurface (S),
myIso (GeomAbs_NoneIso),
myFirst (0.0),
@ -72,7 +73,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S)
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S,
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S,
const GeomAbs_IsoType theIso,
const Standard_Real theParam)
: mySurface (S),
@ -89,7 +90,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S,
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& theS,
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& theS,
const GeomAbs_IsoType theIso,
const Standard_Real theParam,
const Standard_Real theWFirst,
@ -108,7 +109,7 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& theS,
//purpose :
//=======================================================================
void Adaptor3d_IsoCurve::Load(const Handle(Adaptor3d_HSurface)& S )
void Adaptor3d_IsoCurve::Load(const Handle(Adaptor3d_Surface)& S )
{
mySurface = S;
myIso = GeomAbs_NoneIso;
@ -310,13 +311,13 @@ void Adaptor3d_IsoCurve::Intervals(TColStd_Array1OfReal& TI,
//purpose :
//=======================================================================
Handle(Adaptor3d_HCurve) Adaptor3d_IsoCurve::Trim
Handle(Adaptor3d_Curve) Adaptor3d_IsoCurve::Trim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real) const
{
Handle(Adaptor3d_HIsoCurve) HI = new Adaptor3d_HIsoCurve(*this);
((Adaptor3d_IsoCurve *)&(HI->Curve()))->Load(myIso,myParameter,First,Last);
Handle(Adaptor3d_IsoCurve) HI = new Adaptor3d_IsoCurve(*this);
HI->Load(myIso,myParameter,First,Last);
return HI;
}

View File

@ -17,33 +17,11 @@
#ifndef _Adaptor3d_IsoCurve_HeaderFile
#define _Adaptor3d_IsoCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAbs_IsoType.hxx>
#include <Standard_Real.hxx>
#include <Adaptor3d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_CurveType.hxx>
class Adaptor3d_HSurface;
class Standard_NoSuchObject;
class Standard_OutOfRange;
class Standard_DomainError;
class Adaptor3d_HCurve;
class gp_Pnt;
class gp_Vec;
class gp_Lin;
class gp_Circ;
class gp_Elips;
class gp_Hypr;
class gp_Parab;
class Geom_BezierCurve;
class Geom_BSplineCurve;
#include <Adaptor3d_Surface.hxx>
#include <GeomAbs_IsoType.hxx>
DEFINE_STANDARD_HANDLE(Adaptor3d_IsoCurve, Adaptor3d_Curve)
//! Defines an isoparametric curve on a surface. The
//! type of isoparametric curve (U or V) is defined
@ -51,48 +29,46 @@ class Geom_BSplineCurve;
//! NoneIso is given an error is raised.
class Adaptor3d_IsoCurve : public Adaptor3d_Curve
{
DEFINE_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve)
public:
DEFINE_STANDARD_ALLOC
//! The iso is set to NoneIso.
Standard_EXPORT Adaptor3d_IsoCurve();
//! The surface is loaded. The iso is set to NoneIso.
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S);
//! Creates an IsoCurve curve. Iso defines the
//! type (isoU or isoU) Param defines the value of
//! the iso. The bounds of the iso are the bounds
//! of the surface.
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param);
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param);
//! Create an IsoCurve curve. Iso defines the type
//! (isoU or isov). Param defines the value of the
//! iso. WFirst,WLast define the bounds of the iso.
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
//! Changes the surface. The iso is reset to
//! NoneIso.
Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S);
//! Changes the iso on the current surface.
Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param);
//! Changes the iso on the current surface.
Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
const Handle(Adaptor3d_HSurface)& Surface() const;
GeomAbs_IsoType Iso() const;
Standard_Real Parameter() const;
Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_Real LastParameter() const Standard_OVERRIDE;
const Handle(Adaptor3d_Surface)& Surface() const { return mySurface; }
GeomAbs_IsoType Iso() const { return myIso; }
Standard_Real Parameter() const { return myParameter; }
virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; }
virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; }
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
@ -110,7 +86,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
@ -183,33 +159,14 @@ public:
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
Handle(Adaptor3d_HSurface) mySurface;
Handle(Adaptor3d_Surface) mySurface;
GeomAbs_IsoType myIso;
Standard_Real myFirst;
Standard_Real myLast;
Standard_Real myParameter;
};
#include <Adaptor3d_IsoCurve.lxx>
#endif // _Adaptor3d_IsoCurve_HeaderFile

View File

@ -1,62 +0,0 @@
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : Surface
//purpose :
//=======================================================================
inline const Handle(Adaptor3d_HSurface)& Adaptor3d_IsoCurve::Surface() const
{
return mySurface;
}
//=======================================================================
//function : Iso
//purpose :
//=======================================================================
inline GeomAbs_IsoType Adaptor3d_IsoCurve::Iso() const
{
return myIso;
}
//=======================================================================
//function : Parameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_IsoCurve::Parameter() const
{
return myParameter;
}
//=======================================================================
//function : FirstParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_IsoCurve::FirstParameter() const
{
return myFirst;
}
//=======================================================================
//function : LastParameter
//purpose :
//=======================================================================
inline Standard_Real Adaptor3d_IsoCurve::LastParameter() const {
return myLast;
}

View File

@ -14,10 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <gp_Ax1.hxx>
@ -34,6 +33,8 @@
#include <Standard_NotImplemented.hxx>
#include <Standard_OutOfRange.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient)
//=======================================================================
//function : ~Adaptor3d_Surface
//purpose : Destructor
@ -161,8 +162,8 @@ void Adaptor3d_Surface::VIntervals(TColStd_Array1OfReal& , const GeomAbs_Shape )
//purpose :
//=======================================================================
//Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const
//Handle(Adaptor3d_Surface) Adaptor3d_Surface::UTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_Surface) Adaptor3d_Surface::UTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const
{
throw Standard_NotImplemented("Adaptor3d_Surface::UTrim");
}
@ -173,8 +174,8 @@ Handle(Adaptor3d_HSurface) Adaptor3d_Surface::UTrim(const Standard_Real , const
//purpose :
//=======================================================================
//Handle(Adaptor3d_HSurface) Adaptor3d_Surface::VTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_HSurface) Adaptor3d_Surface::VTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const
//Handle(Adaptor3d_Surface) Adaptor3d_Surface::VTrim(const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const
Handle(Adaptor3d_Surface) Adaptor3d_Surface::VTrim(const Standard_Real , const Standard_Real , const Standard_Real ) const
{
throw Standard_NotImplemented("Adaptor3d_Surface::VTrim");
}
@ -545,7 +546,7 @@ gp_Dir Adaptor3d_Surface::Direction() const
//purpose :
//=======================================================================
Handle(Adaptor3d_HCurve) Adaptor3d_Surface::BasisCurve() const
Handle(Adaptor3d_Curve) Adaptor3d_Surface::BasisCurve() const
{
throw Standard_NotImplemented("Adaptor3d_Surface::BasisCurve");
}
@ -556,7 +557,7 @@ Handle(Adaptor3d_HCurve) Adaptor3d_Surface::BasisCurve() const
//purpose :
//=======================================================================
Handle(Adaptor3d_HSurface) Adaptor3d_Surface::BasisSurface() const
Handle(Adaptor3d_Surface) Adaptor3d_Surface::BasisSurface() const
{
throw Standard_NotImplemented("Adaptor3d_Surface::BasisSurface");
}

View File

@ -17,33 +17,24 @@
#ifndef _Adaptor3d_Surface_HeaderFile
#define _Adaptor3d_Surface_HeaderFile
#include <Adaptor3d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Ax1.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Pln.hxx>
#include <gp_Sphere.hxx>
#include <gp_Torus.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_SurfaceType.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class Adaptor3d_HSurface;
class gp_Pnt;
class gp_Vec;
class gp_Pln;
class gp_Cylinder;
class gp_Cone;
class gp_Sphere;
class gp_Torus;
class Geom_BezierSurface;
class Geom_BSplineSurface;
class gp_Ax1;
class gp_Dir;
class Adaptor3d_HCurve;
DEFINE_STANDARD_HANDLE(Adaptor3d_Surface, Standard_Transient)
//! Root class for surfaces on which geometric algorithms work.
//! An adapted surface is an interface between the
@ -65,13 +56,11 @@ class Adaptor3d_HCurve;
//! Polynomial coefficients of BSpline surfaces used for their evaluation are
//! cached for better performance. Therefore these evaluations are not
//! thread-safe and parallel evaluations need to be prevented.
class Adaptor3d_Surface
class Adaptor3d_Surface : public Standard_Transient
{
DEFINE_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient)
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual Standard_Real FirstUParameter() const;
Standard_EXPORT virtual Standard_Real LastUParameter() const;
@ -105,13 +94,13 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
//! Returns a surface trimmed in the V direction between
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
Standard_EXPORT virtual Standard_Boolean IsUClosed() const;
@ -204,34 +193,13 @@ public:
Standard_EXPORT virtual gp_Dir Direction() const;
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) BasisCurve() const;
Standard_EXPORT virtual Handle(Adaptor3d_Curve) BasisCurve() const;
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) BasisSurface() const;
Standard_EXPORT virtual Handle(Adaptor3d_Surface) BasisSurface() const;
Standard_EXPORT virtual Standard_Real OffsetValue() const;
Standard_EXPORT virtual ~Adaptor3d_Surface();
protected:
private:
};
#endif // _Adaptor3d_Surface_HeaderFile

View File

@ -11,12 +11,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_HLine2d.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_HVertex.hxx>
#include <Adaptor3d_TopolTool.hxx>
#include <Adaptor2d_Line2d.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_HVertex.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Cone.hxx>
#include <gp_Pnt.hxx>
@ -74,7 +73,7 @@ Adaptor3d_TopolTool::Adaptor3d_TopolTool ()
{
}
Adaptor3d_TopolTool::Adaptor3d_TopolTool (const Handle(Adaptor3d_HSurface)& S)
Adaptor3d_TopolTool::Adaptor3d_TopolTool (const Handle(Adaptor3d_Surface)& S)
{
Initialize(S);
}
@ -85,7 +84,7 @@ void Adaptor3d_TopolTool::Initialize ()
throw Standard_NotImplemented("Adaptor3d_TopolTool::Initialize ()");
}
void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_Surface)& S)
{
Standard_Real pinf,psup,deltap;
//Adaptor2d_Line2d * Line2dPtr ;
@ -119,8 +118,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
}
// Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),pinf,psup);
//myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),pinf,psup));
//myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vinf),gp_Dir2d(1.,0.),pinf,psup));
nbRestr++;
}
@ -142,8 +141,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
//Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),pinf,psup);
//myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),pinf,psup));
//myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(Usup,0.),gp_Dir2d(0.,1.),pinf,psup));
nbRestr++;
}
@ -164,8 +163,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
//Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),pinf,psup);
//myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),pinf,psup));
//myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(0.,Vsup),gp_Dir2d(-1.,0.),pinf,psup));
nbRestr++;
}
@ -185,8 +184,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
}
//Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),pinf,psup);
//myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),pinf,psup));
//myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(Uinf,0.),gp_Dir2d(0.,-1),pinf,psup));
nbRestr++;
}
@ -211,8 +210,8 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
}
//Line2dPtr = new Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),pinf,psup);
//myRestr[nbRestr] = new Adaptor2d_HLine2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_HLine2d(Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),pinf,psup));
//myRestr[nbRestr] = new Adaptor2d_Line2d(*Line2dPtr);
myRestr[nbRestr] = new Adaptor2d_Line2d(Adaptor2d_Line2d(gp_Pnt2d(U,V),gp_Dir2d(1.,0.),pinf,psup));
nbRestr++;
}
}
@ -229,7 +228,7 @@ Standard_Boolean Adaptor3d_TopolTool::More ()
return (idRestr < nbRestr);
}
Handle(Adaptor2d_HCurve2d) Adaptor3d_TopolTool::Value ()
Handle(Adaptor2d_Curve2d) Adaptor3d_TopolTool::Value ()
{
if (idRestr >= nbRestr) {throw Standard_DomainError();}
return myRestr[idRestr];
@ -241,7 +240,7 @@ void Adaptor3d_TopolTool::Next ()
}
void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_HCurve2d)& C)
void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_Curve2d)& C)
{
nbVtx = 0;
idVtx = 0;
@ -555,7 +554,7 @@ Standard_Boolean Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P,
TopAbs_Orientation Adaptor3d_TopolTool::Orientation
(const Handle(Adaptor2d_HCurve2d)&)
(const Handle(Adaptor2d_Curve2d)&)
{
return TopAbs_FORWARD;
}
@ -840,7 +839,7 @@ Standard_Boolean Adaptor3d_TopolTool::Has3d() const
//purpose :
//=======================================================================
Standard_Real Adaptor3d_TopolTool::Tol3d(const Handle(Adaptor2d_HCurve2d)&) const
Standard_Real Adaptor3d_TopolTool::Tol3d(const Handle(Adaptor2d_Curve2d)&) const
{
throw Standard_DomainError("Adaptor3d_TopolTool: has no 3d representation");
}

View File

@ -17,22 +17,16 @@
#ifndef _Adaptor3d_TopolTool_HeaderFile
#define _Adaptor3d_TopolTool_HeaderFile
#include <Adaptor2d_Line2d.hxx>
#include <Adaptor3d_HVertex.hxx>
#include <Adaptor3d_Surface.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TopAbs_State.hxx>
#include <TopAbs_Orientation.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Adaptor3d_HVertex.hxx>
class Adaptor2d_HLine2d;
class Adaptor3d_HVertex;
class Adaptor3d_HSurface;
class Standard_DomainError;
class Adaptor2d_HCurve2d;
class gp_Pnt2d;
class gp_Pnt;
class Adaptor3d_TopolTool;
DEFINE_STANDARD_HANDLE(Adaptor3d_TopolTool, Standard_Transient)
//! This class provides a default topological tool,
@ -50,19 +44,19 @@ public:
Standard_EXPORT Adaptor3d_TopolTool();
Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_HSurface)& Surface);
Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_Surface)& Surface);
Standard_EXPORT virtual void Initialize();
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& S);
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& S);
Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_HCurve2d)& Curve);
Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_Curve2d)& Curve);
Standard_EXPORT virtual void Init();
Standard_EXPORT virtual Standard_Boolean More();
Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Value();
Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Value();
Standard_EXPORT virtual void Next();
@ -83,7 +77,7 @@ public:
//! a "real" limit of the surface.
//! If the orientation is INTERNAL or EXTERNAL, the arc is
//! considered as an arc on the surface.
Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_HCurve2d)& C);
Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_Curve2d)& C);
//! Returns the orientation of the vertex V.
//! The vertex has been found with an exploration on
@ -101,7 +95,7 @@ public:
Standard_EXPORT virtual Standard_Boolean Has3d() const;
//! returns 3d tolerance of the arc C
Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& C) const;
Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& C) const;
//! returns 3d tolerance of the vertex V
Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const;
@ -159,7 +153,7 @@ public:
protected:
Handle(Adaptor3d_HSurface) myS;
Handle(Adaptor3d_Surface) myS;
Standard_Integer myNbSamplesU;
Standard_Integer myNbSamplesV;
Handle(TColStd_HArray1OfReal) myUPars;
@ -175,7 +169,7 @@ private:
Standard_Real Usup;
Standard_Real Vinf;
Standard_Real Vsup;
Handle(Adaptor2d_HLine2d) myRestr[4];
Handle(Adaptor2d_Line2d) myRestr[4];
Standard_Integer nbVtx;
Standard_Integer idVtx;
Handle(Adaptor3d_HVertex) myVtx[2];

View File

@ -4,30 +4,14 @@ Adaptor3d_CurveOnSurface.cxx
Adaptor3d_CurveOnSurface.hxx
Adaptor3d_CurveOnSurfacePtr.hxx
Adaptor3d_CurvePtr.hxx
Adaptor3d_GenHCurve.gxx
Adaptor3d_GenHCurve.lxx
Adaptor3d_GenHSurface.gxx
Adaptor3d_GenHSurface.lxx
Adaptor3d_HCurve.cxx
Adaptor3d_HCurve.hxx
Adaptor3d_HCurve.lxx
Adaptor3d_HCurveOnSurface.hxx
Adaptor3d_HCurveOnSurface_0.cxx
Adaptor3d_HIsoCurve.hxx
Adaptor3d_HIsoCurve_0.cxx
Adaptor3d_HSurface.cxx
Adaptor3d_HSurface.hxx
Adaptor3d_HSurface.lxx
Adaptor3d_HSurfaceTool.cxx
Adaptor3d_HSurfaceTool.hxx
Adaptor3d_HSurfaceTool.lxx
Adaptor3d_HVertex.cxx
Adaptor3d_HVertex.hxx
Adaptor3d_InterFunc.cxx
Adaptor3d_InterFunc.hxx
Adaptor3d_IsoCurve.cxx
Adaptor3d_IsoCurve.hxx
Adaptor3d_IsoCurve.lxx
Adaptor3d_Surface.cxx
Adaptor3d_Surface.hxx
Adaptor3d_SurfacePtr.hxx

View File

@ -17,10 +17,10 @@
#ifndef Approx_Array1OfAdHSurface_HeaderFile
#define Approx_Array1OfAdHSurface_HeaderFile
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <NCollection_Array1.hxx>
typedef NCollection_Array1<Handle(Adaptor3d_HSurface)> Approx_Array1OfAdHSurface;
typedef NCollection_Array1<Handle(Adaptor3d_Surface)> Approx_Array1OfAdHSurface;
#endif

View File

@ -15,7 +15,7 @@
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <AdvApprox_PrefAndRec.hxx>
#include <Approx_Curve2d.hxx>
@ -30,7 +30,7 @@
class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction
{
public:
Approx_Curve2d_Eval (const Handle(Adaptor2d_HCurve2d)& theFunc,
Approx_Curve2d_Eval (const Handle(Adaptor2d_Curve2d)& theFunc,
Standard_Real First, Standard_Real Last)
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
@ -42,7 +42,7 @@ class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction
Standard_Integer *ErrorCode);
private:
Handle(Adaptor2d_HCurve2d) fonct;
Handle(Adaptor2d_Curve2d) fonct;
Standard_Real StartEndSav[2];
};
@ -96,7 +96,7 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
}
}
Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_HCurve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments)
Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments)
{
C2D->Trim(First,Last,Precision::PConfusion());

View File

@ -17,15 +17,10 @@
#ifndef _Approx_Curve2d_HeaderFile
#define _Approx_Curve2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <GeomAbs_Shape.hxx>
#include <Geom2d_BSplineCurve.hxx>
class Adaptor2d_HCurve2d;
//! Makes an approximation for HCurve2d from Adaptor3d
class Approx_Curve2d
{
@ -34,7 +29,7 @@ public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_HCurve2d)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real TolU, const Standard_Real TolV, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real TolU, const Standard_Real TolV, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Standard_Boolean IsDone() const;

View File

@ -14,13 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Approx_Curve3d.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <AdvApprox_PrefAndRec.hxx>
#include <Approx_Curve3d.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
@ -36,7 +36,7 @@
class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction
{
public:
Approx_Curve3d_Eval (const Handle(Adaptor3d_HCurve)& theFunc,
Approx_Curve3d_Eval (const Handle(Adaptor3d_Curve)& theFunc,
Standard_Real First, Standard_Real Last)
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
@ -48,7 +48,7 @@ class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction
Standard_Integer *ErrorCode);
private:
Handle(Adaptor3d_HCurve) fonct;
Handle(Adaptor3d_Curve) fonct;
Standard_Real StartEndSav[2];
};
@ -103,7 +103,7 @@ void Approx_Curve3d_Eval::Evaluate (Standard_Integer *Dimension,
}
}
Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve,
Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve,
const Standard_Real Tol3d,
const GeomAbs_Shape Order,
const Standard_Integer MaxSegments,

View File

@ -17,15 +17,10 @@
#ifndef _Approx_Curve3d_HeaderFile
#define _Approx_Curve3d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Adaptor3d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <Geom_BSplineCurve.hxx>
class Adaptor3d_HCurve;
class Approx_Curve3d
{
public:
@ -35,7 +30,7 @@ public:
//! Approximation of a curve with respect of the
//! required tolerance Tol3D.
Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
Standard_EXPORT Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const;

View File

@ -14,24 +14,26 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Approx_CurveOnSurface.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <AdvApprox_DichoCutting.hxx>
#include <AdvApprox_PrefAndRec.hxx>
#include <Approx_CurveOnSurface.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomConvert.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
@ -49,8 +51,8 @@
class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction
{
public:
Approx_CurveOnSurface_Eval (const Handle(Adaptor3d_HCurve)& theFunc,
const Handle(Adaptor2d_HCurve2d)& theFunc2d,
Approx_CurveOnSurface_Eval (const Handle(Adaptor3d_Curve)& theFunc,
const Handle(Adaptor2d_Curve2d)& theFunc2d,
Standard_Real First, Standard_Real Last)
: fonct(theFunc), fonct2d(theFunc2d)
{ StartEndSav[0] = First; StartEndSav[1] = Last; }
@ -63,8 +65,8 @@ class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction
Standard_Integer *ErrorCode);
private:
Handle(Adaptor3d_HCurve) fonct;
Handle(Adaptor2d_HCurve2d) fonct2d;
Handle(Adaptor3d_Curve) fonct;
Handle(Adaptor2d_Curve2d) fonct2d;
Standard_Real StartEndSav[2];
};
@ -150,7 +152,7 @@ void Approx_CurveOnSurface_Eval::Evaluate (Standard_Integer *Dimension,
class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction
{
public:
Approx_CurveOnSurface_Eval3d (const Handle(Adaptor3d_HCurve)& theFunc,
Approx_CurveOnSurface_Eval3d (const Handle(Adaptor3d_Curve)& theFunc,
Standard_Real First, Standard_Real Last)
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
@ -162,7 +164,7 @@ class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction
Standard_Integer *ErrorCode);
private:
Handle(Adaptor3d_HCurve) fonct;
Handle(Adaptor3d_Curve) fonct;
Standard_Real StartEndSav[2];
};
@ -231,7 +233,7 @@ void Approx_CurveOnSurface_Eval3d::Evaluate (Standard_Integer *Dimension,
class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction
{
public:
Approx_CurveOnSurface_Eval2d (const Handle(Adaptor2d_HCurve2d)& theFunc2d,
Approx_CurveOnSurface_Eval2d (const Handle(Adaptor2d_Curve2d)& theFunc2d,
Standard_Real First, Standard_Real Last)
: fonct2d(theFunc2d) { StartEndSav[0] = First; StartEndSav[1] = Last; }
@ -243,7 +245,7 @@ class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction
Standard_Integer *ErrorCode);
private:
Handle(Adaptor2d_HCurve2d) fonct2d;
Handle(Adaptor2d_Curve2d) fonct2d;
Standard_Real StartEndSav[2];
};
@ -307,8 +309,8 @@ void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension,
//function : Approx_CurveOnSurface
//purpose : Constructor
//=============================================================================
Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C2D,
const Handle(Adaptor3d_HSurface)& Surf,
Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D,
const Handle(Adaptor3d_Surface)& Surf,
const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol,
@ -335,8 +337,8 @@ void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension,
//function : Approx_CurveOnSurface
//purpose : Constructor
//=============================================================================
Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& theC2D,
const Handle(Adaptor3d_HSurface)& theSurf,
Approx_CurveOnSurface::Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& theC2D,
const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTol)
@ -371,7 +373,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
if(theOnly3d && theOnly2d) throw Standard_ConstructionError();
Handle( Adaptor2d_HCurve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() );
Handle( Adaptor2d_Curve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() );
Standard_Boolean isU, isForward;
Standard_Real aParam;
@ -385,9 +387,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
}
}
Adaptor3d_CurveOnSurface COnS( TrimmedC2D, mySurf );
Handle(Adaptor3d_HCurveOnSurface) HCOnS = new Adaptor3d_HCurveOnSurface();
HCOnS->Set(COnS);
Handle(Adaptor3d_CurveOnSurface) HCOnS = new Adaptor3d_CurveOnSurface (TrimmedC2D, mySurf);
Standard_Integer Num1DSS = 0, Num2DSS=0, Num3DSS=0;
Handle(TColStd_HArray1OfReal) OneDTol;
@ -510,7 +510,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
//function : isIsoLine
//purpose :
//=============================================================================
Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D,
Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward) const
@ -592,13 +592,13 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_HCurve2
//function : buildC3dOnIsoLine
//purpose :
//=============================================================================
Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D,
Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
const Standard_Boolean theIsU,
const Standard_Real theParam,
const Standard_Boolean theIsForward)
{
// Convert adapter to the appropriate type.
Handle(GeomAdaptor_HSurface) aGeomAdapter = Handle(GeomAdaptor_HSurface)::DownCast(mySurf);
Handle(GeomAdaptor_Surface) aGeomAdapter = Handle(GeomAdaptor_Surface)::DownCast(mySurf);
if (aGeomAdapter.IsNull())
return Standard_False;
@ -606,7 +606,7 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d
return Standard_False;
// Extract isoline
Handle(Geom_Surface) aSurf = aGeomAdapter->ChangeSurface().Surface();
Handle(Geom_Surface) aSurf = aGeomAdapter->Surface();
Handle(Geom_Curve) aC3d;
gp_Pnt2d aF2d = theC2D->Value(theC2D->FirstParameter());

View File

@ -17,21 +17,12 @@
#ifndef _Approx_CurveOnSurface_HeaderFile
#define _Approx_CurveOnSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
class Geom2d_BSplineCurve;
class Geom_BSplineCurve;
class Standard_OutOfRange;
class Standard_ConstructionError;
class Adaptor2d_HCurve2d;
class Adaptor3d_HSurface;
class Geom_BSplineCurve;
class Geom2d_BSplineCurve;
//! Approximation of curve on surface
class Approx_CurveOnSurface
@ -42,7 +33,7 @@ public:
//! This constructor calls perform method. This constructor is deprecated.
Standard_DEPRECATED("This constructor is deprecated. Use other constructor and perform method instead.")
Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments, const Standard_Boolean Only3d = Standard_False, const Standard_Boolean Only2d = Standard_False);
Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol, const GeomAbs_Shape Continuity, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments, const Standard_Boolean Only3d = Standard_False, const Standard_Boolean Only2d = Standard_False);
//! This constructor does not call perform method.
//! @param theC2D 2D Curve to be approximated in 3D.
@ -50,8 +41,8 @@ public:
//! @param theFirst First parameter of resulting curve.
//! @param theFirst Last parameter of resulting curve.
//! @param theTol Computation tolerance.
Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& theC2D,
const Handle(Adaptor3d_HSurface)& theSurf,
Standard_EXPORT Approx_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& theC2D,
const Handle(Adaptor3d_Surface)& theSurf,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTol);
@ -94,7 +85,7 @@ protected:
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 2d curve is a line and Standard_False otherwise.
Standard_Boolean isIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D,
Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
Standard_Boolean& theIsU,
Standard_Real& theParam,
Standard_Boolean& theIsForward) const;
@ -106,7 +97,7 @@ protected:
//! @param theParam Line parameter.
//! @param theIsForward Flag indicating forward parameterization on a isoline.
//! @return Standard_True when 3d curve is built and Standard_False otherwise.
Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_HCurve2d) theC2D,
Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
const Standard_Boolean theIsU,
const Standard_Real theParam,
const Standard_Boolean theIsForward);
@ -117,10 +108,10 @@ private:
private:
//! Input curve.
const Handle(Adaptor2d_HCurve2d) myC2D;
const Handle(Adaptor2d_Curve2d) myC2D;
//! Input surface.
const Handle(Adaptor3d_HSurface) mySurf;
const Handle(Adaptor3d_Surface) mySurf;
//! First parameter of the result.
const Standard_Real myFirst;
@ -139,13 +130,6 @@ private:
Standard_Real myError2dU;
Standard_Real myError2dV;
};
#endif // _Approx_CurveOnSurface_HeaderFile

View File

@ -14,23 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Approx_CurvilinearParameter.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <AdvApprox_PrefAndRec.hxx>
#include <Approx_CurvilinearParameter.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <CPnts_AbscissaPoint.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomAbs_Shape.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
@ -128,7 +127,7 @@ void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimensio
Result[i] = Res(i);
}
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_HCurve)& C3D,
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D,
const Standard_Real Tol,
const GeomAbs_Shape Order,
const Standard_Integer MaxDegree,
@ -267,8 +266,8 @@ void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Di
Result[i] = Res(i);
}
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D,
const Handle(Adaptor3d_HSurface)& Surf,
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D,
const Handle(Adaptor3d_Surface)& Surf,
const Standard_Real Tol,
const GeomAbs_Shape Order,
const Standard_Integer MaxDegree,
@ -428,10 +427,10 @@ void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * D
Result[i] = Res(i);
}
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D1,
const Handle(Adaptor3d_HSurface)& Surf1,
const Handle(Adaptor2d_HCurve2d)& C2D2,
const Handle(Adaptor3d_HSurface)& Surf2,
Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1,
const Handle(Adaptor3d_Surface)& Surf1,
const Handle(Adaptor2d_Curve2d)& C2D2,
const Handle(Adaptor3d_Surface)& Surf2,
const Standard_Real Tol,
const GeomAbs_Shape Order,
const Standard_Integer MaxDegree,
@ -643,8 +642,8 @@ void Approx_CurvilinearParameter::Dump(Standard_OStream& o) const
//purpose :
//=======================================================================
void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_HCurve2d) &C2D,
const Handle(Adaptor3d_HSurface) &S,
void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_Curve2d) &C2D,
const Handle(Adaptor3d_Surface) &S,
const Standard_Integer MaxNumber,
const Standard_Real Tol,
Standard_Real &TolV, Standard_Real &TolW)

View File

@ -17,23 +17,10 @@
#ifndef _Approx_CurvilinearParameter_HeaderFile
#define _Approx_CurvilinearParameter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_OStream.hxx>
class Geom_BSplineCurve;
class Geom2d_BSplineCurve;
class Standard_OutOfRange;
class Standard_ConstructionError;
class Adaptor3d_HCurve;
class Adaptor2d_HCurve2d;
class Adaptor3d_HSurface;
//! Approximation of a Curve to make its parameter be its
//! curvilinear abscissa
@ -50,13 +37,13 @@ public:
//! case of a free 3D curve
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_HCurve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor3d_Curve)& C3D, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
//! case of a curve on one surface
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
//! case of a curve on two surfaces
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Approx_CurvilinearParameter(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& Surf2, const Standard_Real Tol, const GeomAbs_Shape Order, const Standard_Integer MaxDegree, const Standard_Integer MaxSegments);
Standard_EXPORT Standard_Boolean IsDone() const;
@ -97,7 +84,7 @@ protected:
private:
Standard_EXPORT static void ToleranceComputation (const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real& TolV, Standard_Real& TolW);
Standard_EXPORT static void ToleranceComputation (const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Integer MaxNumber, const Standard_Real Tol, Standard_Real& TolV, Standard_Real& TolW);
Standard_Integer myCase;

View File

@ -14,14 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Approx_CurvlinFunc.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Approx_CurvlinFunc.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <GeomLib.hxx>
#include <Precision.hxx>
@ -114,7 +112,7 @@ static void findfourpoints(const Standard_Real ,
}
*/
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tol) : myC3D(C),
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol) : myC3D(C),
myCase(1),
myFirstS(0),
myLastS(1),
@ -125,7 +123,7 @@ Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const
Init();
}
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol) :
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol) :
myC2D1(C2D),
mySurf1(S),
myCase(2),
@ -138,7 +136,7 @@ Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, co
Init();
}
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real Tol) :
Approx_CurvlinFunc::Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real Tol) :
myC2D1(C2D1),
myC2D2(C2D2),
mySurf1(S1),
@ -159,7 +157,7 @@ void Approx_CurvlinFunc::Init()
switch(myCase) {
case 1:
Init(myC3D->GetCurve(), mySi_1, myUi_1);
Init (*myC3D, mySi_1, myUi_1);
myFirstU1 = myC3D->FirstParameter();
myLastU1 = myC3D->LastParameter();
myFirstU2 = myLastU2 = 0;
@ -330,45 +328,45 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las
Standard_Real FirstU, LastU;
Adaptor3d_CurveOnSurface CurOnSur;
Handle(Adaptor3d_HCurve) HCurOnSur;
Handle(Adaptor3d_CurveOnSurface) HCurOnSur;
switch(myCase) {
case 1:
myC3D = myC3D->Trim(myFirstU1, myLastU1, Tol);
FirstU = GetUParameter(myC3D->GetCurve(), First, 1);
LastU = GetUParameter(myC3D->GetCurve(), Last, 1);
FirstU = GetUParameter(*myC3D, First, 1);
LastU = GetUParameter (*myC3D, Last, 1);
myC3D = myC3D->Trim(FirstU, LastU, Tol);
break;
case 3:
CurOnSur.Load(myC2D2);
CurOnSur.Load(mySurf2);
HCurOnSur = CurOnSur.Trim(myFirstU2, myLastU2, Tol);
myC2D2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve();
mySurf2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface();
HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(myFirstU2, myLastU2, Tol));
myC2D2 = HCurOnSur->GetCurve();
mySurf2 = HCurOnSur->GetSurface();
CurOnSur.Load(myC2D2);
CurOnSur.Load(mySurf2);
FirstU = GetUParameter(CurOnSur, First, 1);
LastU = GetUParameter(CurOnSur, Last, 1);
HCurOnSur = CurOnSur.Trim(FirstU, LastU, Tol);
myC2D2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve();
mySurf2 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface();
HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(FirstU, LastU, Tol));
myC2D2 = HCurOnSur->GetCurve();
mySurf2 = HCurOnSur->GetSurface();
Standard_FALLTHROUGH
case 2:
CurOnSur.Load(myC2D1);
CurOnSur.Load(mySurf1);
HCurOnSur = CurOnSur.Trim(myFirstU1, myLastU1, Tol);
myC2D1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve();
mySurf1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface();
HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(myFirstU1, myLastU1, Tol));
myC2D1 = HCurOnSur->GetCurve();
mySurf1 = HCurOnSur->GetSurface();
CurOnSur.Load(myC2D1);
CurOnSur.Load(mySurf1);
FirstU = GetUParameter(CurOnSur, First, 1);
LastU = GetUParameter(CurOnSur, Last, 1);
HCurOnSur = CurOnSur.Trim(FirstU, LastU, Tol);
myC2D1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetCurve();
mySurf1 = ((Adaptor3d_CurveOnSurface *)(&(HCurOnSur->Curve())))->GetSurface();
HCurOnSur = Handle(Adaptor3d_CurveOnSurface)::DownCast (CurOnSur.Trim(FirstU, LastU, Tol));
myC2D1 = HCurOnSur->GetCurve();
mySurf1 = HCurOnSur->GetSurface();
}
myFirstS = First;
myLastS = Last;
@ -383,7 +381,7 @@ void Approx_CurvlinFunc::Length()
case 1:
FirstU = myC3D->FirstParameter();
LastU = myC3D->LastParameter();
myLength = Length(myC3D->GetCurve(), FirstU, LastU);
myLength = Length (*myC3D, FirstU, LastU);
myLength1 = myLength2 = 0;
break;
case 2:
@ -431,7 +429,7 @@ Standard_Real Approx_CurvlinFunc::GetSParameter(const Standard_Real U) const
switch (myCase) {
case 1:
S = GetSParameter(myC3D->GetCurve(), U, myLength);
S = GetSParameter (*myC3D, U, myLength);
break;
case 2:
CurOnSur.Load(myC2D1);
@ -534,7 +532,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Stan
gp_Vec dC_dU, dC_dS, d2C_dU2, d2C_dS2;
Standard_Real U, Mag, dU_dS, d2U_dS2;
U = GetUParameter(myC3D->GetCurve(), S, 1);
U = GetUParameter (*myC3D, S, 1);
switch(Order) {
@ -610,8 +608,8 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase3(const Standard_Real S, const Stan
Standard_Boolean Approx_CurvlinFunc::EvalCurOnSur(const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result, const Standard_Integer NumberOfCurve) const
{
Handle(Adaptor2d_HCurve2d) Cur2D;
Handle(Adaptor3d_HSurface) Surf;
Handle(Adaptor2d_Curve2d) Cur2D;
Handle(Adaptor3d_Surface) Surf;
Standard_Real U=0, Length=0;
if (NumberOfCurve == 1) {

View File

@ -17,26 +17,13 @@
#ifndef _Approx_CurvlinFunc_HeaderFile
#define _Approx_CurvlinFunc_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Transient.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
class Adaptor3d_HCurve;
class Adaptor2d_HCurve2d;
class Adaptor3d_HSurface;
class Standard_OutOfRange;
class Standard_DomainError;
class Standard_ConstructionError;
class Adaptor3d_Curve;
#include <TColStd_HArray1OfReal.hxx>
class Approx_CurvlinFunc;
DEFINE_STANDARD_HANDLE(Approx_CurvlinFunc, Standard_Transient)
//! defines an abstract curve with
@ -47,11 +34,11 @@ class Approx_CurvlinFunc : public Standard_Transient
public:
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor3d_HCurve)& C, const Standard_Real Tol);
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol);
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D, const Handle(Adaptor3d_HSurface)& S, const Standard_Real Tol);
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D, const Handle(Adaptor3d_Surface)& S, const Standard_Real Tol);
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_HCurve2d)& C2D1, const Handle(Adaptor2d_HCurve2d)& C2D2, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real Tol);
Standard_EXPORT Approx_CurvlinFunc(const Handle(Adaptor2d_Curve2d)& C2D1, const Handle(Adaptor2d_Curve2d)& C2D2, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const Standard_Real Tol);
//! ---Purpose Update the tolerance to used
Standard_EXPORT void SetTol (const Standard_Real Tol);
@ -121,11 +108,11 @@ private:
Standard_EXPORT Standard_Boolean EvalCurOnSur (const Standard_Real S, const Standard_Integer Order, TColStd_Array1OfReal& Result, const Standard_Integer NumberOfCurve) const;
Handle(Adaptor3d_HCurve) myC3D;
Handle(Adaptor2d_HCurve2d) myC2D1;
Handle(Adaptor2d_HCurve2d) myC2D2;
Handle(Adaptor3d_HSurface) mySurf1;
Handle(Adaptor3d_HSurface) mySurf2;
Handle(Adaptor3d_Curve) myC3D;
Handle(Adaptor2d_Curve2d) myC2D1;
Handle(Adaptor2d_Curve2d) myC2D2;
Handle(Adaptor3d_Surface) mySurf1;
Handle(Adaptor3d_Surface) mySurf2;
Standard_Integer myCase;
Standard_Real myFirstS;
Standard_Real myLastS;

View File

@ -17,7 +17,7 @@
#ifndef Approx_HArray1OfAdHSurface_HeaderFile
#define Approx_HArray1OfAdHSurface_HeaderFile
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Approx_Array1OfAdHSurface.hxx>
#include <NCollection_DefineHArray1.hxx>

View File

@ -14,24 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <Approx_SameParameter.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <AdvApprox_ApproxAFunction.hxx>
#include <BSplCLib.hxx>
#include <Extrema_ExtPC.hxx>
#include <Extrema_LocateExtPC.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomLib_MakeCurvefromApprox.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
@ -48,7 +48,7 @@ class Approx_SameParameter_Evaluator : public AdvApprox_EvaluatorFunction
public:
Approx_SameParameter_Evaluator (const TColStd_Array1OfReal& theFlatKnots,
const TColStd_Array1OfReal& thePoles,
const Handle(Adaptor2d_HCurve2d)& theHCurve2d)
const Handle(Adaptor2d_Curve2d)& theHCurve2d)
: FlatKnots(theFlatKnots),
Poles(thePoles),
HCurve2d(theHCurve2d) {}
@ -63,7 +63,7 @@ public:
private:
const TColStd_Array1OfReal& FlatKnots;
const TColStd_Array1OfReal& Poles;
Handle(Adaptor2d_HCurve2d) HCurve2d;
Handle(Adaptor2d_Curve2d) HCurve2d;
};
//=======================================================================
@ -162,7 +162,7 @@ static void ProjectPointOnCurve(const Standard_Real InitValue,
//function : ComputeTolReached
//purpose :
//=======================================================================
static Standard_Real ComputeTolReached(const Handle(Adaptor3d_HCurve)& c3d,
static Standard_Real ComputeTolReached(const Handle(Adaptor3d_Curve)& c3d,
const Adaptor3d_CurveOnSurface& cons,
const Standard_Integer nbp)
{
@ -199,7 +199,7 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
const TColStd_Array1OfReal& Poles,
const Standard_Integer nbp,
const Standard_Real *pc3d,
const Handle(Adaptor3d_HCurve)& c3d,
const Handle(Adaptor3d_Curve)& c3d,
const Adaptor3d_CurveOnSurface& cons,
Standard_Real& tol,
const Standard_Real oldtol)
@ -276,9 +276,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)& C3D,
mySameParameter(Standard_True),
myDone(Standard_False)
{
myHCurve2d = new Geom2dAdaptor_HCurve(C2D);
myC3d = new GeomAdaptor_HCurve(C3D);
mySurf = new GeomAdaptor_HSurface(S);
myHCurve2d = new Geom2dAdaptor_Curve(C2D);
myC3d = new GeomAdaptor_Curve(C3D);
mySurf = new GeomAdaptor_Surface(S);
Build(Tol);
}
@ -286,9 +286,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)& C3D,
//function : Approx_SameParameter
//purpose :
//=======================================================================
Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
const Handle(Geom2d_Curve)& C2D,
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_Surface)& S,
const Standard_Real Tol)
: myDeltaMin(Precision::PConfusion()),
mySameParameter(Standard_True),
@ -296,7 +296,7 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D
{
myC3d = C3D;
mySurf = S;
myHCurve2d = new Geom2dAdaptor_HCurve(C2D);
myHCurve2d = new Geom2dAdaptor_Curve(C2D);
Build(Tol);
}
@ -304,9 +304,9 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D
//function : Approx_SameParameter
//purpose :
//=======================================================================
Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
const Handle(Adaptor2d_HCurve2d)& C2D,
const Handle(Adaptor3d_HSurface)& S,
Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
const Handle(Adaptor2d_Curve2d)& C2D,
const Handle(Adaptor3d_Surface)& S,
const Standard_Real Tol)
: myDeltaMin(Precision::PConfusion()),
mySameParameter(Standard_True),
@ -374,7 +374,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if(aData.myNbPnt < aNbPnt )
{
myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples);
myCurve2d = Geom2dAdaptor::MakeCurve(myHCurve2d->Curve2d());
myCurve2d = Geom2dAdaptor::MakeCurve (*myHCurve2d);
myDone = Standard_False;
return;
}
@ -445,7 +445,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
Adaptor3d_CurveOnSurface ACS = aData.myCOnS;
GeomLib_MakeCurvefromApprox aCurveBuilder(anApproximator);
Handle(Geom2d_BSplineCurve) aC2d = aCurveBuilder.Curve2dFromTwo1d(1,2);
Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2d);
Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2d);
aData.myCOnS.Load(aHCurve2d);
myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples);
@ -482,7 +482,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
// Original 2d curve.
aData.myCOnS.Load(myHCurve2d);
myTolReached = ComputeTolReached(myC3d,aData.myCOnS, 2 * myNbSamples);
myCurve2d = Geom2dAdaptor::MakeCurve(myHCurve2d->Curve2d());
myCurve2d = Geom2dAdaptor::MakeCurve (*myHCurve2d);
// Approximation curve.
Standard_Integer num_knots = aData.myNbPnt + 7;
@ -512,7 +512,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
GeomLib_MakeCurvefromApprox aCurveBuilder(anApproximator);
Handle(Geom2d_BSplineCurve) aC2d = aCurveBuilder.Curve2dFromTwo1d(1,2);
Handle(Adaptor2d_HCurve2d) aHCurve2d = new Geom2dAdaptor_HCurve(aC2d);
Handle(Adaptor2d_Curve2d) aHCurve2d = new Geom2dAdaptor_Curve(aC2d);
aData.myCOnS.Load(aHCurve2d);
Standard_Real anApproxTol = ComputeTolReached(myC3d,aData.myCOnS,2 * myNbSamples);
@ -650,7 +650,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D
dmax2 = Max(dmax2, dist2);
Extrema_LocateExtPC Projector;
Projector.Initialize(myC3d->Curve(), theData.myC3dPF, theData.myC3dPL, theData.myTol);
Projector.Initialize (*myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol);
Standard_Integer count = 1;
Standard_Real previousp = theData.myC3dPF, initp=0, curp;
@ -688,7 +688,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D
}
else
{
ProjectPointOnCurve(initp,Pcons,theData.myTol,30,myC3d->Curve(),isProjOk,curp);
ProjectPointOnCurve(initp,Pcons,theData.myTol,30, *myC3d,isProjOk,curp);
}
isProjOk = isProjOk && // Good projection.
curp > previousp + myDeltaMin && // Point is separated from previous.
@ -702,7 +702,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D
}
// Whole parameter space search using general extrema.
Extrema_ExtPC PR(Pcons,myC3d->Curve(),theData.myC3dPF, theData.myC3dPL,theData.myTol);
Extrema_ExtPC PR(Pcons, *myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol);
if (!PR.IsDone() || PR.NbExt() == 0) // Lazy evaluation is used.
continue;
@ -830,7 +830,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea
Standard_Real &theBestSqTol) const
{
Extrema_LocateExtPC Projector;
Projector.Initialize(myC3d->Curve(), myC3d->FirstParameter(), myC3d->LastParameter(), theData.myTol);
Projector.Initialize (*myC3d, myC3d->FirstParameter(), myC3d->LastParameter(), theData.myTol);
Standard_Real curp = 0.0;
Standard_Boolean projok = Standard_False;
@ -869,7 +869,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea
}
else
{
ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30,myC3d->Curve(),projok,curp);
ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30, *myC3d,projok,curp);
}
if(projok)
{
@ -917,7 +917,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea
}
else
{
ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30,myC3d->Curve(),projok,curp);
ProjectPointOnCurve(uc3d,Pcons,theData.myTol,30, *myC3d,projok,curp);
}
if(projok)
{

View File

@ -17,15 +17,9 @@
#ifndef _Approx_SameParameter_HeaderFile
#define _Approx_SameParameter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Adaptor2d_HCurve2d;
class Adaptor3d_HCurve;
class Adaptor3d_HSurface;
#include <Adaptor3d_Surface.hxx>
class Geom_Curve;
class Geom2d_Curve;
class Geom_Surface;
@ -46,15 +40,15 @@ public:
const Standard_Real Tol);
//! Warning: the C3D and C2D must have the same parametric domain.
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
const Handle(Geom2d_Curve)& C2D,
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_Surface)& S,
const Standard_Real Tol);
//! Warning: the C3D and C2D must have the same parametric domain.
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_HCurve)& C3D,
const Handle(Adaptor2d_HCurve2d)& C2D,
const Handle(Adaptor3d_HSurface)& S,
Standard_EXPORT Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
const Handle(Adaptor2d_Curve2d)& C2D,
const Handle(Adaptor3d_Surface)& S,
const Standard_Real Tol);
//!@Returns .false. if calculations failed,
@ -179,9 +173,9 @@ private:
Standard_Boolean myDone;
Standard_Real myTolReached;
Handle(Geom2d_Curve) myCurve2d;
Handle(Adaptor2d_HCurve2d) myHCurve2d;
Handle(Adaptor3d_HCurve) myC3d;
Handle(Adaptor3d_HSurface) mySurf;
Handle(Adaptor2d_Curve2d) myHCurve2d;
Handle(Adaptor3d_Curve) myC3d;
Handle(Adaptor3d_Surface) mySurf;
};
#endif // _Approx_SameParameter_HeaderFile

View File

@ -21,7 +21,6 @@
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRepTools.hxx>
@ -40,8 +39,6 @@
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomInt.hxx>
#include <GeomLib.hxx>
@ -554,8 +551,8 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace
pBAS = &aBASTmp;
}
//
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(*pBAS);
Handle(GeomAdaptor_HCurve) aBAHC = new GeomAdaptor_HCurve(aC3D, aT1, aT2);
Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(*pBAS);
Handle(GeomAdaptor_Curve) aBAHC = new GeomAdaptor_Curve(aC3D, aT1, aT2);
//
Standard_Real aTolR;
Standard_Real aTR = Precision::Confusion();//1.e-7;

View File

@ -14,8 +14,6 @@
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
@ -36,7 +34,6 @@
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
@ -44,8 +41,6 @@
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomProjLib.hxx>
#include <GCPnts_AbscissaPoint.hxx>
@ -723,7 +718,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
//
// 1. Minimum of conditions to Perform
Handle (BRep_CurveRepresentation) myCref;
Handle (Adaptor3d_HCurve) myHCurve;
Handle (Adaptor3d_Curve) myHCurve;
myCref.Nullify();
@ -791,19 +786,19 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
(myCref->Curve3D()->Transformed
(myCref->Location().Transformation()));
GeomAdaptor_Curve GAC3d(C3dx, First, Last);
myHCurve = new GeomAdaptor_HCurve(GAC3d);
myHCurve = new GeomAdaptor_Curve(GAC3d);
}
else { // curve on surface
Handle(Geom_Surface) Sref = myCref->Surface();
Sref = Handle(Geom_Surface)::
DownCast(Sref->Transformed(myCref->Location().Transformation()));
const Handle(Geom2d_Curve)& PCref = myCref->PCurve();
Handle(GeomAdaptor_HSurface) GAHSref =
new GeomAdaptor_HSurface(Sref);
Handle(Geom2dAdaptor_HCurve) GHPCref =
new Geom2dAdaptor_HCurve(PCref, First, Last);
Handle(GeomAdaptor_Surface) GAHSref =
new GeomAdaptor_Surface(Sref);
Handle(Geom2dAdaptor_Curve) GHPCref =
new Geom2dAdaptor_Curve(PCref, First, Last);
Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
myHCurve = new Adaptor3d_HCurveOnSurface(ACSref);
myHCurve = new Adaptor3d_CurveOnSurface(ACSref);
}
}
}
@ -848,13 +843,12 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Sb = Handle(Geom_Surface)::
DownCast (Su->Transformed(L.Transformation()));
Handle(Geom2d_Curve) PC = cr->PCurve();
Handle(GeomAdaptor_HSurface) GAHS =
new GeomAdaptor_HSurface(Sb);
Handle(Geom2dAdaptor_HCurve) GHPC =
new Geom2dAdaptor_HCurve(PC,f,l);
Handle(GeomAdaptor_Surface) GAHS =
new GeomAdaptor_Surface(Sb);
Handle(Geom2dAdaptor_Curve) GHPC =
new Geom2dAdaptor_Curve(PC,f,l);
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
ok = Validate(myHCurve->Curve(), ACS,
Tol, SameParameter, aNewTol);
ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol);
if (ok) {
if (aNewTol<aMaxTol) {
UpdateShape(myShape, aNewTol+Delta, aMapToAvoid);
@ -864,9 +858,9 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
if (cr->IsCurveOnClosedSurface()) {
//checkclosed = Standard_True;
GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
GHPC->Load(cr->PCurve2(),f,l); // same bounds
ACS.Load(GHPC, GAHS); // sans doute inutile
ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
ok = Validate (*myHCurve, ACS, Tol, SameParameter, aNewTol);
if (ok) {
if (aNewTol<aMaxTol) {
UpdateShape(myShape, aNewTol+Delta, aMapToAvoid);
@ -897,31 +891,30 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
P = Handle(Geom_Plane)::
DownCast(P->Transformed(L.Transformation()));
//on projette Cref sur ce plan
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
Handle(GeomAdaptor_Surface) GAHS = new GeomAdaptor_Surface(P);
// Dub - Normalement myHCurve est une GeomAdaptor_HCurve
GeomAdaptor_Curve& Gac =
Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
Handle(Geom_Curve) C3dx = Gac.Curve();
// Dub - Normalement myHCurve est une GeomAdaptor_Curve
Handle(GeomAdaptor_Curve) Gac = Handle(GeomAdaptor_Curve)::DownCast(myHCurve);
Handle(Geom_Curve) C3dx = Gac->Curve();
Handle(Geom_Curve) ProjOnPlane =
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3dx,First,Last),
P,
P->Position().Direction(),
Standard_True);
Handle(GeomAdaptor_HCurve) aHCurve =
new GeomAdaptor_HCurve(ProjOnPlane);
Handle(GeomAdaptor_Curve) aHCurve =
new GeomAdaptor_Curve(ProjOnPlane);
ProjLib_ProjectedCurve proj(GAHS,aHCurve);
Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
Handle(Geom2dAdaptor_HCurve) GHPC =
new Geom2dAdaptor_HCurve(PC,
Handle(Geom2dAdaptor_Curve) GHPC =
new Geom2dAdaptor_Curve(PC,
myHCurve->FirstParameter(),
myHCurve->LastParameter());
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
Standard_Boolean okx = Validate(myHCurve->Curve(),ACS,
Standard_Boolean okx = Validate(*myHCurve, ACS,
Tol,Standard_True, aNewTol);
if (okx) {
if (aNewTol<aMaxTol) {

View File

@ -41,8 +41,8 @@
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomProjLib.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
@ -391,8 +391,8 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnPlane(const TopoDS_Edge& E,
GP->Position().Direction(),
Standard_True);
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(GP);
Handle(GeomAdaptor_HCurve) HC = new GeomAdaptor_HCurve(ProjOnPlane);
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface(GP);
Handle(GeomAdaptor_Curve) HC = new GeomAdaptor_Curve(ProjOnPlane);
ProjLib_ProjectedCurve Proj(HS, HC);
Handle(Geom2d_Curve) pc = Geom2dAdaptor::MakeCurve(Proj);

View File

@ -14,13 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <ElCLib.hxx>
#include <GCPnts_AbscissaPoint.hxx>
@ -42,6 +38,8 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_CompCurve, Adaptor3d_Curve)
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve()
: TFirst (0.0),
TLast (0.0),
@ -152,7 +150,7 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
PTol = Tol;
// Trim the extremal curves.
Handle (BRepAdaptor_HCurve) HC;
Handle (BRepAdaptor_Curve) HC;
Standard_Integer i1, i2;
Standard_Real f=TFirst, l=TLast, d;
i1 = i2 = CurIndex;
@ -161,10 +159,10 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
CurIndex = (i1+i2)/2; // Small optimization
if (i1==i2) {
if (l > f)
HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol));
HC = Handle(BRepAdaptor_Curve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol));
else
HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(l, f, PTol));
myCurves->SetValue(i1, HC->ChangeCurve());
HC = Handle(BRepAdaptor_Curve)::DownCast(myCurves->Value(i1).Trim(l, f, PTol));
myCurves->SetValue(i1, *HC);
}
else {
const BRepAdaptor_Curve& c1 = myCurves->Value(i1);
@ -173,17 +171,17 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
k = c1.LastParameter();
if (k>f)
HC = Handle(BRepAdaptor_HCurve)::DownCast(c1.Trim(f, k, PTol));
HC = Handle(BRepAdaptor_Curve)::DownCast(c1.Trim(f, k, PTol));
else
HC = Handle(BRepAdaptor_HCurve)::DownCast(c1.Trim(k, f, PTol));
myCurves->SetValue(i1, HC->ChangeCurve());
HC = Handle(BRepAdaptor_Curve)::DownCast(c1.Trim(k, f, PTol));
myCurves->SetValue(i1, *HC);
k = c2.FirstParameter();
if (k<=l)
HC = Handle(BRepAdaptor_HCurve)::DownCast(c2.Trim(k, l, PTol));
HC = Handle(BRepAdaptor_Curve)::DownCast(c2.Trim(k, l, PTol));
else
HC = Handle(BRepAdaptor_HCurve)::DownCast(c2.Trim(l, k, PTol));
myCurves->SetValue(i2, HC->ChangeCurve());
HC = Handle(BRepAdaptor_Curve)::DownCast(c2.Trim(l, k, PTol));
myCurves->SetValue(i2, *HC);
}
}
@ -269,13 +267,13 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
}
}
Handle(Adaptor3d_HCurve) BRepAdaptor_CompCurve::Trim(const Standard_Real First,
Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::Trim(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
BRepAdaptor_CompCurve C(myWire, IsbyAC, First, Last, Tol);
Handle(BRepAdaptor_HCompCurve) HC =
new (BRepAdaptor_HCompCurve) (C);
Handle(BRepAdaptor_CompCurve) HC =
new (BRepAdaptor_CompCurve) (C);
return HC;
}

View File

@ -31,13 +31,13 @@
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_CurveType.hxx>
class Standard_NullObject;
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopoDS_Wire;
class TopoDS_Edge;
class Adaptor3d_HCurve;
class gp_Pnt;
class gp_Vec;
class gp_Lin;
@ -48,6 +48,7 @@ class gp_Parab;
class Geom_BezierCurve;
class Geom_BSplineCurve;
DEFINE_STANDARD_HANDLE(BRepAdaptor_CompCurve, Adaptor3d_Curve)
//! The Curve from BRepAdaptor allows to use a Wire
//! of the BRep topology like a 3D curve.
@ -61,11 +62,9 @@ class Geom_BSplineCurve;
//! connected to each other to make a chain.
class BRepAdaptor_CompCurve : public Adaptor3d_Curve
{
DEFINE_STANDARD_RTTIEXT(BRepAdaptor_CompCurve, Adaptor3d_Curve)
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined Curve with no Wire loaded.
Standard_EXPORT BRepAdaptor_CompCurve();
@ -109,7 +108,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;

View File

@ -14,21 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Hypr.hxx>
@ -44,7 +41,9 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <Geom_OffsetCurve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve)
//=======================================================================
//function : BRepAdaptor_Curve
@ -108,12 +107,12 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E)
Handle(Geom_Surface) S;
BRep_Tool::CurveOnSurface(E,PC,S,L,pf,pl);
if (!PC.IsNull()) {
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load(S);
Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve();
HC->ChangeCurve2d().Load(PC,pf,pl);
myConSurf = new Adaptor3d_HCurveOnSurface();
myConSurf->ChangeCurve().Load(HC, HS);
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load(S);
Handle(Geom2dAdaptor_Curve) HC = new Geom2dAdaptor_Curve();
HC->Load(PC,pf,pl);
myConSurf = new Adaptor3d_CurveOnSurface();
myConSurf->Load(HC, HS);
}
else {
throw Standard_NullObject("BRepAdaptor_Curve::No geometry");
@ -138,12 +137,12 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E,
Handle(Geom_Surface) S = BRep_Tool::Surface(F,L);
Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl);
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load(S);
Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve();
HC->ChangeCurve2d().Load(PC,pf,pl);
myConSurf = new Adaptor3d_HCurveOnSurface();
myConSurf->ChangeCurve().Load(HC, HS);
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load(S);
Handle(Geom2dAdaptor_Curve) HC = new Geom2dAdaptor_Curve();
HC->Load(PC,pf,pl);
myConSurf = new Adaptor3d_CurveOnSurface();
myConSurf->Load(HC, HS);
myTrsf = L.Transformation();
}
@ -195,7 +194,7 @@ const GeomAdaptor_Curve& BRepAdaptor_Curve::Curve() const
const Adaptor3d_CurveOnSurface& BRepAdaptor_Curve::CurveOnSurface() const
{
return *((Adaptor3d_CurveOnSurface*)&(myConSurf->Curve()));
return *myConSurf;
}
//=======================================================================
@ -300,25 +299,24 @@ void BRepAdaptor_Curve::Intervals(TColStd_Array1OfReal& T,
//purpose :
//=======================================================================
Handle(Adaptor3d_HCurve) BRepAdaptor_Curve::Trim(const Standard_Real First,
Handle(Adaptor3d_Curve) BRepAdaptor_Curve::Trim(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
// On fait une copie de this pour garder la trsf.
Handle(BRepAdaptor_HCurve) res = new BRepAdaptor_HCurve();
Handle(BRepAdaptor_Curve) res;
if (myConSurf.IsNull()){
Standard_Real pf = FirstParameter(), pl = LastParameter();
Handle(Geom_Curve) C = myCurve.Curve();
((GeomAdaptor_Curve*) (void*) &myCurve)->Load(C,First,Last);
res->ChangeCurve() = *this;
((GeomAdaptor_Curve*) (void*) &myCurve)->Load(C,pf,pl);
const_cast<GeomAdaptor_Curve*>(&myCurve)->Load(C,First,Last);
res = new BRepAdaptor_Curve (*this);
const_cast<GeomAdaptor_Curve*>(&myCurve)->Load(C,pf,pl);
}
else {
Handle(Adaptor3d_HCurveOnSurface) sav = myConSurf;
*((Handle(Adaptor3d_HCurveOnSurface)*) (void*) &myConSurf) =
Handle(Adaptor3d_HCurveOnSurface)::DownCast(myConSurf->Trim(First,Last,Tol));
res->ChangeCurve() = *this;
*((Handle(Adaptor3d_HCurveOnSurface)*) (void*) &myConSurf) = sav;
Handle(Adaptor3d_CurveOnSurface) sav = myConSurf;
const_cast<Handle(Adaptor3d_CurveOnSurface)&>(myConSurf) = Handle(Adaptor3d_CurveOnSurface)::DownCast(myConSurf->Trim(First,Last,Tol));
res = new BRepAdaptor_Curve (*this);
const_cast<Handle(Adaptor3d_CurveOnSurface)&>(myConSurf) = sav;
}
return res;
}

View File

@ -17,10 +17,7 @@
#ifndef _BRepAdaptor_Curve_HeaderFile
#define _BRepAdaptor_Curve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <gp_Trsf.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Edge.hxx>
@ -31,7 +28,7 @@
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_CurveType.hxx>
class Adaptor3d_HCurveOnSurface;
class Standard_NullObject;
class Standard_DomainError;
class Standard_OutOfRange;
@ -41,7 +38,6 @@ class TopoDS_Face;
class gp_Trsf;
class GeomAdaptor_Curve;
class Adaptor3d_CurveOnSurface;
class Adaptor3d_HCurve;
class gp_Pnt;
class gp_Vec;
class gp_Lin;
@ -53,6 +49,7 @@ class Geom_BezierCurve;
class Geom_BSplineCurve;
class Geom_OffsetCurve;
DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve, Adaptor3d_Curve)
//! The Curve from BRepAdaptor allows to use an Edge
//! of the BRep topology like a 3D curve.
@ -68,11 +65,9 @@ class Geom_OffsetCurve;
//! an Edge and a Face.
class BRepAdaptor_Curve : public Adaptor3d_Curve
{
DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve)
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined Curve with no Edge loaded.
Standard_EXPORT BRepAdaptor_Curve();
@ -145,7 +140,7 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
@ -226,30 +221,13 @@ public:
Standard_EXPORT Handle(Geom_OffsetCurve) OffsetCurve() const Standard_OVERRIDE;
protected:
private:
gp_Trsf myTrsf;
GeomAdaptor_Curve myCurve;
Handle(Adaptor3d_HCurveOnSurface) myConSurf;
Handle(Adaptor3d_CurveOnSurface) myConSurf;
TopoDS_Edge myEdge;
};
#endif // _BRepAdaptor_Curve_HeaderFile

View File

@ -21,6 +21,8 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve)
//=======================================================================
//function : BRepAdaptor_Curve2d
//purpose :

View File

@ -41,10 +41,8 @@ class TopoDS_Face;
//! Geom2dAdaptor.
class BRepAdaptor_Curve2d : public Geom2dAdaptor_Curve
{
DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve)
public:
DEFINE_STANDARD_ALLOC
//! Creates an uninitialized curve2d.
Standard_EXPORT BRepAdaptor_Curve2d();
@ -61,29 +59,13 @@ public:
//! Returns the Face.
Standard_EXPORT const TopoDS_Face& Face() const;
protected:
private:
TopoDS_Edge myEdge;
TopoDS_Face myFace;
};
DEFINE_STANDARD_HANDLE(BRepAdaptor_Curve2d, Geom2dAdaptor_Curve)
#endif // _BRepAdaptor_Curve2d_HeaderFile

View File

@ -1,97 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _BRepAdaptor_HCompCurve_HeaderFile
#define _BRepAdaptor_HCompCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Adaptor3d_HCurve.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class BRepAdaptor_CompCurve;
class Adaptor3d_Curve;
class BRepAdaptor_HCompCurve;
DEFINE_STANDARD_HANDLE(BRepAdaptor_HCompCurve, Adaptor3d_HCurve)
class BRepAdaptor_HCompCurve : public Adaptor3d_HCurve
{
public:
//! Creates an empty GenHCurve.
Standard_EXPORT BRepAdaptor_HCompCurve();
//! Creates a GenHCurve from a Curve
Standard_EXPORT BRepAdaptor_HCompCurve(const BRepAdaptor_CompCurve& C);
//! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BRepAdaptor_CompCurve& C);
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
BRepAdaptor_CompCurve& ChangeCurve();
DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCompCurve,Adaptor3d_HCurve)
protected:
BRepAdaptor_CompCurve myCurve;
private:
};
#define TheCurve BRepAdaptor_CompCurve
#define TheCurve_hxx <BRepAdaptor_CompCurve.hxx>
#define Adaptor3d_GenHCurve BRepAdaptor_HCompCurve
#define Adaptor3d_GenHCurve_hxx <BRepAdaptor_HCompCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCompCurve)
#include <Adaptor3d_GenHCurve.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor3d_GenHCurve
#undef Adaptor3d_GenHCurve_hxx
#undef Handle_Adaptor3d_GenHCurve
#endif // _BRepAdaptor_HCompCurve_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <BRepAdaptor_HCompCurve.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Adaptor3d_Curve.hxx>
#define TheCurve BRepAdaptor_CompCurve
#define TheCurve_hxx <BRepAdaptor_CompCurve.hxx>
#define Adaptor3d_GenHCurve BRepAdaptor_HCompCurve
#define Adaptor3d_GenHCurve_hxx <BRepAdaptor_HCompCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCompCurve)
#include <Adaptor3d_GenHCurve.gxx>

View File

@ -1,97 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _BRepAdaptor_HCurve_HeaderFile
#define _BRepAdaptor_HCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_HCurve.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class BRepAdaptor_Curve;
class Adaptor3d_Curve;
class BRepAdaptor_HCurve;
DEFINE_STANDARD_HANDLE(BRepAdaptor_HCurve, Adaptor3d_HCurve)
class BRepAdaptor_HCurve : public Adaptor3d_HCurve
{
public:
//! Creates an empty GenHCurve.
Standard_EXPORT BRepAdaptor_HCurve();
//! Creates a GenHCurve from a Curve
Standard_EXPORT BRepAdaptor_HCurve(const BRepAdaptor_Curve& C);
//! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BRepAdaptor_Curve& C);
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
//! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve() Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
BRepAdaptor_Curve& ChangeCurve();
DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCurve,Adaptor3d_HCurve)
protected:
BRepAdaptor_Curve myCurve;
private:
};
#define TheCurve BRepAdaptor_Curve
#define TheCurve_hxx <BRepAdaptor_Curve.hxx>
#define Adaptor3d_GenHCurve BRepAdaptor_HCurve
#define Adaptor3d_GenHCurve_hxx <BRepAdaptor_HCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCurve)
#include <Adaptor3d_GenHCurve.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor3d_GenHCurve
#undef Adaptor3d_GenHCurve_hxx
#undef Handle_Adaptor3d_GenHCurve
#endif // _BRepAdaptor_HCurve_HeaderFile

View File

@ -1,93 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _BRepAdaptor_HCurve2d_HeaderFile
#define _BRepAdaptor_HCurve2d_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class BRepAdaptor_Curve2d;
class Adaptor2d_Curve2d;
class BRepAdaptor_HCurve2d;
DEFINE_STANDARD_HANDLE(BRepAdaptor_HCurve2d, Adaptor2d_HCurve2d)
class BRepAdaptor_HCurve2d : public Adaptor2d_HCurve2d
{
public:
//! Creates an empty GenHCurve2d.
Standard_EXPORT BRepAdaptor_HCurve2d();
//! Creates a GenHCurve2d from a Curve
Standard_EXPORT BRepAdaptor_HCurve2d(const BRepAdaptor_Curve2d& C);
//! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const BRepAdaptor_Curve2d& C);
//! Returns the curve used to create the GenHCurve2d.
//! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const Standard_OVERRIDE;
//! Returns the curve used to create the GenHCurve.
BRepAdaptor_Curve2d& ChangeCurve2d();
DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HCurve2d,Adaptor2d_HCurve2d)
protected:
BRepAdaptor_Curve2d myCurve;
private:
};
#define TheCurve BRepAdaptor_Curve2d
#define TheCurve_hxx <BRepAdaptor_Curve2d.hxx>
#define Adaptor2d_GenHCurve2d BRepAdaptor_HCurve2d
#define Adaptor2d_GenHCurve2d_hxx <BRepAdaptor_HCurve2d.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(BRepAdaptor_HCurve2d)
#include <Adaptor2d_GenHCurve2d.lxx>
#undef TheCurve
#undef TheCurve_hxx
#undef Adaptor2d_GenHCurve2d
#undef Adaptor2d_GenHCurve2d_hxx
#undef Handle_Adaptor2d_GenHCurve2d
#endif // _BRepAdaptor_HCurve2d_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <BRepAdaptor_HCurve2d.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define TheCurve BRepAdaptor_Curve2d
#define TheCurve_hxx <BRepAdaptor_Curve2d.hxx>
#define Adaptor2d_GenHCurve2d BRepAdaptor_HCurve2d
#define Adaptor2d_GenHCurve2d_hxx <BRepAdaptor_HCurve2d.hxx>
#define Handle_Adaptor2d_GenHCurve2d Handle(BRepAdaptor_HCurve2d)
#include <Adaptor2d_GenHCurve2d.gxx>

View File

@ -1,42 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <BRepAdaptor_HCurve.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <Adaptor3d_Curve.hxx>
#define TheCurve BRepAdaptor_Curve
#define TheCurve_hxx <BRepAdaptor_Curve.hxx>
#define Adaptor3d_GenHCurve BRepAdaptor_HCurve
#define Adaptor3d_GenHCurve_hxx <BRepAdaptor_HCurve.hxx>
#define Handle_Adaptor3d_GenHCurve Handle(BRepAdaptor_HCurve)
#include <Adaptor3d_GenHCurve.gxx>

View File

@ -1,93 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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 _BRepAdaptor_HSurface_HeaderFile
#define _BRepAdaptor_HSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Adaptor3d_HSurface.hxx>
class Standard_OutOfRange;
class Standard_NoSuchObject;
class Standard_DomainError;
class BRepAdaptor_Surface;
class Adaptor3d_Surface;
class BRepAdaptor_HSurface;
DEFINE_STANDARD_HANDLE(BRepAdaptor_HSurface, Adaptor3d_HSurface)
class BRepAdaptor_HSurface : public Adaptor3d_HSurface
{
public:
//! Creates an empty GenHSurface.
Standard_EXPORT BRepAdaptor_HSurface();
//! Creates a GenHSurface from a Surface.
Standard_EXPORT BRepAdaptor_HSurface(const BRepAdaptor_Surface& S);
//! Sets the field of the GenHSurface.
Standard_EXPORT void Set (const BRepAdaptor_Surface& S);
//! Returns a reference to the Surface inside the HSurface.
//! This is redefined from HSurface, cannot be inline.
Standard_EXPORT const Adaptor3d_Surface& Surface() const Standard_OVERRIDE;
//! Returns the surface used to create the GenHSurface.
BRepAdaptor_Surface& ChangeSurface();
DEFINE_STANDARD_RTTI_INLINE(BRepAdaptor_HSurface,Adaptor3d_HSurface)
protected:
BRepAdaptor_Surface mySurf;
private:
};
#define TheSurface BRepAdaptor_Surface
#define TheSurface_hxx <BRepAdaptor_Surface.hxx>
#define Adaptor3d_GenHSurface BRepAdaptor_HSurface
#define Adaptor3d_GenHSurface_hxx <BRepAdaptor_HSurface.hxx>
#define Handle_Adaptor3d_GenHSurface Handle(BRepAdaptor_HSurface)
#include <Adaptor3d_GenHSurface.lxx>
#undef TheSurface
#undef TheSurface_hxx
#undef Adaptor3d_GenHSurface
#undef Adaptor3d_GenHSurface_hxx
#undef Handle_Adaptor3d_GenHSurface
#endif // _BRepAdaptor_HSurface_HeaderFile

View File

@ -1,42 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
#include <BRepAdaptor_HSurface.hxx>
#include <Standard_Type.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_DomainError.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Adaptor3d_Surface.hxx>
#define TheSurface BRepAdaptor_Surface
#define TheSurface_hxx <BRepAdaptor_Surface.hxx>
#define Adaptor3d_GenHSurface BRepAdaptor_HSurface
#define Adaptor3d_GenHSurface_hxx <BRepAdaptor_HSurface.hxx>
#define Handle_Adaptor3d_GenHSurface Handle(BRepAdaptor_HSurface)
#include <Adaptor3d_GenHSurface.gxx>

View File

@ -14,17 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Ax1.hxx>
#include <gp_Cone.hxx>
@ -41,6 +40,8 @@
#include <Standard_OutOfRange.hxx>
#include <TopoDS_Face.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface)
//=======================================================================
//function : BRepAdaptor_Surface
//purpose :
@ -170,14 +171,13 @@ void BRepAdaptor_Surface::VIntervals(TColStd_Array1OfReal& T,
//purpose :
//=======================================================================
Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::UTrim
Handle(Adaptor3d_Surface) BRepAdaptor_Surface::UTrim
(const Standard_Real First,
const Standard_Real Last ,
const Standard_Real Tol ) const
{
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load
(Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
return HS->UTrim(First,Last,Tol);
}
@ -187,14 +187,13 @@ Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::UTrim
//purpose :
//=======================================================================
Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::VTrim
Handle(Adaptor3d_Surface) BRepAdaptor_Surface::VTrim
(const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol) const
{
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load
(Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
return HS->VTrim(First,Last,Tol);
}
@ -408,11 +407,10 @@ gp_Dir BRepAdaptor_Surface::Direction() const
//purpose :
//=======================================================================
Handle(Adaptor3d_HCurve) BRepAdaptor_Surface::BasisCurve() const
Handle(Adaptor3d_Curve) BRepAdaptor_Surface::BasisCurve() const
{
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load
(Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
return HS->BasisCurve();
}
@ -423,11 +421,10 @@ Handle(Adaptor3d_HCurve) BRepAdaptor_Surface::BasisCurve() const
//purpose :
//=======================================================================
Handle(Adaptor3d_HSurface) BRepAdaptor_Surface::BasisSurface() const
Handle(Adaptor3d_Surface) BRepAdaptor_Surface::BasisSurface() const
{
Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface();
HS->ChangeSurface().Load
(Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
Handle(GeomAdaptor_Surface) HS = new GeomAdaptor_Surface();
HS->Load (Handle(Geom_Surface)::DownCast(mySurf.Surface()->Transformed(myTrsf)));
return HS->BasisSurface();
}

View File

@ -17,27 +17,18 @@
#ifndef _BRepAdaptor_Surface_HeaderFile
#define _BRepAdaptor_Surface_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Trsf.hxx>
#include <TopoDS_Face.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Trsf.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TopoDS_Face.hxx>
class Standard_OutOfRange;
class Standard_DomainError;
class Standard_NoSuchObject;
class TopoDS_Face;
class GeomAdaptor_Surface;
class gp_Trsf;
class Adaptor3d_HSurface;
class gp_Pnt;
class gp_Vec;
class gp_Pln;
@ -49,8 +40,8 @@ class Geom_BezierSurface;
class Geom_BSplineSurface;
class gp_Ax1;
class gp_Dir;
class Adaptor3d_HCurve;
DEFINE_STANDARD_HANDLE(BRepAdaptor_Surface, Adaptor3d_Surface)
//! The Surface from BRepAdaptor allows to use a Face
//! of the BRep topology look like a 3D surface.
@ -66,11 +57,9 @@ class Adaptor3d_HCurve;
//! set to false.
class BRepAdaptor_Surface : public Adaptor3d_Surface
{
DEFINE_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface)
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined surface with no face loaded.
Standard_EXPORT BRepAdaptor_Surface();
@ -97,28 +86,28 @@ public:
//! Returns the face tolerance.
Standard_EXPORT Standard_Real Tolerance() const;
Standard_Real FirstUParameter() const Standard_OVERRIDE;
Standard_Real LastUParameter() const Standard_OVERRIDE;
Standard_Real FirstVParameter() const Standard_OVERRIDE;
Standard_Real LastVParameter() const Standard_OVERRIDE;
GeomAbs_Shape UContinuity() const Standard_OVERRIDE;
GeomAbs_Shape VContinuity() const Standard_OVERRIDE;
virtual Standard_Real FirstUParameter() const Standard_OVERRIDE { return mySurf.FirstUParameter(); }
virtual Standard_Real LastUParameter() const Standard_OVERRIDE { return mySurf.LastUParameter(); }
virtual Standard_Real FirstVParameter() const Standard_OVERRIDE { return mySurf.FirstVParameter(); }
virtual Standard_Real LastVParameter() const Standard_OVERRIDE { return mySurf.LastVParameter(); }
virtual GeomAbs_Shape UContinuity() const Standard_OVERRIDE { return mySurf.UContinuity(); }
virtual GeomAbs_Shape VContinuity() const Standard_OVERRIDE { return mySurf.VContinuity(); }
//! If necessary, breaks the surface in U intervals of
//! continuity <S>. And returns the number of
//! intervals.
Standard_Integer NbUIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
virtual Standard_Integer NbUIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbUIntervals (theSh); }
//! If necessary, breaks the surface in V intervals of
//! continuity <S>. And returns the number of
//! intervals.
Standard_Integer NbVIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
virtual Standard_Integer NbVIntervals (const GeomAbs_Shape theSh) const Standard_OVERRIDE { return mySurf.NbVIntervals (theSh); }
//! Returns the intervals with the requested continuity
//! in the U direction.
@ -133,26 +122,26 @@ public:
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Surface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
//! Returns a surface trimmed in the V direction between
//! parameters <First> and <Last>. <Tol> is used to
//! test for 3d points confusion.
//! If <First> >= <Last>
Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
Standard_Boolean IsUClosed() const Standard_OVERRIDE;
Standard_Boolean IsVClosed() const Standard_OVERRIDE;
Standard_Boolean IsUPeriodic() const Standard_OVERRIDE;
Standard_Real UPeriod() const Standard_OVERRIDE;
Standard_Boolean IsVPeriodic() const Standard_OVERRIDE;
Standard_Real VPeriod() const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Surface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
virtual Standard_Boolean IsUClosed() const Standard_OVERRIDE { return mySurf.IsUClosed(); }
virtual Standard_Boolean IsVClosed() const Standard_OVERRIDE { return mySurf.IsVClosed(); }
virtual Standard_Boolean IsUPeriodic() const Standard_OVERRIDE { return mySurf.IsUPeriodic(); }
virtual Standard_Real UPeriod() const Standard_OVERRIDE { return mySurf.UPeriod(); }
virtual Standard_Boolean IsVPeriodic() const Standard_OVERRIDE { return mySurf.IsVPeriodic(); }
virtual Standard_Real VPeriod() const Standard_OVERRIDE { return mySurf.VPeriod(); }
//! Computes the point of parameters U,V on the surface.
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE;
@ -186,17 +175,17 @@ public:
//! Returns the parametric U resolution corresponding
//! to the real space resolution <R3d>.
Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE;
virtual Standard_Real UResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.UResolution (theR3d); }
//! Returns the parametric V resolution corresponding
//! to the real space resolution <R3d>.
Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE;
virtual Standard_Real VResolution (const Standard_Real theR3d) const Standard_OVERRIDE { return mySurf.VResolution (theR3d); }
//! Returns the type of the surface : Plane, Cylinder,
//! Cone, Sphere, Torus, BezierSurface,
//! BSplineSurface, SurfaceOfRevolution,
//! SurfaceOfExtrusion, OtherSurface
GeomAbs_SurfaceType GetType() const Standard_OVERRIDE;
virtual GeomAbs_SurfaceType GetType() const Standard_OVERRIDE { return mySurf.GetType(); }
Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE;
@ -208,29 +197,28 @@ public:
Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE;
Standard_Integer UDegree() const Standard_OVERRIDE;
Standard_Integer NbUPoles() const Standard_OVERRIDE;
Standard_Integer VDegree() const Standard_OVERRIDE;
Standard_Integer NbVPoles() const Standard_OVERRIDE;
Standard_Integer NbUKnots() const Standard_OVERRIDE;
Standard_Integer NbVKnots() const Standard_OVERRIDE;
Standard_Boolean IsURational() const Standard_OVERRIDE;
Standard_Boolean IsVRational() const Standard_OVERRIDE;
virtual Standard_Integer UDegree() const Standard_OVERRIDE { return mySurf.UDegree(); }
virtual Standard_Integer NbUPoles() const Standard_OVERRIDE { return mySurf.NbUPoles(); }
virtual Standard_Integer VDegree() const Standard_OVERRIDE { return mySurf.VDegree(); }
virtual Standard_Integer NbVPoles() const Standard_OVERRIDE { return mySurf.NbVPoles(); }
virtual Standard_Integer NbUKnots() const Standard_OVERRIDE { return mySurf.NbUKnots(); }
virtual Standard_Integer NbVKnots() const Standard_OVERRIDE { return mySurf.NbVKnots(); }
virtual Standard_Boolean IsURational() const Standard_OVERRIDE { return mySurf.IsURational(); }
virtual Standard_Boolean IsVRational() const Standard_OVERRIDE { return mySurf.IsVRational(); }
Standard_EXPORT Handle(Geom_BezierSurface) Bezier() const Standard_OVERRIDE;
//! Warning : this will make a copy of the
//! BSpline Surface since it applies
//! to it the myTsrf transformation
//! Be Carefull when using this method
//! Be Careful when using this method
Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE;
Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE;
@ -240,38 +228,19 @@ public:
//! only for SurfaceOfExtrusion and SurfaceOfRevolution
//! Warning: this will make a copy of the underlying curve
//! since it applies to it the transformation
//! myTrsf. Be carefull when using this method.
Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE;
//! myTrsf. Be careful when using this method.
Standard_EXPORT Handle(Adaptor3d_Curve) BasisCurve() const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_HSurface) BasisSurface() const Standard_OVERRIDE;
Standard_EXPORT Handle(Adaptor3d_Surface) BasisSurface() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real OffsetValue() const Standard_OVERRIDE;
protected:
private:
GeomAdaptor_Surface mySurf;
gp_Trsf myTrsf;
TopoDS_Face myFace;
};
#include <BRepAdaptor_Surface.lxx>
#endif // _BRepAdaptor_Surface_HeaderFile

View File

@ -1,272 +0,0 @@
// Created on: 1993-02-19
// Created by: Remi LEQUETTE
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 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.
//=======================================================================
//function : FirstUParameter
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::FirstUParameter() const
{
return mySurf.FirstUParameter();
}
//=======================================================================
//function : LastUParameter
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::LastUParameter() const
{
return mySurf.LastUParameter();
}
//=======================================================================
//function : FirstVParameter
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::FirstVParameter() const
{
return mySurf.FirstVParameter();
}
//=======================================================================
//function : LastVParameter
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::LastVParameter() const
{
return mySurf.LastVParameter();
}
//=======================================================================
//function : UContinuity
//purpose :
//=======================================================================
inline GeomAbs_Shape BRepAdaptor_Surface::UContinuity() const
{
return mySurf.UContinuity();
}
//=======================================================================
//function : VContinuity
//purpose :
//=======================================================================
inline GeomAbs_Shape BRepAdaptor_Surface::VContinuity() const
{
return mySurf.VContinuity();
}
//=======================================================================
//function : NbUIntervals
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbUIntervals
(const GeomAbs_Shape S) const
{
return mySurf.NbUIntervals(S);
}
//=======================================================================
//function : NbVIntervals
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbVIntervals
(const GeomAbs_Shape S) const
{
return mySurf.NbVIntervals(S);
}
//=======================================================================
//function : IsUClosed
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsUClosed()const
{
return mySurf.IsUClosed();
}
//=======================================================================
//function : IsVClosed
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsVClosed()const
{
return mySurf.IsVClosed();
}
//=======================================================================
//function : IsUPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsUPeriodic()const
{
return mySurf.IsUPeriodic();
}
//=======================================================================
//function : UPeriod
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::UPeriod()const
{
return mySurf.UPeriod();
}
//=======================================================================
//function : IsVPeriodic
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsVPeriodic()const
{
return mySurf.IsVPeriodic();
}
//=======================================================================
//function : VPeriod
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::VPeriod()const
{
return mySurf.VPeriod();
}
//=======================================================================
//function : UResolution
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::UResolution(const Standard_Real R3d)const
{
return mySurf.UResolution(R3d);
}
//=======================================================================
//function : VResolution
//purpose :
//=======================================================================
inline Standard_Real BRepAdaptor_Surface::VResolution(const Standard_Real R3d)const
{
return mySurf.VResolution(R3d);
}
//=======================================================================
//function : GetType
//purpose :
//=======================================================================
inline GeomAbs_SurfaceType BRepAdaptor_Surface::GetType()const
{
return mySurf.GetType();
}
//=======================================================================
//function : UDegree
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::UDegree()const
{
return mySurf.UDegree();
}
//=======================================================================
//function : NbUPoles
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbUPoles()const
{
return mySurf.NbUPoles();
}
//=======================================================================
//function : VDegree
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::VDegree()const
{
return mySurf.VDegree();
}
//=======================================================================
//function : NbVPoles
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbVPoles()const
{
return mySurf.NbVPoles();
}
//=======================================================================
//function : NbUKnots
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbUKnots()const
{
return mySurf.NbUKnots();
}
//=======================================================================
//function : NbVKnots
//purpose :
//=======================================================================
inline Standard_Integer BRepAdaptor_Surface::NbVKnots()const
{
return mySurf.NbVKnots();
}
//=======================================================================
//function : IsURational
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsURational()const
{
return mySurf.IsURational();
}
//=======================================================================
//function : IsVRational
//purpose :
//=======================================================================
inline Standard_Boolean BRepAdaptor_Surface::IsVRational()const
{
return mySurf.IsVRational();
}

View File

@ -6,14 +6,5 @@ BRepAdaptor_Curve.hxx
BRepAdaptor_Curve2d.cxx
BRepAdaptor_Curve2d.hxx
BRepAdaptor_HArray1OfCurve.hxx
BRepAdaptor_HCompCurve.hxx
BRepAdaptor_HCompCurve_0.cxx
BRepAdaptor_HCurve.hxx
BRepAdaptor_HCurve2d.hxx
BRepAdaptor_HCurve2d_0.cxx
BRepAdaptor_HCurve_0.cxx
BRepAdaptor_HSurface.hxx
BRepAdaptor_HSurface_0.cxx
BRepAdaptor_Surface.cxx
BRepAdaptor_Surface.hxx
BRepAdaptor_Surface.lxx

View File

@ -19,8 +19,6 @@
#include <Approx_CurveOnSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo_NormalProjection.hxx>
#include <BRepAlgoAPI_Section.hxx>
@ -32,7 +30,7 @@
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomAdaptor.hxx>
#include <Precision.hxx>
@ -212,7 +210,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
InitChron(chr_total);
#endif
myIsDone = Standard_False;
ProjLib_CompProjectedCurve Projector;
Handle(TopTools_HSequenceOfShape) Edges = new TopTools_HSequenceOfShape();
Handle(TopTools_HSequenceOfShape) Faces = new TopTools_HSequenceOfShape();
TopTools_ListOfShape DescenList;
@ -251,14 +249,10 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
for(i = 1; i <= NbEdges; i++){
DescenList.Clear();
BRepAdaptor_Curve cur(TopoDS::Edge(Edges->Value(i)));
Handle(BRepAdaptor_HCurve) hcur = new BRepAdaptor_HCurve();
hcur->Set(cur);
Elementary = IsElementary(cur);
Handle(BRepAdaptor_Curve) hcur = new BRepAdaptor_Curve (TopoDS::Edge(Edges->Value(i)));
Elementary = IsElementary(*hcur);
for(j = 1; j <= NbFaces; j++){
BRepAdaptor_Surface sur(TopoDS::Face(Faces->Value(j)));
Handle(BRepAdaptor_HSurface) hsur = new BRepAdaptor_HSurface();
hsur->Set(sur);
Handle(BRepAdaptor_Surface) hsur = new BRepAdaptor_Surface (TopoDS::Face(Faces->Value(j)));
// computation of TolU and TolV
@ -270,32 +264,28 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
#ifdef OCCT_DEBUG_CHRONO
InitChron(chr_init);
#endif
Projector =
ProjLib_CompProjectedCurve(hsur, hcur, TolU, TolV, myMaxDist);
Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, hcur, TolU, TolV, myMaxDist);
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_init,t_init);
init_count++;
#endif
//
Handle(ProjLib_HCompProjectedCurve) HProjector =
new ProjLib_HCompProjectedCurve();
HProjector->Set(Projector);
TopoDS_Shape prj;
Standard_Boolean Degenerated = Standard_False;
gp_Pnt2d P2d, Pdeb, Pfin;
gp_Pnt P;
Standard_Real UIso, VIso;
Handle(Adaptor2d_HCurve2d) HPCur;
Handle(Adaptor2d_Curve2d) HPCur;
Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection
for(k = 1; k <= Projector.NbCurves(); k++){
if(Projector.IsSinglePnt(k, P2d)){
for(k = 1; k <= HProjector->NbCurves(); k++){
if(HProjector->IsSinglePnt(k, P2d)){
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is punctual"<<std::endl<<std::endl;
#endif
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
HProjector->GetSurface()->D0(P2d.X(), P2d.Y(), P);
prj = BRepLib_MakeVertex(P).Shape();
DescenList.Append(prj);
BB.Add(VertexRes, prj);
@ -305,16 +295,16 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
else {
Only2d = Only3d = Standard_False;
Projector.Bounds(k, Udeb, Ufin);
HProjector->Bounds(k, Udeb, Ufin);
/**************************************************************/
if (Projector.IsUIso(k, UIso)) {
if (HProjector->IsUIso(k, UIso)) {
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is U-isoparametric"<<std::endl<<std::endl;
#endif
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
HProjector->D0(Udeb, Pdeb);
HProjector->D0(Ufin, Pfin);
Poles(1) = Pdeb;
Poles(2) = Pfin;
Knots(1) = Udeb;
@ -322,16 +312,16 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
Handle(Geom2d_BSplineCurve) BS2d =
new Geom2d_BSplineCurve(Poles, Knots, Mults, Deg);
PCur2d = new Geom2d_TrimmedCurve( BS2d, Udeb, Ufin);
HPCur = new Geom2dAdaptor_HCurve(PCur2d);
HPCur = new Geom2dAdaptor_Curve(PCur2d);
Only3d = Standard_True;
}
else if (Projector.IsVIso(k, VIso)) {
else if (HProjector->IsVIso(k, VIso)) {
#ifdef OCCT_DEBUG
std::cout << "Projection of edge "<<i<<" on face "<<j;
std::cout << " is V-isoparametric"<<std::endl<<std::endl;
#endif
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
HProjector->D0(Udeb, Pdeb);
HProjector->D0(Ufin, Pfin);
Poles(1) = Pdeb;
Poles(2) = Pfin;
Knots(1) = Udeb;
@ -339,13 +329,13 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
Handle(Geom2d_BSplineCurve) BS2d =
new Geom2d_BSplineCurve(Poles, Knots, Mults, Deg);
PCur2d = new Geom2d_TrimmedCurve(BS2d, Udeb, Ufin);
HPCur = new Geom2dAdaptor_HCurve(PCur2d);
HPCur = new Geom2dAdaptor_Curve(PCur2d);
Only3d = Standard_True;
}
else HPCur = HProjector;
if((myWith3d == Standard_False || Elementary) &&
(Projector.MaxDistance(k) <= myTol3d) )
(HProjector->MaxDistance(k) <= myTol3d) )
Only2d = Standard_True;
if(Only2d && Only3d) {

View File

@ -14,11 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepApprox_SurfaceTool.hxx>
#include <Adaptor3d_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <gp_Pnt.hxx>

View File

@ -17,15 +17,9 @@
#ifndef _BRepApprox_SurfaceTool_HeaderFile
#define _BRepApprox_SurfaceTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAbs_Shape.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <GeomAbs_SurfaceType.hxx>
@ -36,17 +30,9 @@
#include <gp_Sphere.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
class Standard_NoSuchObject;
class Standard_OutOfRange;
class BRepAdaptor_Surface;
class Adaptor3d_HSurface;
class gp_Pnt;
class gp_Vec;
class Geom_BezierSurface;
class Geom_BSplineSurface;
class Adaptor3d_HCurve;
class BRepApprox_SurfaceTool
{
@ -72,10 +58,10 @@ public:
static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
//! If <First> >= <Last>
static Handle(Adaptor3d_HSurface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
//! If <First> >= <Last>
static Handle(Adaptor3d_HSurface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S);
@ -125,7 +111,7 @@ public:
static gp_Dir Direction (const BRepAdaptor_Surface& S);
static Handle(Adaptor3d_HCurve) BasisCurve (const BRepAdaptor_Surface& S);
static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S);
Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S);

View File

@ -25,8 +25,8 @@
#include <gp_Dir.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_Curve.hxx>
inline Standard_Real BRepApprox_SurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstUParameter(); }
inline Standard_Real BRepApprox_SurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstVParameter();}
@ -56,14 +56,14 @@ inline void BRepApprox_SurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf,
}
inline Handle(Adaptor3d_HSurface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol) {
return Surf.UTrim(F,L,Tol);
}
inline Handle(Adaptor3d_HSurface) BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
inline Handle(Adaptor3d_Surface) BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol) {
@ -227,6 +227,6 @@ inline gp_Dir BRepApprox_SurfaceTool::Direction(const BRepAdaptor_Surface& S) {
return(S.Direction());
}
inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) {
inline Handle(Adaptor3d_Curve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) {
return(S.BasisCurve());
}

View File

@ -14,12 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepBlend_BlendTool.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor3d_HVertex.hxx>
#include <BRep_Tool.hxx>
#include <BRepBlend_BlendTool.hxx>
#include <BRepBlend_HCurve2dTool.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <Extrema_EPCOfExtPC2d.hxx>
@ -40,8 +40,8 @@
// pmn 8/10/98 : On retourne toujours une distance. (BUC60360)
//=======================================================================
Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P,
const Handle(Adaptor3d_HSurface)&,
const Handle(Adaptor2d_HCurve2d)& C,
const Handle(Adaptor3d_Surface)&,
const Handle(Adaptor2d_Curve2d)& C,
Standard_Real& Paramproj,
Standard_Real& Dist)
{
@ -60,7 +60,7 @@ Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P,
const Standard_Real epsX = 1.e-8;
const Standard_Integer Nbu = 20;
const Standard_Real Tol = 1.e-5;
Extrema_EPCOfExtPC2d extrema(P, C->Curve2d(), Nbu, epsX, Tol);
Extrema_EPCOfExtPC2d extrema(P, *C, Nbu, epsX, Tol);
if (!extrema.IsDone())
return Standard_True;
@ -83,8 +83,8 @@ Standard_Boolean BRepBlend_BlendTool::Project(const gp_Pnt2d& P,
//=======================================================================
Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1,
const gp_Pnt2d& P2,
const Handle(Adaptor3d_HSurface)&,
const Handle(Adaptor2d_HCurve2d)& C,
const Handle(Adaptor3d_Surface)&,
const Handle(Adaptor2d_Curve2d)& C,
Standard_Real& Param,
Standard_Real& Dist)
{
@ -97,7 +97,7 @@ Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1,
Handle(Geom2d_Line) bid = new Geom2d_Line(P1,d);
Geom2dAdaptor_Curve seg(bid,-0.01*mag,1.01*mag);
Geom2dInt_GInter inter(seg,C->Curve2d(),Tol,Tol);
Geom2dInt_GInter inter (seg, *C, Tol, Tol);
if (!inter.IsDone())
return Standard_False;
@ -112,7 +112,7 @@ Standard_Boolean BRepBlend_BlendTool::Inters(const gp_Pnt2d& P1,
}
Standard_Integer BRepBlend_BlendTool::NbSamplesV
(const Handle(Adaptor3d_HSurface)&,
(const Handle(Adaptor3d_Surface)&,
const Standard_Real,
const Standard_Real)
{
@ -120,14 +120,14 @@ Standard_Integer BRepBlend_BlendTool::NbSamplesV
}
Standard_Integer BRepBlend_BlendTool::NbSamplesU
(const Handle(Adaptor3d_HSurface)&,
(const Handle(Adaptor3d_Surface)&,
const Standard_Real,
const Standard_Real)
{
return 10;
}
void BRepBlend_BlendTool::Bounds(const Handle(Adaptor2d_HCurve2d)& A,
void BRepBlend_BlendTool::Bounds(const Handle(Adaptor2d_Curve2d)& A,
Standard_Real& Ufirst,
Standard_Real& Ulast)
{

View File

@ -17,20 +17,12 @@
#ifndef _BRepBlend_BlendTool_HeaderFile
#define _BRepBlend_BlendTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class gp_Pnt2d;
class Adaptor3d_HSurface;
class Adaptor2d_HCurve2d;
class Adaptor2d_Curve2d;
class Adaptor3d_HVertex;
class BRepBlend_BlendTool
{
public:
@ -45,38 +37,38 @@ public:
//! P and the curve..
//! If the method returns Standard_False, Param proj and Dist
//! are not significant.
Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist);
Standard_EXPORT static Standard_Boolean Project (const gp_Pnt2d& P, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Paramproj, Standard_Real& Dist);
Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Param, Standard_Real& Dist);
Standard_EXPORT static Standard_Boolean Inters (const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Param, Standard_Real& Dist);
//! Returns the parameter of the vertex V on the edge A.
static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A);
static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A);
//! Returns the parametric tolerance on the arc A
//! used to consider that the vertex and another point meet,
//! i-e if Abs(Parameter(Vertex)-Parameter(OtherPnt))<=
//! Tolerance, the points are "merged".
static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A);
static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A);
static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean SingularOnUMin (const Handle(Adaptor3d_Surface)& S);
static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean SingularOnUMax (const Handle(Adaptor3d_Surface)& S);
static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean SingularOnVMin (const Handle(Adaptor3d_Surface)& S);
static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_HSurface)& S);
static Standard_Boolean SingularOnVMax (const Handle(Adaptor3d_Surface)& S);
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2);
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2);
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2);
//! Returns the parametric limits on the arc C.
//! These limits must be finite : they are either
//! the real limits of the arc, for a finite arc,
//! or a bounding box for an infinite arc.
Standard_EXPORT static void Bounds (const Handle(Adaptor2d_HCurve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast);
Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast);
static Handle(Adaptor2d_HCurve2d) CurveOnSurf (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
static Handle(Adaptor2d_Curve2d) CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S);

View File

@ -16,39 +16,39 @@
#include <Adaptor3d_HVertex.hxx>
inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin (const Handle(Adaptor3d_HSurface)& )
inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMin (const Handle(Adaptor3d_Surface)& )
{
return Standard_False;
}
inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax (const Handle(Adaptor3d_HSurface)& )
inline Standard_Boolean BRepBlend_BlendTool::SingularOnUMax (const Handle(Adaptor3d_Surface)& )
{
return Standard_False;
}
inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin (const Handle(Adaptor3d_HSurface)& )
inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMin (const Handle(Adaptor3d_Surface)& )
{
return Standard_False;
}
inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax (const Handle(Adaptor3d_HSurface)& )
inline Standard_Boolean BRepBlend_BlendTool::SingularOnVMax (const Handle(Adaptor3d_Surface)& )
{
return Standard_False;
}
inline Standard_Real BRepBlend_BlendTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& A)
inline Standard_Real BRepBlend_BlendTool::Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& A)
{
// return Adaptor2d_HCurve2dTool::Resolution(A,1.e-6); // a voir
return V->Resolution(A); // a voir
}
inline Standard_Real BRepBlend_BlendTool::Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_HCurve2d)& C)
inline Standard_Real BRepBlend_BlendTool::Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C)
{
// return BRep_Tool::Parameter(V,A->Curve().Edge());
return V->Parameter(C);
}
inline Handle(Adaptor2d_HCurve2d) BRepBlend_BlendTool::CurveOnSurf (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)&)
inline Handle(Adaptor2d_Curve2d) BRepBlend_BlendTool::CurveOnSurf (const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)&)
{
return C;
}

View File

@ -17,25 +17,18 @@
#ifndef _BRepBlend_CSWalking_HeaderFile
#define _BRepBlend_CSWalking_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Blend_Point.hxx>
#include <Standard_Integer.hxx>
#include <BRepBlend_SequenceOfPointOnRst.hxx>
#include <math_Vector.hxx>
#include <Blend_Status.hxx>
class BRepBlend_Line;
class Adaptor3d_HSurface;
class Adaptor3d_HCurve;
class Adaptor3d_TopolTool;
class StdFail_NotDone;
class Adaptor3d_HVertex;
class Adaptor2d_HCurve2d;
class BRepBlend_HCurve2dTool;
class Adaptor3d_HSurfaceTool;
class BRepBlend_HCurveTool;
@ -49,8 +42,6 @@ class gp_Pnt2d;
class gp_Vec;
class gp_Vec2d;
class BRepBlend_CSWalking
{
public:
@ -58,7 +49,7 @@ public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_HCurve)& Curv, const Handle(Adaptor3d_HSurface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain);
Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain);
Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False);
@ -68,21 +59,12 @@ public:
const Handle(BRepBlend_Line)& Line() const;
protected:
private:
Standard_EXPORT void InternalPerform (Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound);
Standard_EXPORT void Transition (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);
Standard_EXPORT void Transition (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);
Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx);
@ -95,8 +77,8 @@ private:
Standard_Boolean done;
Handle(BRepBlend_Line) line;
Handle(Adaptor3d_HSurface) surf;
Handle(Adaptor3d_HCurve) curv;
Handle(Adaptor3d_Surface) surf;
Handle(Adaptor3d_Curve) curv;
Handle(Adaptor3d_TopolTool) domain;
Standard_Real tolesp;
Standard_Real tolgui;
@ -116,12 +98,12 @@ private:
#define TheVertex Handle(Adaptor3d_HVertex)
#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
#define TheArc Handle(Adaptor2d_HCurve2d)
#define TheArc_hxx <Adaptor2d_HCurve2d.hxx>
#define TheSurface Handle(Adaptor3d_HSurface)
#define TheSurface_hxx <Adaptor3d_HSurface.hxx>
#define TheCurve Handle(Adaptor3d_HCurve)
#define TheCurve_hxx <Adaptor3d_HCurve.hxx>
#define TheArc Handle(Adaptor2d_Curve2d)
#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
#define TheSurface Handle(Adaptor3d_Surface)
#define TheSurface_hxx <Adaptor3d_Surface.hxx>
#define TheCurve Handle(Adaptor3d_Curve)
#define TheCurve_hxx <Adaptor3d_Curve.hxx>
#define TheVertexTool Standard_Integer
#define TheVertexTool_hxx <Standard_Integer.hxx>
#define TheArcTool BRepBlend_HCurve2dTool

Some files were not shown because too many files have changed in this diff Show More