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

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,75 +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.
package BRepAdaptor
---Purpose: The BRepAdaptor package provides classes to access
-- the geometry of the BRep models.
--
-- OverView of classes
--
-- * Surface : Provides the methods of Surface from
-- Adpator on a Face.
--
-- * Curve : Provides the methods of Curve from
-- Adaptor3d on an Edge.
--
-- * Curve2d : Provides the methods of Curve2d from
-- Adaptor2d on an Edge on a Face.
--
uses
gp,
TCollection,
TColgp,
TColStd,
GeomAbs,
Adaptor3d,
Adaptor2d,
Geom,
Geom2d,
GeomAdaptor,
Geom2dAdaptor,
TopoDS,
BRep
is
class Surface;
class Curve;
class Curve2d;
class CompCurve;
class HSurface instantiates GenHSurface from Adaptor3d
(Surface from BRepAdaptor);
class HCurve instantiates GenHCurve from Adaptor3d
(Curve from BRepAdaptor);
class HCurve2d instantiates GenHCurve2d from Adaptor2d
(Curve2d from BRepAdaptor);
class HCompCurve instantiates GenHCurve from Adaptor3d
(CompCurve from BRepAdaptor);
imported Array1OfCurve;
imported transient class HArray1OfCurve;
end BRepAdaptor;

View File

@@ -1,277 +0,0 @@
-- Created on: 1998-08-20
-- Created by: Philippe MANGIN
-- Copyright (c) 1998-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.
class CompCurve from BRepAdaptor
inherits Curve from Adaptor3d
---Purpose: The Curve from BRepAdaptor allows to use a Wire
-- of the BRep topology like a 3D curve.
-- Warning: With this class of curve, C0 and C1 continuities
-- are not assumed. So be carful with some algorithm!
uses
Wire from TopoDS,
Edge from TopoDS,
CurveType from GeomAbs,
Shape from GeomAbs,
HCurve from Adaptor3d,
HArray1OfCurve from BRepAdaptor,
BezierCurve from Geom,
BSplineCurve from Geom,
Array1OfReal from TColStd,
HArray1OfReal from TColStd,
Pnt from gp,
Vec from gp,
Circ from gp,
Elips from gp,
Hypr from gp,
Parab from gp,
Lin from gp
raises
NullObject from Standard,
DomainError from Standard,
OutOfRange from Standard,
NoSuchObject from Standard
is
Create returns CompCurve from BRepAdaptor;
---Purpose: Creates an undefined Curve with no Wire loaded.
Create(W : Wire from TopoDS;
KnotByCurvilinearAbcissa : Boolean = Standard_False)
returns CompCurve from BRepAdaptor;
Create(W : Wire from TopoDS;
KnotByCurvilinearAbcissa : Boolean;
First, Last, Tol : Real)
returns CompCurve from BRepAdaptor;
---Purpose: Creates a Curve to acces to the geometry of edge
-- <W>.
--
Initialize(me : in out; W : Wire from TopoDS;
KnotByCurvilinearAbcissa : Boolean)
---Purpose: Sets the wire <W>.
is static;
Initialize(me : in out; W : Wire from TopoDS;
KnotByCurvilinearAbcissa : Boolean;
First, Last, Tol : Real )
---Purpose: Sets wire <W> and trimmed parameter.
is static;
SetPeriodic(me: in out; Periodic : Boolean)
---Purpose: Set the flag Periodic.
-- Warning: This method has no effect if the wire is not closed
is static;
Wire(me) returns Wire from TopoDS
---Purpose: Returns the wire.
--
---C++: return const &
is static;
Edge(me; U : Real;
E : out Edge;
UonE : out Real)
---Purpose: returns an edge and one parameter on them
-- corresponding to the parameter U.
is static;
--
-- Methods of Curve from GeomAdaptor.
--
FirstParameter(me) returns Real
is redefined static;
LastParameter(me) returns Real
is redefined static;
Continuity(me) returns Shape from GeomAbs
is redefined static;
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
is redefined static;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined static;
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
---Purpose: Returns a curve equivalent of <me> between
-- parameters <First> and <Last>. <Tol> is used to
-- test for 3d points confusion.
raises
OutOfRange from Standard
---Purpose: If <First> >= <Last>
is redefined static;
IsClosed(me) returns Boolean
is redefined static;
IsPeriodic(me) returns Boolean
is redefined static;
Period(me) returns Real
raises
DomainError from Standard -- if the curve is not periodic
is redefined static;
Value(me; U : Real) returns Pnt from gp
--- Purpose : Computes the point of parameter U on the curve
is redefined static;
D0 (me; U : Real; P : out Pnt from gp)
--- Purpose : Computes the point of parameter U.
is redefined static;
D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
--- Purpose : Computes the point of parameter U on the curve
-- with its first derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C1.
is redefined static;
D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
--- Purpose :
-- Returns the point P of parameter U, the first and second
-- derivatives V1 and V2.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C2.
is redefined static;
D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
--- Purpose :
-- Returns the point P of parameter U, the first, the second
-- and the third derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C3.
is redefined static;
DN (me; U : Real; N : Integer) returns Vec from gp
--- Purpose :
-- The returned vector gives the value of the derivative for the
-- order of derivation N.
raises
DomainError from Standard,
--- Purpose : Raised if the continuity of the current interval
-- is not CN.
OutOfRange from Standard
--- Purpose : Raised if N < 1.
is redefined static;
Resolution(me; R3d :Real) returns Real
---Purpose : returns the parametric resolution
is redefined static;
GetType(me) returns CurveType from GeomAbs
is redefined static;
Line(me) returns Lin from gp
raises NoSuchObject from Standard
is redefined static;
Circle(me) returns Circ from gp
raises NoSuchObject from Standard
is redefined static;
Ellipse(me) returns Elips from gp
raises NoSuchObject from Standard
is redefined static;
Hyperbola(me) returns Hypr from gp
raises NoSuchObject from Standard
is redefined static;
Parabola(me) returns Parab from gp
raises NoSuchObject from Standard
is redefined static;
Degree(me) returns Integer
raises NoSuchObject from Standard
is redefined static;
IsRational(me) returns Boolean
raises
NoSuchObject from Standard
is redefined static;
NbPoles(me) returns Integer
raises NoSuchObject from Standard
is redefined static;
NbKnots(me) returns Integer
raises
NoSuchObject from Standard
is redefined static;
Bezier(me) returns BezierCurve from Geom
---Warning :
-- This will make a copy of the Bezier Curve .
-- Be carefull when using this method
raises
NoSuchObject from Standard
is redefined static;
BSpline(me) returns BSplineCurve from Geom
---Warning : This will make a copy of the BSpline Curve. Be
-- carefull when using this method
raises
NoSuchObject from Standard
is redefined static;
Prepare(me; W, D: in out Real; ind : in out Integer)
is private;
InvPrepare(me; ind : Integer; F, D: in out Real)
is private;
fields
myWire : Wire from TopoDS;
TFirst, TLast, PTol, myPeriod : Real;
myCurves : HArray1OfCurve from BRepAdaptor;
myKnots : HArray1OfReal from TColStd;
CurIndex : Integer;
Forward : Boolean;
IsbyAC : Boolean;
Periodic : Boolean;
end CompCurve;

