1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +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

39
src/GC/FILES Normal file
View File

@@ -0,0 +1,39 @@
GC_MakeArcOfCircle.cxx
GC_MakeArcOfCircle.hxx
GC_MakeArcOfEllipse.cxx
GC_MakeArcOfEllipse.hxx
GC_MakeArcOfHyperbola.cxx
GC_MakeArcOfHyperbola.hxx
GC_MakeArcOfParabola.cxx
GC_MakeArcOfParabola.hxx
GC_MakeCircle.cxx
GC_MakeCircle.hxx
GC_MakeConicalSurface.cxx
GC_MakeConicalSurface.hxx
GC_MakeCylindricalSurface.cxx
GC_MakeCylindricalSurface.hxx
GC_MakeEllipse.cxx
GC_MakeEllipse.hxx
GC_MakeHyperbola.cxx
GC_MakeHyperbola.hxx
GC_MakeLine.cxx
GC_MakeLine.hxx
GC_MakeMirror.cxx
GC_MakeMirror.hxx
GC_MakePlane.cxx
GC_MakePlane.hxx
GC_MakeRotation.cxx
GC_MakeRotation.hxx
GC_MakeScale.cxx
GC_MakeScale.hxx
GC_MakeSegment.cxx
GC_MakeSegment.hxx
GC_MakeTranslation.cxx
GC_MakeTranslation.hxx
GC_MakeTrimmedCone.cxx
GC_MakeTrimmedCone.hxx
GC_MakeTrimmedCylinder.cxx
GC_MakeTrimmedCylinder.hxx
GC_Root.cxx
GC_Root.hxx
GC_Root.lxx

View File

@@ -1,85 +0,0 @@
-- Created on: 1992-03-27
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package GC
uses gp,
gce,
Geom,
StdFail
---Level : Public.
-- All methods of all classes will be public.
is
private deferred class Root;
---------------------------------------------------------------------------
-- Constructions of 3d geometrical elements from Geom.
---------------------------------------------------------------------------
class MakeLine;
class MakeCircle;
class MakeHyperbola;
class MakeEllipse;
class MakeSegment;
class MakeArcOfCircle;
class MakeArcOfEllipse;
class MakeArcOfHyperbola;
class MakeArcOfParabola;
---------------------------------------------------------------------------
-- Constructions of planes from Geom.
---------------------------------------------------------------------------
class MakePlane;
---------------------------------------------------------------------------
-- Construction of surfaces from Geom.
---------------------------------------------------------------------------
class MakeCylindricalSurface;
class MakeConicalSurface;
class MakeTrimmedCylinder;
class MakeTrimmedCone;
---------------------------------------------------------------------------
-- Constructions of Transformation from Geom.
---------------------------------------------------------------------------
class MakeTranslation;
class MakeMirror;
class MakeRotation;
class MakeScale;
end GC;

View File

@@ -1,105 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeArcOfCircle from GC inherits Root from GC
---Purpose: Implements construction algorithms for an
-- arc of circle in 3D space. The result is a Geom_TrimmedCurve curve.
-- A MakeArcOfCircle object provides a framework for:
-- - defining the construction of the arc of circle,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the
-- Value function returns the constructed arc of circle.
uses Pnt from gp,
Circ from gp,
Dir from gp,
Ax1 from gp,
Vec from gp,
Real from Standard,
TrimmedCurve from Geom
raises NotDone from StdFail
is
Create(Circ : Circ from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfCircle;
---Purpose: Make an arc of circle (TrimmedCurve from Geom) from
-- a circle between two angles Alpha1 and Alpha2
-- given in radiians.
Create(Circ : Circ from gp ;
P : Pnt from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfCircle;
---Purpose: Make an arc of circle (TrimmedCurve from Geom) from
-- a circle between point <P> and the angle Alpha
-- given in radians.
Create(Circ : Circ from gp ;
P1 : Pnt from gp ;
P2 : Pnt from gp ;
Sense : Boolean from Standard ) returns MakeArcOfCircle;
---Purpose: Make an arc of circle (TrimmedCurve from Geom) from
-- a circle between two points P1 and P2.
Create(P1 : Pnt from gp ;
P2 : Pnt from gp ;
P3 : Pnt from gp )
returns MakeArcOfCircle;
---Purpose: Make an arc of circle (TrimmedCurve from Geom) from
-- three points P1,P2,P3 between two points P1 and P2.
Create(P1 : Pnt from gp ;
V : Vec from gp ;
P2 : Pnt from gp )
returns MakeArcOfCircle;
---Purpose: Make an arc of circle (TrimmedCurve from Geom) from
-- two points P1,P2 and the tangente to the solution at
-- the point P1.
-- The orientation of the arc is:
-- - the sense determined by the order of the points P1, P3 and P2;
-- - the sense defined by the vector V; or
-- - for other syntaxes:
-- - the sense of Circ if Sense is true, or
-- - the opposite sense if Sense is false.
-- Note: Alpha1, Alpha2 and Alpha are angle values, given in radians.
-- Warning
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_ConfusedPoints if:
-- - any 2 of the 3 points P1, P2 and P3 are coincident, or
-- - P1 and P2 are coincident; or
-- - gce_IntersectionError if:
-- - P1, P2 and P3 are collinear and not coincident, or
-- - the vector defined by the points P1 and
-- P2 is collinear with the vector V.
Value(me) returns TrimmedCurve from Geom
raises NotDone
is static;
---Purpose: Returns the constructed arc of circle.
-- Exceptions StdFail_NotDone if no arc of circle is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom;
--The solution from Geom.
end MakeArcOfCircle;

View File

@@ -14,14 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeArcOfCircle.ixx>
#include <ElCLib.hxx>
#include <Extrema_ExtElC.hxx>
#include <Extrema_POnCurv.hxx>
#include <GC_MakeArcOfCircle.hxx>
#include <gce_MakeCirc.hxx>
#include <gce_MakeLin.hxx>
#include <Geom_Circle.hxx>
#include <Extrema_ExtElC.hxx>
#include <Extrema_POnCurv.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <gp_Circ.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
//=======================================================================
//function : GC_MakeArcOfCircle

View File

@@ -0,0 +1,117 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeArcOfCircle_HeaderFile
#define _GC_MakeArcOfCircle_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom_TrimmedCurve;
class StdFail_NotDone;
class gp_Circ;
class gp_Pnt;
class gp_Vec;
//! Implements construction algorithms for an
//! arc of circle in 3D space. The result is a Geom_TrimmedCurve curve.
//! A MakeArcOfCircle object provides a framework for:
//! - defining the construction of the arc of circle,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the
//! Value function returns the constructed arc of circle.
class GC_MakeArcOfCircle : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make an arc of circle (TrimmedCurve from Geom) from
//! a circle between two angles Alpha1 and Alpha2
//! given in radiians.
Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& Circ, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense);
//! Make an arc of circle (TrimmedCurve from Geom) from
//! a circle between point <P> and the angle Alpha
//! given in radians.
Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& Circ, const gp_Pnt& P, const Standard_Real Alpha, const Standard_Boolean Sense);
//! Make an arc of circle (TrimmedCurve from Geom) from
//! a circle between two points P1 and P2.
Standard_EXPORT GC_MakeArcOfCircle(const gp_Circ& Circ, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Boolean Sense);
//! Make an arc of circle (TrimmedCurve from Geom) from
//! three points P1,P2,P3 between two points P1 and P2.
Standard_EXPORT GC_MakeArcOfCircle(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
//! Make an arc of circle (TrimmedCurve from Geom) from
//! two points P1,P2 and the tangente to the solution at
//! the point P1.
//! The orientation of the arc is:
//! - the sense determined by the order of the points P1, P3 and P2;
//! - the sense defined by the vector V; or
//! - for other syntaxes:
//! - the sense of Circ if Sense is true, or
//! - the opposite sense if Sense is false.
//! Note: Alpha1, Alpha2 and Alpha are angle values, given in radians.
//! Warning
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_ConfusedPoints if:
//! - any 2 of the 3 points P1, P2 and P3 are coincident, or
//! - P1 and P2 are coincident; or
//! - gce_IntersectionError if:
//! - P1, P2 and P3 are collinear and not coincident, or
//! - the vector defined by the points P1 and
//! P2 is collinear with the vector V.
Standard_EXPORT GC_MakeArcOfCircle(const gp_Pnt& P1, const gp_Vec& V, const gp_Pnt& P2);
//! Returns the constructed arc of circle.
//! Exceptions StdFail_NotDone if no arc of circle is constructed.
Standard_EXPORT const Handle(Geom_TrimmedCurve)& Value() const;
operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom_TrimmedCurve) TheArc;
};
#endif // _GC_MakeArcOfCircle_HeaderFile

View File

@@ -1,77 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeArcOfEllipse from GC inherits Root from GC
---Purpose: Implements construction algorithms for an arc
-- of ellipse in 3D space. The result is a Geom_TrimmedCurve curve.
-- A MakeArcOfEllipse object provides a framework for:
-- - defining the construction of the arc of ellipse,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the
-- Value function returns the constructed arc of ellipse.
uses Pnt from gp,
Elips from gp,
Dir from gp,
Ax1 from gp,
Real from Standard,
TrimmedCurve from Geom
raises NotDone from StdFail
is
Create(Elips : Elips from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfEllipse;
---Purpose: Constructs an arc of Ellipse (TrimmedCurve from Geom) from
-- a Ellipse between two parameters Alpha1 and Alpha2.
Create(Elips : Elips from gp ;
P : Pnt from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfEllipse;
---Purpose: Constructs an arc of Ellipse (TrimmedCurve from Geom) from
-- a Ellipse between point <P> and the angle Alpha
-- given in radians.
Create(Elips : Elips from gp ;
P1 : Pnt from gp ;
P2 : Pnt from gp ;
Sense : Boolean from Standard ) returns MakeArcOfEllipse;
---Purpose: Constructs an arc of Ellipse (TrimmedCurve from Geom) from
-- a Ellipse between two points P1 and P2.
-- The orientation of the arc of ellipse is:
-- - the sense of Elips if Sense is true, or
-- - the opposite sense if Sense is false.
-- Notes:
-- - Alpha1, Alpha2 and Alpha are angle values, given in radians.
-- - IsDone always returns true.
Value(me) returns TrimmedCurve from Geom
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed arc of ellipse.
---C++: alias "operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom;
--The solution from Geom.
end MakeArcOfEllipse;

View File

@@ -14,10 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeArcOfEllipse.ixx>
#include <Geom_Ellipse.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
#include <GC_MakeArcOfEllipse.hxx>
#include <Geom_Ellipse.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <gp_Elips.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeArcOfEllipse::GC_MakeArcOfEllipse(const gp_Elips& Elips ,
const gp_Pnt& P1 ,

View File

@@ -0,0 +1,94 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeArcOfEllipse_HeaderFile
#define _GC_MakeArcOfEllipse_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom_TrimmedCurve;
class StdFail_NotDone;
class gp_Elips;
class gp_Pnt;
//! Implements construction algorithms for an arc
//! of ellipse in 3D space. The result is a Geom_TrimmedCurve curve.
//! A MakeArcOfEllipse object provides a framework for:
//! - defining the construction of the arc of ellipse,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the
//! Value function returns the constructed arc of ellipse.
class GC_MakeArcOfEllipse : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs an arc of Ellipse (TrimmedCurve from Geom) from
//! a Ellipse between two parameters Alpha1 and Alpha2.
Standard_EXPORT GC_MakeArcOfEllipse(const gp_Elips& Elips, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense);
//! Constructs an arc of Ellipse (TrimmedCurve from Geom) from
//! a Ellipse between point <P> and the angle Alpha
//! given in radians.
Standard_EXPORT GC_MakeArcOfEllipse(const gp_Elips& Elips, const gp_Pnt& P, const Standard_Real Alpha, const Standard_Boolean Sense);
//! Constructs an arc of Ellipse (TrimmedCurve from Geom) from
//! a Ellipse between two points P1 and P2.
//! The orientation of the arc of ellipse is:
//! - the sense of Elips if Sense is true, or
//! - the opposite sense if Sense is false.
//! Notes:
//! - Alpha1, Alpha2 and Alpha are angle values, given in radians.
//! - IsDone always returns true.
Standard_EXPORT GC_MakeArcOfEllipse(const gp_Elips& Elips, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Boolean Sense);
//! Returns the constructed arc of ellipse.
Standard_EXPORT const Handle(Geom_TrimmedCurve)& Value() const;
operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom_TrimmedCurve) TheArc;
};
#endif // _GC_MakeArcOfEllipse_HeaderFile

