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

0024727: Convertation of the generic classes to the non-generic. Part 3

1) Generic class "Intf_InterferencePolyhedron" from "Intf" package converted to the non-generic class and moved to the "IntPatch" package. Name of this class was changed to "IntPatch_InterferencePolyhedron".

2) Generic class "MoniTool_Elem" from "MoniTool" package converted to the non-generic class "MoniTool_TransientElem".

3) Generic class "IntWalk_PWalking" from "IntWalk" package converted to the non-generic class. And internal class "TheInt2S" of "IntWalk_PWalking" moved from IntWalk_PWalking.cdl to IntWalk.cdl for correct building. Also several "*.cxx" files of this class merged to one ".cxx".

4) Generic class "Transfer_SimpleBinder" from "Transfer" package converted to the non-generic class and moved to the "TransferBRep" package. Name of this class was changed to "TransferBRep_BinderOfShape".

5) Generic class "Geom2dInt_CurveTool" from "Geom2dInt" package converted to the non-generic class "Geom2dInt_Geom2dCurveTool".

6) Generic class "MAT2d_BisectingLocus" from "MAT2d" package converted to the non-generic class and moved to the "BRepMAT2d" package. Name of this class was changed to "BRepMAT2d_BisectingLocus".

7) Generic class "MAT_Mat" from "MAT" package converted to the non-generic class and moved to the "MAT2d" package. Name of this class was changed to "MAT2d_Mat2d".
This commit is contained in:
dln
2014-03-12 12:09:23 +04:00
committed by bugmaster
parent ebc93ae74f
commit 47cbf13472
33 changed files with 1041 additions and 1155 deletions

View File

