1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

34
src/LProp3d/LProp3d.cdl Executable file
View File

@@ -0,0 +1,34 @@
-- File: LProp3d.cdl
-- Created: Fri Aug 2 17:10:21 2002
-- Author: Alexander KARTOMIN (akm)
-- <a-kartomin@opencascade.com>
-- NB: This originates from BRepLProp being abstracted of BRep.
---Copyright: Matra Datavision 2002
package LProp3d
---Purpose: Handles local properties of curves and surfaces from the
-- package Adaptor3d.
-- SeeAlso: Package LProp.
uses Standard, gp, Adaptor3d, GeomAbs, LProp
is
class CurveTool;
class SurfaceTool;
class CLProps from LProp3d
instantiates CLProps from LProp(HCurve from Adaptor3d,
Vec from gp,
Pnt from gp,
Dir from gp,
CurveTool from LProp3d);
class SLProps from LProp3d
instantiates SLProps from LProp(HSurface from Adaptor3d,
SurfaceTool from LProp3d);
end LProp3d;

View File

@@ -0,0 +1,52 @@
-- File: LProp3d_CurveTool.cdl
-- Created: Fri Aug 2 17:14:29 2002
-- Author: Alexander KARTOMIN (akm)
-- <a-kartomin@opencascade.com>
-- NB: This originates from BRepLProp being abstracted of BRep.
---Copyright: Matra Datavision 2002
class CurveTool from LProp3d
uses Vec from gp,
Pnt from gp,
Dir from gp,
HCurve from Adaptor3d
is
Value(myclass; C : HCurve from Adaptor3d; U : Real; P : out Pnt);
---Purpose: Computes the point <P> of parameter <U> on the HCurve <C>.
D1 (myclass; C : HCurve from Adaptor3d;
U : Real; P : out Pnt; V1 : out Vec);
---Purpose: Computes the point <P> and first derivative <V1> of
-- parameter <U> on the HCurve <C>.
D2 (myclass; C : HCurve from Adaptor3d;
U : Real; P : out Pnt; V1, V2 : out Vec);
---Purpose: Computes the point <P>, the first derivative <V1> and second
-- derivative <V2> of parameter <U> on the HCurve <C>.
D3 (myclass; C : HCurve from Adaptor3d;
U : Real; P : out Pnt; V1, V2, V3 : out Vec);
---Purpose: Computes the point <P>, the first derivative <V1>, the
-- second derivative <V2> and third derivative <V3> of
-- parameter <U> on the HCurve <C>.
Continuity(myclass; C : HCurve from Adaptor3d) returns Integer;
---Purpose: returns the order of continuity of the HCurve <C>.
-- returns 1 : first derivative only is computable
-- returns 2 : first and second derivative only are computable.
-- returns 3 : first, second and third are computable.
FirstParameter(myclass; C : HCurve from Adaptor3d) returns Real;
---Purpose: returns the first parameter bound of the HCurve.
--
LastParameter(myclass; C : HCurve from Adaptor3d) returns Real;
---Purpose: returns the last parameter bound of the HCurve.
-- FirstParameter must be less than LastParamenter.
end CurveTool;

119
src/LProp3d/LProp3d_CurveTool.cxx Executable file
View File