View File

@@ -1,74 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeArcOfHyperbola from GC inherits Root from GC
---Purpose: Implements construction algorithms for an arc
-- of hyperbola in 3D space. The result is a Geom_TrimmedCurve curve.
-- A MakeArcOfHyperbola object provides a framework for:
-- - defining the construction of the arc of hyperbola,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the
-- Value function returns the constructed arc of hyperbola.
uses Pnt from gp,
Hypr from gp,
Dir from gp,
Ax1 from gp,
Real from Standard,
TrimmedCurve from Geom
raises NotDone from StdFail
is
Create(Hypr : Hypr from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfHyperbola;
---Purpose: Creates an arc of Hyperbola (TrimmedCurve from Geom) from
-- a Hyperbola between two parameters Alpha1 and Alpha2
-- (given in radians).
Create(Hypr : Hypr from gp ;
P : Pnt from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfHyperbola;
---Purpose: Creates an arc of Hyperbola (TrimmedCurve from Geom) from
-- a Hyperbola between point <P> and the parameter
-- Alpha (given in radians).
Create(Hypr : Hypr from gp ;
P1 : Pnt from gp ;
P2 : Pnt from gp ;
Sense : Boolean from Standard ) returns MakeArcOfHyperbola;
---Purpose: Creates an arc of Hyperbola (TrimmedCurve from Geom) from
-- a Hyperbola between two points P1 and P2.
-- The orientation of the arc of hyperbola is:
-- - the sense of Hypr if Sense is true, or
-- - the opposite sense if Sense is false.
Value(me) returns TrimmedCurve from Geom
raises NotDone
is static;
--- Purpose: Returns the constructed arc of hyperbola.
---C++: return const&
---C++: alias "operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom;
--The solution from Geom.
end MakeArcOfHyperbola;

View File

@@ -14,10 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeArcOfHyperbola.ixx>
#include <Geom_Hyperbola.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
#include <GC_MakeArcOfHyperbola.hxx>
#include <Geom_Hyperbola.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <gp_Hypr.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeArcOfHyperbola::
GC_MakeArcOfHyperbola(const gp_Hypr& Hypr ,

View File

@@ -0,0 +1,92 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeArcOfHyperbola_HeaderFile
#define _GC_MakeArcOfHyperbola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom_TrimmedCurve;
class StdFail_NotDone;
class gp_Hypr;
class gp_Pnt;
//! Implements construction algorithms for an arc
//! of hyperbola in 3D space. The result is a Geom_TrimmedCurve curve.
//! A MakeArcOfHyperbola object provides a framework for:
//! - defining the construction of the arc of hyperbola,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the
//! Value function returns the constructed arc of hyperbola.
class GC_MakeArcOfHyperbola : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an arc of Hyperbola (TrimmedCurve from Geom) from
//! a Hyperbola between two parameters Alpha1 and Alpha2
//! (given in radians).
Standard_EXPORT GC_MakeArcOfHyperbola(const gp_Hypr& Hypr, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense);
//! Creates an arc of Hyperbola (TrimmedCurve from Geom) from
//! a Hyperbola between point <P> and the parameter
//! Alpha (given in radians).
Standard_EXPORT GC_MakeArcOfHyperbola(const gp_Hypr& Hypr, const gp_Pnt& P, const Standard_Real Alpha, const Standard_Boolean Sense);
//! Creates an arc of Hyperbola (TrimmedCurve from Geom) from
//! a Hyperbola between two points P1 and P2.
//! The orientation of the arc of hyperbola is:
//! - the sense of Hypr if Sense is true, or
//! - the opposite sense if Sense is false.
Standard_EXPORT GC_MakeArcOfHyperbola(const gp_Hypr& Hypr, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Boolean Sense);
//! Returns the constructed arc of hyperbola.
Standard_EXPORT const Handle(Geom_TrimmedCurve)& Value() const;
operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom_TrimmedCurve) TheArc;
};
#endif // _GC_MakeArcOfHyperbola_HeaderFile

View File

@@ -1,70 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeArcOfParabola from GC inherits Root from GC
---Purpose: Implements construction algorithms for an arc
-- of parabola in 3D space. The result is a Geom_TrimmedCurve curve.
-- A MakeArcOfParabola object provides a framework for:
-- - defining the construction of the arc of parabola,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the
-- Value function returns the constructed arc of parabola.
uses Pnt from gp,
Parab from gp,
Dir from gp,
Ax1 from gp,
Real from Standard,
TrimmedCurve from Geom
raises NotDone from StdFail
is
Create(Parab : Parab from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfParabola;
---Purpose: Creates an arc of Parabola (TrimmedCurve from Geom) from
-- a Parabola between two parameters Alpha1 and Alpha2
-- (given in radians).
Create(Parab : Parab from gp ;
P : Pnt from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard ) returns MakeArcOfParabola;
---Purpose: Creates an arc of Parabola (TrimmedCurve from Geom) from
-- a Parabola between point <P> and the parameter
-- Alpha (given in radians).
Create(Parab : Parab from gp ;
P1 : Pnt from gp ;
P2 : Pnt from gp ;
Sense : Boolean from Standard ) returns MakeArcOfParabola;
---Purpose: Creates an arc of Parabola (TrimmedCurve from Geom) from
-- a Parabola between two points P1 and P2.
Value(me) returns TrimmedCurve from Geom
raises NotDone
is static;
---Purpose: Returns the constructed arc of parabola.
---C++: return const&
---C++: alias "operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom;
--The solution from Geom.
end MakeArcOfParabola;

View File

@@ -14,10 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeArcOfParabola.ixx>
#include <Geom_Parabola.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
#include <GC_MakeArcOfParabola.hxx>
#include <Geom_Parabola.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <gp_Parab.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
const gp_Pnt& P1 ,

View File

@@ -0,0 +1,89 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeArcOfParabola_HeaderFile
#define _GC_MakeArcOfParabola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom_TrimmedCurve;
class StdFail_NotDone;
class gp_Parab;
class gp_Pnt;
//! Implements construction algorithms for an arc
//! of parabola in 3D space. The result is a Geom_TrimmedCurve curve.
//! A MakeArcOfParabola object provides a framework for:
//! - defining the construction of the arc of parabola,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the
//! Value function returns the constructed arc of parabola.
class GC_MakeArcOfParabola : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an arc of Parabola (TrimmedCurve from Geom) from
//! a Parabola between two parameters Alpha1 and Alpha2
//! (given in radians).
Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& Parab, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense);
//! Creates an arc of Parabola (TrimmedCurve from Geom) from
//! a Parabola between point <P> and the parameter
//! Alpha (given in radians).
Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& Parab, const gp_Pnt& P, const Standard_Real Alpha, const Standard_Boolean Sense);
//! Creates an arc of Parabola (TrimmedCurve from Geom) from
//! a Parabola between two points P1 and P2.
Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& Parab, const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Boolean Sense);
//! Returns the constructed arc of parabola.
Standard_EXPORT const Handle(Geom_TrimmedCurve)& Value() const;
operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom_TrimmedCurve) TheArc;
};
#endif // _GC_MakeArcOfParabola_HeaderFile

View File

@@ -1,111 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeCircle from GC inherits Root from GC
---Purpose : This class implements the following algorithms used
-- to create Cirlec from Geom.
--
-- * Create a Circle parallel to another and passing
-- though a point.
-- * Create a Circle parallel to another at the distance
-- Dist.
-- * Create a Circle passing through 3 points.
-- * Create a Circle with its center and the normal of its
-- plane and its radius.
-- * Create a Circle with its axis and radius.
-- The circle's parameter is the angle (Radian).
-- The parametrization range is [0,2*PI].
-- The circle is a closed and periodic curve.
-- The center of the circle is the Location point of its axis
-- placement. The XDirection of the axis placement defines the
-- origin of the parametrization.
uses Pnt from gp,
Circ from gp,
Circle from Geom,
Dir from gp,
Ax1 from gp,
Ax2 from gp,
Real from Standard
raises NotDone from StdFail
is
Create (C : Circ from gp) returns MakeCircle;
--- Purpose : creates a circle from a non persistent circle C by its conversion.
Create (A2 : Ax2 from gp ;
Radius : Real from Standard) returns MakeCircle;
--- Purpose :
-- A2 is the local coordinates system of the circle.
-- It is not forbidden to create a circle with Radius = 0.0
-- Status is "NegativeRadius" if Radius < 0.
Create(Circ : Circ from gp ;
Dist : Real from Standard) returns MakeCircle;
---Purpose : Make a Circle from Geom <TheCirc> parallel to another
-- Circ <Circ> with a distance <Dist>.
-- If Dist is greater than zero the result is enclosing
-- the circle <Circ>, else the result is enclosed by the
-- circle <Circ>.
Create(Circ : Circ from gp;
Point : Pnt from gp) returns MakeCircle;
---Purpose : Make a Circle from Geom <TheCirc> parallel to another
-- Circ <Circ> and passing through a Pnt <Point>.
Create(P1,P2,P3 : Pnt from gp) returns MakeCircle;
---Purpose : Make a Circ from gp <TheCirc> passing through 3
-- Pnt2d <P1>,<P2>,<P3>.
Create(Center : Pnt from gp ;
Norm : Dir from gp ;
Radius : Real from Standard) returns MakeCircle;
---Purpose : Make a Circle from Geom <TheCirc> with its center
-- <Center> and the normal of its plane <Norm> and
-- its radius <Radius>.
Create(Center : Pnt from gp ;
PtAxis : Pnt from gp ;
Radius : Real from Standard) returns MakeCircle;
---Purpose : Make a Circle from Geom <TheCirc> with its center
-- <Center> and the normal of its plane defined by the
-- two points <Center> and <PtAxis> and its radius <Radius>.
Create(Axis : Ax1 from gp ;
Radius : Real from Standard) returns MakeCircle;
---Purpose : Make a Circle from Geom <TheCirc> with its center
-- <Center> and its radius <Radius>.
Value(me) returns Circle from Geom
raises NotDone
is static;
--- Purpose:
-- Returns the constructed circle.
-- Exceptions
-- StdFail_NotDone if no circle is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_Circle)& () const { return Value(); }"
fields
TheCircle : Circle from Geom;
--The solution from Geom.
end MakeCircle;

View File

@@ -14,8 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeCircle.ixx>
#include <GC_MakeCircle.hxx>
#include <gce_MakeCirc.hxx>
#include <Geom_Circle.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeCircle::GC_MakeCircle(const gp_Circ& C)

128
src/GC/GC_MakeCircle.hxx Normal file
View File

