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

0024002: Overall code and build procedure refactoring -- automatic

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

31
src/GCE2d/FILES Normal file
View File

@@ -0,0 +1,31 @@
GCE2d_MakeArcOfCircle.cxx
GCE2d_MakeArcOfCircle.hxx
GCE2d_MakeArcOfEllipse.cxx
GCE2d_MakeArcOfEllipse.hxx
GCE2d_MakeArcOfHyperbola.cxx
GCE2d_MakeArcOfHyperbola.hxx
GCE2d_MakeArcOfParabola.cxx
GCE2d_MakeArcOfParabola.hxx
GCE2d_MakeCircle.cxx
GCE2d_MakeCircle.hxx
GCE2d_MakeEllipse.cxx
GCE2d_MakeEllipse.hxx
GCE2d_MakeHyperbola.cxx
GCE2d_MakeHyperbola.hxx
GCE2d_MakeLine.cxx
GCE2d_MakeLine.hxx
GCE2d_MakeMirror.cxx
GCE2d_MakeMirror.hxx
GCE2d_MakeParabola.cxx
GCE2d_MakeParabola.hxx
GCE2d_MakeRotation.cxx
GCE2d_MakeRotation.hxx
GCE2d_MakeScale.cxx
GCE2d_MakeScale.hxx
GCE2d_MakeSegment.cxx
GCE2d_MakeSegment.hxx
GCE2d_MakeTranslation.cxx
GCE2d_MakeTranslation.hxx
GCE2d_Root.cxx
GCE2d_Root.hxx
GCE2d_Root.lxx

View File

@@ -1,74 +0,0 @@
-- Created on: 1992-05-05
-- 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 GCE2d
uses gp,
Geom2d,
gce,
StdFail
---Level : Public.
-- All methods of all classes will be public.
is
private deferred class Root;
---------------------------------------------------------------------------
-- Constructions of 2d geometrical elements from Geom2d.
---------------------------------------------------------------------------
class MakeLine;
class MakeCircle;
class MakeHyperbola;
class MakeEllipse;
class MakeParabola;
class MakeSegment;
class MakeArcOfCircle;
class MakeArcOfEllipse;
class MakeArcOfParabola;
class MakeArcOfHyperbola;
---------------------------------------------------------------------------
-- Constructions of Transformation from Geom2d.
---------------------------------------------------------------------------
class MakeTranslation;
class MakeMirror;
class MakeRotation;
class MakeScale;
end GCE2d;

View File

@@ -1,92 +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 GCE2d inherits Root from GCE2d
---Purpose: Implements construction algorithms for an arc of
-- circle in the plane. The result is a Geom2d_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 Pnt2d from gp,
Circ2d from gp,
Vec2d from gp,
Real from Standard,
Boolean from Standard,
TrimmedCurve from Geom2d
raises NotDone from StdFail
is
Create(Circ : Circ2d from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfCircle;
---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
-- a circle between two parameters Alpha1 and Alpha2.
-- The two parameters are angles. The parameters are
-- in radians.
Create(Circ : Circ2d from gp ;
P : Pnt2d from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfCircle;
---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
-- a circle between point <P> and the parameter
-- Alpha. Alpha is given in radians.
Create(Circ : Circ2d from gp ;
P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfCircle;
---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
-- a circle between two points P1 and P2.
Create(P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ;
P3 : Pnt2d from gp )
returns MakeArcOfCircle;
---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
-- three points P1,P2,P3 between two points P1 and P3,
-- and passing through the point P2.
Create(P1 : Pnt2d from gp ;
V : Vec2d from gp ;
P2 : Pnt2d from gp )
returns MakeArcOfCircle;
---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
-- two points P1,P2 and the tangente to the solution at
-- the point P1.
Value(me) returns TrimmedCurve from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed arc of circle.
-- Exceptions StdFail_NotDone if no arc of circle is constructed.
---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom2d;
--The solution from Geom2d.
end MakeArcOfCircle;

View File

@@ -14,15 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeArcOfCircle.ixx>
#include <gp_Vec2d.hxx>
#include <Geom2d_Circle.hxx>
#include <ElCLib.hxx>
#include <GCE2d_MakeArcOfCircle.hxx>
#include <gce_MakeCirc2d.hxx>
#include <gce_MakeLin2d.hxx>
#include <ElCLib.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeArcOfCircle::GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1 ,
const gp_Pnt2d& P2 ,

View File

@@ -0,0 +1,102 @@
// 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 _GCE2d_MakeArcOfCircle_HeaderFile
#define _GCE2d_MakeArcOfCircle_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_TrimmedCurve;
class StdFail_NotDone;
class gp_Circ2d;
class gp_Pnt2d;
class gp_Vec2d;
//! Implements construction algorithms for an arc of
//! circle in the plane. The result is a Geom2d_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 GCE2d_MakeArcOfCircle : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Makes an arc of circle (TrimmedCurve from Geom2d) from
//! a circle between two parameters Alpha1 and Alpha2.
//! The two parameters are angles. The parameters are
//! in radians.
Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
//! Makes an arc of circle (TrimmedCurve from Geom2d) from
//! a circle between point <P> and the parameter
//! Alpha. Alpha is given in radians.
Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
//! Makes an arc of circle (TrimmedCurve from Geom2d) from
//! a circle between two points P1 and P2.
Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
//! Makes an arc of circle (TrimmedCurve from Geom2d) from
//! three points P1,P2,P3 between two points P1 and P3,
//! and passing through the point P2.
Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
//! Makes an arc of circle (TrimmedCurve from Geom2d) from
//! two points P1,P2 and the tangente to the solution at
//! the point P1.
Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1, const gp_Vec2d& V, const gp_Pnt2d& P2);
//! Returns the constructed arc of circle.
//! Exceptions StdFail_NotDone if no arc of circle is constructed.
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom2d_TrimmedCurve) TheArc;
};
#endif // _GCE2d_MakeArcOfCircle_HeaderFile

View File