@@ -0,0 +1,119 @@
// File: LProp3d_CurveTool.cxx
// Created: Thu Feb 24 11:09:42 1994
// Author: Laurent BOURESCHE
// <lbo@nonox>
#include <LProp3d_CurveTool.ixx>
//=======================================================================
//function : Value
//purpose :
//=======================================================================
void LProp3d_CurveTool::Value(const Handle(Adaptor3d_HCurve)& C,
const Standard_Real U,
gp_Pnt& P)
{
P = C->Value(U);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
void LProp3d_CurveTool::D1(const Handle(Adaptor3d_HCurve)& C,
const Standard_Real U,
gp_Pnt& P,
gp_Vec& V1)
{
C->D1(U,P,V1);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
void LProp3d_CurveTool::D2(const Handle(Adaptor3d_HCurve)& C,
const Standard_Real U,
gp_Pnt& P,
gp_Vec& V1,
gp_Vec& V2)
{
C->D2(U,P,V1,V2);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
void LProp3d_CurveTool::D3(const Handle(Adaptor3d_HCurve)& C,
const Standard_Real U,
gp_Pnt& P,
gp_Vec& V1,
gp_Vec& V2,
gp_Vec& V3)
{
C->D3(U,P,V1,V2,V3);
}
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
Standard_Integer LProp3d_CurveTool::Continuity
(const Handle(Adaptor3d_HCurve)& C)
{
GeomAbs_Shape s = C->Continuity();
switch (s) {
case GeomAbs_C0:
return 0;
case GeomAbs_C1:
return 1;
case GeomAbs_C2:
return 2;
case GeomAbs_C3:
return 3;
case GeomAbs_G1:
return 0;
case GeomAbs_G2:
return 0;
case GeomAbs_CN:
return 3;
};
return 0;
}
//=======================================================================
//function : FirstParameter
//purpose :
//=======================================================================
Standard_Real LProp3d_CurveTool::FirstParameter
(const Handle(Adaptor3d_HCurve)& C)
{
return C->FirstParameter();
}
//=======================================================================
//function : LastParameter
//purpose :
//=======================================================================
Standard_Real LProp3d_CurveTool::LastParameter
(const Handle(Adaptor3d_HCurve)& C)
{
return C->LastParameter();
}

View File

@@ -0,0 +1,42 @@
-- File: LProp3d_SurfaceTool.cdl
-- Created: Fri Aug 2 17:14:36 2002
-- Author: Alexander KARTOMIN (akm)
-- <a-kartomin@opencascade.com>
-- NB: This originates from BRepLProp being abstracted of BRep.
---Copyright: Matra Datavision 2002
class SurfaceTool from LProp3d
uses Pnt from gp,
Vec from gp,
HSurface from Adaptor3d
is
Value(myclass; S : HSurface; U, V : Real; P : out Pnt);
---Purpose: Computes the point <P> of parameter <U> and <V> on the
-- HSurface <S>.
D1 (myclass; S : HSurface; U, V : Real; P : out Pnt; D1U, D1V : out Vec);
---Purpose: Computes the point <P> and first derivative <D1*> of
-- parameter <U> and <V> on the HSurface <S>.
D2 (myclass; S : HSurface; U, V : Real;
P : out Pnt; D1U, D1V, D2U, D2V, DUV : out Vec);
---Purpose: Computes the point <P>, the first derivative <D1*> and second
-- derivative <D2*> of parameter <U> and <V> on the HSurface <S>.
DN (myclass; S : HSurface; U, V : Real; IU, IV : Integer)
returns Vec;
Continuity(myclass; S : HSurface) returns Integer;
---Purpose: returns the order of continuity of the HSurface <S>.
-- returns 1 : first derivative only is computable
-- returns 2 : first and second derivative only are computable.
Bounds(myclass; S : HSurface; U1, V1, U2, V2 : out Real);
---Purpose: returns the bounds of the HSurface.
end SurfaceTool;

View File

@@ -0,0 +1,123 @@
// File: LProp3d_SurfaceTool.cxx
// Created: Thu Feb 24 16:44:32 1994
// Author: Laurent BOURESCHE
// <lbo@nonox>
#include <LProp3d_SurfaceTool.ixx>
//=======================================================================
//function : Value
//purpose :
//=======================================================================
void LProp3d_SurfaceTool::Value(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P)
{
P = S->Value(U, V);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
void LProp3d_SurfaceTool::D1(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P,
gp_Vec& D1U,
gp_Vec& D1V)
{
S->D1(U, V, P, D1U, D1V);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
void LProp3d_SurfaceTool::D2(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
gp_Pnt& P,
gp_Vec& D1U,
gp_Vec& D1V,
gp_Vec& D2U,
gp_Vec& D2V,
gp_Vec& DUV)
{
S->D2(U, V, P, D1U, D1V, D2U, D2V, DUV);
}
//=======================================================================
//function : DN
//purpose :
//=======================================================================
gp_Vec LProp3d_SurfaceTool::DN(const Handle(Adaptor3d_HSurface)& S,
const Standard_Real U,
const Standard_Real V,
const Standard_Integer IU,
const Standard_Integer IV)
{
return S->DN(U, V, IU, IV);
}
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
Standard_Integer LProp3d_SurfaceTool::Continuity
(const Handle(Adaptor3d_HSurface)& S)
{
GeomAbs_Shape s = (GeomAbs_Shape) Min(S->UContinuity(),S->VContinuity());
switch (s) {
case GeomAbs_C0:
return 0;
case GeomAbs_C1:
return 1;
case GeomAbs_C2:
return 2;
case GeomAbs_C3:
return 3;
case GeomAbs_G1:
return 0;
case GeomAbs_G2:
return 0;
case GeomAbs_CN:
return 3;
};
return 0;
}
//=======================================================================
//function : Bounds
//purpose :
//=======================================================================
void LProp3d_SurfaceTool::Bounds(const Handle(Adaptor3d_HSurface)& S,
Standard_Real& U1,
Standard_Real& V1,
Standard_Real& U2,
Standard_Real& V2)
{
U1 = S->FirstUParameter();
V1 = S->FirstVParameter();
U2 = S->LastUParameter();
V2 = S->LastVParameter();
}