@@ -0,0 +1,128 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeCircle_HeaderFile
#define _GC_MakeCircle_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_Circle;
class StdFail_NotDone;
class gp_Circ;
class gp_Ax2;
class gp_Pnt;
class gp_Dir;
class gp_Ax1;
//! This class implements the following algorithms used
//! to create Cirlec from Geom.
//!
//! * Create a Circle parallel to another and passing
//! though a point.
//! * Create a Circle parallel to another at the distance
//! Dist.
//! * Create a Circle passing through 3 points.
//! * Create a Circle with its center and the normal of its
//! plane and its radius.
//! * Create a Circle with its axis and radius.
//! The circle's parameter is the angle (Radian).
//! The parametrization range is [0,2*PI].
//! The circle is a closed and periodic curve.
//! The center of the circle is the Location point of its axis
//! placement. The XDirection of the axis placement defines the
//! origin of the parametrization.
class GC_MakeCircle : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! creates a circle from a non persistent circle C by its conversion.
Standard_EXPORT GC_MakeCircle(const gp_Circ& C);
//! A2 is the local coordinates system of the circle.
//! It is not forbidden to create a circle with Radius = 0.0
//! Status is "NegativeRadius" if Radius < 0.
Standard_EXPORT GC_MakeCircle(const gp_Ax2& A2, const Standard_Real Radius);
//! Make a Circle from Geom <TheCirc> parallel to another
//! Circ <Circ> with a distance <Dist>.
//! If Dist is greater than zero the result is enclosing
//! the circle <Circ>, else the result is enclosed by the
//! circle <Circ>.
Standard_EXPORT GC_MakeCircle(const gp_Circ& Circ, const Standard_Real Dist);
//! Make a Circle from Geom <TheCirc> parallel to another
//! Circ <Circ> and passing through a Pnt <Point>.
Standard_EXPORT GC_MakeCircle(const gp_Circ& Circ, const gp_Pnt& Point);
//! Make a Circ from gp <TheCirc> passing through 3
//! Pnt2d <P1>,<P2>,<P3>.
Standard_EXPORT GC_MakeCircle(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
//! Make a Circle from Geom <TheCirc> with its center
//! <Center> and the normal of its plane <Norm> and
//! its radius <Radius>.
Standard_EXPORT GC_MakeCircle(const gp_Pnt& Center, const gp_Dir& Norm, const Standard_Real Radius);
//! Make a Circle from Geom <TheCirc> with its center
//! <Center> and the normal of its plane defined by the
//! two points <Center> and <PtAxis> and its radius <Radius>.
Standard_EXPORT GC_MakeCircle(const gp_Pnt& Center, const gp_Pnt& PtAxis, const Standard_Real Radius);
//! Make a Circle from Geom <TheCirc> with its center
//! <Center> and its radius <Radius>.
Standard_EXPORT GC_MakeCircle(const gp_Ax1& Axis, const Standard_Real Radius);
//! Returns the constructed circle.
//! Exceptions
//! StdFail_NotDone if no circle is constructed.
Standard_EXPORT const Handle(Geom_Circle)& Value() const;
operator const Handle(Geom_Circle)& () const { return Value(); }
protected:
private:
Handle(Geom_Circle) TheCircle;
};
#endif // _GC_MakeCircle_HeaderFile

View File

@@ -1,138 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeConicalSurface from GC inherits Root from GC
---Purpose : This class implements the following algorithms used
-- to create a ConicalSurface from Geom.
-- * Create a ConicalSurface parallel to another and passing
-- through a point.
-- * Create a ConicalSurface parallel to another at a distance
-- <Dist>.
-- * Create a ConicalSurface by 4 points.
-- * Create a ConicalSurface by its axis and 2 points.
-- * Create a ConicalSurface by 2 points and 2 radius.
-- The local coordinate system of the ConicalSurface is defined
-- with an axis placement (see class ElementarySurface).
--
-- The "ZAxis" is the symmetry axis of the ConicalSurface,
-- it gives the direction of increasing parametric value V.
-- The apex of the surface is on the negative side of this axis.
--
-- The parametrization range is :
-- U [0, 2*PI], V ]-infinite, + infinite[
--
-- The "XAxis" and the "YAxis" define the placement plane of the
-- surface (Z = 0, and parametric value V = 0) perpendicular to
-- the symmetry axis. The "XAxis" defines the origin of the
-- parameter U = 0. The trigonometric sense gives the positive
-- orientation for the parameter U.
--
-- When you create a ConicalSurface the U and V directions of
-- parametrization are such that at each point of the surface the
-- normal is oriented towards the "outside region".
uses Pnt from gp,
Ax1 from gp,
Ax2 from gp,
Lin from gp,
Cone from gp,
ConicalSurface from Geom,
Real from Standard
raises NotDone from StdFail
is
Create (A2 : Ax2 from gp ;
Ang : Real from Standard;
Radius : Real from Standard) returns MakeConicalSurface;
--- Purpose :
-- A2 defines the local coordinate system of the conical surface.
-- Ang is the conical surface semi-angle ]0, PI/2[.
-- Radius is the radius of the circle Viso in the placement plane
-- of the conical surface defined with "XAxis" and "YAxis".
-- The "ZDirection" of A2 defines the direction of the surface's
-- axis of symmetry.
-- If the location point of A2 is the apex of the surface
-- Radius = 0 .
-- At the creation the parametrization of the surface is defined
-- such that the normal Vector (N = D1U ^ D1V) is oriented towards
-- the "outside region" of the surface.
-- Status is "NegativeRadius" if Radius < 0.0 or "BadAngle" if
-- Ang < Resolution from gp or Ang >= PI/ - Resolution
Create (C : Cone from gp) returns MakeConicalSurface;
--- Purpose : Creates a ConicalSurface from a non persistent Cone from package gp.
Create(Cone : Cone from gp;
Point : Pnt from gp) returns MakeConicalSurface;
---Purpose : Make a ConicalSurface from Geom <TheCone> parallel to another
-- ConicalSurface <Cone> and passing through a Pnt <Point>.
Create(Cone : Cone from gp ;
Dist : Real from Standard) returns MakeConicalSurface;
---Purpose : Make a ConicalSurface from Geom <TheCone> parallel to another
-- ConicalSurface <Cone> at the distance <Dist> which can
-- be greater or lower than zero.
Create(P1 : Pnt from gp;
P2 : Pnt from gp;
P3 : Pnt from gp;
P4 : Pnt from gp) returns MakeConicalSurface;
---Purpose : Make a ConicalSurface from Geom <TheCone> passing through 3
-- Pnt <P1>,<P2>,<P3>.
-- Its axis is <P1P2> and the radius of its base is
-- the distance between <P3> and <P1P2>.
-- The distance between <P4> and <P1P2> is the radius of
-- the section passing through <P4>.
-- An error iss raised if <P1>,<P2>,<P3>,<P4> are
-- colinear or if <P3P4> is perpendicular to <P1P2> or
-- <P3P4> is colinear to <P1P2>.
Create(Axis : Ax1 from gp;
P1,P2 : Pnt from gp) returns MakeConicalSurface;
---Purpose: Make a ConicalSurface by its axis <Axis> and and two points.
Create(Axis : Lin from gp;
P1,P2 : Pnt from gp) returns MakeConicalSurface;
---Purpose: Make a ConicalSurface by its axis <Axis> and and two points.
Create(P1 : Pnt from gp ;
P2 : Pnt from gp ;
R1 : Real from Standard;
R2 : Real from Standard) returns MakeConicalSurface;
---Purpose: Make a ConicalSurface with two points and two radius.
-- The axis of the solution is the line passing through
-- <P1> and <P2>.
-- <R1> is the radius of the section passing through <P1>
-- and <R2> the radius of the section passing through <P2>.
Value(me) returns ConicalSurface from Geom
raises NotDone
is static;
---Purpose: Returns the constructed cone.
-- Exceptions
-- StdFail_NotDone if no cone is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_ConicalSurface)& () const { return Value(); }"
fields
TheCone : ConicalSurface from Geom;
--The solution from Geom.
end MakeConicalSurface;

View File

@@ -14,11 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeConicalSurface.ixx>
#include <GC_MakeConicalSurface.hxx>
#include <gce_MakeCone.hxx>
#include <Geom_ConicalSurface.hxx>
#include <gp.hxx>
#include <StdFail_NotDone.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Cone.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Ax2& A2 ,
const Standard_Real Ang ,

View File

@@ -0,0 +1,152 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeConicalSurface_HeaderFile
#define _GC_MakeConicalSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_ConicalSurface;
class StdFail_NotDone;
class gp_Ax2;
class gp_Cone;
class gp_Pnt;
class gp_Ax1;
class gp_Lin;
//! This class implements the following algorithms used
//! to create a ConicalSurface from Geom.
//! * Create a ConicalSurface parallel to another and passing
//! through a point.
//! * Create a ConicalSurface parallel to another at a distance
//! <Dist>.
//! * Create a ConicalSurface by 4 points.
//! * Create a ConicalSurface by its axis and 2 points.
//! * Create a ConicalSurface by 2 points and 2 radius.
//! The local coordinate system of the ConicalSurface is defined
//! with an axis placement (see class ElementarySurface).
//!
//! The "ZAxis" is the symmetry axis of the ConicalSurface,
//! it gives the direction of increasing parametric value V.
//! The apex of the surface is on the negative side of this axis.
//!
//! The parametrization range is :
//! U [0, 2*PI], V ]-infinite, + infinite[
//!
//! The "XAxis" and the "YAxis" define the placement plane of the
//! surface (Z = 0, and parametric value V = 0) perpendicular to
//! the symmetry axis. The "XAxis" defines the origin of the
//! parameter U = 0. The trigonometric sense gives the positive
//! orientation for the parameter U.
//!
//! When you create a ConicalSurface the U and V directions of
//! parametrization are such that at each point of the surface the
//! normal is oriented towards the "outside region".
class GC_MakeConicalSurface : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! A2 defines the local coordinate system of the conical surface.
//! Ang is the conical surface semi-angle ]0, PI/2[.
//! Radius is the radius of the circle Viso in the placement plane
//! of the conical surface defined with "XAxis" and "YAxis".
//! The "ZDirection" of A2 defines the direction of the surface's
//! axis of symmetry.
//! If the location point of A2 is the apex of the surface
//! Radius = 0 .
//! At the creation the parametrization of the surface is defined
//! such that the normal Vector (N = D1U ^ D1V) is oriented towards
//! the "outside region" of the surface.
//! Status is "NegativeRadius" if Radius < 0.0 or "BadAngle" if
//! Ang < Resolution from gp or Ang >= PI/ - Resolution
Standard_EXPORT GC_MakeConicalSurface(const gp_Ax2& A2, const Standard_Real Ang, const Standard_Real Radius);
//! Creates a ConicalSurface from a non persistent Cone from package gp.
Standard_EXPORT GC_MakeConicalSurface(const gp_Cone& C);
//! Make a ConicalSurface from Geom <TheCone> parallel to another
//! ConicalSurface <Cone> and passing through a Pnt <Point>.
Standard_EXPORT GC_MakeConicalSurface(const gp_Cone& Cone, const gp_Pnt& Point);
//! Make a ConicalSurface from Geom <TheCone> parallel to another
//! ConicalSurface <Cone> at the distance <Dist> which can
//! be greater or lower than zero.
Standard_EXPORT GC_MakeConicalSurface(const gp_Cone& Cone, const Standard_Real Dist);
//! Make a ConicalSurface from Geom <TheCone> passing through 3
//! Pnt <P1>,<P2>,<P3>.
//! Its axis is <P1P2> and the radius of its base is
//! the distance between <P3> and <P1P2>.
//! The distance between <P4> and <P1P2> is the radius of
//! the section passing through <P4>.
//! An error iss raised if <P1>,<P2>,<P3>,<P4> are
//! colinear or if <P3P4> is perpendicular to <P1P2> or
//! <P3P4> is colinear to <P1P2>.
Standard_EXPORT GC_MakeConicalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4);
//! Make a ConicalSurface by its axis <Axis> and and two points.
Standard_EXPORT GC_MakeConicalSurface(const gp_Ax1& Axis, const gp_Pnt& P1, const gp_Pnt& P2);
//! Make a ConicalSurface by its axis <Axis> and and two points.
Standard_EXPORT GC_MakeConicalSurface(const gp_Lin& Axis, const gp_Pnt& P1, const gp_Pnt& P2);
//! Make a ConicalSurface with two points and two radius.
//! The axis of the solution is the line passing through
//! <P1> and <P2>.
//! <R1> is the radius of the section passing through <P1>
//! and <R2> the radius of the section passing through <P2>.
Standard_EXPORT GC_MakeConicalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real R1, const Standard_Real R2);
//! Returns the constructed cone.
//! Exceptions
//! StdFail_NotDone if no cone is constructed.
Standard_EXPORT const Handle(Geom_ConicalSurface)& Value() const;
operator const Handle(Geom_ConicalSurface)& () const { return Value(); }
protected:
private:
Handle(Geom_ConicalSurface) TheCone;
};
#endif // _GC_MakeConicalSurface_HeaderFile

