b311480e |
1 | // Created on: 1993-07-02 |
2 | // Created by: Martine LANGLOIS |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | //:p0 abv 19.02.99: management of 'done' flag improved |
22 | |
23 | #include <StepToGeom_MakeElementarySurface.ixx> |
24 | #include <StepGeom_ElementarySurface.hxx> |
25 | #include <StepGeom_CylindricalSurface.hxx> |
26 | #include <StepGeom_ConicalSurface.hxx> |
27 | #include <StepGeom_SphericalSurface.hxx> |
28 | #include <StepGeom_ToroidalSurface.hxx> |
29 | #include <StepGeom_Plane.hxx> |
30 | #include <StepToGeom_MakeCylindricalSurface.hxx> |
31 | #include <StepToGeom_MakeConicalSurface.hxx> |
32 | #include <StepToGeom_MakeSphericalSurface.hxx> |
33 | #include <StepToGeom_MakeToroidalSurface.hxx> |
34 | #include <StepToGeom_MakePlane.hxx> |
35 | |
36 | //============================================================================= |
37 | // Creation d' une ElementarySurface de Geom a partir d' une |
38 | // ElementarySurface de Step |
39 | //============================================================================= |
40 | |
41 | Standard_Boolean StepToGeom_MakeElementarySurface::Convert (const Handle(StepGeom_ElementarySurface)& SS, Handle(Geom_ElementarySurface)& CS) |
42 | { |
43 | if (SS->IsKind(STANDARD_TYPE(StepGeom_Plane))) { |
44 | const Handle(StepGeom_Plane) Sur = Handle(StepGeom_Plane)::DownCast(SS); |
45 | return StepToGeom_MakePlane::Convert(Sur,*((Handle(Geom_Plane)*)&CS)); |
46 | } |
47 | if (SS->IsKind(STANDARD_TYPE(StepGeom_CylindricalSurface))) { |
48 | const Handle(StepGeom_CylindricalSurface) Sur = Handle(StepGeom_CylindricalSurface)::DownCast(SS); |
49 | return StepToGeom_MakeCylindricalSurface::Convert(Sur,*((Handle(Geom_CylindricalSurface)*)&CS)); |
50 | } |
51 | if (SS->IsKind(STANDARD_TYPE(StepGeom_ConicalSurface))) { |
52 | const Handle(StepGeom_ConicalSurface) Sur = Handle(StepGeom_ConicalSurface)::DownCast(SS); |
53 | return StepToGeom_MakeConicalSurface::Convert(Sur,*((Handle(Geom_ConicalSurface)*)&CS)); |
54 | } |
55 | if (SS->IsKind(STANDARD_TYPE(StepGeom_SphericalSurface))) { |
56 | const Handle(StepGeom_SphericalSurface) Sur = Handle(StepGeom_SphericalSurface)::DownCast(SS); |
57 | return StepToGeom_MakeSphericalSurface::Convert(Sur,*((Handle(Geom_SphericalSurface)*)&CS)); |
58 | } |
59 | if (SS->IsKind(STANDARD_TYPE(StepGeom_ToroidalSurface))) { |
60 | const Handle(StepGeom_ToroidalSurface) Sur = Handle(StepGeom_ToroidalSurface)::DownCast(SS); |
61 | return StepToGeom_MakeToroidalSurface::Convert(Sur,*((Handle(Geom_ToroidalSurface)*)&CS)); |
62 | } |
63 | return Standard_False; |
64 | } |