View File

@@ -14,18 +14,33 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepAdaptor_CompCurve.ixx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#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 <BRepTools_WireExplorer.hxx>
#include <TopAbs_Orientation.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <ElCLib.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Hypr.hxx>
#include <gp_Lin.hxx>
#include <gp_Parab.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopExp.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve()
: TFirst (0.0),

View File

@@ -0,0 +1,217 @@
// Created on: 1998-08-20
// Created by: Philippe MANGIN
// Copyright (c) 1998-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_CompCurve_HeaderFile
#define _BRepAdaptor_CompCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Wire.hxx>
#include <Standard_Real.hxx>
#include <BRepAdaptor_HArray1OfCurve.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Adaptor3d_Curve.hxx>
#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;
class gp_Circ;
class gp_Elips;
class gp_Hypr;
class gp_Parab;
class Geom_BezierCurve;
class Geom_BSplineCurve;
//! The Curve from BRepAdaptor allows to use a Wire
//! of the BRep topology like a 3D curve.
//! Warning: With this class of curve, C0 and C1 continuities
//! are not assumed. So be carful with some algorithm!
class BRepAdaptor_CompCurve : public Adaptor3d_Curve
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined Curve with no Wire loaded.
Standard_EXPORT BRepAdaptor_CompCurve();
Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa = Standard_False);
//! Creates a Curve to acces to the geometry of edge
//! <W>.
Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
//! Sets the wire <W>.
Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa);
//! Sets wire <W> and trimmed parameter.
Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
//! Set the flag Periodic.
//! Warning: This method has no effect if the wire is not closed
Standard_EXPORT void SetPeriodic (const Standard_Boolean Periodic);
//! Returns the wire.
Standard_EXPORT const TopoDS_Wire& Wire() const;
//! returns an edge and one parameter on them
//! corresponding to the parameter U.
Standard_EXPORT void Edge (const Standard_Real U, TopoDS_Edge& E, Standard_Real& UonE) const;
Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>. May be one if Continuity(me) >= <S>
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Returns a curve equivalent of <me> between
//! 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 Standard_Boolean IsClosed() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
//! Computes the point of parameter U.
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve
//! with its first derivative.
//! Raised if the continuity of the current interval
//! is not C1.
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first and second
//! derivatives V1 and V2.
//! Raised if the continuity of the current interval
//! is not C2.
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first, the second
//! and the third derivative.
//! Raised if the continuity of the current interval
//! is not C3.
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
//! The returned vector gives the value of the derivative for the
//! order of derivation N.
//! Raised if the continuity of the current interval
//! is not CN.
//! Raised if N < 1.
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
//! returns the parametric resolution
Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
Standard_EXPORT void Prepare (Standard_Real& W, Standard_Real& D, Standard_Integer& ind) const;
Standard_EXPORT void InvPrepare (const Standard_Integer ind, Standard_Real& F, Standard_Real& D) const;
TopoDS_Wire myWire;
Standard_Real TFirst;
Standard_Real TLast;
Standard_Real PTol;
Standard_Real myPeriod;
Handle(BRepAdaptor_HArray1OfCurve) myCurves;
Handle(TColStd_HArray1OfReal) myKnots;
Standard_Integer CurIndex;
Standard_Boolean Forward;
Standard_Boolean IsbyAC;
Standard_Boolean Periodic;
};
#endif // _BRepAdaptor_CompCurve_HeaderFile