View File

@@ -1,123 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeCylindricalSurface from GC inherits Root from GC
---Purpose : This class implements the following algorithms used
-- to create a CylindricalSurface from Geom.
-- * Create a CylindricalSurface parallel to another and
-- passing through a point.
-- * Create a CylindricalSurface parallel to another at a
-- distance
-- <Dist>.
-- * Create a CylindricalSurface passing through 3 points.
-- * Create a CylindricalSurface by its axis and radius.
-- * Create a cylindricalSurface by its circular base.
-- The local coordinate system of the CylindricalSurface is defined
-- with an axis placement (see class ElementarySurface).
--
-- The "ZAxis" is the symmetry axis of the CylindricalSurface,
-- it gives the direction of increasing parametric value V.
--
-- The parametrization range is :
-- U [0, 2*PI], V ]- infinite, + infinite[
--
-- The "XAxis" and the "YAxis" define the placement plane of the
-- surface (Z = 0, and parametric value V = 0) perpendicular to
-- the symmetry axis. The "XAxis" defines the origin of the
-- parameter U = 0. The trigonometric sense gives the positive
-- orientation for the parameter U.
uses Pnt from gp,
Ax1 from gp,
Ax2 from gp,
Circ from gp,
Cylinder from gp,
CylindricalSurface from Geom,
Real from Standard
raises NotDone from StdFail
is
Create (A2 : Ax2; Radius : Real) returns MakeCylindricalSurface;
--- Purpose :
-- A2 defines the local coordinate system of the cylindrical surface.
-- The "ZDirection" of A2 defines the direction of the surface's
-- axis of symmetry.
-- At the creation the parametrization of the surface is defined
-- such that the normal Vector (N = D1U ^ D1V) is oriented towards
-- the "outside region" of the surface.
-- Warnings :
-- It is not forbidden to create a cylindrical surface with
-- Radius = 0.0
--- Status is "NegativeRadius" if Radius < 0.0
Create (C : Cylinder from gp) returns MakeCylindricalSurface;
--- Purpose :
-- Creates a CylindricalSurface from a non persistent Cylinder
-- from package gp.
Create(Cyl : Cylinder from gp;
Point : Pnt from gp) returns MakeCylindricalSurface;
---Purpose : Make a CylindricalSurface from Geom <TheCylinder>
-- parallel to another
-- CylindricalSurface <Cylinder> and passing through a
-- Pnt <Point>.
Create(Cyl : Cylinder from gp ;
Dist : Real from Standard) returns MakeCylindricalSurface;
---Purpose : Make a CylindricalSurface from Geom <TheCylinder>
-- parallel to another
-- CylindricalSurface <Cylinder> at the distance <Dist>
-- which can be greater or lower than zero.
-- The radius of the result is the absolute value of the
-- radius of <Cyl> plus <Dist>
Create(P1 : Pnt from gp;
P2 : Pnt from gp;
P3 : Pnt from gp) returns MakeCylindricalSurface;
---Purpose : Make a CylindricalSurface from Geom <TheCylinder>
-- passing through 3 Pnt <P1>,<P2>,<P3>.
-- Its axis is <P1P2> and its radius is the distance
-- between <P3> and <P1P2>
Create(Axis : Ax1 from gp ;
Radius : Real from Standard) returns MakeCylindricalSurface;
---Purpose: Make a CylindricalSurface by its axis <Axis> and radius
-- <Radius>.
Create(Circ : Circ from gp) returns MakeCylindricalSurface;
---Purpose: Make a CylindricalSurface by its circular base.
Value(me) returns CylindricalSurface from Geom
raises NotDone
is static;
---Purpose: Returns the constructed cylinder.
-- Exceptions StdFail_NotDone if no cylinder is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_CylindricalSurface)& () const { return Value(); }"
fields
TheCylinder : CylindricalSurface from Geom;
--The solution from Geom.
end MakeCylindricalSurface;

View File

@@ -14,9 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeCylindricalSurface.ixx>
#include <GC_MakeCylindricalSurface.hxx>
#include <gce_MakeCylinder.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Circ.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Cylinder& C)

View File

@@ -0,0 +1,140 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeCylindricalSurface_HeaderFile
#define _GC_MakeCylindricalSurface_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_CylindricalSurface;
class StdFail_NotDone;
class gp_Ax2;
class gp_Cylinder;
class gp_Pnt;
class gp_Ax1;
class gp_Circ;
//! This class implements the following algorithms used
//! to create a CylindricalSurface from Geom.
//! * Create a CylindricalSurface parallel to another and
//! passing through a point.
//! * Create a CylindricalSurface parallel to another at a
//! distance
//! <Dist>.
//! * Create a CylindricalSurface passing through 3 points.
//! * Create a CylindricalSurface by its axis and radius.
//! * Create a cylindricalSurface by its circular base.
//! The local coordinate system of the CylindricalSurface is defined
//! with an axis placement (see class ElementarySurface).
//!
//! The "ZAxis" is the symmetry axis of the CylindricalSurface,
//! it gives the direction of increasing parametric value V.
//!
//! The parametrization range is :
//! U [0, 2*PI], V ]- infinite, + infinite[
//!
//! The "XAxis" and the "YAxis" define the placement plane of the
//! surface (Z = 0, and parametric value V = 0) perpendicular to
//! the symmetry axis. The "XAxis" defines the origin of the
//! parameter U = 0. The trigonometric sense gives the positive
//! orientation for the parameter U.
class GC_MakeCylindricalSurface : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! A2 defines the local coordinate system of the cylindrical surface.
//! The "ZDirection" of A2 defines the direction of the surface's
//! axis of symmetry.
//! At the creation the parametrization of the surface is defined
//! such that the normal Vector (N = D1U ^ D1V) is oriented towards
//! the "outside region" of the surface.
//! Warnings :
//! It is not forbidden to create a cylindrical surface with
//! Radius = 0.0
//! Status is "NegativeRadius" if Radius < 0.0
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Ax2& A2, const Standard_Real Radius);
//! Creates a CylindricalSurface from a non persistent Cylinder
//! from package gp.
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& C);
//! Make a CylindricalSurface from Geom <TheCylinder>
//! parallel to another
//! CylindricalSurface <Cylinder> and passing through a
//! Pnt <Point>.
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& Cyl, const gp_Pnt& Point);
//! Make a CylindricalSurface from Geom <TheCylinder>
//! parallel to another
//! CylindricalSurface <Cylinder> at the distance <Dist>
//! which can be greater or lower than zero.
//! The radius of the result is the absolute value of the
//! radius of <Cyl> plus <Dist>
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Cylinder& Cyl, const Standard_Real Dist);
//! Make a CylindricalSurface from Geom <TheCylinder>
//! passing through 3 Pnt <P1>,<P2>,<P3>.
//! Its axis is <P1P2> and its radius is the distance
//! between <P3> and <P1P2>
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
//! Make a CylindricalSurface by its axis <Axis> and radius
//! <Radius>.
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Ax1& Axis, const Standard_Real Radius);
//! Make a CylindricalSurface by its circular base.
Standard_EXPORT GC_MakeCylindricalSurface(const gp_Circ& Circ);
//! Returns the constructed cylinder.
//! Exceptions StdFail_NotDone if no cylinder is constructed.
Standard_EXPORT const Handle(Geom_CylindricalSurface)& Value() const;
operator const Handle(Geom_CylindricalSurface)& () const { return Value(); }
protected:
private:
Handle(Geom_CylindricalSurface) TheCylinder;
};
#endif // _GC_MakeCylindricalSurface_HeaderFile

View File

@@ -1,82 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeEllipse from GC inherits Root from GC
---Purpose :This class implements construction algorithms for an ellipse in
-- 3D space. The result is a Geom_Ellipse ellipse.
-- A MakeEllipse object provides a framework for:
-- - defining the construction of the ellipse,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed ellipse.
uses Pnt from gp,
Ax2 from gp,
Hypr from gp,
Ellipse from Geom,
Elips from gp
raises NotDone from StdFail
is
Create (E : Elips from gp) returns MakeEllipse;
--- Purpose :
-- Creates an ellipse from a non persistent ellipse E from package gp by its conversion.
Create (A2 : Ax2 from gp ;
MajorRadius, MinorRadius : Real from Standard) returns MakeEllipse;
--- Purpose : Constructs an ellipse with major and minor radii MajorRadius and
-- MinorRadius, and located in the plane defined by
-- the "X Axis" and "Y Axis" of the coordinate system A2, where:
-- - its center is the origin of A2, and
-- - its major axis is the "X Axis" of A2;
-- Warnings :
-- The MakeEllipse class does not prevent the
-- construction of an ellipse where MajorRadius is equal to MinorRadius.
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_InvertRadius if MajorRadius is less than MinorRadius;
-- - gce_NegativeRadius if MinorRadius is less than 0.0;
-- - gce_NullAxis if the points S1 and Center are coincident; or
-- - gce_InvertAxis if:
-- - the major radius computed with Center and S1
-- is less than the minor radius computed with Center, S1 and S2, or
-- - Center, S1 and S2 are collinear.
Create(S1,S2 : Pnt from gp;
Center : Pnt from gp) returns MakeEllipse;
---Purpose: Constructs an ellipse centered on the point Center, where
-- - the plane of the ellipse is defined by Center, S1 and S2,
-- - its major axis is defined by Center and S1,
-- - its major radius is the distance between Center and S1, and
-- - its minor radius is the distance between S2 and the major axis.
Value(me) returns Ellipse from Geom
raises NotDone
is static;
---Purpose: Returns the constructed ellipse.
-- Exceptions StdFail_NotDone if no ellipse is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_Ellipse)& () const { return Value(); }"
fields
TheEllipse : Ellipse from Geom;
--The solution from Geom.
end MakeEllipse;

View File

@@ -14,8 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeEllipse.ixx>
#include <GC_MakeEllipse.hxx>
#include <gce_MakeElips.hxx>
#include <Geom_Ellipse.hxx>
#include <gp_Ax2.hxx>
#include <gp_Elips.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeEllipse::GC_MakeEllipse(const gp_Elips& E)

106
src/GC/GC_MakeEllipse.hxx Normal file
View File

