mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
2
src/GeomProjLib/FILES
Normal file
2
src/GeomProjLib/FILES
Normal file
@@ -0,0 +1,2 @@
|
||||
GeomProjLib.cxx
|
||||
GeomProjLib.hxx
|
@@ -1,145 +0,0 @@
|
||||
-- Created on: 1993-08-25
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- 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 GeomProjLib
|
||||
|
||||
---Purpose: Projection of a curve on a surface.
|
||||
|
||||
uses
|
||||
gp,
|
||||
Geom,
|
||||
Geom2d
|
||||
|
||||
is
|
||||
|
||||
--
|
||||
-- package methods
|
||||
--
|
||||
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
First, Last : Real from Standard;
|
||||
S : Surface from Geom;
|
||||
UFirst,ULast,
|
||||
VFirst,VLast: Real from Standard ;
|
||||
Tolerance : in out Real from Standard )
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve )
|
||||
-- The 3dCurve is taken between the parametrization
|
||||
-- range [First, Last]
|
||||
-- <Tolerance> is used as input if the projection needs
|
||||
-- an approximation. In this case, the reached
|
||||
-- tolerance is set in <Tolerance> as output.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
returns Curve from Geom2d;
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
First, Last : Real from Standard;
|
||||
S : Surface from Geom;
|
||||
Tolerance : in out Real from Standard )
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve )
|
||||
-- The 3dCurve is taken between the parametrization
|
||||
-- range [First, Last]
|
||||
-- <Tolerance> is used as input if the projection needs
|
||||
-- an approximation. In this case, the reached
|
||||
-- tolerance is set in <Tolerance> as output.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
returns Curve from Geom2d;
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
First, Last : Real from Standard;
|
||||
S : Surface from Geom)
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve )
|
||||
-- The 3dCurve is taken between the parametrization
|
||||
-- range [First, Last]
|
||||
-- If the projection needs an approximation,
|
||||
-- Precision::PApproximation() is used.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
returns Curve from Geom2d;
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
S : Surface from Geom )
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
-- If the projection needs an approximation,
|
||||
-- Precision::PApproximation() is used.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
returns Curve from Geom2d;
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
S : Surface from Geom ;
|
||||
UDeb : Real from Standard ;
|
||||
UFin : Real from Standard ;
|
||||
VDeb : Real from Standard ;
|
||||
VFin : Real from Standard)
|
||||
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
-- If the projection needs an approximation,
|
||||
-- Precision::PApproximation() is used.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
-- can expand a little the bounds of surface
|
||||
returns Curve from Geom2d;
|
||||
|
||||
Curve2d(C : Curve from Geom;
|
||||
S : Surface from Geom;
|
||||
UDeb : Real from Standard ;
|
||||
UFin : Real from Standard ;
|
||||
VDeb : Real from Standard ;
|
||||
VFin : Real from Standard ;
|
||||
Tolerance : in out Real from Standard )
|
||||
|
||||
---Purpose: gives the 2d-curve of a 3d-curve lying on a
|
||||
-- surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
-- If the projection needs an approximation,
|
||||
-- Precision::PApproximation() is used.
|
||||
-- WARNING : if the projection has failed, this
|
||||
-- method returns a null Handle.
|
||||
-- can expand a little the bounds of surface
|
||||
returns Curve from Geom2d;
|
||||
|
||||
|
||||
Project(C : Curve from Geom;
|
||||
S : Surface from Geom )
|
||||
---Purpose: Constructs the 3d-curve from the normal
|
||||
-- projection of the Curve <C> on the surface <S>.
|
||||
-- WARNING : if the projection has failes returns a
|
||||
-- null Handle.
|
||||
returns Curve from Geom;
|
||||
|
||||
|
||||
ProjectOnPlane(Curve : Curve from Geom;
|
||||
Plane : Plane from Geom;
|
||||
Dir : Dir from gp ;
|
||||
KeepParametrization : Boolean from Standard)
|
||||
---Purpose: Constructs the 3d-curves from the projection
|
||||
-- of the curve <Curve> on the plane <Plane> along
|
||||
-- the direction <Dir>.
|
||||
-- If <KeepParametrization> is true, the parametrization
|
||||
-- of the Projected Curve <PC> will be the same as the
|
||||
-- parametrization of the initial curve <C>.
|
||||
-- It meens: proj(C(u)) = PC(u) for each u.
|
||||
-- Otherwize, the parametrization may change.
|
||||
returns Curve from Geom;
|
||||
|
||||
end GeomProjLib;
|
@@ -16,47 +16,45 @@
|
||||
|
||||
// Modified by skv - Wed Aug 11 17:26:03 2004 OCC6272
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <GeomProjLib.ixx>
|
||||
|
||||
#include <ProjLib_ProjectedCurve.hxx>
|
||||
#include <ProjLib_CompProjectedCurve.hxx>
|
||||
#include <ProjLib_ProjectOnPlane.hxx>
|
||||
#include <ProjLib_ProjectOnSurface.hxx>
|
||||
|
||||
#include <Approx_CurveOnSurface.hxx>
|
||||
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_Parabola.hxx>
|
||||
#include <Geom_Hyperbola.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Circle.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Ellipse.hxx>
|
||||
#include <Geom_Hyperbola.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Parabola.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomProjLib.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <ProjLib_CompProjectedCurve.hxx>
|
||||
#include <ProjLib_ProjectedCurve.hxx>
|
||||
#include <ProjLib_ProjectOnPlane.hxx>
|
||||
#include <ProjLib_ProjectOnSurface.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef DRAW
|
||||
#include <DrawTrSurf.hxx>
|
||||
static Standard_Boolean Affich = Standard_False;
|
||||
|
138
src/GeomProjLib/GeomProjLib.hxx
Normal file
138
src/GeomProjLib/GeomProjLib.hxx
Normal file
@@ -0,0 +1,138 @@
|
||||
// Created on: 1993-08-25
|
||||
// Created by: Bruno DUMORTIER
|
||||
// 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 _GeomProjLib_HeaderFile
|
||||
#define _GeomProjLib_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Curve;
|
||||
class Geom_Curve;
|
||||
class Geom_Surface;
|
||||
class Geom_Plane;
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! Projection of a curve on a surface.
|
||||
class GeomProjLib
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve )
|
||||
//! The 3dCurve is taken between the parametrization
|
||||
//! range [First, Last]
|
||||
//! <Tolerance> is used as input if the projection needs
|
||||
//! an approximation. In this case, the reached
|
||||
//! tolerance is set in <Tolerance> as output.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast, Standard_Real& Tolerance);
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve )
|
||||
//! The 3dCurve is taken between the parametrization
|
||||
//! range [First, Last]
|
||||
//! <Tolerance> is used as input if the projection needs
|
||||
//! an approximation. In this case, the reached
|
||||
//! tolerance is set in <Tolerance> as output.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S, Standard_Real& Tolerance);
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve )
|
||||
//! The 3dCurve is taken between the parametrization
|
||||
//! range [First, Last]
|
||||
//! If the projection needs an approximation,
|
||||
//! Precision::PApproximation() is used.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S);
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
//! If the projection needs an approximation,
|
||||
//! Precision::PApproximation() is used.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S);
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
//! If the projection needs an approximation,
|
||||
//! Precision::PApproximation() is used.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
//! can expand a little the bounds of surface
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real UDeb, const Standard_Real UFin, const Standard_Real VDeb, const Standard_Real VFin);
|
||||
|
||||
//! gives the 2d-curve of a 3d-curve lying on a
|
||||
//! surface ( uses GeomProjLib_ProjectedCurve ).
|
||||
//! If the projection needs an approximation,
|
||||
//! Precision::PApproximation() is used.
|
||||
//! WARNING : if the projection has failed, this
|
||||
//! method returns a null Handle.
|
||||
//! can expand a little the bounds of surface
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real UDeb, const Standard_Real UFin, const Standard_Real VDeb, const Standard_Real VFin, Standard_Real& Tolerance);
|
||||
|
||||
//! Constructs the 3d-curve from the normal
|
||||
//! projection of the Curve <C> on the surface <S>.
|
||||
//! WARNING : if the projection has failes returns a
|
||||
//! null Handle.
|
||||
Standard_EXPORT static Handle(Geom_Curve) Project (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S);
|
||||
|
||||
//! Constructs the 3d-curves from the projection
|
||||
//! of the curve <Curve> on the plane <Plane> along
|
||||
//! the direction <Dir>.
|
||||
//! If <KeepParametrization> is true, the parametrization
|
||||
//! of the Projected Curve <PC> will be the same as the
|
||||
//! parametrization of the initial curve <C>.
|
||||
//! It meens: proj(C(u)) = PC(u) for each u.
|
||||
//! Otherwize, the parametrization may change.
|
||||
Standard_EXPORT static Handle(Geom_Curve) ProjectOnPlane (const Handle(Geom_Curve)& Curve, const Handle(Geom_Plane)& Plane, const gp_Dir& Dir, const Standard_Boolean KeepParametrization);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GeomProjLib_HeaderFile
|
Reference in New Issue
Block a user