mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,7 +1,31 @@
|
||||
IntCurve_IntConicConic_Tool.cxx
|
||||
IntCurve_DistBetweenPCurvesGen.gxx
|
||||
IntCurve_ExactIntersectionPoint.gxx
|
||||
IntCurve_IConicTool.cxx
|
||||
IntCurve_IConicTool.hxx
|
||||
IntCurve_IntConicConic.cxx
|
||||
IntCurve_IntConicConic.hxx
|
||||
IntCurve_IntConicConic.lxx
|
||||
IntCurve_IntConicConic_1.cxx
|
||||
IntCurve_IntConicConic_Tool.cxx
|
||||
IntCurve_IntConicConic_Tool.cxx
|
||||
IntCurve_IntConicConic_Tool.cxx
|
||||
IntCurve_IntConicConic_1.hxx
|
||||
IntCurve_IntConicConic_Tool.cxx
|
||||
IntCurve_IntConicConic_Tool.hxx
|
||||
IntCurve_IntConicCurveGen.gxx
|
||||
IntCurve_IntConicCurveGen.lxx
|
||||
IntCurve_IntCurveCurveGen.gxx
|
||||
IntCurve_IntCurveCurveGen.lxx
|
||||
IntCurve_IntImpConicParConic.hxx
|
||||
IntCurve_IntImpConicParConic_0.cxx
|
||||
IntCurve_IntPolyPolyGen.gxx
|
||||
IntCurve_MyImpParToolOfIntImpConicParConic.hxx
|
||||
IntCurve_MyImpParToolOfIntImpConicParConic_0.cxx
|
||||
IntCurve_PConic.cxx
|
||||
IntCurve_PConic.hxx
|
||||
IntCurve_PConic.lxx
|
||||
IntCurve_PConicTool.cxx
|
||||
IntCurve_PConicTool.hxx
|
||||
IntCurve_Polygon2dGen.gxx
|
||||
IntCurve_Polygon2dGen.lxx
|
||||
IntCurve_ProjectOnPConicTool.cxx
|
||||
IntCurve_ProjectOnPConicTool.hxx
|
||||
IntCurve_ProjPCurGen.gxx
|
||||
IntCurve_UserIntConicCurveGen.gxx
|
||||
|
@@ -1,109 +0,0 @@
|
||||
-- Created on: 1992-03-04
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 IntCurve
|
||||
|
||||
---Purpose: This package provides algorithmes to intersect 2D curves,
|
||||
-- with domains.
|
||||
--
|
||||
-- class IntConicConic : Algorithm used to intersect 2 conics
|
||||
-- from gp with domains.
|
||||
--
|
||||
-- class IntConicCurveGen : Generic algorithm used to intersect
|
||||
-- a conic from gp, and a parametrised
|
||||
-- curve.
|
||||
-- The parametrised Curve can
|
||||
-- not be a Composite curve and
|
||||
-- can not be a conic.
|
||||
--
|
||||
-- class IntCurveCurveGen : Generic algorithm used to intersect 2
|
||||
-- curves. The resources on a curve are
|
||||
-- discribed in the class CurveTool.
|
||||
--
|
||||
-- class UserIntConicCurveGen: Generic algorithm used to
|
||||
-- intersect a Conic from gp
|
||||
-- and a parametrised curve.
|
||||
-- This curve can be either a
|
||||
-- composite curve or a conic.
|
||||
--
|
||||
|
||||
|
||||
---Level: Advanced
|
||||
--
|
||||
-- The Classes <PConicTool,
|
||||
-- IConicTool,
|
||||
-- PConic,
|
||||
-- ProjectOnPConicTool,
|
||||
-- IntConicCurveGen,
|
||||
-- ProjPCurGen,
|
||||
-- UserIntConicCurveGen,
|
||||
-- IntPolyPolyGen,
|
||||
-- Polygon2dGen,
|
||||
-- DistBetweenPCurvesGen> are Internal
|
||||
--
|
||||
-- The Classe <IntCurveCurveGen> is Advanced
|
||||
--
|
||||
--
|
||||
|
||||
|
||||
|
||||
uses Standard , math, gp, TColgp, GeomAbs,
|
||||
IntImpParGen, IntRes2d, Extrema,
|
||||
StdFail, Bnd, Intf, TColStd
|
||||
|
||||
|
||||
is
|
||||
|
||||
class IntConicConic;
|
||||
|
||||
generic class DistBetweenPCurvesGen;
|
||||
|
||||
generic class Polygon2dGen;
|
||||
|
||||
generic class IntPolyPolyGen,ThePolygon2d,
|
||||
TheDistBetweenPCurves,
|
||||
ExactIntersectionPoint;
|
||||
|
||||
generic class UserIntConicCurveGen;
|
||||
|
||||
generic class ProjPCurGen,TheCurveLocator,TheLocateExtPC;
|
||||
|
||||
generic class IntConicCurveGen,TheIntersector;
|
||||
|
||||
generic class IntCurveCurveGen,TheProjPCur,
|
||||
TheIntConicCurve,
|
||||
IntConicCurve,
|
||||
TheIntPCurvePCurve;
|
||||
|
||||
private class ProjectOnPConicTool;
|
||||
|
||||
class PConic;
|
||||
|
||||
class IConicTool;
|
||||
|
||||
private class PConicTool;
|
||||
|
||||
private class IntImpConicParConic
|
||||
instantiates Intersector from IntImpParGen
|
||||
(IConicTool from IntCurve,
|
||||
PConic from IntCurve,
|
||||
PConicTool from IntCurve,
|
||||
ProjectOnPConicTool from IntCurve);
|
||||
|
||||
|
||||
|
||||
end IntCurve;
|
||||
|
@@ -1,110 +0,0 @@
|
||||
-- Created on: 1992-10-21
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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.
|
||||
|
||||
generic class DistBetweenPCurvesGen from IntCurve (
|
||||
TheCurve as any;
|
||||
TheCurveTool as any) -- as CurveTool from IntCurve(TheCurve)
|
||||
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
|
||||
---Purpose: provides a set of 2 function of 2 variables.
|
||||
-- f1(u,v) = X1(u) - X2(v)
|
||||
-- f2(u,v) = Y1(u) - Y2(v)
|
||||
-- where (X1(u),Y1(u)) = ParamCurve1.Value(u)
|
||||
-- and (X2(v),Y2(v)) = ParamCurve2.Value(v)
|
||||
--
|
||||
-- The Jacobian Matrix is :
|
||||
--
|
||||
-- | df1 df1 | | T1x(u) - T2x(v) |
|
||||
-- | --- --- | = | |
|
||||
-- | du dv | | T1y(u) - T2y(v) |
|
||||
-- | |
|
||||
-- | |
|
||||
-- | df2 df2 |
|
||||
-- | --- --- |
|
||||
-- | du dv |
|
||||
--
|
||||
-- where T1(u) = (T1x(u),T1y(u)) is the tangent vector at
|
||||
-- the curve1 at the parameter u.
|
||||
-- and
|
||||
-- T2(u) = (T2x(u),T2y(u)) is the tangent vector at
|
||||
-- the curve2 at the parameter u.
|
||||
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math
|
||||
|
||||
is
|
||||
|
||||
Create(curve1: TheCurve;
|
||||
curve2: TheCurve)
|
||||
|
||||
returns DistBetweenPCurvesGen;
|
||||
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: returns 2.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns 2.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is static;
|
||||
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is static;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
thecurve1 : Address from Standard; --- TheCurve;
|
||||
thecurve2 : Address from Standard; --- TheCurve;
|
||||
|
||||
|
||||
end DistBetweenPCurvesGen;
|
||||
|
||||
|
@@ -1,109 +0,0 @@
|
||||
-- Created on: 1992-03-26
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 IConicTool from IntCurve
|
||||
|
||||
---Purpose: Implementation of the ImpTool from IntImpParGen
|
||||
-- for conics of gp.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses
|
||||
Pnt2d from gp,
|
||||
Vec2d from gp,
|
||||
Ax22d from gp,
|
||||
Lin2d from gp,
|
||||
Elips2d from gp,
|
||||
Circ2d from gp,
|
||||
Parab2d from gp,
|
||||
Hypr2d from gp,
|
||||
Trsf2d from gp,
|
||||
CurveType from GeomAbs
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create returns IConicTool from IntCurve;
|
||||
|
||||
Create(IT: IConicTool from IntCurve) returns IConicTool from IntCurve;
|
||||
|
||||
Create(E: Elips2d from gp) returns IConicTool from IntCurve;
|
||||
|
||||
Create(L: Lin2d from gp) returns IConicTool from IntCurve;
|
||||
|
||||
Create(C: Circ2d from gp) returns IConicTool from IntCurve;
|
||||
|
||||
Create(P: Parab2d from gp) returns IConicTool from IntCurve;
|
||||
|
||||
Create(H: Hypr2d from gp) returns IConicTool from IntCurve;
|
||||
|
||||
|
||||
|
||||
Value (me; X: Real from Standard)
|
||||
|
||||
returns Pnt2d from gp
|
||||
is static;
|
||||
|
||||
|
||||
D1 (me; U: Real from Standard ; P: out Pnt2d; T: out Vec2d)
|
||||
is static;
|
||||
|
||||
|
||||
D2 (me; U: Real from Standard ; P: out Pnt2d; T,N: out Vec2d)
|
||||
is static;
|
||||
|
||||
|
||||
Distance(me; P: Pnt2d)
|
||||
---Purpose: Computes the value of the signed distance between
|
||||
-- the point P and the implicit curve.
|
||||
returns Real from Standard
|
||||
is static;
|
||||
|
||||
|
||||
GradDistance(me; P: Pnt2d)
|
||||
---Purpose: Computes the Gradient of the Signed Distance
|
||||
-- between a point and the implicit curve, at the
|
||||
-- point P.
|
||||
returns Vec2d from gp
|
||||
is static;
|
||||
|
||||
|
||||
FindParameter(me; P: Pnt2d)
|
||||
---Purpose: Returns the parameter U of the point on the
|
||||
-- implicit curve corresponding to the point P. The
|
||||
-- correspondance between P and the point P(U) on the
|
||||
-- implicit curve must be coherent with the way of
|
||||
-- determination of the signed distance.
|
||||
returns Real from Standard
|
||||
is static;
|
||||
|
||||
fields
|
||||
prm1 : Real from Standard;
|
||||
prm2 : Real from Standard;
|
||||
prm3 : Real from Standard;
|
||||
Axis : Ax22d from gp;
|
||||
type : CurveType from GeomAbs;
|
||||
Abs_To_Object : Trsf2d from gp;
|
||||
|
||||
end IConicTool;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -12,10 +12,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntCurve_IConicTool.ixx>
|
||||
|
||||
#include <ElCLib.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_Vec2d.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
|
||||
#define Object_To_Abs Abs_To_Object.Inverted()
|
||||
//======================================================================
|
||||
|
111
src/IntCurve/IntCurve_IConicTool.hxx
Normal file
111
src/IntCurve/IntCurve_IConicTool.hxx
Normal file
@@ -0,0 +1,111 @@
|
||||
// Created on: 1992-03-26
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_IConicTool_HeaderFile
|
||||
#define _IntCurve_IConicTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <gp_Trsf2d.hxx>
|
||||
class gp_Elips2d;
|
||||
class gp_Lin2d;
|
||||
class gp_Circ2d;
|
||||
class gp_Parab2d;
|
||||
class gp_Hypr2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
||||
//! Implementation of the ImpTool from IntImpParGen
|
||||
//! for conics of gp.
|
||||
class IntCurve_IConicTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool();
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const IntCurve_IConicTool& IT);
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const gp_Elips2d& E);
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const gp_Lin2d& L);
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const gp_Circ2d& C);
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const gp_Parab2d& P);
|
||||
|
||||
Standard_EXPORT IntCurve_IConicTool(const gp_Hypr2d& H);
|
||||
|
||||
Standard_EXPORT gp_Pnt2d Value (const Standard_Real X) const;
|
||||
|
||||
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T) const;
|
||||
|
||||
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, gp_Vec2d& N) const;
|
||||
|
||||
//! Computes the value of the signed distance between
|
||||
//! the point P and the implicit curve.
|
||||
Standard_EXPORT Standard_Real Distance (const gp_Pnt2d& P) const;
|
||||
|
||||
//! Computes the Gradient of the Signed Distance
|
||||
//! between a point and the implicit curve, at the
|
||||
//! point P.
|
||||
Standard_EXPORT gp_Vec2d GradDistance (const gp_Pnt2d& P) const;
|
||||
|
||||
//! Returns the parameter U of the point on the
|
||||
//! implicit curve corresponding to the point P. The
|
||||
//! correspondance between P and the point P(U) on the
|
||||
//! implicit curve must be coherent with the way of
|
||||
//! determination of the signed distance.
|
||||
Standard_EXPORT Standard_Real FindParameter (const gp_Pnt2d& P) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Real prm1;
|
||||
Standard_Real prm2;
|
||||
Standard_Real prm3;
|
||||
gp_Ax22d Axis;
|
||||
GeomAbs_CurveType type;
|
||||
gp_Trsf2d Abs_To_Object;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_IConicTool_HeaderFile
|
@@ -1,400 +0,0 @@
|
||||
-- Created on: 1992-04-27
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 IntConicConic from IntCurve
|
||||
|
||||
---Purpose: Provides methods to intersect two conics.
|
||||
-- The exception ConstructionError is raised in constructors
|
||||
-- or in Perform methods when a domain (Domain from IntRes2d)
|
||||
-- is not correct, i-e when a Circle (Circ2d from gp) or
|
||||
-- an Ellipse (i-e Elips2d from gp) do not have a closed
|
||||
-- domain (use the SetEquivalentParameters method for a domain
|
||||
-- on a circle or an ellipse).
|
||||
|
||||
|
||||
inherits Intersection from IntRes2d
|
||||
|
||||
uses Lin2d from gp,
|
||||
Elips2d from gp,
|
||||
Circ2d from gp,
|
||||
Parab2d from gp,
|
||||
Hypr2d from gp,
|
||||
PConic from IntCurve,
|
||||
IConicTool from IntCurve,
|
||||
Domain from IntRes2d,
|
||||
IntImpConicParConic from IntCurve
|
||||
|
||||
|
||||
|
||||
raises ConstructionError from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Empty Constructor
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Create(L1: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
L2: Lin2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 lines from gp.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
|
||||
Perform(me: in out;L1: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
L2: Lin2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 lines from gp.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Create(L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and a circle.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a circle.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and an ellipse.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and an ellipse.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and a parabola from gp.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out; L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and a parabola from gp.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Create(L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and an hyperbola.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;L: Lin2d from gp; DL: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a line and an hyperbola.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Create(C1: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
C2: Circ2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 circles from gp.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of one of the domain returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;C1: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
C2: Circ2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 circles from gp.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of one of the circle returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and an ellipse.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of one the domain returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out; C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and an ellipse.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of one the domain returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and a parabola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out; C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and a parabola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and an hyperbola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;C: Circ2d from gp; DC: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a circle and an hyperbola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the circle returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(E1: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
E2: Elips2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 ellipses.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of one of the domain returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;E1: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
E2: Elips2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 ellipses.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of one of the domain returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between an ellipse and a parabola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out; E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between an ellipse and a parabola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between an ellipse and an hyperbola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
returns IntConicConic from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;E: Elips2d from gp; DE: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between an ellipse and an hyperbola.
|
||||
-- The exception ConstructionError is raised if the method
|
||||
-- IsClosed of the domain of the ellipse returns False.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Create(P1: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
P2: Parab2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 parabolas.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;P1: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
P2: Parab2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 parabolas.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Create(P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a parabola and an hyperbola.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;P: Parab2d from gp; DP: Domain from IntRes2d;
|
||||
H: Hypr2d from gp; DH: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between a parabola and an hyperbola.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Create(H1: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
H2: Hypr2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 hyperbolas.
|
||||
|
||||
returns IntConicConic from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Perform(me: in out;H1: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
H2: Hypr2d from gp; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard )
|
||||
|
||||
---Purpose: Intersection between 2 hyperbolas.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
Inter : IntImpConicParConic from IntCurve;
|
||||
|
||||
end IntConicConic;
|
||||
|
@@ -16,21 +16,24 @@
|
||||
|
||||
// Modified: OFV Thu Nov 6 17:03:52 2003
|
||||
|
||||
|
||||
#include <IntCurve_IntConicConic.ixx>
|
||||
#include <IntCurve_IntConicConic_1.hxx>
|
||||
#include <ElCLib.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 <IntAna2d_AnaIntersection.hxx>
|
||||
#include <IntAna2d_Conic.hxx>
|
||||
#include <IntAna2d_IntPoint.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <IntCurve_IntConicConic.hxx>
|
||||
#include <IntCurve_IntConicConic_1.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
#include <IntAna2d_AnaIntersection.hxx>
|
||||
#include <IntAna2d_IntPoint.hxx>
|
||||
#include <IntAna2d_Conic.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
|
||||
//=======================================================================
|
||||
// Perform() for
|
||||
// Line - Parabola
|
||||
@@ -46,7 +49,6 @@
|
||||
// Elipse - Hyperbola
|
||||
// Hyperbola - Hyperbola
|
||||
//=======================================================================
|
||||
|
||||
static const Standard_Real PARAM_MAX_ON_PARABOLA = 100000000.0;
|
||||
static const Standard_Real PARAM_MAX_ON_HYPERBOLA = 10000.0;
|
||||
static const Standard_Real TOL_EXACT_INTER = 1.e-7;
|
||||
|
204
src/IntCurve/IntCurve_IntConicConic.hxx
Normal file
204
src/IntCurve/IntCurve_IntConicConic.hxx
Normal file
@@ -0,0 +1,204 @@
|
||||
// Created on: 1992-04-27
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_IntConicConic_HeaderFile
|
||||
#define _IntCurve_IntConicConic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IntCurve_IntImpConicParConic.hxx>
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class gp_Lin2d;
|
||||
class IntRes2d_Domain;
|
||||
class gp_Circ2d;
|
||||
class gp_Elips2d;
|
||||
class gp_Parab2d;
|
||||
class gp_Hypr2d;
|
||||
|
||||
|
||||
//! Provides methods to intersect two conics.
|
||||
//! The exception ConstructionError is raised in constructors
|
||||
//! or in Perform methods when a domain (Domain from IntRes2d)
|
||||
//! is not correct, i-e when a Circle (Circ2d from gp) or
|
||||
//! an Ellipse (i-e Elips2d from gp) do not have a closed
|
||||
//! domain (use the SetEquivalentParameters method for a domain
|
||||
//! on a circle or an ellipse).
|
||||
class IntCurve_IntConicConic : public IntRes2d_Intersection
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty Constructor
|
||||
IntCurve_IntConicConic();
|
||||
|
||||
//! Intersection between 2 lines from gp.
|
||||
IntCurve_IntConicConic(const gp_Lin2d& L1, const IntRes2d_Domain& D1, const gp_Lin2d& L2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 lines from gp.
|
||||
Standard_EXPORT void Perform (const gp_Lin2d& L1, const IntRes2d_Domain& D1, const gp_Lin2d& L2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and a circle.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Circ2d& C, const IntRes2d_Domain& DC, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and a circle.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Circ2d& C, const IntRes2d_Domain& DC, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and an ellipse.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and an ellipse.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and a parabola from gp.
|
||||
IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and a parabola from gp.
|
||||
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and an hyperbola.
|
||||
IntCurve_IntConicConic(const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a line and an hyperbola.
|
||||
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& DL, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 circles from gp.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of one of the domain returns False.
|
||||
IntCurve_IntConicConic(const gp_Circ2d& C1, const IntRes2d_Domain& D1, const gp_Circ2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 circles from gp.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of one of the circle returns False.
|
||||
Standard_EXPORT void Perform (const gp_Circ2d& C1, const IntRes2d_Domain& D1, const gp_Circ2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and an ellipse.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of one the domain returns False.
|
||||
IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and an ellipse.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of one the domain returns False.
|
||||
Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Elips2d& E, const IntRes2d_Domain& DE, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and a parabola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and a parabola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and an hyperbola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
IntCurve_IntConicConic(const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a circle and an hyperbola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the circle returns False.
|
||||
Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& DC, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 ellipses.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of one of the domain returns False.
|
||||
IntCurve_IntConicConic(const gp_Elips2d& E1, const IntRes2d_Domain& D1, const gp_Elips2d& E2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 ellipses.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of one of the domain returns False.
|
||||
Standard_EXPORT void Perform (const gp_Elips2d& E1, const IntRes2d_Domain& D1, const gp_Elips2d& E2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between an ellipse and a parabola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
IntCurve_IntConicConic(const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between an ellipse and a parabola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Parab2d& P, const IntRes2d_Domain& DP, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between an ellipse and an hyperbola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
IntCurve_IntConicConic(const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between an ellipse and an hyperbola.
|
||||
//! The exception ConstructionError is raised if the method
|
||||
//! IsClosed of the domain of the ellipse returns False.
|
||||
Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& DE, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 parabolas.
|
||||
IntCurve_IntConicConic(const gp_Parab2d& P1, const IntRes2d_Domain& D1, const gp_Parab2d& P2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 parabolas.
|
||||
Standard_EXPORT void Perform (const gp_Parab2d& P1, const IntRes2d_Domain& D1, const gp_Parab2d& P2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a parabola and an hyperbola.
|
||||
IntCurve_IntConicConic(const gp_Parab2d& P, const IntRes2d_Domain& DP, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between a parabola and an hyperbola.
|
||||
Standard_EXPORT void Perform (const gp_Parab2d& P, const IntRes2d_Domain& DP, const gp_Hypr2d& H, const IntRes2d_Domain& DH, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 hyperbolas.
|
||||
IntCurve_IntConicConic(const gp_Hypr2d& H1, const IntRes2d_Domain& D1, const gp_Hypr2d& H2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
//! Intersection between 2 hyperbolas.
|
||||
Standard_EXPORT void Perform (const gp_Hypr2d& H1, const IntRes2d_Domain& D1, const gp_Hypr2d& H2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
IntCurve_IntImpConicParConic Inter;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntCurve_IntConicConic.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_IntConicConic_HeaderFile
|
@@ -16,24 +16,27 @@
|
||||
|
||||
// a modifier le cas de 2 points confondus ( Insert a la place d'append ? )
|
||||
|
||||
#include <IntCurve_IntConicConic.jxx>
|
||||
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <IntCurve_IntConicConic_Tool.hxx>
|
||||
#include <IntImpParGen.hxx>
|
||||
#include <IntCurve_IntConicConic_1.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <IntRes2d_IntersectionSegment.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_Vec2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <IntCurve_IntConicConic.hxx>
|
||||
#include <IntCurve_IntConicConic_1.hxx>
|
||||
#include <IntCurve_IntConicConic_Tool.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntImpParGen.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <IntRes2d_IntersectionSegment.hxx>
|
||||
#include <IntRes2d_TypeTrans.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
Standard_Boolean Affichage=Standard_False;
|
||||
Standard_Boolean AffichageGraph=Standard_True;
|
||||
|
@@ -1,183 +0,0 @@
|
||||
-- Created on: 1992-05-21
|
||||
-- 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.
|
||||
|
||||
generic class IntConicCurveGen from IntCurve (
|
||||
TheImpTool as any; -- as ImpTool from IntImpParGen
|
||||
ThePCurve as any;
|
||||
ThePCurveTool as any; -- as ParTool from IntImpParGen(ThePCurve)
|
||||
TheProjPCur as any) -- as ProjPCurGen(TheCurve,TheCurveTool)
|
||||
|
||||
inherits Intersection from IntRes2d
|
||||
|
||||
|
||||
---Purpose: Generic algorithm to intersect a conic from gp and
|
||||
-- a bounded parametric curve. This class uses the class
|
||||
-- IConicTool from IntCurve, and Domain from
|
||||
-- IntCurve. The template class for the PCurveTool
|
||||
-- is given in the package IntImpParGen (ParTool).
|
||||
-- The methods used to know the result of the
|
||||
-- intersection are inherited from the class
|
||||
-- Intersection from IntRes2d.
|
||||
--
|
||||
-- This algorithm is called from the IntCurveCurveGen
|
||||
-- class.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses IConicTool from IntCurve,
|
||||
Lin2d from gp,
|
||||
Circ2d from gp,
|
||||
Elips2d from gp,
|
||||
Parab2d from gp,
|
||||
Hypr2d from gp,
|
||||
Domain from IntRes2d
|
||||
|
||||
|
||||
|
||||
class TheIntersector instantiates Intersector from IntImpParGen(
|
||||
TheImpTool,
|
||||
ThePCurve,
|
||||
ThePCurveTool,
|
||||
TheProjPCur);
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Create (L: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
---C++:inline
|
||||
|
||||
|
||||
Create (C: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
|
||||
|
||||
|
||||
Create (E: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between an ellipse and a parametric curve.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
|
||||
|
||||
|
||||
Create (Prb: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a parabola and a parametric curve.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
|
||||
|
||||
|
||||
Create (H: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between the main branch of an hyperbola
|
||||
-- and a parametric curve.
|
||||
|
||||
returns IntConicCurveGen from IntCurve;
|
||||
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
L: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
---C++:inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
C: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
---C++:inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
E: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---C++: inline
|
||||
---Purpose: Intersection between an ellipse and a parametric curve.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
Prb: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---C++: inline
|
||||
---Purpose: Intersection between a parabola and a parametric curve.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
H: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between the main branch of an hyperbola
|
||||
-- and a parametric curve.
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
ICurve: IConicTool from IntCurve; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---C++:inline
|
||||
---Purpose: Intersection between a conic fom gp
|
||||
-- and a parametric curve.
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
end IntConicCurveGen;
|
||||
|
@@ -1,263 +0,0 @@
|
||||
-- Created on: 1992-05-22
|
||||
-- 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.
|
||||
|
||||
generic class IntCurveCurveGen from IntCurve (
|
||||
TheCurve as any;
|
||||
TheCurveTool as any) -- as CurveTool from IntCurve(TheCurve)
|
||||
|
||||
---Purpose: Provides the algorithm to intersect two 2D-curves.
|
||||
-- The curves may be parametric curves or Conic (see
|
||||
-- the template class CurveTool).
|
||||
--
|
||||
-- Note: The exception ConstructionError is raised in
|
||||
-- constructors or in Perform methods when a domain
|
||||
-- (Domain from IntRes2d) is not correct, i-e when
|
||||
-- the method TheType returns GeomAbs_Circle or
|
||||
-- GeomAbs_Ellipsei and the corresponding domain is
|
||||
-- not closed (use the SetEquivalentParameters for a
|
||||
-- domain on a circle or an ellipse) or when the
|
||||
-- method TheType returns GeomAbs_Other and the
|
||||
-- domain of the curve is not bounded
|
||||
-- (HasFirstPoint() && HasLastPoint() return True).
|
||||
---Level: Advanced
|
||||
|
||||
inherits Intersection from IntRes2d
|
||||
|
||||
uses Domain from IntRes2d,
|
||||
IntConicConic from IntCurve,
|
||||
IConicTool from IntCurve,
|
||||
Array1OfReal from TColStd
|
||||
|
||||
raises ConstructionError from Standard
|
||||
|
||||
|
||||
class TheProjPCur instantiates ProjPCurGen from IntCurve(
|
||||
TheCurve,
|
||||
TheCurveTool);
|
||||
|
||||
class TheIntConicCurve instantiates IntConicCurveGen from IntCurve
|
||||
(IConicTool from IntCurve,
|
||||
TheCurve,
|
||||
TheCurveTool,
|
||||
TheProjPCur);
|
||||
|
||||
class IntConicCurve instantiates UserIntConicCurveGen from IntCurve
|
||||
(IConicTool from IntCurve,
|
||||
TheCurve,
|
||||
TheCurveTool,
|
||||
TheIntConicCurve);
|
||||
|
||||
class TheIntPCurvePCurve instantiates IntPolyPolyGen from IntCurve
|
||||
(TheCurve,
|
||||
TheCurveTool,
|
||||
TheProjPCur);
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Empty constructor.
|
||||
returns IntCurveCurveGen from IntCurve;
|
||||
---C++: inline
|
||||
|
||||
|
||||
Create (C: TheCurve; TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Self Intersection of a curve
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
Create (C: TheCurve; D: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Self Intersection of a curve with a domain.
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
Create (C1: TheCurve; C2: TheCurve;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
Create (C1: TheCurve; D1: Domain from IntRes2d;
|
||||
C2: TheCurve;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
Create (C1: TheCurve;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Create (C1: TheCurve; D1: Domain from IntRes2d;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
---C++: inline
|
||||
returns IntCurveCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve; D1: Domain from IntRes2d;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve;
|
||||
C2: TheCurve;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
---C++: inline
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve; D1: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve; D1: Domain from IntRes2d;
|
||||
C2: TheCurve;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---C++: inline
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
Perform (me: in out;
|
||||
C1: TheCurve;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
---C++: inline
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
ComputeDomain(me; C1: TheCurve; TolDomain: Real from Standard)
|
||||
|
||||
---Purpose: Create a domain from a curve
|
||||
returns Domain from IntRes2d
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
InternalPerform(me: in out;
|
||||
C1: TheCurve; D1: Domain from IntRes2d;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite: Boolean from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
|
||||
InternalCompositePerform_noRecurs(me: in out;
|
||||
NbInterC1: Integer from Standard;
|
||||
C1: TheCurve;
|
||||
NumInterC1: Integer from Standard;
|
||||
Tab1: Array1OfReal from TColStd;
|
||||
D1: Domain from IntRes2d;
|
||||
NbInterC2: Integer from Standard;
|
||||
C2: TheCurve;
|
||||
NumInterC2: Integer from Standard;
|
||||
Tab2: Array1OfReal from TColStd;
|
||||
D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Part of InternalCompositePerform function
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
|
||||
InternalCompositePerform(me: in out;
|
||||
C1: TheCurve; D1: Domain from IntRes2d;
|
||||
N1,NB1: Integer from Standard;
|
||||
Tab1: Array1OfReal from TColStd;
|
||||
C2: TheCurve; D2: Domain from IntRes2d;
|
||||
N2,NB2: Integer from Standard;
|
||||
Tab2: Array1OfReal from TColStd;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite: Boolean from Standard)
|
||||
|
||||
---Purpose: Intersection between 2 curves.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
param1inf : Real from Standard;
|
||||
param1sup : Real from Standard;
|
||||
param2inf : Real from Standard;
|
||||
param2sup : Real from Standard;
|
||||
intconiconi : IntConicConic from IntCurve;
|
||||
intconicurv : TheIntConicCurve;
|
||||
intcurvcurv : TheIntPCurvePCurve;
|
||||
|
||||
end IntCurveCurveGen;
|
||||
|
||||
|
||||
|
||||
|
||||
|
81
src/IntCurve/IntCurve_IntImpConicParConic.hxx
Normal file
81
src/IntCurve/IntCurve_IntImpConicParConic.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1992-03-04
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_IntImpConicParConic_HeaderFile
|
||||
#define _IntCurve_IntImpConicParConic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <IntRes2d_Intersection.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
class Standard_ConstructionError;
|
||||
class IntCurve_IConicTool;
|
||||
class IntCurve_PConic;
|
||||
class IntCurve_PConicTool;
|
||||
class IntCurve_ProjectOnPConicTool;
|
||||
class IntCurve_MyImpParToolOfIntImpConicParConic;
|
||||
class IntRes2d_Domain;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
|
||||
class IntCurve_IntImpConicParConic : public IntRes2d_Intersection
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntCurve_IntImpConicParConic();
|
||||
|
||||
Standard_EXPORT IntCurve_IntImpConicParConic(const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const IntCurve_PConic& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT void Perform (const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const IntCurve_PConic& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT Standard_Real FindU (const Standard_Real parameter, gp_Pnt2d& point, const IntCurve_PConic& TheParCurev, const IntCurve_IConicTool& TheImpTool) const;
|
||||
|
||||
Standard_EXPORT Standard_Real FindV (const Standard_Real parameter, gp_Pnt2d& point, const IntCurve_IConicTool& TheImpTool, const IntCurve_PConic& ParCurve, const IntRes2d_Domain& TheParCurveDomain, const Standard_Real V0, const Standard_Real V1, const Standard_Real Tolerance) const;
|
||||
|
||||
Standard_EXPORT void And_Domaine_Objet1_Intersections (const IntCurve_IConicTool& TheImpTool, const IntCurve_PConic& TheParCurve, const IntRes2d_Domain& TheImpCurveDomain, const IntRes2d_Domain& TheParCurveDomain, Standard_Integer& NbResultats, TColStd_Array1OfReal& Inter2_And_Domain2, TColStd_Array1OfReal& Inter1, TColStd_Array1OfReal& Resultat1, TColStd_Array1OfReal& Resultat2, const Standard_Real EpsNul) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_IntImpConicParConic_HeaderFile
|
42
src/IntCurve/IntCurve_IntImpConicParConic_0.cxx
Normal file
42
src/IntCurve/IntCurve_IntImpConicParConic_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-03-04
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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.
|
||||
|
||||
#include <IntCurve_IntImpConicParConic.hxx>
|
||||
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntCurve_PConicTool.hxx>
|
||||
#include <IntCurve_ProjectOnPConicTool.hxx>
|
||||
#include <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
|
||||
#define ImpTool IntCurve_IConicTool
|
||||
#define ImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ParCurve IntCurve_PConic
|
||||
#define ParCurve_hxx <IntCurve_PConic.hxx>
|
||||
#define ParTool IntCurve_PConicTool
|
||||
#define ParTool_hxx <IntCurve_PConicTool.hxx>
|
||||
#define ProjectOnPCurveTool IntCurve_ProjectOnPConicTool
|
||||
#define ProjectOnPCurveTool_hxx <IntCurve_ProjectOnPConicTool.hxx>
|
||||
#define IntImpParGen_MyImpParTool IntCurve_MyImpParToolOfIntImpConicParConic
|
||||
#define IntImpParGen_MyImpParTool_hxx <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
|
||||
#define IntImpParGen_Intersector IntCurve_IntImpConicParConic
|
||||
#define IntImpParGen_Intersector_hxx <IntCurve_IntImpConicParConic.hxx>
|
||||
#include <IntImpParGen_Intersector.gxx>
|
||||
|
@@ -1,172 +0,0 @@
|
||||
-- Created on: 1992-10-19
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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.
|
||||
|
||||
generic class IntPolyPolyGen from IntCurve (
|
||||
TheCurve as any;
|
||||
TheCurveTool as any; -- as CurveTool from IntCurve (TheCurve)
|
||||
TheProjPCur as any) -- as ProjPCurGen from IntCurve
|
||||
|
||||
inherits Intersection from IntRes2d
|
||||
|
||||
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses Domain from IntRes2d
|
||||
|
||||
|
||||
class ThePolygon2d instantiates Polygon2dGen from IntCurve
|
||||
(TheCurve,
|
||||
TheCurveTool);
|
||||
|
||||
class TheDistBetweenPCurves instantiates DistBetweenPCurvesGen
|
||||
(TheCurve,
|
||||
TheCurveTool);
|
||||
|
||||
class ExactIntersectionPoint
|
||||
|
||||
uses Vector from math ,
|
||||
ThePolygon2d from IntCurve
|
||||
is
|
||||
Create ( C1 : TheCurve;
|
||||
C2 : TheCurve;
|
||||
Tol : Real from Standard )
|
||||
returns ExactIntersectionPoint from IntCurve ;
|
||||
|
||||
Perform ( me: in out ;
|
||||
Poly1 : ThePolygon2d from IntCurve ;
|
||||
Poly2 : ThePolygon2d from IntCurve ;
|
||||
NumSegOn1 : out Integer from Standard ;
|
||||
NumSegOn2 : out Integer from Standard ;
|
||||
ParamOnSeg1 : out Real from Standard ;
|
||||
ParamOnSeg2 : out Real from Standard );
|
||||
|
||||
Perform ( me: in out ;
|
||||
Uo : Real from Standard ;
|
||||
Vo : Real from Standard ;
|
||||
UInf : Real from Standard ;
|
||||
VInf : Real from Standard ;
|
||||
USup : Real from Standard ;
|
||||
VSup : Real from Standard );
|
||||
|
||||
NbRoots ( me )
|
||||
returns Integer from Standard ;
|
||||
|
||||
Roots ( me : in out ;
|
||||
U : out Real from Standard ;
|
||||
V : out Real from Standard ) ;
|
||||
|
||||
MathPerform ( me : in out ) is private ;
|
||||
|
||||
AnErrorOccurred ( me )
|
||||
returns Boolean from Standard ;
|
||||
|
||||
fields
|
||||
|
||||
done : Boolean from Standard ;
|
||||
nbroots : Integer from Standard ;
|
||||
myTol : Real from Standard ;
|
||||
FctDist : TheDistBetweenPCurves from IntCurve ;
|
||||
ToleranceVector : Vector from math ;
|
||||
BInfVector : Vector from math ;
|
||||
BSupVector : Vector from math ;
|
||||
StartingPoint : Vector from math ;
|
||||
Root : Vector from math ;
|
||||
anErrorOccurred : Boolean from Standard ;
|
||||
end ExactIntersectionPoint from IntCurve;
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns IntPolyPolyGen from IntCurve;
|
||||
|
||||
|
||||
Perform(me: in out;
|
||||
Curve1 : TheCurve;
|
||||
Domain1: Domain from IntRes2d;
|
||||
Curve2 : TheCurve;
|
||||
Domain2: Domain from IntRes2d;
|
||||
TolConf: Real from Standard;
|
||||
Tol : Real from Standard)
|
||||
|
||||
is static;
|
||||
|
||||
Perform(me: in out;
|
||||
Curve1 : TheCurve;
|
||||
Domain1: Domain from IntRes2d;
|
||||
TolConf: Real from Standard;
|
||||
Tol : Real from Standard)
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Perform(me: in out;
|
||||
Curve1 : TheCurve;
|
||||
Domain1: Domain from IntRes2d;
|
||||
Curve2 : TheCurve;
|
||||
Domain2: Domain from IntRes2d;
|
||||
TolConf: Real from Standard;
|
||||
Tol : Real from Standard;
|
||||
NbIter : Integer from Standard;
|
||||
DeltaU : Real from Standard;
|
||||
DeltaV : Real from Standard)
|
||||
|
||||
is static protected;
|
||||
|
||||
|
||||
Perform(me: in out;
|
||||
Curve1 : TheCurve;
|
||||
Domain1: Domain from IntRes2d;
|
||||
TolConf: Real from Standard;
|
||||
Tol : Real from Standard;
|
||||
NbIter : Integer from Standard;
|
||||
DeltaU : Real from Standard;
|
||||
DeltaV : Real from Standard)
|
||||
|
||||
is static protected;
|
||||
|
||||
findIntersect( me: in out ;
|
||||
Curve1 : TheCurve;
|
||||
Domain1: Domain from IntRes2d;
|
||||
Curve2 : TheCurve;
|
||||
Domain2: Domain from IntRes2d;
|
||||
TolConf: Real from Standard;
|
||||
Tol : Real from Standard;
|
||||
NbIter : Integer from Standard;
|
||||
DeltaU : Real from Standard;
|
||||
DeltaV : Real from Standard;
|
||||
thePoly1 : ThePolygon2d from IntCurve;
|
||||
thePoly2 : ThePolygon2d from IntCurve;
|
||||
isFullRepresentation : Boolean from Standard)
|
||||
returns Boolean is private;
|
||||
---Purpose : Method to find intersection between two curves
|
||||
-- : returns false for case when some points of polygon
|
||||
-- : were replaced on line and exact point of intersection was not found
|
||||
-- : for case when point of intersection was found
|
||||
-- : during prelimanary search for line (case of bad paramerization of Bspline for example).
|
||||
|
||||
fields
|
||||
|
||||
DomainOnCurve1 : Domain from IntRes2d;
|
||||
DomainOnCurve2 : Domain from IntRes2d;
|
||||
|
||||
end IntPolyPolyGen;
|
||||
|
||||
|
||||
|
||||
|
||||
|
75
src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx
Normal file
75
src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Created on: 1992-03-04
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_MyImpParToolOfIntImpConicParConic_HeaderFile
|
||||
#define _IntCurve_MyImpParToolOfIntImpConicParConic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Address.hxx>
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <math_FunctionWithDerivative.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class IntCurve_IConicTool;
|
||||
class IntCurve_PConic;
|
||||
class IntCurve_PConicTool;
|
||||
|
||||
|
||||
|
||||
class IntCurve_MyImpParToolOfIntImpConicParConic : public math_FunctionWithDerivative
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntCurve_MyImpParToolOfIntImpConicParConic(const IntCurve_IConicTool& IT, const IntCurve_PConic& PC);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Address TheParCurve;
|
||||
IntCurve_IConicTool TheImpTool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_MyImpParToolOfIntImpConicParConic_HeaderFile
|
@@ -0,0 +1,33 @@
|
||||
// Created on: 1992-03-04
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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.
|
||||
|
||||
#include <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
|
||||
|
||||
#include <IntCurve_IConicTool.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntCurve_PConicTool.hxx>
|
||||
|
||||
|
||||
#define ImpTool IntCurve_IConicTool
|
||||
#define ImpTool_hxx <IntCurve_IConicTool.hxx>
|
||||
#define ParCurve IntCurve_PConic
|
||||
#define ParCurve_hxx <IntCurve_PConic.hxx>
|
||||
#define ParTool IntCurve_PConicTool
|
||||
#define ParTool_hxx <IntCurve_PConicTool.hxx>
|
||||
#define IntImpParGen_ImpParTool IntCurve_MyImpParToolOfIntImpConicParConic
|
||||
#define IntImpParGen_ImpParTool_hxx <IntCurve_MyImpParToolOfIntImpConicParConic.hxx>
|
||||
#include <IntImpParGen_ImpParTool.gxx>
|
||||
|
@@ -1,102 +0,0 @@
|
||||
-- Created on: 1992-03-04
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 PConic from IntCurve
|
||||
|
||||
---Purpose: This class represents a conic from gp as a
|
||||
-- parametric curve ( in order to be used by the
|
||||
-- class PConicTool from IntCurve).
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses Elips2d from gp,
|
||||
Lin2d from gp,
|
||||
Circ2d from gp,
|
||||
Parab2d from gp,
|
||||
Hypr2d from gp,
|
||||
Ax22d from gp,
|
||||
CurveType from GeomAbs
|
||||
|
||||
is
|
||||
|
||||
Create(PC: PConic from IntCurve) returns PConic from IntCurve;
|
||||
|
||||
Create(E: Elips2d from gp) returns PConic from IntCurve;
|
||||
|
||||
Create(C: Circ2d from gp) returns PConic from IntCurve;
|
||||
|
||||
Create(P: Parab2d from gp) returns PConic from IntCurve;
|
||||
|
||||
Create(H: Hypr2d from gp) returns PConic from IntCurve;
|
||||
|
||||
Create(L: Lin2d from gp) returns PConic from IntCurve;
|
||||
|
||||
|
||||
SetEpsX(me: in out; EpsDist: Real from Standard) is static;
|
||||
---Purpose: EpsX is a internal tolerance used in math
|
||||
-- algorithms, usually about 1e-10
|
||||
-- (See FunctionAllRoots for more details)
|
||||
|
||||
SetAccuracy(me: in out; Nb: Integer from Standard) is static;
|
||||
---Purpose: Accuracy is the number of samples used to
|
||||
-- approximate the parametric curve on its domain.
|
||||
|
||||
Accuracy(me)
|
||||
---C++: inline
|
||||
returns Integer from Standard is static;
|
||||
|
||||
EpsX(me)
|
||||
---C++: inline
|
||||
returns Real from Standard is static;
|
||||
|
||||
TypeCurve(me)
|
||||
---Purpose: The Conics are manipulated as objects which only
|
||||
-- depend on three parameters : Axis and two Real from Standards.
|
||||
-- Type Curve is used to select the correct Conic.
|
||||
---C++: inline
|
||||
returns CurveType from GeomAbs
|
||||
is static;
|
||||
|
||||
Axis2(me)
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
returns Ax22d from gp
|
||||
is static;
|
||||
|
||||
Param1(me)
|
||||
---C++: inline
|
||||
returns Real from Standard is static;
|
||||
|
||||
Param2(me)
|
||||
---C++: inline
|
||||
returns Real from Standard is static;
|
||||
|
||||
fields
|
||||
|
||||
axe : Ax22d from gp;
|
||||
prm1 : Real from Standard;
|
||||
prm2 : Real from Standard;
|
||||
|
||||
TheEpsX : Real from Standard;
|
||||
TheAccuracy : Integer from Standard;
|
||||
type : CurveType from GeomAbs;
|
||||
|
||||
end PConic;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -14,9 +14,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntCurve_PConic.ixx>
|
||||
|
||||
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
|
||||
IntCurve_PConic::IntCurve_PConic(const IntCurve_PConic& PC) :
|
||||
axe(PC.axe) , prm1(PC.prm1) ,
|
||||
|
112
src/IntCurve/IntCurve_PConic.hxx
Normal file
112
src/IntCurve/IntCurve_PConic.hxx
Normal file
@@ -0,0 +1,112 @@
|
||||
// Created on: 1992-03-04
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_PConic_HeaderFile
|
||||
#define _IntCurve_PConic_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class gp_Elips2d;
|
||||
class gp_Circ2d;
|
||||
class gp_Parab2d;
|
||||
class gp_Hypr2d;
|
||||
class gp_Lin2d;
|
||||
class gp_Ax22d;
|
||||
|
||||
|
||||
//! This class represents a conic from gp as a
|
||||
//! parametric curve ( in order to be used by the
|
||||
//! class PConicTool from IntCurve).
|
||||
class IntCurve_PConic
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const IntCurve_PConic& PC);
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const gp_Elips2d& E);
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const gp_Circ2d& C);
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const gp_Parab2d& P);
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const gp_Hypr2d& H);
|
||||
|
||||
Standard_EXPORT IntCurve_PConic(const gp_Lin2d& L);
|
||||
|
||||
//! EpsX is a internal tolerance used in math
|
||||
//! algorithms, usually about 1e-10
|
||||
//! (See FunctionAllRoots for more details)
|
||||
Standard_EXPORT void SetEpsX (const Standard_Real EpsDist);
|
||||
|
||||
//! Accuracy is the number of samples used to
|
||||
//! approximate the parametric curve on its domain.
|
||||
Standard_EXPORT void SetAccuracy (const Standard_Integer Nb);
|
||||
|
||||
Standard_Integer Accuracy() const;
|
||||
|
||||
Standard_Real EpsX() const;
|
||||
|
||||
//! The Conics are manipulated as objects which only
|
||||
//! depend on three parameters : Axis and two Real from Standards.
|
||||
//! Type Curve is used to select the correct Conic.
|
||||
GeomAbs_CurveType TypeCurve() const;
|
||||
|
||||
const gp_Ax22d& Axis2() const;
|
||||
|
||||
Standard_Real Param1() const;
|
||||
|
||||
Standard_Real Param2() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Ax22d axe;
|
||||
Standard_Real prm1;
|
||||
Standard_Real prm2;
|
||||
Standard_Real TheEpsX;
|
||||
Standard_Integer TheAccuracy;
|
||||
GeomAbs_CurveType type;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <IntCurve_PConic.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_PConic_HeaderFile
|
@@ -1,75 +0,0 @@
|
||||
-- Created on: 1992-03-26
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 PConicTool from IntCurve
|
||||
|
||||
---Purpose: Implementation of the ParTool from IntImpParGen
|
||||
-- for conics of gp, using the class PConic from IntCurve.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses Pnt2d from gp,
|
||||
Vec2d from gp,
|
||||
Lin2d from gp,
|
||||
XY from gp,
|
||||
PConic from IntCurve
|
||||
|
||||
is
|
||||
|
||||
|
||||
EpsX (myclass; C: PConic)
|
||||
--Purpose: Tolerance used by mathematical algorithms
|
||||
-- usually about 1e-10
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
NbSamples(myclass; C: PConic)
|
||||
--Purpose: returns the number of samples on the parametric curve
|
||||
returns Integer from Standard;
|
||||
|
||||
NbSamples(myclass; C: PConic; U0,U1: Real from Standard)
|
||||
--Purpose: returns the number of samples on the parametric curve
|
||||
returns Integer from Standard;
|
||||
|
||||
|
||||
Value (myclass; C: PConic from IntCurve; X: Real from Standard)
|
||||
--Purpose: Returns the geometric point which lies at the
|
||||
-- parameter x on the parametric curve.
|
||||
returns Pnt2d from gp;
|
||||
|
||||
|
||||
D1 (myclass; C: PConic from IntCurve; U: Real from Standard ;
|
||||
P: out Pnt2d; T: out Vec2d);
|
||||
--Purpose: Computes the Value, First and Second Derivative at
|
||||
-- the parameter U on the curve.
|
||||
|
||||
|
||||
D2 (myclass; C: PConic from IntCurve; U: Real from Standard ;
|
||||
P: out Pnt2d; T,N: out Vec2d);
|
||||
|
||||
--Purpose: Computes the Value, First and Second Derivative at
|
||||
-- the parameter U on the curve.
|
||||
|
||||
end PConicTool;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -14,8 +14,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <IntCurve_PConicTool.ixx>
|
||||
|
||||
#include <ElCLib.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntCurve_PConicTool.hxx>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
gp_Pnt2d IntCurve_PConicTool::Value(const IntCurve_PConic& PConic,
|
||||
|
75
src/IntCurve/IntCurve_PConicTool.hxx
Normal file
75
src/IntCurve/IntCurve_PConicTool.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Created on: 1992-03-26
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_PConicTool_HeaderFile
|
||||
#define _IntCurve_PConicTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class IntCurve_PConic;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
||||
//! Implementation of the ParTool from IntImpParGen
|
||||
//! for conics of gp, using the class PConic from IntCurve.
|
||||
class IntCurve_PConicTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT static Standard_Real EpsX (const IntCurve_PConic& C);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamples (const IntCurve_PConic& C);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamples (const IntCurve_PConic& C, const Standard_Real U0, const Standard_Real U1);
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Value (const IntCurve_PConic& C, const Standard_Real X);
|
||||
|
||||
Standard_EXPORT static void D1 (const IntCurve_PConic& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T);
|
||||
|
||||
Standard_EXPORT static void D2 (const IntCurve_PConic& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& T, gp_Vec2d& N);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_PConicTool_HeaderFile
|
@@ -1,150 +0,0 @@
|
||||
-- Created on: 1992-10-19
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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.
|
||||
|
||||
generic class Polygon2dGen from IntCurve (
|
||||
TheCurve as any;
|
||||
TheCurveTool as any) -- as CurveTool from IntCurve(TheCurve)
|
||||
|
||||
---Purpose: Describe a polyline as a topology to compute the
|
||||
-- interference beetween two polylines 2 dimension.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
inherits Polygon2d from Intf
|
||||
|
||||
uses Pnt2d from gp,
|
||||
Box2d from Bnd,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd,
|
||||
Domain from IntRes2d
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
is
|
||||
|
||||
Create (Curve : TheCurve;
|
||||
NbPnt : Integer from Standard;
|
||||
Domain : Domain from IntRes2d;
|
||||
Tol : Real from Standard)
|
||||
|
||||
---Purpose: Compute a polygon on the domain of the curve.
|
||||
|
||||
|
||||
returns Polygon2dGen from IntCurve;
|
||||
|
||||
ComputeWithBox(me : in out;
|
||||
Curve : TheCurve;
|
||||
OtherBox : Box2d from Bnd)
|
||||
|
||||
---Purpose: The current polygon is modified if most
|
||||
-- of the points of the polygon are are
|
||||
-- outside the box <OtherBox>. In this
|
||||
-- situation, bounds are computed to build
|
||||
-- a polygon inside or near the OtherBox.
|
||||
is static;
|
||||
|
||||
DeflectionOverEstimation(me)
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is redefined virtual;
|
||||
|
||||
SetDeflectionOverEstimation(me: in out; x:Real from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
Closed (me : in out; clos : Boolean from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
NbSegments (me)
|
||||
returns Integer
|
||||
---C++: inline
|
||||
is redefined virtual;
|
||||
---Purpose: Give the number of Segments in the polyline.
|
||||
|
||||
Segment (me; theIndex : in Integer from Standard;
|
||||
theBegin, theEnd : in out Pnt2d from gp)
|
||||
raises OutOfRange from Standard is redefined virtual;
|
||||
---Purpose: Returns the points of the segment <Index> in the Polygon.
|
||||
|
||||
-- Implementation :
|
||||
|
||||
|
||||
InfParameter(me)
|
||||
|
||||
---Purpose: Returns the parameter (On the curve)
|
||||
-- of the first point of the Polygon
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
SupParameter(me)
|
||||
|
||||
---Purpose: Returns the parameter (On the curve)
|
||||
-- of the last point of the Polygon
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
AutoIntersectionIsPossible(me)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
ApproxParamOnCurve(me;
|
||||
Index : in Integer from Standard;
|
||||
ParamOnLine : in Real from Standard)
|
||||
|
||||
returns Real from Standard
|
||||
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
---Purpose: Give an approximation of the parameter on the curve
|
||||
-- according to the discretization of the Curve.
|
||||
|
||||
|
||||
CalculRegion (me;
|
||||
x : Real from Standard ;
|
||||
y : Real from Standard ;
|
||||
x1 : Real from Standard ;
|
||||
x2 : Real from Standard ;
|
||||
y1 : Real from Standard ;
|
||||
y2 : Real from Standard )
|
||||
returns Integer from Standard ;
|
||||
---C++: inline
|
||||
|
||||
Dump (me)
|
||||
is static;
|
||||
|
||||
|
||||
fields TheDeflection : Real from Standard;
|
||||
NbPntIn : Integer from Standard;
|
||||
TheMaxNbPoints: Integer from Standard;
|
||||
ThePnts : Array1OfPnt2d from TColgp;
|
||||
TheParams : Array1OfReal from TColStd;
|
||||
TheIndex : Array1OfInteger from TColStd;
|
||||
ClosedPolygon : Boolean from Standard;
|
||||
|
||||
--- To compute an approximate parameter on the Curve
|
||||
--
|
||||
Binf : Real from Standard;
|
||||
Bsup : Real from Standard;
|
||||
|
||||
end Polygon2dGen;
|
@@ -1,94 +0,0 @@
|
||||
-- Created on: 1992-10-13
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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.
|
||||
|
||||
generic class ProjPCurGen from IntCurve (
|
||||
TheCurve as any;
|
||||
TheCurveTool as any) -- as CurveTool from IntCurve(TheCurve)
|
||||
|
||||
---Purpose: this class provide a tool which computes the parameter
|
||||
-- of a point near a parametric curve.
|
||||
|
||||
---Level: Internal
|
||||
|
||||
uses Pnt2d from gp,
|
||||
Vec2d from gp,
|
||||
POnCurv2d from Extrema
|
||||
|
||||
|
||||
|
||||
class TheCurveLocator instantiates CurveLocator from Extrema (
|
||||
TheCurve,
|
||||
TheCurveTool,
|
||||
TheCurve,
|
||||
TheCurveTool,
|
||||
POnCurv2d from Extrema,
|
||||
Pnt2d from gp);
|
||||
|
||||
class TheLocateExtPC instantiates GenLocateExtPC from Extrema (
|
||||
TheCurve,
|
||||
TheCurveTool,
|
||||
POnCurv2d from Extrema,
|
||||
Pnt2d from gp,
|
||||
Vec2d from gp);
|
||||
|
||||
|
||||
|
||||
is
|
||||
|
||||
FindParameter(myclass; C: TheCurve;
|
||||
Pnt: Pnt2d from gp;
|
||||
Tol: Real from Standard)
|
||||
|
||||
--- Purpose: Returns the parameter V of the point on the
|
||||
-- parametric curve corresponding to the Point Pnt.
|
||||
-- The Correspondance between Pnt and the point P(V)
|
||||
-- on the parametric curve must be coherent with the
|
||||
-- way of determination of the signed distance
|
||||
-- between a point and the implicit curve.
|
||||
-- Tol is the tolerance on the distance between a point
|
||||
-- and the parametrised curve.
|
||||
-- In that case, no bounds are given. The research of
|
||||
-- the rigth parameter has to be made on the natural
|
||||
-- parametric domain of the curve.
|
||||
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
FindParameter(myclass; C: TheCurve;
|
||||
Pnt: Pnt2d from gp;
|
||||
LowParameter,HighParameter,Tol: Real from Standard)
|
||||
|
||||
--- Purpose: Returns the parameter V of the point on the
|
||||
-- parametric curve corresponding to the Point Pnt.
|
||||
-- The Correspondance between Pnt and the point P(V)
|
||||
-- on the parametric curve must be coherent with the
|
||||
-- way of determination of the signed distance
|
||||
-- between a point and the implicit curve.
|
||||
-- Tol is the tolerance on the distance between a point
|
||||
-- and the parametrised curve.
|
||||
-- LowParameter and HighParameter give the
|
||||
-- boundaries of the interval in wich the parameter
|
||||
-- certainly lies. These parameters are given to
|
||||
-- implement a more efficient algoritm. So, it is not
|
||||
-- necessary to check that the returned value verifies
|
||||
-- LowParameter <= Value <= HighParameter.
|
||||
|
||||
returns Real from Standard;
|
||||
|
||||
end ProjPCurGen;
|
||||
|
||||
|
||||
|
@@ -1,63 +0,0 @@
|
||||
-- Created on: 1992-10-13
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 ProjectOnPConicTool from IntCurve
|
||||
|
||||
---Purpose: This class provides a tool which computes the parameter
|
||||
-- of a point near a parametric conic.
|
||||
|
||||
uses Pnt2d from gp,
|
||||
PConic from IntCurve
|
||||
is
|
||||
|
||||
FindParameter(myclass; C: PConic from IntCurve;
|
||||
Pnt: Pnt2d from gp;
|
||||
Tol: Real from Standard)
|
||||
|
||||
--- Purpose: Returns the parameter V of the point on the
|
||||
-- parametric curve corresponding to the Point Pnt. The
|
||||
-- Correspondance between Pnt and the point P(V) on the
|
||||
-- parametric curve must be coherent with the way of
|
||||
-- determination of the signed distance between a point and
|
||||
-- the implicit curve. Tol is the tolerance on the distance
|
||||
-- between a point and the parametrised curve. In that case,
|
||||
-- no bounds are given. The research of the rigth parameter
|
||||
-- has to be made on the natural parametric domain of the
|
||||
-- curve.
|
||||
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
FindParameter(myclass; C: PConic from IntCurve;
|
||||
Pnt: Pnt2d from gp;
|
||||
LowParameter,HighParameter,Tol: Real from Standard)
|
||||
|
||||
--- Purpose: Returns the parameter V of the point on the
|
||||
-- parametric curve corresponding to the Point Pnt. The
|
||||
-- Correspondance between Pnt and the point P(V) on the
|
||||
-- parametric curve must be coherent with the way of
|
||||
-- determination of the signed distance between a point and
|
||||
-- the implicit curve. Tol is the tolerance on the distance
|
||||
-- between a point and the parametrised curve. LowParameter
|
||||
-- and HighParameter give the boundaries of the interval in
|
||||
-- wich the parameter certainly lies. These parameters are
|
||||
-- given to implement a more efficient algoritm. So, it is
|
||||
-- not necessary to check that the returned value verifies
|
||||
-- LowParameter <= Value <= HighParameter.
|
||||
|
||||
returns Real from Standard;
|
||||
|
||||
end ProjectOnPConicTool;
|
@@ -14,8 +14,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <ElCLib.hxx>
|
||||
#include <IntCurve_ProjectOnPConicTool.ixx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <IntCurve_PConic.hxx>
|
||||
#include <IntCurve_ProjectOnPConicTool.hxx>
|
||||
|
||||
Standard_Real IntCurve_ProjectOnPConicTool::FindParameter
|
||||
(const IntCurve_PConic& ThePConic,
|
||||
|
87
src/IntCurve/IntCurve_ProjectOnPConicTool.hxx
Normal file
87
src/IntCurve/IntCurve_ProjectOnPConicTool.hxx
Normal file
@@ -0,0 +1,87 @@
|
||||
// Created on: 1992-10-13
|
||||
// Created by: Laurent BUCHARD
|
||||
// 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 _IntCurve_ProjectOnPConicTool_HeaderFile
|
||||
#define _IntCurve_ProjectOnPConicTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class IntCurve_PConic;
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
//! This class provides a tool which computes the parameter
|
||||
//! of a point near a parametric conic.
|
||||
class IntCurve_ProjectOnPConicTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the parameter V of the point on the
|
||||
//! parametric curve corresponding to the Point Pnt. The
|
||||
//! Correspondance between Pnt and the point P(V) on the
|
||||
//! parametric curve must be coherent with the way of
|
||||
//! determination of the signed distance between a point and
|
||||
//! the implicit curve. Tol is the tolerance on the distance
|
||||
//! between a point and the parametrised curve. In that case,
|
||||
//! no bounds are given. The research of the rigth parameter
|
||||
//! has to be made on the natural parametric domain of the
|
||||
//! curve.
|
||||
Standard_EXPORT static Standard_Real FindParameter (const IntCurve_PConic& C, const gp_Pnt2d& Pnt, const Standard_Real Tol);
|
||||
|
||||
//! Returns the parameter V of the point on the
|
||||
//! parametric curve corresponding to the Point Pnt. The
|
||||
//! Correspondance between Pnt and the point P(V) on the
|
||||
//! parametric curve must be coherent with the way of
|
||||
//! determination of the signed distance between a point and
|
||||
//! the implicit curve. Tol is the tolerance on the distance
|
||||
//! between a point and the parametrised curve. LowParameter
|
||||
//! and HighParameter give the boundaries of the interval in
|
||||
//! wich the parameter certainly lies. These parameters are
|
||||
//! given to implement a more efficient algoritm. So, it is
|
||||
//! not necessary to check that the returned value verifies
|
||||
//! LowParameter <= Value <= HighParameter.
|
||||
Standard_EXPORT static Standard_Real FindParameter (const IntCurve_PConic& C, const gp_Pnt2d& Pnt, const Standard_Real LowParameter, const Standard_Real HighParameter, const Standard_Real Tol);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _IntCurve_ProjectOnPConicTool_HeaderFile
|
@@ -1,257 +0,0 @@
|
||||
-- Created on: 1992-11-24
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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.
|
||||
|
||||
generic class UserIntConicCurveGen from IntCurve (
|
||||
TheImpTool as any; -- as ImpTool from IntImpParGen
|
||||
ThePCurve as any;
|
||||
ThePCurveTool as any; -- as CurveTool from IntCurve(ThePCurve)
|
||||
TheIntConicCurve as any) -- as IntConicCurveGen from IntCurve (
|
||||
-- TheImpTool as ImpTool from IntImpParGen
|
||||
-- ThePCurve as any;
|
||||
-- ThePCurveTool as ParTool from IntImpParGen(ThePCurve)
|
||||
|
||||
|
||||
inherits Intersection from IntRes2d
|
||||
|
||||
|
||||
---Purpose: Generic algorithm to intersect a conic from gp and
|
||||
-- a parametric curve. This class uses the class
|
||||
-- IConicTool from IntCurve, and Domain from
|
||||
-- IntCurve.
|
||||
--
|
||||
-- The template class for the PCurveTool is given in
|
||||
-- the package IntCurve (CurveTool).
|
||||
--
|
||||
-- The methods used to know the result of the
|
||||
-- intersection are inherited from the class
|
||||
-- Intersection from IntRes2d.
|
||||
--
|
||||
-- Note: The exception ConstructionError is raised in
|
||||
-- constructors or in Perform methods when a domain
|
||||
-- (Domain from IntRes2d) is not correct, i-e when a
|
||||
-- Circle (Circ2d from gp) or an Ellipse (i-e Elips2d
|
||||
-- from gp) do not have a closed domain (use the
|
||||
-- SetEquivalentParameters for a domain on a circle
|
||||
-- or an ellipse) or the domain of the ThePCurve is
|
||||
-- not bounded (HasFirstPoint() && HasLastPoint()
|
||||
-- return True.)
|
||||
---Level: Internal
|
||||
|
||||
uses IConicTool from IntCurve,
|
||||
Lin2d from gp,
|
||||
Circ2d from gp,
|
||||
Elips2d from gp,
|
||||
Parab2d from gp,
|
||||
Hypr2d from gp,
|
||||
Domain from IntRes2d,
|
||||
IntConicConic from IntCurve
|
||||
|
||||
|
||||
raises ConstructionError from Standard
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve;
|
||||
|
||||
|
||||
Create (L: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
Create (C: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Create (E: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between an ellipse and a parametric curve.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Create (Prb: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a parabola and a parametric curve.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Create (H: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between the main branch of an hyperbola
|
||||
-- and a parametric curve.
|
||||
|
||||
returns UserIntConicCurveGen from IntCurve
|
||||
raises ConstructionError from Standard;
|
||||
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
L: Lin2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
C: Circ2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a line and a parametric curve.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
E: Elips2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between an ellipse and a parametric curve.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
Prb: Parab2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between a parabola and a parametric curve.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Perform (me: in out;
|
||||
H: Hypr2d from gp; D1: Domain from IntRes2d;
|
||||
PCurve: ThePCurve; D2: Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard)
|
||||
|
||||
---Purpose: Intersection between the main branch of an hyperbola
|
||||
-- and a parametric curve.
|
||||
|
||||
raises ConstructionError from Standard
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
-------------------------------- p r i v a t e f u n c t i o n s
|
||||
InternalPerform (me : in out;
|
||||
Lin1 : Lin2d from gp;
|
||||
D1 : Domain from IntRes2d;
|
||||
PCurve : ThePCurve;
|
||||
D2 : Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite : Boolean from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
InternalPerform (me : in out;
|
||||
Circ1 : Circ2d from gp;
|
||||
D1 : Domain from IntRes2d;
|
||||
PCurve : ThePCurve;
|
||||
D2 : Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite : Boolean from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
InternalPerform (me : in out;
|
||||
Eli1 : Elips2d from gp;
|
||||
D1 : Domain from IntRes2d;
|
||||
PCurve : ThePCurve;
|
||||
D2 : Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite : Boolean from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
InternalPerform (me : in out;
|
||||
Prb1 : Parab2d from gp;
|
||||
D1 : Domain from IntRes2d;
|
||||
PCurve : ThePCurve;
|
||||
D2 : Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite : Boolean from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
InternalPerform (me : in out;
|
||||
Hpr1 : Hypr2d from gp;
|
||||
D1 : Domain from IntRes2d;
|
||||
PCurve : ThePCurve;
|
||||
D2 : Domain from IntRes2d;
|
||||
TolConf,Tol: Real from Standard;
|
||||
Composite : Boolean from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
fields
|
||||
|
||||
param1inf : Real from Standard;
|
||||
param1sup : Real from Standard;
|
||||
param2inf : Real from Standard;
|
||||
param2sup : Real from Standard;
|
||||
|
||||
intconiconi : IntConicConic from IntCurve;
|
||||
intconicurv : TheIntConicCurve;
|
||||
|
||||
|
||||
|
||||
end UserIntConicCurveGen;
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user