@@ -0,0 +1,106 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeEllipse_HeaderFile
#define _GC_MakeEllipse_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_Ellipse;
class StdFail_NotDone;
class gp_Elips;
class gp_Ax2;
class gp_Pnt;
//! This class implements construction algorithms for an ellipse in
//! 3D space. The result is a Geom_Ellipse ellipse.
//! A MakeEllipse object provides a framework for:
//! - defining the construction of the ellipse,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed ellipse.
class GC_MakeEllipse : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an ellipse from a non persistent ellipse E from package gp by its conversion.
Standard_EXPORT GC_MakeEllipse(const gp_Elips& E);
//! Constructs an ellipse with major and minor radii MajorRadius and
//! MinorRadius, and located in the plane defined by
//! the "X Axis" and "Y Axis" of the coordinate system A2, where:
//! - its center is the origin of A2, and
//! - its major axis is the "X Axis" of A2;
//! Warnings :
//! The MakeEllipse class does not prevent the
//! construction of an ellipse where MajorRadius is equal to MinorRadius.
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_InvertRadius if MajorRadius is less than MinorRadius;
//! - gce_NegativeRadius if MinorRadius is less than 0.0;
//! - gce_NullAxis if the points S1 and Center are coincident; or
//! - gce_InvertAxis if:
//! - the major radius computed with Center and S1
//! is less than the minor radius computed with Center, S1 and S2, or
//! - Center, S1 and S2 are collinear.
Standard_EXPORT GC_MakeEllipse(const gp_Ax2& A2, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
//! Constructs an ellipse centered on the point Center, where
//! - the plane of the ellipse is defined by Center, S1 and S2,
//! - its major axis is defined by Center and S1,
//! - its major radius is the distance between Center and S1, and
//! - its minor radius is the distance between S2 and the major axis.
Standard_EXPORT GC_MakeEllipse(const gp_Pnt& S1, const gp_Pnt& S2, const gp_Pnt& Center);
//! Returns the constructed ellipse.
//! Exceptions StdFail_NotDone if no ellipse is constructed.
Standard_EXPORT const Handle(Geom_Ellipse)& Value() const;
operator const Handle(Geom_Ellipse)& () const { return Value(); }
protected:
private:
Handle(Geom_Ellipse) TheEllipse;
};
#endif // _GC_MakeEllipse_HeaderFile

View File

@@ -1,91 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeHyperbola from GC inherits Root from GC
---Purpose :This class implements construction algorithms for a hyperbola in
-- 3D space. The result is a Geom_Hyperbola hyperbola.
-- A MakeHyperbola object provides a framework for:
-- - defining the construction of the hyperbola,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed hyperbola.
-- To define the main branch of an hyperbola.
-- The parameterization range is ]-infinite,+infinite[
-- It is possible to get the other branch and the two conjugate
-- branches of the main branch.
--
-- ^YAxis
-- |
-- FirstConjugateBranch
-- |
-- Other | Main
-- --------------------- C ------------------------------>XAxis
-- Branch | Branch
-- |
-- SecondConjugateBranch
-- |
--
-- The major radius is the distance between the Location point
-- of the hyperbola C and the apex of the Main Branch (or the
-- Other branch). The major axis is the XAxis.
-- The minor radius is the distance between the Location point
-- of the hyperbola C and the apex of the First (or Second)
-- Conjugate branch. The minor axis is the YAxis.
-- The major radius can be lower than the minor radius.
uses Pnt from gp,
Hypr from gp,
Ax2 from gp,
Hyperbola from Geom
raises NotDone from StdFail
is
Create (H : Hypr from gp) returns MakeHyperbola;
--- Purpose :
-- Creates an Hyperbola from a non persistent hyperbola from package gp by conversion.
Create (A2 : Ax2 from gp ;
MajorRadius, MinorRadius : Real from Standard) returns MakeHyperbola;
--- Purpose : Constructs a hyperbola centered on the origin of the coordinate system
-- A2, with major and minor radii MajorRadius and MinorRadius, where:
-- the plane of the hyperbola is defined by the "X Axis" and "Y Axis" of A2,
-- - its major axis is the "X Axis" of A2.
Create(S1,S2 : Pnt from gp;
Center : Pnt from gp) returns MakeHyperbola;
---Purpose: Constructs a hyperbola centered on the point Center, where
-- - the plane of the hyperbola is defined by Center, S1 and S2,
-- - its major axis is defined by Center and S1,
-- - its major radius is the distance between Center and S1, and
-- - its minor radius is the distance between S2 and the major axis;
Value(me) returns Hyperbola from Geom
raises NotDone
is static;
---Purpose: Returns the constructed hyperbola.
-- Exceptions StdFail_NotDone if no hyperbola is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_Hyperbola)& () const { return Value(); }"
fields
TheHyperbola : Hyperbola from Geom;
--The solution from Geom.
end MakeHyperbola;

View File

@@ -14,8 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeHyperbola.ixx>
#include <GC_MakeHyperbola.hxx>
#include <gce_MakeHypr.hxx>
#include <Geom_Hyperbola.hxx>
#include <gp_Ax2.hxx>
#include <gp_Hypr.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeHyperbola::GC_MakeHyperbola(const gp_Hypr& H)

116
src/GC/GC_MakeHyperbola.hxx Normal file
View File

@@ -0,0 +1,116 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeHyperbola_HeaderFile
#define _GC_MakeHyperbola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_Hyperbola;
class StdFail_NotDone;
class gp_Hypr;
class gp_Ax2;
class gp_Pnt;
//! This class implements construction algorithms for a hyperbola in
//! 3D space. The result is a Geom_Hyperbola hyperbola.
//! A MakeHyperbola object provides a framework for:
//! - defining the construction of the hyperbola,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed hyperbola.
//! To define the main branch of an hyperbola.
//! The parameterization range is ]-infinite,+infinite[
//! It is possible to get the other branch and the two conjugate
//! branches of the main branch.
//!
//! ^YAxis
//! |
//! FirstConjugateBranch
//! |
//! Other | Main
//! --------------------- C ------------------------------>XAxis
//! Branch | Branch
//! |
//! SecondConjugateBranch
//! |
//!
//! The major radius is the distance between the Location point
//! of the hyperbola C and the apex of the Main Branch (or the
//! Other branch). The major axis is the XAxis.
//! The minor radius is the distance between the Location point
//! of the hyperbola C and the apex of the First (or Second)
//! Conjugate branch. The minor axis is the YAxis.
//! The major radius can be lower than the minor radius.
class GC_MakeHyperbola : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an Hyperbola from a non persistent hyperbola from package gp by conversion.
Standard_EXPORT GC_MakeHyperbola(const gp_Hypr& H);
//! Constructs a hyperbola centered on the origin of the coordinate system
//! A2, with major and minor radii MajorRadius and MinorRadius, where:
//! the plane of the hyperbola is defined by the "X Axis" and "Y Axis" of A2,
//! - its major axis is the "X Axis" of A2.
Standard_EXPORT GC_MakeHyperbola(const gp_Ax2& A2, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
//! Constructs a hyperbola centered on the point Center, where
//! - the plane of the hyperbola is defined by Center, S1 and S2,
//! - its major axis is defined by Center and S1,
//! - its major radius is the distance between Center and S1, and
//! - its minor radius is the distance between S2 and the major axis;
Standard_EXPORT GC_MakeHyperbola(const gp_Pnt& S1, const gp_Pnt& S2, const gp_Pnt& Center);
//! Returns the constructed hyperbola.
//! Exceptions StdFail_NotDone if no hyperbola is constructed.
Standard_EXPORT const Handle(Geom_Hyperbola)& Value() const;
operator const Handle(Geom_Hyperbola)& () const { return Value(); }
protected:
private:
Handle(Geom_Hyperbola) TheHyperbola;
};
#endif // _GC_MakeHyperbola_HeaderFile

View File

@@ -1,84 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeLine from GC inherits Root from GC
---Purpose : This class implements the following algorithms used
-- to create a Line from Geom.
-- * Create a Line parallel to another and passing
-- through a point.
-- * Create a Line passing through 2 points.
-- A MakeLine object provides a framework for:
-- - defining the construction of the line,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed line.
uses Pnt from gp,
Lin from gp,
Ax1 from gp,
Dir from gp,
Line from Geom,
Real from Standard
raises NotDone from StdFail
is
Create (A1 : Ax1 from gp) returns MakeLine;
--- Purpose :
-- Creates a line located in 3D space with the axis placement A1.
-- The Location of A1 is the origin of the line.
Create (L : Lin from gp) returns MakeLine;
--- Purpose :
-- Creates a line from a non persistent line from package gp.
Create (P : Pnt from gp;
V : Dir from gp) returns MakeLine;
--- Purpose :
-- P is the origin and V is the direction of the line.
Create(Lin : Lin from gp;
Point : Pnt from gp) returns MakeLine;
---Purpose : Make a Line from Geom <TheLin> parallel to another
-- Lin <Lin> and passing through a Pnt <Point>.
Create(P1 : Pnt from gp;
P2 : Pnt from gp) returns MakeLine;
---Purpose : Make a Line from Geom <TheLin> passing through 2
-- Pnt <P1>,<P2>.
-- It returns false if <p1> and <P2> are confused.
-- Warning
-- If the points P1 and P2 are coincident (that is, when
-- IsDone returns false), the Status function returns gce_ConfusedPoints.
Value(me) returns Line from Geom
raises NotDone
is static;
---Purpose: Returns the constructed line.
-- Exceptions StdFail_NotDone if no line is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_Line)& () const { return Value(); }"
fields
TheLine : Line from Geom;
--The solution from Geom.
end MakeLine;

View File

@@ -14,14 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeLine.ixx>
#include <GC_MakeLine.hxx>
#include <gce_MakeLin.hxx>
#include <Geom_Line.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Constructions of 3d geometrical elements from Geom.
//=========================================================================
GC_MakeLine::GC_MakeLine(const gp_Pnt& P ,
const gp_Dir& V )
{

104
src/GC/GC_MakeLine.hxx Normal file
View File

@@ -0,0 +1,104 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeLine_HeaderFile
#define _GC_MakeLine_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
class Geom_Line;
class StdFail_NotDone;
class gp_Ax1;
class gp_Lin;
class gp_Pnt;
class gp_Dir;
//! This class implements the following algorithms used
//! to create a Line from Geom.
//! * Create a Line parallel to another and passing
//! through a point.
//! * Create a Line passing through 2 points.
//! A MakeLine object provides a framework for:
//! - defining the construction of the line,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed line.
class GC_MakeLine : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a line located in 3D space with the axis placement A1.
//! The Location of A1 is the origin of the line.
Standard_EXPORT GC_MakeLine(const gp_Ax1& A1);
//! Creates a line from a non persistent line from package gp.
Standard_EXPORT GC_MakeLine(const gp_Lin& L);
//! P is the origin and V is the direction of the line.
Standard_EXPORT GC_MakeLine(const gp_Pnt& P, const gp_Dir& V);
//! Make a Line from Geom <TheLin> parallel to another
//! Lin <Lin> and passing through a Pnt <Point>.
Standard_EXPORT GC_MakeLine(const gp_Lin& Lin, const gp_Pnt& Point);
//! Make a Line from Geom <TheLin> passing through 2
//! Pnt <P1>,<P2>.
//! It returns false if <p1> and <P2> are confused.
//! Warning
//! If the points P1 and P2 are coincident (that is, when
//! IsDone returns false), the Status function returns gce_ConfusedPoints.
Standard_EXPORT GC_MakeLine(const gp_Pnt& P1, const gp_Pnt& P2);
//! Returns the constructed line.
//! Exceptions StdFail_NotDone if no line is constructed.
Standard_EXPORT const Handle(Geom_Line)& Value() const;
operator const Handle(Geom_Line)& () const { return Value(); }
protected:
private:
Handle(Geom_Line) TheLine;
};
#endif // _GC_MakeLine_HeaderFile

