1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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

56
src/Geom2dGcc/FILES Normal file
View File

@@ -0,0 +1,56 @@
Geom2dGcc.cxx
Geom2dGcc.hxx
Geom2dGcc_Circ2d2TanOn.cxx
Geom2dGcc_Circ2d2TanOn.hxx
Geom2dGcc_Circ2d2TanOnGeo.cxx
Geom2dGcc_Circ2d2TanOnGeo.hxx
Geom2dGcc_Circ2d2TanOnIter.cxx
Geom2dGcc_Circ2d2TanOnIter.hxx
Geom2dGcc_Circ2d2TanRad.cxx
Geom2dGcc_Circ2d2TanRad.hxx
Geom2dGcc_Circ2d2TanRadGeo.cxx
Geom2dGcc_Circ2d2TanRadGeo.hxx
Geom2dGcc_Circ2d3Tan.cxx
Geom2dGcc_Circ2d3Tan.hxx
Geom2dGcc_Circ2d3TanIter.cxx
Geom2dGcc_Circ2d3TanIter.hxx
Geom2dGcc_Circ2dTanCen.cxx
Geom2dGcc_Circ2dTanCen.hxx
Geom2dGcc_Circ2dTanCenGeo.cxx
Geom2dGcc_Circ2dTanCenGeo.hxx
Geom2dGcc_Circ2dTanOnRad.cxx
Geom2dGcc_Circ2dTanOnRad.hxx
Geom2dGcc_Circ2dTanOnRadGeo.cxx
Geom2dGcc_Circ2dTanOnRadGeo.hxx
Geom2dGcc_CurveTool.cxx
Geom2dGcc_CurveTool.hxx
Geom2dGcc_CurveToolGeo.cxx
Geom2dGcc_CurveToolGeo.hxx
Geom2dGcc_FunctionTanCirCu.cxx
Geom2dGcc_FunctionTanCirCu.hxx
Geom2dGcc_FunctionTanCuCu.cxx
Geom2dGcc_FunctionTanCuCu.hxx
Geom2dGcc_FunctionTanCuCuCu.cxx
Geom2dGcc_FunctionTanCuCuCu.hxx
Geom2dGcc_FunctionTanCuCuOnCu.cxx
Geom2dGcc_FunctionTanCuCuOnCu.hxx
Geom2dGcc_FunctionTanCuPnt.cxx
Geom2dGcc_FunctionTanCuPnt.hxx
Geom2dGcc_FunctionTanObl.cxx
Geom2dGcc_FunctionTanObl.hxx
Geom2dGcc_IsParallel.hxx
Geom2dGcc_Lin2d2Tan.cxx
Geom2dGcc_Lin2d2Tan.hxx
Geom2dGcc_Lin2d2TanIter.cxx
Geom2dGcc_Lin2d2TanIter.hxx
Geom2dGcc_Lin2dTanObl.cxx
Geom2dGcc_Lin2dTanObl.hxx
Geom2dGcc_Lin2dTanOblIter.cxx
Geom2dGcc_Lin2dTanOblIter.hxx
Geom2dGcc_QCurve.cxx
Geom2dGcc_QCurve.hxx
Geom2dGcc_QualifiedCurve.cxx
Geom2dGcc_QualifiedCurve.hxx
Geom2dGcc_Type1.hxx
Geom2dGcc_Type2.hxx
Geom2dGcc_Type3.hxx

View File

@@ -1,175 +0,0 @@
-- Created on: 1992-06-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.
package Geom2dGcc
--- Purpose: The Geom2dGcc package describes qualified 2D
-- curves used in the construction of constrained geometric
-- objects by an algorithm provided by the Geom2dGcc package.
-- A qualified 2D curve is a curve with a qualifier which
-- specifies whether the solution of a construction
-- algorithm using the qualified curve (as an argument):
-- - encloses the curve, or
-- - is enclosed by the curve, or
-- - is built so that both the curve and this solution are external to one another, or
-- - is undefined (all solutions apply).
-- These package methods provide simpler functions to construct a qualified curve.
-- Note: the interior of a curve is defined as the left-hand
-- side of the curve in relation to its orientation.
uses GccEnt,
GccAna,
StdFail,
Geom2dInt,
Geom2d,
GeomAbs,
TColStd,
Standard,
Geom2dAdaptor,
Extrema,
Adaptor3d,
Adaptor2d,
TColgp,
gp,
math
is
class CurveTool;
class QualifiedCurve;
class Circ2d3Tan;
class Circ2d2TanRad;
class Circ2d2TanOn;
class Circ2dTanOnRad;
class Circ2dTanCen;
class Lin2d2Tan;
class Lin2dTanObl;
class QCurve;
class CurveToolGeo;
class Circ2d2TanOnGeo;
class Circ2d2TanRadGeo;
class Circ2dTanCenGeo;
class Circ2dTanOnRadGeo;
class Circ2d3TanIter;
private class FunctionTanCuCuCu;
class Circ2d2TanOnIter;
private class FunctionTanCuCuOnCu;
class Lin2dTanOblIter;
private class FunctionTanObl;
class Lin2d2TanIter;
private class FunctionTanCuCu;
private class FunctionTanCuPnt;
private class FunctionTanCirCu;
enumeration Type1 is CuCuCu,CiCuCu,CiCiCu,CiLiCu,LiLiCu,LiCuCu;
enumeration Type2 is CuCuOnCu,CiCuOnCu,LiCuOnCu,CuPtOnCu,
CuCuOnLi,CiCuOnLi,LiCuOnLi,CuPtOnLi,
CuCuOnCi,CiCuOnCi,LiCuOnCi,CuPtOnCi;
enumeration Type3 is CuCu,CiCu;
exception IsParallel inherits DomainError from Standard;
Unqualified(Obj : Curve from Geom2dAdaptor) returns QualifiedCurve;
---Purpose: Constructs such a qualified curve that the relative
-- position of the solution computed by a construction
-- algorithm using the qualified curve to the circle or line is
-- not qualified, i.e. all solutions apply.
-- Warning
-- Obj is an adapted curve, i.e. an object which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The adapted curve is created in the following way:
-- Handle(Geom2d_Curve) mycurve = ...
-- ;
-- Geom2dAdaptor_Curve Obj ( mycurve )
-- ;
-- The qualified curve is then constructed with this object:
-- Geom2dGcc_QualifiedCurve
-- myQCurve = Geom2dGcc::Unqualified(Obj);
Enclosing(Obj : Curve from Geom2dAdaptor) returns QualifiedCurve;
---Purpose: Constructs such a qualified curve that the solution
-- computed by a construction algorithm using the qualified
-- curve encloses the curve.
-- Warning
-- Obj is an adapted curve, i.e. an object which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The adapted curve is created in the following way:
-- Handle(Geom2d_Curve) mycurve = ...
-- ;
-- Geom2dAdaptor_Curve Obj ( mycurve )
-- ;
-- The qualified curve is then constructed with this object:
-- Geom2dGcc_QualifiedCurve
-- myQCurve = Geom2dGcc::Enclosing(Obj);
Enclosed(Obj : Curve from Geom2dAdaptor) returns QualifiedCurve;
---Purpose: Constructs such a qualified curve that the solution
-- computed by a construction algorithm using the qualified
-- curve is enclosed by the curve.
-- Warning
-- Obj is an adapted curve, i.e. an object which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The adapted curve is created in the following way:
-- Handle(Geom2d_Curve) mycurve = ...
-- ;
-- Geom2dAdaptor_Curve Obj ( mycurve )
-- ;
-- The qualified curve is then constructed with this object:
-- Geom2dGcc_QualifiedCurve
-- myQCurve = Geom2dGcc::Enclosed(Obj);
Outside(Obj : Curve from Geom2dAdaptor) returns QualifiedCurve;
---Purpose: Constructs such a qualified curve that the solution
-- computed by a construction algorithm using the qualified
-- curve and the curve are external to one another.
-- Warning
-- Obj is an adapted curve, i.e. an object which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The adapted curve is created in the following way:
-- Handle(Geom2d_Curve) mycurve = ...
-- ;
-- Geom2dAdaptor_Curve Obj ( mycurve )
-- ;
-- The qualified curve is then constructed with this object:
-- Geom2dGcc_QualifiedCurve
-- myQCurve = Geom2dGcc::Outside(Obj);
end Geom2dGcc;

View File

@@ -17,7 +17,9 @@
// +
//=========================================================================
#include <Geom2dGcc.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
Geom2dGcc_QualifiedCurve
Geom2dGcc::Unqualified(const Geom2dAdaptor_Curve& Curve) {

190
src/Geom2dGcc/Geom2dGcc.hxx Normal file
View File

@@ -0,0 +1,190 @@
// Created on: 1992-06-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 _Geom2dGcc_HeaderFile
#define _Geom2dGcc_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class Geom2dGcc_QualifiedCurve;
class Geom2dAdaptor_Curve;
class Geom2dGcc_CurveTool;
class Geom2dGcc_QualifiedCurve;
class Geom2dGcc_Circ2d3Tan;
class Geom2dGcc_Circ2d2TanRad;
class Geom2dGcc_Circ2d2TanOn;
class Geom2dGcc_Circ2dTanOnRad;
class Geom2dGcc_Circ2dTanCen;
class Geom2dGcc_Lin2d2Tan;
class Geom2dGcc_Lin2dTanObl;
class Geom2dGcc_QCurve;
class Geom2dGcc_CurveToolGeo;
class Geom2dGcc_Circ2d2TanOnGeo;
class Geom2dGcc_Circ2d2TanRadGeo;
class Geom2dGcc_Circ2dTanCenGeo;
class Geom2dGcc_Circ2dTanOnRadGeo;
class Geom2dGcc_Circ2d3TanIter;
class Geom2dGcc_FunctionTanCuCuCu;
class Geom2dGcc_Circ2d2TanOnIter;
class Geom2dGcc_FunctionTanCuCuOnCu;
class Geom2dGcc_Lin2dTanOblIter;
class Geom2dGcc_FunctionTanObl;
class Geom2dGcc_Lin2d2TanIter;
class Geom2dGcc_FunctionTanCuCu;
class Geom2dGcc_FunctionTanCuPnt;
class Geom2dGcc_FunctionTanCirCu;
//! The Geom2dGcc package describes qualified 2D
//! curves used in the construction of constrained geometric
//! objects by an algorithm provided by the Geom2dGcc package.
//! A qualified 2D curve is a curve with a qualifier which
//! specifies whether the solution of a construction
//! algorithm using the qualified curve (as an argument):
//! - encloses the curve, or
//! - is enclosed by the curve, or
//! - is built so that both the curve and this solution are external to one another, or
//! - is undefined (all solutions apply).
//! These package methods provide simpler functions to construct a qualified curve.
//! Note: the interior of a curve is defined as the left-hand
//! side of the curve in relation to its orientation.
class Geom2dGcc
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs such a qualified curve that the relative
//! position of the solution computed by a construction
//! algorithm using the qualified curve to the circle or line is
//! not qualified, i.e. all solutions apply.
//! Warning
//! Obj is an adapted curve, i.e. an object which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The adapted curve is created in the following way:
//! Handle(Geom2d_Curve) mycurve = ...
//! ;
//! Geom2dAdaptor_Curve Obj ( mycurve )
//! ;
//! The qualified curve is then constructed with this object:
//! Geom2dGcc_QualifiedCurve
//! myQCurve = Geom2dGcc::Unqualified(Obj);
Standard_EXPORT static Geom2dGcc_QualifiedCurve Unqualified (const Geom2dAdaptor_Curve& Obj);
//! Constructs such a qualified curve that the solution
//! computed by a construction algorithm using the qualified
//! curve encloses the curve.
//! Warning
//! Obj is an adapted curve, i.e. an object which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The adapted curve is created in the following way:
//! Handle(Geom2d_Curve) mycurve = ...
//! ;
//! Geom2dAdaptor_Curve Obj ( mycurve )
//! ;
//! The qualified curve is then constructed with this object:
//! Geom2dGcc_QualifiedCurve
//! myQCurve = Geom2dGcc::Enclosing(Obj);
Standard_EXPORT static Geom2dGcc_QualifiedCurve Enclosing (const Geom2dAdaptor_Curve& Obj);
//! Constructs such a qualified curve that the solution
//! computed by a construction algorithm using the qualified
//! curve is enclosed by the curve.
//! Warning
//! Obj is an adapted curve, i.e. an object which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The adapted curve is created in the following way:
//! Handle(Geom2d_Curve) mycurve = ...
//! ;
//! Geom2dAdaptor_Curve Obj ( mycurve )
//! ;
//! The qualified curve is then constructed with this object:
//! Geom2dGcc_QualifiedCurve
//! myQCurve = Geom2dGcc::Enclosed(Obj);
Standard_EXPORT static Geom2dGcc_QualifiedCurve Enclosed (const Geom2dAdaptor_Curve& Obj);
//! Constructs such a qualified curve that the solution
//! computed by a construction algorithm using the qualified
//! curve and the curve are external to one another.
//! Warning
//! Obj is an adapted curve, i.e. an object which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The adapted curve is created in the following way:
//! Handle(Geom2d_Curve) mycurve = ...
//! ;
//! Geom2dAdaptor_Curve Obj ( mycurve )
//! ;
//! The qualified curve is then constructed with this object:
//! Geom2dGcc_QualifiedCurve
//! myQCurve = Geom2dGcc::Outside(Obj);
Standard_EXPORT static Geom2dGcc_QualifiedCurve Outside (const Geom2dAdaptor_Curve& Obj);
protected:
private:
friend class Geom2dGcc_CurveTool;
friend class Geom2dGcc_QualifiedCurve;
friend class Geom2dGcc_Circ2d3Tan;
friend class Geom2dGcc_Circ2d2TanRad;
friend class Geom2dGcc_Circ2d2TanOn;
friend class Geom2dGcc_Circ2dTanOnRad;
friend class Geom2dGcc_Circ2dTanCen;
friend class Geom2dGcc_Lin2d2Tan;
friend class Geom2dGcc_Lin2dTanObl;
friend class Geom2dGcc_QCurve;
friend class Geom2dGcc_CurveToolGeo;
friend class Geom2dGcc_Circ2d2TanOnGeo;
friend class Geom2dGcc_Circ2d2TanRadGeo;
friend class Geom2dGcc_Circ2dTanCenGeo;
friend class Geom2dGcc_Circ2dTanOnRadGeo;
friend class Geom2dGcc_Circ2d3TanIter;
friend class Geom2dGcc_FunctionTanCuCuCu;
friend class Geom2dGcc_Circ2d2TanOnIter;
friend class Geom2dGcc_FunctionTanCuCuOnCu;
friend class Geom2dGcc_Lin2dTanOblIter;
friend class Geom2dGcc_FunctionTanObl;
friend class Geom2dGcc_Lin2d2TanIter;
friend class Geom2dGcc_FunctionTanCuCu;
friend class Geom2dGcc_FunctionTanCuPnt;
friend class Geom2dGcc_FunctionTanCirCu;
};
#endif // _Geom2dGcc_HeaderFile

View File

