1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +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

4
src/IGESConvGeom/FILES Normal file
View File

@@ -0,0 +1,4 @@
IGESConvGeom.cxx
IGESConvGeom.hxx
IGESConvGeom_GeomBuilder.cxx
IGESConvGeom_GeomBuilder.hxx

View File

@@ -1,96 +0,0 @@
-- Created on: 1994-09-01
-- Created by: Christian CAILLET
-- 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.
package IGESConvGeom
---Purpose : This package is intended to gather geometric conversion which
-- are not immediate but can be used for several purposes :
-- mainly, standard conversion to and from CasCade geometric and
-- topologic data, and adaptations of IGES files as required
-- (as replacing Spline entities to BSpline equivalents).
uses Standard, gp, TColgp, Geom, Geom2d, IGESGeom
is
class GeomBuilder;
---Purpose : basic tool to build curves from IGESGeom (arrays of points,
-- Transformations, evaluation of points in a datum)
SplineCurveFromIGES
(igesent : SplineCurve from IGESGeom;
epscoef, epsgeom : Real;
result : out BSplineCurve from Geom)
returns Integer;
---Purpose : Converts a SplineCurve from IGES to a BSplineCurve from CasCade
-- <epscoef> gives tolerance to consider coefficient to be nul
-- <epsgeom> gives tolerance to consider poles to be equal
-- The returned value is a status with these possible values :
-- - 0 OK, done
-- - 1 the result is not guaranteed to be C0 (with <epsgeom>)
-- - 2 SplineType not processed (allowed : max 3)
-- (no result produced)
-- - 3 error during creation of control points
-- (no result produced)
-- - 4 polynomial equation is not correct (no result produced)
-- - 5 less than one segment (no result produced)
IncreaseCurveContinuity
(curve : BSplineCurve from Geom;
epsgeom : Real;
continuity : Integer = 2) returns Integer;
---Purpose : Tries to increase curve continuity with tolerance <epsgeom>
-- <continuity> is the new desired continuity, can be 1 or 2
-- (more than 2 is considered as 2).
-- Returns the new maximum continuity obtained on all knots.
-- Remark that, for instance with <continuity> = 2, even if not
-- all the knots can be passed to C2, all knots which can be are.
IncreaseCurveContinuity
(curve : BSplineCurve from Geom2d;
epsgeom : Real;
continuity : Integer = 2) returns Integer;
SplineSurfaceFromIGES
(igesent : SplineSurface from IGESGeom;
epscoef, epsgeom : Real;
result : out BSplineSurface from Geom)
returns Integer;
---Purpose : Converts a SplineSurface from IGES to a BSplineSurface from CasCade
-- <epscoef> gives tolerance to consider coefficient to be nul
-- <epsgeom> gives tolerance to consider poles to be equal
-- The returned value is a status with these possible values :
-- - 0 OK, done
-- - 1 the result is not guaranteed to be C0 (with <epsgeom>)
-- - 2 degree is not compatible with code boundary type
-- (warning) but C0 is OK
-- - 3 idem but C0 is not guaranteed (warning)
-- - 4 degree has been determined to be nul, either in U or V
-- (no result produced)
-- - 5 less than one segment in U or V (no result produced)
IncreaseSurfaceContinuity
(surface : BSplineSurface from Geom;
epsgeom : Real;
continuity : Integer = 2) returns Integer;
---Purpose : Tries to increase Surface continuity with tolerance <epsgeom>
-- <continuity> is the new desired continuity, can be 1 or 2
-- (more than 2 is considered as 2).
-- Returns the new maximum continuity obtained on all knots.
-- Remark that, for instance with <continuity> = 2, even if not
-- all the knots can be passed to C2, all knots which can be are.
end IGESConvGeom;

View File

@@ -20,28 +20,25 @@
// SplineSurfaces.
//%13 pdn 12.02.99: USA60293 avoid applying transformation twice
#include <IGESConvGeom.ixx>
#include <IGESData_ToolLocation.hxx>
#include <BSplCLib.hxx>
#include <BSplSLib.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <gp_GTrsf.hxx>
#include <gp_Trsf.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <IGESConvGeom.hxx>
#include <IGESData_ToolLocation.hxx>
#include <IGESGeom_SplineCurve.hxx>
#include <IGESGeom_SplineSurface.hxx>
#include <PLib.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
//=======================================================================
//function : IGESConvGeom::SplineCurveFromIGES
//purpose :