View File

@@ -1,71 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeMirror
from GC
---Purpose: This class implements elementary construction algorithms for a
-- symmetrical transformation in 3D space about a point,
-- axis or plane. The result is a Geom_Transformation transformation.
-- A MakeMirror object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt from gp,
Ax1 from gp,
Ax2 from gp,
Dir from gp,
Pln from gp,
Lin from gp,
Transformation from Geom,
Real from Standard
is
Create(Point : Pnt from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of center <Point>.
Create(Axis : Ax1 from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of axis <Axis>.
Create(Line : Lin from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of axis <Line>.
Create(Point : Pnt from gp;
Direc : Dir from gp) returns MakeMirror;
---Purpose: Make a symetry transformation af axis defined by
-- <Point> and <Direc>.
Create(Plane : Pln from gp) returns MakeMirror;
---Purpose: Make a symetry transformation of plane <Plane>.
Create(Plane : Ax2 from gp) returns MakeMirror;
---Purpose: Make a symetry transformation of plane <Plane>.
Value(me) returns Transformation from Geom
is static;
---Purpose: Returns the constructed transformation.
---C++: return const&
---C++: alias "operator const Handle(Geom_Transformation)& () const { return Value(); }"
fields
TheMirror : Transformation from Geom;
end MakeMirror;

View File

@@ -14,15 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeMirror.ixx>
#include <GC_MakeMirror.hxx>
#include <Geom_Transformation.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation d une symetrie de Geom par rapport a un point. +
//=========================================================================
GC_MakeMirror::GC_MakeMirror(const gp_Pnt& Point ) {
TheMirror = new Geom_Transformation();
TheMirror->SetMirror(Point);

91
src/GC/GC_MakeMirror.hxx Normal file
View File

@@ -0,0 +1,91 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeMirror_HeaderFile
#define _GC_MakeMirror_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom_Transformation;
class gp_Pnt;
class gp_Ax1;
class gp_Lin;
class gp_Dir;
class gp_Pln;
class gp_Ax2;
//! This class implements elementary construction algorithms for a
//! symmetrical transformation in 3D space about a point,
//! axis or plane. The result is a Geom_Transformation transformation.
//! A MakeMirror object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GC_MakeMirror
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GC_MakeMirror(const gp_Pnt& Point);
Standard_EXPORT GC_MakeMirror(const gp_Ax1& Axis);
Standard_EXPORT GC_MakeMirror(const gp_Lin& Line);
//! Make a symetry transformation af axis defined by
//! <Point> and <Direc>.
Standard_EXPORT GC_MakeMirror(const gp_Pnt& Point, const gp_Dir& Direc);
//! Make a symetry transformation of plane <Plane>.
Standard_EXPORT GC_MakeMirror(const gp_Pln& Plane);
//! Make a symetry transformation of plane <Plane>.
Standard_EXPORT GC_MakeMirror(const gp_Ax2& Plane);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom_Transformation)& Value() const;
operator const Handle(Geom_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom_Transformation) TheMirror;
};
#endif // _GC_MakeMirror_HeaderFile

View File

@@ -1,109 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakePlane from GC inherits Root from GC
---Purpose : This class implements the following algorithms used
-- to create a Plane from gp.
-- * Create a Plane parallel to another and passing
-- through a point.
-- * Create a Plane passing through 3 points.
-- * Create a Plane by its normal
-- A MakePlane object provides a framework for:
-- - defining the construction of the plane,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed plane.
uses Pnt from gp,
Pln from gp,
Ax2 from gp,
Dir from gp,
Plane from Geom,
Ax1 from gp,
Real from Standard
raises NotDone from StdFail
is
Create (A2 : Ax2) returns MakePlane;
--- Purpose :
-- Creates a plane located in 3D space with an axis placement
-- two axis. The "ZDirection" of "A2" is the direction normal
-- to the plane. The "Location" point of "A2" is the origin of
-- the plane. The "XDirection" and "YDirection" of "A2" define
-- the directions of the U isoparametric and V isoparametric
-- curves.
Create (Pl : Pln from gp) returns MakePlane;
--- Purpose :
-- Creates a plane from a non persistent plane from package gp.
Create (P : Pnt from gp;
V : Dir from gp) returns MakePlane;
--- Purpose :
-- P is the "Location" point or origin of the plane.
-- V is the direction normal to the plane.
Create (A, B, C ,D : Real from Standard) returns MakePlane;
--- Purpose :
-- Creates a plane from its cartesian equation :
-- Ax + By + Cz + D = 0.0
-- Status is "BadEquation" if Sqrt (A*A + B*B + C*C)
-- <= Resolution from gp
Create(Pln : Pln from gp;
Point : Pnt from gp) returns MakePlane;
---Purpose : Make a Plane from Geom <ThePlane> parallel to another
-- Pln <Pln> and passing through a Pnt <Point>.
Create(Pln : Pln from gp ;
Dist : Real from Standard) returns MakePlane;
---Purpose : Make a Plane from Geom <ThePlane> parallel to another
-- Pln <Pln> at the distance <Dist> which can be greater
-- or lower than zero.
-- In the first case the result is at the distance
-- <Dist> to the plane <Pln> in the direction of the
-- normal to <Pln>.
-- Otherwize it is in the oposite direction.
Create(P1 : Pnt from gp;
P2 : Pnt from gp;
P3 : Pnt from gp) returns MakePlane;
---Purpose : Make a Plane from Geom <ThePlane> passing through 3
-- Pnt <P1>,<P2>,<P3>.
-- It returns false if <P1> <P2> <P3> are confused.
Create(Axis : Ax1 from gp) returns MakePlane;
---Purpose: Make a Plane passing through the location of <Axis>and
-- normal to the Direction of <Axis>.
Value(me) returns Plane from Geom
raises NotDone
is static;
---Purpose: Returns the constructed plane.
-- Exceptions StdFail_NotDone if no plane is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_Plane)& () const { return Value(); }"
fields
ThePlane : Plane from Geom;
--The solution from Geom.
end MakePlane;

View File

@@ -14,14 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakePlane.ixx>
#include <gce_MakePln.hxx>
#include <gp.hxx>
#include <gp_Ax3.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_NotImplemented.hxx>
#include <GC_MakePlane.hxx>
#include <gce_MakePln.hxx>
#include <Geom_Plane.hxx>
#include <gp.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
#include <TColgp_Array1OfPnt.hxx>
GC_MakePlane::GC_MakePlane(const gp_Ax2& ) //A2)
{

129
src/GC/GC_MakePlane.hxx Normal file
View File

@@ -0,0 +1,129 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakePlane_HeaderFile
#define _GC_MakePlane_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_Plane;
class StdFail_NotDone;
class gp_Ax2;
class gp_Pln;
class gp_Pnt;
class gp_Dir;
class gp_Ax1;
//! This class implements the following algorithms used
//! to create a Plane from gp.
//! * Create a Plane parallel to another and passing
//! through a point.
//! * Create a Plane passing through 3 points.
//! * Create a Plane by its normal
//! A MakePlane object provides a framework for:
//! - defining the construction of the plane,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed plane.
class GC_MakePlane : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a plane located in 3D space with an axis placement
//! two axis. The "ZDirection" of "A2" is the direction normal
//! to the plane. The "Location" point of "A2" is the origin of
//! the plane. The "XDirection" and "YDirection" of "A2" define
//! the directions of the U isoparametric and V isoparametric
//! curves.
Standard_EXPORT GC_MakePlane(const gp_Ax2& A2);
//! Creates a plane from a non persistent plane from package gp.
Standard_EXPORT GC_MakePlane(const gp_Pln& Pl);
//! P is the "Location" point or origin of the plane.
//! V is the direction normal to the plane.
Standard_EXPORT GC_MakePlane(const gp_Pnt& P, const gp_Dir& V);
//! Creates a plane from its cartesian equation :
//! Ax + By + Cz + D = 0.0
//! Status is "BadEquation" if Sqrt (A*A + B*B + C*C)
//! <= Resolution from gp
Standard_EXPORT GC_MakePlane(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D);
//! Make a Plane from Geom <ThePlane> parallel to another
//! Pln <Pln> and passing through a Pnt <Point>.
Standard_EXPORT GC_MakePlane(const gp_Pln& Pln, const gp_Pnt& Point);
//! Make a Plane from Geom <ThePlane> parallel to another
//! Pln <Pln> at the distance <Dist> which can be greater
//! or lower than zero.
//! In the first case the result is at the distance
//! <Dist> to the plane <Pln> in the direction of the
//! normal to <Pln>.
//! Otherwize it is in the oposite direction.
Standard_EXPORT GC_MakePlane(const gp_Pln& Pln, const Standard_Real Dist);
//! Make a Plane from Geom <ThePlane> passing through 3
//! Pnt <P1>,<P2>,<P3>.
//! It returns false if <P1> <P2> <P3> are confused.
Standard_EXPORT GC_MakePlane(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
//! Make a Plane passing through the location of <Axis>and
//! normal to the Direction of <Axis>.
Standard_EXPORT GC_MakePlane(const gp_Ax1& Axis);
//! Returns the constructed plane.
//! Exceptions StdFail_NotDone if no plane is constructed.
Standard_EXPORT const Handle(Geom_Plane)& Value() const;
operator const Handle(Geom_Plane)& () const { return Value(); }
protected:
private:
Handle(Geom_Plane) ThePlane;
};
#endif // _GC_MakePlane_HeaderFile

View File

@@ -1,60 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeRotation
from GC
---Purpose: This class implements elementary construction algorithms for a
-- rotation in 3D space. The result is a
-- Geom_Transformation transformation.
-- A MakeRotation object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt from gp,
Lin from gp,
Ax1 from gp,
Dir from gp,
Transformation from Geom,
Real from Standard
is
Create(Line : Lin from gp ;
Angle : Real from Standard) returns MakeRotation;
--- Purpose: Constructs a rotation through angle Angle about the axis defined by the line Line.
Create(Axis : Ax1 from gp ;
Angle : Real from Standard) returns MakeRotation;
---Purpose: Constructs a rotation through angle Angle about the axis defined by the axis Axis.
Create(Point : Pnt from gp ;
Direc : Dir from gp ;
Angle : Real from Standard) returns MakeRotation;
---Purpose: Constructs a rotation through angle Angle about the axis
-- defined by the point Point and the unit vector Direc.
Value(me) returns Transformation from Geom
is static;
---Purpose: Returns the constructed transformation.
---C++: return const&
---C++: alias "operator const Handle(Geom_Transformation)& () const { return Value(); }"
fields
TheRotation : Transformation from Geom;
end MakeRotation;

View File

@@ -14,15 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeRotation.ixx>
#include <GC_MakeRotation.hxx>
#include <Geom_Transformation.hxx>
#include <gp_Ax1.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation d une rotation 3d de gp d angle Angle par rapport a une +
// droite Line. +
//=========================================================================
GC_MakeRotation::GC_MakeRotation(const gp_Lin& Line ,
const Standard_Real Angle ) {
TheRotation = new Geom_Transformation();

View File

@@ -0,0 +1,84 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeRotation_HeaderFile
#define _GC_MakeRotation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
class Geom_Transformation;
class gp_Lin;
class gp_Ax1;
class gp_Pnt;
class gp_Dir;
//! This class implements elementary construction algorithms for a
//! rotation in 3D space. The result is a
//! Geom_Transformation transformation.
//! A MakeRotation object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GC_MakeRotation
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a rotation through angle Angle about the axis defined by the line Line.
Standard_EXPORT GC_MakeRotation(const gp_Lin& Line, const Standard_Real Angle);
//! Constructs a rotation through angle Angle about the axis defined by the axis Axis.
Standard_EXPORT GC_MakeRotation(const gp_Ax1& Axis, const Standard_Real Angle);
//! Constructs a rotation through angle Angle about the axis
//! defined by the point Point and the unit vector Direc.
Standard_EXPORT GC_MakeRotation(const gp_Pnt& Point, const gp_Dir& Direc, const Standard_Real Angle);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom_Transformation)& Value() const;
operator const Handle(Geom_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom_Transformation) TheRotation;
};
#endif // _GC_MakeRotation_HeaderFile

View File

@@ -1,53 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeScale
from GC
---Purpose: This class implements an elementary construction algorithm for
-- a scaling transformation in 3D space. The result is a
-- Geom_Transformation transformation (a scaling transformation with
-- the center point <Point> and the scaling value <Scale>).
-- A MakeScale object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt from gp,
Transformation from Geom,
Real from Standard
is
Create(Point : Pnt from gp ;
Scale : Real from Standard) returns MakeScale;
---Purpose: Constructs a scaling transformation with
-- - Point as the center of the transformation, and
-- - Scale as the scale factor.
Value(me) returns Transformation from Geom
is static;
---Purpose: Returns the constructed transformation.
---C++: return const&
---C++: alias "operator const Handle(Geom_Transformation)& () const { return Value(); }"
fields
TheScale : Transformation from Geom;
end MakeScale;

View File

@@ -14,14 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeScale.ixx>
#include <GC_MakeScale.hxx>
#include <Geom_Transformation.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation d un homothetie de gp de centre Point et de rapport Scale. +
//=========================================================================
GC_MakeScale::GC_MakeScale(const gp_Pnt& Point ,
const Standard_Real Scale ) {
TheScale = new Geom_Transformation();

77
src/GC/GC_MakeScale.hxx Normal file
View File

@@ -0,0 +1,77 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeScale_HeaderFile
#define _GC_MakeScale_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
class Geom_Transformation;
class gp_Pnt;
//! This class implements an elementary construction algorithm for
//! a scaling transformation in 3D space. The result is a
//! Geom_Transformation transformation (a scaling transformation with
//! the center point <Point> and the scaling value <Scale>).
//! A MakeScale object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GC_MakeScale
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a scaling transformation with
//! - Point as the center of the transformation, and
//! - Scale as the scale factor.
Standard_EXPORT GC_MakeScale(const gp_Pnt& Point, const Standard_Real Scale);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom_Transformation)& Value() const;
operator const Handle(Geom_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom_Transformation) TheScale;
};
#endif // _GC_MakeScale_HeaderFile