@@ -1,78 +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 GCE2d inherits Root from GCE2d
---Purpose: Implements construction algorithms for an arc of
-- ellipse in the plane. The result is a Geom2d_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 Pnt2d from gp,
Elips2d from gp,
Real from Standard,
Boolean from Standard,
TrimmedCurve from Geom2d
raises NotDone from StdFail
is
Create(Elips : Elips2d from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfEllipse;
---Purpose: Make an arc of Ellipse (TrimmedCurve from Geom2d) from
-- a Ellipse between two parameters Alpha1 and Alpha2.
Create(Elips : Elips2d from gp ;
P : Pnt2d from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfEllipse;
---Purpose: Make an arc of Ellipse (TrimmedCurve from Geom2d) from
-- a Ellipse between point <P> and the parameter
-- Alpha.
Create(Elips : Elips2d from gp ;
P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfEllipse;
---Purpose: Make an arc of Ellipse (TrimmedCurve from Geom2d) from
-- a Ellipse between two points P1 and P2.
-- Please, note: The orientation of the arc is:
-- - the trigonometric sense if Sense is not defined or
-- is true (default value), or
-- - the opposite sense if Sense is false.
-- - Alpha1, Alpha2 and Alpha are angle values, given in radians.
-- - IsDone always returns true.
Value(me) returns TrimmedCurve from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed arc of ellipse.
---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom2d;
--The solution from Geom2d.
end MakeArcOfEllipse;

View File

@@ -14,9 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeArcOfEllipse.ixx>
#include <Geom2d_Ellipse.hxx>
#include <ElCLib.hxx>
#include <GCE2d_MakeArcOfEllipse.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeArcOfEllipse::GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips ,

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 _GCE2d_MakeArcOfEllipse_HeaderFile
#define _GCE2d_MakeArcOfEllipse_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_TrimmedCurve;
class StdFail_NotDone;
class gp_Elips2d;
class gp_Pnt2d;
//! Implements construction algorithms for an arc of
//! ellipse in the plane. The result is a Geom2d_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 GCE2d_MakeArcOfEllipse : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
//! a Ellipse between two parameters Alpha1 and Alpha2.
Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
//! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
//! a Ellipse between point <P> and the parameter
//! Alpha.
Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
//! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
//! a Ellipse between two points P1 and P2.
//! Please, note: The orientation of the arc is:
//! - the trigonometric sense if Sense is not defined or
//! is true (default value), or
//! - the opposite sense if Sense is false.
//! - Alpha1, Alpha2 and Alpha are angle values, given in radians.
//! - IsDone always returns true.
Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
//! Returns the constructed arc of ellipse.
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom2d_TrimmedCurve) TheArc;
};
#endif // _GCE2d_MakeArcOfEllipse_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 MakeArcOfHyperbola from GCE2d inherits Root from GCE2d
---Purpose: Implements construction algorithms for an arc of
-- hyperbola in the plane. The result is a Geom2d_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 Pnt2d from gp,
Hypr2d from gp,
Real from Standard,
Boolean from Standard,
TrimmedCurve from Geom2d
raises NotDone from StdFail
is
Create(Hypr : Hypr2d from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfHyperbola;
---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
-- a Hyperbola between two parameters Alpha1 and Alpha2.
Create(Hypr : Hypr2d from gp ;
P : Pnt2d from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfHyperbola;
---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
-- a Hyperbola between point <P> and the parameter
-- Alpha.
Create(Hypr : Hypr2d from gp ;
P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfHyperbola;
---Purpose: Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
-- a Hyperbola between two points P1 and P2.
-- Note: the orientation of the arc of hyperbola is:
-- - the trigonometric sense if Sense is not defined or
-- is true (default value), or
-- - the opposite sense if Sense is false.
-- - IsDone always returns true.
Value(me) returns TrimmedCurve from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed arc of hyperbola.
---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom2d;
--The solution from Geom2d.
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 <GCE2d_MakeArcOfHyperbola.ixx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <ElCLib.hxx>
#include <GCE2d_MakeArcOfHyperbola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeArcOfHyperbola::GCE2d_MakeArcOfHyperbola(const gp_Hypr2d& Hypr ,
const gp_Pnt2d& P1 ,

View File

@@ -0,0 +1,93 @@
// 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 _GCE2d_MakeArcOfHyperbola_HeaderFile
#define _GCE2d_MakeArcOfHyperbola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_TrimmedCurve;
class StdFail_NotDone;
class gp_Hypr2d;
class gp_Pnt2d;
//! Implements construction algorithms for an arc of
//! hyperbola in the plane. The result is a Geom2d_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 GCE2d_MakeArcOfHyperbola : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
//! a Hyperbola between two parameters Alpha1 and Alpha2.
Standard_EXPORT GCE2d_MakeArcOfHyperbola(const gp_Hypr2d& Hypr, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
//! Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
//! a Hyperbola between point <P> and the parameter
//! Alpha.
Standard_EXPORT GCE2d_MakeArcOfHyperbola(const gp_Hypr2d& Hypr, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
//! Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from
//! a Hyperbola between two points P1 and P2.
//! Note: the orientation of the arc of hyperbola is:
//! - the trigonometric sense if Sense is not defined or
//! is true (default value), or
//! - the opposite sense if Sense is false.
//! - IsDone always returns true.
Standard_EXPORT GCE2d_MakeArcOfHyperbola(const gp_Hypr2d& Hypr, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
//! Returns the constructed arc of hyperbola.
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom2d_TrimmedCurve) TheArc;
};
#endif // _GCE2d_MakeArcOfHyperbola_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 MakeArcOfParabola from GCE2d inherits Root from GCE2d
---Purpose: Implements construction algorithms for an arc of
-- parabola in the plane. The result is a Geom2d_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 Pnt2d from gp,
Parab2d from gp,
Real from Standard,
Boolean from Standard,
TrimmedCurve from Geom2d
raises NotDone from StdFail
is
Create(Parab : Parab2d from gp ;
Alpha1, Alpha2 : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfParabola;
---Purpose: Make an arc of Parabola (TrimmedCurve from Geom2d) from
-- a Parabola between two parameters Alpha1 and Alpha2.
Create(Parab : Parab2d from gp ;
P : Pnt2d from gp ;
Alpha : Real from Standard ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfParabola;
---Purpose: Make an arc of Parabola (TrimmedCurve from Geom2d) from
-- a Parabola between point <P> and the parameter
-- Alpha.
Create(Parab : Parab2d from gp ;
P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True)
returns MakeArcOfParabola;
---Purpose: Make an arc of Parabola (TrimmedCurve from Geom2d) from
-- a Parabola between two points P1 and P2.
-- Please, note: the orientation of the arc of parabola is:
-- - the trigonometric sense if Sense is not defined
-- or is true (default value), or
-- - the opposite sense if Sense is false.
-- - IsDone always returns true.
Value(me) returns TrimmedCurve from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed arc of parabola.
---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
fields
TheArc : TrimmedCurve from Geom2d;
--The solution from Geom2d.
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 <GCE2d_MakeArcOfParabola.ixx>
#include <Geom2d_Parabola.hxx>
#include <StdFail_NotDone.hxx>
#include <ElCLib.hxx>
#include <GCE2d_MakeArcOfParabola.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeArcOfParabola::
GCE2d_MakeArcOfParabola(const gp_Parab2d& Parab ,

View File

@@ -0,0 +1,93 @@
// 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 _GCE2d_MakeArcOfParabola_HeaderFile
#define _GCE2d_MakeArcOfParabola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_TrimmedCurve;
class StdFail_NotDone;
class gp_Parab2d;
class gp_Pnt2d;
//! Implements construction algorithms for an arc of
//! parabola in the plane. The result is a Geom2d_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 GCE2d_MakeArcOfParabola : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make an arc of Parabola (TrimmedCurve from Geom2d) from
//! a Parabola between two parameters Alpha1 and Alpha2.
Standard_EXPORT GCE2d_MakeArcOfParabola(const gp_Parab2d& Parab, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
//! Make an arc of Parabola (TrimmedCurve from Geom2d) from
//! a Parabola between point <P> and the parameter
//! Alpha.
Standard_EXPORT GCE2d_MakeArcOfParabola(const gp_Parab2d& Parab, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
//! Make an arc of Parabola (TrimmedCurve from Geom2d) from
//! a Parabola between two points P1 and P2.
//! Please, note: the orientation of the arc of parabola is:
//! - the trigonometric sense if Sense is not defined
//! or is true (default value), or
//! - the opposite sense if Sense is false.
//! - IsDone always returns true.
Standard_EXPORT GCE2d_MakeArcOfParabola(const gp_Parab2d& Parab, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
//! Returns the constructed arc of parabola.
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom2d_TrimmedCurve) TheArc;
};
#endif // _GCE2d_MakeArcOfParabola_HeaderFile

View File

@@ -1,115 +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 GCE2d inherits Root from GCE2d
---Purpose : This class implements the following algorithms used
-- to create Circle from Geom2d.
--
-- * 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.
uses Pnt2d from gp,
Circ2d from gp,
Ax2d from gp,
Ax22d from gp,
Circle from Geom2d,
Real from Standard
raises NotDone from StdFail
is
Create (C : Circ2d from gp) returns MakeCircle;
--- Purpose : creates a circle from a non persistent one.
Create (A : Ax2d from gp ;
Radius : Real from Standard ;
Sense : Boolean from Standard = Standard_True) returns MakeCircle;
--- Purpose :
-- A is the "XAxis" of the circle which defines the origin
-- of parametrization.
-- It is not forbidden to create a circle with Radius = 0.0
-- The status is "NegativeRadius" if Radius < 0.
Create (A : Ax22d from gp ;
Radius : Real from Standard ) returns MakeCircle;
--- Purpose :
-- A is the local coordinate system of the circle which defines
-- the origin of parametrization.
-- It is not forbidden to create a circle with Radius = 0.0
-- The status is "NegativeRadius" if Radius < 0.
Create(Circ : Circ2d from gp ;
Dist : Real from Standard) returns MakeCircle;
---Purpose : Make a Circle from Geom2d <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 : Circ2d from gp;
Point : Pnt2d from gp) returns MakeCircle;
---Purpose : Make a Circle from Geom2d <TheCirc> parallel to another
-- Circ <Circ> and passing through a Pnt <Point>.
Create(P1,P2,P3 : Pnt2d from gp) returns MakeCircle;
---Purpose : Make a Circ from gp <TheCirc> passing through 3
-- Pnt2d <P1>,<P2>,<P3>.
Create(P : Pnt2d from gp ;
Radius : Real from Standard ;
Sense : Boolean from Standard = Standard_True) returns MakeCircle;
---Purpose : Make a Circ from geom2d <TheCirc> by its center an radius.
Create(Center : Pnt2d from gp ;
Point : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True)
returns MakeCircle;
---Purpose : Makes a Circle from geom2d <TheCirc> with its center
-- <Center> and a point giving the radius.
-- If Sense is true the local coordinate system of
-- the solution is direct and non direct in the other case.
-- Warning
-- The MakeCircle class does not prevent the
-- construction of a circle with a null radius.
-- 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_IntersectionError if points P1, P2 and P3
-- are collinear and the three are not coincident.
Value(me) returns Circle from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed circle.
-- Exceptions StdFail_NotDone if no circle is constructed.
---C++: alias "operator const Handle(Geom2d_Circle)& () const { return Value(); }"
fields
TheCircle : Circle from Geom2d;
--The solution from Geom2d.
end MakeCircle;

View File

@@ -14,9 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeCircle.ixx>
#include <GCE2d_MakeCircle.hxx>
#include <gce_MakeCirc2d.hxx>
#include <Geom2d_Circle.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Ax22d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeCircle::GCE2d_MakeCircle(const gp_Circ2d& C)

View File

@@ -0,0 +1,131 @@
// 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 _GCE2d_MakeCircle_HeaderFile
#define _GCE2d_MakeCircle_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Circle;
class StdFail_NotDone;
class gp_Circ2d;
class gp_Ax2d;
class gp_Ax22d;
class gp_Pnt2d;
//! This class implements the following algorithms used
//! to create Circle from Geom2d.
//!
//! * 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.
class GCE2d_MakeCircle : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! creates a circle from a non persistent one.
Standard_EXPORT GCE2d_MakeCircle(const gp_Circ2d& C);
//! A is the "XAxis" of the circle which defines the origin
//! of parametrization.
//! It is not forbidden to create a circle with Radius = 0.0
//! The status is "NegativeRadius" if Radius < 0.
Standard_EXPORT GCE2d_MakeCircle(const gp_Ax2d& A, const Standard_Real Radius, const Standard_Boolean Sense = Standard_True);
//! A is the local coordinate system of the circle which defines
//! the origin of parametrization.
//! It is not forbidden to create a circle with Radius = 0.0
//! The status is "NegativeRadius" if Radius < 0.
Standard_EXPORT GCE2d_MakeCircle(const gp_Ax22d& A, const Standard_Real Radius);
//! Make a Circle from Geom2d <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 GCE2d_MakeCircle(const gp_Circ2d& Circ, const Standard_Real Dist);
//! Make a Circle from Geom2d <TheCirc> parallel to another
//! Circ <Circ> and passing through a Pnt <Point>.
Standard_EXPORT GCE2d_MakeCircle(const gp_Circ2d& Circ, const gp_Pnt2d& Point);
//! Make a Circ from gp <TheCirc> passing through 3
//! Pnt2d <P1>,<P2>,<P3>.
Standard_EXPORT GCE2d_MakeCircle(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
//! Make a Circ from geom2d <TheCirc> by its center an radius.
Standard_EXPORT GCE2d_MakeCircle(const gp_Pnt2d& P, const Standard_Real Radius, const Standard_Boolean Sense = Standard_True);
//! Makes a Circle from geom2d <TheCirc> with its center
//! <Center> and a point giving the radius.
//! If Sense is true the local coordinate system of
//! the solution is direct and non direct in the other case.
//! Warning
//! The MakeCircle class does not prevent the
//! construction of a circle with a null radius.
//! 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_IntersectionError if points P1, P2 and P3
//! are collinear and the three are not coincident.
Standard_EXPORT GCE2d_MakeCircle(const gp_Pnt2d& Center, const gp_Pnt2d& Point, const Standard_Boolean Sense = Standard_True);
//! Returns the constructed circle.
//! Exceptions StdFail_NotDone if no circle is constructed.
Standard_EXPORT const Handle(Geom2d_Circle)& Value() const;
operator const Handle(Geom2d_Circle)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Circle) TheCircle;
};
#endif // _GCE2d_MakeCircle_HeaderFile

View File

@@ -1,96 +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 GCE2d inherits Root from GCE2d
---Purpose :This class implements the following algorithms used to
-- create Ellipse from Geom2d.
-- * Create an Ellipse from two apex and the center.
-- Defines an ellipse in 2D space.
-- The parametrization range is [0,2*PI].
-- The ellipse is a closed and periodic curve.
-- The center of the ellipse is the "Location" point of its
-- axis placement "XAxis".
-- The "XAxis" of the ellipse defines the origin of the
-- parametrization, it is the major axis of the ellipse.
-- The YAxis is the minor axis of the ellipse.
uses Pnt2d from gp,
Ellipse from Geom2d,
Elips2d from gp,
Ax22d from gp,
Ax2d from gp
raises NotDone from StdFail
is
Create (E : Elips2d from gp) returns MakeEllipse;
--- Purpose :
-- Creates an ellipse from a non persistent one from package gp
Create (MajorAxis : Ax2d from gp ;
MajorRadius : Real from Standard ;
MinorRadius : Real from Standard ;
Sense : Boolean from Standard = Standard_True )
returns MakeEllipse;
--- Purpose :
-- MajorAxis is the local coordinate system of the ellipse.
-- It is the "XAxis". The minor axis is the YAxis of the
-- ellipse.
-- Sense give the sense of parametrization of the Ellipse.
-- It is not forbidden to create an ellipse with MajorRadius =
-- MinorRadius.
-- The status is "InvertRadius" if MajorRadius < MinorRadius or
-- "NegativeRadius" if MinorRadius < 0.
Create (Axis : Ax22d from gp ;
MajorRadius, MinorRadius : Real from Standard)
returns MakeEllipse;
--- Purpose :
-- Axis is the local coordinate system of the ellipse.
-- It is not forbidden to create an ellipse with MajorRadius =
-- MinorRadius.
-- The status is "InvertRadius" if MajorRadius < MinorRadius or
-- "NegativeRadius" if MinorRadius < 0.
Create(S1,S2 : Pnt2d from gp;
Center : Pnt2d from gp) returns MakeEllipse;
---Purpose: Make an Ellipse centered on the point Center, where
-- - the major axis of the ellipse 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.
-- The implicit orientation of the ellipse is:
-- - the sense defined by Axis or E,
-- - the sense defined by points Center, S1 and S2,
-- - the trigonometric sense if Sense is not given or is true, or
-- - the opposite sense if Sense is false.
Value(me) returns Ellipse from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed ellipse.
-- Exceptions StdFail_NotDone if no ellipse is constructed.
---C++: alias "operator const Handle(Geom2d_Ellipse)& () const { return Value(); }"
fields
TheEllipse : Ellipse from Geom2d;
--The solution from Geom2d.
end MakeEllipse;

View File

@@ -14,8 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeEllipse.ixx>
#include <GCE2d_MakeEllipse.hxx>
#include <gce_MakeElips2d.hxx>
#include <Geom2d_Ellipse.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Ax22d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeEllipse::GCE2d_MakeEllipse(const gp_Elips2d& E)

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 _GCE2d_MakeEllipse_HeaderFile
#define _GCE2d_MakeEllipse_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Ellipse;
class StdFail_NotDone;
class gp_Elips2d;
class gp_Ax2d;
class gp_Ax22d;
class gp_Pnt2d;
//! This class implements the following algorithms used to
//! create Ellipse from Geom2d.
//! * Create an Ellipse from two apex and the center.
//! Defines an ellipse in 2D space.
//! The parametrization range is [0,2*PI].
//! The ellipse is a closed and periodic curve.
//! The center of the ellipse is the "Location" point of its
//! axis placement "XAxis".
//! The "XAxis" of the ellipse defines the origin of the
//! parametrization, it is the major axis of the ellipse.
//! The YAxis is the minor axis of the ellipse.
class GCE2d_MakeEllipse : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an ellipse from a non persistent one from package gp
Standard_EXPORT GCE2d_MakeEllipse(const gp_Elips2d& E);
//! MajorAxis is the local coordinate system of the ellipse.
//! It is the "XAxis". The minor axis is the YAxis of the
//! ellipse.
//! Sense give the sense of parametrization of the Ellipse.
//! It is not forbidden to create an ellipse with MajorRadius =
//! MinorRadius.
//! The status is "InvertRadius" if MajorRadius < MinorRadius or
//! "NegativeRadius" if MinorRadius < 0.
Standard_EXPORT GCE2d_MakeEllipse(const gp_Ax2d& MajorAxis, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Boolean Sense = Standard_True);
//! Axis is the local coordinate system of the ellipse.
//! It is not forbidden to create an ellipse with MajorRadius =
//! MinorRadius.
//! The status is "InvertRadius" if MajorRadius < MinorRadius or
//! "NegativeRadius" if MinorRadius < 0.
Standard_EXPORT GCE2d_MakeEllipse(const gp_Ax22d& Axis, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
//! Make an Ellipse centered on the point Center, where
//! - the major axis of the ellipse 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.
//! The implicit orientation of the ellipse is:
//! - the sense defined by Axis or E,
//! - the sense defined by points Center, S1 and S2,
//! - the trigonometric sense if Sense is not given or is true, or
//! - the opposite sense if Sense is false.
Standard_EXPORT GCE2d_MakeEllipse(const gp_Pnt2d& S1, const gp_Pnt2d& S2, const gp_Pnt2d& Center);
//! Returns the constructed ellipse.
//! Exceptions StdFail_NotDone if no ellipse is constructed.
Standard_EXPORT const Handle(Geom2d_Ellipse)& Value() const;
operator const Handle(Geom2d_Ellipse)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Ellipse) TheEllipse;
};
#endif // _GCE2d_MakeEllipse_HeaderFile

View File

@@ -1,116 +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 GCE2d inherits Root from GCE2d
---Purpose :This class implements the following algorithms used to
-- create Hyperbola from Geom2d.
-- * Create an Hyperbola from two apex and the center.
-- Defines 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 Pnt2d from gp,
Hypr from gp,
Hypr2d from gp,
Ax2d from gp,
Ax22d from gp,
Hyperbola from Geom2d
raises NotDone from StdFail
is
Create (H : Hypr2d from gp) returns MakeHyperbola;
--- Purpose :
-- Creates an Hyperbola from a non persistent one from package gp
Create (MajorAxis : Ax2d from gp ;
MajorRadius : Real from Standard;
MinorRadius : Real from Standard;
Sense : Boolean from Standard) returns MakeHyperbola;
--- Purpose :
-- MajorAxis is the "XAxis" of the hyperbola.
-- The major radius of the hyperbola is on this "XAxis" and
-- the minor radius is on the "YAxis" of the hyperbola.
-- The status is "NegativeRadius" if MajorRadius < 0.0 or if
-- MinorRadius < 0.0
Create (Axis : Ax22d from gp ;
MajorRadius : Real from Standard;
MinorRadius : Real from Standard) returns MakeHyperbola;
--- Purpose :
-- Axis is the local coordinate system of the hyperbola.
-- The major radius of the hyperbola is on this "XAxis" and
-- the minor radius is on the "YAxis" of the hyperbola.
-- The status is "NegativeRadius" if MajorRadius < 0.0 or if
-- MinorRadius < 0.0
Create(S1,S2 : Pnt2d from gp;
Center : Pnt2d from gp) returns MakeHyperbola;
---Purpose: Creates a hyperbol centered on the origin of the coordinate system
-- Axis, with major and minor radii MajorRadius and
-- MinorRadius, where the major axis is the "X Axis"
-- of Axis (Axis is the local coordinate system of the hyperbola).
-- The implicit orientation of the ellipse is:
-- - the sense defined by Axis or H,
-- - the sense defined by points Center, S1 and S2,
-- - the trigonometric sense if Sense is not given or is true, or
-- - the opposite sense if Sense is false.
-- Warning
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_NegativeRadius if MajorRadius or
-- MinorRadius is less than 0.0, or
-- - gce_InvertAxis if the major radius defined by
-- Center and S1 is less than the minor radius
-- defined by Center, S1 and S2.Make an Hyperbola with its center and two apexes.
Value(me) returns Hyperbola from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed hyperbola.
-- Exceptions: StdFail_NotDone if no hyperbola is constructed.
---C++: alias "operator const Handle(Geom2d_Hyperbola)& () const { return Value(); }"
fields
TheHyperbola : Hyperbola from Geom2d;
--The solution from Geom2d.
end MakeHyperbola;

View File

@@ -14,8 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeHyperbola.ixx>
#include <GCE2d_MakeHyperbola.hxx>
#include <gce_MakeHypr2d.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Ax22d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeHyperbola::GCE2d_MakeHyperbola(const gp_Hypr2d& H)

View File

@@ -0,0 +1,136 @@
// 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 _GCE2d_MakeHyperbola_HeaderFile
#define _GCE2d_MakeHyperbola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Hyperbola;
class StdFail_NotDone;
class gp_Hypr2d;
class gp_Ax2d;
class gp_Ax22d;
class gp_Pnt2d;
//! This class implements the following algorithms used to
//! create Hyperbola from Geom2d.
//! * Create an Hyperbola from two apex and the center.
//! Defines 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 GCE2d_MakeHyperbola : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an Hyperbola from a non persistent one from package gp
Standard_EXPORT GCE2d_MakeHyperbola(const gp_Hypr2d& H);
//! MajorAxis is the "XAxis" of the hyperbola.
//! The major radius of the hyperbola is on this "XAxis" and
//! the minor radius is on the "YAxis" of the hyperbola.
//! The status is "NegativeRadius" if MajorRadius < 0.0 or if
//! MinorRadius < 0.0
Standard_EXPORT GCE2d_MakeHyperbola(const gp_Ax2d& MajorAxis, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Boolean Sense);
//! Axis is the local coordinate system of the hyperbola.
//! The major radius of the hyperbola is on this "XAxis" and
//! the minor radius is on the "YAxis" of the hyperbola.
//! The status is "NegativeRadius" if MajorRadius < 0.0 or if
//! MinorRadius < 0.0
Standard_EXPORT GCE2d_MakeHyperbola(const gp_Ax22d& Axis, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
//! Creates a hyperbol centered on the origin of the coordinate system
//! Axis, with major and minor radii MajorRadius and
//! MinorRadius, where the major axis is the "X Axis"
//! of Axis (Axis is the local coordinate system of the hyperbola).
//! The implicit orientation of the ellipse is:
//! - the sense defined by Axis or H,
//! - the sense defined by points Center, S1 and S2,
//! - the trigonometric sense if Sense is not given or is true, or
//! - the opposite sense if Sense is false.
//! Warning
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_NegativeRadius if MajorRadius or
//! MinorRadius is less than 0.0, or
//! - gce_InvertAxis if the major radius defined by
//! Center and S1 is less than the minor radius
//! defined by Center, S1 and S2.Make an Hyperbola with its center and two apexes.
Standard_EXPORT GCE2d_MakeHyperbola(const gp_Pnt2d& S1, const gp_Pnt2d& S2, const gp_Pnt2d& Center);
//! Returns the constructed hyperbola.
//! Exceptions: StdFail_NotDone if no hyperbola is constructed.
Standard_EXPORT const Handle(Geom2d_Hyperbola)& Value() const;
operator const Handle(Geom2d_Hyperbola)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Hyperbola) TheHyperbola;
};
#endif // _GCE2d_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 GCE2d inherits Root from GCE2d
---Purpose : This class implements the following algorithms used
-- to create a Line from Geom2d.
-- * Create a Line parallel to another and passing
-- through a point.
-- * Create a Line passing through 2 points.
uses Pnt2d from gp,
Lin2d from gp,
Ax2d from gp,
Dir2d from gp,
Line from Geom2d,
Real from Standard
raises NotDone from StdFail
is
Create (A : Ax2d from gp) returns MakeLine;
--- Purpose :
-- Creates a line located in 2D space with the axis placement A.
-- The Location of A is the origin of the line.
Create (L : Lin2d from gp) returns MakeLine;
--- Purpose :
-- Creates a line from a non persistent line from package gp.
Create (P : Pnt2d from gp;
V : Dir2d from gp) returns MakeLine;
--- Purpose :
-- P is the origin and V is the direction of the line.
Create(Lin : Lin2d from gp;
Point : Pnt2d from gp) returns MakeLine;
---Purpose : Make a Line from Geom2d <TheLin> parallel to another
-- Lin <Lin> and passing through a Pnt <Point>.
Create(Lin : Lin2d from gp ;
Dist : Real from Standard) returns MakeLine;
---Purpose : Make a Line from Geom2d <TheLin> parallel to another
-- Lin <Lin> at a distance <Dist>.
Create(P1 : Pnt2d from gp;
P2 : Pnt2d from gp) returns MakeLine;
---Purpose : Make a Line from Geom2d <TheLin> passing through 2
-- Pnt <P1>,<P2>.
-- It returns false if <p1> and <P2> are confused.
-- Warning
-- If points P1 and P2 coincident (that is, when IsDone
-- returns false), the Status function returns gce_ConfusedPoints.
Value(me) returns Line from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed line.
-- Exceptions StdFail_NotDone if no line is constructed.
---C++: alias "operator const Handle(Geom2d_Line)& () const { return Value(); }"
fields
TheLine : Line from Geom2d;
--The solution from Geom2d.
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 <GCE2d_MakeLine.ixx>
#include <GCE2d_MakeLine.hxx>
#include <gce_MakeLin2d.hxx>
#include <Geom2d_Line.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
//=========================================================================
// Constructions of 2d geometrical elements from Geom2d.
//=========================================================================
GCE2d_MakeLine::GCE2d_MakeLine(const gp_Ax2d& A)
{
TheError = gce_Done;

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 _GCE2d_MakeLine_HeaderFile
#define _GCE2d_MakeLine_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
class Geom2d_Line;
class StdFail_NotDone;
class gp_Ax2d;
class gp_Lin2d;
class gp_Pnt2d;
class gp_Dir2d;
//! This class implements the following algorithms used
//! to create a Line from Geom2d.
//! * Create a Line parallel to another and passing
//! through a point.
//! * Create a Line passing through 2 points.
class GCE2d_MakeLine : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a line located in 2D space with the axis placement A.
//! The Location of A is the origin of the line.
Standard_EXPORT GCE2d_MakeLine(const gp_Ax2d& A);
//! Creates a line from a non persistent line from package gp.
Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& L);
//! P is the origin and V is the direction of the line.
Standard_EXPORT GCE2d_MakeLine(const gp_Pnt2d& P, const gp_Dir2d& V);
//! Make a Line from Geom2d <TheLin> parallel to another
//! Lin <Lin> and passing through a Pnt <Point>.
Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& Lin, const gp_Pnt2d& Point);
//! Make a Line from Geom2d <TheLin> parallel to another
//! Lin <Lin> at a distance <Dist>.
Standard_EXPORT GCE2d_MakeLine(const gp_Lin2d& Lin, const Standard_Real Dist);
//! Make a Line from Geom2d <TheLin> passing through 2
//! Pnt <P1>,<P2>.
//! It returns false if <p1> and <P2> are confused.
//! Warning
//! If points P1 and P2 coincident (that is, when IsDone
//! returns false), the Status function returns gce_ConfusedPoints.
Standard_EXPORT GCE2d_MakeLine(const gp_Pnt2d& P1, const gp_Pnt2d& P2);
//! Returns the constructed line.
//! Exceptions StdFail_NotDone if no line is constructed.
Standard_EXPORT const Handle(Geom2d_Line)& Value() const;
operator const Handle(Geom2d_Line)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Line) TheLine;
};
#endif // _GCE2d_MakeLine_HeaderFile

View File

@@ -1,63 +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 GCE2d
---Purpose: This class implements elementary construction algorithms for a
-- symmetrical transformation in 2D space about a point
-- or axis. The result is a Geom2d_Transformation transformation.
-- A MakeMirror object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt2d from gp,
Ax2d from gp,
Dir2d from gp,
Lin2d from gp,
Transformation from Geom2d,
Real from Standard
is
Create(Point : Pnt2d from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of center <Point>.
Create(Axis : Ax2d from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of axis <Axis>.
Create(Line : Lin2d from gp) returns MakeMirror;
---Puprose: Make a symetry transformation of axis <Line>.
Create(Point : Pnt2d from gp;
Direc : Dir2d from gp) returns MakeMirror;
---Purpose: Make a symetry transformation af axis defined by
-- <Point> and <Direc>.
Value(me) returns Transformation from Geom2d
is static;
---C++: return const&
---Purpose: Returns the constructed transformation.
---C++: alias "operator const Handle(Geom2d_Transformation)& () const { return Value(); }"
fields
TheMirror : Transformation from Geom2d;
end MakeMirror;

View File

@@ -14,12 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeMirror.ixx>
#include <GCE2d_MakeMirror.hxx>
#include <Geom2d_Transformation.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
//=========================================================================
// Creation d une symetrie de Geom2d par rapport a un point. +
//=========================================================================
GCE2d_MakeMirror::GCE2d_MakeMirror(const gp_Pnt2d& Point ) {
TheMirror = new Geom2d_Transformation();
TheMirror->SetMirror(Point);

View File

@@ -0,0 +1,83 @@
// 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 _GCE2d_MakeMirror_HeaderFile
#define _GCE2d_MakeMirror_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom2d_Transformation;
class gp_Pnt2d;
class gp_Ax2d;
class gp_Lin2d;
class gp_Dir2d;
//! This class implements elementary construction algorithms for a
//! symmetrical transformation in 2D space about a point
//! or axis. The result is a Geom2d_Transformation transformation.
//! A MakeMirror object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GCE2d_MakeMirror
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GCE2d_MakeMirror(const gp_Pnt2d& Point);
Standard_EXPORT GCE2d_MakeMirror(const gp_Ax2d& Axis);
Standard_EXPORT GCE2d_MakeMirror(const gp_Lin2d& Line);
//! Make a symetry transformation af axis defined by
//! <Point> and <Direc>.
Standard_EXPORT GCE2d_MakeMirror(const gp_Pnt2d& Point, const gp_Dir2d& Direc);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom2d_Transformation)& Value() const;
operator const Handle(Geom2d_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Transformation) TheMirror;
};
#endif // _GCE2d_MakeMirror_HeaderFile

View File

@@ -1,112 +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 MakeParabola from GCE2d inherits Root from GCE2d
---Purpose :This class implements the following algorithms used to
-- create Parabola from Geom2d.
-- * Create an Parabola from two apex and the center.
-- Defines the parabola in the parameterization range :
-- ]-infinite,+infinite[
-- The vertex of the parabola is the "Location" point of the
-- local coordinate system "XAxis" of the parabola.
-- The "XAxis" of the parabola is its axis of symmetry.
-- The "Xaxis" is oriented from the vertex of the parabola to the
-- Focus of the parabola.
-- The equation of the parabola in the local coordinate system is
-- Y**2 = (2*P) * X
-- P is the distance between the focus and the directrix of the
-- parabola called Parameter).
-- The focal length F = P/2 is the distance between the vertex
-- and the focus of the parabola.
uses Pnt2d from gp,
Parab2d from gp,
Ax2d from gp,
Ax22d from gp,
Parabola from Geom2d
raises NotDone from StdFail
is
Create (Prb : Parab2d from gp) returns MakeParabola;
--- Purpose : Creates a parabola from a non persistent one.
Create (Axis : Ax22d from gp ;
Focal : Real from Standard ) returns MakeParabola;
--- Purpose : Creates a parabola with its local coordinate system and it's focal
-- length "Focal".
-- The "Location" point of "Axis" is the vertex of the parabola
--- Status is "NegativeFocusLength" if Focal < 0.0
Create (MirrorAxis : Ax2d from gp ;
Focal : Real from Standard;
Sense : Boolean from Standard) returns MakeParabola;
--- Purpose : Creates a parabola with its "MirrorAxis" and it's focal length "Focal".
-- MirrorAxis is the axis of symmetry of the curve, it is the
-- "XAxis". The "YAxis" is parallel to the directrix of the
-- parabola. The "Location" point of "MirrorAxis" is the vertex of the parabola
--- Status is "NegativeFocusLength" if Focal < 0.0
Create (D : Ax22d from gp ;
F : Pnt2d from gp ) returns MakeParabola;
--- Purpose : Creates a parabola with the local coordinate system and the focus point.
-- The sense of parametrization is given by Sense.
Create (D : Ax2d from gp ;
F : Pnt2d from gp ;
Sense : Boolean from Standard = Standard_True) returns MakeParabola;
--- Purpose :
-- D is the directrix of the parabola and F the focus point.
-- The symmetry axis "XAxis" of the parabola is normal to the
-- directrix and pass through the focus point F, but its
-- "Location" point is the vertex of the parabola.
-- The "YAxis" of the parabola is parallel to D and its "Location"
-- point is the vertex of the parabola.
Create(S1,O : Pnt2d from gp) returns MakeParabola;
---Purpose: Make a parabola with focal point S1 and
-- center O
-- The branch of the parabola returned will have <S1> as
-- focal point
-- The implicit orientation of the parabola is:
-- - the same one as the parabola Prb,
-- - the sense defined by the coordinate system Axis or the directrix D,
-- - the trigonometric sense if Sense is not given or is true, or
-- - the opposite sense if Sense is false.
-- Warning
-- The MakeParabola class does not prevent the
-- construction of a parabola with a null focal distance.
-- If an error occurs (that is, when IsDone returns
-- false), the Status function returns:
-- - gce_NullFocusLength if Focal is less than 0.0, or
-- - gce_NullAxis if points S1 and O are coincident.
Value(me) returns Parabola from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed parabola.
-- Exceptions StdFail_NotDone if no parabola is constructed.
---C++: alias "operator const Handle(Geom2d_Parabola)& () const { return Value(); }"
fields
TheParabola : Parabola from Geom2d;
--The solution from Geom2d.
end MakeParabola;

View File

@@ -14,8 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeParabola.ixx>
#include <GCE2d_MakeParabola.hxx>
#include <gce_MakeParab2d.hxx>
#include <Geom2d_Parabola.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Ax22d.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeParabola::GCE2d_MakeParabola(const gp_Parab2d& Prb)

View File

@@ -0,0 +1,134 @@
// 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 _GCE2d_MakeParabola_HeaderFile
#define _GCE2d_MakeParabola_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Parabola;
class StdFail_NotDone;
class gp_Parab2d;
class gp_Ax22d;
class gp_Ax2d;
class gp_Pnt2d;
//! This class implements the following algorithms used to
//! create Parabola from Geom2d.
//! * Create an Parabola from two apex and the center.
//! Defines the parabola in the parameterization range :
//! ]-infinite,+infinite[
//! The vertex of the parabola is the "Location" point of the
//! local coordinate system "XAxis" of the parabola.
//! The "XAxis" of the parabola is its axis of symmetry.
//! The "Xaxis" is oriented from the vertex of the parabola to the
//! Focus of the parabola.
//! The equation of the parabola in the local coordinate system is
//! Y**2 = (2*P) * X
//! P is the distance between the focus and the directrix of the
//! parabola called Parameter).
//! The focal length F = P/2 is the distance between the vertex
//! and the focus of the parabola.
class GCE2d_MakeParabola : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a parabola from a non persistent one.
Standard_EXPORT GCE2d_MakeParabola(const gp_Parab2d& Prb);
//! Creates a parabola with its local coordinate system and it's focal
//! length "Focal".
//! The "Location" point of "Axis" is the vertex of the parabola
//! Status is "NegativeFocusLength" if Focal < 0.0
Standard_EXPORT GCE2d_MakeParabola(const gp_Ax22d& Axis, const Standard_Real Focal);
//! Creates a parabola with its "MirrorAxis" and it's focal length "Focal".
//! MirrorAxis is the axis of symmetry of the curve, it is the
//! "XAxis". The "YAxis" is parallel to the directrix of the
//! parabola. The "Location" point of "MirrorAxis" is the vertex of the parabola
//! Status is "NegativeFocusLength" if Focal < 0.0
Standard_EXPORT GCE2d_MakeParabola(const gp_Ax2d& MirrorAxis, const Standard_Real Focal, const Standard_Boolean Sense);
//! Creates a parabola with the local coordinate system and the focus point.
//! The sense of parametrization is given by Sense.
Standard_EXPORT GCE2d_MakeParabola(const gp_Ax22d& D, const gp_Pnt2d& F);
//! D is the directrix of the parabola and F the focus point.
//! The symmetry axis "XAxis" of the parabola is normal to the
//! directrix and pass through the focus point F, but its
//! "Location" point is the vertex of the parabola.
//! The "YAxis" of the parabola is parallel to D and its "Location"
//! point is the vertex of the parabola.
Standard_EXPORT GCE2d_MakeParabola(const gp_Ax2d& D, const gp_Pnt2d& F, const Standard_Boolean Sense = Standard_True);
//! Make a parabola with focal point S1 and
//! center O
//! The branch of the parabola returned will have <S1> as
//! focal point
//! The implicit orientation of the parabola is:
//! - the same one as the parabola Prb,
//! - the sense defined by the coordinate system Axis or the directrix D,
//! - the trigonometric sense if Sense is not given or is true, or
//! - the opposite sense if Sense is false.
//! Warning
//! The MakeParabola class does not prevent the
//! construction of a parabola with a null focal distance.
//! If an error occurs (that is, when IsDone returns
//! false), the Status function returns:
//! - gce_NullFocusLength if Focal is less than 0.0, or
//! - gce_NullAxis if points S1 and O are coincident.
Standard_EXPORT GCE2d_MakeParabola(const gp_Pnt2d& S1, const gp_Pnt2d& O);
//! Returns the constructed parabola.
//! Exceptions StdFail_NotDone if no parabola is constructed.
Standard_EXPORT const Handle(Geom2d_Parabola)& Value() const;
operator const Handle(Geom2d_Parabola)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Parabola) TheParabola;
};
#endif // _GCE2d_MakeParabola_HeaderFile