@@ -1,291 +0,0 @@
-- Created on: 1992-10-20
-- 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 Circ2d2TanOn from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles TANgent to 2 entities and
-- having the center ON a curve.
-- The order of the tangency argument is always
-- QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
-- the arguments are :
-- - The two tangency arguments.
-- - The center line.
-- - The parameter for each tangency argument which
-- is a curve.
-- - The tolerance.
-- inherits Entity from Standard
uses Curve from Geom2dAdaptor,
QualifiedCurve from Geom2dGcc,
Integer from Standard,
Boolean from Standard,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Array1OfPnt2d from TColgp,
Array1OfCirc2d from TColgp,
Pnt2d from gp,
Point from Geom2d,
Circ2d from gp,
Circ2d2TanOn from GccAna,
Circ2d2TanOnGeo from Geom2dGcc,
Circ2d2TanOnIter from Geom2dGcc,
Position from GccEnt,
Array1OfPosition from GccEnt
raises NotDone from StdFail,
BadQualifier from GccEnt,
OutOfRange from Standard
is
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
OnCurve : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard ;
Param1 : Real from Standard ;
Param2 : Real from Standard ;
ParamOn : Real from Standard )
returns Circ2d2TanOn from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two curves and
-- having the center ON a 2d curve.
-- Param1 is the initial guess on the first curve QualifiedCurv.
-- Param1 is the initial guess on the second curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Point : Point from Geom2d ;
OnCurve : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard ;
Param1 : Real from Standard ;
ParamOn : Real from Standard )
returns Circ2d2TanOn from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to one curve and one point and
-- having the center ON a 2d curve.
-- Param1 is the initial guess on the first curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
Create(Point1 : Point from Geom2d ;
Point2 : Point from Geom2d ;
OnCurve : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard )
returns Circ2d2TanOn from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two points and
-- having the center ON a 2d curve.
-- Tolerance is used for the limit cases.
-- -- ....................................................................
Results(me : in out ;
Circ : Circ2d2TanOn from GccAna)
is static;
Results(me : in out ;
Circ : Circ2d2TanOnGeo from Geom2dGcc)
is static;
IsDone(me) returns Boolean
is static;
---Purpose: Returns true if the construction algorithm does not fail
-- (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has
-- reached its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone
is static;
---Purpose: This method returns the number of solutions.
-- NotDone is raised if the algorithm failed.
ThisSolution(me ; Index : Integer) returns Circ2d
raises OutOfRange, NotDone
is static;
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be carefull: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the context
-- of the algorithm-object.
-- Exceptions
-- Standard_OutOfRange if Index is less than or equal
-- to zero or greater than the number of solutions
-- computed by this algorithm.
-- StdFail_NotDone if the construction fails.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: It returns the informations about the qualifiers of
-- the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
CenterOn3 (me ;
Index : Integer from Standard;
ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns the center PntSol of the solution of index Index
-- computed by this algorithm.
-- ParArg is the parameter of the point PntSol on the third argument.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
raises NotDone
is static;
--- Purpose: Returns true if the solution of index Index and,
-- respectively, the first or second argument of this
-- algorithm are the same (i.e. there are 2 identical circles).
-- If Rarg is the radius of the first or second argument,
-- Rsol is the radius of the solution and dist is the
-- distance between the two centers, we consider the two
-- circles to be identical if |Rarg - Rsol| and dist
-- are less than or equal to the tolerance criterion given at
-- the time of construction of this algorithm.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
IsTheSame2(me ;
Index : Integer ) returns Boolean
raises NotDone
is static;
--- Purpose: Returns true if the solution of index Index and,
-- respectively, the first or second argument of this
-- algorithm are the same (i.e. there are 2 identical circles).
-- If Rarg is the radius of the first or second argument,
-- Rsol is the radius of the solution and dist is the
-- distance between the two centers, we consider the two
-- circles to be identical if |Rarg - Rsol| and dist
-- are less than or equal to the tolerance criterion given at
-- the time of construction of this algorithm.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
fields
WellDone : Boolean from Standard;
---Purpose: Returns True if the algorithm succeeded.
cirsol : Array1OfCirc2d from TColgp;
-- TheSolution.
NbrSol : Integer from Standard;
---Purpose: Returns the number of solutions.
qualifier1 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the second argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: Returns 1 if the solution and the first argument are the same (2 circles).
-- if R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R1+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
TheSame2 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the second argument are the same (2 circles).
-- if R2 is the radius of the second argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R2+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first argument.
pnttg2sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the second argument.
pntcen : Array1OfPnt2d from TColgp;
---Purpose: The center point of the solution.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of pnttg1sol on the solution.
-- pnttg1sol is the tangency point between the solution and the first argument.
par2sol : Array1OfReal from TColStd;
---Purpose: The parameter of pnttg2sol on the solution.
-- pnttg2sol is the tangency point between the solution and the second argument.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of pnttg1sol on the first argument.
-- pnttg1sol is the tangency point between the solution and the first argument.
pararg2 : Array1OfReal from TColStd;
---Purpose: The parameter of pnttg2sol on the second argument.
-- pnttg2sol is the tangency point between the solution and the second argument.
parcen3 : Array1OfReal from TColStd;
---Purpose: The parameter of the center point of the solution on the third argument.
Invert : Boolean from Standard;
-- CircAna : Circ2d2TanOn from GccAna;
-- CircGeo : Circ2d2TanOnGeo from Geom2dGcc;
-- CircIter : Circ2d2TanOnIter from Geom2dGcc;
-- TypeAna : Boolean;
end Circ2d2TanOn;

View File

@@ -14,17 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2d2TanOn.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GccAna_Circ2d2TanOn.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2d2TanOn.hxx>
#include <Geom2dGcc_Circ2d2TanOnGeo.hxx>
#include <Geom2dGcc_Circ2d2TanOnIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2d2TanOn::

View File

@@ -0,0 +1,215 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Circ2d2TanOn_HeaderFile
#define _Geom2dGcc_Circ2d2TanOn_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <Standard_Integer.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class StdFail_NotDone;
class GccEnt_BadQualifier;
class Standard_OutOfRange;
class Geom2dGcc_QualifiedCurve;
class Geom2dAdaptor_Curve;
class Geom2d_Point;
class GccAna_Circ2d2TanOn;
class Geom2dGcc_Circ2d2TanOnGeo;
class gp_Circ2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create 2d circles TANgent to 2 entities and
//! having the center ON a curve.
//! The order of the tangency argument is always
//! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
//! the arguments are :
//! - The two tangency arguments.
//! - The center line.
//! - The parameter for each tangency argument which
//! is a curve.
//! - The tolerance.
class Geom2dGcc_Circ2d2TanOn
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles TANgent to two curves and
//! having the center ON a 2d curve.
//! Param1 is the initial guess on the first curve QualifiedCurv.
//! Param1 is the initial guess on the second curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn);
//! This method implements the algorithms used to
//! create 2d circles TANgent to one curve and one point and
//! having the center ON a 2d curve.
//! Param1 is the initial guess on the first curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Geom2dGcc_QualifiedCurve& Qualified1, const Handle(Geom2d_Point)& Point, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real ParamOn);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two points and
//! having the center ON a 2d curve.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Handle(Geom2d_Point)& Point1, const Handle(Geom2d_Point)& Point2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance);
Standard_EXPORT void Results (const GccAna_Circ2d2TanOn& Circ);
Standard_EXPORT void Results (const Geom2dGcc_Circ2d2TanOnGeo& Circ);
//! Returns true if the construction algorithm does not fail
//! (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has
//! reached its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! NotDone is raised if the algorithm failed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be carefull: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the context
//! of the algorithm-object.
//! Exceptions
//! Standard_OutOfRange if Index is less than or equal
//! to zero or greater than the number of solutions
//! computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! It returns the informations about the qualifiers of
//! the tangency
//! arguments concerning the solution number Index.
//! It returns the real qualifiers (the qualifiers given to the
//! constructor method in case of enclosed, enclosing and outside
//! and the qualifiers computedin case of unqualified).
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns the center PntSol of the solution of index Index
//! computed by this algorithm.
//! ParArg is the parameter of the point PntSol on the third argument.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns true if the solution of index Index and,
//! respectively, the first or second argument of this
//! algorithm are the same (i.e. there are 2 identical circles).
//! If Rarg is the radius of the first or second argument,
//! Rsol is the radius of the solution and dist is the
//! distance between the two centers, we consider the two
//! circles to be identical if |Rarg - Rsol| and dist
//! are less than or equal to the tolerance criterion given at
//! the time of construction of this algorithm.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
//! Returns true if the solution of index Index and,
//! respectively, the first or second argument of this
//! algorithm are the same (i.e. there are 2 identical circles).
//! If Rarg is the radius of the first or second argument,
//! Rsol is the radius of the solution and dist is the
//! distance between the two centers, we consider the two
//! circles to be identical if |Rarg - Rsol| and dist
//! are less than or equal to the tolerance criterion given at
//! the time of construction of this algorithm.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
TColgp_Array1OfCirc2d cirsol;
Standard_Integer NbrSol;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
TColStd_Array1OfInteger TheSame1;
TColStd_Array1OfInteger TheSame2;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColgp_Array1OfPnt2d pntcen;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
TColStd_Array1OfReal parcen3;
Standard_Boolean Invert;
};
#endif // _Geom2dGcc_Circ2d2TanOn_HeaderFile

View File

@@ -1,293 +0,0 @@
-- Created on: 1991-03-29
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2d2TanOnGeo from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles TANgent to 2 entities and
-- having the center ON a curve.
-- The order of the tangency argument is always
-- QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
-- the arguments are :
-- - The two tangency arguments (lines, circles or points).
-- - The center line (a curve).
-- - The parameter for each tangency argument which
-- is a curve.
-- - The tolerance.
-- inherits Entity from Standard
uses Pnt2d from gp,
Lin2d from gp,
Circ2d from gp,
QualifiedCirc from GccEnt,
QualifiedLin from GccEnt,
Array1OfCirc2d from TColgp,
Array1OfPnt2d from TColgp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Position from GccEnt,
Array1OfPosition from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc,
OffsetCurve from Adaptor3d,
HCurve from Geom2dAdaptor,
CurveToolGeo from Geom2dGcc,
TheIntConicCurveOfGInter from Geom2dInt
raises NotDone from StdFail,
BadQualifier from GccEnt,
OutOfRange from Standard
is
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QualifiedCirc from GccEnt ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two 2d circles and
-- having the center ON a curve.
raises BadQualifier from GccEnt;
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QualifiedLin from GccEnt ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a 2d line
-- having the center ON a curve.
raises BadQualifier from GccEnt;
Create(Qualified1 : QualifiedCirc from GccEnt ;
Point2 : Pnt2d from gp ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a point
-- having the center ON a curve.
raises BadQualifier from GccEnt;
Create(Qualified1 : QualifiedLin from GccEnt ;
Qualified2 : QualifiedLin from GccEnt ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two 2d lines
-- having the center ON a curve.
raises BadQualifier from GccEnt;
Create(Qualified1 : QualifiedLin from GccEnt ;
Qualified2 : Pnt2d from gp ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d line and a point
-- having the center ON a 2d line.
raises BadQualifier from GccEnt;
Create(Point1 : Pnt2d from gp ;
Point2 : Pnt2d from gp ;
OnCurv : Curve from Geom2dAdaptor ;
Tolerance : Real from Standard) returns Circ2d2TanOnGeo ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two points
-- having the center ON a 2d line.
-- ....................................................................
IsDone(me) returns Boolean from Standard
is static;
---Purpose: This method returns True if the construction
-- algorithm succeeded.
NbSolutions(me) returns Integer from Standard
---Purpose: This method returns the number of solutions.
raises NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
ThisSolution(me ; Index : Integer) returns Circ2d from gp
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be careful: the Index is only a way to get all the
-- solutions, but is not associated to those outside the
-- context of the algorithm-object.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: It returns the informations about the qualifiers of
-- the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point on the
-- solution curv.
-- ParArg is the intrinsic parameter of the point on the
-- argument curv.
-- PntSol is the tangency point on the solution curv.
-- PntArg is the tangency point on the argument curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the tangency point between the
-- result number Index and the second argument.
-- ParSol is the intrinsic parameter of the point on the
-- solution curv.
-- ParArg is the intrinsic parameter of the point on the
-- argument curv.
-- PntSol is the tangency point on the solution curv.
-- PntArg is the tangency point on the argument curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
CenterOn3 (me ;
Index : Integer from Standard;
ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the center (on the curv)
-- of the result.
-- ParArg is the intrinsic parameter of the point on
-- the argument curv.
-- PntSol is the center point of the solution curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
---Purpose: Returns True if the solution number Index is equal to
-- the first argument and False in the other cases.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
IsTheSame2(me ;
Index : Integer from Standard) returns Boolean from Standard
---Purpose: Returns True if the solution number Index is equal to
-- the second argument and False in the other cases.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
fields
WellDone : Boolean from Standard;
---Purpose: True if the algorithm succeeded.
NbrSol : Integer from Standard;
---Purpose: Number of solutions.
cirsol : Array1OfCirc2d from TColgp;
---Purpose: The solutions.
qualifier1 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the second argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the first argument are the same
-- (2 circles).
-- If R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we consider the two circles are identical if R1+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
TheSame2 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the second argument are the same
-- (2 circles).
-- If R2 is the radius of the second argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we consider the two circles are identical if R2+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first
-- argument on the solution.
pnttg2sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the second
-- argument on the solution.
pntcen : Array1OfPnt2d from TColgp;
---Purpose: The center point of the solution on the third argument.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the solution.
par2sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the solution.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the first argument.
pararg2 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the second argument.
parcen3 : Array1OfReal from TColStd;
---Purpose: The parameter of the center point of the solution on the
-- second argument.
end Circ2d2TanOnGeo;

View File

@@ -24,26 +24,28 @@
// Courbes. +
//=========================================================================
#include <Geom2dGcc_Circ2d2TanOnGeo.ixx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <ElCLib.hxx>
#include <GccAna_Circ2dBisec.hxx>
#include <GccAna_CircLin2dBisec.hxx>
#include <GccAna_Lin2dBisec.hxx>
#include <GccAna_CircPnt2dBisec.hxx>
#include <GccAna_Lin2dBisec.hxx>
#include <GccAna_LinPnt2dBisec.hxx>
#include <GccAna_Pnt2dBisec.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <GccInt_BHyper.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dGcc_Circ2d2TanOnGeo.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <Geom2dInt_TheIntConicCurveOfGInter.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2d2TanOnGeo::
Geom2dGcc_Circ2d2TanOnGeo (const GccEnt_QualifiedCirc& Qualified1 ,

View File

@@ -0,0 +1,212 @@
// Created on: 1991-03-29
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile
#define _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class StdFail_NotDone;
class GccEnt_BadQualifier;
class Standard_OutOfRange;
class GccEnt_QualifiedCirc;
class Geom2dAdaptor_Curve;
class GccEnt_QualifiedLin;
class gp_Pnt2d;
class gp_Circ2d;
//! This class implements the algorithms used to
//! create 2d circles TANgent to 2 entities and
//! having the center ON a curve.
//! The order of the tangency argument is always
//! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
//! the arguments are :
//! - The two tangency arguments (lines, circles or points).
//! - The center line (a curve).
//! - The parameter for each tangency argument which
//! is a curve.
//! - The tolerance.
class Geom2dGcc_Circ2d2TanOnGeo
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles TANgent to two 2d circles and
//! having the center ON a curve.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a 2d line
//! having the center ON a curve.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a point
//! having the center ON a curve.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two 2d lines
//! having the center ON a curve.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d line and a point
//! having the center ON a 2d line.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const gp_Pnt2d& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two points
//! having the center ON a 2d line.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
//! This method returns True if the construction
//! algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be careful: the Index is only a way to get all the
//! solutions, but is not associated to those outside the
//! context of the algorithm-object.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! It returns the informations about the qualifiers of
//! the tangency
//! arguments concerning the solution number Index.
//! It returns the real qualifiers (the qualifiers given to the
//! constructor method in case of enclosed, enclosing and outside
//! and the qualifiers computedin case of unqualified).
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point on the
//! solution curv.
//! ParArg is the intrinsic parameter of the point on the
//! argument curv.
//! PntSol is the tangency point on the solution curv.
//! PntArg is the tangency point on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result number Index and the second argument.
//! ParSol is the intrinsic parameter of the point on the
//! solution curv.
//! ParArg is the intrinsic parameter of the point on the
//! argument curv.
//! PntSol is the tangency point on the solution curv.
//! PntArg is the tangency point on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the center (on the curv)
//! of the result.
//! ParArg is the intrinsic parameter of the point on
//! the argument curv.
//! PntSol is the center point of the solution curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns True if the solution number Index is equal to
//! the first argument and False in the other cases.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
//! Returns True if the solution number Index is equal to
//! the second argument and False in the other cases.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
TColStd_Array1OfInteger TheSame1;
TColStd_Array1OfInteger TheSame2;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColgp_Array1OfPnt2d pntcen;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
TColStd_Array1OfReal parcen3;
};
#endif // _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile

View File

@@ -1,346 +0,0 @@
-- Created on: 1991-03-29
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2d2TanOnIter from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles TANgent to 2 entities and
-- having the center ON a curv.
-- The order of the tangency argument is always
-- QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
-- the arguments are :
-- - The two tangency arguments.
-- - The center line.
-- - The parameter for each tangency argument which
-- is a curve.
-- - The tolerance.
-- inherits Entity from Standard
uses Pnt2d from gp,
Lin2d from gp,
Circ2d from gp,
QualifiedCirc from GccEnt,
QualifiedLin from GccEnt,
Position from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc
raises NotDone from StdFail
is
-- On a 2d line ..........................................................
Create(Qualified1 : QualifiedCirc ;
Qualified2 : QCurve from Geom2dGcc;
OnLine : Lin2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a curve and
-- having the center ON a 2d line.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QualifiedLin ;
Qualified2 : QCurve from Geom2dGcc;
OnLine : Lin2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d line and a curve and
-- having the center ON a 2d line.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Qualified2 : QCurve from Geom2dGcc;
OnLine : Lin2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two curves and
-- having the center ON a 2d line.
-- Param1 is the initial guess on the first QualifiedCurv.
-- Param2 is the initial guess on the first QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Point2 : Pnt2d ;
OnLine : Lin2d ;
Param1 : Real ;
Param2 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d point and a curve and
-- having the center ON a 2d line.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
-- -- On a 2d Circle .....................................................
Create(Qualified1 : QualifiedCirc ;
Qualified2 : QCurve from Geom2dGcc;
OnCirc : Circ2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a curve and
-- having the center ON a 2d circle.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QualifiedLin ;
Qualified2 : QCurve from Geom2dGcc;
OnCirc : Circ2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d line and a curve and
-- having the center ON a 2d circle.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Qualified2 : QCurve from Geom2dGcc;
OnCirc : Circ2d ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two curves and
-- having the center ON a 2d circle.
-- Param1 is the initial guess on the first QualifiedCurv.
-- Param2 is the initial guess on the first QualifiedCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Point2 : Pnt2d ;
OnCirc : Circ2d ;
Param1 : Real ;
Param2 : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d point and a curve and
-- having the center ON a 2d circle.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolerance is used for the limit cases.
-- -- On a curve .....................................................
Create(Qualified1 : QualifiedCirc ;
Qualified2 : QCurve from Geom2dGcc;
OnCurv : Curve from Geom2dAdaptor;
Param1 : Real ;
Param2 : Real ;
ParamOn : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a curve and
-- having the center ON a 2d curve.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QualifiedLin ;
Qualified2 : QCurve from Geom2dGcc;
OnCurve : Curve from Geom2dAdaptor;
Param1 : Real ;
Param2 : Real ;
ParamOn : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d line and a curve and
-- having the center ON a 2d curve.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Point2 : Pnt2d ;
OnCurve : Curve from Geom2dAdaptor;
Param1 : Real ;
ParamOn : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d Point and a curve and
-- having the center ON a 2d curve.
-- Param1 is the initial guess on the curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
Create(Qualified1 : QCurve from Geom2dGcc;
Qualified2 : QCurve from Geom2dGcc;
OnCurve : Curve from Geom2dAdaptor;
Param1 : Real ;
Param2 : Real ;
ParamOn : Real ;
Tolerance : Real ) returns Circ2d2TanOnIter from Geom2dGcc ;
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two curves and
-- having the center ON a 2d curve.
-- Param1 is the initial guess on the first curve QualifiedCurv.
-- Param1 is the initial guess on the second curve QualifiedCurv.
-- ParamOn is the initial guess on the center curve OnCurv.
-- Tolerance is used for the limit cases.
-- -- ....................................................................
IsDone(me) returns Boolean
is static;
---Purpose: This method returns True if the construction
-- algorithm succeeded.
ThisSolution(me) returns Circ2d
---Purpose: Returns the solution.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
WhichQualifier(me ;
Qualif1 : out Position from GccEnt;
Qualif2 : out Position from GccEnt)
raises NotDone from StdFail
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns information about the tangency point between
-- the result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol
-- on the argument curv.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
Tangency2(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns information about the tangency point between
-- the result and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol
-- on the argument curv.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
CenterOn3 (me ;
ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns information about the center (on the curv) of the
-- result and the third argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
IsTheSame1(me) returns Boolean
-- Returns True if the solution is equal to the first argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
IsTheSame2(me) returns Boolean
-- Returns True if the solution is equal to the second argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
fields
WellDone : Boolean;
---Purpose: True if the algorithm succeeded.
cirsol : Circ2d from gp;
-- The solutions.
qualifier1 : Position from GccEnt;
-- The qualifiers of the first argument.
qualifier2 : Position from GccEnt;
-- The qualifiers of the first argument.
TheSame1 : Boolean;
---Purpose: True if the solution and the first argument are the
-- same in the tolerance of Tolerance.
-- False in the other cases.
TheSame2 : Boolean;
---Purpose: True if the solution and the second argument are the
-- same in the tolerance of Tolerance.
-- False in the other cases.
pnttg1sol : Pnt2d;
---Purpose: The tangency point between the solution and the first
-- argument on the solution.
pnttg2sol : Pnt2d;
---Purpose: The tangency point between the solution and the second
-- argument on the solution.
pntcen : Pnt2d;
---Purpose: The center point of the solution on the third argument.
par1sol : Real;
---Purpose: The parameter of the tangency point between the
-- solution and the first argument on the solution.
par2sol : Real;
---Purpose: The parameter of the tangency point between the
-- solution and the second argument on the solution.
pararg1 : Real;
---Purpose: The parameter of the tangency point between the
-- solution and the first argument on the first argument.
pararg2 : Real;
---Purpose: The parameter of the tangency point between the
-- solution and the second argument on the second argument.
parcen3 : Real;
---Purpose: The parameter of the center point of the solution
-- on the second argument.
end Circ2d2TanOnIter;

View File

@@ -24,18 +24,23 @@
// Courbes. +
//=========================================================================
#include <Geom2dGcc_Circ2d2TanOnIter.ixx>
#include <gp_Dir2d.hxx>
#include <gp_Ax2d.hxx>
#include <gp.hxx>
#include <StdFail_NotDone.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <math_FunctionSetRoot.hxx>
#include <ElCLib.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2d2TanOnIter.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuCuOnCu.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <gp.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <math_FunctionSetRoot.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2d2TanOnIter::
Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 ,

View File

@@ -0,0 +1,230 @@
// Created on: 1991-03-29
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2d2TanOnIter_HeaderFile
#define _Geom2dGcc_Circ2d2TanOnIter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Circ2d.hxx>
#include <GccEnt_Position.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
class StdFail_NotDone;
class GccEnt_QualifiedCirc;
class Geom2dGcc_QCurve;
class gp_Lin2d;
class GccEnt_QualifiedLin;
class gp_Pnt2d;
class gp_Circ2d;
class Geom2dAdaptor_Curve;
//! This class implements the algorithms used to
//! create 2d circles TANgent to 2 entities and
//! having the center ON a curv.
//! The order of the tangency argument is always
//! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
//! the arguments are :
//! - The two tangency arguments.
//! - The center line.
//! - The parameter for each tangency argument which
//! is a curve.
//! - The tolerance.
class Geom2dGcc_Circ2d2TanOnIter
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a curve and
//! having the center ON a 2d line.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d line and a curve and
//! having the center ON a 2d line.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two curves and
//! having the center ON a 2d line.
//! Param1 is the initial guess on the first QualifiedCurv.
//! Param2 is the initial guess on the first QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d point and a curve and
//! having the center ON a 2d line.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a curve and
//! having the center ON a 2d circle.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d line and a curve and
//! having the center ON a 2d circle.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two curves and
//! having the center ON a 2d circle.
//! Param1 is the initial guess on the first QualifiedCurv.
//! Param2 is the initial guess on the first QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d point and a curve and
//! having the center ON a 2d circle.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a curve and
//! having the center ON a 2d curve.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d line and a curve and
//! having the center ON a 2d curve.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d Point and a curve and
//! having the center ON a 2d curve.
//! Param1 is the initial guess on the curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real ParamOn, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two curves and
//! having the center ON a 2d curve.
//! Param1 is the initial guess on the first curve QualifiedCurv.
//! Param1 is the initial guess on the second curve QualifiedCurv.
//! ParamOn is the initial guess on the center curve OnCurv.
//! Tolerance is used for the limit cases.
Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance);
//! This method returns True if the construction
//! algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the solution.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT gp_Circ2d ThisSolution() const;
Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns information about the tangency point between
//! the result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns information about the tangency point between
//! the result and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns information about the center (on the curv) of the
//! result and the third argument.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void CenterOn3 (Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Boolean IsTheSame1() const;
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Boolean IsTheSame2() const;
protected:
private:
Standard_Boolean WellDone;
gp_Circ2d cirsol;
GccEnt_Position qualifier1;
GccEnt_Position qualifier2;
Standard_Boolean TheSame1;
Standard_Boolean TheSame2;
gp_Pnt2d pnttg1sol;
gp_Pnt2d pnttg2sol;
gp_Pnt2d pntcen;
Standard_Real par1sol;
Standard_Real par2sol;
Standard_Real pararg1;
Standard_Real pararg2;
Standard_Real parcen3;
};
#endif // _Geom2dGcc_Circ2d2TanOnIter_HeaderFile

View File

@@ -1,287 +0,0 @@
-- Created on: 1992-10-20
-- 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 Circ2d2TanRad from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to one curve and a
-- point/line/circle/curv and with a given radius.
-- For each construction methods arguments are:
-- - Two Qualified elements for tangency constrains.
-- (for example EnclosedCirc if we want the
-- solution inside the argument EnclosedCirc).
-- - Two Reals. One (Radius) for the radius and the
-- other (Tolerance) for the tolerance.
-- Tolerance is only used for the limit cases.
-- For example :
-- We want to create a circle inside a circle C1 and
-- inside a curve Cu2 with a radius Radius and a
-- tolerance Tolerance.
-- If we did not used Tolerance it is impossible to
-- find a solution in the the following case : Cu2 is
-- inside C1 and there is no intersection point
-- between the two elements.
-- with Tolerance we will give a solution if the
-- lowest distance between C1 and Cu2 is lower than or
-- equal Tolerance.
-- inherits Entity from Standard
uses QualifiedCurve from Geom2dGcc,
Integer from Standard,
Boolean from Standard,
Pnt2d from gp,
Point from Geom2d,
Circ2d from gp,
Array1OfPnt2d from TColgp,
Array1OfCirc2d from TColgp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Circ2d2TanRad from GccAna,
Circ2d2TanRadGeo from Geom2dGcc,
Position from GccEnt,
Array1OfPosition from GccEnt
raises OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail,
NegativeValue from Standard
is
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
Radius : Real from Standard ;
Tolerance : Real from Standard )
returns Circ2d2TanRad from Geom2dGcc
raises BadQualifier, NegativeValue;
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Point : Point from Geom2d ;
Radius : Real from Standard ;
Tolerance : Real from Standard )
returns Circ2d2TanRad from Geom2dGcc
raises BadQualifier, NegativeValue;
Create(Point1 : Point from Geom2d ;
Point2 : Point from Geom2d ;
Radius : Real from Standard ;
Tolerance : Real from Standard )
returns Circ2d2TanRad from Geom2dGcc
raises NegativeValue;
---Purpose: These constructors create one or more 2D circles of radius Radius either
-- - tangential to the 2 curves Qualified1 and Qualified2, or
-- - tangential to the curve Qualified1 and passing through the point Point, or
-- - passing through two points Point1 and Point2.
-- Tolerance is a tolerance criterion used by the algorithm
-- to find a solution when, mathematically, the problem
-- posed does not have a solution, but where there is
-- numeric uncertainty attached to the arguments.
-- For example, take two circles C1 and C2, such that C2
-- is inside C1, and almost tangential to C1. There is, in
-- fact, no point of intersection between C1 and C2. You
-- now want to find a circle of radius R (smaller than the
-- radius of C2), which is tangential to C1 and C2, and
-- inside these two circles: a pure mathematical resolution
-- will not find a solution. This is where the tolerance
-- criterion is used: the algorithm considers that C1 and
-- C2 are tangential if the shortest distance between these
-- two circles is less than or equal to Tolerance. Thus, a
-- solution is found by the algorithm.
-- Exceptions
-- GccEnt_BadQualifier if a qualifier is inconsistent with
-- the argument it qualifies (for example, enclosing for a line).
-- Standard_NegativeValue if Radius is negative.
Results(me : in out ;
Circ : Circ2d2TanRad from GccAna)
is static;
Results(me : in out ;
Circ : Circ2d2TanRadGeo from Geom2dGcc)
is static;
IsDone(me) returns Boolean from Standard
is static;
---Purpose: This method returns True if the algorithm succeeded.
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has reached its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone
is static;
---Purpose: This method returns the number of solutions.
-- NotDone is raised if the algorithm failed.
-- Exceptions
-- StdFail_NotDone if the construction fails.
ThisSolution(me ; Index : Integer from Standard) returns Circ2d from gp
raises OutOfRange, NotDone
is static;
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be carefull: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the context of the algorithm-object.
-- Warning
-- This indexing simply provides a means of consulting the
-- solutions. The index values are not associated with
-- these solutions outside the context of the algorithm object.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: Returns the qualifiers Qualif1 and Qualif2 of the
-- tangency arguments for the solution of index Index
-- computed by this algorithm.
-- The returned qualifiers are:
-- - those specified at the start of construction when the
-- solutions are defined as enclosed, enclosing or
-- outside with respect to the arguments, or
-- - those computed during construction (i.e. enclosed,
-- enclosing or outside) when the solutions are defined
-- as unqualified with respect to the arguments, or
-- - GccEnt_noqualifier if the tangency argument is a point, or
-- - GccEnt_unqualified in certain limit cases where it
-- is impossible to qualify the solution as enclosed, enclosing or outside.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange, NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
-- OutOfRange is raised if Index is greater than the number of solutions.
-- notDone is raised if the construction algorithm did not succeed.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange, NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result number Index and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
-- OutOfRange is raised if Index is greater than the number of solutions.
-- notDone is raised if the construction algorithm did not succeed.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
raises OutOfRange, NotDone
is static;
---Purpose: Returns true if the solution of index Index and,
-- respectively, the first or second argument of this
-- algorithm are the same (i.e. there are 2 identical circles).
-- If Rarg is the radius of the first or second argument,
-- Rsol is the radius of the solution and dist is the
-- distance between the two centers, we consider the two
-- circles to be identical if |Rarg - Rsol| and dist
-- are less than or equal to the tolerance criterion given at
-- the time of construction of this algorithm.
-- OutOfRange is raised if Index is greater than the number of solutions.
-- notDone is raised if the construction algorithm did not succeed.
IsTheSame2(me ;
Index : Integer from Standard ) returns Boolean from Standard
raises OutOfRange, NotDone
is static;
---Purpose: Returns true if the solution of index Index and,
-- respectively, the first or second argument of this
-- algorithm are the same (i.e. there are 2 identical circles).
-- If Rarg is the radius of the first or second argument,
-- Rsol is the radius of the solution and dist is the
-- distance between the two centers, we consider the two
-- circles to be identical if |Rarg - Rsol| and dist
-- are less than or equal to the tolerance criterion given at
-- the time of construction of this algorithm.
-- OutOfRange is raised if Index is greater than the number of solutions.
-- notDone is raised if the construction algorithm did not succeed.
fields
WellDone : Boolean from Standard;
---Purpose: Returns True if the algorithm succeeded.
cirsol : Array1OfCirc2d from TColgp;
---Purpose: TheSolution.
NbrSol : Integer from Standard;
---Purpose: Returns the number of solutions.
qualifier1 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the second argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: Returns 1 if the solution and the first argument are the same (2 circles).
-- if R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R1+dist-Rsol is less than Tolerance.
-- 0 in the other cases.
TheSame2 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the second argument are the same (2 circles).
-- if R2 is the radius of the second argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R2+dist-Rsol is less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first argument on the solution.
pnttg2sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the second argument on the solution.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the first argument on the solution.
par2sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the second argument on the solution.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the first argument on the first argument.
pararg2 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the second argument on the second argument.
Invert : Boolean from Standard;
-- CircAna : Circ2d2TanRad from GccAna;
-- CircGeo : MyrCirc2d2TanRad from Geom2dGcc;
-- TypeAna : Boolean;
end Circ2d2TanRad;

View File

@@ -14,21 +14,25 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2d2TanRad.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GccAna_Circ2d2TanRad.hxx>
#include <Geom2dGcc_Circ2d2TanRadGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2d2TanRad.hxx>
#include <Geom2dGcc_Circ2d2TanRadGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
static const Standard_Integer aNbSolMAX = 16;

View File

@@ -0,0 +1,229 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Circ2d2TanRad_HeaderFile
#define _Geom2dGcc_Circ2d2TanRad_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <Standard_Integer.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Standard_NegativeValue;
class Geom2dGcc_QualifiedCurve;
class Geom2d_Point;
class GccAna_Circ2d2TanRad;
class Geom2dGcc_Circ2d2TanRadGeo;
class gp_Circ2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to one curve and a
//! point/line/circle/curv and with a given radius.
//! For each construction methods arguments are:
//! - Two Qualified elements for tangency constrains.
//! (for example EnclosedCirc if we want the
//! solution inside the argument EnclosedCirc).
//! - Two Reals. One (Radius) for the radius and the
//! other (Tolerance) for the tolerance.
//! Tolerance is only used for the limit cases.
//! For example :
//! We want to create a circle inside a circle C1 and
//! inside a curve Cu2 with a radius Radius and a
//! tolerance Tolerance.
//! If we did not used Tolerance it is impossible to
//! find a solution in the the following case : Cu2 is
//! inside C1 and there is no intersection point
//! between the two elements.
//! with Tolerance we will give a solution if the
//! lowest distance between C1 and Cu2 is lower than or
//! equal Tolerance.
class Geom2dGcc_Circ2d2TanRad
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_Circ2d2TanRad(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
Standard_EXPORT Geom2dGcc_Circ2d2TanRad(const Geom2dGcc_QualifiedCurve& Qualified1, const Handle(Geom2d_Point)& Point, const Standard_Real Radius, const Standard_Real Tolerance);
//! These constructors create one or more 2D circles of radius Radius either
//! - tangential to the 2 curves Qualified1 and Qualified2, or
//! - tangential to the curve Qualified1 and passing through the point Point, or
//! - passing through two points Point1 and Point2.
//! Tolerance is a tolerance criterion used by the algorithm
//! to find a solution when, mathematically, the problem
//! posed does not have a solution, but where there is
//! numeric uncertainty attached to the arguments.
//! For example, take two circles C1 and C2, such that C2
//! is inside C1, and almost tangential to C1. There is, in
//! fact, no point of intersection between C1 and C2. You
//! now want to find a circle of radius R (smaller than the
//! radius of C2), which is tangential to C1 and C2, and
//! inside these two circles: a pure mathematical resolution
//! will not find a solution. This is where the tolerance
//! criterion is used: the algorithm considers that C1 and
//! C2 are tangential if the shortest distance between these
//! two circles is less than or equal to Tolerance. Thus, a
//! solution is found by the algorithm.
//! Exceptions
//! GccEnt_BadQualifier if a qualifier is inconsistent with
//! the argument it qualifies (for example, enclosing for a line).
//! Standard_NegativeValue if Radius is negative.
Standard_EXPORT Geom2dGcc_Circ2d2TanRad(const Handle(Geom2d_Point)& Point1, const Handle(Geom2d_Point)& Point2, const Standard_Real Radius, const Standard_Real Tolerance);
Standard_EXPORT void Results (const GccAna_Circ2d2TanRad& Circ);
Standard_EXPORT void Results (const Geom2dGcc_Circ2d2TanRadGeo& Circ);
//! This method returns True if the algorithm succeeded.
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has reached its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! NotDone is raised if the algorithm failed.
//! Exceptions
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be carefull: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the context of the algorithm-object.
//! Warning
//! This indexing simply provides a means of consulting the
//! solutions. The index values are not associated with
//! these solutions outside the context of the algorithm object.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! Returns the qualifiers Qualif1 and Qualif2 of the
//! tangency arguments for the solution of index Index
//! computed by this algorithm.
//! The returned qualifiers are:
//! - those specified at the start of construction when the
//! solutions are defined as enclosed, enclosing or
//! outside with respect to the arguments, or
//! - those computed during construction (i.e. enclosed,
//! enclosing or outside) when the solutions are defined
//! as unqualified with respect to the arguments, or
//! - GccEnt_noqualifier if the tangency argument is a point, or
//! - GccEnt_unqualified in certain limit cases where it
//! is impossible to qualify the solution as enclosed, enclosing or outside.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
//! OutOfRange is raised if Index is greater than the number of solutions.
//! notDone is raised if the construction algorithm did not succeed.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result number Index and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
//! OutOfRange is raised if Index is greater than the number of solutions.
//! notDone is raised if the construction algorithm did not succeed.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns true if the solution of index Index and,
//! respectively, the first or second argument of this
//! algorithm are the same (i.e. there are 2 identical circles).
//! If Rarg is the radius of the first or second argument,
//! Rsol is the radius of the solution and dist is the
//! distance between the two centers, we consider the two
//! circles to be identical if |Rarg - Rsol| and dist
//! are less than or equal to the tolerance criterion given at
//! the time of construction of this algorithm.
//! OutOfRange is raised if Index is greater than the number of solutions.
//! notDone is raised if the construction algorithm did not succeed.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
//! Returns true if the solution of index Index and,
//! respectively, the first or second argument of this
//! algorithm are the same (i.e. there are 2 identical circles).
//! If Rarg is the radius of the first or second argument,
//! Rsol is the radius of the solution and dist is the
//! distance between the two centers, we consider the two
//! circles to be identical if |Rarg - Rsol| and dist
//! are less than or equal to the tolerance criterion given at
//! the time of construction of this algorithm.
//! OutOfRange is raised if Index is greater than the number of solutions.
//! notDone is raised if the construction algorithm did not succeed.
Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
TColgp_Array1OfCirc2d cirsol;
Standard_Integer NbrSol;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
TColStd_Array1OfInteger TheSame1;
TColStd_Array1OfInteger TheSame2;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
Standard_Boolean Invert;
};
#endif // _Geom2dGcc_Circ2d2TanRad_HeaderFile

View File

@@ -1,261 +0,0 @@
-- Created on: 1991-03-29
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2d2TanRadGeo from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to one curve and a
-- point/line/circle/curv and with a given radius.
-- For each construction methods arguments are:
-- - Two Qualified elements for tangency constrains.
-- (for example EnclosedCirc if we want the
-- solution inside the argument EnclosedCirc).
-- - Two Reals. One (Radius) for the radius and the
-- other (Tolerance) for the tolerance.
-- Tolerance is only used for the limit cases.
-- For example :
-- We want to create a circle inside a circle C1 and
-- inside a curve Cu2 with a radius Radius and a
-- tolerance Tolerance.
-- If we did not used Tolerance it is impossible to
-- find a solution in the following case : Cu2 is
-- inside C1 and there is no intersection point
-- between the two elements.
-- With Tolerance we will get a solution if the
-- lowest distance between C1 and Cu2 is lower than or
-- equal Tolerance.
-- inherits Entity from Standard
uses Pnt2d from gp,
Circ2d from gp,
Array1OfCirc2d from TColgp,
Array1OfPnt2d from TColgp,
QualifiedCirc from GccEnt,
QualifiedLin from GccEnt,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Position from GccEnt,
Array1OfPosition from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc,
OffsetCurve from Adaptor3d,
HCurve from Geom2dAdaptor,
CurveToolGeo from Geom2dGcc,
TheIntConicCurveOfGInter from Geom2dInt,
GInter from Geom2dInt
raises OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail,
NegativeValue from Standard
is
Create(Qualified1 : QualifiedCirc from GccEnt;
Qualified2 : QCurve from Geom2dGcc;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2d2TanRadGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d circle and a curve
-- with a radius of Radius.
raises NegativeValue, BadQualifier;
---Purpose: It raises NegativeValue if Radius is lower than zero.
Create(Qualified1 : QualifiedLin from GccEnt;
Qualified2 : QCurve from Geom2dGcc;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2d2TanRadGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a 2d line and a curve
-- with a radius of Radius.
raises NegativeValue, BadQualifier;
---Purpose: It raises NegativeValue if Radius is lower than zero.
Create(Qualified1 : QCurve from Geom2dGcc;
Qualified2 : QCurve from Geom2dGcc;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2d2TanRadGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to two curves with
-- a radius of Radius.
raises NegativeValue, BadQualifier;
---Purpose: It raises NegativeValue if Radius is lower than zero.
Create(Qualified1 : QCurve from Geom2dGcc;
Point2 : Pnt2d from gp ;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2d2TanRadGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles TANgent to a curve and a point
-- with a radius of Radius.
raises NegativeValue, BadQualifier;
---Purpose: It raises NegativeValue if Radius is lower than zero.
-- -- ....................................................................
IsDone(me) returns Boolean from Standard
is static;
---Purpose: This method returns True if the algorithm succeeded.
NbSolutions(me) returns Integer from Standard
---Purpose: This method returns the number of solutions.
raises NotDone
is static;
---Purpose: It raises NotDone if the algorithm failed.
ThisSolution(me ;
Index : Integer from Standard) returns Circ2d from gp
---Purpose: Returns the solution number Index.
-- Be careful: the Index is only a way to get all the
-- solutions, but is not associated to those outside the context
-- of the algorithm-object.
raises OutOfRange, NotDone
is static;
---Purpose: It raises OutOfRange exception if Index is greater
-- than the number of solutions.
-- It raises NotDone if the construction algorithm did not
-- succeed.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: It returns the information about the qualifiers of
-- the tangency arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns information about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution.
-- ParArg is the intrinsic parameter of the point PntSol on the first
-- argument.
raises OutOfRange, NotDone
is static;
---Purpose: It raises OutOfRange if Index is greater than the number
-- of solutions.
-- It raises NotDone if the construction algorithm did not
-- succeed.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns information about the tangency point between the
-- result number Index and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol on
-- the solution.
-- ParArg is the intrinsic parameter of the point PntArg on
-- the second argument.
raises OutOfRange, NotDone
is static;
---Purpose: It raises OutOfRange if Index is greater than the number
-- of solutions.
-- It raises NotDone if the construction algorithm did not
-- succeed.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
---Purpose: Returns True if the solution number Index is equal to
-- the first argument.
raises OutOfRange, NotDone
is static;
---Purpose: It raises OutOfRange if Index is greater than the number
-- of solutions.
-- It raises NotDone if the construction algorithm did not
-- succeed.
IsTheSame2(me ;
Index : Integer from Standard) returns Boolean from Standard
---Purpose: Returns True if the solution number Index is equal to
-- the second argument.
raises OutOfRange, NotDone
is static;
---Purpose: It raises OutOfRange if Index is greater than the number
-- of solutions.
-- It raises NotDone if the construction algorithm did not
-- succeed.
fields
WellDone : Boolean from Standard;
---Purpose: True if the algorithm succeeded.
NbrSol : Integer from Standard;
---Purpose: The number of possible solutions. We have to decide about
-- the status of the multiple solutions...
cirsol : Array1OfCirc2d from TColgp;
-- The solutions.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt;
-- The qualifiers of the second argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the first argument are the same
-- (2 circles).
-- If R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we consider the two circles are identical if R1+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
TheSame2 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the second argument are the same
-- (2 circles).
-- If R2 is the radius of the second argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we consider the two circles are identical if R2+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first
-- argument on the solution.
pnttg2sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the second
-- argument on the solution.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the solution.
par2sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the solution.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the first argument.
pararg2 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the second argument.
end Circ2d2TanRadGeo;

View File

@@ -12,25 +12,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2d2TanRadGeo.ixx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <ElCLib.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dGcc_Circ2d2TanRadGeo.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <Geom2dInt_GInter.hxx>
static const Standard_Integer aNbSolMAX = 16;

View File

@@ -0,0 +1,195 @@
// Created on: 1991-03-29
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile
#define _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Standard_NegativeValue;
class GccEnt_QualifiedCirc;
class Geom2dGcc_QCurve;
class GccEnt_QualifiedLin;
class gp_Pnt2d;
class gp_Circ2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to one curve and a
//! point/line/circle/curv and with a given radius.
//! For each construction methods arguments are:
//! - Two Qualified elements for tangency constrains.
//! (for example EnclosedCirc if we want the
//! solution inside the argument EnclosedCirc).
//! - Two Reals. One (Radius) for the radius and the
//! other (Tolerance) for the tolerance.
//! Tolerance is only used for the limit cases.
//! For example :
//! We want to create a circle inside a circle C1 and
//! inside a curve Cu2 with a radius Radius and a
//! tolerance Tolerance.
//! If we did not used Tolerance it is impossible to
//! find a solution in the following case : Cu2 is
//! inside C1 and there is no intersection point
//! between the two elements.
//! With Tolerance we will get a solution if the
//! lowest distance between C1 and Cu2 is lower than or
//! equal Tolerance.
class Geom2dGcc_Circ2d2TanRadGeo
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d circle and a curve
//! with a radius of Radius.
//! It raises NegativeValue if Radius is lower than zero.
Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a 2d line and a curve
//! with a radius of Radius.
//! It raises NegativeValue if Radius is lower than zero.
Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to two curves with
//! a radius of Radius.
//! It raises NegativeValue if Radius is lower than zero.
Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles TANgent to a curve and a point
//! with a radius of Radius.
//! It raises NegativeValue if Radius is lower than zero.
Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Standard_Real Radius, const Standard_Real Tolerance);
//! This method returns True if the algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! It raises NotDone if the algorithm failed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index.
//! Be careful: the Index is only a way to get all the
//! solutions, but is not associated to those outside the context
//! of the algorithm-object.
//! It raises OutOfRange exception if Index is greater
//! than the number of solutions.
//! It raises NotDone if the construction algorithm did not
//! succeed.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! It returns the information about the qualifiers of
//! the tangency arguments concerning the solution number Index.
//! It returns the real qualifiers (the qualifiers given to the
//! constructor method in case of enclosed, enclosing and outside
//! and the qualifiers computedin case of unqualified).
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns information about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution.
//! ParArg is the intrinsic parameter of the point PntSol on the first
//! argument.
//! It raises OutOfRange if Index is greater than the number
//! of solutions.
//! It raises NotDone if the construction algorithm did not
//! succeed.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns information about the tangency point between the
//! result number Index and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol on
//! the solution.
//! ParArg is the intrinsic parameter of the point PntArg on
//! the second argument.
//! It raises OutOfRange if Index is greater than the number
//! of solutions.
//! It raises NotDone if the construction algorithm did not
//! succeed.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns True if the solution number Index is equal to
//! the first argument.
//! It raises OutOfRange if Index is greater than the number
//! of solutions.
//! It raises NotDone if the construction algorithm did not
//! succeed.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
//! Returns True if the solution number Index is equal to
//! the second argument.
//! It raises OutOfRange if Index is greater than the number
//! of solutions.
//! It raises NotDone if the construction algorithm did not
//! succeed.
Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
TColStd_Array1OfInteger TheSame1;
TColStd_Array1OfInteger TheSame2;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
};
#endif // _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile

View File

@@ -1,319 +0,0 @@
-- Created on: 1992-10-20
-- 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 Circ2d3Tan from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to 3 points/lines/circles/
-- curves with one curve or more.
-- The arguments of all construction methods are :
-- - The three qualifiied elements for the
-- tangency constrains (QualifiedCirc, QualifiedLine,
-- Qualifiedcurv, Points).
-- - A parameter for each QualifiedCurv.
-- Describes functions for building a 2D circle:
-- - tangential to 3 curves, or
-- - tangential to 2 curves and passing through a point, or
-- - tangential to a curve and passing through 2 points, or
-- - passing through 3 points.
-- A Circ2d3Tan object provides a framework for:
-- - defining the construction of 2D circles(s),
-- - implementing the construction algorithm, and
-- - consulting the result(s).
-- inherits Entity from Standard
uses QualifiedCurve from Geom2dGcc,
Integer from Standard,
Circ2d from gp,
Pnt2d from gp,
Array1OfPnt2d from TColgp,
Array1OfCirc2d from TColgp,
Boolean from Standard,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Circ2d3Tan from GccAna,
Point from Geom2d,
Circ2d3TanIter from Geom2dGcc,
Position from GccEnt,
Array1OfPosition from GccEnt
raises NotDone from StdFail,
OutOfRange from Standard
is
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
Qualified3 : QualifiedCurve from Geom2dGcc ;
Tolerance : Real from Standard ;
Param1 : Real from Standard ;
Param2 : Real from Standard ;
Param3 : Real from Standard )
returns Circ2d3Tan from Geom2dGcc;
---Purpose: Constructs one or more 2D circles
-- tangential to three curves Qualified1, Qualified2 and
-- Qualified3, where Param1, Param2 and Param3 are
-- used, respectively, as the initial values of the
-- parameters on Qualified1, Qualified2 and Qualified3
-- of the tangency point between these arguments and
-- the solution sought, if the algorithm chooses an
-- iterative method to find the solution (i.e. if either
-- Qualified1, Qualified2 or Qualified3 is more complex
-- than a line or a circle).
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
Point : Point from Geom2d ;
Tolerance : Real from Standard ;
Param1 : Real from Standard ;
Param2 : Real from Standard )
returns Circ2d3Tan from Geom2dGcc;
---Purpose: Constructs one or more 2D circles
-- tangential to two curves Qualified1 and Qualified2
-- and passing through the point Point, where Param1
-- and Param2 are used, respectively, as the initial
-- values of the parameters on Qualified1 and
-- Qualified2 of the tangency point between this
-- argument and the solution sought, if the algorithm
-- chooses an iterative method to find the solution (i.e. if
-- either Qualified1 or Qualified2 is more complex than
-- a line or a circle).
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
Point1 : Point from Geom2d ;
Point2 : Point from Geom2d ;
Tolerance : Real from Standard ;
Param1 : Real from Standard )
returns Circ2d3Tan from Geom2dGcc;
---Purpose: Constructs one or more 2D circles tangential to the curve Qualified1 and passing
-- through two points Point1 and Point2, where Param1
-- is used as the initial value of the parameter on
-- Qualified1 of the tangency point between this
-- argument and the solution sought, if the algorithm
-- chooses an iterative method to find the solution (i.e. if
-- Qualified1 is more complex than a line or a circle)
Create(Point1 : Point from Geom2d ;
Point2 : Point from Geom2d ;
Point3 : Point from Geom2d ;
Tolerance : Real from Standard )
returns Circ2d3Tan from Geom2dGcc;
---Purpose: Constructs one or more 2D circles passing through three points Point1, Point2 and Point3.
-- Tolerance is a tolerance criterion used by the algorithm
-- to find a solution when, mathematically, the problem
-- posed does not have a solution, but where there is
-- numeric uncertainty attached to the arguments.
-- For example, take:
-- - two circles C1 and C2, such that C2 is inside C1,
-- and almost tangential to C1; there is in fact no point
-- of intersection between C1 and C2; and
-- - a circle C3 outside C1.
-- You now want to find a circle which is tangential to C1,
-- C2 and C3: a pure mathematical resolution will not find
-- a solution. This is where the tolerance criterion is used:
-- the algorithm considers that C1 and C2 are tangential if
-- the shortest distance between these two circles is less
-- than or equal to Tolerance. Thus, the algorithm finds a solution.
-- Warning
-- An iterative algorithm is used if Qualified1, Qualified2 or
-- Qualified3 is more complex than a line or a circle. In
-- such cases, the algorithm constructs only one solution.
-- Exceptions
-- GccEnt_BadQualifier if a qualifier is inconsistent with
-- the argument it qualifies (for example, enclosing for a line).
Results(me : in out ;
Circ : Circ2d3Tan from GccAna ;
Rank1 : Integer from Standard;
Rank2 : Integer from Standard;
Rank3 : Integer from Standard)
is static;
IsDone(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the construction algorithm does not fail (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has reached its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone
is static;
---Purpose: This method returns the number of solutions.
-- NotDone is raised if the algorithm failed.
ThisSolution(me ; Index : Integer from Standard) returns Circ2d from gp
raises OutOfRange, NotDone
is static;
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be carefull: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the context
-- of the algorithm-object.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt ;
Qualif3 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Tangency3(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the third argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
raises NotDone
is static;
---Purpose: Returns True if the solution is equal to the first argument.
IsTheSame2(me ;
Index : Integer from Standard) returns Boolean from Standard
raises NotDone
is static;
---Purpose: Returns True if the solution is equal to the second argument.
IsTheSame3(me ;
Index : Integer from Standard) returns Boolean from Standard
raises NotDone
is static;
---Purpose: Returns True if the solution is equal to the third argument.
-- If Rarg is the radius of the first, second or third
-- argument, Rsol is the radius of the solution and dist
-- is the distance between the two centers, we consider
-- the two circles to be identical if |Rarg - Rsol| and
-- dist are less than or equal to the tolerance criterion
-- given at the time of construction of this algorithm.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
fields
cirsol : Array1OfCirc2d from TColgp;
---Purpose: The solution.
NbrSol : Real from Standard;
---Purpose: number of solutions.
WellDone : Boolean from Standard;
---Purpose: True if the algorithm succeeded.
qualifier1 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt ;
---Purpose: The qualifiers of the second argument.
qualifier3 : Array1OfPosition from GccEnt;
---Purpose: The qualifiers of the third argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the first argument are the same (2 circles).
-- if R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R1+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
TheSame2 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the second argument are the same (2 circles).
-- if R2 is the radius of the second argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R2+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
TheSame3 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the third argument are the same (2 circles).
-- if R3 is the radius of the third argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R3+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first argument.
pnttg2sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the second argument.
pnttg3sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the third argument.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the
-- first argument on the solution.
par2sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the
-- second argument on the solution.
par3sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the
-- third argument on the solution.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pararg2 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the second
-- argument on the second argument.
pararg3 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution and the third
-- argument on the second argument.
end Circ2d3Tan;

View File

@@ -14,14 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2d3Tan.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_Circ2d3TanIter.hxx>
#include <GccAna_Circ2d3Tan.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2d3Tan.hxx>
#include <Geom2dGcc_Circ2d3TanIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2d3Tan::

View File

@@ -0,0 +1,227 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Circ2d3Tan_HeaderFile
#define _Geom2dGcc_Circ2d3Tan_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Integer.hxx>
#include <GccEnt_Position.hxx>
class StdFail_NotDone;
class Standard_OutOfRange;
class Geom2dGcc_QualifiedCurve;
class Geom2d_Point;
class GccAna_Circ2d3Tan;
class gp_Circ2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to 3 points/lines/circles/
//! curves with one curve or more.
//! The arguments of all construction methods are :
//! - The three qualifiied elements for the
//! tangency constrains (QualifiedCirc, QualifiedLine,
//! Qualifiedcurv, Points).
//! - A parameter for each QualifiedCurv.
//! Describes functions for building a 2D circle:
//! - tangential to 3 curves, or
//! - tangential to 2 curves and passing through a point, or
//! - tangential to a curve and passing through 2 points, or
//! - passing through 3 points.
//! A Circ2d3Tan object provides a framework for:
//! - defining the construction of 2D circles(s),
//! - implementing the construction algorithm, and
//! - consulting the result(s).
class Geom2dGcc_Circ2d3Tan
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs one or more 2D circles
//! tangential to three curves Qualified1, Qualified2 and
//! Qualified3, where Param1, Param2 and Param3 are
//! used, respectively, as the initial values of the
//! parameters on Qualified1, Qualified2 and Qualified3
//! of the tangency point between these arguments and
//! the solution sought, if the algorithm chooses an
//! iterative method to find the solution (i.e. if either
//! Qualified1, Qualified2 or Qualified3 is more complex
//! than a line or a circle).
Standard_EXPORT Geom2dGcc_Circ2d3Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Geom2dGcc_QualifiedCurve& Qualified3, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3);
//! Constructs one or more 2D circles
//! tangential to two curves Qualified1 and Qualified2
//! and passing through the point Point, where Param1
//! and Param2 are used, respectively, as the initial
//! values of the parameters on Qualified1 and
//! Qualified2 of the tangency point between this
//! argument and the solution sought, if the algorithm
//! chooses an iterative method to find the solution (i.e. if
//! either Qualified1 or Qualified2 is more complex than
//! a line or a circle).
Standard_EXPORT Geom2dGcc_Circ2d3Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Handle(Geom2d_Point)& Point, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real Param2);
//! Constructs one or more 2D circles tangential to the curve Qualified1 and passing
//! through two points Point1 and Point2, where Param1
//! is used as the initial value of the parameter on
//! Qualified1 of the tangency point between this
//! argument and the solution sought, if the algorithm
//! chooses an iterative method to find the solution (i.e. if
//! Qualified1 is more complex than a line or a circle)
Standard_EXPORT Geom2dGcc_Circ2d3Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const Handle(Geom2d_Point)& Point1, const Handle(Geom2d_Point)& Point2, const Standard_Real Tolerance, const Standard_Real Param1);
//! Constructs one or more 2D circles passing through three points Point1, Point2 and Point3.
//! Tolerance is a tolerance criterion used by the algorithm
//! to find a solution when, mathematically, the problem
//! posed does not have a solution, but where there is
//! numeric uncertainty attached to the arguments.
//! For example, take:
//! - two circles C1 and C2, such that C2 is inside C1,
//! and almost tangential to C1; there is in fact no point
//! of intersection between C1 and C2; and
//! - a circle C3 outside C1.
//! You now want to find a circle which is tangential to C1,
//! C2 and C3: a pure mathematical resolution will not find
//! a solution. This is where the tolerance criterion is used:
//! the algorithm considers that C1 and C2 are tangential if
//! the shortest distance between these two circles is less
//! than or equal to Tolerance. Thus, the algorithm finds a solution.
//! Warning
//! An iterative algorithm is used if Qualified1, Qualified2 or
//! Qualified3 is more complex than a line or a circle. In
//! such cases, the algorithm constructs only one solution.
//! Exceptions
//! GccEnt_BadQualifier if a qualifier is inconsistent with
//! the argument it qualifies (for example, enclosing for a line).
Standard_EXPORT Geom2dGcc_Circ2d3Tan(const Handle(Geom2d_Point)& Point1, const Handle(Geom2d_Point)& Point2, const Handle(Geom2d_Point)& Point3, const Standard_Real Tolerance);
Standard_EXPORT void Results (const GccAna_Circ2d3Tan& Circ, const Standard_Integer Rank1, const Standard_Integer Rank2, const Standard_Integer Rank3);
//! Returns true if the construction algorithm does not fail (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has reached its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! NotDone is raised if the algorithm failed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be carefull: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the context
//! of the algorithm-object.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! It returns the informations about the qualifiers of the tangency
//! arguments concerning the solution number Index.
//! It returns the real qualifiers (the qualifiers given to the
//! constructor method in case of enclosed, enclosing and outside
//! and the qualifiers computedin case of unqualified).
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2, GccEnt_Position& Qualif3) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result and the third argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
Standard_EXPORT void Tangency3 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns True if the solution is equal to the first argument.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
//! Returns True if the solution is equal to the second argument.
Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
//! Returns True if the solution is equal to the third argument.
//! If Rarg is the radius of the first, second or third
//! argument, Rsol is the radius of the solution and dist
//! is the distance between the two centers, we consider
//! the two circles to be identical if |Rarg - Rsol| and
//! dist are less than or equal to the tolerance criterion
//! given at the time of construction of this algorithm.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Boolean IsTheSame3 (const Standard_Integer Index) const;
protected:
private:
TColgp_Array1OfCirc2d cirsol;
Standard_Real NbrSol;
Standard_Boolean WellDone;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
GccEnt_Array1OfPosition qualifier3;
TColStd_Array1OfInteger TheSame1;
TColStd_Array1OfInteger TheSame2;
TColStd_Array1OfInteger TheSame3;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColgp_Array1OfPnt2d pnttg3sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal par3sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
TColStd_Array1OfReal pararg3;
};
#endif // _Geom2dGcc_Circ2d3Tan_HeaderFile

View File

@@ -1,315 +0,0 @@
-- Created on: 1991-03-29
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2d3TanIter from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to 3 points/lines/circles/
-- curves with one curve or more.
-- The arguments of all construction methods are :
-- - The three qualifiied elements for the
-- tangency constrains (QualifiedCirc, QualifiedLine,
-- Qualifiedcurv, Points).
-- - A parameter for each QualifiedCurv.
-- inherits Entity from Standard
uses Pnt2d from gp,
Lin2d from gp,
Circ2d from gp,
QualifiedCirc from GccEnt,
QualifiedLin from GccEnt,
Position from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc
raises NotDone from StdFail
is
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QualifiedCirc from GccEnt ;
Qualified3 : QCurve from Geom2dGcc;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to 2 circles and a curve.
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QCurve from Geom2dGcc;
Qualified3 : QCurve from Geom2dGcc;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a circle and 2 curves.
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QualifiedLin from GccEnt ;
Qualified3 : QCurve from Geom2dGcc;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a circle and a line and
-- a curve.
Create(Qualified1 : QualifiedCirc from GccEnt ;
Qualified2 : QCurve from Geom2dGcc;
Point3 : Pnt2d ;
Param1 : Real ;
Param2 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a circle and a point and
-- a curve.
Create(Qualified1 : QualifiedLin from GccEnt ;
Qualified2 : QualifiedLin from GccEnt ;
Qualified3 : QCurve from Geom2dGcc;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to 2 lines and a curve.
Create(Qualified1 : QualifiedLin from GccEnt ;
Qualified2 : QCurve from Geom2dGcc;
Qualified3 : QCurve from Geom2dGcc;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a line and 2 curves.
Create(Qualified1 : QualifiedLin from GccEnt ;
Qualified2 : QCurve from Geom2dGcc;
Point3 : Pnt2d ;
Param1 : Real ;
Param2 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a line and a curve
-- and a point.
Create(Qualified1 : QCurve from Geom2dGcc;
Point1 : Pnt2d ;
Point2 : Pnt2d ;
Param1 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a curve and 2 points.
Create(Qualified1 : QCurve from Geom2dGcc ;
Qualified2 : QCurve from Geom2dGcc ;
Point2 : Pnt2d ;
Param1 : Real ;
Param2 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to 2 curves and a point.
Create(Qualified1 : QCurve from Geom2dGcc ;
Qualified2 : QCurve from Geom2dGcc ;
Qualified3 : QCurve from Geom2dGcc ;
Param1 : Real ;
Param2 : Real ;
Param3 : Real ;
Tolerance : Real )
returns Circ2d3TanIter from Geom2dGcc;
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to 3 curves.
-- -- ....................................................................
IsDone(me) returns Boolean
is static;
---Purpose: This method returns True if the construction
-- algorithm succeeded.
ThisSolution(me) returns Circ2d
---Purpose: Returns the solution.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
WhichQualifier(me ;
Qualif1 : out Position from GccEnt;
Qualif2 : out Position from GccEnt;
Qualif3 : out Position from GccEnt)
raises NotDone from StdFail
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns informations about the tangency point between
-- the result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol
-- on the argument curv.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
Tangency2(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns informations about the tangency point between
-- the result and the second argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol
-- on the argument curv.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
Tangency3(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
---Purpose: Returns informations about the tangency point between
-- the result and the third argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol
-- on the argument curv.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
IsTheSame1(me) returns Boolean
-- Returns True if the solution is equal to the first argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
IsTheSame2(me) returns Boolean
-- Returns True if the solution is equal to the second argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
IsTheSame3(me) returns Boolean
-- Returns True if the solution is equal to the third argument.
raises NotDone from StdFail
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
fields
WellDone : Boolean;
---Purpose: True if the algorithm succeeded.
cirsol : Circ2d;
---Purpose: The solutions.
qualifier1 : Position from GccEnt;
-- The qualifiers of the first argument.
qualifier2 : Position from GccEnt;
-- The qualifiers of the first argument.
qualifier3 : Position from GccEnt;
-- The qualifiers of the first argument.
TheSame1 : Boolean;
---Purpose: True if the solution and the first argument are identical.
-- Two circles are identical if the difference between the
-- radius of one and the sum of the radius of the other and
-- the distance between the centers is less than Tolerance.
-- False in the other cases.
TheSame2 : Boolean;
---Purpose: True if the solution and the second argument are identical.
-- Two circles are identical if the difference between the
-- radius of one and the sum of the radius of the other and
-- the distance between the centers is less than Tolerance.
-- False in the other cases.
TheSame3 : Boolean;
---Purpose: True if the solution and the third argument are identical.
-- Two circles are identical if the difference between the
-- radius of one and the sum of the radius of the other and
-- the distance between the centers is less than Tolerance.
-- False in the other cases.
pnttg1sol : Pnt2d;
---Purpose: The tangency point between the solution and the first
-- argument on the solution.
pnttg2sol : Pnt2d;
---Purpose: The tangency point between the solution and the second
-- argument on the solution.
pnttg3sol : Pnt2d;
---Purpose: The tangency point between the solution and the third
-- argument on the solution.
par1sol : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the solution.
par2sol : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the solution.
par3sol : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the third argument on the solution.
pararg1 : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the first argument.
pararg2 : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the second argument on the second argument.
pararg3 : Real;
---Purpose: The parameter of the tangency point between the solution
-- and the third argument on the second argument.
end Circ2d3TanIter;

View File

@@ -24,20 +24,23 @@
// Courbes. +
//=========================================================================
#include <Geom2dGcc_Circ2d3TanIter.ixx>
#include <gp_Dir2d.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp.hxx>
#include <StdFail_NotDone.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_NewtonFunctionSetRoot.hxx>
#include <GccAna_Circ2d3Tan.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dGcc_Circ2d3TanIter.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuCuCu.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <gp.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_NewtonFunctionSetRoot.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2d3TanIter::
Geom2dGcc_Circ2d3TanIter (const Geom2dGcc_QCurve& Qualified1 ,

View File

@@ -0,0 +1,188 @@
// Created on: 1991-03-29
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2d3TanIter_HeaderFile
#define _Geom2dGcc_Circ2d3TanIter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Circ2d.hxx>
#include <GccEnt_Position.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
class StdFail_NotDone;
class GccEnt_QualifiedCirc;
class Geom2dGcc_QCurve;
class GccEnt_QualifiedLin;
class gp_Pnt2d;
class gp_Circ2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to 3 points/lines/circles/
//! curves with one curve or more.
//! The arguments of all construction methods are :
//! - The three qualifiied elements for the
//! tangency constrains (QualifiedCirc, QualifiedLine,
//! Qualifiedcurv, Points).
//! - A parameter for each QualifiedCurv.
class Geom2dGcc_Circ2d3TanIter
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles tangent to 2 circles and a curve.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a circle and 2 curves.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a circle and a line and
//! a curve.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a circle and a point and
//! a curve.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to 2 lines and a curve.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a line and 2 curves.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a line and a curve
//! and a point.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to a curve and 2 points.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to 2 curves and a point.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
//! This method implements the algorithms used to
//! create 2d circles tangent to 3 curves.
Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
//! This method returns True if the construction
//! algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the solution.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT gp_Circ2d ThisSolution() const;
Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2, GccEnt_Position& Qualif3) const;
//! Returns informations about the tangency point between
//! the result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between
//! the result and the second argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between
//! the result and the third argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT void Tangency3 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Boolean IsTheSame1() const;
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Boolean IsTheSame2() const;
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Boolean IsTheSame3() const;
protected:
private:
Standard_Boolean WellDone;
gp_Circ2d cirsol;
GccEnt_Position qualifier1;
GccEnt_Position qualifier2;
GccEnt_Position qualifier3;
Standard_Boolean TheSame1;
Standard_Boolean TheSame2;
Standard_Boolean TheSame3;
gp_Pnt2d pnttg1sol;
gp_Pnt2d pnttg2sol;
gp_Pnt2d pnttg3sol;
Standard_Real par1sol;
Standard_Real par2sol;
Standard_Real par3sol;
Standard_Real pararg1;
Standard_Real pararg2;
Standard_Real pararg3;
};
#endif // _Geom2dGcc_Circ2d3TanIter_HeaderFile

View File

@@ -1,198 +0,0 @@
-- Created on: 1992-10-20
-- 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 Circ2dTanCen from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to a curve and
-- centered on a point.
-- The arguments of all construction methods are :
-- - The qualified element for the tangency constrains
-- (QualifiedCurv).
-- -The center point Pcenter.
-- - A real Tolerance.
-- Tolerance is only used in the limits cases.
-- For example :
-- We want to create a circle tangent to an EnclosedCurv C1
-- with a tolerance Tolerance.
-- If we did not used Tolerance it is impossible to
-- find a solution in the the following case : Pcenter is
-- outside C1.
-- With Tolerance we will give a solution if the distance
-- between C1 and Pcenter is lower than or equal Tolerance/2.
-- inherits Entity from Standard
uses QualifiedCurve from Geom2dGcc,
Pnt2d from gp,
Point from Geom2d,
Circ2d from gp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Array1OfPnt2d from TColgp,
Array1OfCirc2d from TColgp,
Boolean from Standard,
Position from GccEnt,
Array1OfPosition from GccEnt
raises OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail
is
Create( Qualified1 : QualifiedCurve from Geom2dGcc;
Pcenter : Point from Geom2d ;
Tolerance : Real from Standard ) returns Circ2dTanCen
raises BadQualifier;
---Purpose: Constructs one or more 2D circles tangential to the
-- curve Qualified1 and centered on the point Pcenter.
-- Tolerance is a tolerance criterion used by the algorithm
-- to find a solution when, mathematically, the problem
-- posed does not have a solution, but where there is
-- numeric uncertainty attached to the arguments.
-- Tolerance is only used in these algorithms in very
-- specific cases where the center of the solution is very
-- close to the circle to which it is tangential, and where the
-- solution is thus a very small circle.
-- Exceptions
-- GccEnt_BadQualifier if a qualifier is inconsistent with
-- the argument it qualifies (for example, enclosing for a line).
IsDone(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the construction algorithm does not fail
-- (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has reached
-- its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone
is static;
---Purpose: Returns the number of circles, representing solutions
-- computed by this algorithm.
-- Exceptions
-- StdFail_NotDone if the construction fails.
ThisSolution(me ; Index : Integer from Standard) returns Circ2d from gp
raises OutOfRange, NotDone
is static;
---Purpose: Returns a circle, representing the solution of index
-- Index computed by this algorithm.
-- Warning
-- This indexing simply provides a means of consulting the
-- solutions. The index values are not associated with
-- these solutions outside the context of the algorithm object.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: Returns the qualifier Qualif1 of the tangency argument
-- for the solution of index Index computed by this algorithm.
-- The returned qualifier is:
-- - that specified at the start of construction when the
-- solutions are defined as enclosed, enclosing or
-- outside with respect to the argument, or
-- - that computed during construction (i.e. enclosed,
-- enclosing or outside) when the solutions are defined
-- as unqualified with respect to the argument.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange, NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
raises OutOfRange, NotDone
is static;
---Purpose: Returns true if the solution of index Index and the first
-- argument of this algorithm are the same (i.e. there are 2
-- identical circles).
-- If Rarg is the radius of the first argument, Rsol is the
-- radius of the solution and dist is the distance between
-- the two centers, we consider the two circles to be
-- identical if |Rarg - Rsol| and dist are less than
-- or equal to the tolerance criterion given at the time of
-- construction of this algorithm.
-- NotDone is raised if the construction algorithm didn't succeed.
-- OutOfRange is raised if Index is greater than the
-- number of solutions.
fields
WellDone : Boolean from Standard;
-- True if the algorithm succeeded.
NbrSol : Integer from Standard;
-- Number of solutions.
cirsol : Array1OfCirc2d from TColgp;
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
TheSame1 : Array1OfInteger from TColStd;
-- 1 if the solution and the first argument are the same (2 circles).
-- if R1 is the radius of the first argument and Rsol the radius
-- of the solution and dist the distance between the two centers,
-- we concider the two circles are identical if R1+dist-Rsol is
-- less than Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the first argument on
-- the solution.
par1sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
pararg1 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
-- CircAna : Circ2d2TanRad from GccAna;
-- CircGeo : Circ2d2TanRad from GccGeo;
-- TypeAna : Boolean;
end Circ2dTanCen;

View File

@@ -14,17 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2dTanCen.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GccAna_Circ2dTanCen.hxx>
#include <Geom2dGcc_Circ2dTanCenGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2dTanCen.hxx>
#include <Geom2dGcc_Circ2dTanCenGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2dTanCen::

View File

@@ -0,0 +1,176 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Circ2dTanCen_HeaderFile
#define _Geom2dGcc_Circ2dTanCen_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_QualifiedCurve;
class Geom2d_Point;
class gp_Circ2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to a curve and
//! centered on a point.
//! The arguments of all construction methods are :
//! - The qualified element for the tangency constrains
//! (QualifiedCurv).
//! -The center point Pcenter.
//! - A real Tolerance.
//! Tolerance is only used in the limits cases.
//! For example :
//! We want to create a circle tangent to an EnclosedCurv C1
//! with a tolerance Tolerance.
//! If we did not used Tolerance it is impossible to
//! find a solution in the the following case : Pcenter is
//! outside C1.
//! With Tolerance we will give a solution if the distance
//! between C1 and Pcenter is lower than or equal Tolerance/2.
class Geom2dGcc_Circ2dTanCen
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs one or more 2D circles tangential to the
//! curve Qualified1 and centered on the point Pcenter.
//! Tolerance is a tolerance criterion used by the algorithm
//! to find a solution when, mathematically, the problem
//! posed does not have a solution, but where there is
//! numeric uncertainty attached to the arguments.
//! Tolerance is only used in these algorithms in very
//! specific cases where the center of the solution is very
//! close to the circle to which it is tangential, and where the
//! solution is thus a very small circle.
//! Exceptions
//! GccEnt_BadQualifier if a qualifier is inconsistent with
//! the argument it qualifies (for example, enclosing for a line).
Standard_EXPORT Geom2dGcc_Circ2dTanCen(const Geom2dGcc_QualifiedCurve& Qualified1, const Handle(Geom2d_Point)& Pcenter, const Standard_Real Tolerance);
//! Returns true if the construction algorithm does not fail
//! (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has reached
//! its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of circles, representing solutions
//! computed by this algorithm.
//! Exceptions
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns a circle, representing the solution of index
//! Index computed by this algorithm.
//! Warning
//! This indexing simply provides a means of consulting the
//! solutions. The index values are not associated with
//! these solutions outside the context of the algorithm object.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! Returns the qualifier Qualif1 of the tangency argument
//! for the solution of index Index computed by this algorithm.
//! The returned qualifier is:
//! - that specified at the start of construction when the
//! solutions are defined as enclosed, enclosing or
//! outside with respect to the argument, or
//! - that computed during construction (i.e. enclosed,
//! enclosing or outside) when the solutions are defined
//! as unqualified with respect to the argument.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns true if the solution of index Index and the first
//! argument of this algorithm are the same (i.e. there are 2
//! identical circles).
//! If Rarg is the radius of the first argument, Rsol is the
//! radius of the solution and dist is the distance between
//! the two centers, we consider the two circles to be
//! identical if |Rarg - Rsol| and dist are less than
//! or equal to the tolerance criterion given at the time of
//! construction of this algorithm.
//! NotDone is raised if the construction algorithm didn't succeed.
//! OutOfRange is raised if Index is greater than the
//! number of solutions.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
TColStd_Array1OfInteger TheSame1;
TColgp_Array1OfPnt2d pnttg1sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal pararg1;
};
#endif // _Geom2dGcc_Circ2dTanCen_HeaderFile

View File

@@ -1,150 +0,0 @@
-- Created on: 1991-03-28
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2dTanCenGeo from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d circles tangent to a curve and
-- centered on a point.
-- The arguments of all construction methods are :
-- - The qualified element for the tangency constrains
-- (QualifiedCurv).
-- -The center point Pcenter.
-- - A real Tolerance.
-- Tolerance is only used in the limits cases.
-- For example :
-- We want to create a circle tangent to an EnclosedCurv C1
-- with a tolerance Tolerance.
-- If we did not use Tolerance it is impossible to
-- find a solution in the following case : Pcenter is
-- outside C1.
-- With Tolerance we will give a solution if the distance
-- between C1 and Pcenter is lower than or equal Tolerance/2.
-- inherits Entity from Standard
uses Pnt2d from gp,
Circ2d from gp,
Array1OfCirc2d from TColgp,
Array1OfPnt2d from TColgp,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Position from GccEnt,
Array1OfPosition from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
ExtPC2d from Extrema,
QCurve from Geom2dGcc
raises OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail
is
Create( Qualified1 : QCurve from Geom2dGcc;
Pcenter : Pnt2d from gp;
Tolerance : Real from Standard) returns Circ2dTanCenGeo
---Purpose: This method implements the algorithms used to
-- create 2d circles tangent to a circle and
-- centered on a point.
raises BadQualifier;
-- -- ....................................................................
IsDone(me) returns Boolean from Standard
is static;
---Purpose: This method returns True if the construction
-- algorithm succeeded.
NbSolutions(me) returns Integer from Standard
---Purpose: Returns the number of solutions and raises NotDone
-- exception if the algorithm didn't succeed.
raises NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
ThisSolution(me ;
Index : Integer from Standard) returns Circ2d from gp
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be carefull: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the
-- context of the algorithm-object.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions or less than zero.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol
-- on the solution curv.
-- ParArg is the intrinsic parameter of the point PntArg
-- on the argument curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions or less than zero.
fields
WellDone : Boolean from Standard;
-- True if the algorithm succeeded.
NbrSol : Integer from Standard;
-- The number of possible solutions. We have to decide about the
-- status of the multiple solutions...
cirsol : Array1OfCirc2d from TColgp;
---Purpose : The solutions.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
pnttg1sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the first argument on
-- the solution.
par1sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
pararg1 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
end Circ2dTanCenGeo;

View File

@@ -12,25 +12,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2dTanCenGeo.ixx>
#include <StdFail_NotDone.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_Failure.hxx>
#include <Extrema_ExtPC2d.hxx>
#include <Extrema_POnCurv2d.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <Geom2dGcc_Circ2dTanCenGeo.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <gp.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_Failure.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Extrema_POnCurv2d.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Extrema_ExtPC2d.hxx>
//=========================================================================
// Creation d un cercle tangent a une courbe centre en un point. +
//=========================================================================
Geom2dGcc_Circ2dTanCenGeo::
Geom2dGcc_Circ2dTanCenGeo (const Geom2dGcc_QCurve& Qualified1,
const gp_Pnt2d& Pcenter ,

View File

@@ -0,0 +1,134 @@
// Created on: 1991-03-28
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2dTanCenGeo_HeaderFile
#define _Geom2dGcc_Circ2dTanCenGeo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_QCurve;
class gp_Pnt2d;
class gp_Circ2d;
//! This class implements the algorithms used to
//! create 2d circles tangent to a curve and
//! centered on a point.
//! The arguments of all construction methods are :
//! - The qualified element for the tangency constrains
//! (QualifiedCurv).
//! -The center point Pcenter.
//! - A real Tolerance.
//! Tolerance is only used in the limits cases.
//! For example :
//! We want to create a circle tangent to an EnclosedCurv C1
//! with a tolerance Tolerance.
//! If we did not use Tolerance it is impossible to
//! find a solution in the following case : Pcenter is
//! outside C1.
//! With Tolerance we will give a solution if the distance
//! between C1 and Pcenter is lower than or equal Tolerance/2.
class Geom2dGcc_Circ2dTanCenGeo
{
public:
DEFINE_STANDARD_ALLOC
//! This method implements the algorithms used to
//! create 2d circles tangent to a circle and
//! centered on a point.
Standard_EXPORT Geom2dGcc_Circ2dTanCenGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Pcenter, const Standard_Real Tolerance);
//! This method returns True if the construction
//! algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of solutions and raises NotDone
//! exception if the algorithm didn't succeed.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be carefull: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the
//! context of the algorithm-object.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions or less than zero.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol
//! on the solution curv.
//! ParArg is the intrinsic parameter of the point PntArg
//! on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions or less than zero.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
TColgp_Array1OfPnt2d pnttg1sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal pararg1;
};
#endif // _Geom2dGcc_Circ2dTanCenGeo_HeaderFile

View File

@@ -1,256 +0,0 @@
-- Created on: 1992-10-20
-- 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 Circ2dTanOnRad from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create a 2d circle tangent to a 2d entity,
-- centered on a 2d entity and with a given radius.
-- More than one argument must be a curve.
-- The arguments of all construction methods are :
-- - The qualified element for the tangency constrains
-- (QualifiedCirc, QualifiedLin, QualifiedCurvPoints).
-- - The Center element (circle, line, curve).
-- - A real Tolerance.
-- Tolerance is only used in the limits cases.
-- For example :
-- We want to create a circle tangent to an OutsideCurv Cu1
-- centered on a line OnLine with a radius Radius and with
-- a tolerance Tolerance.
-- If we did not used Tolerance it is impossible to
-- find a solution in the the following case : OnLine is
-- outside Cu1. There is no intersection point between Cu1
-- and OnLine. The distance between the line and the
-- circle is greater than Radius.
-- With Tolerance we will give a solution if the
-- distance between Cu1 and OnLine is lower than or
-- equal Tolerance.
-- inherits Entity from Standard
uses Lin2d from gp,
Circ2d from gp,
Pnt2d from gp,
Point from Geom2d,
Array1OfCirc2d from TColgp,
Array1OfPnt2d from TColgp,
Curve from Geom2dAdaptor,
QualifiedCurve from Geom2dGcc,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Circ2dTanOnRad from GccAna,
Circ2dTanOnRadGeo from Geom2dGcc,
Position from GccEnt,
Array1OfPosition from GccEnt
raises NegativeValue from Standard,
OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail
is
Create(Qualified1 : QualifiedCurve from Geom2dGcc ;
OnCurv : Curve from Geom2dAdaptor;
Radius : Real from Standard ;
Tolerance : Real from Standard )
returns Circ2dTanOnRad from Geom2dGcc
raises NegativeValue,BadQualifier;
---Purpose: Constructs one or more 2D circles of radius Radius,
-- centered on the 2D curve OnCurv and:
-- - tangential to the curve Qualified1
Create(Point1 : Point from Geom2d ;
OnCurv : Curve from Geom2dAdaptor;
Radius : Real from Standard ;
Tolerance : Real from Standard )
returns Circ2dTanOnRad from Geom2dGcc
raises NegativeValue;
---Purpose: Constructs one or more 2D circles of radius Radius,
-- centered on the 2D curve OnCurv and:
-- passing through the point Point1.
-- OnCurv is an adapted curve, i.e. an object which is an
-- interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by the construction algorithm.
-- Similarly, the qualified curve Qualified1 is created from
-- an adapted curve.
-- Adapted curves are created in the following way:
-- Handle(Geom2d_Curve) myCurveOn = ... ;
-- Geom2dAdaptor_Curve OnCurv ( myCurveOn ) ;
-- The algorithm is then constructed with this object:
-- Handle(Geom2d_Curve) myCurve1 = ...
-- ;
-- Geom2dAdaptor_Curve Adapted1 ( myCurve1 ) ;
-- Geom2dGcc_QualifiedCurve
-- Qualified1 = Geom2dGcc::Outside(Adapted1);
-- Standard_Real Radius = ... , Tolerance = ... ;
-- Geom2dGcc_Circ2dTanOnRad
-- myAlgo ( Qualified1 , OnCurv , Radius , Tolerance ) ;
-- if ( myAlgo.IsDone() )
-- { Standard_Integer Nbr = myAlgo.NbSolutions() ;
-- gp_Circ2d Circ ;
-- for ( Standard_Integer i = 1 ;
-- i <= nbr ; i++ )
-- { Circ = myAlgo.ThisSolution (i) ;
-- ...
-- }
-- }
Results(me : in out ;
Circ : Circ2dTanOnRad from GccAna)
is static;
Results(me : in out ;
Circ : Circ2dTanOnRadGeo from Geom2dGcc)
is static;
IsDone(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the construction algorithm does not fail
-- (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm which has reached
-- its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone
is static;
---Purpose: Returns the number of circles, representing solutions
-- computed by this algorithm.
-- Exceptions: StdFail_NotDone if the construction fails.
ThisSolution(me ; Index : Integer from Standard) returns Circ2d from gp
raises OutOfRange, NotDone
is static;
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be carefull: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the context
-- of the algorithm-object.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
--- Purpose: Returns the qualifier Qualif1 of the tangency argument
-- for the solution of index Index computed by this algorithm.
-- The returned qualifier is:
-- - that specified at the start of construction when the
-- solutions are defined as enclosed, enclosing or
-- outside with respect to the arguments, or
-- - that computed during construction (i.e. enclosed,
-- enclosing or outside) when the solutions are defined
-- as unqualified with respect to the arguments, or
-- - GccEnt_noqualifier if the tangency argument is a point.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange, NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point on the solution curv.
-- ParArg is the intrinsic parameter of the point on the argument curv.
-- PntSol is the tangency point on the solution curv.
-- PntArg is the tangency point on the argument curv.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
CenterOn3 (me ;
Index : Integer from Standard;
ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange, NotDone
is static;
---Purpose: Returns the center PntSol on the second argument (i.e.
-- line or circle) of the solution of index Index computed by
-- this algorithm.
-- ParArg is the intrinsic parameter of the point on the argument curv.
-- PntSol is the center point of the solution curv.
-- PntArg is the projection of PntSol on the argument curv.
-- Exceptions:
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
raises OutOfRange, NotDone
is static;
---Purpose: Returns true if the solution of index Index and the first
-- argument of this algorithm are the same (i.e. there are 2
-- identical circles).
-- If Rarg is the radius of the first argument, Rsol is the
-- radius of the solution and dist is the distance between
-- the two centers, we consider the two circles to be
-- identical if |Rarg - Rsol| and dist are less than
-- or equal to the tolerance criterion given at the time of
-- construction of this algorithm.
-- OutOfRange is raised if Index is greater than the number of solutions.
-- notDone is raised if the construction algorithm did not succeed.
fields
WellDone : Boolean from Standard;
-- True if the algorithm succeeded.
NbrSol : Integer from Standard;
-- The number of possible solutions. We have to decide about the
-- status of the multiple solutions...
cirsol : Array1OfCirc2d from TColgp;
---Purpose : The solutions.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
TheSame1 : Array1OfInteger from TColStd;
pnttg1sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the first argument on
-- the solution.
par1sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
pararg1 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pntcen3 : Array1OfPnt2d from TColgp;
-- The center point of the solution on the first argument.
parcen3 : Array1OfReal from TColStd;
-- The parameter of the center point of the solution on the second
-- argument.
end Circ2dTanOnRad;

View File

@@ -14,19 +14,24 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Circ2dTanOnRad.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GccAna_Circ2dTanOnRad.hxx>
#include <Geom2dGcc_Circ2dTanOnRadGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Point.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_Circ2dTanOnRad.hxx>
#include <Geom2dGcc_Circ2dTanOnRadGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Circ2dTanOnRad::
Geom2dGcc_Circ2dTanOnRad (const Geom2dGcc_QualifiedCurve& Qualified1 ,

View File

@@ -0,0 +1,225 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Circ2dTanOnRad_HeaderFile
#define _Geom2dGcc_Circ2dTanOnRad_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_NegativeValue;
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_QualifiedCurve;
class Geom2dAdaptor_Curve;
class Geom2d_Point;
class GccAna_Circ2dTanOnRad;
class Geom2dGcc_Circ2dTanOnRadGeo;
class gp_Circ2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create a 2d circle tangent to a 2d entity,
//! centered on a 2d entity and with a given radius.
//! More than one argument must be a curve.
//! The arguments of all construction methods are :
//! - The qualified element for the tangency constrains
//! (QualifiedCirc, QualifiedLin, QualifiedCurvPoints).
//! - The Center element (circle, line, curve).
//! - A real Tolerance.
//! Tolerance is only used in the limits cases.
//! For example :
//! We want to create a circle tangent to an OutsideCurv Cu1
//! centered on a line OnLine with a radius Radius and with
//! a tolerance Tolerance.
//! If we did not used Tolerance it is impossible to
//! find a solution in the the following case : OnLine is
//! outside Cu1. There is no intersection point between Cu1
//! and OnLine. The distance between the line and the
//! circle is greater than Radius.
//! With Tolerance we will give a solution if the
//! distance between Cu1 and OnLine is lower than or
//! equal Tolerance.
class Geom2dGcc_Circ2dTanOnRad
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs one or more 2D circles of radius Radius,
//! centered on the 2D curve OnCurv and:
//! - tangential to the curve Qualified1
Standard_EXPORT Geom2dGcc_Circ2dTanOnRad(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
//! Constructs one or more 2D circles of radius Radius,
//! centered on the 2D curve OnCurv and:
//! passing through the point Point1.
//! OnCurv is an adapted curve, i.e. an object which is an
//! interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by the construction algorithm.
//! Similarly, the qualified curve Qualified1 is created from
//! an adapted curve.
//! Adapted curves are created in the following way:
//! Handle(Geom2d_Curve) myCurveOn = ... ;
//! Geom2dAdaptor_Curve OnCurv ( myCurveOn ) ;
//! The algorithm is then constructed with this object:
//! Handle(Geom2d_Curve) myCurve1 = ...
//! ;
//! Geom2dAdaptor_Curve Adapted1 ( myCurve1 ) ;
//! Geom2dGcc_QualifiedCurve
//! Qualified1 = Geom2dGcc::Outside(Adapted1);
//! Standard_Real Radius = ... , Tolerance = ... ;
//! Geom2dGcc_Circ2dTanOnRad
//! myAlgo ( Qualified1 , OnCurv , Radius , Tolerance ) ;
//! if ( myAlgo.IsDone() )
//! { Standard_Integer Nbr = myAlgo.NbSolutions() ;
//! gp_Circ2d Circ ;
//! for ( Standard_Integer i = 1 ;
//! i <= nbr ; i++ )
//! { Circ = myAlgo.ThisSolution (i) ;
//! ...
//! }
//! }
Standard_EXPORT Geom2dGcc_Circ2dTanOnRad(const Handle(Geom2d_Point)& Point1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
Standard_EXPORT void Results (const GccAna_Circ2dTanOnRad& Circ);
Standard_EXPORT void Results (const Geom2dGcc_Circ2dTanOnRadGeo& Circ);
//! Returns true if the construction algorithm does not fail
//! (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm which has reached
//! its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of circles, representing solutions
//! computed by this algorithm.
//! Exceptions: StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be carefull: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the context
//! of the algorithm-object.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
//! Returns the qualifier Qualif1 of the tangency argument
//! for the solution of index Index computed by this algorithm.
//! The returned qualifier is:
//! - that specified at the start of construction when the
//! solutions are defined as enclosed, enclosing or
//! outside with respect to the arguments, or
//! - that computed during construction (i.e. enclosed,
//! enclosing or outside) when the solutions are defined
//! as unqualified with respect to the arguments, or
//! - GccEnt_noqualifier if the tangency argument is a point.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point on the solution curv.
//! ParArg is the intrinsic parameter of the point on the argument curv.
//! PntSol is the tangency point on the solution curv.
//! PntArg is the tangency point on the argument curv.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns the center PntSol on the second argument (i.e.
//! line or circle) of the solution of index Index computed by
//! this algorithm.
//! ParArg is the intrinsic parameter of the point on the argument curv.
//! PntSol is the center point of the solution curv.
//! PntArg is the projection of PntSol on the argument curv.
//! Exceptions:
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns true if the solution of index Index and the first
//! argument of this algorithm are the same (i.e. there are 2
//! identical circles).
//! If Rarg is the radius of the first argument, Rsol is the
//! radius of the solution and dist is the distance between
//! the two centers, we consider the two circles to be
//! identical if |Rarg - Rsol| and dist are less than
//! or equal to the tolerance criterion given at the time of
//! construction of this algorithm.
//! OutOfRange is raised if Index is greater than the number of solutions.
//! notDone is raised if the construction algorithm did not succeed.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
TColStd_Array1OfInteger TheSame1;
TColgp_Array1OfPnt2d pnttg1sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal pararg1;
TColgp_Array1OfPnt2d pntcen3;
TColStd_Array1OfReal parcen3;
};
#endif // _Geom2dGcc_Circ2dTanOnRad_HeaderFile

View File

@@ -1,267 +0,0 @@
-- Created on: 1991-04-03
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Circ2dTanOnRadGeo from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create a 2d circle tangent to a 2d entity,
-- centered on a 2d entity and with a given radius.
-- More than one argument must be a curve.
-- The arguments of all construction methods are :
-- - The qualified element for the tangency constrains
-- (QualifiedCirc, QualifiedLin, QualifiedCurvPoints).
-- - The Center element (circle, line, curve).
-- - A real Tolerance.
-- Tolerance is only used in the limits cases.
-- For example :
-- We want to create a circle tangent to an OutsideCurv Cu1
-- centered on a line OnLine with a radius Radius and with
-- a tolerance Tolerance.
-- If we did not use Tolerance it is impossible to
-- find a solution in the following case : OnLine is
-- outside Cu1. There is no intersection point between Cu1
-- and OnLine. The distance between the line and the
-- circle is greater than Radius.
-- With Tolerance we will give a solution if the
-- distance between Cu1 and OnLine is lower than or
-- equal Tolerance.
-- inherits Entity from Standard
uses Lin2d from gp,
Circ2d from gp,
Pnt2d from gp,
Array1OfCirc2d from TColgp,
Array1OfPnt2d from TColgp,
QualifiedCirc from GccEnt,
QualifiedLin from GccEnt,
Array1OfReal from TColStd,
Array1OfInteger from TColStd,
Position from GccEnt,
Array1OfPosition from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc,
OffsetCurve from Adaptor3d,
HCurve from Geom2dAdaptor,
CurveToolGeo from Geom2dGcc,
TheIntConicCurveOfGInter from Geom2dInt,
GInter from Geom2dInt
raises NegativeValue from Standard,
OutOfRange from Standard,
BadQualifier from GccEnt,
NotDone from StdFail
is
-- On a line .............................................................
Create(Qualified1 : QCurve from Geom2dGcc;
OnLine : Lin2d from gp;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles tangent to a curve and centered on a 2d Line
-- with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue, BadQualifier;
---Purpose: raises NegativeValue in case of NegativeRadius.
-- -- On a circle ...........................................................
Create(Qualified1 : QCurve from Geom2dGcc;
OnCirc : Circ2d from gp;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles tangent to a curve and centered on a 2d Circle
-- with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue, BadQualifier;
---Purpose: raises NegativeValue in case of NegativeRadius.
-- On a curve ............................................................
Create(Qualified1 : QualifiedCirc from GccEnt ;
OnCurv : Curve from Geom2dAdaptor ;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles tangent to a circle and centered on a 2d curve
-- with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue, BadQualifier;
---Purpose: raises NegativeValue in case of NegativeRadius.
Create(Qualified1 : QualifiedLin from GccEnt ;
OnCurv : Curve from Geom2dAdaptor ;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles tangent to a 2d Line and centered on a 2d curve
-- with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue, BadQualifier;
---Purpose: raises NegativeValue in case of NegativeRadius.
Create(Qualified1 : QCurve from Geom2dGcc;
OnCurv : Curve from Geom2dAdaptor;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles tangent to a 2d curve and centered on a 2d curve
-- with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue, BadQualifier;
---Purpose: raises NegativeValue in case of NegativeRadius.
Create(Point1 : Pnt2d from gp ;
OnCurv : Curve from Geom2dAdaptor ;
Radius : Real from Standard;
Tolerance : Real from Standard) returns Circ2dTanOnRadGeo
---Purpose: This methods implements the algorithms used to create
-- 2d Circles passing through a 2d point and centered on a
-- 2d curve with a given radius.
-- Tolerance is used to find solution in every limit cases.
raises NegativeValue;
---Purpose: raises NegativeValue in case of NegativeRadius.
-- -- ....................................................................
IsDone(me) returns Boolean from Standard
is static;
---Purpose: This method returns True if the construction
-- algorithm succeeded.
NbSolutions(me) returns Integer from Standard
---Purpose: This method returns the number of solutions.
raises NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
ThisSolution(me ;
Index : Integer from Standard) returns Circ2d from gp
---Purpose: Returns the solution number Index and raises OutOfRange
-- exception if Index is greater than the number of solutions.
-- Be careful: the Index is only a way to get all the
-- solutions, but is not associated to theses outside the
-- context of the algorithm-object.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the tangency point between the
-- result number Index and the first argument.
-- ParSol is the intrinsic parameter of the point on the
-- solution curv.
-- ParArg is the intrinsic parameter of the point on the
-- argument curv.
-- PntSol is the tangency point on the solution curv.
-- PntArg is the tangency point on the argument curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
CenterOn3 (me ;
Index : Integer from Standard;
ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
---Purpose: Returns informations about the center (on the curv)
-- of the result.
-- ParArg is the intrinsic parameter of the point on
-- the argument curv.
-- PntSol is the center point of the solution curv.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
IsTheSame1(me ;
Index : Integer from Standard) returns Boolean from Standard
---Purpose: Returns True if the solution number Index is equal to
-- the first argument and False in the other cases.
raises OutOfRange, NotDone
is static;
---Purpose: It raises NotDone if the construction algorithm
-- didn't succeed.
-- It raises OutOfRange if Index is greater than the
-- number of solutions.
fields
WellDone : Boolean from Standard;
---Purpose: True if the algorithm succeeded.
NbrSol : Integer from Standard;
---Purpose: The number of possible solutions. We have to decide about the
-- status of the multiple solutions...
cirsol : Array1OfCirc2d from TColgp;
---Purpose : The solutions.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
TheSame1 : Array1OfInteger from TColStd;
---Purpose: 1 if the solution and the first argument are the same in the
-- tolerance of Tolerance.
-- 0 in the other cases.
pnttg1sol : Array1OfPnt2d from TColgp;
---Purpose: The tangency point between the solution and the first
-- argument on the solution.
pntcen3 : Array1OfPnt2d from TColgp;
---Purpose: The center point of the solution on the first argument.
par1sol : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on thesolution.
pararg1 : Array1OfReal from TColStd;
---Purpose: The parameter of the tangency point between the solution
-- and the first argument on the first argument.
parcen3 : Array1OfReal from TColStd;
---Purpose: The parameter of the center point of the solution on the
-- second argument.
end Circ2dTanOnRadGeo;

View File

@@ -21,25 +21,29 @@
// de rayon donne : Radius. +
//========================================================================
#include <Geom2dGcc_Circ2dTanOnRadGeo.ixx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <ElCLib.hxx>
#include <math_DirectPolynomialRoots.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_NegativeValue.hxx>
#include <gp_Dir2d.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <GccEnt_QualifiedLin.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dGcc_Circ2dTanOnRadGeo.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <IntRes2d_Domain.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <Geom2dInt_GInter.hxx>
#include <math_DirectPolynomialRoots.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TColStd_Array1OfReal.hxx>
//=========================================================================
// Cercle tangent : a un cercle Qualified1 (C1). +
@@ -57,7 +61,6 @@
// - de centre Pntcen(xc,yc) +
// - de rayon Radius. +
//=========================================================================
Geom2dGcc_Circ2dTanOnRadGeo::
Geom2dGcc_Circ2dTanOnRadGeo (const Geom2dGcc_QCurve& Qualified1,
const gp_Lin2d& OnLine ,

View File

@@ -0,0 +1,205 @@
// Created on: 1991-04-03
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Circ2dTanOnRadGeo_HeaderFile
#define _Geom2dGcc_Circ2dTanOnRadGeo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfCirc2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class Standard_NegativeValue;
class Standard_OutOfRange;
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_QCurve;
class gp_Lin2d;
class gp_Circ2d;
class GccEnt_QualifiedCirc;
class Geom2dAdaptor_Curve;
class GccEnt_QualifiedLin;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create a 2d circle tangent to a 2d entity,
//! centered on a 2d entity and with a given radius.
//! More than one argument must be a curve.
//! The arguments of all construction methods are :
//! - The qualified element for the tangency constrains
//! (QualifiedCirc, QualifiedLin, QualifiedCurvPoints).
//! - The Center element (circle, line, curve).
//! - A real Tolerance.
//! Tolerance is only used in the limits cases.
//! For example :
//! We want to create a circle tangent to an OutsideCurv Cu1
//! centered on a line OnLine with a radius Radius and with
//! a tolerance Tolerance.
//! If we did not use Tolerance it is impossible to
//! find a solution in the following case : OnLine is
//! outside Cu1. There is no intersection point between Cu1
//! and OnLine. The distance between the line and the
//! circle is greater than Radius.
//! With Tolerance we will give a solution if the
//! distance between Cu1 and OnLine is lower than or
//! equal Tolerance.
class Geom2dGcc_Circ2dTanOnRadGeo
{
public:
DEFINE_STANDARD_ALLOC
//! This methods implements the algorithms used to create
//! 2d Circles tangent to a curve and centered on a 2d Line
//! with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Lin2d& OnLine, const Standard_Real Radius, const Standard_Real Tolerance);
//! This methods implements the algorithms used to create
//! 2d Circles tangent to a curve and centered on a 2d Circle
//! with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Circ2d& OnCirc, const Standard_Real Radius, const Standard_Real Tolerance);
//! This methods implements the algorithms used to create
//! 2d Circles tangent to a circle and centered on a 2d curve
//! with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
//! This methods implements the algorithms used to create
//! 2d Circles tangent to a 2d Line and centered on a 2d curve
//! with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
//! This methods implements the algorithms used to create
//! 2d Circles tangent to a 2d curve and centered on a 2d curve
//! with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
//! This methods implements the algorithms used to create
//! 2d Circles passing through a 2d point and centered on a
//! 2d curve with a given radius.
//! Tolerance is used to find solution in every limit cases.
//! raises NegativeValue in case of NegativeRadius.
Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const gp_Pnt2d& Point1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
//! This method returns True if the construction
//! algorithm succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! This method returns the number of solutions.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns the solution number Index and raises OutOfRange
//! exception if Index is greater than the number of solutions.
//! Be careful: the Index is only a way to get all the
//! solutions, but is not associated to theses outside the
//! context of the algorithm-object.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
//! Returns informations about the tangency point between the
//! result number Index and the first argument.
//! ParSol is the intrinsic parameter of the point on the
//! solution curv.
//! ParArg is the intrinsic parameter of the point on the
//! argument curv.
//! PntSol is the tangency point on the solution curv.
//! PntArg is the tangency point on the argument curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the center (on the curv)
//! of the result.
//! ParArg is the intrinsic parameter of the point on
//! the argument curv.
//! PntSol is the center point of the solution curv.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns True if the solution number Index is equal to
//! the first argument and False in the other cases.
//! It raises NotDone if the construction algorithm
//! didn't succeed.
//! It raises OutOfRange if Index is greater than the
//! number of solutions.
Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
protected:
private:
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfCirc2d cirsol;
GccEnt_Array1OfPosition qualifier1;
TColStd_Array1OfInteger TheSame1;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pntcen3;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal parcen3;
};
#endif // _Geom2dGcc_Circ2dTanOnRadGeo_HeaderFile

View File

@@ -1,55 +0,0 @@
-- Created on: 1992-06-04
-- Created by: Jacques GOUSSARD
-- 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 CurveTool from Geom2dGcc
---Purpose:
uses Curve from Geom2dAdaptor,
Pnt2d from gp,
Vec2d from gp
is
FirstParameter(myclass; C: Curve from Geom2dAdaptor)
returns Real;
LastParameter(myclass; C: Curve from Geom2dAdaptor)
returns Real;
EpsX (myclass ;
C : Curve from Geom2dAdaptor;
Tol : Real from Standard )
returns Real;
NbSamples(myclass ;
C : Curve from Geom2dAdaptor)
returns Integer;
Value (myclass; C: Curve from Geom2dAdaptor; X: Real)
returns Pnt2d from gp;
D1 (myclass; C: Curve from Geom2dAdaptor; U: Real ;
P: out Pnt2d; T: out Vec2d);
D2 (myclass; C: Curve from Geom2dAdaptor; U: Real ;
P: out Pnt2d; T,N: out Vec2d);
D3 (myclass; C: Curve from Geom2dAdaptor; U: Real ;
P: out Pnt2d; T,N,dN: out Vec2d);
end CurveTool;

View File

@@ -12,18 +12,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_CurveTool.ixx>
#include <Geom2d_Line.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
//Template a respecter
Standard_Real Geom2dGcc_CurveTool::
EpsX (const Geom2dAdaptor_Curve& C ,
const Standard_Real Tol) {

View File

@@ -0,0 +1,78 @@
// Created on: 1992-06-04
// Created by: Jacques GOUSSARD
// 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 _Geom2dGcc_CurveTool_HeaderFile
#define _Geom2dGcc_CurveTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class Geom2dAdaptor_Curve;
class gp_Pnt2d;
class gp_Vec2d;
class Geom2dGcc_CurveTool
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static Standard_Real FirstParameter (const Geom2dAdaptor_Curve& C);
Standard_EXPORT static Standard_Real LastParameter (const Geom2dAdaptor_Curve& C);
Standard_EXPORT static Standard_Real EpsX (const Geom2dAdaptor_Curve& C, const Standard_Real Tol);
Standard_EXPORT static Standard_Integer NbSamples (const Geom2dAdaptor_Curve& C);
Standard_EXPORT static gp_Pnt2d Value (const Geom2dAdaptor_Curve& C, const Standard_Real X);
Standard_EXPORT static void D1 (const Geom2dAdaptor_Curve& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T);
Standard_EXPORT static void D2 (const Geom2dAdaptor_Curve& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, gp_Vec2d& N);
Standard_EXPORT static void D3 (const Geom2dAdaptor_Curve& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, gp_Vec2d& N, gp_Vec2d& dN);
protected:
private:
};
#endif // _Geom2dGcc_CurveTool_HeaderFile

View File

@@ -1,127 +0,0 @@
-- Created on: 1992-06-04
-- Created by: Jacques GOUSSARD
-- 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 CurveToolGeo from Geom2dGcc
uses Pnt2d from gp,
Vec2d from gp,
Lin2d from gp,
Circ2d from gp,
Elips2d from gp,
Parab2d from gp,
Hypr2d from gp,
CurveType from GeomAbs,
Shape from GeomAbs,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
OffsetCurve from Adaptor3d
is
TheType(myclass; C: OffsetCurve from Adaptor3d )
returns CurveType from GeomAbs;
Line(myclass; C: OffsetCurve from Adaptor3d)
---Purpose: Returns the Lin2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
-- IntCurve_Lin.
returns Lin2d from gp;
Circle(myclass; C: OffsetCurve from Adaptor3d)
---Purpose: Returns the Circ2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
-- IntCurve_Cir.
returns Circ2d from gp;
Ellipse(myclass; C: OffsetCurve from Adaptor3d)
---Purpose: Returns the Elips2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
-- IntCurve_Eli.
returns Elips2d from gp;
Parabola(myclass; C: OffsetCurve from Adaptor3d)
---Purpose: Returns the Parab2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
-- IntCurve_Prb.
returns Parab2d from gp;
Hyperbola(myclass; C: OffsetCurve from Adaptor3d)
---Purpose: Returns the Hypr2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
-- IntCurve_Hpr.
returns Hypr2d from gp;
-- The following method are used only when TheType returns IntCurve_Other.
FirstParameter(myclass;C: OffsetCurve from Adaptor3d)
returns Real;
LastParameter(myclass;C: OffsetCurve from Adaptor3d)
returns Real;
EpsX (myclass ;
C : OffsetCurve from Adaptor3d ;
Tol : Real from Standard)
returns Real;
NbSamples(myclass ;
C : OffsetCurve from Adaptor3d)
returns Integer;
Value (myclass ;
C : OffsetCurve from Adaptor3d;
X : Real )
returns Pnt2d from gp;
D1 (myclass; C : OffsetCurve from Adaptor3d ;
U : Real ;
P : out Pnt2d ;
T : out Vec2d );
D2 (myclass; C : OffsetCurve from Adaptor3d ;
U : Real ;
P : out Pnt2d ;
T,N : out Vec2d );
IsComposite(myclass; C:OffsetCurve from Adaptor3d)
returns Boolean from Standard;
-- The following methods are used only when IsComposite returns True.
GetIntervals(myclass ; C:OffsetCurve from Adaptor3d) returns Integer from Standard;
---Purpose : Outputs the number of interval of continuity C1 of
-- the curve
-- used if Type == Composite.
GetInterval (myclass; C : OffsetCurve from Adaptor3d
; Index : Integer from Standard
; U1, U2 : out Real from Standard);
---Purpose : Outputs the bounds of interval of index <Index>
-- used if Type == Composite.
SetCurrentInterval (myclass; C: in out OffsetCurve from Adaptor3d
; Index : Integer from Standard);
---Purpose : Set the current valid interval of index <Index>
-- inside which the computations will be done
-- (used if Type == Composite).
end CurveToolGeo;

View File

@@ -12,23 +12,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_CurveToolGeo.ixx>
#include <Standard_Failure.hxx>
#include <gp.hxx>
#include <Geom2d_Line.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Extrema_POnCurv2d.hxx>
#include <gp_Vec.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Adaptor3d_OffsetCurve.hxx>
#include <Extrema_POnCurv2d.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2dGcc_CurveToolGeo.hxx>
#include <GeomAbs_CurveType.hxx>
#include <gp.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Parab2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_Failure.hxx>
GeomAbs_CurveType Geom2dGcc_CurveToolGeo::
TheType(const Adaptor3d_OffsetCurve& ) {

View File

@@ -0,0 +1,126 @@
// Created on: 1992-06-04
// Created by: Jacques GOUSSARD
// 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 _Geom2dGcc_CurveToolGeo_HeaderFile
#define _Geom2dGcc_CurveToolGeo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Adaptor3d_OffsetCurve;
class gp_Lin2d;
class gp_Circ2d;
class gp_Elips2d;
class gp_Parab2d;
class gp_Hypr2d;
class gp_Pnt2d;
class gp_Vec2d;
class Geom2dGcc_CurveToolGeo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static GeomAbs_CurveType TheType (const Adaptor3d_OffsetCurve& C);
//! Returns the Lin2d from gp corresponding to the curve C.
//! This method is called only when TheType returns
//! IntCurve_Lin.
Standard_EXPORT static gp_Lin2d Line (const Adaptor3d_OffsetCurve& C);
//! Returns the Circ2d from gp corresponding to the curve C.
//! This method is called only when TheType returns
//! IntCurve_Cir.
Standard_EXPORT static gp_Circ2d Circle (const Adaptor3d_OffsetCurve& C);
//! Returns the Elips2d from gp corresponding to the curve C.
//! This method is called only when TheType returns
//! IntCurve_Eli.
Standard_EXPORT static gp_Elips2d Ellipse (const Adaptor3d_OffsetCurve& C);
//! Returns the Parab2d from gp corresponding to the curve C.
//! This method is called only when TheType returns
//! IntCurve_Prb.
Standard_EXPORT static gp_Parab2d Parabola (const Adaptor3d_OffsetCurve& C);
//! Returns the Hypr2d from gp corresponding to the curve C.
//! This method is called only when TheType returns
//! IntCurve_Hpr.
Standard_EXPORT static gp_Hypr2d Hyperbola (const Adaptor3d_OffsetCurve& C);
Standard_EXPORT static Standard_Real FirstParameter (const Adaptor3d_OffsetCurve& C);
Standard_EXPORT static Standard_Real LastParameter (const Adaptor3d_OffsetCurve& C);
Standard_EXPORT static Standard_Real EpsX (const Adaptor3d_OffsetCurve& C, const Standard_Real Tol);
Standard_EXPORT static Standard_Integer NbSamples (const Adaptor3d_OffsetCurve& C);
Standard_EXPORT static gp_Pnt2d Value (const Adaptor3d_OffsetCurve& C, const Standard_Real X);
Standard_EXPORT static void D1 (const Adaptor3d_OffsetCurve& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T);
Standard_EXPORT static void D2 (const Adaptor3d_OffsetCurve& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, gp_Vec2d& N);
Standard_EXPORT static Standard_Boolean IsComposite (const Adaptor3d_OffsetCurve& C);
//! Outputs the number of interval of continuity C1 of
//! the curve
//! used if Type == Composite.
Standard_EXPORT static Standard_Integer GetIntervals (const Adaptor3d_OffsetCurve& C);
//! Outputs the bounds of interval of index <Index>
//! used if Type == Composite.
Standard_EXPORT static void GetInterval (const Adaptor3d_OffsetCurve& C, const Standard_Integer Index, Standard_Real& U1, Standard_Real& U2);
//! Set the current valid interval of index <Index>
//! inside which the computations will be done
//! (used if Type == Composite).
Standard_EXPORT static void SetCurrentInterval (Adaptor3d_OffsetCurve& C, const Standard_Integer Index);
protected:
private:
};
#endif // _Geom2dGcc_CurveToolGeo_HeaderFile

View File

@@ -1,63 +0,0 @@
-- Created on: 1992-02-20
-- Created by: Remy 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 class FunctionTanCirCu from Geom2dGcc inherits FunctionWithDerivative from math
---Purpose: This abstract class describes a Function of 1 Variable
-- used to find a line tangent to a curve and a circle.
uses
Circ2d from gp,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
is
Create (Circ : Circ2d from gp ;
Curv : Curve from Geom2dAdaptor ) returns FunctionTanCirCu from Geom2dGcc;
Value (me : in out ;
X : Real ;
F : out Real ) returns Boolean;
---Purpose: Computes the value of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Derivative (me : in out ;
X : Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the derivative of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Values (me : in out ;
X : Real ;
F : out Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the value and the derivative of the function F
-- for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
fields
TheCirc : Circ2d from gp;
Curve : Curve from Geom2dAdaptor;
-- Modified by Sergey KHROMOV - Thu Apr 5 09:50:18 2001 Begin
myWeight : Real;
-- Modified by Sergey KHROMOV - Thu Apr 5 09:50:19 2001 End
end FunctionTanCirCu;

View File

@@ -14,14 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanCirCu.ixx>
#include <gp_Vec2d.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCirCu.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Pnt.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <gp_Vec2d.hxx>
//=========================================================================
// soit P1 le point sur la courbe Geom2dAdaptor_Curve d abscisse u. +
@@ -50,7 +51,6 @@
// by an average square distance between the circle +
// and the curve. +
//=========================================================================
Geom2dGcc_FunctionTanCirCu::
Geom2dGcc_FunctionTanCirCu(const gp_Circ2d& Circ ,
const Geom2dAdaptor_Curve& Curv ) {

View File

@@ -0,0 +1,86 @@
// Created on: 1992-02-20
// Created by: Remy 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 _Geom2dGcc_FunctionTanCirCu_HeaderFile
#define _Geom2dGcc_FunctionTanCirCu_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_Circ2d.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Standard_Real.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
class gp_Circ2d;
class Geom2dAdaptor_Curve;
//! This abstract class describes a Function of 1 Variable
//! used to find a line tangent to a curve and a circle.
class Geom2dGcc_FunctionTanCirCu : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanCirCu(const gp_Circ2d& Circ, const Geom2dAdaptor_Curve& Curv);
//! Computes the value of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! Computes the derivative of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& Deriv);
//! Computes the value and the derivative of the function F
//! for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& Deriv);
protected:
private:
gp_Circ2d TheCirc;
Geom2dAdaptor_Curve Curve;
Standard_Real myWeight;
};
#endif // _Geom2dGcc_FunctionTanCirCu_HeaderFile

View File

@@ -1,88 +0,0 @@
-- Created on: 1992-02-20
-- Created by: Remy 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 class FunctionTanCuCu from Geom2dGcc inherits FunctionSetWithDerivatives from math
---Purpose: This abstract class describes a Function of 1 Variable
-- used to find a line tangent to two curves.
uses Vector from math,
Matrix from math,
Circ2d from gp,
Pnt2d from gp,
Vec2d from gp,
Type3 from Geom2dGcc,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
raises ConstructionError
is
Create (Curv1 : Curve from Geom2dAdaptor ;
Curv2 : Curve from Geom2dAdaptor ) returns FunctionTanCuCu from Geom2dGcc;
Create (Circ1 : Circ2d from gp ;
Curv2 : Curve from Geom2dAdaptor ) returns FunctionTanCuCu from Geom2dGcc;
InitDerivative(me : in out ;
X : Vector from math ;
Point1,Point2 : out Pnt2d from gp ;
Tan1,Tan2,D21,D22 : out Vec2d from gp )
raises ConstructionError
is static;
NbVariables(me) returns Integer;
---Purpose: returns the number of variables of the function.
NbEquations(me) returns Integer;
---Purpose: returns the number of equations of the function.
Value (me : in out ;
X : Vector from math;
F : out Vector from math) returns Boolean;
---Purpose: Computes the value of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Derivatives (me : in out ;
X : Vector from math;
Deriv : out Matrix from math) returns Boolean;
---Purpose: Computes the derivative of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Values (me : in out ;
X : Vector from math;
F : out Vector from math;
Deriv : out Matrix from math) returns Boolean;
---Purpose: Computes the value and the derivative of the function F
-- for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
fields
TheCurve1 : Curve from Geom2dAdaptor ;
TheCurve2 : Curve from Geom2dAdaptor ;
TheCirc1 : Circ2d from gp ;
TheType : Type3 from Geom2dGcc ;
end FunctionTanCuCu;

View File

@@ -14,13 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanCuCu.ixx>
#include <gp_Vec2d.hxx>
#include <gp_Pnt2d.hxx>
#include <ElCLib.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuCu.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <math_Matrix.hxx>
#include <Standard_ConstructionError.hxx>
void Geom2dGcc_FunctionTanCuCu::
InitDerivative(const math_Vector& X,

View File

@@ -0,0 +1,103 @@
// Created on: 1992-02-20
// Created by: Remy 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 _Geom2dGcc_FunctionTanCuCu_HeaderFile
#define _Geom2dGcc_FunctionTanCuCu_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Circ2d.hxx>
#include <Geom2dGcc_Type3.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <math_Vector.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Standard_ConstructionError;
class Geom2dAdaptor_Curve;
class gp_Circ2d;
class gp_Pnt2d;
class gp_Vec2d;
class math_Matrix;
//! This abstract class describes a Function of 1 Variable
//! used to find a line tangent to two curves.
class Geom2dGcc_FunctionTanCuCu : public math_FunctionSetWithDerivatives
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanCuCu(const Geom2dAdaptor_Curve& Curv1, const Geom2dAdaptor_Curve& Curv2);
Standard_EXPORT Geom2dGcc_FunctionTanCuCu(const gp_Circ2d& Circ1, const Geom2dAdaptor_Curve& Curv2);
Standard_EXPORT void InitDerivative (const math_Vector& X, gp_Pnt2d& Point1, gp_Pnt2d& Point2, gp_Vec2d& Tan1, gp_Vec2d& Tan2, gp_Vec2d& D21, gp_Vec2d& D22);
//! returns the number of variables of the function.
Standard_EXPORT Standard_Integer NbVariables() const;
//! returns the number of equations of the function.
Standard_EXPORT Standard_Integer NbEquations() const;
//! Computes the value of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
//! Computes the derivative of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& Deriv);
//! Computes the value and the derivative of the function F
//! for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& Deriv);
protected:
private:
Geom2dAdaptor_Curve TheCurve1;
Geom2dAdaptor_Curve TheCurve2;
gp_Circ2d TheCirc1;
Geom2dGcc_Type3 TheType;
};
#endif // _Geom2dGcc_FunctionTanCuCu_HeaderFile

View File

@@ -1,114 +0,0 @@
-- Created on: 1991-05-13
-- Created by: Laurent PAINNOT
-- Copyright (c) 1991-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 class FunctionTanCuCuCu from Geom2dGcc inherits FunctionSetWithDerivatives from math
---Purpose: This abstract class describes a set on N Functions of
-- M independant variables.
uses Vector from math,
Matrix from math,
Circ2d from gp,
Lin2d from gp,
Pnt2d from gp,
Vec2d from gp,
Type1 from Geom2dGcc,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
raises ConstructionError
is
Create (C1 : Curve from Geom2dAdaptor ;
C2 : Curve from Geom2dAdaptor ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Curve from Geom2dAdaptor ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Circ2d from gp ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
L2 : Lin2d from gp ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
L2 : Lin2d from gp ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
C2 : Curve from Geom2dAdaptor ;
C3 : Curve from Geom2dAdaptor ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Curve from Geom2dAdaptor ;
P3 : Pnt2d from gp ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
C2 : Curve from Geom2dAdaptor ;
P3 : Pnt2d from gp ) returns FunctionTanCuCuCu from Geom2dGcc;
Create (C1 : Curve from Geom2dAdaptor ;
P2 : Pnt2d from gp ;
P3 : Pnt2d from gp ) returns FunctionTanCuCuCu from Geom2dGcc;
InitDerivative(me : in out ;
X : Vector from math ;
Point1,Point2,Point3 : out Pnt2d from gp ;
Tan1,Tan2,Tan3,D21,D22,D23 : out Vec2d from gp )
raises ConstructionError
is static;
NbVariables(me) returns Integer;
---Purpose: Returns the number of variables of the function.
NbEquations(me) returns Integer;
---Purpose: Returns the number of equations of the function.
Value(me : in out ;
X : Vector from math;
F : out Vector from math) returns Boolean;
---Purpose: Computes the values of the Functions for the variable <X>.
Derivatives(me : in out ;
X : Vector from math;
D : out Matrix from math) returns Boolean;
---Purpose: Returns the values of the derivatives for the variable <X>.
Values(me : in out ;
X : Vector from math;
F : out Vector from math;
D : out Matrix from math) returns Boolean;
---Purpose: Returns the values of the functions and the derivatives
-- for the variable <X>.
fields
Curv1 : Curve from Geom2dAdaptor ;
Curv2 : Curve from Geom2dAdaptor ;
Curv3 : Curve from Geom2dAdaptor ;
Circ1 : Circ2d from gp ;
Circ2 : Circ2d from gp ;
Lin1 : Lin2d from gp ;
Lin2 : Lin2d from gp ;
TheType : Type1 from Geom2dGcc;
end FunctionTanCuCuCu;

View File

@@ -14,13 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanCuCuCu.ixx>
#include <Standard_ConstructionError.hxx>
#include <ElCLib.hxx>
#include <gp.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuCuCu.hxx>
#include <gp.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <math_Matrix.hxx>
#include <Standard_ConstructionError.hxx>
void Geom2dGcc_FunctionTanCuCuCu::
InitDerivative(const math_Vector& X,

View File

@@ -0,0 +1,117 @@
// Created on: 1991-05-13
// Created by: Laurent PAINNOT
// Copyright (c) 1991-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 _Geom2dGcc_FunctionTanCuCuCu_HeaderFile
#define _Geom2dGcc_FunctionTanCuCuCu_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <Geom2dGcc_Type1.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <math_Vector.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Standard_ConstructionError;
class Geom2dAdaptor_Curve;
class gp_Circ2d;
class gp_Lin2d;
class gp_Pnt2d;
class gp_Vec2d;
class math_Matrix;
//! This abstract class describes a set on N Functions of
//! M independant variables.
class Geom2dGcc_FunctionTanCuCuCu : public math_FunctionSetWithDerivatives
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const Geom2dAdaptor_Curve& C1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1, const gp_Circ2d& C2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1, const gp_Lin2d& L2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Lin2d& L1, const gp_Lin2d& L2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Lin2d& L1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& C3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Circ2d& C1, const Geom2dAdaptor_Curve& C2, const gp_Pnt2d& P3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const gp_Lin2d& L1, const Geom2dAdaptor_Curve& C2, const gp_Pnt2d& P3);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuCu(const Geom2dAdaptor_Curve& C1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
Standard_EXPORT void InitDerivative (const math_Vector& X, gp_Pnt2d& Point1, gp_Pnt2d& Point2, gp_Pnt2d& Point3, gp_Vec2d& Tan1, gp_Vec2d& Tan2, gp_Vec2d& Tan3, gp_Vec2d& D21, gp_Vec2d& D22, gp_Vec2d& D23);
//! Returns the number of variables of the function.
Standard_EXPORT Standard_Integer NbVariables() const;
//! Returns the number of equations of the function.
Standard_EXPORT Standard_Integer NbEquations() const;
//! Computes the values of the Functions for the variable <X>.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
//! Returns the values of the derivatives for the variable <X>.
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
//! Returns the values of the functions and the derivatives
//! for the variable <X>.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
protected:
private:
Geom2dAdaptor_Curve Curv1;
Geom2dAdaptor_Curve Curv2;
Geom2dAdaptor_Curve Curv3;
gp_Circ2d Circ1;
gp_Circ2d Circ2;
gp_Lin2d Lin1;
gp_Lin2d Lin2;
Geom2dGcc_Type1 TheType;
};
#endif // _Geom2dGcc_FunctionTanCuCuCu_HeaderFile

View File

@@ -1,156 +0,0 @@
-- Created on: 1991-05-13
-- Created by: Laurent PAINNOT
-- Copyright (c) 1991-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 class FunctionTanCuCuOnCu from Geom2dGcc inherits FunctionSetWithDerivatives from math
---Purpose: This abstract class describes a set on N Functions of
-- M independant variables.
uses Vector from math,
Matrix from math,
Circ2d from gp,
Lin2d from gp,
Pnt2d from gp,
Vec2d from gp,
Type2 from Geom2dGcc,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
raises ConstructionError
is
Create (C1 : Curve from Geom2dAdaptor;
C2 : Curve from Geom2dAdaptor;
OnCi : Circ2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnCi : Circ2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnCi : Circ2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Curve from Geom2dAdaptor;
P2 : Pnt2d from gp ;
OnCi : Circ2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
------------------------------------------------------------------------
Create (C1 : Curve from Geom2dAdaptor;
C2 : Curve from Geom2dAdaptor;
OnLi : Lin2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnLi : Lin2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnLi : Lin2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Curve from Geom2dAdaptor;
P2 : Pnt2d from gp ;
OnLi : Lin2d from gp ;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
-----------------------------------------------------------------------
Create (C1 : Curve from Geom2dAdaptor;
C2 : Curve from Geom2dAdaptor;
OnCu : Curve from Geom2dAdaptor;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Circ2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnCu : Curve from Geom2dAdaptor;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (L1 : Lin2d from gp ;
C2 : Curve from Geom2dAdaptor;
OnCu : Curve from Geom2dAdaptor;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
Create (C1 : Curve from Geom2dAdaptor;
P1 : Pnt2d from gp ;
OnCu : Curve from Geom2dAdaptor;
Rad : Real from Standard )
returns FunctionTanCuCuOnCu from Geom2dGcc;
InitDerivative(me : in out ;
X : Vector from math ;
Point1,Point2,Point3 : out Pnt2d from gp ;
Tan1,Tan2,Tan3,D21,D22,D23 : out Vec2d from gp )
raises ConstructionError
is static;
NbVariables(me) returns Integer;
---Purpose: Returns the number of variables of the function.
NbEquations(me) returns Integer;
---Purpose: Returns the number of equations of the function.
Value(me : in out ;
X : Vector from math;
F : out Vector from math) returns Boolean;
---Purpose: Computes the values of the Functions for the variable <X>.
Derivatives(me : in out ;
X : Vector from math;
D : out Matrix from math) returns Boolean;
---Purpose: Returns the values of the derivatives for the variable <X>.
Values(me : in out ;
X : Vector from math;
F : out Vector from math;
D : out Matrix from math) returns Boolean;
---Purpose: Returns the values of the functions and the derivatives
-- for the variable <X>.
fields
Curv1 : Curve from Geom2dAdaptor;
Curv2 : Curve from Geom2dAdaptor;
Circ1 : Circ2d from gp ;
Lin1 : Lin2d from gp ;
Pnt2 : Pnt2d from gp ;
Circon : Circ2d from gp ;
Linon : Lin2d from gp ;
Curvon : Curve from Geom2dAdaptor;
FirstRad : Real from Standard ;
TheType : Type2 from Geom2dGcc ;
end FunctionTanCuCuOnCu;

View File

@@ -14,12 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanCuCuOnCu.ixx>
#include <Standard_ConstructionError.hxx>
#include <ElCLib.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuCuOnCu.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <math_Matrix.hxx>
#include <Standard_ConstructionError.hxx>
void Geom2dGcc_FunctionTanCuCuOnCu::
InitDerivative(const math_Vector& X,

View File

@@ -0,0 +1,127 @@
// Created on: 1991-05-13
// Created by: Laurent PAINNOT
// Copyright (c) 1991-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 _Geom2dGcc_FunctionTanCuCuOnCu_HeaderFile
#define _Geom2dGcc_FunctionTanCuCuOnCu_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
#include <Geom2dGcc_Type2.hxx>
#include <math_FunctionSetWithDerivatives.hxx>
#include <math_Vector.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Standard_ConstructionError;
class Geom2dAdaptor_Curve;
class gp_Circ2d;
class gp_Lin2d;
class gp_Pnt2d;
class gp_Vec2d;
class math_Matrix;
//! This abstract class describes a set on N Functions of
//! M independant variables.
class Geom2dGcc_FunctionTanCuCuOnCu : public math_FunctionSetWithDerivatives
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const Geom2dAdaptor_Curve& C2, const gp_Circ2d& OnCi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d& C1, const Geom2dAdaptor_Curve& C2, const gp_Circ2d& OnCi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d& L1, const Geom2dAdaptor_Curve& C2, const gp_Circ2d& OnCi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const gp_Pnt2d& P2, const gp_Circ2d& OnCi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const Geom2dAdaptor_Curve& C2, const gp_Lin2d& OnLi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d& C1, const Geom2dAdaptor_Curve& C2, const gp_Lin2d& OnLi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d& L1, const Geom2dAdaptor_Curve& C2, const gp_Lin2d& OnLi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const gp_Pnt2d& P2, const gp_Lin2d& OnLi, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& OnCu, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Circ2d& C1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& OnCu, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const gp_Lin2d& L1, const Geom2dAdaptor_Curve& C2, const Geom2dAdaptor_Curve& OnCu, const Standard_Real Rad);
Standard_EXPORT Geom2dGcc_FunctionTanCuCuOnCu(const Geom2dAdaptor_Curve& C1, const gp_Pnt2d& P1, const Geom2dAdaptor_Curve& OnCu, const Standard_Real Rad);
Standard_EXPORT void InitDerivative (const math_Vector& X, gp_Pnt2d& Point1, gp_Pnt2d& Point2, gp_Pnt2d& Point3, gp_Vec2d& Tan1, gp_Vec2d& Tan2, gp_Vec2d& Tan3, gp_Vec2d& D21, gp_Vec2d& D22, gp_Vec2d& D23);
//! Returns the number of variables of the function.
Standard_EXPORT Standard_Integer NbVariables() const;
//! Returns the number of equations of the function.
Standard_EXPORT Standard_Integer NbEquations() const;
//! Computes the values of the Functions for the variable <X>.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
//! Returns the values of the derivatives for the variable <X>.
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
//! Returns the values of the functions and the derivatives
//! for the variable <X>.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
protected:
private:
Geom2dAdaptor_Curve Curv1;
Geom2dAdaptor_Curve Curv2;
gp_Circ2d Circ1;
gp_Lin2d Lin1;
gp_Pnt2d Pnt2;
gp_Circ2d Circon;
gp_Lin2d Linon;
Geom2dAdaptor_Curve Curvon;
Standard_Real FirstRad;
Geom2dGcc_Type2 TheType;
};
#endif // _Geom2dGcc_FunctionTanCuCuOnCu_HeaderFile

View File

@@ -1,63 +0,0 @@
-- Created on: 1992-02-20
-- Created by: Remy 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 class FunctionTanCuPnt from Geom2dGcc
inherits FunctionWithDerivative from math
---Purpose: This abstract class describes a Function of 1 Variable
-- used to find a line tangent to a curve and passing
-- through a point.
uses
Pnt2d from gp,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
is
Create (C : Curve from Geom2dAdaptor ;
Point : Pnt2d from gp ) returns FunctionTanCuPnt from Geom2dGcc;
Value (me : in out ;
X : Real ;
F : out Real ) returns Boolean;
---Purpose: Computes the value of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Derivative (me : in out ;
X : Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the derivative of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Values (me : in out ;
X : Real ;
F : out Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the value and the derivative of the function F
-- for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
fields
TheCurv : Curve from Geom2dAdaptor;
ThePoint : Pnt2d from gp;
end FunctionTanCuPnt;

View File

@@ -14,14 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanCuPnt.ixx>
#include <gp_Vec2d.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCuPnt.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Pnt.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <gp_Vec2d.hxx>
//=========================================================================
// soit P1 le point sur la courbe Geom2dAdaptor_Curve d abscisse u. +
@@ -38,7 +38,6 @@
// f(u) = -------- - -------------------------------- +
// N.N N*N*N*CP1*CP1*CP1 +
//=========================================================================
Geom2dGcc_FunctionTanCuPnt::
Geom2dGcc_FunctionTanCuPnt(const Geom2dAdaptor_Curve& C ,
const gp_Pnt2d& Point ) {

View File

@@ -0,0 +1,86 @@
// Created on: 1992-02-20
// Created by: Remy 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 _Geom2dGcc_FunctionTanCuPnt_HeaderFile
#define _Geom2dGcc_FunctionTanCuPnt_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Pnt2d.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Geom2dAdaptor_Curve;
class gp_Pnt2d;
//! This abstract class describes a Function of 1 Variable
//! used to find a line tangent to a curve and passing
//! through a point.
class Geom2dGcc_FunctionTanCuPnt : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanCuPnt(const Geom2dAdaptor_Curve& C, const gp_Pnt2d& Point);
//! Computes the value of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! Computes the derivative of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& Deriv);
//! Computes the value and the derivative of the function F
//! for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& Deriv);
protected:
private:
Geom2dAdaptor_Curve TheCurv;
gp_Pnt2d ThePoint;
};
#endif // _Geom2dGcc_FunctionTanCuPnt_HeaderFile

View File

@@ -1,60 +0,0 @@
-- Created on: 1992-01-09
-- 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 class FunctionTanObl from Geom2dGcc inherits FunctionWithDerivative from math
---Purpose: This class describe a function of a single variable.
uses
Dir2d from gp,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc
is
Create (Curve : Curve from Geom2dAdaptor ;
Dir : Dir2d from gp ) returns FunctionTanObl from Geom2dGcc;
Value (me : in out ;
X : Real ;
F : out Real ) returns Boolean;
---Purpose: Computes the value of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Derivative (me : in out ;
X : Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the derivative of the function F for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
Values (me : in out ;
X : Real ;
F : out Real ;
Deriv : out Real ) returns Boolean;
---Purpose: Computes the value and the derivative of the function F
-- for the variable X.
-- It returns True if the computation is successfully done,
-- False otherwise.
fields
TheCurv : Curve from Geom2dAdaptor ;
TheDirection : Dir2d from gp;
end FunctionTanObl;

View File

@@ -14,13 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_FunctionTanObl.ixx>
#include <gp_Vec2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanObl.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
Geom2dGcc_FunctionTanObl::
Geom2dGcc_FunctionTanObl(const Geom2dAdaptor_Curve& C,

View File

@@ -0,0 +1,84 @@
// Created on: 1992-01-09
// 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 _Geom2dGcc_FunctionTanObl_HeaderFile
#define _Geom2dGcc_FunctionTanObl_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <gp_Dir2d.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Geom2dAdaptor_Curve;
class gp_Dir2d;
//! This class describe a function of a single variable.
class Geom2dGcc_FunctionTanObl : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_FunctionTanObl(const Geom2dAdaptor_Curve& Curve, const gp_Dir2d& Dir);
//! Computes the value of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! Computes the derivative of the function F for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& Deriv);
//! Computes the value and the derivative of the function F
//! for the variable X.
//! It returns True if the computation is successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& Deriv);
protected:
private:
Geom2dAdaptor_Curve TheCurv;
gp_Dir2d TheDirection;
};
#endif // _Geom2dGcc_FunctionTanObl_HeaderFile

View File

@@ -0,0 +1,37 @@
// Created on: 1992-06-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 _Geom2dGcc_IsParallel_HeaderFile
#define _Geom2dGcc_IsParallel_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_DomainError.hxx>
class Geom2dGcc_IsParallel;
DEFINE_STANDARD_HANDLE(Geom2dGcc_IsParallel, Standard_DomainError)
#if !defined No_Exception && !defined No_Geom2dGcc_IsParallel
#define Geom2dGcc_IsParallel_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Geom2dGcc_IsParallel::Raise(MESSAGE);
#else
#define Geom2dGcc_IsParallel_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Geom2dGcc_IsParallel, Standard_DomainError)
#endif // _Geom2dGcc_IsParallel_HeaderFile

View File

@@ -1,239 +0,0 @@
-- Created on: 1992-10-20
-- 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 Lin2d2Tan from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d lines tangent to 2 other elements which
-- can be circles, curves or points.
-- More than one argument must be a curve.
-- Describes functions for building a 2D line:
-- - tangential to 2 curves, or
-- - tangential to a curve and passing through a point.
-- A Lin2d2Tan object provides a framework for:
-- - defining the construction of 2D line(s),
-- - implementing the construction algorithm, and
-- - consulting the result(s).
--
-- Note: Some constructors may check the type of the qualified argument
-- and raise BadQualifier Error in case of incorrect couple (qualifier, curv).
-- inherits Entity from Standard
uses Pnt2d from gp,
Lin2d from gp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
QualifiedCurve from Geom2dGcc,
Array1OfPnt2d from TColgp,
Array1OfLin2d from TColgp,
Position from GccEnt,
Array1OfPosition from GccEnt,
Lin2d2TanIter from Geom2dGcc,
Curve from Geom2dAdaptor
raises NotDone from StdFail,
BadQualifier from GccEnt,
OutOfRange from Standard
is
-- Modified by Sergey KHROMOV - Wed Oct 16 11:40:57 2002 Begin
-- Add constructors without initial parameters Param1 and Param2 which
-- calculate all solutions.
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
Tolang : Real from Standard )
returns Lin2d2Tan from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithms used to create 2d
-- line tangent to two curves.
-- Tolang is used to determine the tolerance for the tangency points.
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
ThePoint : Pnt2d from gp ;
Tolang : Real from Standard )
returns Lin2d2Tan from Geom2dGcc
---Purpose: This class implements the algorithms used to create 2d
-- lines passing thrue a point and tangent to a curve.
-- Tolang is used to determine the tolerance for the tangency points.
raises BadQualifier from GccEnt;
-- Modified by Sergey KHROMOV - Wed Oct 16 11:40:57 2002 End
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
Qualified2 : QualifiedCurve from Geom2dGcc ;
Tolang : Real from Standard ;
Param1 : Real from Standard ;
Param2 : Real from Standard )
returns Lin2d2Tan from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithms used to create 2d
-- line tangent to two curves.
-- Tolang is used to determine the tolerance for the tangency points.
-- Param1 is used for the initial guess on the first curve.
-- Param2 is used for the initial guess on the second curve.
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
ThePoint : Pnt2d from gp ;
Tolang : Real from Standard ;
Param1 : Real from Standard )
returns Lin2d2Tan from Geom2dGcc
---Purpose: This class implements the algorithms used to create 2d
-- lines passing thrue a point and tangent to a curve.
-- Tolang is used to determine the tolerance for the tangency points.
-- Param2 is used for the initial guess on the curve.
raises BadQualifier from GccEnt;
--------------------------------------------------------------------------
IsDone (me) returns Boolean from Standard
is static;
---Purpose: Returns true if the construction algorithm does not fail
-- (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has
-- reached its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone from StdFail
is static;
---Purpose: Returns the number of lines, representing solutions computed by this algorithm.
-- Exceptions StdFail_NotDone if the construction fails.R
ThisSolution(me ;
Index : Integer from Standard) returns Lin2d from gp
raises OutOfRange,NotDone
is static;
---Purpose: Returns a line, representing the solution of index Index computed by this algorithm.
-- Warning
-- This indexing simply provides a means of consulting the
-- solutions. The index values are not associated with
-- these solutions outside the context of the algorithm object.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt ;
Qualif2 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: Returns the qualifiers Qualif1 and Qualif2 of the
-- tangency arguments for the solution of index Index
-- computed by this algorithm.
-- The returned qualifiers are:
-- - those specified at the start of construction when the
-- solutions are defined as enclosing or outside with
-- respect to the arguments, or
-- - those computed during construction (i.e. enclosing or
-- outside) when the solutions are defined as unqualified
-- with respect to the arguments, or
-- - GccEnt_noqualifier if the tangency argument is a point.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange,NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on
-- the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency2(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange,NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument curv.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
-- Modified by Sergey KHROMOV - Wed Oct 16 12:04:52 2002 Begin
Add(me: in out; theIndex: Integer from Standard;
theLin : Lin2d2TanIter from Geom2dGcc;
theTol : Real from Standard;
theC1 : Curve from Geom2dAdaptor;
theC2 : Curve from Geom2dAdaptor)
returns Boolean from Standard
is private;
-- Modified by Sergey KHROMOV - Wed Oct 16 12:04:52 2002 End
fields
WellDone : Boolean from Standard;
-- True if the algorithm succeeded.
NbrSol : Integer from Standard;
---Purpose: Number of solutions.
linsol : Array1OfLin2d from TColgp;
---Purpose : The solutions.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
qualifier2 : Array1OfPosition from GccEnt;
-- The qualifiers of the second argument.
pnttg1sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the first argument on
-- the solution.
pnttg2sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the second argument on
-- the solution.
par1sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
par2sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- second argument on the solution.
pararg1 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pararg2 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the second
-- argument on the second argument.
end Lin2d2Tan;

View File

@@ -14,16 +14,22 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Lin2d2Tan.ixx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccAna_Lin2d2Tan.hxx>
#include <Geom2dGcc_Lin2d2TanIter.hxx>
#include <Geom2d_Circle.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_Lin2d2Tan.hxx>
#include <Geom2dGcc_Lin2d2TanIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <StdFail_NotDone.hxx>
// Modified by Sergey KHROMOV - Wed Oct 16 11:44:41 2002 Begin
Geom2dGcc_Lin2d2Tan::

View File

@@ -0,0 +1,182 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Lin2d2Tan_HeaderFile
#define _Geom2dGcc_Lin2d2Tan_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfLin2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class StdFail_NotDone;
class GccEnt_BadQualifier;
class Standard_OutOfRange;
class Geom2dGcc_QualifiedCurve;
class gp_Pnt2d;
class gp_Lin2d;
class Geom2dGcc_Lin2d2TanIter;
class Geom2dAdaptor_Curve;
//! This class implements the algorithms used to
//! create 2d lines tangent to 2 other elements which
//! can be circles, curves or points.
//! More than one argument must be a curve.
//! Describes functions for building a 2D line:
//! - tangential to 2 curves, or
//! - tangential to a curve and passing through a point.
//! A Lin2d2Tan object provides a framework for:
//! - defining the construction of 2D line(s),
//! - implementing the construction algorithm, and
//! - consulting the result(s).
//!
//! Note: Some constructors may check the type of the qualified argument
//! and raise BadQualifier Error in case of incorrect couple (qualifier, curv).
class Geom2dGcc_Lin2d2Tan
{
public:
DEFINE_STANDARD_ALLOC
//! This class implements the algorithms used to create 2d
//! line tangent to two curves.
//! Tolang is used to determine the tolerance for the tangency points.
Standard_EXPORT Geom2dGcc_Lin2d2Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Standard_Real Tolang);
//! This class implements the algorithms used to create 2d
//! lines passing thrue a point and tangent to a curve.
//! Tolang is used to determine the tolerance for the tangency points.
Standard_EXPORT Geom2dGcc_Lin2d2Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const gp_Pnt2d& ThePoint, const Standard_Real Tolang);
//! This class implements the algorithms used to create 2d
//! line tangent to two curves.
//! Tolang is used to determine the tolerance for the tangency points.
//! Param1 is used for the initial guess on the first curve.
//! Param2 is used for the initial guess on the second curve.
Standard_EXPORT Geom2dGcc_Lin2d2Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Standard_Real Tolang, const Standard_Real Param1, const Standard_Real Param2);
//! This class implements the algorithms used to create 2d
//! lines passing thrue a point and tangent to a curve.
//! Tolang is used to determine the tolerance for the tangency points.
//! Param2 is used for the initial guess on the curve.
Standard_EXPORT Geom2dGcc_Lin2d2Tan(const Geom2dGcc_QualifiedCurve& Qualified1, const gp_Pnt2d& ThePoint, const Standard_Real Tolang, const Standard_Real Param1);
//! Returns true if the construction algorithm does not fail
//! (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has
//! reached its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of lines, representing solutions computed by this algorithm.
//! Exceptions StdFail_NotDone if the construction fails.R
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns a line, representing the solution of index Index computed by this algorithm.
//! Warning
//! This indexing simply provides a means of consulting the
//! solutions. The index values are not associated with
//! these solutions outside the context of the algorithm object.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT gp_Lin2d ThisSolution (const Standard_Integer Index) const;
//! Returns the qualifiers Qualif1 and Qualif2 of the
//! tangency arguments for the solution of index Index
//! computed by this algorithm.
//! The returned qualifiers are:
//! - those specified at the start of construction when the
//! solutions are defined as enclosing or outside with
//! respect to the arguments, or
//! - those computed during construction (i.e. enclosing or
//! outside) when the solutions are defined as unqualified
//! with respect to the arguments, or
//! - GccEnt_noqualifier if the tangency argument is a point.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on
//! the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on the argument curv.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
protected:
private:
Standard_EXPORT Standard_Boolean Add (const Standard_Integer theIndex, const Geom2dGcc_Lin2d2TanIter& theLin, const Standard_Real theTol, const Geom2dAdaptor_Curve& theC1, const Geom2dAdaptor_Curve& theC2);
Standard_Boolean WellDone;
Standard_Integer NbrSol;
TColgp_Array1OfLin2d linsol;
GccEnt_Array1OfPosition qualifier1;
GccEnt_Array1OfPosition qualifier2;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pnttg2sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
};
#endif // _Geom2dGcc_Lin2d2Tan_HeaderFile

View File

@@ -1,164 +0,0 @@
-- Created on: 1991-04-24
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Lin2d2TanIter from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d lines tangent to 2 other elements which
-- can be circles, curves or points.
-- More than one argument must be a curve.
--
-- Note: Some constructors may check the type of the qualified argument
-- and raise BadQualifier Error in case of incorrect couple (qualifier,
-- curv).
-- For example: "EnclosedCirc".
uses Pnt2d from gp,
Lin2d from gp,
QualifiedCirc from GccEnt,
Position from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc
raises BadQualifier from GccEnt,
NotDone from StdFail
is
Create (Qualified1 : QCurve from Geom2dGcc ;
ThePoint : Pnt2d ;
Param1 : Real ;
Tolang : Real ) returns Lin2d2TanIter from Geom2dGcc
---Purpose: This class implements the algorithms used to create 2d
-- lines passing thrue a point and tangent to a curve.
-- Tolang is used to determine the tolerance for the
-- tangency points.
-- Param2 is used for the initial guess on the curve.
raises BadQualifier from GccEnt;
Create (Qualified1 : QualifiedCirc ;
Qualified2 : QCurve from Geom2dGcc ;
Param2 : Real ;
Tolang : Real ) returns Lin2d2TanIter from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithms used to create 2d
-- line tangent to a circle and to a cuve.
-- Tolang is used to determine the tolerance for the
-- tangency points.
-- Param2 is used for the initial guess on the curve.
-- Exception BadQualifier is raised in the case of
-- EnclosedCirc
Create (Qualified1 : QCurve from Geom2dGcc ;
Qualified2 : QCurve from Geom2dGcc ;
Param1 : Real ;
Param2 : Real ;
Tolang : Real ) returns Lin2d2TanIter from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithms used to create 2d
-- line tangent to two curves.
-- Tolang is used to determine the tolerance for the
-- tangency points.
-- Param1 is used for the initial guess on the first curve.
-- Param2 is used for the initial guess on the second curve.
--------------------------------------------------------------------------
IsDone (me) returns Boolean
is static;
---Purpose: This methode returns true when there is a solution
-- and false in the other cases.
ThisSolution(me) returns Lin2d
raises NotDone from StdFail
is static;
---Purpose: Returns the solution.
WhichQualifier(me ;
Qualif1 : out Position from GccEnt;
Qualif2 : out Position from GccEnt)
raises NotDone from StdFail
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
raises NotDone from StdFail
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on
-- the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on
-- the argument curv.
Tangency2(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
raises NotDone from StdFail
is static;
-- Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on the solution
-- curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument
-- curv.
fields
WellDone : Boolean;
-- True if the algorithm succeeded.
linsol : Lin2d;
---Purpose : The solutions.
qualifier1 : Position from GccEnt;
-- The qualifiers of the first argument.
qualifier2 : Position from GccEnt;
-- The qualifiers of the first argument.
pnttg1sol : Pnt2d;
-- The tangency point between the solution and the first argument on
-- the solution.
pnttg2sol : Pnt2d;
-- The tangency point between the solution and the second argument on
-- the solution.
par1sol : Real;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
par2sol : Real;
-- The parameter of the tangency point between the solution and the
-- second argument on the solution.
pararg1 : Real;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pararg2 : Real;
-- The parameter of the tangency point between the solution and the second
-- argument on the second argument.
end Lin2d2TanIter;

View File

@@ -18,24 +18,25 @@
// CREATION D UNE LIGNE TANGENTE A DEUX COURBES. +
//========================================================================
#include <Geom2dGcc_Lin2d2TanIter.ixx>
#include <StdFail_NotDone.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <gp_XY.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Circ2d.hxx>
#include <math_Vector.hxx>
#include <math_Matrix.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_FunctionRoot.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanCirCu.hxx>
#include <Geom2dGcc_FunctionTanCuCu.hxx>
#include <Geom2dGcc_FunctionTanCuPnt.hxx>
#include <Geom2dGcc_FunctionTanCirCu.hxx>
#include <Geom2dGcc_Lin2d2TanIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_XY.hxx>
#include <math_FunctionRoot.hxx>
#include <math_FunctionSetRoot.hxx>
#include <math_Matrix.hxx>
#include <math_Vector.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Lin2d2TanIter::
Geom2dGcc_Lin2d2TanIter (const GccEnt_QualifiedCirc& Qualified1 ,

View File

@@ -0,0 +1,129 @@
// Created on: 1991-04-24
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Lin2d2TanIter_HeaderFile
#define _Geom2dGcc_Lin2d2TanIter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Lin2d.hxx>
#include <GccEnt_Position.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_QCurve;
class gp_Pnt2d;
class GccEnt_QualifiedCirc;
class gp_Lin2d;
//! This class implements the algorithms used to
//! create 2d lines tangent to 2 other elements which
//! can be circles, curves or points.
//! More than one argument must be a curve.
//!
//! Note: Some constructors may check the type of the qualified argument
//! and raise BadQualifier Error in case of incorrect couple (qualifier,
//! curv).
//! For example: "EnclosedCirc".
class Geom2dGcc_Lin2d2TanIter
{
public:
DEFINE_STANDARD_ALLOC
//! This class implements the algorithms used to create 2d
//! lines passing thrue a point and tangent to a curve.
//! Tolang is used to determine the tolerance for the
//! tangency points.
//! Param2 is used for the initial guess on the curve.
Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& ThePoint, const Standard_Real Param1, const Standard_Real Tolang);
//! This class implements the algorithms used to create 2d
//! line tangent to a circle and to a cuve.
//! Tolang is used to determine the tolerance for the
//! tangency points.
//! Param2 is used for the initial guess on the curve.
//! Exception BadQualifier is raised in the case of
//! EnclosedCirc
Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param2, const Standard_Real Tolang);
//! This class implements the algorithms used to create 2d
//! line tangent to two curves.
//! Tolang is used to determine the tolerance for the
//! tangency points.
//! Param1 is used for the initial guess on the first curve.
//! Param2 is used for the initial guess on the second curve.
Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolang);
//! This methode returns true when there is a solution
//! and false in the other cases.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the solution.
Standard_EXPORT gp_Lin2d ThisSolution() const;
Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on
//! the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on
//! the argument curv.
Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
protected:
private:
Standard_Boolean WellDone;
gp_Lin2d linsol;
GccEnt_Position qualifier1;
GccEnt_Position qualifier2;
gp_Pnt2d pnttg1sol;
gp_Pnt2d pnttg2sol;
Standard_Real par1sol;
Standard_Real par2sol;
Standard_Real pararg1;
Standard_Real pararg2;
};
#endif // _Geom2dGcc_Lin2d2TanIter_HeaderFile

View File

@@ -1,225 +0,0 @@
-- Created on: 1992-10-20
-- 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 Lin2dTanObl from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d line tangent to a curve QualifiedCurv and
-- doing an angle Angle with a line TheLin.
-- The angle must be in Radian.
-- Describes functions for building a 2D line making a given
-- angle with a line and tangential to a curve.
-- A Lin2dTanObl object provides a framework for:
-- - defining the construction of 2D line(s),
-- - implementing the construction algorithm, and
-- - consulting the result(s).
-- inherits Entity from Standard
uses Lin2d from gp,
Pnt2d from gp,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Array1OfPnt2d from TColgp,
Array1OfLin2d from TColgp,
QualifiedCurve from Geom2dGcc,
Position from GccEnt,
Array1OfPosition from GccEnt,
Curve from Geom2dAdaptor,
Lin2dTanOblIter from Geom2dGcc
raises BadQualifier from GccEnt,
NotDone from StdFail,
IsParallel from Geom2dGcc,
OutOfRange from Standard
is
-- Modified by Sergey KHROMOV - Wed Oct 16 11:40:57 2002 Begin
-- Add constructor without initial parameter Param1 which
-- calculate all solutions.
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
TheLin : Lin2d from gp ;
TolAng : Real from Standard ;
Angle : Real from Standard )
returns Lin2dTanObl from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithm used to
-- create 2d line tangent to a curve and doing an
-- angle Angle with the line TheLin.
-- Angle must be in Radian.
-- Tolang is the angular tolerance.
-- Modified by Sergey KHROMOV - Thu Oct 17 10:34:00 2002 End
Create (Qualified1 : QualifiedCurve from Geom2dGcc ;
TheLin : Lin2d from gp ;
TolAng : Real from Standard ;
Param1 : Real from Standard ;
Angle : Real from Standard )
returns Lin2dTanObl from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithm used to
-- create 2d line tangent to a curve and doing an
-- angle Angle with the line TheLin.
-- Angle must be in Radian.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolang is the angular tolerance.
-- Warning
-- An iterative algorithm is used if Qualified1 is more
-- complex than a line or a circle. In such cases, the
-- algorithm constructs only one solution.
-- Exceptions
-- GccEnt_BadQualifier if a qualifier is inconsistent with
-- the argument it qualifies (for example, enclosed for a circle).
IsDone(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the construction algorithm does not fail
-- (even if it finds no solution).
-- Note: IsDone protects against a failure arising from a
-- more internal intersection algorithm, which has reached its numeric limits.
NbSolutions(me) returns Integer from Standard
raises NotDone from StdFail
is static;
---Purpose: Returns the number of lines, representing solutions computed by this algorithm.
-- Exceptions
-- StdFail_NotDone if the construction fails.
ThisSolution(me ;
Index : Integer from Standard) returns Lin2d from gp
raises OutOfRange,NotDone
is static;
---Purpose: Returns a line, representing the solution of index Index
-- computed by this algorithm.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
WhichQualifier(me ;
Index : Integer from Standard;
Qualif1 : out Position from GccEnt )
raises OutOfRange, NotDone
is static;
---Purpose: Returns the qualifier Qualif1 of the tangency argument
-- for the solution of index Index computed by this algorithm.
-- The returned qualifier is:
-- - that specified at the start of construction when the
-- solutions are defined as enclosing or outside with
-- respect to the argument, or
-- - that computed during construction (i.e. enclosing or
-- outside) when the solutions are defined as unqualified
-- with respect to the argument, or
-- - GccEnt_noqualifier if the tangency argument is a point.
-- Exceptions
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
-- StdFail_NotDone if the construction fails.
Tangency1(me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises OutOfRange,NotDone
is static;
---Purpose: Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point PntSol on
-- the solution curv.
-- ParArg is the intrinsic parameter of the point PntSol on
-- the argument curv.
Intersection2 (me ;
Index : Integer from Standard;
ParSol,ParArg : out Real from Standard;
PntSol : out Pnt2d from gp )
raises NotDone from StdFail, IsParallel from Geom2dGcc, OutOfRange from Standard
is static;
---Purpose: Returns the point of intersection PntSol between the
-- solution of index Index and the second argument (the line) of this algorithm.
-- ParSol is the parameter of the point PntSol on the
-- solution. ParArg is the parameter of the point PntSol on the second argument (the line).
-- Exceptions
-- StdFail_NotDone if the construction fails.
-- Geom2dGcc_IsParallel if the solution and the second
-- argument (the line) are parallel.
-- Standard_OutOfRange if Index is less than zero or
-- greater than the number of solutions computed by this algorithm.
IsParallel2(me) returns Boolean from Standard
raises NotDone from StdFail
is static;
---Purpose: Returns true if the line and the solution are parallel. This
-- is the case when the angle given at the time of
-- construction is equal to 0 or Pi.
-- Exceptions StdFail_NotDone if the construction fails.
-- Modified by Sergey KHROMOV - Wed Oct 16 12:04:52 2002 Begin
Add(me: in out; theIndex: Integer from Standard;
theLin : Lin2dTanOblIter from Geom2dGcc;
theTol : Real from Standard;
theC1 : Curve from Geom2dAdaptor)
returns Boolean from Standard
is private;
-- Modified by Sergey KHROMOV - Wed Oct 16 12:04:52 2002 End
fields
WellDone : Boolean from Standard;
-- True if the algorithm succeeded.
Paral2 : Boolean from Standard;
-- True if the solution is parallel to the second argument (Angle = 0).
NbrSol : Integer from Standard;
---Purpose: number of solutions.
linsol : Array1OfLin2d from TColgp;
---Purpose : The solution.
qualifier1 : Array1OfPosition from GccEnt;
-- The qualifiers of the first argument.
pnttg1sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the first argument on
-- the solution.
pntint2sol : Array1OfPnt2d from TColgp;
-- The tangency point between the solution and the second argument on
-- the solution.
par1sol : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
par2sol : Array1OfReal from TColStd;
-- The parameter of the intersection point between the solution and the
-- second argument on the solution.
pararg1 : Array1OfReal from TColStd;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pararg2 : Array1OfReal from TColStd;
-- The parameter of the intersection point between the solution and
-- the second argument on the second argument.
end Lin2dTanObl;

View File

@@ -14,16 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_Lin2dTanObl.ixx>
#include <Geom2dGcc_QCurve.hxx>
#include <GccAna_Lin2dTanObl.hxx>
#include <Geom2dGcc_Lin2dTanOblIter.hxx>
#include <Geom2d_Circle.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <GccEnt_QualifiedCirc.hxx>
#include <StdFail_NotDone.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_IsParallel.hxx>
#include <Geom2dGcc_Lin2dTanObl.hxx>
#include <Geom2dGcc_Lin2dTanOblIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Lin2dTanObl::
Geom2dGcc_Lin2dTanObl (const Geom2dGcc_QualifiedCurve& Qualified1 ,

View File

@@ -0,0 +1,179 @@
// Created on: 1992-10-20
// 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 _Geom2dGcc_Lin2dTanObl_HeaderFile
#define _Geom2dGcc_Lin2dTanObl_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfLin2d.hxx>
#include <GccEnt_Array1OfPosition.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Standard_Real.hxx>
#include <GccEnt_Position.hxx>
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_IsParallel;
class Standard_OutOfRange;
class Geom2dGcc_QualifiedCurve;
class gp_Lin2d;
class gp_Pnt2d;
class Geom2dGcc_Lin2dTanOblIter;
class Geom2dAdaptor_Curve;
//! This class implements the algorithms used to
//! create 2d line tangent to a curve QualifiedCurv and
//! doing an angle Angle with a line TheLin.
//! The angle must be in Radian.
//! Describes functions for building a 2D line making a given
//! angle with a line and tangential to a curve.
//! A Lin2dTanObl object provides a framework for:
//! - defining the construction of 2D line(s),
//! - implementing the construction algorithm, and
//! - consulting the result(s).
class Geom2dGcc_Lin2dTanObl
{
public:
DEFINE_STANDARD_ALLOC
//! This class implements the algorithm used to
//! create 2d line tangent to a curve and doing an
//! angle Angle with the line TheLin.
//! Angle must be in Radian.
//! Tolang is the angular tolerance.
Standard_EXPORT Geom2dGcc_Lin2dTanObl(const Geom2dGcc_QualifiedCurve& Qualified1, const gp_Lin2d& TheLin, const Standard_Real TolAng, const Standard_Real Angle);
//! This class implements the algorithm used to
//! create 2d line tangent to a curve and doing an
//! angle Angle with the line TheLin.
//! Angle must be in Radian.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolang is the angular tolerance.
//! Warning
//! An iterative algorithm is used if Qualified1 is more
//! complex than a line or a circle. In such cases, the
//! algorithm constructs only one solution.
//! Exceptions
//! GccEnt_BadQualifier if a qualifier is inconsistent with
//! the argument it qualifies (for example, enclosed for a circle).
Standard_EXPORT Geom2dGcc_Lin2dTanObl(const Geom2dGcc_QualifiedCurve& Qualified1, const gp_Lin2d& TheLin, const Standard_Real TolAng, const Standard_Real Param1, const Standard_Real Angle);
//! Returns true if the construction algorithm does not fail
//! (even if it finds no solution).
//! Note: IsDone protects against a failure arising from a
//! more internal intersection algorithm, which has reached its numeric limits.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of lines, representing solutions computed by this algorithm.
//! Exceptions
//! StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Integer NbSolutions() const;
//! Returns a line, representing the solution of index Index
//! computed by this algorithm.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT gp_Lin2d ThisSolution (const Standard_Integer Index) const;
//! Returns the qualifier Qualif1 of the tangency argument
//! for the solution of index Index computed by this algorithm.
//! The returned qualifier is:
//! - that specified at the start of construction when the
//! solutions are defined as enclosing or outside with
//! respect to the argument, or
//! - that computed during construction (i.e. enclosing or
//! outside) when the solutions are defined as unqualified
//! with respect to the argument, or
//! - GccEnt_noqualifier if the tangency argument is a point.
//! Exceptions
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
//! StdFail_NotDone if the construction fails.
Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
//! Returns informations about the tangency point between the
//! result and the first argument.
//! ParSol is the intrinsic parameter of the point PntSol on
//! the solution curv.
//! ParArg is the intrinsic parameter of the point PntSol on
//! the argument curv.
Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns the point of intersection PntSol between the
//! solution of index Index and the second argument (the line) of this algorithm.
//! ParSol is the parameter of the point PntSol on the
//! solution. ParArg is the parameter of the point PntSol on the second argument (the line).
//! Exceptions
//! StdFail_NotDone if the construction fails.
//! Geom2dGcc_IsParallel if the solution and the second
//! argument (the line) are parallel.
//! Standard_OutOfRange if Index is less than zero or
//! greater than the number of solutions computed by this algorithm.
Standard_EXPORT void Intersection2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
//! Returns true if the line and the solution are parallel. This
//! is the case when the angle given at the time of
//! construction is equal to 0 or Pi.
//! Exceptions StdFail_NotDone if the construction fails.
Standard_EXPORT Standard_Boolean IsParallel2() const;
protected:
private:
Standard_EXPORT Standard_Boolean Add (const Standard_Integer theIndex, const Geom2dGcc_Lin2dTanOblIter& theLin, const Standard_Real theTol, const Geom2dAdaptor_Curve& theC1);
Standard_Boolean WellDone;
Standard_Boolean Paral2;
Standard_Integer NbrSol;
TColgp_Array1OfLin2d linsol;
GccEnt_Array1OfPosition qualifier1;
TColgp_Array1OfPnt2d pnttg1sol;
TColgp_Array1OfPnt2d pntint2sol;
TColStd_Array1OfReal par1sol;
TColStd_Array1OfReal par2sol;
TColStd_Array1OfReal pararg1;
TColStd_Array1OfReal pararg2;
};
#endif // _Geom2dGcc_Lin2dTanObl_HeaderFile

View File

@@ -1,136 +0,0 @@
-- Created on: 1991-04-24
-- Created by: Remi GILET
-- Copyright (c) 1991-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 Lin2dTanOblIter from Geom2dGcc
---Purpose: This class implements the algorithms used to
-- create 2d line tangent to a curve QualifiedCurv and
-- doing an angle Angle with a line TheLin.
-- The angle must be in Radian.
uses Lin2d from gp,
Pnt2d from gp,
Position from GccEnt,
Curve from Geom2dAdaptor,
CurveTool from Geom2dGcc,
QCurve from Geom2dGcc
raises BadQualifier from GccEnt,
NotDone from StdFail,
IsParallel from Geom2dGcc
is
Create (Qualified1 : QCurve from Geom2dGcc ;
TheLin : Lin2d ;
Param1 : Real ;
TolAng : Real ;
Angle : Real = 0 ) returns Lin2dTanOblIter from Geom2dGcc
raises BadQualifier from GccEnt;
---Purpose: This class implements the algorithm used to
-- create 2d line tangent to a curve and doing an
-- angle Angle with the line TheLin.
-- Angle must be in Radian.
-- Param2 is the initial guess on the curve QualifiedCurv.
-- Tolang is the angular tolerance.
-- ........................................................................
IsDone(me) returns Boolean
is static;
---Purpose: This method returns true when there is a solution
-- and false in the other cases.
ThisSolution(me) returns Lin2d
raises NotDone from StdFail
is static;
-- Returns the solution.
WhichQualifier(me ;
Qualif1 : out Position from GccEnt)
raises NotDone from StdFail
is static;
-- It returns the informations about the qualifiers of the tangency
-- arguments concerning the solution number Index.
-- It returns the real qualifiers (the qualifiers given to the
-- constructor method in case of enclosed, enclosing and outside
-- and the qualifiers computedin case of unqualified).
Tangency1(me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
raises NotDone from StdFail
is static;
-- Returns informations about the tangency point between the
-- result and the first argument.
-- ParSol is the intrinsic parameter of the point ParSol on the solution
-- curv.
-- ParArg is the intrinsic parameter of the point PntSol on the argument
-- curv.
Intersection2 (me ;
ParSol,ParArg : out Real ;
PntSol : out Pnt2d)
raises NotDone from StdFail, IsParallel from Geom2dGcc
is static;
-- Returns informations about the center (on the curv) of the
-- result and the third argument.
IsParallel2(me) returns Boolean
raises NotDone from StdFail
is static;
-- Returns informations about the center (on the curv) of the
-- result and the third argument.
fields
WellDone : Boolean;
-- True if the algorithm succeeded.
Paral2 : Boolean;
-- True if the solution is parallel to the second argument (Angle = 0).
linsol : Lin2d;
---Purpose : The solution.
qualifier1 : Position from GccEnt;
-- The qualifiers of the first argument.
pnttg1sol : Pnt2d;
-- The tangency point between the solution and the first argument on
-- the solution.
pntint2sol : Pnt2d;
-- The tangency point between the solution and the second argument on
-- the solution.
par1sol : Real;
-- The parameter of the tangency point between the solution and the
-- first argument on the solution.
par2sol : Real;
-- The parameter of the intersection point between the solution and the
-- second argument on the solution.
pararg1 : Real;
-- The parameter of the tangency point between the solution and the first
-- argument on the first argument.
pararg2 : Real;
-- The parameter of the intersection point between the solution and
-- the second argument on the second argument.
end Lin2dTanOblIter;

View File

@@ -18,21 +18,22 @@
// CREATION D UNE LIGNE TANGENTE A UNE COURBE ET PARALLELE A UNE DROITE. +
//========================================================================
#include <Geom2dGcc_Lin2dTanOblIter.ixx>
#include <IntAna2d_AnaIntersection.hxx>
#include <IntAna2d_IntPoint.hxx>
#include <Geom2dGcc_IsParallel.hxx>
#include <StdFail_NotDone.hxx>
#include <GccEnt_BadQualifier.hxx>
#include <math_FunctionRoot.hxx>
#include <gp_XY.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Circ2d.hxx>
#include <Geom2dGcc_CurveTool.hxx>
#include <Geom2dGcc_FunctionTanObl.hxx>
#include <Geom2dGcc_IsParallel.hxx>
#include <Geom2dGcc_Lin2dTanOblIter.hxx>
#include <Geom2dGcc_QCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_XY.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <IntAna2d_IntPoint.hxx>
#include <math_FunctionRoot.hxx>
#include <StdFail_NotDone.hxx>
Geom2dGcc_Lin2dTanOblIter::
Geom2dGcc_Lin2dTanOblIter (const Geom2dGcc_QCurve& Qualified1 ,

View File

@@ -0,0 +1,103 @@
// Created on: 1991-04-24
// Created by: Remi GILET
// Copyright (c) 1991-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 _Geom2dGcc_Lin2dTanOblIter_HeaderFile
#define _Geom2dGcc_Lin2dTanOblIter_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Lin2d.hxx>
#include <GccEnt_Position.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Real.hxx>
class GccEnt_BadQualifier;
class StdFail_NotDone;
class Geom2dGcc_IsParallel;
class Geom2dGcc_QCurve;
class gp_Lin2d;
class gp_Pnt2d;
//! This class implements the algorithms used to
//! create 2d line tangent to a curve QualifiedCurv and
//! doing an angle Angle with a line TheLin.
//! The angle must be in Radian.
class Geom2dGcc_Lin2dTanOblIter
{
public:
DEFINE_STANDARD_ALLOC
//! This class implements the algorithm used to
//! create 2d line tangent to a curve and doing an
//! angle Angle with the line TheLin.
//! Angle must be in Radian.
//! Param2 is the initial guess on the curve QualifiedCurv.
//! Tolang is the angular tolerance.
Standard_EXPORT Geom2dGcc_Lin2dTanOblIter(const Geom2dGcc_QCurve& Qualified1, const gp_Lin2d& TheLin, const Standard_Real Param1, const Standard_Real TolAng, const Standard_Real Angle = 0);
//! This method returns true when there is a solution
//! and false in the other cases.
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT gp_Lin2d ThisSolution() const;
Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1) const;
Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
Standard_EXPORT void Intersection2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
Standard_EXPORT Standard_Boolean IsParallel2() const;
protected:
private:
Standard_Boolean WellDone;
Standard_Boolean Paral2;
gp_Lin2d linsol;
GccEnt_Position qualifier1;
gp_Pnt2d pnttg1sol;
gp_Pnt2d pntint2sol;
Standard_Real par1sol;
Standard_Real par2sol;
Standard_Real pararg1;
Standard_Real pararg2;
};
#endif // _Geom2dGcc_Lin2dTanOblIter_HeaderFile

View File

@@ -1,64 +0,0 @@
-- Created on: 1991-04-15
-- Created by: Philippe DAUTRY
-- Copyright (c) 1991-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 QCurve from Geom2dGcc
---Purpose: Creates a qualified 2d line.
uses Position from GccEnt,
Curve from Geom2dAdaptor
is
Create(Curve : Curve from Geom2dAdaptor;
Qualifier : Position from GccEnt )
returns QCurve from Geom2dGcc;
-- is private;
Qualified(me) returns Curve from Geom2dAdaptor
is static;
Qualifier(me) returns Position from GccEnt
is static;
IsUnqualified(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is unqualified and false in the
-- other cases.
IsEnclosing(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Enclosing the Curv and false in
-- the other cases.
IsEnclosed(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Enclosed in the Curv and false in
-- the other cases.
IsOutside(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Outside the Curv and false in
-- the other cases.
fields
TheQualifier : Position from GccEnt;
TheQualified : Curve from Geom2dAdaptor;
end QCurve;

View File

@@ -12,10 +12,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_QCurve.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_QCurve.hxx>
//#include <Geom2dAdaptor_Curve.hxx>
Geom2dAdaptor_Curve Geom2dGcc_QCurve::
Qualified () const { return TheQualified; }

View File

@@ -0,0 +1,85 @@
// Created on: 1991-04-15
// Created by: Philippe DAUTRY
// Copyright (c) 1991-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 _Geom2dGcc_QCurve_HeaderFile
#define _Geom2dGcc_QCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GccEnt_Position.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Standard_Boolean.hxx>
class Geom2dAdaptor_Curve;
//! Creates a qualified 2d line.
class Geom2dGcc_QCurve
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dGcc_QCurve(const Geom2dAdaptor_Curve& Curve, const GccEnt_Position Qualifier);
Standard_EXPORT Geom2dAdaptor_Curve Qualified() const;
Standard_EXPORT GccEnt_Position Qualifier() const;
//! Returns true if the solution is unqualified and false in the
//! other cases.
Standard_EXPORT Standard_Boolean IsUnqualified() const;
//! Returns true if the solution is Enclosing the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsEnclosing() const;
//! Returns true if the solution is Enclosed in the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsEnclosed() const;
//! Returns true if the solution is Outside the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsOutside() const;
protected:
private:
GccEnt_Position TheQualifier;
Geom2dAdaptor_Curve TheQualified;
};
#endif // _Geom2dGcc_QCurve_HeaderFile

View File

@@ -1,116 +0,0 @@
-- Created on: 1991-04-15
-- Created by: Philippe DAUTRY
-- Copyright (c) 1991-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 QualifiedCurve from Geom2dGcc
---Purpose: Describes functions for building a qualified 2D curve.
-- A qualified 2D curve is a curve with a qualifier which
-- specifies whether the solution of a construction
-- algorithm using the qualified curve (as an argument):
-- - encloses the curve, or
-- - is enclosed by the curve, or
-- - is built so that both the curve and it are external to one another, or
-- - is undefined (all solutions apply).
-- inherits Entity from Standard
uses Position from GccEnt,
Curve from Geom2dAdaptor
-- raises
is
Create(Curve : Curve from Geom2dAdaptor;
Qualifier : Position from GccEnt )
returns QualifiedCurve from Geom2dGcc;
---Purpose: Constructs a qualified curve by assigning the qualifier
-- Qualifier to the curve Curve. Qualifier may be:
-- - GccEnt_enclosing if the solution of a construction
-- algorithm using the qualified curve encloses the curve, or
-- - GccEnt_enclosed if the solution is enclosed by the curve, or
-- - GccEnt_outside if both the solution and the curve
-- are external to one another, or
-- - GccEnt_unqualified if all solutions apply.
-- Note: The interior of a curve is defined as the left-hand
-- side of the curve in relation to its orientation.
-- Warning
-- Curve is an adapted curve, i.e. an object which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The adapted curve is created in the following way:
-- Handle(Geom2d_Curve) mycurve = ... ;
-- Geom2dAdaptor_Curve Curve ( mycurve ) ;
-- The qualified curve is then constructed with this object:
-- GccEnt_Position myQualif = GccEnt_outside ;
-- Geom2dGcc_QualifiedCurve myQCurve ( Curve, myQualif );
-- is private;
Qualified(me) returns Curve from Geom2dAdaptor
is static;
---Purpose: Returns a 2D curve to which the qualifier is assigned.
-- Warning
-- The returned curve is an adapted curve, i.e. an object
-- which is an interface between:
-- - the services provided by a 2D curve from the package Geom2d,
-- - and those required on the curve by a computation algorithm.
-- The Geom2d curve on which the adapted curve is
-- based can be obtained in the following way:
-- myQualifiedCurve = ... ;
-- Geom2dAdaptor_Curve myAdaptedCurve = myQualifiedCurve.Qualified();
-- Handle(Geom2d_Curve) = myAdaptedCurve.Curve();
Qualifier(me) returns Position from GccEnt
is static;
---Purpose: Returns
-- - the qualifier of this qualified curve if it is enclosing,
-- enclosed or outside, or
-- - GccEnt_noqualifier if it is unqualified.
IsUnqualified(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is unqualified and false in the other cases.
IsEnclosing(me) returns Boolean from Standard
is static;
---Purpose: It returns true if the solution is Enclosing the Curv and false in
-- the other cases.
IsEnclosed(me) returns Boolean from Standard
is static;
---Purpose: It returns true if the solution is Enclosed in the Curv and false in
-- the other cases.
IsOutside(me) returns Boolean from Standard
is static;
---Purpose: It returns true if the solution is Outside the Curv and false in
-- the other cases.
fields
TheQualifier : Position from GccEnt;
TheQualified : Curve from Geom2dAdaptor;
-- friends
-- Unqualified(Obj : Curve3) from Geom2dGcc,
-- Enclosing (Obj : Curve3) from Geom2dGcc,
-- Enclosed (Obj : Curve3) from Geom2dGcc,
-- Outside (Obj : Curve3) from Geom2dGcc
end QualifiedCurve;

View File

@@ -12,7 +12,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dGcc_QualifiedCurve.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dGcc_QualifiedCurve.hxx>
Geom2dGcc_QualifiedCurve::
Geom2dGcc_QualifiedCurve (const Geom2dAdaptor_Curve& Curve ,

View File

@@ -0,0 +1,127 @@
// Created on: 1991-04-15
// Created by: Philippe DAUTRY
// Copyright (c) 1991-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 _Geom2dGcc_QualifiedCurve_HeaderFile
#define _Geom2dGcc_QualifiedCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GccEnt_Position.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Standard_Boolean.hxx>
class Geom2dAdaptor_Curve;
//! Describes functions for building a qualified 2D curve.
//! A qualified 2D curve is a curve with a qualifier which
//! specifies whether the solution of a construction
//! algorithm using the qualified curve (as an argument):
//! - encloses the curve, or
//! - is enclosed by the curve, or
//! - is built so that both the curve and it are external to one another, or
//! - is undefined (all solutions apply).
class Geom2dGcc_QualifiedCurve
{
public:
DEFINE_STANDARD_ALLOC
//! Constructs a qualified curve by assigning the qualifier
//! Qualifier to the curve Curve. Qualifier may be:
//! - GccEnt_enclosing if the solution of a construction
//! algorithm using the qualified curve encloses the curve, or
//! - GccEnt_enclosed if the solution is enclosed by the curve, or
//! - GccEnt_outside if both the solution and the curve
//! are external to one another, or
//! - GccEnt_unqualified if all solutions apply.
//! Note: The interior of a curve is defined as the left-hand
//! side of the curve in relation to its orientation.
//! Warning
//! Curve is an adapted curve, i.e. an object which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The adapted curve is created in the following way:
//! Handle(Geom2d_Curve) mycurve = ... ;
//! Geom2dAdaptor_Curve Curve ( mycurve ) ;
//! The qualified curve is then constructed with this object:
//! GccEnt_Position myQualif = GccEnt_outside ;
//! Geom2dGcc_QualifiedCurve myQCurve ( Curve, myQualif );
//! is private;
Standard_EXPORT Geom2dGcc_QualifiedCurve(const Geom2dAdaptor_Curve& Curve, const GccEnt_Position Qualifier);
//! Returns a 2D curve to which the qualifier is assigned.
//! Warning
//! The returned curve is an adapted curve, i.e. an object
//! which is an interface between:
//! - the services provided by a 2D curve from the package Geom2d,
//! - and those required on the curve by a computation algorithm.
//! The Geom2d curve on which the adapted curve is
//! based can be obtained in the following way:
//! myQualifiedCurve = ... ;
//! Geom2dAdaptor_Curve myAdaptedCurve = myQualifiedCurve.Qualified();
//! Handle(Geom2d_Curve) = myAdaptedCurve.Curve();
Standard_EXPORT Geom2dAdaptor_Curve Qualified() const;
//! Returns
//! - the qualifier of this qualified curve if it is enclosing,
//! enclosed or outside, or
//! - GccEnt_noqualifier if it is unqualified.
Standard_EXPORT GccEnt_Position Qualifier() const;
//! Returns true if the solution is unqualified and false in the other cases.
Standard_EXPORT Standard_Boolean IsUnqualified() const;
//! It returns true if the solution is Enclosing the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsEnclosing() const;
//! It returns true if the solution is Enclosed in the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsEnclosed() const;
//! It returns true if the solution is Outside the Curv and false in
//! the other cases.
Standard_EXPORT Standard_Boolean IsOutside() const;
protected:
private:
GccEnt_Position TheQualifier;
Geom2dAdaptor_Curve TheQualified;
};
#endif // _Geom2dGcc_QualifiedCurve_HeaderFile

View File

@@ -0,0 +1,31 @@
// Created on: 1992-06-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 _Geom2dGcc_Type1_HeaderFile
#define _Geom2dGcc_Type1_HeaderFile
enum Geom2dGcc_Type1
{
Geom2dGcc_CuCuCu,
Geom2dGcc_CiCuCu,
Geom2dGcc_CiCiCu,
Geom2dGcc_CiLiCu,
Geom2dGcc_LiLiCu,
Geom2dGcc_LiCuCu
};
#endif // _Geom2dGcc_Type1_HeaderFile

View File

@@ -0,0 +1,37 @@
// Created on: 1992-06-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 _Geom2dGcc_Type2_HeaderFile
#define _Geom2dGcc_Type2_HeaderFile
enum Geom2dGcc_Type2
{
Geom2dGcc_CuCuOnCu,
Geom2dGcc_CiCuOnCu,
Geom2dGcc_LiCuOnCu,
Geom2dGcc_CuPtOnCu,
Geom2dGcc_CuCuOnLi,
Geom2dGcc_CiCuOnLi,
Geom2dGcc_LiCuOnLi,
Geom2dGcc_CuPtOnLi,
Geom2dGcc_CuCuOnCi,
Geom2dGcc_CiCuOnCi,
Geom2dGcc_LiCuOnCi,
Geom2dGcc_CuPtOnCi
};
#endif // _Geom2dGcc_Type2_HeaderFile

View File

@@ -0,0 +1,27 @@
// Created on: 1992-06-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 _Geom2dGcc_Type3_HeaderFile
#define _Geom2dGcc_Type3_HeaderFile
enum Geom2dGcc_Type3
{
Geom2dGcc_CuCu,
Geom2dGcc_CiCu
};
#endif // _Geom2dGcc_Type3_HeaderFile