View File

@@ -1,74 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeSegment from GC inherits Root from GC
--- Purpose: Implements construction algorithms for a line
-- segment in 3D space.
-- Makes a segment of Line from the 2 points <P1> and <P2>.
-- The result is a Geom_TrimmedCurve curve.
-- A MakeSegment object provides a framework for:
-- - defining the construction of the line segment,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed line segment.
uses Pnt from gp,
Real from Standard,
Lin from gp,
TrimmedCurve from Geom
raises NotDone from StdFail
is
Create(P1, P2 : Pnt from gp ) returns MakeSegment;
---Purpose: Make a segment of Line from the 2 points <P1> and <P2>.
-- It returns NullObject if <P1> and <P2> are confused.
Create(Line : Lin from gp ;
U1, U2 : Real from Standard ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line1>
-- between the two parameters U1 and U2.
-- It returns NullObject if <U1> is equal <U2>.
Create(Line : Lin from gp ;
Point : Pnt from gp ;
Ulast : Real from Standard ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line1>
-- between the point <Point> and the parameter Ulast.
-- It returns NullObject if <U1> is equal <U2>.
Create(Line : Lin from gp ;
P1 : Pnt from gp ;
P2 : Pnt from gp ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line1>
-- between the two points <P1> and <P2>.
-- It returns NullObject if <U1> is equal <U2>.
Value(me) returns TrimmedCurve from Geom
raises NotDone
is static;
---Purpose: Returns the constructed line segment.
---C++: return const&
---C++: alias "operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }"
fields
TheSegment : TrimmedCurve from Geom;
--The solution from Geom.
end MakeSegment;

View File

@@ -14,11 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeSegment.ixx>
#include <GC_MakeLine.hxx>
#include <Geom_Line.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
#include <GC_MakeLine.hxx>
#include <GC_MakeSegment.hxx>
#include <Geom_Line.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
GC_MakeSegment::GC_MakeSegment(const gp_Pnt& P1 ,
const gp_Pnt& P2 )

95
src/GC/GC_MakeSegment.hxx Normal file
View File

@@ -0,0 +1,95 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeSegment_HeaderFile
#define _GC_MakeSegment_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_TrimmedCurve;
class StdFail_NotDone;
class gp_Pnt;
class gp_Lin;
//! Implements construction algorithms for a line
//! segment in 3D space.
//! Makes a segment of Line from the 2 points <P1> and <P2>.
//! The result is a Geom_TrimmedCurve curve.
//! A MakeSegment object provides a framework for:
//! - defining the construction of the line segment,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed line segment.
class GC_MakeSegment : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make a segment of Line from the 2 points <P1> and <P2>.
//! It returns NullObject if <P1> and <P2> are confused.
Standard_EXPORT GC_MakeSegment(const gp_Pnt& P1, const gp_Pnt& P2);
//! Make a segment of Line from the line <Line1>
//! between the two parameters U1 and U2.
//! It returns NullObject if <U1> is equal <U2>.
Standard_EXPORT GC_MakeSegment(const gp_Lin& Line, const Standard_Real U1, const Standard_Real U2);
//! Make a segment of Line from the line <Line1>
//! between the point <Point> and the parameter Ulast.
//! It returns NullObject if <U1> is equal <U2>.
Standard_EXPORT GC_MakeSegment(const gp_Lin& Line, const gp_Pnt& Point, const Standard_Real Ulast);
//! Make a segment of Line from the line <Line1>
//! between the two points <P1> and <P2>.
//! It returns NullObject if <U1> is equal <U2>.
Standard_EXPORT GC_MakeSegment(const gp_Lin& Line, const gp_Pnt& P1, const gp_Pnt& P2);
//! Returns the constructed line segment.
Standard_EXPORT const Handle(Geom_TrimmedCurve)& Value() const;
operator const Handle(Geom_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom_TrimmedCurve) TheSegment;
};
#endif // _GC_MakeSegment_HeaderFile

View File

@@ -1,54 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeTranslation
from GC
---Purpose: This class implements elementary construction algorithms for a
-- translation in 3D space. The result is a
-- Geom_Transformation transformation.
-- A MakeTranslation object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt from gp,
Transformation from Geom,
Vec from gp,
Real from Standard
is
Create(Vect : Vec from gp) returns MakeTranslation;
---Purpose: Constructs a translation along the vector " Vect "
Create(Point1 : Pnt from gp;
Point2 : Pnt from gp) returns MakeTranslation;
---Purpose: Constructs a translation along the vector (Point1,Point2)
-- defined from the point Point1 to the point Point2.
Value(me) returns Transformation from Geom
is static;
---Purpose: Returns the constructed transformation.
---C++: return const&
---C++: alias "operator const Handle(Geom_Transformation)& () const { return Value(); }"
fields
TheTranslation : Transformation from Geom;
end MakeTranslation;

View File

@@ -14,14 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeTranslation.ixx>
#include <GC_MakeTranslation.hxx>
#include <Geom_Transformation.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation of a 3D Geom translation of tanslation vector Vec. +
//=========================================================================
GC_MakeTranslation::GC_MakeTranslation(const gp_Vec& Vec ) {
TheTranslation = new Geom_Transformation();
TheTranslation->SetTranslation(Vec);

View File

@@ -0,0 +1,78 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeTranslation_HeaderFile
#define _GC_MakeTranslation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom_Transformation;
class gp_Vec;
class gp_Pnt;
//! This class implements elementary construction algorithms for a
//! translation in 3D space. The result is a
//! Geom_Transformation transformation.
//! A MakeTranslation object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GC_MakeTranslation
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a translation along the vector " Vect "
Standard_EXPORT GC_MakeTranslation(const gp_Vec& Vect);
//! Constructs a translation along the vector (Point1,Point2)
//! defined from the point Point1 to the point Point2.
Standard_EXPORT GC_MakeTranslation(const gp_Pnt& Point1, const gp_Pnt& Point2);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom_Transformation)& Value() const;
operator const Handle(Geom_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom_Transformation) TheTranslation;
};
#endif // _GC_MakeTranslation_HeaderFile

View File

@@ -1,81 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeTrimmedCone from GC inherits Root from GC
--- Purpose: Implements construction algorithms for a trimmed
-- cone limited by two planes orthogonal to its axis. The
-- result is a Geom_RectangularTrimmedSurface surface.
-- A MakeTrimmedCone provides a framework for:
-- - defining the construction of the trimmed cone,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed trimmed cone.
uses Pnt from gp,
Ax1 from gp,
Lin from gp,
Cone from gp,
RectangularTrimmedSurface from Geom,
Real from Standard
raises NotDone from StdFail
is
Create(P1,P2,P3,P4 : Pnt from gp ) returns MakeTrimmedCone;
---Purpose: Make a RectangularTrimmedSurface <TheCone> from Geom
-- It is trimmed by P3 and P4.
-- Its axis is <P1P2> and the radius of its base is
-- the distance between <P3> and <P1P2>.
-- The distance between <P4> and <P1P2> is the radius of
-- the section passing through <P4>.
-- An error iss raised if <P1>,<P2>,<P3>,<P4> are
-- colinear or if <P3P4> is perpendicular to <P1P2> or
-- <P3P4> is colinear to <P1P2>.
Create(P1,P2 : Pnt from gp ;
R1,R2 : Real from Standard) returns MakeTrimmedCone;
---Purpose : Make a RectangularTrimmedSurface from Geom <TheCone>
-- from a cone and trimmed by two points P1 and P2 and
-- the two radius <R1> and <R2> of the sections passing
-- through <P1> an <P2>.
-- Warning
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_ConfusedPoints if points P1 and P2, or P3 and P4, are coincident;
-- - gce_NullAngle if:
-- - the lines joining P1 to P2 and P3 to P4 are parallel, or
-- - R1 and R2 are equal (i.e. their difference is less than gp::Resolution());
-- - gce_NullRadius if:
-- - the line joining P1 to P2 is perpendicular to the line joining P3 to P4, or
-- - the points P1, P2, P3 and P4 are collinear;
-- - gce_NegativeRadius if R1 or R2 is negative; or
-- - gce_NullAxis if points P1 and P2 are coincident (2nd syntax only).
Value(me) returns RectangularTrimmedSurface from Geom
raises NotDone
is static;
---Purpose: Returns the constructed trimmed cone.
-- StdFail_NotDone if no trimmed cone is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_RectangularTrimmedSurface)& () const { return Value(); }"
fields
TheCone : RectangularTrimmedSurface from Geom;
--The solution from Geom.
end MakeTrimmedCone;

View File

@@ -14,14 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeTrimmedCone.ixx>
#include <Extrema_ExtPElC.hxx>
#include <GC_MakeConicalSurface.hxx>
#include <StdFail_NotDone.hxx>
#include <GC_MakeTrimmedCone.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <Extrema_ExtPElC.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation of a cone by four points. +
@@ -29,7 +31,6 @@
// The third gives the base radius. +
// the third and the fourth demi-angle. +
//=========================================================================
GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 ,
const gp_Pnt& P2 ,
const gp_Pnt& P3 ,

View File