View File

@@ -1,302 +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.
class Curve from BRepAdaptor inherits Curve from Adaptor3d
---Purpose: The Curve from BRepAdaptor allows to use an Edge
-- of the BRep topology like a 3D curve.
--
-- It has the methods the class Curve from Adaptor3d.
--
-- It is created or Initialized with an Edge. It
-- takes into account local coordinate systems. If
-- the Edge has a 3D curve it is use with priority.
-- If the edge has no 3D curve one of the curves on
-- surface is used. It is possible to enforce using a
-- curve on surface by creating or initialising with
-- an Edge and a Face.
uses
Edge from TopoDS,
Face from TopoDS,
CurveType from GeomAbs,
Shape from GeomAbs,
HCurve from Adaptor3d,
Curve from GeomAdaptor,
CurveOnSurface from Adaptor3d,
HCurveOnSurface from Adaptor3d,
BezierCurve from Geom,
BSplineCurve from Geom,
Array1OfReal from TColStd,
Trsf from gp,
Pnt from gp,
Vec from gp,
Circ from gp,
Elips from gp,
Hypr from gp,
Parab from gp,
Lin from gp
raises
NullObject from Standard,
DomainError from Standard,
OutOfRange from Standard,
NoSuchObject from Standard
is
Create returns Curve from BRepAdaptor;
---Purpose: Creates an undefined Curve with no Edge loaded.
Create(E : Edge from TopoDS) returns Curve from BRepAdaptor;
---Purpose: Creates a Curve to acces to the geometry of edge
-- <E>.
Create(E : Edge from TopoDS; F : Face from TopoDS)
returns Curve from BRepAdaptor;
---Purpose: Creates a Curve to acces to the geometry of edge
-- <E>. The geometry will be computed using the
-- parametric curve of <E> on the face <F>. An Error
-- is raised if the edge does not have a pcurve on
-- the face.
Initialize(me : in out; E : Edge from TopoDS)
---Purpose: Sets the Curve <me> to acces to the geometry of
-- edge <E>.
is static;
Initialize(me : in out; E : Edge from TopoDS; F : Face from TopoDS)
---Purpose: Sets the Curve <me> to acces to the geometry of
-- edge <E>. The geometry will be computed using the
-- parametric curve of <E> on the face <F>. An Error
-- is raised if the edge does not have a pcurve on
-- the face.
raises DomainError from Standard
is static;
Trsf(me) returns Trsf from gp
---Purpose: Returns the coordinate system of the curve.
---C++: return const &
is static;
Is3DCurve(me) returns Boolean
---Purpose: Returns True if the edge geometry is computed from
-- a 3D curve.
is static;
IsCurveOnSurface(me) returns Boolean
---Purpose: Returns True if the edge geometry is computed from
-- a pcurve on a surface.
is static;
Curve(me) returns Curve from GeomAdaptor
---Purpose: Returns the Curve of the edge.
---C++: return const &
is static;
CurveOnSurface(me) returns CurveOnSurface from Adaptor3d
---Purpose: Returns the CurveOnSurface of the edge.
---C++: return const &
is static;
Edge(me) returns Edge from TopoDS
---Purpose: Returns the edge.
--
---C++: return const &
is static;
Tolerance(me) returns Real
---Purpose: Returns the edge tolerance.
--
is static;
--
-- Methods of Curve from GeomAdaptor.
--
FirstParameter(me) returns Real
is redefined static;
LastParameter(me) returns Real
is redefined static;
Continuity(me) returns Shape from GeomAbs
is redefined static;
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
is redefined static;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.
--
-- The array must provide enough room to accomodate
-- for the parameters. i.e. T.Length() > NbIntervals()
raises
OutOfRange from Standard
is redefined static;
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
---Purpose: Returns a curve equivalent of <me> between
-- parameters <First> and <Last>. <Tol> is used to
-- test for 3d points confusion.
raises
OutOfRange from Standard
---Purpose: If <First> >= <Last>
is redefined static;
IsClosed(me) returns Boolean
is redefined static;
IsPeriodic(me) returns Boolean
is redefined static;
Period(me) returns Real
raises
DomainError from Standard -- if the curve is not periodic
is redefined static;
Value(me; U : Real) returns Pnt from gp
--- Purpose : Computes the point of parameter U on the curve
is redefined static;
D0 (me; U : Real; P : out Pnt from gp)
--- Purpose : Computes the point of parameter U.
is redefined static;
D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
--- Purpose : Computes the point of parameter U on the curve
-- with its first derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C1.
is redefined static;
D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
--- Purpose :
-- Returns the point P of parameter U, the first and second
-- derivatives V1 and V2.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C2.
is redefined static;
D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
--- Purpose :
-- Returns the point P of parameter U, the first, the second
-- and the third derivative.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current interval
-- is not C3.
is redefined static;
DN (me; U : Real; N : Integer) returns Vec from gp
--- Purpose :
-- The returned vector gives the value of the derivative for the
-- order of derivation N.
raises
DomainError from Standard,
--- Purpose : Raised if the continuity of the current interval
-- is not CN.
OutOfRange from Standard
--- Purpose : Raised if N < 1.
is redefined static;
Resolution(me; R3d :Real) returns Real
---Purpose : returns the parametric resolution
is redefined static;
GetType(me) returns CurveType from GeomAbs
is redefined static;
Line(me) returns Lin from gp
raises NoSuchObject from Standard
is redefined static;
Circle(me) returns Circ from gp
raises NoSuchObject from Standard
is redefined static;
Ellipse(me) returns Elips from gp
raises NoSuchObject from Standard
is redefined static;
Hyperbola(me) returns Hypr from gp
raises NoSuchObject from Standard
is redefined static;
Parabola(me) returns Parab from gp
raises NoSuchObject from Standard
is redefined static;
Degree(me) returns Integer
raises NoSuchObject from Standard
is redefined static;
IsRational(me) returns Boolean
raises
NoSuchObject from Standard
is redefined static;
NbPoles(me) returns Integer
raises NoSuchObject from Standard
is redefined static;
NbKnots(me) returns Integer
raises
NoSuchObject from Standard
is redefined static;
Bezier(me) returns BezierCurve from Geom
---Purpose:
-- Warning :
-- This will make a copy of the Bezier Curve
-- since it applies to it myTsrf . Be carefull when
-- using this method
raises
NoSuchObject from Standard
is redefined static;
BSpline(me) returns BSplineCurve from Geom
---Purpose:
-- Warning :
-- This will make a copy of the BSpline Curve
-- since it applies to it myTsrf . Be carefull when
-- using this method
raises
NoSuchObject from Standard
is redefined static;
fields
myTrsf : Trsf from gp;
myCurve : Curve from GeomAdaptor;
myConSurf : HCurveOnSurface from Adaptor3d;
myEdge : Edge from TopoDS;
end Curve;