@@ -24,14 +24,11 @@ package Geom2dInt
--
uses Standard, gp, TColStd, GeomAbs, Geom2d, Adaptor3d,Adaptor2d, IntCurve
uses Standard, gp, TColStd, GeomAbs, Geom2d, Adaptor3d, Adaptor2d, IntCurve
is
generic class CurveTool;
class Geom2dCurveTool instantiates CurveTool from Geom2dInt
(Curve2d from Adaptor2d);
class Geom2dCurveTool;
class GInter instantiates IntCurveCurveGen from IntCurve
(Curve2d from Adaptor2d,

View File

@@ -14,12 +14,11 @@
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
generic class CurveTool from Geom2dInt (
IntCurveCurve as any)
class Geom2dCurveTool from Geom2dInt
---Purpose: This class provides a CurveTool as < CurveTool from IntCurve >
-- from a Tool as < CurveTool from Adaptor3d > .
---Purpose: This class provides a Geom2dCurveTool as < Geom2dCurveTool from IntCurve >
-- from a Tool as < Geom2dCurveTool from Adaptor3d > .
uses
@@ -31,21 +30,22 @@ uses
Parab2d from gp,
Hypr2d from gp,
Array1OfReal from TColStd,
CurveType from GeomAbs
CurveType from GeomAbs,
Curve2d from Adaptor2d
is
GetType(myclass; C: IntCurveCurve)
GetType(myclass; C: Curve2d from Adaptor2d)
---C++: inline
returns CurveType from GeomAbs;
IsComposite(myclass; C: IntCurveCurve)
IsComposite(myclass; C: Curve2d from Adaptor2d)
---C++: inline
returns Boolean from Standard;
Line(myclass; C: IntCurveCurve)
Line(myclass; C: Curve2d from Adaptor2d)
---Purpose: Returns the Lin2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
@@ -54,7 +54,7 @@ is
returns Lin2d from gp;
Circle(myclass; C: IntCurveCurve)
Circle(myclass; C: Curve2d from Adaptor2d)
---Purpose: Returns the Circ2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
@@ -63,7 +63,7 @@ is
returns Circ2d from gp;
Ellipse(myclass; C: IntCurveCurve)
Ellipse(myclass; C: Curve2d from Adaptor2d)
---Purpose: Returns the Elips2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
@@ -72,7 +72,7 @@ is
returns Elips2d from gp;
Parabola(myclass; C: IntCurveCurve)
Parabola(myclass; C: Curve2d from Adaptor2d)
---Purpose: Returns the Parab2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
@@ -81,7 +81,7 @@ is
returns Parab2d from gp;
Hyperbola(myclass; C: IntCurveCurve)
Hyperbola(myclass; C: Curve2d from Adaptor2d)
---Purpose: Returns the Hypr2d from gp corresponding to the curve C.
-- This method is called only when TheType returns
@@ -93,73 +93,73 @@ is
-- The following method are used only when TheType returns IntCurve_Other.
EpsX (myclass; C: IntCurveCurve)
EpsX (myclass; C: Curve2d from Adaptor2d)
---C++: inline
returns Real;
EpsX (myclass; C: IntCurveCurve;
EpsX (myclass; C: Curve2d from Adaptor2d;
Eps_XYZ : Real from Standard)
---C++: inline
returns Real;
NbSamples(myclass; C: IntCurveCurve)
NbSamples(myclass; C: Curve2d from Adaptor2d)
returns Integer;
NbSamples(myclass; C: IntCurveCurve; U0,U1: Real from Standard)
NbSamples(myclass; C: Curve2d from Adaptor2d; U0,U1: Real from Standard)
returns Integer;
FirstParameter(myclass; C:IntCurveCurve)
FirstParameter(myclass; C:Curve2d from Adaptor2d)
---C++: inline
returns Real;
LastParameter(myclass; C:IntCurveCurve)
LastParameter(myclass; C:Curve2d from Adaptor2d)
---C++: inline
returns Real;
Value (myclass; C: IntCurveCurve; X: Real)
Value (myclass; C: Curve2d from Adaptor2d; X: Real)
---C++: inline
returns Pnt2d from gp;
D0 (myclass; C: IntCurveCurve; U: Real ;
D0 (myclass; C: Curve2d from Adaptor2d; U: Real ;
P: out Pnt2d);
---C++: inline
D1 (myclass; C: IntCurveCurve; U: Real ;
D1 (myclass; C: Curve2d from Adaptor2d; U: Real ;
P: out Pnt2d; T: out Vec2d);
---C++: inline
D2 (myclass; C: IntCurveCurve; U: Real ;
D2 (myclass; C: Curve2d from Adaptor2d; U: Real ;
P: out Pnt2d; T,N: out Vec2d);
---C++: inline
D3 (myclass; C: IntCurveCurve; U: Real ;
D3 (myclass; C: Curve2d from Adaptor2d; U: Real ;
P: out Pnt2d; T,N,V: out Vec2d);
---C++: inline
DN(myclass; C: IntCurveCurve; U: Real ;
DN(myclass; C: Curve2d from Adaptor2d; U: Real ;
N: Integer from Standard)
returns Vec2d;
---C++: inline
NbIntervals(myclass ; C: IntCurveCurve)
NbIntervals(myclass ; C: Curve2d from Adaptor2d)
---Purpose : output the number of interval of continuity C2 of
-- the curve
---C++: inline
returns Integer from Standard;
Intervals (myclass; C: IntCurveCurve
Intervals (myclass; C: Curve2d from Adaptor2d
; Tab : out Array1OfReal from TColStd);
---Purpose: compute Tab.
---C++: inline
GetInterval (myclass; C: IntCurveCurve
GetInterval (myclass; C: Curve2d from Adaptor2d
; Index : Integer from Standard
; Tab : Array1OfReal from TColStd
; U1, U2 : out Real from Standard);
@@ -167,11 +167,11 @@ is
-- used if Type == Composite.
---C++: inline
Degree(myclass; C : IntCurveCurve) returns Integer from Standard;
Degree(myclass; C : Curve2d from Adaptor2d) returns Integer from Standard;
---C++: inline
end CurveTool;
end Geom2dCurveTool;

View File

@@ -14,14 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dInt_Geom2dCurveTool.ixx>
#include <GeomAbs_CurveType.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Adaptor2d_Curve2d.hxx>
//============================================================
Standard_Integer Geom2dInt_CurveTool::NbSamples (const IntCurveCurve& C,
Standard_Integer Geom2dInt_Geom2dCurveTool::NbSamples (const Adaptor2d_Curve2d& C,
const Standard_Real U0,
const Standard_Real U1) {
GeomAbs_CurveType typC = C.GetType();
@@ -51,7 +55,7 @@ Standard_Integer Geom2dInt_CurveTool::NbSamples (const IntCurveCurve& C,
return((Standard_Integer)nbs);
}
//============================================================
Standard_Integer Geom2dInt_CurveTool::NbSamples (const IntCurveCurve& C) {
Standard_Integer Geom2dInt_Geom2dCurveTool::NbSamples (const Adaptor2d_Curve2d& C) {
GeomAbs_CurveType typC = C.GetType();
static Standard_Real nbsOther = 10.0;
Standard_Real nbs = nbsOther;

View File

@@ -14,8 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include IntCurveCurve_hxx
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_Shape.hxx>
@@ -26,52 +24,53 @@
#include <gp_Hypr2d.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Adaptor2d_Curve2d.hxx>
#define IS_C2_COMPOSITE 0
//============================================================
inline GeomAbs_CurveType Geom2dInt_CurveTool::GetType(const IntCurveCurve& C) {
inline GeomAbs_CurveType Geom2dInt_Geom2dCurveTool::GetType(const Adaptor2d_Curve2d& C) {
return(C.GetType());
}
//============================================================
inline gp_Lin2d Geom2dInt_CurveTool::Line (const IntCurveCurve& C) {
inline gp_Lin2d Geom2dInt_Geom2dCurveTool::Line (const Adaptor2d_Curve2d& C) {
return(C.Line());
}
//============================================================
inline gp_Circ2d Geom2dInt_CurveTool::Circle (const IntCurveCurve& C) {
inline gp_Circ2d Geom2dInt_Geom2dCurveTool::Circle (const Adaptor2d_Curve2d& C) {
return(C.Circle());
}
//============================================================
inline gp_Elips2d Geom2dInt_CurveTool::Ellipse (const IntCurveCurve& C) {
inline gp_Elips2d Geom2dInt_Geom2dCurveTool::Ellipse (const Adaptor2d_Curve2d& C) {
return(C.Ellipse());
}
//============================================================
inline gp_Parab2d Geom2dInt_CurveTool::Parabola (const IntCurveCurve& C) {
inline gp_Parab2d Geom2dInt_Geom2dCurveTool::Parabola (const Adaptor2d_Curve2d& C) {
return(C.Parabola());
}
//============================================================
inline gp_Hypr2d Geom2dInt_CurveTool::Hyperbola (const IntCurveCurve& C) {
inline gp_Hypr2d Geom2dInt_Geom2dCurveTool::Hyperbola (const Adaptor2d_Curve2d& C) {
return(C.Hyperbola());
}
//============================================================
inline gp_Pnt2d Geom2dInt_CurveTool::Value (const IntCurveCurve& C,
inline gp_Pnt2d Geom2dInt_Geom2dCurveTool::Value (const Adaptor2d_Curve2d& C,
const Standard_Real U) {
return(C.Value(U));
}
//============================================================
inline void Geom2dInt_CurveTool::D0(const IntCurveCurve& C,
inline void Geom2dInt_Geom2dCurveTool::D0(const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P) {
C.D0(U,P);
}
//============================================================
inline void Geom2dInt_CurveTool::D1 (const IntCurveCurve& C,
inline void Geom2dInt_Geom2dCurveTool::D1 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T) {
C.D1(U,P,T);
}
//============================================================
inline void Geom2dInt_CurveTool::D2 (const IntCurveCurve& C,
inline void Geom2dInt_Geom2dCurveTool::D2 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T,
@@ -81,7 +80,7 @@ inline void Geom2dInt_CurveTool::D2 (const IntCurveCurve& C,
}
//============================================================
inline void Geom2dInt_CurveTool::D3 (const IntCurveCurve& C,
inline void Geom2dInt_Geom2dCurveTool::D3 (const Adaptor2d_Curve2d& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T,
@@ -91,7 +90,7 @@ inline void Geom2dInt_CurveTool::D3 (const IntCurveCurve& C,
C.D3(U,P,T,N,V);
}
//============================================================
inline gp_Vec2d Geom2dInt_CurveTool::DN(const Adaptor2d_Curve2d& C,
inline gp_Vec2d Geom2dInt_Geom2dCurveTool::DN(const Adaptor2d_Curve2d& C,
const Standard_Real U,
const Standard_Integer N)
{
@@ -99,25 +98,25 @@ inline gp_Vec2d Geom2dInt_CurveTool::DN(const Adaptor2d_Curve2d& C,
}
//============================================================
inline Standard_Real Geom2dInt_CurveTool::FirstParameter (const IntCurveCurve& C) {
inline Standard_Real Geom2dInt_Geom2dCurveTool::FirstParameter (const Adaptor2d_Curve2d& C) {
return(C.FirstParameter());
}
//============================================================
inline Standard_Real Geom2dInt_CurveTool::LastParameter (const IntCurveCurve& C) {
inline Standard_Real Geom2dInt_Geom2dCurveTool::LastParameter (const Adaptor2d_Curve2d& C) {
return(C.LastParameter());
}
//============================================================
//== tolerance used by mathemetical algorithms
//==
inline Standard_Real Geom2dInt_CurveTool::EpsX (const IntCurveCurve& ) {
inline Standard_Real Geom2dInt_Geom2dCurveTool::EpsX (const Adaptor2d_Curve2d& ) {
return(1.0e-10);
}
//------------------------------------------------------------
inline Standard_Real Geom2dInt_CurveTool::EpsX (const IntCurveCurve& C,const Standard_Real Eps_XYZ) {
inline Standard_Real Geom2dInt_Geom2dCurveTool::EpsX (const Adaptor2d_Curve2d& C,const Standard_Real Eps_XYZ) {
return(C.Resolution(Eps_XYZ));
}
//============================================================
inline void Geom2dInt_CurveTool::Intervals(const IntCurveCurve& C,
inline void Geom2dInt_Geom2dCurveTool::Intervals(const Adaptor2d_Curve2d& C,
TColStd_Array1OfReal& Tab) {
#if IS_C2_COMPOSITE
C.Intervals(Tab,GeomAbs_C2);
@@ -126,8 +125,8 @@ inline void Geom2dInt_CurveTool::Intervals(const IntCurveCurve& C,
#endif
}
//============================================================
//inline void Geom2dInt_CurveTool::GetInterval(const IntCurveCurve& C,
inline void Geom2dInt_CurveTool::GetInterval(const IntCurveCurve& ,
//inline void Geom2dInt_Geom2dCurveTool::GetInterval(const Adaptor2d_Curve2d& C,
inline void Geom2dInt_Geom2dCurveTool::GetInterval(const Adaptor2d_Curve2d& ,
const Standard_Integer i,
const TColStd_Array1OfReal& Tab,
Standard_Real& a,
@@ -136,7 +135,7 @@ inline void Geom2dInt_CurveTool::GetInterval(const IntCurveCurve& ,
b = Tab.Value(i+1);
}
//============================================================
inline Standard_Integer Geom2dInt_CurveTool::NbIntervals(const IntCurveCurve& C) {
inline Standard_Integer Geom2dInt_Geom2dCurveTool::NbIntervals(const Adaptor2d_Curve2d& C) {
Standard_Integer N=1;
#if IS_C2_COMPOSITE
N = C.NbIntervals(GeomAbs_C2);
@@ -147,7 +146,7 @@ inline Standard_Integer Geom2dInt_CurveTool::NbIntervals(const IntCurveCurve& C)
}
//============================================================
inline Standard_Integer Geom2dInt_CurveTool::Degree(const IntCurveCurve& C)
inline Standard_Integer Geom2dInt_Geom2dCurveTool::Degree(const Adaptor2d_Curve2d& C)
{
return C.Degree();
}