mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
26
src/Geom2dToIGES/Geom2dToIGES.cdl
Executable file
26
src/Geom2dToIGES/Geom2dToIGES.cdl
Executable file
@@ -0,0 +1,26 @@
|
||||
-- File: Geom2dToIGES.cdl
|
||||
-- Created: Thu Nov 17 13:55:58 1994
|
||||
-- Author: Marie Jose MARTZ
|
||||
-- <mjm@minox>
|
||||
---Copyright: Matra Datavision 1994
|
||||
|
||||
package Geom2dToIGES
|
||||
|
||||
--- Purpose: Creation des entites geometriques de IGES
|
||||
-- a partir des entites de Geom2d.
|
||||
|
||||
uses Interface, IGESData, IGESBasic, IGESConvGeom, IGESGeom, IGESSolid, IGESToBRep,
|
||||
gp, Geom, Geom2d, GeomLProp, TColStd, TopoDS, TopTools,
|
||||
Transfer, TransferBRep, BRep, TCollection, ElCLib
|
||||
|
||||
is
|
||||
|
||||
-- classes du package
|
||||
|
||||
class Geom2dCurve;
|
||||
class Geom2dEntity;
|
||||
class Geom2dPoint;
|
||||
class Geom2dVector;
|
||||
|
||||
|
||||
end Geom2dToIGES;
|
64
src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cdl
Executable file
64
src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cdl
Executable file
@@ -0,0 +1,64 @@
|
||||
-- File: Geom2dToIGES_Geom2dCurve.cdl
|
||||
-- Created: Wed Feb 1 15:36:03 1995
|
||||
-- Author: Marie Jose MARTZ
|
||||
-- <mjm@pronox>
|
||||
---Copyright: Matra Datavision 1995
|
||||
|
||||
|
||||
class Geom2dCurve from Geom2dToIGES inherits Geom2dEntity from Geom2dToIGES
|
||||
|
||||
---Purpose: This class implements the transfer of the Curve Entity from Geom2d
|
||||
-- To IGES. These can be :
|
||||
-- Curve
|
||||
-- . BoundedCurve
|
||||
-- * BSplineCurve
|
||||
-- * BezierCurve
|
||||
-- * TrimmedCurve
|
||||
-- . Conic
|
||||
-- * Circle
|
||||
-- * Ellipse
|
||||
-- * Hyperbloa
|
||||
-- * Line
|
||||
-- * Parabola
|
||||
-- . OffsetCurve
|
||||
|
||||
|
||||
uses
|
||||
|
||||
Curve from Geom2d,
|
||||
BoundedCurve from Geom2d,
|
||||
BSplineCurve from Geom2d,
|
||||
BezierCurve from Geom2d,
|
||||
TrimmedCurve from Geom2d,
|
||||
Conic from Geom2d,
|
||||
Circle from Geom2d,
|
||||
Ellipse from Geom2d,
|
||||
Hyperbola from Geom2d,
|
||||
Line from Geom2d,
|
||||
Parabola from Geom2d,
|
||||
OffsetCurve from Geom2d,
|
||||
IGESEntity from IGESData,
|
||||
Geom2dEntity from Geom2dToIGES
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create returns Geom2dCurve from Geom2dToIGES;
|
||||
|
||||
|
||||
Create(G2dE : Geom2dEntity from Geom2dToIGES)
|
||||
returns Geom2dCurve from Geom2dToIGES;
|
||||
---Purpose : Creates a tool Geom2dCurve ready to run and sets its
|
||||
-- fields as G2dE's.
|
||||
|
||||
Transfer2dCurve (me : in out;
|
||||
start : Curve from Geom2d;
|
||||
Udeb : Real from Standard;
|
||||
Ufin : Real from Standard)
|
||||
returns mutable IGESEntity from IGESData;
|
||||
---Purpose : Transfert an Entity from Geom2d to IGES. If this
|
||||
-- Entity could not be converted, this member returns a NullEntity.
|
||||
|
||||
end Geom2dCurve;
|
||||
|
||||
|
104
src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx
Executable file
104
src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx
Executable file
@@ -0,0 +1,104 @@
|
||||
// Copyright: Matra-Datavision 1995
|
||||
// File: Geom2dToIGES_Geom2dCurve.cxx
|
||||
// Created: Wed Feb 1 15:58:25 1995
|
||||
// Author: Marie Jose MARTZ
|
||||
// <mjm>
|
||||
//#53 rln 24.12.98 CCI60005
|
||||
//#57 rln 25.12.98 avoid code duplication
|
||||
|
||||
#include <Geom2dToIGES_Geom2dCurve.ixx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_BoundedCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2d_OffsetCurve.hxx>
|
||||
#include <Geom2d_Conic.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
|
||||
//#include <Geom2dConvert.hxx>
|
||||
|
||||
#include <gp.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_XY.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
#include <IGESData_IGESEntity.hxx>
|
||||
#include <IGESData_ToolLocation.hxx>
|
||||
|
||||
#include <IGESGeom_BSplineCurve.hxx>
|
||||
#include <IGESGeom_CircularArc.hxx>
|
||||
#include <IGESGeom_CompositeCurve.hxx>
|
||||
#include <IGESGeom_ConicArc.hxx>
|
||||
#include <IGESGeom_CopiousData.hxx>
|
||||
#include <IGESGeom_CurveOnSurface.hxx>
|
||||
#include <IGESGeom_Line.hxx>
|
||||
#include <IGESGeom_Point.hxx>
|
||||
#include <IGESGeom_OffsetCurve.hxx>
|
||||
#include <IGESGeom_TransformationMatrix.hxx>
|
||||
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <GeomToIGES_GeomCurve.hxx>
|
||||
#include <GeomAPI.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dCurve
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve()
|
||||
:Geom2dToIGES_Geom2dEntity()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dCurve
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dCurve::Geom2dToIGES_Geom2dCurve
|
||||
(const Geom2dToIGES_Geom2dEntity& G2dE)
|
||||
:Geom2dToIGES_Geom2dEntity(G2dE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Transfer des Entites Curve de Geom2d vers IGES
|
||||
// Transfer2dCurve
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESData_IGESEntity) Geom2dToIGES_Geom2dCurve::Transfer2dCurve
|
||||
(const Handle(Geom2d_Curve)& start, const Standard_Real Udeb, const Standard_Real Ufin)
|
||||
{
|
||||
Handle(IGESData_IGESEntity) res;
|
||||
if (start.IsNull()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
//#57 rln 25.12.98 avoid code duplication
|
||||
GeomToIGES_GeomCurve GC;
|
||||
GC.SetModel (GetModel());
|
||||
GC.SetUnit (1.); //not scale 2D curves
|
||||
return GC.TransferCurve (GeomAPI::To3d (start, gp_Pln (0, 0, 1, 0)), Udeb, Ufin);
|
||||
}
|
||||
|
51
src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cdl
Executable file
51
src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cdl
Executable file
@@ -0,0 +1,51 @@
|
||||
-- File: Geom2dToIGES_Geom2dEntity.cdl
|
||||
-- Created: Wed Sep 13 14:27:57 1995
|
||||
-- Author: Marie Jose MARTZ
|
||||
-- <mjm@pronox>
|
||||
---Copyright: Matra Datavision 1995
|
||||
|
||||
class Geom2dEntity from Geom2dToIGES
|
||||
|
||||
|
||||
---Purpose : provides methods to transfer Geom2d entity from CASCADE to IGES.
|
||||
|
||||
uses
|
||||
|
||||
Real from Standard,
|
||||
IGESEntity from IGESData,
|
||||
IGESModel from IGESData
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
returns Geom2dEntity from Geom2dToIGES;
|
||||
---Purpose : Creates a tool Geom2dEntity
|
||||
|
||||
Create(GE : Geom2dEntity from Geom2dToIGES)
|
||||
returns Geom2dEntity from Geom2dToIGES;
|
||||
---Purpose : Creates a tool ready to run and sets its
|
||||
-- fields as GE's.
|
||||
|
||||
SetModel(me : in out; model : IGESModel from IGESData);
|
||||
---Purpose : Set the value of "TheModel"
|
||||
|
||||
GetModel(me)
|
||||
returns IGESModel from IGESData;
|
||||
---Purpose : Returns the value of "TheModel"
|
||||
|
||||
SetUnit(me: in out; unit: Real);
|
||||
---Purpose : Sets the value of the UnitFlag
|
||||
|
||||
GetUnit(me)
|
||||
returns Real from Standard;
|
||||
---Purpose : Returns the value of the UnitFlag of the header of the model
|
||||
-- in millimeters.
|
||||
|
||||
fields
|
||||
|
||||
TheModel : IGESModel from IGESData ;
|
||||
|
||||
TheUnitFactor : Real from Standard;
|
||||
|
||||
end Geom2dEntity;
|
||||
|
80
src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx
Executable file
80
src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx
Executable file
@@ -0,0 +1,80 @@
|
||||
// Copyright: Matra-Datavision 1995
|
||||
// File: Geom2dToIGES_Geom2dEntity.cxx
|
||||
// Created: Wed Sep 13 14:44:29 1995
|
||||
// Author: Marie Jose MARTZ
|
||||
// <mjm>
|
||||
//rln 06.01.98 new method SetUnit
|
||||
|
||||
|
||||
#include <Geom2dToIGES_Geom2dEntity.ixx>
|
||||
|
||||
#include <Geom2dToIGES_Geom2dCurve.hxx>
|
||||
#include <Geom2dToIGES_Geom2dPoint.hxx>
|
||||
#include <Geom2dToIGES_Geom2dVector.hxx>
|
||||
|
||||
#include <IGESData_IGESModel.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom2dToIGES_Geom2dEntity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dEntity::Geom2dToIGES_Geom2dEntity()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom2dToIGES_Geom2dEntity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dEntity::Geom2dToIGES_Geom2dEntity
|
||||
(const Geom2dToIGES_Geom2dEntity& other)
|
||||
{
|
||||
TheUnitFactor = other.GetUnit();
|
||||
TheModel = other.GetModel();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SetModel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom2dToIGES_Geom2dEntity::SetModel(const Handle(IGESData_IGESModel)& model)
|
||||
{
|
||||
TheModel = model;
|
||||
Standard_Real unitfactor = TheModel->GlobalSection().UnitValue();
|
||||
TheUnitFactor = unitfactor;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetModel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(IGESData_IGESModel) Geom2dToIGES_Geom2dEntity::GetModel() const
|
||||
{
|
||||
return TheModel;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetUnit
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom2dToIGES_Geom2dEntity::SetUnit(const Standard_Real unit)
|
||||
{
|
||||
TheUnitFactor = unit;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetUnit
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Real Geom2dToIGES_Geom2dEntity::GetUnit() const
|
||||
{
|
||||
return TheUnitFactor;
|
||||
}
|
||||
|
47
src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cdl
Executable file
47
src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cdl
Executable file
@@ -0,0 +1,47 @@
|
||||
-- File: Geom2dToIGES_Geom2dPoint.cdl
|
||||
-- Created: Wed Feb 1 15:37:28 1995
|
||||
-- Author: Marie Jose MARTZ
|
||||
-- <mjm@pronox>
|
||||
---Copyright: Matra Datavision 1995
|
||||
|
||||
class Geom2dPoint from Geom2dToIGES inherits Geom2dEntity from Geom2dToIGES
|
||||
|
||||
---Purpose: This class implements the transfer of the Point Entity from Geom2d
|
||||
-- to IGES . These are :
|
||||
-- . 2dPoint
|
||||
-- * 2dCartesianPoint
|
||||
|
||||
|
||||
uses
|
||||
|
||||
Point from Geom2d,
|
||||
CartesianPoint from Geom2d,
|
||||
Point from IGESGeom,
|
||||
Geom2dEntity from Geom2dToIGES
|
||||
|
||||
is
|
||||
|
||||
Create returns Geom2dPoint from Geom2dToIGES;
|
||||
|
||||
|
||||
Create(G2dE : Geom2dEntity from Geom2dToIGES)
|
||||
returns Geom2dPoint from Geom2dToIGES;
|
||||
---Purpose : Creates a tool Geom2dPoint ready to run and sets its
|
||||
-- fields as G2dE's.
|
||||
|
||||
Transfer2dPoint (me : in out;
|
||||
start : Point from Geom2d)
|
||||
returns mutable Point from IGESGeom;
|
||||
---Purpose : Transfert a Point from Geom to IGES. If this
|
||||
-- Entity could not be converted, this member returns a NullEntity.
|
||||
|
||||
Transfer2dPoint (me : in out;
|
||||
start : CartesianPoint from Geom2d)
|
||||
returns mutable Point from IGESGeom;
|
||||
---Purpose : Transfert a CartesianPoint from Geom to IGES. If this
|
||||
-- Entity could not be converted, this member returns a NullEntity.
|
||||
|
||||
|
||||
end Geom2dPoint;
|
||||
|
||||
|
77
src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx
Executable file
77
src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx
Executable file
@@ -0,0 +1,77 @@
|
||||
// Copyright: Matra-Datavision 1995
|
||||
// File: Geom2dToIGES_Geom2dPoint.cxx
|
||||
// Created: Wed Feb 1 15:58:11 1995
|
||||
// Author: Marie Jose MARTZ
|
||||
// <mjm>
|
||||
|
||||
#include <Geom2dToIGES_Geom2dPoint.ixx>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
#include <Geom2d_Point.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
|
||||
#include <IGESGeom_Point.hxx>
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dPoint
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint()
|
||||
:Geom2dToIGES_Geom2dEntity()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dPoint
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dPoint::Geom2dToIGES_Geom2dPoint
|
||||
(const Geom2dToIGES_Geom2dEntity& G2dE)
|
||||
:Geom2dToIGES_Geom2dEntity(G2dE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Transfer de Point2d de Geom2d vers IGES
|
||||
// Tranfer2dPoint
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint( const Handle(Geom2d_Point)& P)
|
||||
{
|
||||
|
||||
Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
|
||||
if (P.IsNull()) {
|
||||
return Piges;
|
||||
}
|
||||
|
||||
Standard_Real X,Y;
|
||||
P->Coord (X,Y);
|
||||
Handle(IGESBasic_SubfigureDef) voidsubdef;
|
||||
Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
|
||||
return Piges;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Transfer de CartesianPoint de Geom2d vers IGES
|
||||
// Tranfer2dPoint
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESGeom_Point) Geom2dToIGES_Geom2dPoint::Transfer2dPoint
|
||||
( const Handle(Geom2d_CartesianPoint)& P)
|
||||
{
|
||||
|
||||
Handle(IGESGeom_Point) Piges = new IGESGeom_Point;
|
||||
if (P.IsNull()) {
|
||||
return Piges;
|
||||
}
|
||||
|
||||
Standard_Real X,Y;
|
||||
P->Coord (X,Y);
|
||||
Handle(IGESBasic_SubfigureDef) voidsubdef;
|
||||
Piges-> Init(gp_XYZ(X,Y,0.), voidsubdef);
|
||||
return Piges;
|
||||
}
|
54
src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cdl
Executable file
54
src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cdl
Executable file
@@ -0,0 +1,54 @@
|
||||
-- File: Geom2dToIGES_Geom2dVector.cdl
|
||||
-- Created: Wed Feb 1 15:38:00 1995
|
||||
-- Author: Marie Jose MARTZ
|
||||
-- <mjm@pronox>
|
||||
---Copyright: Matra Datavision 1995
|
||||
|
||||
class Geom2dVector from Geom2dToIGES inherits Geom2dEntity from Geom2dToIGES
|
||||
|
||||
---Purpose: This class implements the transfer of the Vector from Geom2d
|
||||
-- to IGES . These can be :
|
||||
-- . Vector
|
||||
-- * Direction
|
||||
-- * VectorWithMagnitude
|
||||
|
||||
uses
|
||||
|
||||
Vector from Geom2d,
|
||||
VectorWithMagnitude from Geom2d,
|
||||
Direction from Geom2d,
|
||||
Direction from IGESGeom,
|
||||
Geom2dEntity from Geom2dToIGES
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create returns Geom2dVector from Geom2dToIGES;
|
||||
|
||||
|
||||
Create(G2dE : Geom2dEntity from Geom2dToIGES)
|
||||
returns Geom2dVector from Geom2dToIGES;
|
||||
---Purpose : Creates a tool Geom2dVector ready to run and sets its
|
||||
-- fields as G2dE's.
|
||||
|
||||
Transfer2dVector (me : in out;
|
||||
start : Vector from Geom2d)
|
||||
returns mutable Direction from IGESGeom;
|
||||
---Purpose : Transfert a GeometryEntity which answer True to the
|
||||
-- member : BRepToIGES::IsGeomVector(Geometry). If this
|
||||
-- Entity could not be converted, this member returns a NullEntity.
|
||||
|
||||
|
||||
Transfer2dVector (me : in out;
|
||||
start : VectorWithMagnitude from Geom2d)
|
||||
returns mutable Direction from IGESGeom;
|
||||
|
||||
|
||||
Transfer2dVector (me : in out;
|
||||
start : Direction from Geom2d)
|
||||
returns mutable Direction from IGESGeom;
|
||||
|
||||
|
||||
end Geom2dVector;
|
||||
|
||||
|
104
src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx
Executable file
104
src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx
Executable file
@@ -0,0 +1,104 @@
|
||||
// Copyright: Matra-Datavision 1995
|
||||
// File: Geom2dToIGES_Geom2dVector.cxx
|
||||
// Created: Wed Feb 1 15:58:37 1995
|
||||
// Author: Marie Jose MARTZ
|
||||
// <mjm>
|
||||
|
||||
#include <Geom2dToIGES_Geom2dVector.ixx>
|
||||
|
||||
#include <Geom2d_Vector.hxx>
|
||||
#include <Geom2d_VectorWithMagnitude.hxx>
|
||||
#include <Geom2d_Direction.hxx>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
#include <IGESGeom_Direction.hxx>
|
||||
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dVector
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dVector::Geom2dToIGES_Geom2dVector()
|
||||
:Geom2dToIGES_Geom2dEntity()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Geom2dToIGES_Geom2dVector
|
||||
//=============================================================================
|
||||
|
||||
Geom2dToIGES_Geom2dVector::Geom2dToIGES_Geom2dVector
|
||||
(const Geom2dToIGES_Geom2dEntity& G2dE)
|
||||
:Geom2dToIGES_Geom2dEntity(G2dE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Transfer des Entites Vector de Geom2d vers IGES
|
||||
// Transfer2dVector
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESGeom_Direction) Geom2dToIGES_Geom2dVector::Transfer2dVector
|
||||
(const Handle(Geom2d_Vector)& start)
|
||||
{
|
||||
Handle(IGESGeom_Direction) res;
|
||||
if (start.IsNull()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if (start->IsKind(STANDARD_TYPE(Geom2d_VectorWithMagnitude))) {
|
||||
DeclareAndCast(Geom2d_VectorWithMagnitude, VMagn, start);
|
||||
res = Transfer2dVector(VMagn);
|
||||
}
|
||||
else if (start->IsKind(STANDARD_TYPE(Geom2d_Direction))) {
|
||||
DeclareAndCast(Geom2d_Direction, Direction, start);
|
||||
res = Transfer2dVector(Direction);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Transfer des Entites VectorWithMagnitude de Geom2d vers IGES
|
||||
// Transfer2dVector
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESGeom_Direction) Geom2dToIGES_Geom2dVector::Transfer2dVector
|
||||
(const Handle(Geom2d_VectorWithMagnitude)& start)
|
||||
{
|
||||
Handle(IGESGeom_Direction) Dir = new IGESGeom_Direction;
|
||||
if (start.IsNull()) {
|
||||
return Dir;
|
||||
}
|
||||
|
||||
Standard_Real X,Y;
|
||||
start->Coord(X,Y);
|
||||
Standard_Real M = start->Magnitude();
|
||||
Dir->Init(gp_XYZ(X/M, Y/M, 0.));
|
||||
return Dir;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Transfer des Entites Direction de Geom2d vers IGES
|
||||
// Transfer2dVector
|
||||
//=============================================================================
|
||||
|
||||
Handle(IGESGeom_Direction) Geom2dToIGES_Geom2dVector::Transfer2dVector
|
||||
(const Handle(Geom2d_Direction)& start)
|
||||
{
|
||||
Handle(IGESGeom_Direction) Dir = new IGESGeom_Direction;
|
||||
if (start.IsNull()) {
|
||||
return Dir;
|
||||
}
|
||||
|
||||
Standard_Real X,Y;
|
||||
start->Coord(X,Y);
|
||||
Dir->Init(gp_XYZ(X, Y, 0.));
|
||||
return Dir;
|
||||
}
|
Reference in New Issue
Block a user