@@ -0,0 +1,104 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeTrimmedCone_HeaderFile
#define _GC_MakeTrimmedCone_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_RectangularTrimmedSurface;
class StdFail_NotDone;
class gp_Pnt;
//! Implements construction algorithms for a trimmed
//! cone limited by two planes orthogonal to its axis. The
//! result is a Geom_RectangularTrimmedSurface surface.
//! A MakeTrimmedCone provides a framework for:
//! - defining the construction of the trimmed cone,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed trimmed cone.
class GC_MakeTrimmedCone : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make a RectangularTrimmedSurface <TheCone> from Geom
//! It is trimmed by P3 and P4.
//! Its axis is <P1P2> and the radius of its base is
//! the distance between <P3> and <P1P2>.
//! The distance between <P4> and <P1P2> is the radius of
//! the section passing through <P4>.
//! An error iss raised if <P1>,<P2>,<P3>,<P4> are
//! colinear or if <P3P4> is perpendicular to <P1P2> or
//! <P3P4> is colinear to <P1P2>.
Standard_EXPORT GC_MakeTrimmedCone(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4);
//! Make a RectangularTrimmedSurface from Geom <TheCone>
//! from a cone and trimmed by two points P1 and P2 and
//! the two radius <R1> and <R2> of the sections passing
//! through <P1> an <P2>.
//! Warning
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_ConfusedPoints if points P1 and P2, or P3 and P4, are coincident;
//! - gce_NullAngle if:
//! - the lines joining P1 to P2 and P3 to P4 are parallel, or
//! - R1 and R2 are equal (i.e. their difference is less than gp::Resolution());
//! - gce_NullRadius if:
//! - the line joining P1 to P2 is perpendicular to the line joining P3 to P4, or
//! - the points P1, P2, P3 and P4 are collinear;
//! - gce_NegativeRadius if R1 or R2 is negative; or
//! - gce_NullAxis if points P1 and P2 are coincident (2nd syntax only).
Standard_EXPORT GC_MakeTrimmedCone(const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real R1, const Standard_Real R2);
//! Returns the constructed trimmed cone.
//! StdFail_NotDone if no trimmed cone is constructed.
Standard_EXPORT const Handle(Geom_RectangularTrimmedSurface)& Value() const;
operator const Handle(Geom_RectangularTrimmedSurface)& () const { return Value(); }
protected:
private:
Handle(Geom_RectangularTrimmedSurface) TheCone;
};
#endif // _GC_MakeTrimmedCone_HeaderFile

View File

@@ -1,103 +0,0 @@
-- Created on: 1992-09-28
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeTrimmedCylinder from GC inherits Root from GC
--- Purpose: Implements construction algorithms for a trimmed
-- cylinder limited by two planes orthogonal to its axis.
-- The result is a Geom_RectangularTrimmedSurface surface.
-- A MakeTrimmedCylinder provides a framework for:
-- - defining the construction of the trimmed cylinder,
-- - implementing the construction algorithm, and
-- - consulting the results. In particular, the Value
-- function returns the constructed trimmed cylinder.
uses Pnt from gp,
Ax1 from gp,
Lin from gp,
Cylinder from gp,
Circ from gp,
RectangularTrimmedSurface from Geom,
Real from Standard
raises NotDone from StdFail
is
Create(P1,P2,P3 : Pnt from gp ) returns MakeTrimmedCylinder;
---Purpose: Make a cylindricalSurface <Cyl> from Geom
-- Its axis is is <P1P2> and its radius is the distance
-- between <P3> and <P1P2>.
-- The height is the distance between P1 and P2.
Create(Circ : Circ from gp ;
Height : Real from Standard ) returns MakeTrimmedCylinder;
---Purpose: Make a cylindricalSurface <Cyl> from gp by its base <Circ>.
-- Its axis is the normal to the plane defined bi <Circ>.
-- <Height> can be greater than zero or lower than zero.
-- In the first case the V parametric direction of the
-- result has the same orientation as the normal to <Circ>.
-- In the other case it has the opposite orientation.
Create(A1 : Ax1 from gp ;
Radius : Real from Standard ;
Height : Real from Standard ) returns MakeTrimmedCylinder;
---Purpose: Make a cylindricalSurface <Cyl> from gp by its
-- axis <A1> and its radius <Radius>.
-- It returns NullObject if <Radius> is lower than zero.
-- <Height> can be greater than zero or lower than zero.
-- In the first case the V parametric direction of the
-- result has the same orientation as <A1>.
-- In the other case it has the opposite orientation.
Create(Cyl : Cylinder from gp ;
P : Pnt from gp ;
Height : Real from Standard ) returns MakeTrimmedCylinder;
---Purpose: Make a RectangularTrimmedSurface <Cylinder> from gp by
-- a cylinder from gp.
-- It is trimmed by the point <P> and the heigh <Heigh>.
-- <Height> can be greater than zero or lower than zero.
-- in the first case the limit section is in the side of
-- the positives V paramters of <Cyl> and in the other
-- side if <Heigh> is lower than zero.
Create(Cyl : Cylinder from gp ;
P1,P2 : Pnt from gp ) returns MakeTrimmedCylinder;
---Purpose: Make a RectangularTrimmedSurface <Cylinder> from gp by
-- a cylinder from gp.
-- It is trimmed by the two points <P1> and <P2>.
-- Warning
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_NegativeRadius if Radius is less than 0.0, or
-- - gce_ConfusedPoints if the points P1 and P2 are coincident.
-- - gce_ColinearPoints if the points P1, P2 and P3 are collinear.
Value(me) returns RectangularTrimmedSurface from Geom
raises NotDone
is static;
---Purpose: Returns the constructed trimmed cylinder.
-- Exceptions
-- StdFail_NotDone if no trimmed cylinder is constructed.
---C++: return const&
---C++: alias "operator const Handle(Geom_RectangularTrimmedSurface)& () const { return Value(); }"
fields
TheCyl : RectangularTrimmedSurface from Geom;
--The solution from Geom.
end MakeTrimmedCylinder;

View File

@@ -14,18 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_MakeTrimmedCylinder.ixx>
#include <GC_MakeCylindricalSurface.hxx>
#include <StdFail_NotDone.hxx>
#include <Standard_NotImplemented.hxx>
#include <GC_MakeTrimmedCylinder.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <gp_Ax1.hxx>
#include <gp_Circ.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Pnt.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Creation of a cylinder limited by three points <P1>, <P2> and <P3>. +
// the height og the resulting cylinder is the distance from <P1> to <P2>. +
// The radius is the distance from <P3> to axis <P1P2>. +
//=========================================================================
GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 ,
const gp_Pnt& P2 ,
const gp_Pnt& P3 )

View File

@@ -0,0 +1,122 @@
// Created on: 1992-09-28
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_MakeTrimmedCylinder_HeaderFile
#define _GC_MakeTrimmedCylinder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GC_Root.hxx>
#include <Standard_Real.hxx>
class Geom_RectangularTrimmedSurface;
class StdFail_NotDone;
class gp_Pnt;
class gp_Circ;
class gp_Ax1;
class gp_Cylinder;
//! Implements construction algorithms for a trimmed
//! cylinder limited by two planes orthogonal to its axis.
//! The result is a Geom_RectangularTrimmedSurface surface.
//! A MakeTrimmedCylinder provides a framework for:
//! - defining the construction of the trimmed cylinder,
//! - implementing the construction algorithm, and
//! - consulting the results. In particular, the Value
//! function returns the constructed trimmed cylinder.
class GC_MakeTrimmedCylinder : public GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make a cylindricalSurface <Cyl> from Geom
//! Its axis is is <P1P2> and its radius is the distance
//! between <P3> and <P1P2>.
//! The height is the distance between P1 and P2.
Standard_EXPORT GC_MakeTrimmedCylinder(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3);
//! Make a cylindricalSurface <Cyl> from gp by its base <Circ>.
//! Its axis is the normal to the plane defined bi <Circ>.
//! <Height> can be greater than zero or lower than zero.
//! In the first case the V parametric direction of the
//! result has the same orientation as the normal to <Circ>.
//! In the other case it has the opposite orientation.
Standard_EXPORT GC_MakeTrimmedCylinder(const gp_Circ& Circ, const Standard_Real Height);
//! Make a cylindricalSurface <Cyl> from gp by its
//! axis <A1> and its radius <Radius>.
//! It returns NullObject if <Radius> is lower than zero.
//! <Height> can be greater than zero or lower than zero.
//! In the first case the V parametric direction of the
//! result has the same orientation as <A1>.
//! In the other case it has the opposite orientation.
Standard_EXPORT GC_MakeTrimmedCylinder(const gp_Ax1& A1, const Standard_Real Radius, const Standard_Real Height);
//! Make a RectangularTrimmedSurface <Cylinder> from gp by
//! a cylinder from gp.
//! It is trimmed by the point <P> and the heigh <Heigh>.
//! <Height> can be greater than zero or lower than zero.
//! in the first case the limit section is in the side of
//! the positives V paramters of <Cyl> and in the other
//! side if <Heigh> is lower than zero.
Standard_EXPORT GC_MakeTrimmedCylinder(const gp_Cylinder& Cyl, const gp_Pnt& P, const Standard_Real Height);
//! Make a RectangularTrimmedSurface <Cylinder> from gp by
//! a cylinder from gp.
//! It is trimmed by the two points <P1> and <P2>.
//! Warning
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_NegativeRadius if Radius is less than 0.0, or
//! - gce_ConfusedPoints if the points P1 and P2 are coincident.
//! - gce_ColinearPoints if the points P1, P2 and P3 are collinear.
Standard_EXPORT GC_MakeTrimmedCylinder(const gp_Cylinder& Cyl, const gp_Pnt& P1, const gp_Pnt& P2);
//! Returns the constructed trimmed cylinder.
//! Exceptions
//! StdFail_NotDone if no trimmed cylinder is constructed.
Standard_EXPORT const Handle(Geom_RectangularTrimmedSurface)& Value() const;
operator const Handle(Geom_RectangularTrimmedSurface)& () const { return Value(); }
protected:
private:
Handle(Geom_RectangularTrimmedSurface) TheCyl;
};
#endif // _GC_MakeTrimmedCylinder_HeaderFile

View File

@@ -1,47 +0,0 @@
-- Created on: 1992-09-29
-- Created by: Remi GILET
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
private deferred class Root from GC
---Purpose : This class implements the common services for
-- all classes of gce which report error.
uses
ErrorType from gce
is
IsDone(me) returns Boolean
is static;
---Purpose: Returns true if the construction is successful.
---C++: inline
Status(me) returns ErrorType from gce
is static;
---Purpose:
-- Returns the status of the construction:
-- - gce_Done, if the construction is successful, or
-- - another value of the gce_ErrorType enumeration
-- indicating why the construction failed.
---C++: inline
fields
TheError : ErrorType from gce is protected;
---Purpose: This enumeration lets know why the algorithm has not succeed.
end Root;

View File

@@ -12,4 +12,5 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GC_Root.ixx>
#include <GC_Root.hxx>

72
src/GC/GC_Root.hxx Normal file
View File

@@ -0,0 +1,72 @@
// Created on: 1992-09-29
// Created by: Remi GILET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GC_Root_HeaderFile
#define _GC_Root_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gce_ErrorType.hxx>
#include <Standard_Boolean.hxx>
//! This class implements the common services for
//! all classes of gce which report error.
class GC_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Returns true if the construction is successful.
Standard_Boolean IsDone() const;
//! Returns the status of the construction:
//! - gce_Done, if the construction is successful, or
//! - another value of the gce_ErrorType enumeration
//! indicating why the construction failed.
gce_ErrorType Status() const;
protected:
gce_ErrorType TheError;
private:
};
#include <GC_Root.lxx>
#endif // _GC_Root_HeaderFile