View File

@@ -1,50 +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 GCE2d
---Purpose: This class implements an elementary construction algorithm for
-- a rotation in 2D space. The result is a Geom2d_Transformation transformation.
-- A MakeRotation object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt2d from gp,
Transformation from Geom2d,
Real from Standard
is
Create(Point : Pnt2d from gp ;
Angle : Real from Standard) returns MakeRotation;
---Purpose: Constructs a rotation through angle Angle about the center Point.
Value(me) returns Transformation from Geom2d
is static;
---C++: return const&
---Purpose: Returns the constructed transformation.
---C++: alias "operator const Handle(Geom2d_Transformation)& () const { return Value(); }"
fields
TheRotation : Transformation from Geom2d;
end MakeRotation;

View File

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

View File

@@ -0,0 +1,73 @@
// 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 _GCE2d_MakeRotation_HeaderFile
#define _GCE2d_MakeRotation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
class Geom2d_Transformation;
class gp_Pnt2d;
//! This class implements an elementary construction algorithm for
//! a rotation in 2D space. The result is a Geom2d_Transformation transformation.
//! A MakeRotation object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GCE2d_MakeRotation
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a rotation through angle Angle about the center Point.
Standard_EXPORT GCE2d_MakeRotation(const gp_Pnt2d& Point, const Standard_Real Angle);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom2d_Transformation)& Value() const;
operator const Handle(Geom2d_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Transformation) TheRotation;
};
#endif // _GCE2d_MakeRotation_HeaderFile