View File

@@ -14,23 +14,39 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepAdaptor_Curve.ixx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.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 <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Hypr.hxx>
#include <gp_Lin.hxx>
#include <gp_Parab.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
//=======================================================================
//function : BRepAdaptor_Curve
//purpose :
//=======================================================================
BRepAdaptor_Curve::BRepAdaptor_Curve()
{}

View File

@@ -0,0 +1,250 @@
// 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_Curve_HeaderFile
#define _BRepAdaptor_Curve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_Trsf.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Edge.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_CurveType.hxx>
class Adaptor3d_HCurveOnSurface;
class Standard_NullObject;
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopoDS_Edge;
class TopoDS_Face;
class gp_Trsf;
class GeomAdaptor_Curve;
class Adaptor3d_CurveOnSurface;
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;
//! The Curve from BRepAdaptor allows to use an Edge
//! of the BRep topology like a 3D curve.
//!
//! It has the methods the class Curve from Adaptor3d.
//!
//! It is created or Initialized with an Edge. It
//! takes into account local coordinate systems. If
//! the Edge has a 3D curve it is use with priority.
//! If the edge has no 3D curve one of the curves on
//! surface is used. It is possible to enforce using a
//! curve on surface by creating or initialising with
//! an Edge and a Face.
class BRepAdaptor_Curve : public Adaptor3d_Curve
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined Curve with no Edge loaded.
Standard_EXPORT BRepAdaptor_Curve();
//! Creates a Curve to acces to the geometry of edge
//! <E>.
Standard_EXPORT BRepAdaptor_Curve(const TopoDS_Edge& E);
//! Creates a Curve to acces to the geometry of edge
//! <E>. The geometry will be computed using the
//! parametric curve of <E> on the face <F>. An Error
//! is raised if the edge does not have a pcurve on
//! the face.
Standard_EXPORT BRepAdaptor_Curve(const TopoDS_Edge& E, const TopoDS_Face& F);
//! Sets the Curve <me> to acces to the geometry of
//! edge <E>.
Standard_EXPORT void Initialize (const TopoDS_Edge& E);
//! Sets the Curve <me> to acces to the geometry of
//! edge <E>. The geometry will be computed using the
//! parametric curve of <E> on the face <F>. An Error
//! is raised if the edge does not have a pcurve on
//! the face.
Standard_EXPORT void Initialize (const TopoDS_Edge& E, const TopoDS_Face& F);
//! Returns the coordinate system of the curve.
Standard_EXPORT const gp_Trsf& Trsf() const;
//! Returns True if the edge geometry is computed from
//! a 3D curve.
Standard_EXPORT Standard_Boolean Is3DCurve() const;
//! Returns True if the edge geometry is computed from
//! a pcurve on a surface.
Standard_EXPORT Standard_Boolean IsCurveOnSurface() const;
//! Returns the Curve of the edge.
Standard_EXPORT const GeomAdaptor_Curve& Curve() const;
//! Returns the CurveOnSurface of the edge.
Standard_EXPORT const Adaptor3d_CurveOnSurface& CurveOnSurface() const;
//! Returns the edge.
Standard_EXPORT const TopoDS_Edge& Edge() const;
//! Returns the edge tolerance.
Standard_EXPORT Standard_Real Tolerance() const;
Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
//! Returns the number of intervals for continuity
//! <S>. May be one if Continuity(me) >= <S>
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Stores in <T> the parameters bounding the intervals
//! of continuity <S>.
//!
//! The array must provide enough room to accomodate
//! for the parameters. i.e. T.Length() > NbIntervals()
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Returns a curve equivalent of <me> between
//! 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 Standard_Boolean IsClosed() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
//! Computes the point of parameter U.
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
//! Computes the point of parameter U on the curve
//! with its first derivative.
//! Raised if the continuity of the current interval
//! is not C1.
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first and second
//! derivatives V1 and V2.
//! Raised if the continuity of the current interval
//! is not C2.
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
//! Returns the point P of parameter U, the first, the second
//! and the third derivative.
//! Raised if the continuity of the current interval
//! is not C3.
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
//! The returned vector gives the value of the derivative for the
//! order of derivation N.
//! Raised if the continuity of the current interval
//! is not CN.
//! Raised if N < 1.
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
//! returns the parametric resolution
Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
//! Warning :
//! This will make a copy of the Bezier Curve
//! since it applies to it myTsrf . Be carefull when
//! using this method
Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
//! Warning :
//! This will make a copy of the BSpline Curve
//! since it applies to it myTsrf . Be carefull when
//! using this method
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
protected:
private:
gp_Trsf myTrsf;
GeomAdaptor_Curve myCurve;
Handle(Adaptor3d_HCurveOnSurface) myConSurf;
TopoDS_Edge myEdge;
};
#endif // _BRepAdaptor_Curve_HeaderFile

