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

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

47
src/BRepApprox/BRepApprox.cdl Executable file
View File

@@ -0,0 +1,47 @@
-- File: BRepApprox.cdl
-- Created: Tue Jun 6 16:58:22 1995
-- Author: Jean Yves LEBEY
-- <jyl@meteox>
---Copyright: Matra Datavision 1995
package BRepApprox
---Purpose: This package provides services on intersection curves
-- dealt by topological operations on BRep objects.
-- Services are approximation services.
uses
MMgt,
TColStd,
gp,
GeomAbs,
Adaptor3d,
Geom,
Geom2d,
BRepAdaptor,
IntSurf,
ApproxInt
is
generic class ApproxLineGen;
class ApproxLine instantiates ApproxLineGen from BRepApprox
(BSplineCurve from Geom,
BSplineCurve from Geom2d);
generic class SurfaceToolGen;
class SurfaceTool instantiates SurfaceToolGen from BRepApprox
(Surface from BRepAdaptor);
class Approx instantiates Approx from ApproxInt
(Surface from BRepAdaptor,
SurfaceTool from BRepApprox,
Quadric from IntSurf,
QuadricTool from IntSurf,
ApproxLine from BRepApprox);
end BRepApprox;

View File

@@ -0,0 +1,46 @@
-- File: BRepApprox_ApproxLineGen.cdl
-- Created: Thu Jul 20 15:08:07 1995
-- Author: Modelistation
-- <model@meteox>
---Copyright: Matra Datavision 1995
generic class ApproxLineGen from BRepApprox
(TheCurve as any;
TheCurve2d as any)
inherits TShared from MMgt
uses
PntOn2S from IntSurf,
LineOn2S from IntSurf
is
Create(CurveXYZ: TheCurve;
CurveUV1: TheCurve2d;
CurveUV2: TheCurve2d)
returns mutable ApproxLineGen from BRepApprox;
Create(lin: LineOn2S from IntSurf; Tang: Boolean from Standard)
returns mutable ApproxLineGen from BRepApprox;
NbPnts(me)
returns Integer from Standard
is static;
Point(me: mutable; Index: Integer from Standard)
returns PntOn2S from IntSurf
is static;
fields
curvxyz : TheCurve;
curvuv1 : TheCurve2d;
curvuv2 : TheCurve2d;
pnton2s : PntOn2S from IntSurf;
linon2s : LineOn2S from IntSurf;
end ApproxLineGen from BRepApprox;

View File

@@ -0,0 +1,80 @@
// File: BRepApprox_ApproxLineGen.gxx
// Created: Thu Jul 20 15:25:47 1995
// Author: Modelistation
// <model@meteox>
#include <gp_Pnt2d.hxx>
//=======================================================================
//function : BRepApprox_ApproxLineGen
//purpose :
//=======================================================================
BRepApprox_ApproxLineGen::BRepApprox_ApproxLineGen
(const TheCurve& CurveXYZ,
const TheCurve2d& CurveUV1,
const TheCurve2d& CurveUV2)
{
curvxyz = CurveXYZ;
curvuv1 = CurveUV1;
curvuv2 = CurveUV2;
}
//=======================================================================
//function : BRepApprox_ApproxLineGen
//purpose :
//=======================================================================
BRepApprox_ApproxLineGen::BRepApprox_ApproxLineGen
(const Handle(IntSurf_LineOn2S)& lin,
const Standard_Boolean )
:linon2s(lin)
{
}
//=======================================================================
//function : NbPnts
//purpose :
//=======================================================================
Standard_Integer BRepApprox_ApproxLineGen::NbPnts() const
{
if(!curvxyz.IsNull())
return(curvxyz->NbPoles());
if(!curvuv1.IsNull())
return(curvuv1->NbPoles());
if(!curvuv2.IsNull())
return(curvuv2->NbPoles());
return(linon2s->NbPoints());
}
//=======================================================================
//function : Point
//purpose :
//=======================================================================
IntSurf_PntOn2S BRepApprox_ApproxLineGen::Point
(const Standard_Integer Index)
{
if(!linon2s.IsNull()) {
if(linon2s->NbPoints()) {
return(linon2s->Value(Index));
}
}
gp_Pnt2d P1,P2;
gp_Pnt P;
if(!curvxyz.IsNull())
P = curvxyz->Pole(Index);
if(!curvuv1.IsNull())
P1 = curvuv1->Pole(Index);
if(!curvuv2.IsNull())
P2 = curvuv2->Pole(Index);
pnton2s.SetValue(P,
P1.X(),
P1.Y(),
P2.X(),
P2.Y());
return(pnton2s);
}