View File

@@ -0,0 +1,118 @@
// Created on: 1994-09-01
// Created by: Christian CAILLET
// 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 _IGESConvGeom_HeaderFile
#define _IGESConvGeom_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
class IGESGeom_SplineCurve;
class Geom_BSplineCurve;
class Geom2d_BSplineCurve;
class IGESGeom_SplineSurface;
class Geom_BSplineSurface;
class IGESConvGeom_GeomBuilder;
//! This package is intended to gather geometric conversion which
//! are not immediate but can be used for several purposes :
//! mainly, standard conversion to and from CasCade geometric and
//! topologic data, and adaptations of IGES files as required
//! (as replacing Spline entities to BSpline equivalents).
class IGESConvGeom
{
public:
DEFINE_STANDARD_ALLOC
//! basic tool to build curves from IGESGeom (arrays of points,
//! Transformations, evaluation of points in a datum)
//! Converts a SplineCurve from IGES to a BSplineCurve from CasCade
//! <epscoef> gives tolerance to consider coefficient to be nul
//! <epsgeom> gives tolerance to consider poles to be equal
//! The returned value is a status with these possible values :
//! - 0 OK, done
//! - 1 the result is not guaranteed to be C0 (with <epsgeom>)
//! - 2 SplineType not processed (allowed : max 3)
//! (no result produced)
//! - 3 error during creation of control points
//! (no result produced)
//! - 4 polynomial equation is not correct (no result produced)
//! - 5 less than one segment (no result produced)
Standard_EXPORT static Standard_Integer SplineCurveFromIGES (const Handle(IGESGeom_SplineCurve)& igesent, const Standard_Real epscoef, const Standard_Real epsgeom, Handle(Geom_BSplineCurve)& result);
//! Tries to increase curve continuity with tolerance <epsgeom>
//! <continuity> is the new desired continuity, can be 1 or 2
//! (more than 2 is considered as 2).
//! Returns the new maximum continuity obtained on all knots.
//! Remark that, for instance with <continuity> = 2, even if not
//! all the knots can be passed to C2, all knots which can be are.
Standard_EXPORT static Standard_Integer IncreaseCurveContinuity (const Handle(Geom_BSplineCurve)& curve, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
Standard_EXPORT static Standard_Integer IncreaseCurveContinuity (const Handle(Geom2d_BSplineCurve)& curve, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
//! Converts a SplineSurface from IGES to a BSplineSurface from CasCade
//! <epscoef> gives tolerance to consider coefficient to be nul
//! <epsgeom> gives tolerance to consider poles to be equal
//! The returned value is a status with these possible values :
//! - 0 OK, done
//! - 1 the result is not guaranteed to be C0 (with <epsgeom>)
//! - 2 degree is not compatible with code boundary type
//! (warning) but C0 is OK
//! - 3 idem but C0 is not guaranteed (warning)
//! - 4 degree has been determined to be nul, either in U or V
//! (no result produced)
//! - 5 less than one segment in U or V (no result produced)
Standard_EXPORT static Standard_Integer SplineSurfaceFromIGES (const Handle(IGESGeom_SplineSurface)& igesent, const Standard_Real epscoef, const Standard_Real epsgeom, Handle(Geom_BSplineSurface)& result);
//! Tries to increase Surface continuity with tolerance <epsgeom>
//! <continuity> is the new desired continuity, can be 1 or 2
//! (more than 2 is considered as 2).
//! Returns the new maximum continuity obtained on all knots.
//! Remark that, for instance with <continuity> = 2, even if not
//! all the knots can be passed to C2, all knots which can be are.
Standard_EXPORT static Standard_Integer IncreaseSurfaceContinuity (const Handle(Geom_BSplineSurface)& surface, const Standard_Real epsgeom, const Standard_Integer continuity = 2);
protected:
private:
friend class IGESConvGeom_GeomBuilder;
};
#endif // _IGESConvGeom_HeaderFile

View File

@@ -1,119 +0,0 @@
-- Created on: 1994-11-16
-- Created by: Christian CAILLET
-- 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.
class GeomBuilder from IGESConvGeom
---Purpose : This class provides some useful basic tools to build IGESGeom
-- curves, especially :
-- define a curve in a plane in 3D space (ex. Circular or Conic
-- arc, or Copious Data defined in 2D)
-- make a CopiousData from a list of points/vectors
uses XY from gp, XYZ from gp, Trsf, Ax1, Ax2, Ax3,
HSequenceOfXYZ,
TransformationMatrix, CopiousData
raises DomainError
is
Create returns GeomBuilder;
---Purpose : Creates a GeomBuilder at initial state.
Clear (me : in out) is static;
---Purpose : Clears list of Points/Vectors and data about Transformation
AddXY (me : in out; val : XY from gp) is static;
---Purpose : Adds a XY (Z=0) to the list of points
AddXYZ (me : in out; val : XYZ from gp) is static;
---Purpose : Adds a XYZ to the list of points
AddVec (me : in out; val : XYZ from gp) is static;
---Purpose : Adds a Vector part to the list of points. It will be used
-- for CopiousData, datatype=3, only.
-- AddXY and AddXYZ consider a null vector part (0,0,0)
-- AddVec adds to the last added XY or XYZ
NbPoints (me) returns Integer is static;
---Purpose : Returns the count of already recorded points
Point (me; num : Integer) returns XYZ is static;
---Purpose : Returns a point given its rank (if added as XY, Z will be 0)
MakeCopiousData (me; datatype : Integer; polyline : Boolean = Standard_False)
returns CopiousData
---Purpose : Makes a CopiousData with the list of recorded Points/Vectors
-- according to <datatype>, which must be 1,2 or 3
-- If <polyline> is given True, the CopiousData is coded as a
-- Polyline, but <datatype> must not be 3
-- <datatype> = 1 : Common Z is computed as average of all Z
-- <datatype> = 1 or 2 : Vectors are ignored
raises DomainError;
-- Error if : <datatype> is not 1,2 or 3; or NbPoints is 0
Position (me) returns Trsf from gp is static;
---Purpose : Returns the Position in which the method EvalXYZ will
-- evaluate a XYZ. It can be regarded as defining a local system.
-- It is initially set to Identity
SetPosition (me : in out; pos : Trsf from gp) is static;
---Purpose : Sets final position from an already defined Trsf
SetPosition (me : in out; pos : Ax3 from gp) is static;
---Purpose : Sets final position from an Ax3
SetPosition (me : in out; pos : Ax2 from gp) is static;
---Purpose : Sets final position from an Ax2
SetPosition (me : in out; pos : Ax1 from gp) is static;
---Purpose : Sets final position from an Ax1
-- (this means that origin point and Z-axis are defined, the
-- other axes are defined arbitrarily)
IsIdentity (me) returns Boolean is static;
---Purpose : Returns True if the Position is Identity
IsTranslation (me) returns Boolean is static;
---Purpose : Returns True if the Position is a Translation only
-- Remark : Identity and ZOnly will answer True
IsZOnly (me) returns Boolean is static;
---Purpose : Returns True if the Position corresponds to a Z-Displacement,
-- i.e. is a Translation only, and only on Z
-- Remark : Identity will answer True
EvalXYZ (me; val : XYZ from gp; X,Y,Z : out Real) is static;
---Purpose : Evaluates a XYZ value in the Position already defined.
-- Returns the transformed coordinates.
-- For a 2D definition, X,Y will then be used to define a XY and
-- Z will be regarded as a Z Displacement (can be ignored)
MakeTransformation (me; unit : Real = 1)
returns TransformationMatrix is static;
---Purpose : Returns the IGES Transformation which corresponds to the
-- Position. Even if it is an Identity : IsIdentity should be
-- tested first.
-- <unit> is the unit value in which the model is created :
-- it is used to convert translation part
fields
theXYZ : HSequenceOfXYZ;
theVec : HSequenceOfXYZ;
thepos : Trsf from gp;
end GeomBuilder;

View File

@@ -11,13 +11,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IGESConvGeom_GeomBuilder.ixx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <gp.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax3.hxx>
#include <gp_Trsf.hxx>
#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
#include <IGESConvGeom_GeomBuilder.hxx>
#include <IGESGeom_CopiousData.hxx>
#include <IGESGeom_TransformationMatrix.hxx>
#include <Interface_Translates.hxx>
#include <Standard_DomainError.hxx>
#include <gp.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
static Standard_Real epsl = 1.E-10;
static Standard_Real epsa = 1.E-10;

View File

@@ -0,0 +1,154 @@
// Created on: 1994-11-16
// Created by: Christian CAILLET
// 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 _IGESConvGeom_GeomBuilder_HeaderFile
#define _IGESConvGeom_GeomBuilder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TColgp_HSequenceOfXYZ.hxx>
#include <gp_Trsf.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Standard_DomainError;
class gp_XY;
class gp_XYZ;
class IGESGeom_CopiousData;
class gp_Trsf;
class gp_Ax3;
class gp_Ax2;
class gp_Ax1;
class IGESGeom_TransformationMatrix;
//! This class provides some useful basic tools to build IGESGeom
//! curves, especially :
//! define a curve in a plane in 3D space (ex. Circular or Conic
//! arc, or Copious Data defined in 2D)
//! make a CopiousData from a list of points/vectors
class IGESConvGeom_GeomBuilder
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a GeomBuilder at initial state.
Standard_EXPORT IGESConvGeom_GeomBuilder();
//! Clears list of Points/Vectors and data about Transformation
Standard_EXPORT void Clear();
//! Adds a XY (Z=0) to the list of points
Standard_EXPORT void AddXY (const gp_XY& val);
//! Adds a XYZ to the list of points
Standard_EXPORT void AddXYZ (const gp_XYZ& val);
//! Adds a Vector part to the list of points. It will be used
//! for CopiousData, datatype=3, only.
//! AddXY and AddXYZ consider a null vector part (0,0,0)
//! AddVec adds to the last added XY or XYZ
Standard_EXPORT void AddVec (const gp_XYZ& val);
//! Returns the count of already recorded points
Standard_EXPORT Standard_Integer NbPoints() const;
//! Returns a point given its rank (if added as XY, Z will be 0)
Standard_EXPORT gp_XYZ Point (const Standard_Integer num) const;
//! Makes a CopiousData with the list of recorded Points/Vectors
//! according to <datatype>, which must be 1,2 or 3
//! If <polyline> is given True, the CopiousData is coded as a
//! Polyline, but <datatype> must not be 3
//! <datatype> = 1 : Common Z is computed as average of all Z
//! <datatype> = 1 or 2 : Vectors are ignored
Standard_EXPORT Handle(IGESGeom_CopiousData) MakeCopiousData (const Standard_Integer datatype, const Standard_Boolean polyline = Standard_False) const;
//! Returns the Position in which the method EvalXYZ will
//! evaluate a XYZ. It can be regarded as defining a local system.
//! It is initially set to Identity
Standard_EXPORT gp_Trsf Position() const;
//! Sets final position from an already defined Trsf
Standard_EXPORT void SetPosition (const gp_Trsf& pos);
//! Sets final position from an Ax3
Standard_EXPORT void SetPosition (const gp_Ax3& pos);
//! Sets final position from an Ax2
Standard_EXPORT void SetPosition (const gp_Ax2& pos);
//! Sets final position from an Ax1
//! (this means that origin point and Z-axis are defined, the
//! other axes are defined arbitrarily)
Standard_EXPORT void SetPosition (const gp_Ax1& pos);
//! Returns True if the Position is Identity
Standard_EXPORT Standard_Boolean IsIdentity() const;
//! Returns True if the Position is a Translation only
//! Remark : Identity and ZOnly will answer True
Standard_EXPORT Standard_Boolean IsTranslation() const;
//! Returns True if the Position corresponds to a Z-Displacement,
//! i.e. is a Translation only, and only on Z
//! Remark : Identity will answer True
Standard_EXPORT Standard_Boolean IsZOnly() const;
//! Evaluates a XYZ value in the Position already defined.
//! Returns the transformed coordinates.
//! For a 2D definition, X,Y will then be used to define a XY and
//! Z will be regarded as a Z Displacement (can be ignored)
Standard_EXPORT void EvalXYZ (const gp_XYZ& val, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
//! Returns the IGES Transformation which corresponds to the
//! Position. Even if it is an Identity : IsIdentity should be
//! tested first.
//! <unit> is the unit value in which the model is created :
//! it is used to convert translation part
Standard_EXPORT Handle(IGESGeom_TransformationMatrix) MakeTransformation (const Standard_Real unit = 1) const;
protected:
private:
Handle(TColgp_HSequenceOfXYZ) theXYZ;
Handle(TColgp_HSequenceOfXYZ) theVec;
gp_Trsf thepos;
};
#endif // _IGESConvGeom_GeomBuilder_HeaderFile