View File

@@ -1,71 +0,0 @@
-- Created on: 1993-07-13
-- 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.
class Curve2d from BRepAdaptor inherits Curve from Geom2dAdaptor
---Purpose: The Curve2d from BRepAdaptor allows to use an Edge
-- on a Face like a 2d curve. (curve in the
-- parametric space).
--
-- It has the methods of the class Curve2d from
-- Adpator.
--
-- It is created or initialized with a Face and an
-- Edge. The methods are inherited from Curve from
-- Geom2dAdaptor.
uses
Face from TopoDS,
Edge from TopoDS
raises
NullObject from Standard
is
Create returns Curve2d from BRepAdaptor;
---Purpose: Creates an uninitialized curve2d.
Create(E : Edge from TopoDS; F : Face from TopoDS)
returns Curve2d from BRepAdaptor
---Purpose: Creates with the pcurve of <E> on <F>.
raises
NullObject from Standard; -- if <E> has no pcurve on <F>
Initialize(me : in out; E : Edge from TopoDS; F : Face from TopoDS)
---Purpose: Initialize with the pcurve of <E> on <F>.
raises
NullObject from Standard -- if <E> has no pcurve on <F>
is static;
Edge(me) returns Edge from TopoDS
---Purpose: Returns the Edge.
--
---C++: return const &
is static;
Face(me) returns Face from TopoDS
---Purpose: Returns the Face.
--
---C++: return const &
is static;
fields
myEdge : Edge from TopoDS;
myFace : Face from TopoDS;
end Curve2d;

View File

@@ -14,14 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepAdaptor_Curve2d.ixx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <Standard_NullObject.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
//=======================================================================
//function : BRepAdaptor_Curve2d
//purpose :
//=======================================================================
BRepAdaptor_Curve2d::BRepAdaptor_Curve2d()
{
}

View File

@@ -0,0 +1,89 @@
// Created on: 1993-07-13
// 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_Curve2d_HeaderFile
#define _BRepAdaptor_Curve2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <Geom2dAdaptor_Curve.hxx>
class Standard_NullObject;
class TopoDS_Edge;
class TopoDS_Face;
//! The Curve2d from BRepAdaptor allows to use an Edge
//! on a Face like a 2d curve. (curve in the
//! parametric space).
//!
//! It has the methods of the class Curve2d from
//! Adpator.
//!
//! It is created or initialized with a Face and an
//! Edge. The methods are inherited from Curve from
//! Geom2dAdaptor.
class BRepAdaptor_Curve2d : public Geom2dAdaptor_Curve
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an uninitialized curve2d.
Standard_EXPORT BRepAdaptor_Curve2d();
//! Creates with the pcurve of <E> on <F>.
Standard_EXPORT BRepAdaptor_Curve2d(const TopoDS_Edge& E, const TopoDS_Face& F);
//! Initialize with the pcurve of <E> on <F>.
Standard_EXPORT void Initialize (const TopoDS_Edge& E, const TopoDS_Face& F);
//! Returns the Edge.
Standard_EXPORT const TopoDS_Edge& Edge() const;
//! Returns the Face.
Standard_EXPORT const TopoDS_Face& Face() const;
protected:
private:
TopoDS_Edge myEdge;
TopoDS_Face myFace;
};
#endif // _BRepAdaptor_Curve2d_HeaderFile

View File