View File

@@ -0,0 +1,232 @@
-- File: BRepApprox_SurfaceToolGen.cdl
-- Created: Thu Jul 20 15:40:02 1995
-- Author: Modelistation
-- <model@meteox>
---Copyright: Matra Datavision 1995
generic class SurfaceToolGen from BRepApprox
(TheSurface as any)
uses
Shape from GeomAbs,
SurfaceType from GeomAbs,
Pln from gp,
Cone from gp,
Cylinder from gp,
Sphere from gp,
Torus from gp,
Pnt from gp,
Vec from gp,
Array1OfReal from TColStd,
BezierSurface from Geom,
BSplineSurface from Geom,
HSurface from Adaptor3d,
HCurve from Adaptor3d,
Ax1 from gp,
Dir from gp
raises
NoSuchObject from Standard,
OutOfRange from Standard
is
FirstUParameter(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
FirstVParameter(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
LastUParameter(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
LastVParameter(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
NbUIntervals(myclass; S: TheSurface;
Sh : Shape from GeomAbs)
---C++: inline
returns Integer from Standard;
NbVIntervals(myclass; S: TheSurface;
Sh : Shape from GeomAbs)
---C++: inline
returns Integer from Standard;
UIntervals(myclass; S : TheSurface;
T : in out Array1OfReal from TColStd;
Sh : Shape from GeomAbs);
---C++: inline
VIntervals(myclass; S : TheSurface;
T : in out Array1OfReal from TColStd;
Sh : Shape from GeomAbs) ;
---C++: inline
UTrim(myclass; S : TheSurface;
First, Last, Tol : Real)
---C++: inline
returns HSurface from Adaptor3d
raises
OutOfRange from Standard;
---Purpose: If <First> >= <Last>
VTrim(myclass; S : TheSurface;
First, Last, Tol : Real)
---C++: inline
returns HSurface from Adaptor3d
raises
OutOfRange from Standard;
---Purpose: If <First> >= <Last>
IsUClosed(myclass; S: TheSurface)
---C++: inline
returns Boolean from Standard;
IsVClosed(myclass; S: TheSurface)
---C++: inline
returns Boolean from Standard;
IsUPeriodic(myclass; S: TheSurface)
---C++: inline
returns Boolean from Standard;
UPeriod(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
IsVPeriodic(myclass; S: TheSurface)
---C++: inline
returns Boolean from Standard;
VPeriod(myclass; S: TheSurface)
---C++: inline
returns Real from Standard;
Value(myclass; S : TheSurface;
u,v : Real from Standard)
---C++: inline
returns Pnt from gp;
D0(myclass; S : TheSurface;
u,v : Real from Standard;
P : out Pnt from gp);
---C++: inline
D1(myclass; S : TheSurface;
u,v : Real from Standard;
P : out Pnt from gp;
D1u,D1v: out Vec from gp);
---C++: inline
D2(myclass; S : TheSurface;
u,v : Real from Standard;
P : out Pnt from gp;
D1U,D1V,D2U,D2V,D2UV: out Vec from gp);
---C++: inline
D3(myclass; S : TheSurface;
u,v : Real from Standard;
P : out Pnt from gp;
D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV: out Vec from gp);
---C++: inline
DN(myclass; S : TheSurface;
u,v : Real from Standard;
Nu,Nv : Integer from Standard)
---C++: inline
returns Vec from gp;
UResolution(myclass; S:TheSurface; R3d: Real from Standard)
---C++: inline
returns Real from Standard;
VResolution(myclass; S:TheSurface; R3d: Real from Standard)
---C++: inline
returns Real from Standard;
GetType(myclass; S: TheSurface)
---C++: inline
returns SurfaceType from GeomAbs;
Plane(myclass; S: TheSurface)
---C++: inline
returns Pln from gp;
Cylinder(myclass; S : TheSurface) returns Cylinder from gp
raises NoSuchObject from Standard;
---C++: inline
Cone(myclass; S : TheSurface) returns Cone from gp
raises NoSuchObject from Standard;
---C++: inline
Torus(myclass; S : TheSurface) returns Torus from gp
raises NoSuchObject from Standard;
---C++: inline
Sphere(myclass; S : TheSurface) returns Sphere from gp
raises NoSuchObject from Standard;
---C++: inline
Bezier(myclass; S : TheSurface) returns BezierSurface from Geom
raises NoSuchObject from Standard;
---C++: inline
BSpline(myclass; S : TheSurface) returns BSplineSurface from Geom
raises NoSuchObject from Standard;
---C++: inline
AxeOfRevolution(myclass; S: TheSurface) returns Ax1 from gp
raises NoSuchObject from Standard;
---C++: inline
Direction(myclass; S: TheSurface) returns Dir from gp
raises NoSuchObject from Standard;
---C++: inline
BasisCurve(myclass; S:TheSurface) returns HCurve from Adaptor3d
raises NoSuchObject from Standard;
---C++: inline
--------------------------------------------------------------------------------
NbSamplesU(myclass; S : TheSurface) returns Integer from Standard;
NbSamplesV(myclass; S : TheSurface) returns Integer from Standard;
NbSamplesU(myclass; S : TheSurface; u1,u2: Real from Standard) returns Integer from Standard;
NbSamplesV(myclass; S : TheSurface; v1,v2: Real from Standard) returns Integer from Standard;
end SurfaceToolGen from BRepApprox ;

View File

@@ -0,0 +1,28 @@
// File: BRepApprox_SurfaceToolGen.gxx
// Created: Thu Jul 20 15:43:10 1995
// Author: Modelistation
// <model@meteox>
#include TheSurface_hxx
Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesU(const TheSurface& S) {
return(10);
}
Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesV(const TheSurface& S) {
return(10);
}
Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesU(const TheSurface& S,
const Standard_Real u1,
const Standard_Real u2) {
return(10);
}
Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesV(const TheSurface& S,
const Standard_Real v1,
const Standard_Real v2) {
return(10);
}

View File

@@ -0,0 +1,225 @@
// File: BRepApprox_SurfaceToolGen.lxx
// Created: Thu Jul 20 15:41:41 1995
// Author: Modelistation
// <model@meteox>
#include TheSurface_hxx
#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 <Handle_Geom_BezierSurface.hxx>
#include <Handle_Geom_BSplineSurface.hxx>
#include <Handle_Adaptor3d_HSurface.hxx>
#include <Handle_Adaptor3d_HCurve.hxx>
inline Standard_Real BRepApprox_SurfaceToolGen::FirstUParameter(const TheSurface& Surf){ return Surf.FirstUParameter(); }
inline Standard_Real BRepApprox_SurfaceToolGen::FirstVParameter(const TheSurface& Surf){ return Surf.FirstVParameter();}
inline Standard_Real BRepApprox_SurfaceToolGen::LastUParameter(const TheSurface& Surf){ return Surf.LastUParameter();}
inline Standard_Real BRepApprox_SurfaceToolGen::LastVParameter(const TheSurface& Surf){ return Surf.LastVParameter();}
inline Standard_Integer BRepApprox_SurfaceToolGen::NbUIntervals(const TheSurface& Surf,
const GeomAbs_Shape S){
return Surf.NbUIntervals(S);
}
inline Standard_Integer BRepApprox_SurfaceToolGen::NbVIntervals(const TheSurface& Surf,
const GeomAbs_Shape S){
return Surf.NbVIntervals(S);
}
inline void BRepApprox_SurfaceToolGen::UIntervals(const TheSurface& Surf,
TColStd_Array1OfReal& Tab,
const GeomAbs_Shape S){
Surf.UIntervals(Tab,S);
}
inline void BRepApprox_SurfaceToolGen::VIntervals(const TheSurface& Surf,
TColStd_Array1OfReal& Tab,
const GeomAbs_Shape S){
Surf.VIntervals(Tab,S);
}
inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::UTrim(const TheSurface& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol) {
return Surf.UTrim(F,L,Tol);
}
inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::VTrim(const TheSurface& Surf,
const Standard_Real F,
const Standard_Real L,
const Standard_Real Tol) {
return Surf.VTrim(F,L,Tol);
}
inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUClosed(const TheSurface& S)
{
return S.IsUClosed();
}
inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVClosed(const TheSurface& S)
{
return S.IsVClosed();
}
inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUPeriodic(const TheSurface& S)
{
return S.IsUPeriodic();
}
inline Standard_Real BRepApprox_SurfaceToolGen::UPeriod(const TheSurface& S)
{
return S.UPeriod();
}
inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVPeriodic(const TheSurface& S)
{
return S.IsVPeriodic();
}
inline Standard_Real BRepApprox_SurfaceToolGen::VPeriod(const TheSurface& S)
{
return S.VPeriod();
}
inline gp_Pnt BRepApprox_SurfaceToolGen::Value(const TheSurface& S,
const Standard_Real U,
const Standard_Real V )
{
return S.Value(U,V);
}
inline void BRepApprox_SurfaceToolGen::D0(const TheSurface& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P)
{
S.D0(U,V,P);
}
inline void BRepApprox_SurfaceToolGen::D1(const TheSurface& 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 BRepApprox_SurfaceToolGen::D2(const TheSurface& 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 BRepApprox_SurfaceToolGen::D3(const TheSurface& 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 BRepApprox_SurfaceToolGen::DN(const TheSurface& 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 BRepApprox_SurfaceToolGen::UResolution(const TheSurface& S,
const Standard_Real R3d)
{
return S.UResolution(R3d);
}
inline Standard_Real BRepApprox_SurfaceToolGen::VResolution(const TheSurface& S,
const Standard_Real R3d)
{
return S.VResolution(R3d);
}
inline GeomAbs_SurfaceType BRepApprox_SurfaceToolGen::GetType(const TheSurface& S )
{
return S.GetType();
}
inline gp_Pln BRepApprox_SurfaceToolGen::Plane(const TheSurface& S)
{
return S.Plane();
}
inline gp_Cylinder BRepApprox_SurfaceToolGen::Cylinder(const TheSurface& S)
{
return S.Cylinder();
}
inline gp_Cone BRepApprox_SurfaceToolGen::Cone(const TheSurface& S)
{
return S.Cone();
}
inline gp_Sphere BRepApprox_SurfaceToolGen::Sphere(const TheSurface& S)
{
return S.Sphere();
}
inline gp_Torus BRepApprox_SurfaceToolGen::Torus(const TheSurface& S)
{
return S.Torus();
}
inline Handle(Geom_BezierSurface) BRepApprox_SurfaceToolGen::Bezier(const TheSurface& S) {
return(S.Bezier());
}
inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceToolGen::BSpline(const TheSurface& S) {
return(S.BSpline());
}
inline gp_Ax1 BRepApprox_SurfaceToolGen::AxeOfRevolution(const TheSurface& S) {
return(S.AxeOfRevolution());
}
inline gp_Dir BRepApprox_SurfaceToolGen::Direction(const TheSurface& S) {
return(S.Direction());
}
inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceToolGen::BasisCurve(const TheSurface& S) {
return(S.BasisCurve());
}