View File

@@ -1,52 +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 GCE2d
---Purpose: This class implements an elementary construction algorithm for
-- a scaling transformation in 2D space. The result is a
-- Geom2d_Transformation transformation.
-- A MakeScale object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt2d from gp,
Transformation from Geom2d,
Real from Standard
is
Create(Point : Pnt2d 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 Geom2d
is static;
---C++: return const&
---Purpose: Returns the constructed transformation.
---C++: alias "operator const Handle(Geom2d_Transformation)& () const { return Value(); }"
fields
TheScale : Transformation from Geom2d;
end MakeScale;

View File

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

View File

@@ -0,0 +1,76 @@
// 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 _GCE2d_MakeScale_HeaderFile
#define _GCE2d_MakeScale_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
class Geom2d_Transformation;
class gp_Pnt2d;
//! This class implements an elementary construction algorithm for
//! a scaling transformation in 2D space. The result is a
//! Geom2d_Transformation transformation.
//! A MakeScale object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GCE2d_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 GCE2d_MakeScale(const gp_Pnt2d& Point, const Standard_Real Scale);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom2d_Transformation)& Value() const;
operator const Handle(Geom2d_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Transformation) TheScale;
};
#endif // _GCE2d_MakeScale_HeaderFile

View File

@@ -1,90 +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 GCE2d inherits Root from GCE2d
---Purpose: Implements construction algorithms for a line
-- segment in the plane. The result is a
-- Geom2d_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 Pnt2d from gp,
Real from Standard,
Lin2d from gp,
Dir2d from gp,
TrimmedCurve from Geom2d
raises NotDone from StdFail
is
Create(P1, P2 : Pnt2d from gp ) returns MakeSegment;
---Purpose: Make a segment of Line from the 2 points <P1> and <P2>.
-- Status is "ConfusedPoints" if <P1> and <P2> are confused.
Create(P1 : Pnt2d from gp ;
V : Dir2d from gp ;
P2 : Pnt2d from gp ) returns MakeSegment;
---Purpose: Make a segment of Line from the point <P1> with
-- the direction <P> and ended by the projection of
-- <P2> on the line <P1,V>.
-- Status is "ConfusedPoints" if <P1> and <P2> are confused.
Create(Line : Lin2d from gp ;
U1, U2 : Real from Standard ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line>
-- between the two parameters U1 and U2.
-- Status is "SameParamters" if <U1> is equal <U2>.
Create(Line : Lin2d from gp ;
Point : Pnt2d from gp ;
Ulast : Real from Standard ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line>
-- between the point <Point> and the parameter Ulast.
-- It returns NullObject if <U1> is equal <U2>.
Create(Line : Lin2d from gp ;
P1 : Pnt2d from gp ;
P2 : Pnt2d from gp ) returns MakeSegment;
---Purpose: Make a segment of Line from the line <Line>
-- between the two points <P1> and <P2>.
-- It returns NullObject if <P1> and <P2> are confused.
-- Warning
-- If the points which limit the segment are coincident
-- for given points or for the projection of given points
-- on the line which supports the line segment (that is,
-- when IsDone returns false), the Status function
-- returns gce_ConfusedPoints. This warning only
-- concerns the first two constructors.
Value(me) returns TrimmedCurve from Geom2d
raises NotDone
is static;
---C++: return const&
---Purpose: Returns the constructed line segment.
-- Exceptions StdFail_NotDone if no line segment is constructed.
---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
fields
TheSegment : TrimmedCurve from Geom2d;
--The solution from Geom2d.
end MakeSegment;

View File

@@ -14,11 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeSegment.ixx>
#include <GCE2d_MakeLine.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Line.hxx>
#include <ElCLib.hxx>
#include <GCE2d_MakeLine.hxx>
#include <GCE2d_MakeSegment.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <StdFail_NotDone.hxx>
GCE2d_MakeSegment::GCE2d_MakeSegment(const gp_Pnt2d& P1 ,
const gp_Dir2d& V ,

View File

@@ -0,0 +1,109 @@
// 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 _GCE2d_MakeSegment_HeaderFile
#define _GCE2d_MakeSegment_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GCE2d_Root.hxx>
#include <Standard_Real.hxx>
class Geom2d_TrimmedCurve;
class StdFail_NotDone;
class gp_Pnt2d;
class gp_Dir2d;
class gp_Lin2d;
//! Implements construction algorithms for a line
//! segment in the plane. The result is a
//! Geom2d_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 GCE2d_MakeSegment : public GCE2d_Root
{
public:
DEFINE_STANDARD_ALLOC
//! Make a segment of Line from the 2 points <P1> and <P2>.
//! Status is "ConfusedPoints" if <P1> and <P2> are confused.
Standard_EXPORT GCE2d_MakeSegment(const gp_Pnt2d& P1, const gp_Pnt2d& P2);
//! Make a segment of Line from the point <P1> with
//! the direction <P> and ended by the projection of
//! <P2> on the line <P1,V>.
//! Status is "ConfusedPoints" if <P1> and <P2> are confused.
Standard_EXPORT GCE2d_MakeSegment(const gp_Pnt2d& P1, const gp_Dir2d& V, const gp_Pnt2d& P2);
//! Make a segment of Line from the line <Line>
//! between the two parameters U1 and U2.
//! Status is "SameParamters" if <U1> is equal <U2>.
Standard_EXPORT GCE2d_MakeSegment(const gp_Lin2d& Line, const Standard_Real U1, const Standard_Real U2);
//! Make a segment of Line from the line <Line>
//! between the point <Point> and the parameter Ulast.
//! It returns NullObject if <U1> is equal <U2>.
Standard_EXPORT GCE2d_MakeSegment(const gp_Lin2d& Line, const gp_Pnt2d& Point, const Standard_Real Ulast);
//! Make a segment of Line from the line <Line>
//! between the two points <P1> and <P2>.
//! It returns NullObject if <P1> and <P2> are confused.
//! Warning
//! If the points which limit the segment are coincident
//! for given points or for the projection of given points
//! on the line which supports the line segment (that is,
//! when IsDone returns false), the Status function
//! returns gce_ConfusedPoints. This warning only
//! concerns the first two constructors.
Standard_EXPORT GCE2d_MakeSegment(const gp_Lin2d& Line, const gp_Pnt2d& P1, const gp_Pnt2d& P2);
//! Returns the constructed line segment.
//! Exceptions StdFail_NotDone if no line segment is constructed.
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
protected:
private:
Handle(Geom2d_TrimmedCurve) TheSegment;
};
#endif // _GCE2d_MakeSegment_HeaderFile

View File

@@ -1,55 +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 GCE2d
---Purpose: This class implements elementary construction algorithms for a
-- translation in 2D space. The result is a
-- Geom2d_Transformation transformation.
-- A MakeTranslation object provides a framework for:
-- - defining the construction of the transformation,
-- - implementing the construction algorithm, and
-- - consulting the result.
uses Pnt2d from gp,
Transformation from Geom2d,
Vec2d from gp,
Real from Standard
is
Create(Vect : Vec2d from gp) returns MakeTranslation;
---Purpose: Constructs a translation along the vector Vect.
Create(Point1 : Pnt2d from gp;
Point2 : Pnt2d 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 Geom2d
is static;
---C++: return const&
---Purpose: Returns the constructed transformation.
---C++: alias "operator const Handle(Geom2d_Transformation)& () const { return Value(); }"
fields
TheTranslation : Transformation from Geom2d;
end MakeTranslation;

View File

@@ -14,12 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <GCE2d_MakeTranslation.ixx>
#include <GCE2d_MakeTranslation.hxx>
#include <Geom2d_Transformation.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
//=========================================================================
// Creation d une translation 3d de Geom2d de vecteur de tanslation Vec. +
//=========================================================================
GCE2d_MakeTranslation::GCE2d_MakeTranslation(const gp_Vec2d& Vec ) {
TheTranslation = new Geom2d_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 _GCE2d_MakeTranslation_HeaderFile
#define _GCE2d_MakeTranslation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom2d_Transformation;
class gp_Vec2d;
class gp_Pnt2d;
//! This class implements elementary construction algorithms for a
//! translation in 2D space. The result is a
//! Geom2d_Transformation transformation.
//! A MakeTranslation object provides a framework for:
//! - defining the construction of the transformation,
//! - implementing the construction algorithm, and
//! - consulting the result.
class GCE2d_MakeTranslation
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a translation along the vector Vect.
Standard_EXPORT GCE2d_MakeTranslation(const gp_Vec2d& Vect);
//! Constructs a translation along the vector
//! (Point1,Point2) defined from the point Point1 to the point Point2.
Standard_EXPORT GCE2d_MakeTranslation(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2);
//! Returns the constructed transformation.
Standard_EXPORT const Handle(Geom2d_Transformation)& Value() const;
operator const Handle(Geom2d_Transformation)& () const { return Value(); }
protected:
private:
Handle(Geom2d_Transformation) TheTranslation;
};
#endif // _GCE2d_MakeTranslation_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 GCE2d
---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;
---C++: inline
---Purpose: Returns true if the construction is successful.
Status(me) returns ErrorType from gce
is static;
---C++: inline
---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.
fields
TheError : ErrorType from gce is protected;
---Purpose: Enumeration to know why the algorithm didn t 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 <GCE2d_Root.ixx>
#include <GCE2d_Root.hxx>

71
src/GCE2d/GCE2d_Root.hxx Normal file
View File

@@ -0,0 +1,71 @@
// 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 _GCE2d_Root_HeaderFile
#define _GCE2d_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 GCE2d_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 <GCE2d_Root.lxx>
#endif // _GCE2d_Root_HeaderFile