@@ -0,0 +1,89 @@
// 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:
Standard_EXPORT BRepAdaptor_HCompCurve();
Standard_EXPORT BRepAdaptor_HCompCurve(const BRepAdaptor_CompCurve& C);
Standard_EXPORT void Set (const BRepAdaptor_CompCurve& C);
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
Standard_EXPORT Adaptor3d_Curve& GetCurve();
BRepAdaptor_CompCurve& ChangeCurve();
DEFINE_STANDARD_RTTI(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

@@ -0,0 +1,42 @@
// 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

@@ -0,0 +1,89 @@
// 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:
Standard_EXPORT BRepAdaptor_HCurve();
Standard_EXPORT BRepAdaptor_HCurve(const BRepAdaptor_Curve& C);
Standard_EXPORT void Set (const BRepAdaptor_Curve& C);
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
Standard_EXPORT Adaptor3d_Curve& GetCurve();
BRepAdaptor_Curve& ChangeCurve();
DEFINE_STANDARD_RTTI(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

@@ -0,0 +1,87 @@
// 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:
Standard_EXPORT BRepAdaptor_HCurve2d();
Standard_EXPORT BRepAdaptor_HCurve2d(const BRepAdaptor_Curve2d& C);
Standard_EXPORT void Set (const BRepAdaptor_Curve2d& C);
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
BRepAdaptor_Curve2d& ChangeCurve2d();
DEFINE_STANDARD_RTTI(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

@@ -0,0 +1,42 @@
// 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

@@ -0,0 +1,42 @@
// 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

@@ -0,0 +1,87 @@
// 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:
Standard_EXPORT BRepAdaptor_HSurface();
Standard_EXPORT BRepAdaptor_HSurface(const BRepAdaptor_Surface& S);
Standard_EXPORT void Set (const BRepAdaptor_Surface& S);
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
BRepAdaptor_Surface& ChangeSurface();
DEFINE_STANDARD_RTTI(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

@@ -0,0 +1,42 @@
// 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

@@ -1,416 +0,0 @@
-- Created on: 1993-02-22
-- 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.
class Surface from BRepAdaptor inherits Surface from Adaptor3d
---Purpose: The Surface from BRepAdaptor allows to use a Face
-- of the BRep topology look like a 3D surface.
--
-- It has the methods of the class Surface from
-- Adaptor3d.
--
-- It is created or initialized with a Face. It takes
-- into account the local coordinates system.
--
-- The u,v parameter range is the minmax value for
-- the restriction, unless the flag restriction is
-- set to false.
uses
Face from TopoDS,
SurfaceType from GeomAbs,
HSurface from Adaptor3d,
HCurve from Adaptor3d,
Surface from GeomAdaptor,
Shape from GeomAbs,
BezierSurface from Geom,
BSplineSurface from Geom,
Trsf from gp,
Pnt from gp,
Vec from gp,
Dir from gp,
Pln from gp,
Cylinder from gp,
Sphere from gp,
Torus from gp,
Cone from gp,
Ax1 from gp,
Array1OfReal from TColStd
raises
OutOfRange from Standard,
DomainError from Standard,
NoSuchObject from Standard
is
Create returns Surface from BRepAdaptor;
---Purpose: Creates an undefined surface with no face loaded.
Create(F : Face from TopoDS;
R : Boolean = Standard_True)
returns Surface from BRepAdaptor;
---Purpose: Creates a surface to access the geometry of <F>.
-- If <Restriction> is true the parameter range is
-- the parameter range in the UV space of the
-- restriction.
Initialize(me : in out; F : Face from TopoDS;
Restriction : Boolean = Standard_True)
---Purpose: Sets the surface to the geometry of <F>.
is static;
Surface(me) returns Surface from GeomAdaptor
---Purpose: Returns the surface.
--
---C++: return const &
is static;
ChangeSurface(me : in out) returns Surface from GeomAdaptor
---Purpose: Returns the surface.
--
---C++: return &
is static;
Trsf(me) returns Trsf from gp
---Purpose: Returns the surface coordinate system.
--
---C++: return const &
is static;
Face(me) returns Face from TopoDS
---Purpose: Returns the face.
--
---C++: return const &
is static;
Tolerance(me) returns Real
---Purpose: Returns the face tolerance.
--
is static;
--
-- Methods of Surface from GeomAdaptor
--
FirstUParameter(me) returns Real
---C++:inline
is redefined static;
LastUParameter(me) returns Real
---C++:inline
is redefined static;
FirstVParameter(me) returns Real
---C++:inline
is redefined static;
LastVParameter(me) returns Real
---C++:inline
is redefined static;
UContinuity(me) returns Shape from GeomAbs
---C++:inline
is redefined static;
VContinuity(me) returns Shape from GeomAbs
---C++:inline
is redefined static;
NbUIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: If necessary, breaks the surface in U intervals of
-- continuity <S>. And returns the number of
-- intervals.
---C++:inline
is redefined static;
NbVIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: If necessary, breaks the surface in V intervals of
-- continuity <S>. And returns the number of
-- intervals.
---C++:inline
is redefined static;
UIntervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs )
---Purpose: Returns the intervals with the requested continuity
-- in the U direction.
raises
OutOfRange from Standard -- if the Length of the array does
-- have enought slots to accomodate
-- the result.
is redefined static;
VIntervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs )
---Purpose: Returns the intervals with the requested continuity
-- in the V direction.
raises
OutOfRange from Standard -- if the Length of the array does
-- have enought slots to accomodate
-- the result.
is redefined static;
UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
---Purpose: Returns a surface trimmed in the U direction
-- equivalent of <me> between
-- parameters <First> and <Last>. <Tol> is used to
-- test for 3d points confusion.
raises
OutOfRange from Standard
---Purpose: If <First> >= <Last>
is redefined static ;
VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
---Purpose: Returns a surface trimmed in the V direction between
-- parameters <First> and <Last>. <Tol> is used to
-- test for 3d points confusion.
raises
OutOfRange from Standard
---Purpose: If <First> >= <Last>
is redefined static ;
IsUClosed(me) returns Boolean
---C++:inline
is redefined static;
IsVClosed(me) returns Boolean
---C++:inline
is redefined static;
IsUPeriodic(me) returns Boolean
---C++:inline
is redefined static;
UPeriod(me) returns Real
raises
DomainError from Standard -- if the curve is not periodic
---C++:inline
is redefined static;
IsVPeriodic(me) returns Boolean
---C++:inline
is redefined static;
VPeriod(me) returns Real
---C++:inline
raises
DomainError from Standard -- if the curve is not periodic
is redefined static;
Value (me; U, V : Real) returns Pnt from gp
--- Purpose : Computes the point of parameters U,V on the surface.
is redefined static;
D0 (me; U, V : Real; P : out Pnt from gp)
--- Purpose : Computes the point of parameters U,V on the surface.
is redefined static;
D1 (me; U, V : Real;
P : out Pnt from gp;
D1U, D1V : out Vec from gp)
--- Purpose : Computes the point and the first derivatives on
-- the surface.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current
-- intervals is not C1.
is redefined static;
D2 (me; U, V : Real;
P : out Pnt from gp;
D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
--- Purpose : Computes the point, the first and second
-- derivatives on the surface.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current
-- intervals is not C2.
is redefined static;
D3 (me; U, V : Real; P : out Pnt from gp;
D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
--- Purpose : Computes the point, the first, second and third
-- derivatives on the surface.
raises
DomainError from Standard
--- Purpose : Raised if the continuity of the current
-- intervals is not C3.
is redefined static;
DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
--- Purpose : Computes the derivative of order Nu in the direction
-- U and Nv in the direction V at the point P(U, V).
raises
DomainError from Standard,
--- Purpose : Raised if the current U interval is not not CNu
-- and the current V interval is not CNv.
OutOfRange from Standard
--- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
is redefined static;
UResolution(me; R3d : Real ) returns Real
---Purpose : Returns the parametric U resolution corresponding
-- to the real space resolution <R3d>.
--
---C++:inline
is redefined static;
VResolution(me; R3d : Real ) returns Real
---Purpose : Returns the parametric V resolution corresponding
-- to the real space resolution <R3d>.
--
---C++:inline
is redefined static;
GetType(me) returns SurfaceType from GeomAbs
---Purpose: Returns the type of the surface : Plane, Cylinder,
-- Cone, Sphere, Torus, BezierSurface,
-- BSplineSurface, SurfaceOfRevolution,
-- SurfaceOfExtrusion, OtherSurface
---C++:inline
is redefined static;
Plane(me) returns Pln from gp
raises NoSuchObject from Standard
is redefined static;
Cylinder(me) returns Cylinder from gp
raises NoSuchObject from Standard
is redefined static;
Cone(me) returns Cone from gp
raises NoSuchObject from Standard
is redefined static;
Sphere(me) returns Sphere from gp
raises NoSuchObject from Standard
is redefined static;
Torus(me) returns Torus from gp
raises NoSuchObject from Standard
is redefined static;
UDegree(me) returns Integer
raises NoSuchObject from Standard
---C++:inline
is redefined static;
NbUPoles(me) returns Integer
raises NoSuchObject from Standard
---C++:inline
is redefined static;
VDegree(me) returns Integer
raises NoSuchObject from Standard
---C++:inline
is redefined static;
NbVPoles(me) returns Integer
raises NoSuchObject from Standard
---C++:inline
is redefined static;
NbUKnots(me) returns Integer
raises
NoSuchObject from Standard
---C++:inline
is redefined static;
NbVKnots(me) returns Integer
raises
NoSuchObject from Standard
---C++:inline
is redefined static;
IsURational(me) returns Boolean
raises
NoSuchObject from Standard
---C++:inline
is redefined static;
IsVRational(me) returns Boolean
raises
NoSuchObject from Standard
---C++:inline
is redefined static;
Bezier(me) returns BezierSurface from Geom
---Purpose:
--Warning : this will make a copy of the
-- Bezier Surface since it applies
-- to it the myTsrf transformation
-- Be Carefull when using this method
raises
NoSuchObject from Standard
is redefined static;
BSpline(me) returns BSplineSurface from Geom
---Purpose:
-- Warning : this will make a copy of the
-- BSpline Surface since it applies
-- to it the myTsrf transformation
-- Be Carefull when using this method
raises
NoSuchObject from Standard
is redefined static;
AxeOfRevolution(me) returns Ax1 from gp
raises
NoSuchObject from Standard -- only for SurfaceOfRevolution
is redefined static;
Direction(me) returns Dir from gp
raises
NoSuchObject from Standard -- only for SurfaceOfExtrusion
is redefined static;
BasisCurve(me) returns HCurve from Adaptor3d
raises
NoSuchObject from Standard
---Purpose: 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.
is redefined static;
BasisSurface(me) returns HSurface from Adaptor3d
raises
NoSuchObject from Standard -- only for Offset Surface
is redefined static;
OffsetValue(me) returns Real from Standard
raises
NoSuchObject from Standard -- only for Offset Surface
is redefined static;
fields
mySurf : Surface from GeomAdaptor;
myTrsf : Trsf from gp;
myFace : Face from TopoDS;
end Surface;

View File

@@ -14,20 +14,37 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepAdaptor_Surface.ixx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepTools.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <gp_Ax1.hxx>
#include <gp_Cone.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Dir.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Sphere.hxx>
#include <gp_Torus.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <TopoDS_Face.hxx>
//=======================================================================
//function : BRepAdaptor_Surface
//purpose :
//=======================================================================
BRepAdaptor_Surface::BRepAdaptor_Surface()
{
}

View File

@@ -0,0 +1,277 @@
// Created on: 1993-02-22
// 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_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 <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GeomAbs_SurfaceType.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;
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;
//! The Surface from BRepAdaptor allows to use a Face
//! of the BRep topology look like a 3D surface.
//!
//! It has the methods of the class Surface from
//! Adaptor3d.
//!
//! It is created or initialized with a Face. It takes
//! into account the local coordinates system.
//!
//! The u,v parameter range is the minmax value for
//! the restriction, unless the flag restriction is
//! set to false.
class BRepAdaptor_Surface : public Adaptor3d_Surface
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an undefined surface with no face loaded.
Standard_EXPORT BRepAdaptor_Surface();
//! Creates a surface to access the geometry of <F>.
//! If <Restriction> is true the parameter range is
//! the parameter range in the UV space of the
//! restriction.
Standard_EXPORT BRepAdaptor_Surface(const TopoDS_Face& F, const Standard_Boolean R = Standard_True);
//! Sets the surface to the geometry of <F>.
Standard_EXPORT void Initialize (const TopoDS_Face& F, const Standard_Boolean Restriction = Standard_True);
//! Returns the surface.
Standard_EXPORT const GeomAdaptor_Surface& Surface() const;
//! Returns the surface.
Standard_EXPORT GeomAdaptor_Surface& ChangeSurface();
//! Returns the surface coordinate system.
Standard_EXPORT const gp_Trsf& Trsf() const;
//! Returns the face.
Standard_EXPORT const TopoDS_Face& Face() const;
//! 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;
//! 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;
//! 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;
//! Returns the intervals with the requested continuity
//! in the U direction.
Standard_EXPORT void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Returns the intervals with the requested continuity
//! in the V direction.
Standard_EXPORT void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
//! Returns a surface trimmed in the U direction
//! equivalent of <me> between
//! 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;
//! 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;
//! 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;
//! Computes the point of parameters U,V on the surface.
Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE;
//! Computes the point and the first derivatives on
//! the surface.
//! Raised if the continuity of the current
//! intervals is not C1.
Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE;
//! Computes the point, the first and second
//! derivatives on the surface.
//! Raised if the continuity of the current
//! intervals is not C2.
Standard_EXPORT 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 Standard_OVERRIDE;
//! Computes the point, the first, second and third
//! derivatives on the surface.
//! Raised if the continuity of the current
//! intervals is not C3.
Standard_EXPORT 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 Standard_OVERRIDE;
//! Computes the derivative of order Nu in the direction
//! U and Nv in the direction V at the point P(U, V).
//! Raised if the current U interval is not not CNu
//! and the current V interval is not CNv.
//! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const Standard_OVERRIDE;
//! Returns the parametric U resolution corresponding
//! to the real space resolution <R3d>.
Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE;
//! Returns the parametric V resolution corresponding
//! to the real space resolution <R3d>.
Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE;
//! Returns the type of the surface : Plane, Cylinder,
//! Cone, Sphere, Torus, BezierSurface,
//! BSplineSurface, SurfaceOfRevolution,
//! SurfaceOfExtrusion, OtherSurface
GeomAbs_SurfaceType GetType() const Standard_OVERRIDE;
Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE;
Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE;
Standard_EXPORT gp_Cone Cone() const Standard_OVERRIDE;
Standard_EXPORT gp_Sphere Sphere() const Standard_OVERRIDE;
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;
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
Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE;
Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE;
Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE;
//! 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;
Standard_EXPORT Handle(Adaptor3d_HSurface) 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,2 +1,19 @@
BRepAdaptor_Array1OfCurve.hxx
BRepAdaptor_CompCurve.cxx
BRepAdaptor_CompCurve.hxx
BRepAdaptor_Curve.cxx
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