1 // Created on: 1993-06-17
2 // Created by: Martine LANGLOIS
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <Geom_Plane.hxx>
19 #include <GeomToStep_MakeAxis2Placement3d.hxx>
20 #include <GeomToStep_MakePlane.hxx>
23 #include <StdFail_NotDone.hxx>
24 #include <StepGeom_Axis2Placement3d.hxx>
25 #include <StepGeom_Plane.hxx>
26 #include <TCollection_HAsciiString.hxx>
28 //=============================================================================
29 // Creation d' un plane de prostep a partir d' un Pln de gp
30 //=============================================================================
31 GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P)
33 Handle(StepGeom_Plane) Plan = new StepGeom_Plane;
34 Handle(StepGeom_Axis2Placement3d) aPosition;
36 GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position());
37 aPosition = MkAxis2.Value();
38 Plan->SetPosition(aPosition);
39 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("");
45 //=============================================================================
46 // Creation d' un plane de prostep a partir d' un Plane de Geom
47 //=============================================================================
49 GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln)
52 Handle(StepGeom_Plane) Plan = new StepGeom_Plane;
53 Handle(StepGeom_Axis2Placement3d) aPosition;
57 GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position());
58 aPosition = MkAxis2.Value();
59 Plan->SetPosition(aPosition);
60 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("");
66 //=============================================================================
68 //=============================================================================
70 const Handle(StepGeom_Plane) &
71 GeomToStep_MakePlane::Value() const
73 StdFail_NotDone_Raise_if(!done, "");