Salome HOME
6f81a1457f13917011d8084b01133c1cfe4b6bae
[modules/geom.git] / idl / STEPPlugin.idl
1 // Copyright (C) 2014-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __STEPPlugin_IDL__
21 #define __STEPPlugin_IDL__
22
23 #include "GEOM_Gen.idl"
24
25 module GEOM
26 {
27   /*!
28    *  \brief Units of length
29    */
30   enum length_unit
31   {
32     LU_INCH,
33     LU_MILLIMETER,
34     LU_FOOT,
35     LU_MILE,
36     LU_METER,
37     LU_KILOMETER,
38     LU_MILLIINCH,
39     LU_MICROMETER,
40     LU_CENTIMETER,
41     LU_MICROINCH
42   };
43
44   /*!
45    *  \brief Interface for STEPPlugin modeling functions.
46    */
47   interface ISTEPOperations : GEOM::GEOM_IOperations
48   {
49     /*!
50      *  \brief Export the given shape into a file with given name in STEP format.
51      *
52      *  \param theObject Shape to be stored in the file.
53      *  \param theFileName Name of the file to store the given shape in.
54      *  \param theUnit the length unit.
55      */
56     void ExportSTEP( in GEOM::GEOM_Object theObject, 
57                      in string            theFileName,
58                      in GEOM::length_unit theUnit);
59       
60     /*!
61      *  \brief Import a shape from the STEP file.
62      *
63      *  \param theFileName The file, containing the shape.
64      *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
65      *                          and result model will be scaled, if its units are not meters.
66      *                          If False (default), file length units will be taken into account.
67      *  \param IsCreateAssemblies If True, for each assembly compound is created
68      *                          in the result. If False Compounds that contain a
69      *                          single shape are eliminated from the result.
70      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
71      */              
72     GEOM::ListOfGO ImportSTEP( in string  theFileName,
73                                in boolean theIsIgnoreUnits,
74                                in boolean IsCreateAssemblies);
75                                
76     /*!
77      *  \brief Read a value of parameter from a file, containing a shape.
78      *  \param theFileName The file, containing the shape.
79      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
80      *                          to obtain length units, in which the file is written.
81      *  \return Value of requested parameter in form of text string.
82      */
83     string ReadValue( in string theFileName, 
84                       in string theParameterName );
85     
86   };
87 };
88
89 #endif // __STEPPlugin_IDL__