From: fps Date: Thu, 25 Apr 2013 14:49:48 +0000 (+0000) Subject: add XAO import and modify export X-Git-Tag: siman1_BR_V7_main_Field X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=243d3de586c197215ce022263d0f74bd1101eb98;p=modules%2Fgeom.git add XAO import and modify export --- diff --git a/doc/salome/gui/GEOM/images/exportxao_dlg.png b/doc/salome/gui/GEOM/images/exportxao_dlg.png new file mode 100644 index 000000000..a7171c748 Binary files /dev/null and b/doc/salome/gui/GEOM/images/exportxao_dlg.png differ diff --git a/doc/salome/gui/GEOM/input/creating_exportxao.doc b/doc/salome/gui/GEOM/input/creating_exportxao.doc deleted file mode 100644 index 07726287a..000000000 --- a/doc/salome/gui/GEOM/input/creating_exportxao.doc +++ /dev/null @@ -1,29 +0,0 @@ -/*! - -\page create_exportxao_page ExportXAO - -To create a \b ExportXAO in the Main Menu select New Entity - > -ImportExport - > ExportXAO - -Specify the parameters of the ExportXAO object creation in the opened dialog -box and press "Apply" or "Apply & Close" button. -Result of each operation will be a GEOM_Object. - -TUI Command: geompy.MakeExportXAO(ExportingShape, FileName, lGroups, lFields) - -Arguments: -- \b ExportingShape - Shape to export -- \b FileName - The name of the exported file -- \b lGroups - List of groups to export -- \b lFields - List of fields to export - -\image html exportxao_dlg.png - -Example: - -\image html exportxao.png - -Our TUI Scripts provide you with useful examples of creation of -\ref tui_creation_exportxao "ImportExport objects". - -*/ diff --git a/doc/salome/gui/GEOM/input/export_xao.doc b/doc/salome/gui/GEOM/input/export_xao.doc new file mode 100644 index 000000000..5d1748f66 --- /dev/null +++ b/doc/salome/gui/GEOM/input/export_xao.doc @@ -0,0 +1,21 @@ +/*! + +\page export_xao_page Export XAO + +To export a shape in the \b XAO format, in the Main Menu select New Entity -> +Import / Export -> Export XAO + +Specify the parameters of the Export XAO dialog box and press "Apply" or "Apply & Close" button. + + +TUI Command: geompy.MakeExportXAO(Shape, FileName, Groups, Fields) + +Arguments: +- \b Shape - The shape to export +- \b FileName - The name of the file to create +- \b Groups - The list of groups to export +- \b Fields - The list of fields to export + +\image html exportxao_dlg.png + +*/ diff --git a/doc/salome/gui/GEOM/input/import_xao.doc b/doc/salome/gui/GEOM/input/import_xao.doc new file mode 100644 index 000000000..58ddfd11e --- /dev/null +++ b/doc/salome/gui/GEOM/input/import_xao.doc @@ -0,0 +1,8 @@ +/*! + +\page import_xao_page Import XAO + +To import a shape in the \b XAO format, in the Main Menu select New Entity -> +Import / Export -> Import XAO + +*/ diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index 55a17a230..f7db14060 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -4,19 +4,20 @@ \image html geomscreen.png -\b Geometry module of SALOME is destined for: +\b Geometry module of SALOME is destined for: - \subpage import_export_geom_obj_page "import and export of geometrical models" in IGES, BREP and STEP formats; - \subpage create_geom_obj_page "construction of geometrical objects" - using a wide range of functions; + using a wide range of functions; - \subpage view_geom_obj_page "viewing geometrical objects" in the OCC - viewer; + viewer; - \subpage transform_geom_obj_page "transformation of geometrical objects" using various algorithms; - \subpage repairing_operations_page "optimization of geometrical objects"; - viewing \subpage geometrical_obj_prop_page "geometrical object properties" - and other information about geometrical objects using + and other information about geometrical objects using \subpage using_measurement_tools_page "measurement tools"; +- \subpage xao_format_page "The XAO format" - \subpage pictures_page "designing shapes from pictures"; - easily setting parameters via the variables predefined in \subpage using_notebook_geom_page "SALOME notebook". diff --git a/doc/salome/gui/GEOM/input/xao_format.doc b/doc/salome/gui/GEOM/input/xao_format.doc new file mode 100644 index 000000000..b5c60a92d --- /dev/null +++ b/doc/salome/gui/GEOM/input/xao_format.doc @@ -0,0 +1,10 @@ +/*! + +\page xao_format_page The XAO format + +XAO is a file format which describes a shape with its topology, groups and fields. + +- \subpage export_xao_page "Export" +- \subpage import_xao_page "Import" + +*/ diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index eb69c45b8..1a6c0ac4e 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -4012,26 +4012,30 @@ module GEOM interface GEOM_IImportExportOperations : GEOM_IOperations { /*! - * Export a shape to XAO Format + * Export a shape to XAO format * \param shape The shape to export * \param groups The list of groups to export * \param fields The list of fields to export - * \param xao The exported XAO + * \param author The author of the export + * \param fileName The name of the file to export * \return boolean indicating if export was succeful. */ - boolean ExportXAO(in GEOM_Object shape, in ListOfGO groups, in ListOfGO fields, out string xao); + boolean ExportXAO(in GEOM_Object shape, + in ListOfGO groups, in ListOfGO fields, + in string author, in string fileName); /*! - * Import a shape from XAO Format - * \param xao The XAO data to import + * Import a shape from XAO format + * \param xao The name of the file to import * \param shape The imported shape * \param groups The list of imported groups * \param fields The list of imported fields * \return boolean indicating if import was succeful. */ - //boolean ImportXAO(in string xao, out GEOM_Object shape, out ListOfGO groups, out ListOfGO fields); + boolean ImportXAO(in string fileName, + out GEOM_Object shape, out ListOfGO groups, out ListOfGO fields); /*@@ insert new functions before this line @@ do not remove this line @@*/ }; diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index 3859474cf..f1ac81ee2 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -626,10 +626,11 @@ module GEOM //-----------------------------------------------------------// // ImportExportOperations // //-----------------------------------------------------------// - boolean ExportXAO(in GEOM_Object exportingShape, - in GEOM_List groups, in GEOM_List fields, out string xao); -// boolean ImportXAO(in string fileName, out GEOM_Object exportingShape, -// out GEOM_List groups, out GEOM_List fields); + boolean ExportXAO(in GEOM_Object shape, + in GEOM_List groups, in GEOM_List fields, + in string author, in string fileName); + boolean ImportXAO(in string fileName, out GEOM_Object shape, + out GEOM_List groups, out GEOM_List fields); /*@@ insert new functions before this line @@ do not remove this line @@*/ }; diff --git a/resources/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in index ecf47afeb..bceed7611 100644 --- a/resources/GEOMCatalog.xml.in +++ b/resources/GEOMCatalog.xml.in @@ -75,7 +75,7 @@ Geometry component 1 ModuleGeom.png - 1 + 1 @@ -620,44 +620,44 @@ - - GetDumpName - - - unknown - 0 - - - theStudyEntry - string - unknown - - - - - return - string - unknown - - - - - - GetAllDumpNames - - - unknown - 0 - - - - return - string_array - unknown - - - - + + GetDumpName + + + unknown + 0 + + + theStudyEntry + string + unknown + + + + + return + string + unknown + + + + + + GetAllDumpNames + + + unknown + 0 + + + + return + string_array + unknown + + + + hostname = localhost diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 3e4930d7c..04a714afa 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5785,7 +5785,7 @@ Do you want to create new material? GEOM_EXPORTXAO - ExportXAO + Export XAO GEOM_EXPORTXAO_EXPORTINGSHAPE @@ -5795,13 +5795,44 @@ Do you want to create new material? GEOM_EXPORTXAO_FILENAME File Name + + GEOM_EXPORTXAO_AUTHOR + Author + GEOM_EXPORTXAO_LGROUPS - List of groups + Groups GEOM_EXPORTXAO_LFIELDS - List of fields + Fields + + + + ImportExportGUI_ImportXAODlg + + GEOM_IMPORTXAO_TITLE + Import XAO + + + GEOM_IMPORTXAO + Import XAO + + + GEOM_IMPORTXAO_IMPORTINGSHAPE + Shape + + + GEOM_IMPORTXAO_FILENAME + File Name + + + GEOM_IMPORTXAO_LGROUPS + Groups + + + GEOM_IMPORTXAO_LFIELDS + Fields diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index d3b61091e..1265c6e89 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -5775,4 +5775,62 @@ Voulez-vous en créer un nouveau ? P&ublier et fermer + + ImportExportGUI_ExportXAODlg + + GEOM_EXPORTXAO_TITLE + Export XAO + + + GEOM_EXPORTXAO + Export XAO + + + GEOM_EXPORTXAO_EXPORTINGSHAPE + Objet + + + GEOM_EXPORTXAO_FILENAME + Fichier + + + GEOM_EXPORTXAO_AUTHOR + Auteur + + + GEOM_EXPORTXAO_LGROUPS + Groupes + + + GEOM_EXPORTXAO_LFIELDS + Champs + + + + ImportExportGUI_ImportXAODlg + + GEOM_IMPORTXAO_TITLE + Import XAO + + + GEOM_IMPORTXAO + Import XAO + + + GEOM_IMPORTXAO_IMPORTINGSHAPE + Objet + + + GEOM_IMPORTXAO_FILENAME + Fichier + + + GEOM_IMPORTXAO_LGROUPS + Groupes + + + GEOM_IMPORTXAO_LFIELDS + Champs + + diff --git a/src/GEOMImpl/GEOMImpl_ExportXAODriver.cxx b/src/GEOMImpl/GEOMImpl_ExportXAODriver.cxx deleted file mode 100644 index 7a4911a6c..000000000 --- a/src/GEOMImpl/GEOMImpl_ExportXAODriver.cxx +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -#include - -#include -#include -#include -#include - -#include -#include - -//@@ include required header files here @@// - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= -const Standard_GUID& GEOMImpl_ExportXAODriver::GetID() -{ - static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C"); - return aGUID; -} - -//======================================================================= -//function : GEOMImpl_ExportXAODriver -//purpose : -//======================================================================= -GEOMImpl_ExportXAODriver::GEOMImpl_ExportXAODriver() -{ -} - -//======================================================================= -//function : Execute -//purpose : -//======================================================================= -Standard_Integer GEOMImpl_ExportXAODriver::Execute(TFunction_Logbook& log) const -{ - if (Label().IsNull()) return 0; - Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); - - GEOMImpl_IExportXAO aData (aFunction); - Standard_Integer aType = aFunction->GetType(); - - TopoDS_Shape aShape; - - if (aType == EXPORTXAO_EXPORTINGSHAPE_FILENAME_LGROUPS_LFIELDS) { - //@@ add implementation of the operation driver here to initialize aShape variable @@// - //aShape = @...@ - } - else { - // other construction modes here - } - - if (aShape.IsNull()) return 0; - - aFunction->SetValue(aShape); - - log.SetTouched(Label()); - - return 1; -} - -//======================================================================= -//function : GEOMImpl_ExportXAODriver_Type_ -//purpose : -//======================================================================= -Standard_EXPORT Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ExportXAODriver", - sizeof(GEOMImpl_ExportXAODriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - return _aType; -} - -//======================================================================= -//function : DownCast -//purpose : -//======================================================================= -const Handle(GEOMImpl_ExportXAODriver) Handle(GEOMImpl_ExportXAODriver)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMImpl_ExportXAODriver) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ExportXAODriver))) { - _anOtherObject = Handle(GEOMImpl_ExportXAODriver)((Handle(GEOMImpl_ExportXAODriver)&)AnObject); - } - } - - return _anOtherObject; -} diff --git a/src/GEOMImpl/GEOMImpl_ExportXAODriver.hxx b/src/GEOMImpl/GEOMImpl_ExportXAODriver.hxx deleted file mode 100644 index c0161f8da..000000000 --- a/src/GEOMImpl/GEOMImpl_ExportXAODriver.hxx +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -#ifndef _GEOMImpl_ExportXAODriver_HXX -#define _GEOMImpl_ExportXAODriver_HXX - -#include - -class Handle_Standard_Type; -class GEOMImpl_ExportXAODriver; - -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ExportXAODriver); - -class Handle(GEOMImpl_ExportXAODriver) : public Handle(TFunction_Driver) { -public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - - Handle(GEOMImpl_ExportXAODriver)():Handle(TFunction_Driver)() {} - Handle(GEOMImpl_ExportXAODriver)(const Handle(GEOMImpl_ExportXAODriver)& aHandle) : Handle(TFunction_Driver)(aHandle) - {} - - Handle(GEOMImpl_ExportXAODriver)(const GEOMImpl_ExportXAODriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) - {} - - Handle(GEOMImpl_ExportXAODriver)& operator=(const Handle(GEOMImpl_ExportXAODriver)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMImpl_ExportXAODriver)& operator=(const GEOMImpl_ExportXAODriver* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMImpl_ExportXAODriver* operator->() - { - return (GEOMImpl_ExportXAODriver *)ControlAccess(); - } - - GEOMImpl_ExportXAODriver* operator->() const - { - return (GEOMImpl_ExportXAODriver *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMImpl_ExportXAODriver)() {}; - - Standard_EXPORT static const Handle(GEOMImpl_ExportXAODriver) DownCast(const Handle(Standard_Transient)& AnObject); -}; - -class GEOMImpl_ExportXAODriver : public TFunction_Driver { -public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - - // Methods PUBLIC - // - Standard_EXPORT GEOMImpl_ExportXAODriver(); - Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; - Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} - Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const - { - return Standard_True; - } - Standard_EXPORT static const Standard_GUID& GetID(); - Standard_EXPORT ~GEOMImpl_ExportXAODriver() {}; - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const - { - return STANDARD_TYPE(GEOMImpl_ExportXAODriver); - } - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const - { - return (STANDARD_TYPE(GEOMImpl_ExportXAODriver) == AType || TFunction_Driver::IsKind(AType)); - } -}; - -#endif // _GEOMImpl_ExportXAODriver_HXX diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx index f45760687..901b77096 100644 --- a/src/GEOMImpl/GEOMImpl_Gen.cxx +++ b/src/GEOMImpl/GEOMImpl_Gen.cxx @@ -85,7 +85,7 @@ #include #include // #include -#include +#include /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ //============================================================================= @@ -174,8 +174,8 @@ GEOMImpl_Gen::GEOMImpl_Gen() // TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedCylinderDriver::GetID(), new GEOMImpl_DividedCylinderDriver()); /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ - // ImportExport operations - TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ExportXAODriver::GetID(), new GEOMImpl_ExportXAODriver()); + // XAO operations + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_XAODriver::GetID(), new GEOMImpl_XAODriver()); /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ SetEngine(this); diff --git a/src/GEOMImpl/GEOMImpl_IExportXAO.hxx b/src/GEOMImpl/GEOMImpl_IExportXAO.hxx deleted file mode 100644 index 315fbe9a2..000000000 --- a/src/GEOMImpl/GEOMImpl_IExportXAO.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -#ifndef _GEOMImpl_IExportXAO_HXX_ -#define _GEOMImpl_IExportXAO_HXX_ - -#include "GEOM_Function.hxx" - -#define EXPORTXAO_ARG_EXPORTINGSHAPE 1 -#define EXPORTXAO_ARG_FILENAME 2 -#define EXPORTXAO_ARG_LGROUPS 3 -#define EXPORTXAO_ARG_LFIELDS 4 - -class GEOMImpl_IExportXAO -{ -public: - GEOMImpl_IExportXAO(Handle(GEOM_Function) theFunction): _func(theFunction) {} - - void SetExportingShape(Handle(GEOM_Function) theExportingShape) { _func->SetReference(EXPORTXAO_ARG_EXPORTINGSHAPE, theExportingShape); } - Handle(GEOM_Function) GetExportingShape() { return _func->GetReference(EXPORTXAO_ARG_EXPORTINGSHAPE); } - - void SetFileName(const TCollection_AsciiString& theFileName) { _func->SetString(EXPORTXAO_ARG_FILENAME, theFileName); } - const TCollection_AsciiString GetFileName() { return _func->GetString(EXPORTXAO_ARG_FILENAME); } - - void SetGroup(int theId, Handle(GEOM_Function) theGroup) { _func->SetReference(EXPORTXAO_ARG_LGROUPS+theId, theGroup); } - Handle(GEOM_Function) GetGroup(int theId) { return _func->GetReference(EXPORTXAO_ARG_LGROUPS+theId); } - - void SetField(int theId, Handle(GEOM_Function) theField) { _func->SetReference(EXPORTXAO_ARG_LFIELDS+theId, theField); } - Handle(GEOM_Function) GetField(int theId) { return _func->GetReference(EXPORTXAO_ARG_LFIELDS+theId); } - -private: - Handle(GEOM_Function) _func; -}; - -#endif // _GEOMImpl_IExportXAO_HXX_ diff --git a/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx b/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx index 641e7d435..51d08b449 100644 --- a/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -15,9 +15,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOMImpl_IImportExportOperations.cxx -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #include #include @@ -52,13 +49,14 @@ #include "Group.hxx" #include "XaoUtils.hxx" -#include -#include +#include +#include /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ #include #include #include +#include #include #include #include @@ -80,6 +78,7 @@ #include #include #include +#include #include #include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC @@ -108,51 +107,66 @@ GEOMImpl_IImportExportOperations::~GEOMImpl_IImportExportOperations() delete m_groupOperations; } +TopAbs_ShapeEnum getGroupDimension(XAO::Group* group) +{ + XAO::Dimension dim = group->getDimension(); + if (dim == XAO::VERTEX) + return TopAbs_VERTEX; + if (dim == XAO::EDGE) + return TopAbs_EDGE; + if (dim == XAO::FACE) + return TopAbs_FACE; + if (dim == XAO::SOLID) + return TopAbs_SOLID; + return TopAbs_COMPOUND; +} + //============================================================================= /*! - * Export a shape to XAO Format + * Export a shape to XAO format * \param shape The shape to export * \param groups The list of groups to export * \param fields The list of fields to export - * \param xao The exported XAO. + * \param fileName The name of the file to exported * \return boolean indicating if export was succeful. */ //============================================================================= bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, std::list groupList, std::list fieldList, - char*& xao) + const char* author, + const char* fileName) { SetErrorCode(KO); + if (shape.IsNull()) return false; + // add a new shape function with parameters Handle(GEOM_Function) lastFunction = shape->GetLastFunction(); - if (lastFunction.IsNull()) - return false; + if (lastFunction.IsNull()) return false; // add a new result object Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT); // add an Export function - Handle(GEOM_Function) exportFunction = result->AddFunction(GEOMImpl_ExportXAODriver::GetID(), - EXPORTXAO_EXPORTINGSHAPE_FILENAME_LGROUPS_LFIELDS); - if (exportFunction.IsNull()) - return false; - - // check if the function is set correctly - if (exportFunction->GetDriverGUID() != GEOMImpl_ExportXAODriver::GetID()) - return false; + Handle(GEOM_Function) exportFunction = result->AddFunction(GEOMImpl_XAODriver::GetID(), IMPORTEXPORT_EXPORTXAO); + if (exportFunction.IsNull()) return false; + if (exportFunction->GetDriverGUID() != GEOMImpl_XAODriver::GetID()) return false; + // Build the XAO XAO::Xao* xaoObject = new XAO::Xao(); + xaoObject->setAuthor(author); XAO::Geometry* geometry = new XAO::Geometry(); TopoDS_Shape topoShape = shape->GetValue(); + exportFunction->SetValue(topoShape); geometry->setShape(topoShape); geometry->setName(shape->GetName()); Handle(TColStd_HSequenceOfTransient) subObjects = m_shapesOperations->GetExistingSubObjects(shape, false); int nbSubObjects = subObjects->Length(); + // set the names of the sub shapes int tmpIndex; for (int i = 1; i <= nbSubObjects; i++) { @@ -192,20 +206,20 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, } xaoObject->setGeometry(geometry); - // adding groups - std::list::iterator itG1 = groupList.begin(); - while (itG1 != groupList.end()) + // add the groups + std::list::iterator groupIterator = groupList.begin(); + while (groupIterator != groupList.end()) { - Handle(GEOM_Object) itGroup = (*itG1++); - Handle(TColStd_HArray1OfInteger) groupIds = m_groupOperations->GetObjects(itGroup); - TopAbs_ShapeEnum shapeGroup = m_groupOperations->GetType(itGroup); - + Handle(GEOM_Object) currGroup = (*groupIterator++); + Handle(TColStd_HArray1OfInteger) groupIds = m_groupOperations->GetObjects(currGroup); XAO::Group* group = new XAO::Group(); - group->setName(itGroup->GetName()); + group->setName(currGroup->GetName()); + + TopAbs_ShapeEnum shapeGroup = m_groupOperations->GetType(currGroup); switch (shapeGroup) { case TopAbs_VERTEX: - group->setDimension(0); + group->setDimension(XAO::VERTEX); for (int i = 1; i <= groupIds->Length(); i++) { const char* ref = XAO::XaoUtils::intToString(groupIds->Value(i)); @@ -214,7 +228,7 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, } break; case TopAbs_EDGE: - group->setDimension(1); + group->setDimension(XAO::EDGE); for (int i = 1; i <= groupIds->Length(); i++) { const char* ref = XAO::XaoUtils::intToString(groupIds->Value(i)); @@ -223,16 +237,16 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, } break; case TopAbs_FACE: - group->setDimension(2); + group->setDimension(XAO::FACE); for (int i = 1; i <= groupIds->Length(); i++) { - const char* ref = XAO::XaoUtils::intToString((int)(groupIds->Value(i))); + const char* ref = XAO::XaoUtils::intToString(groupIds->Value(i)); const int index = geometry->getFaceIndexByReference(ref); group->addElement(index); } break; case TopAbs_SOLID: - group->setDimension(3); + group->setDimension(XAO::SOLID); for (int i = 1; i <= groupIds->Length(); i++) { const char* ref = XAO::XaoUtils::intToString(groupIds->Value(i)); @@ -245,32 +259,40 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, xaoObject->addGroup(group); } - const char* data = xaoObject->getXML(); - xao = new char[strlen(data)]; - strcpy(xao, data); - delete data; + // TODO: add the fields + + // export the XAO to the file + xaoObject->exportXAO(fileName); + delete xaoObject; // make a Python command GEOM::TPythonDump pd(exportFunction); pd << "exported = geompy.ExportXAO("; - pd << shape << "shpae, [], [], xao"; - pd << ")"; - -// std::list::iterator itG = groupList.begin(); -// pd << (*itG++); -// while (itG != groupList.end()) -// { -// pd << ", " << (*itG++); -// } -// pd << "], ["; -// std::list::iterator itF = fieldList.begin(); -// pd << (*itF++); -// while (itF != fieldList.end()) -// { -// pd << ", " << (*itF++); -// } -// pd << "])"; + pd << shape; + pd << ", ["; + + if (groupList.size() > 0) + { + std::list::iterator itG = groupList.begin(); + pd << (*itG++); + while (itG != groupList.end()) + { + pd << ", " << (*itG++); + } + } + pd << "], ["; + if (fieldList.size() > 0) + { + std::list::iterator itF = fieldList.begin(); + pd << (*itF++); + while (itF != fieldList.end()) + { + pd << ", " << (*itF++); + } + } + pd << "], "; + pd << author << ", \"" << fileName << "\")"; SetErrorCode(OK); @@ -279,22 +301,98 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape, //============================================================================= /*! - * Import a shape from XAO Format - * \param fileName The name of the imported file + * Import a shape from XAO format + * \param fileName The name of the file to import * \param shape The imported shape * \param groups The list of imported groups * \param fields The list of imported fields * \return boolean indicating if import was succeful. */ //============================================================================= -//bool GEOMImpl_IImportExportOperations::ImportXAO(const std::string fileName, -// Handle(GEOM_Object) shape, -// std::list groupList, -// std::list fieldList) -//{ -// SetErrorCode(KO); -// return true; -//} +bool GEOMImpl_IImportExportOperations::ImportXAO(const char* fileName, + Handle(GEOM_Object)& shape, + Handle(TColStd_HSequenceOfTransient)& groupList, + Handle(TColStd_HSequenceOfTransient)& fieldList) +{ + SetErrorCode(KO); + + if (fileName == NULL || groupList.IsNull() || fieldList.IsNull()) + return false; + + // Read the XAO + XAO::Xao* xaoObject = new XAO::Xao(); + xaoObject->importXAO(fileName); + + XAO::Geometry* xaoGeometry = xaoObject->getGeometry(); + if (xaoGeometry == NULL) + return false; + + // create the shape + shape = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT); + Handle(GEOM_Function) function = shape->AddFunction(GEOMImpl_XAODriver::GetID(), IMPORTEXPORT_EXPORTXAO); + if (function.IsNull()) return false; + if (function->GetDriverGUID() != GEOMImpl_XAODriver::GetID()) return false; + + // set the geometry + TopoDS_Shape geomShape = xaoGeometry->getShape(); + function->SetValue(geomShape); + shape->SetName(xaoGeometry->getName()); + + // TODO: create sub shapes with names + + // create groups + int nbGroups = xaoObject->countGroups(); + for (int i = 0; i < nbGroups; ++i) + { + XAO::Group* xaoGroup = xaoObject->getGroup(i); + + // build an array with the indexes of the sub shapes + int nbElt = xaoGroup->getCount(); + Handle(TColStd_HArray1OfInteger) array = new TColStd_HArray1OfInteger(1, nbElt); + for (int j = 0; j < nbElt; j++) + { + int index = xaoGroup->getElement(j); + const char* ref = xaoGeometry->getElementReference(xaoGroup->getDimension(), index); + array->SetValue(j + 1, atoi(ref)); + } + + // create the group with the array of sub shapes indexes + Handle(GEOM_Object) group = GetEngine()->AddSubShape(shape, array); + group->SetType(GEOM_GROUP); + group->SetName(xaoGroup->getName()); + + // Set a sub-shape type + TDF_Label freeLabel = group->GetFreeLabel(); + TDataStd_Integer::Set(freeLabel, (Standard_Integer) getGroupDimension(xaoGroup)); + groupList->Append(group); + + function = group->GetLastFunction(); + } + + // TODO: create the fields + + // make a Python command + GEOM::TPythonDump pd(function); + pd << "(imported, " << shape << ", "; + + pd << "["; + if (nbGroups > 0) + { + for (int i = 1; i <= nbGroups; i++) + { + Handle(GEOM_Object) obj = Handle(GEOM_Object)::DownCast(groupList->Value(i)); + pd << obj << ((i < nbGroups) ? ", " : ""); + } + } + pd << "], []"; + + pd << ") = geompy.ImportXAO(\"" << fileName << "\")"; + + delete xaoObject; + SetErrorCode(OK); + + return true; +} /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ diff --git a/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx b/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx index 66992b855..4e7c42638 100644 --- a/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -15,9 +15,6 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOMImpl_IImportExportOperations.hxx -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #ifndef _GEOMImpl_IImportExportOperations_HXX_ #define _GEOMImpl_IImportExportOperations_HXX_ @@ -47,11 +44,12 @@ public: Standard_EXPORT bool ExportXAO(Handle(GEOM_Object) shape, std::list groupList, std::list fieldList, - char*& xao); -// Standard_EXPORT bool ImportXAO (const std::string fileName, -// Handle(GEOM_Object) shape, -// std::list groupList, -// std::list fieldList); + const char* author, + const char* fileName); + Standard_EXPORT bool ImportXAO(const char* fileName, + Handle(GEOM_Object)& shape, + Handle(TColStd_HSequenceOfTransient)& groupList, + Handle(TColStd_HSequenceOfTransient)& fieldList); /*@@ insert new functions before this line @@ do not remove this line @@*/ }; #endif diff --git a/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx b/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx new file mode 100644 index 000000000..a5047037e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx @@ -0,0 +1,41 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef _GEOMImpl_IImportExportXAO_HXX_ +#define _GEOMImpl_IImportExportXAO_HXX_ + +#include "GEOM_Function.hxx" + +#define IMPORTEXPORTXAO_ARG_DATA 1 + +class GEOMImpl_IImportExportXAO +{ +public: + GEOMImpl_IImportExportXAO(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetData(const TCollection_AsciiString& data) { _func->SetString(IMPORTEXPORTXAO_ARG_DATA, data); } + const TCollection_AsciiString GetData() { return _func->GetString(IMPORTEXPORTXAO_ARG_DATA); } + +private: + Handle(GEOM_Function) _func; +}; + +#endif // _GEOMImpl_IExportXAO_HXX_ diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index 130737c81..91444ab9c 100755 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -352,5 +352,7 @@ #define DIVIDEDDISK_R_RATIO 1 #define DIVIDEDDISK_R_VECTOR_PNT 2 #define DIVIDEDCYLINDER_R_H 1 -#define EXPORTXAO_EXPORTINGSHAPE_FILENAME_LGROUPS_LFIELDS 1 + +#define IMPORTEXPORT_EXPORTXAO 1 +#define IMPORTEXPORT_IMPORTXAO 2 /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ diff --git a/src/GEOMImpl/GEOMImpl_XAODriver.cxx b/src/GEOMImpl/GEOMImpl_XAODriver.cxx new file mode 100644 index 000000000..369532c85 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_XAODriver.cxx @@ -0,0 +1,128 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#include + +#include +#include +#include +#include + +#include +#include + +#include "Xao.hxx" +#include "Geometry.hxx" +#include "Group.hxx" +#include "XaoUtils.hxx" +//@@ include required header files here @@// + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_XAODriver::GetID() +{ + static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C"); + return aGUID; +} + +//======================================================================= +//function : GEOMImpl_XAODriver +//purpose : +//======================================================================= +GEOMImpl_XAODriver::GEOMImpl_XAODriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_XAODriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IImportExportXAO iexao(function); + TCollection_AsciiString xao = iexao.GetData(); + + TopoDS_Shape shape; + + Standard_Integer functionType = function->GetType(); + if (functionType == IMPORTEXPORT_EXPORTXAO) + { + } + else if (functionType == IMPORTEXPORT_IMPORTXAO) + { + } + else + { + // other construction modes here + } + + if (shape.IsNull()) return 0; + + function->SetValue(shape); + + log.SetTouched(Label()); + + return 1; +} + +//======================================================================= +//function : GEOMImpl_XAODriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_XAODriver_Type_() +{ + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + static Handle_Standard_Transient _Ancestors[] = { aType1, aType2, aType3, NULL }; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_XAODriver", + sizeof(GEOMImpl_XAODriver), + 1, + (Standard_Address) _Ancestors, + (Standard_Address) NULL); + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_XAODriver) Handle(GEOMImpl_XAODriver)::DownCast( + const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_XAODriver) _anOtherObject; + + if (!AnObject.IsNull()) + { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_XAODriver))) + { + _anOtherObject = Handle(GEOMImpl_XAODriver)((Handle(GEOMImpl_XAODriver)&) AnObject); + } + } + + return _anOtherObject; +} diff --git a/src/GEOMImpl/GEOMImpl_XAODriver.hxx b/src/GEOMImpl/GEOMImpl_XAODriver.hxx new file mode 100644 index 000000000..b094b4a8c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_XAODriver.hxx @@ -0,0 +1,147 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef _GEOMImpl_XAODriver_HXX +#define _GEOMImpl_XAODriver_HXX + +#include + +class Handle_Standard_Type; +class GEOMImpl_XAODriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_XAODriver); + +class Handle(GEOMImpl_XAODriver): public Handle(TFunction_Driver) +{ +public: + inline void* operator new(size_t, void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&) anAddress); + } + + Handle(GEOMImpl_XAODriver) () : + Handle(TFunction_Driver)() + { + } + Handle(GEOMImpl_XAODriver) (const Handle(GEOMImpl_XAODriver)& aHandle) : + Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_XAODriver) (const GEOMImpl_XAODriver* anItem) : + Handle(TFunction_Driver)((TFunction_Driver *) anItem) + { + } + + Handle(GEOMImpl_XAODriver)& operator=(const Handle(GEOMImpl_XAODriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_XAODriver)& operator=(const GEOMImpl_XAODriver* anItem) + { + Assign((Standard_Transient *) anItem); + return *this; + } + + GEOMImpl_XAODriver* operator->() + { + return (GEOMImpl_XAODriver *) ControlAccess(); + } + + GEOMImpl_XAODriver* operator->() const + { + return (GEOMImpl_XAODriver *) ControlAccess(); + } + + Standard_EXPORT + ~Handle(GEOMImpl_XAODriver)() + { + } + + Standard_EXPORT + static const Handle(GEOMImpl_XAODriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +class GEOMImpl_XAODriver: public TFunction_Driver +{ +public: + inline void* operator new(size_t, void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&) anAddress); + } + + // Methods PUBLIC + // + Standard_EXPORT + GEOMImpl_XAODriver(); + Standard_EXPORT + virtual Standard_Integer Execute(TFunction_Logbook& log) const; + Standard_EXPORT + virtual void Validate(TFunction_Logbook&) const + { + } + Standard_EXPORT + Standard_Boolean MustExecute(const TFunction_Logbook&) const + { + return Standard_True; + } + Standard_EXPORT + static const Standard_GUID& GetID(); + Standard_EXPORT + ~GEOMImpl_XAODriver() + { + } + + // Type management + // + Standard_EXPORT + friend Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_(); + Standard_EXPORT + const Handle(Standard_Type)& DynamicType() const + { + return STANDARD_TYPE(GEOMImpl_XAODriver); + } + Standard_EXPORT + Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const + { + return (STANDARD_TYPE(GEOMImpl_XAODriver) == AType || TFunction_Driver::IsKind(AType)); + } +}; + +#endif // _GEOMImpl_XAODriver_HXX diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am index 599b0bf07..d10e83bc9 100644 --- a/src/GEOMImpl/Makefile.am +++ b/src/GEOMImpl/Makefile.am @@ -150,7 +150,7 @@ ADVANCED_INCLUDES += GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx ADVANCED_INCLUDES += GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx ##ADVANCED_INCLUDES += GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx IMPORTEXPORT_INCLUDES = -IMPORTEXPORT_INCLUDES += GEOMImpl_IExportXAO.hxx GEOMImpl_ExportXAODriver.hxx +IMPORTEXPORT_INCLUDES += GEOMImpl_IImportExportXAO.hxx GEOMImpl_XAODriver.hxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@## salomeinclude_HEADERS += $(ADVANCED_INCLUDES) @@ -227,7 +227,7 @@ ADVANCED_SOURCES += GEOMImpl_PipeTShapeDriver.cxx ADVANCED_SOURCES += GEOMImpl_DividedDiskDriver.cxx ##ADVANCED_SOURCES += GEOMImpl_DividedCylinderDriver.cxx IMPORTEXPORT_SOURCES = -IMPORTEXPORT_SOURCES += GEOMImpl_ExportXAODriver.cxx +IMPORTEXPORT_SOURCES += GEOMImpl_XAODriver.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@## dist_libGEOMimpl_la_SOURCES += $(ADVANCED_SOURCES) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index ccd876f74..438a4fef8 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -2311,7 +2311,7 @@ GEOM::GEOM_IImportExportOperations_ptr GEOM_Gen_i::GetIImportExportOperations(CO throw ( SALOME::SALOME_Exception ) { Unexpect aCatch(SALOME_SalomeException); - MESSAGE( "GEOM_Gen_i::GetIAdvancedOperations" ); + MESSAGE( "GEOM_Gen_i::GetIImportExportOperations" ); GEOM::GEOM_Gen_ptr engine = _this(); diff --git a/src/GEOM_I/GEOM_IImportExportOperations_i.cc b/src/GEOM_I/GEOM_IImportExportOperations_i.cc index 2bef07a51..d9daa17bc 100644 --- a/src/GEOM_I/GEOM_IImportExportOperations_i.cc +++ b/src/GEOM_I/GEOM_IImportExportOperations_i.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -15,11 +15,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOM_IImportExportOperations.cc -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// #include #include "GEOM_IImportExportOperations_i.hh" @@ -56,16 +52,18 @@ GEOM_IImportExportOperations_i::~GEOM_IImportExportOperations_i() //============================================================================= /*! - * Export a shape to XAO Format - * \param fileName The name of the exported file + * Export a shape to XAO format * \param shape The shape to export * \param groups The list of groups to export * \param fields The list of fields to export + * \param author The author of the export + * \param fileName The name of the exported file * \return boolean indicating if export was succeful. */ //============================================================================= CORBA::Boolean GEOM_IImportExportOperations_i::ExportXAO(GEOM::GEOM_Object_ptr shape, - const GEOM::ListOfGO& groups, const GEOM::ListOfGO& fields, CORBA::String_out xao) + const GEOM::ListOfGO& groups, const GEOM::ListOfGO& fields, + const char* author, const char* fileName) { bool isGood = false; // Set a not done flag @@ -97,10 +95,7 @@ CORBA::Boolean GEOM_IImportExportOperations_i::ExportXAO(GEOM::GEOM_Object_ptr s if (!reference.IsNull()) { // Export XAO - char* data; - isGood = GetOperations()->ExportXAO(reference, groupsObj, fieldsObj, data); - xao = CORBA::string_dup(data); - delete data; + isGood = GetOperations()->ExportXAO(reference, groupsObj, fieldsObj, author, fileName); } return isGood; @@ -108,20 +103,55 @@ CORBA::Boolean GEOM_IImportExportOperations_i::ExportXAO(GEOM::GEOM_Object_ptr s //============================================================================= /*! - * Import a shape from XAO Format - * \param xao The XAO data to import + * Import a shape from XAO format + * \param fileName The name of the file to import * \param shape The imported shape * \param groups The list of imported groups * \param fields The list of imported fields * \return boolean indicating if import was succeful. */ //============================================================================= -//bool GEOMImpl_IImportExportOperations::ImportXAO(const std::xao fileName, -// Handle(GEOM_Object), -// std::list > groups, -// std::list > fields) -//{ -// return true; -//} +CORBA::Boolean GEOM_IImportExportOperations_i::ImportXAO(const char* fileName, + GEOM::GEOM_Object_out shape, + GEOM::ListOfGO_out groups, + GEOM::ListOfGO_out fields) +{ + GEOM::GEOM_Object_var vshape; + shape = vshape._retn(); + + groups = new GEOM::ListOfGO; + fields = new GEOM::ListOfGO; + + // Set a not done flag + GetOperations()->SetNotDone(); + + Handle(TColStd_HSequenceOfTransient) importedGroups = new TColStd_HSequenceOfTransient(); + Handle(TColStd_HSequenceOfTransient) importedFields = new TColStd_HSequenceOfTransient(); + Handle(GEOM_Object) hshape; + bool res = GetOperations()->ImportXAO(fileName, hshape, importedGroups, importedFields); + + if (!GetOperations()->IsDone() || !res) + return false; + + // parse groups + int n = importedGroups->Length(); + groups->length(n); + for (int i = 1; i <= n; i++) + { + (*groups)[i - 1] = GetObject(Handle(GEOM_Object)::DownCast(importedGroups->Value(i))); + } + + // parse fields + n = importedFields->Length(); + fields->length(n); + for (int i = 1; i <= n; i++) + { + (*fields)[i - 1] = GetObject(Handle(GEOM_Object)::DownCast(importedFields->Value(i))); + } + + shape = GetObject(hshape); + + return res; +} /*@@ insert new functions before this line @@ do not remove this line @@*/ diff --git a/src/GEOM_I/GEOM_IImportExportOperations_i.hh b/src/GEOM_I/GEOM_IImportExportOperations_i.hh index 547405e1e..622da29d8 100644 --- a/src/GEOM_I/GEOM_IImportExportOperations_i.hh +++ b/src/GEOM_I/GEOM_IImportExportOperations_i.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -15,11 +15,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOM_IImportExportOperations.hh -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// #ifndef _GEOM_IImportExportOperations_i_HeaderFile #define _GEOM_IImportExportOperations_i_HeaderFile @@ -45,8 +41,10 @@ public: CORBA::Boolean ExportXAO (GEOM::GEOM_Object_ptr shape, const GEOM::ListOfGO& groups, const GEOM::ListOfGO& fields, - CORBA::String_out xao); - CORBA::Boolean ImportXAO (const char* xao, GEOM::GEOM_Object_out shape, + const char* author, + const char* fileName); + CORBA::Boolean ImportXAO (const char* fileName, + GEOM::GEOM_Object_out shape, GEOM::ListOfGO_out groups, GEOM::ListOfGO_out fields); /*@@ insert new functions before this line @@ do not remove this line @@*/ diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 408299870..14b72e15b 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -3452,7 +3452,8 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeDividedCylinder (CORBA::Double theR, // ExportXAO //============================================================================= CORBA::Boolean GEOM_Superv_i::ExportXAO (GEOM::GEOM_Object_ptr shape, - GEOM::GEOM_List_ptr groups, GEOM::GEOM_List_ptr fields, CORBA::String_out xao) + GEOM::GEOM_List_ptr groups, GEOM::GEOM_List_ptr fields, + const char* author, const char* fileName) { beginService( " GEOM_Superv_i::ExportXAO" ); MESSAGE("GEOM_Superv_i::ExportXAO"); @@ -3463,7 +3464,8 @@ CORBA::Boolean GEOM_Superv_i::ExportXAO (GEOM::GEOM_Object_ptr shape, if (GEOM_List_i* fieldList = dynamic_cast*>(GetServant(fields, myPOA).in())) { - CORBA::Boolean isGood = myImportExportOp->ExportXAO(shape, groupList->GetList(), fieldList->GetList(), xao); + CORBA::Boolean isGood = myImportExportOp->ExportXAO(shape, + groupList->GetList(), fieldList->GetList(), author, fileName); endService( " GEOM_Superv_i::ExportXAO" ); return isGood; } @@ -3475,11 +3477,11 @@ CORBA::Boolean GEOM_Superv_i::ExportXAO (GEOM::GEOM_Object_ptr shape, //============================================================================= // ImportXAO //============================================================================= -//CORBA::Boolean GEOM_Superv_i::ImportXAO (const char* fileName, GEOM::GEOM_Object_out shape, -// GEOM::GEOM_List_out groups, GEOM::GEOM_List_out fields) -//{ -// return false; -//} +CORBA::Boolean GEOM_Superv_i::ImportXAO (const char* fileName, GEOM::GEOM_Object_out shape, + GEOM::GEOM_List_out groups, GEOM::GEOM_List_out fields) +{ + return false; +} /*@@ insert new functions before this line @@ do not remove this line @@*/ //===================================================================================== diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index c0e7351d4..8927d5826 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -716,9 +716,10 @@ public: // ImportExport Operations // //-----------------------------------------------------------// CORBA::Boolean ExportXAO(GEOM::GEOM_Object_ptr shape, - GEOM::GEOM_List_ptr groups, GEOM::GEOM_List_ptr fields, CORBA::String_out xao); -// CORBA::Boolean ImportXAO(const char* fileName, GEOM::GEOM_Object_out shape, -// GEOM::GEOM_List_out groups, GEOM::GEOM_List_out fields); + GEOM::GEOM_List_ptr groups, GEOM::GEOM_List_ptr fields, + const char* author, const char* fileName); + CORBA::Boolean ImportXAO(const char* fileName, GEOM::GEOM_Object_out shape, + GEOM::GEOM_List_out groups, GEOM::GEOM_List_out fields); /*@@ insert new functions before this line @@ do not remove this line @@*/ private: diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 00c0fa5e1..0aa9600a2 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -207,7 +207,7 @@ def PackData(data): Returns: data packed to the byte stream - + Example of usage: val = PackData("10001110") # val = 0xAE val = PackData("1") # val = 0x80 @@ -258,13 +258,13 @@ def ReadTexture(fname): texture bitmap itself. This function can be used to read the texture to the byte stream in order to pass it to the AddTexture() function of geompy class. - + Parameters: fname texture file name Returns: sequence of tree values: texture's width, height in pixels and its byte stream - + Example of usage: import geompy geompy.init_geom(salome.myStudy) @@ -647,7 +647,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theAddPrefix add prefix "from_" to names of restored sub-shapes, and prefix "from_subshapes_of_" to names of partially restored sub-shapes. - Returns: + Returns: list of published sub-shapes """ # Example: see GEOM_TestAll.py @@ -675,8 +675,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): theX The X coordinate of the point. theY The Y coordinate of the point. theZ The Z coordinate of the point. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the created point. """ # Example: see GEOM_TestAll.py @@ -754,7 +754,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ): """ Create a point by projection give coordinates on the given curve - + Parameters: theRefCurve The referenced curve. theX X-coordinate in 3D space @@ -957,7 +957,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theParameterU horisontal value of the center point (0.0 - 1.0). theTrimSize the size of plane. - Returns: + Returns: New GEOM.GEOM_Object, containing the created tangent. Example of usage: @@ -983,7 +983,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theDY Y component of the vector. theDZ Z component of the vector. - Returns: + Returns: New GEOM.GEOM_Object, containing the created vector. """ # Example: see GEOM_TestAll.py @@ -1007,7 +1007,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): thePnt1 Start point for the vector. thePnt2 End point for the vector. - Returns: + Returns: New GEOM.GEOM_Object, containing the created vector. """ # Example: see GEOM_TestAll.py @@ -1101,7 +1101,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theVec Vector, defining the plane normal direction. theTrimSize Half size of a side of quadrangle face, representing the plane. - Returns: + Returns: New GEOM.GEOM_Object, containing the created plane. """ # Example: see GEOM_TestAll.py @@ -1181,7 +1181,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theVec2 Vector, defining the plane normal direction. theTrimSize Half size of a side of quadrangle face, representing the plane. - Returns: + Returns: New GEOM.GEOM_Object, containing the created plane. """ # Example: see GEOM_TestAll.py @@ -1202,12 +1202,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a plane, based on a Local coordinate system. - Parameters: + Parameters: theLCS coordinate system, defining plane. theTrimSize Half size of a side of quadrangle face, representing the plane. theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3) - Returns: + Returns: New GEOM.GEOM_Object, containing the created plane. """ # Example: see GEOM_TestAll.py @@ -1228,12 +1228,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a local coordinate system. - Parameters: + Parameters: OX,OY,OZ Three coordinates of coordinate system origin. XDX,XDY,XDZ Three components of OX direction YDX,YDY,YDZ Three components of OY direction - Returns: + Returns: New GEOM.GEOM_Object, containing the created coordinate system. """ # Example: see GEOM_TestAll.py @@ -1254,8 +1254,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape The initial shape to detect the coordinate system. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the created coordinate system. """ anObj = self.BasicOp.MakeMarkerFromShape(theShape) @@ -1278,7 +1278,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theXVec Vector of X direction theYVec Vector of Y direction - Returns: + Returns: New GEOM.GEOM_Object, containing the created coordinate system. """ @@ -1308,7 +1308,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): thePnt2 Middle point of the arc. thePnt3 End point of the arc. - Returns: + Returns: New GEOM.GEOM_Object, containing the created arc. """ # Example: see GEOM_TestAll.py @@ -1477,7 +1477,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theRMinor Minor ellipse radius. theVecMaj Vector, direction of the ellipse's main axis. - Returns: + Returns: New GEOM.GEOM_Object, containing the created ellipse. """ # Example: see GEOM_TestAll.py @@ -1576,7 +1576,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theDoReordering If True, the algo does not follow the order of thePoints but searches for the closest vertex. - Returns: + Returns: New GEOM.GEOM_Object, containing the created B-Spline curve. """ # Example: see GEOM_TestAll.py @@ -1620,11 +1620,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): if theNewMethod: anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType) else: - anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType) + anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType) RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp) anObj.SetParameters(Parameters) return anObj - + # end of l4_curves @@ -1696,7 +1696,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): - CMD is one of - "R angle" : Set the direction by angle - "D dx dy" : Set the direction by DX & DY - + - "TT x y" : Create segment by point at X & Y - "T dx dy" : Create segment by point with DX & DY - "L length" : Create segment by direction & Length @@ -1713,11 +1713,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): - "WW" : Close Wire (to finish) - "WF" : Close Wire and build face (to finish) - + - Flag1 (= reverse) is 0 or 2 ... - if 0 the drawn arc is the one of lower angle (< Pi) - if 2 the drawn arc ius the one of greater angle (> Pi) - + - Flag2 (= control tolerance) is 0 or 1 ... - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7) - if 1 the wire is built only if the end point is on the arc @@ -1829,11 +1829,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): def MakeBox (self, x1,y1,z1, x2,y2,z2): """ Create a box by coordinates of two opposite vertices. - + Parameters: x1,y1,z1 double values, defining first point. x2,y2,z2 double values, defining second point. - + Returns: New GEOM.GEOM_Object, containing the created box. """ @@ -1862,7 +1862,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theDY Length of Box edges, parallel to OY axis. theDZ Length of Box edges, parallel to OZ axis. - Returns: + Returns: New GEOM.GEOM_Object, containing the created box. """ # Example: see GEOM_TestAll.py @@ -1968,7 +1968,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theVec Vector, normal to the plane of the disk. theR Disk radius. - Returns: + Returns: New GEOM.GEOM_Object, containing the created disk. """ # Example: see GEOM_TestAll.py @@ -1990,7 +1990,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: thePnt1,thePnt2,thePnt3 Points, defining the disk. - Returns: + Returns: New GEOM.GEOM_Object, containing the created disk. """ # Example: see GEOM_TestAll.py @@ -2012,7 +2012,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theR Radius of Face. theOrientation set the orientation belong axis OXY or OYZ or OZX - Returns: + Returns: New GEOM.GEOM_Object, containing the created disk. Example of usage: @@ -2043,7 +2043,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theR Cylinder radius. theH Cylinder height. - Returns: + Returns: New GEOM.GEOM_Object, containing the created cylinder. """ # Example: see GEOM_TestAll.py @@ -2071,7 +2071,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theR Cylinder radius. theH Cylinder height. - Returns: + Returns: New GEOM.GEOM_Object, containing the created cylinder. """ # Example: see GEOM_TestAll.py @@ -2095,8 +2095,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): thePnt Sphere center. theR Sphere radius. - Returns: - New GEOM.GEOM_Object, containing the created sphere. + Returns: + New GEOM.GEOM_Object, containing the created sphere. """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) @@ -2115,7 +2115,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a sphere with given center and radius. - Parameters: + Parameters: x,y,z Coordinates of sphere center. theR Sphere radius. @@ -2136,11 +2136,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a sphere with given radius at the origin of coordinate system. - Parameters: + Parameters: theR Sphere radius. Returns: - New GEOM.GEOM_Object, containing the created sphere. + New GEOM.GEOM_Object, containing the created sphere. """ # Example: see GEOM_TestAll.py theR,Parameters = ParseParameters(theR) @@ -2164,7 +2164,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a cone with given base point, axis, height and radiuses. - Parameters: + Parameters: thePnt Central point of the first cone base. theAxis Cone axis. theR1 Radius of the first cone base. @@ -2202,7 +2202,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): the origin of coordinate system. Axis of the cone will be collinear to the OZ axis of the coordinate system. - Parameters: + Parameters: theR1 Radius of the first cone base. theR2 Radius of the second cone base. theH Cone height. @@ -2233,7 +2233,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a torus with given center, normal vector and radiuses. - Parameters: + Parameters: thePnt Torus central point. theVec Torus axis of symmetry. theRMajor Torus major radius. @@ -2259,12 +2259,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a torus with given radiuses at the origin of coordinate system. - Parameters: + Parameters: theRMajor Torus major radius. theRMinor Torus minor radius. Returns: - New GEOM.GEOM_Object, containing the created torus. + New GEOM.GEOM_Object, containing the created torus. """ # Example: see GEOM_TestAll.py theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor) @@ -2292,7 +2292,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Create a shape by extrusion of the base shape along a vector, defined by two points. - Parameters: + Parameters: theBase Base shape to be extruded. thePoint1 First end of extrusion vector. thePoint2 Second end of extrusion vector. @@ -2327,7 +2327,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a shape by extrusion of the base shape along a vector, defined by two points, in 2 Ways (forward/backward). - Parameters: + Parameters: theBase Base shape to be extruded. thePoint1 First end of extrusion vector. thePoint2 Second end of extrusion vector. @@ -2357,7 +2357,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): i.e. all the space, transfixed by the base shape during its translation along the vector on the given distance. - Parameters: + Parameters: theBase Base shape to be extruded. theVec Direction of extrusion. theH Prism dimension along theVec. @@ -2428,7 +2428,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theScaleFactor Use it to make prism with scaled second base. Nagative value means not scaled second base. - Returns: + Returns: New GEOM.GEOM_Object, containing the created prism. """ # Example: see GEOM_TestAll.py @@ -2492,7 +2492,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theAxis Rotation axis. theAngle Rotation angle in radians. - Returns: + Returns: New GEOM.GEOM_Object, containing the created revolution. """ # Example: see GEOM_TestAll.py @@ -2524,7 +2524,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theAxis Rotation axis. theAngle Rotation angle in radians. - Returns: + Returns: New GEOM.GEOM_Object, containing the created revolution. """ theAngle,Parameters = ParseParameters(theAngle) @@ -2568,7 +2568,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Approximation makes the algorithm work slower, but allows building the surface for rather complex cases - Returns: + Returns: New GEOM.GEOM_Object, containing the created filling surface. Example of usage: @@ -2604,7 +2604,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theMaxDeg a maximal degree of BSpline surface to create theTol3D a 3d tolerance to be reached - Returns: + Returns: New GEOM.GEOM_Object, containing the created filling surface. Example of usage: @@ -2763,7 +2763,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theWithCorrection - defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point (0/1) - Returns: + Returns: New GEOM.GEOM_Object, containing the created solids. """ anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases, @@ -2861,7 +2861,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): same angle beetween the direction and the sections along the sweep surface. - Returns: + Returns: New GEOM.GEOM_Object, containing the created pipe. """ # Example: see GEOM_TestAll.py @@ -2959,7 +2959,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): thePnt1 Point for the first end of edge. thePnt2 Point for the second end of edge. - Returns: + Returns: New GEOM.GEOM_Object, containing the created edge. """ # Example: see GEOM_TestAll.py @@ -2987,7 +2987,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): at the end of theRefCurve, close to the selected point. If None, start from the first point of theRefCurve. - Returns: + Returns: New GEOM.GEOM_Object, containing the created edge. """ # Example: see GEOM_TestAll.py @@ -3037,7 +3037,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theTolerance Maximum distance between vertices, that will be merged. Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()). - Returns: + Returns: New GEOM.GEOM_Object, containing the created wire. """ # Example: see GEOM_TestAll.py @@ -3100,7 +3100,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): algorithm tries to build any suitable face on the given wire and prints a warning message. - Returns: + Returns: New GEOM.GEOM_Object, containing the created face. """ # Example: see GEOM_TestAll.py @@ -3207,7 +3207,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape Shape to count faces of. - Returns: + Returns: Quantity of faces. """ # Example: see GEOM_TestOthers.py @@ -3227,7 +3227,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape Shape to count edges of. - Returns: + Returns: Quantity of edges. """ # Example: see GEOM_TestOthers.py @@ -3295,7 +3295,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape Shape to be reversed. - Returns: + Returns: The reversed copy of theShape. """ # Example: see GEOM_TestAll.py @@ -3380,7 +3380,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theShapes Shapes to find common sub-shapes of. theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType) - Returns: + Returns: List of GEOM.GEOM_Object, that are sub-shapes of all given shapes. """ # Example: see GEOM_TestOthers.py @@ -3645,7 +3645,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theState The state of the sub-shapes to find (see GEOM::shape_state) Returns: - List of all found sub-shapes indices. + List of all found sub-shapes indices. """ # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState) @@ -3850,7 +3850,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # certain way, defined through \a theState parameter. # @param theCheckShape Shape for relative comparing. It must be a solid. # @param theShape Shape to find sub-shapes of. - # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) + # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) # @param theState The state of the sub-shapes to find (see GEOM::shape_state) # @return List of all found sub-shapes. # @@ -3967,7 +3967,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Returns: Group of all found sub-shapes or a single found sub-shape. - + Note: This function has a restriction on argument shapes. If theShapeWhere has curved parts with significantly @@ -4048,7 +4048,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # equal to \a theShapeWhat. # @param theShapeWhere Shape to find sub-shape of. # @param theShapeWhat Shape, specifying what to find. - # @return List of all found sub-shapes indices. + # @return List of all found sub-shapes indices. # # @ref swig_GetSame "Example" def GetSameIDs(self,theShapeWhere, theShapeWhat): @@ -4178,7 +4178,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Explode a shape on sub-shapes of a given type. # If the shape itself matches the type, it is also returned. # @param aShape Shape to be exploded. - # @param aType Type of sub-shapes to be retrieved (see ShapeType()) + # @param aType Type of sub-shapes to be retrieved (see ShapeType()) # @return List of sub-shapes of type theShapeType, contained in theShape. # # @ref swig_all_decompose "Example" @@ -4189,7 +4189,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: aShape Shape to be exploded. - aType Type of sub-shapes to be retrieved (see geompy.ShapeType) + aType Type of sub-shapes to be retrieved (see geompy.ShapeType) Returns: List of sub-shapes of type theShapeType, contained in theShape. @@ -4210,7 +4210,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Explode a shape on sub-shapes of a given type. Parameters: - aShape Shape to be exploded (see geompy.ShapeType) + aShape Shape to be exploded (see geompy.ShapeType) aType Type of sub-shapes to be retrieved (see geompy.ShapeType) Returns: @@ -4234,7 +4234,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Obtain a compound of sub-shapes of aShape, selected by they indices in list of all sub-shapes of type aType. Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] - + Parameters: aShape Shape to get sub-shape of. ListOfID List of sub-shapes indices. @@ -4265,11 +4265,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): Sub-shapes will be sorted by coordinates of their gravity centers. If the shape itself matches the type, it is also returned. - Parameters: + Parameters: aShape Shape to be exploded. aType Type of sub-shapes to be retrieved (see geompy.ShapeType) - Returns: + Returns: List of sub-shapes of type theShapeType, contained in theShape. """ # Example: see GEOM_TestAll.py @@ -4289,11 +4289,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): Explode a shape on sub-shapes of a given type. Sub-shapes will be sorted by coordinates of their gravity centers. - Parameters: + Parameters: aShape Shape to be exploded. aType Type of sub-shapes to be retrieved (see geompy.ShapeType) - Returns: + Returns: List of IDs of sub-shapes. """ ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True) @@ -4347,7 +4347,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): aType The shape type (see geompy.ShapeType) isSorted Boolean flag to switch sorting on/off. - Returns: + Returns: List of sub-shapes of type aType, contained in aShape. """ # Example: see GEOM_TestAll.py @@ -4369,7 +4369,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): aShape Main shape. anIDs List of unique IDs of sub-shapes inside theMainShape. - Returns: + Returns: List of GEOM.GEOM_Object, corresponding to found sub-shapes. """ # Example: see GEOM_TestAll.py @@ -4471,7 +4471,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n # \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel, # ruling out sharp edges).\n - # \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces + # \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces # are of the same magnitude).\n # \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves # or surfaces (d/du C(u)) are the same at junction. \n @@ -4543,7 +4543,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): * SplitContinuity.SurfaceContinuity - required continuity for surfaces. * SplitContinuity.CurveContinuity - required continuity for curves. This and the previous parameters can take the following values: - + Parametric Continuity: C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are coincidental. The curves or surfaces may still meet at an angle, @@ -4554,7 +4554,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): or surfaces are of the same magnitude). CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves or surfaces (d/du C(u)) are the same at junction. - + Geometric Continuity: G1: first derivatives are proportional at junction. The curve tangents thus have the same direction, but not necessarily the same magnitude. @@ -4686,7 +4686,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theWires Indices of wires to be removed, if EMPTY then the method removes ALL internal wires of the given object. - Returns: + Returns: New GEOM.GEOM_Object, containing processed shape. """ # Example: see GEOM_TestHealing.py @@ -4710,7 +4710,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theWires Indices of wires to be removed, if EMPTY then the method removes ALL internal holes of the given object - Returns: + Returns: New GEOM.GEOM_Object, containing processed shape. """ # Example: see GEOM_TestHealing.py @@ -4731,15 +4731,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Close an open wire. - Parameters: + Parameters: theObject Shape to be processed. theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, if [ ], then theObject itself is a wire. isCommonVertex If True : closure by creation of a common vertex, If False : closure by creation of an edge between ends. - Returns: - New GEOM.GEOM_Object, containing processed shape. + Returns: + New GEOM.GEOM_Object, containing processed shape. """ # Example: see GEOM_TestHealing.py anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex) @@ -4761,7 +4761,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Addition of a point to a given edge object. - Parameters: + Parameters: theObject Shape to be processed. theEdgeIndex Index of edge to be divided within theObject's shape, if -1, then theObject itself is the edge. @@ -4770,7 +4770,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): isByParameter If TRUE : theValue is treated as a curve parameter [0..1], if FALSE : theValue is treated as a length parameter [0..1] - Returns: + Returns: New GEOM.GEOM_Object, containing processed shape. """ # Example: see GEOM_TestHealing.py @@ -4791,12 +4791,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Suppress the vertices in the wire in case if adjacent edges are C1 continuous. - Parameters: + Parameters: theWire Wire to minimize the number of C1 continuous edges in. theVertices A list of vertices to suppress. If the list is empty, all vertices in a wire will be assumed. - Returns: + Returns: New GEOM.GEOM_Object with modified wire. """ anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices) @@ -4812,10 +4812,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Change orientation of the given object. Updates given shape. - Parameters: + Parameters: theObject Shape to be processed. - Returns: + Returns: Updated theObject """ theObject = self.HealOp.ChangeOrientation(theObject) @@ -4834,7 +4834,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theObject Shape to be processed. - Returns: + Returns: New GEOM.GEOM_Object, containing processed shape. """ anObj = self.HealOp.ChangeOrientationCopy(theObject) @@ -4855,7 +4855,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theObject Shape to be processed. theTolerance Required tolerance value. - Returns: + Returns: New GEOM.GEOM_Object, containing processed shape. """ anObj = self.HealOp.LimitTolerance(theObject, theTolerance) @@ -4879,7 +4879,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theObject Shape to get free boundary of. - Returns: + Returns: [status, theClosedWires, theOpenWires] status: FALSE, if an error(s) occured during the method execution. theClosedWires: Closed wires on the free boundary of the given shape. @@ -4935,7 +4935,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theTolerance Maximum distance between faces, which can be considered as coincident. - Returns: + Returns: GEOM.ListOfGO """ anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance) @@ -4998,7 +4998,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theShape Initial shape. theTolerance Maximum distance between edges, which can be considered as coincident. - Returns: + Returns: New GEOM.GEOM_Object, containing a copy of theShape without coincident edges. """ theTolerance,Parameters = ParseParameters(theTolerance) @@ -5024,7 +5024,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theTolerance Maximum distance between edges, which can be considered as coincident. - Returns: + Returns: GEOM.ListOfGO """ anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance) @@ -5052,7 +5052,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): which can be considered as coincident. theEdges List of edges for gluing. - Returns: + Returns: New GEOM.GEOM_Object, containing a copy of theShape without some edges. """ @@ -5083,13 +5083,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform one of boolean operations on two given shapes. - Parameters: + Parameters: theShape1 First argument for boolean operation. theShape2 Second argument for boolean operation. theOperation Indicates the operation to be done: 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. """ # Example: see GEOM_TestAll.py @@ -5108,11 +5108,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform Common boolean operation on two given shapes. - Parameters: + Parameters: theShape1 First argument for boolean operation. theShape2 Second argument for boolean operation. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the result shape. """ # Example: see GEOM_TestOthers.py @@ -5129,13 +5129,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform Cut boolean operation on two given shapes. - Parameters: + Parameters: theShape1 First argument for boolean operation. theShape2 Second argument for boolean operation. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the result shape. - + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(theShape1, theShape2, 2) @@ -5151,13 +5151,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform Fuse boolean operation on two given shapes. - Parameters: + Parameters: theShape1 First argument for boolean operation. theShape2 Second argument for boolean operation. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the result shape. - + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(theShape1, theShape2, 3) @@ -5173,13 +5173,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform Section boolean operation on two given shapes. - Parameters: + Parameters: theShape1 First argument for boolean operation. theShape2 Second argument for boolean operation. - - Returns: + + Returns: New GEOM.GEOM_Object, containing the result shape. - + """ # Example: see GEOM_TestOthers.py return self.MakeBoolean(theShape1, theShape2, 4) @@ -5223,7 +5223,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform partition operation. - Parameters: + Parameters: ListShapes Shapes to be intersected. ListTools Shapes to intersect theShapes. Limit Type of resulting shapes (see geompy.ShapeType) @@ -5237,11 +5237,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): Each compound from ListShapes and ListTools will be exploded in order to avoid possible intersection between shapes from this compound. - + After implementation new version of PartitionAlgo (October 2006) other parameters are ignored by current functionality. They are kept in this function only for support old versions. - + Ignored parameters: ListKeepInside Shapes, outside which the results will be deleted. Each shape from theKeepInside must belong to theShapes also. @@ -5250,7 +5250,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): RemoveWebs If TRUE, perform Glue 3D algorithm. ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shapes. """ # Example: see GEOM_TestAll.py @@ -5290,14 +5290,14 @@ class geompyDC(GEOM._objref_GEOM_Gen): compound contains nonintersected shapes. Performance will be better since intersection between shapes from compound is not performed. - Parameters: + Parameters: Description of all parameters as in method geompy.MakePartition - + NOTE: Passed compounds (via ListShapes or via ListTools) have to consist of nonintersecting shapes. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shapes. """ if Limit == ShapeType["AUTO"]: @@ -5340,11 +5340,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform partition of the Shape with the Plane - Parameters: + Parameters: theShape Shape to be intersected. thePlane Tool shape, to intersect theShape. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. """ # Example: see GEOM_TestAll.py @@ -5372,12 +5372,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): Translate the given object along the vector, specified by its end points, creating its copy before the translation. - Parameters: + Parameters: theObject The object to be translated. thePoint1 Start point of translation vector. thePoint2 End point of translation vector. - Returns: + Returns: New GEOM.GEOM_Object, containing the translated object. """ # Example: see GEOM_TestAll.py @@ -5395,11 +5395,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Translate the given object along the vector, specified by its components. - Parameters: + Parameters: theObject The object to be translated. theDX,theDY,theDZ Components of translation vector. - Returns: + Returns: Translated GEOM.GEOM_Object. """ # Example: see GEOM_TestAll.py @@ -5421,11 +5421,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): Translate the given object along the vector, specified by its components, creating its copy before the translation. - Parameters: + Parameters: theObject The object to be translated. theDX,theDY,theDZ Components of translation vector. - Returns: + Returns: New GEOM.GEOM_Object, containing the translated object. """ # Example: see GEOM_TestAll.py @@ -5447,11 +5447,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): Translate the given object along the given vector, creating its copy before the translation. - Parameters: + Parameters: theObject The object to be translated. theVector The translation vector. - Returns: + Returns: New GEOM.GEOM_Object, containing the translated object. """ # Example: see GEOM_TestAll.py @@ -5471,13 +5471,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Translate the given object along the given vector on given distance. - Parameters: + Parameters: theObject The object to be translated. theVector The translation vector. theDistance The translation distance. theCopy Flag used to translate object itself or create a copy. - Returns: + Returns: New GEOM.GEOM_Object, containing the translated object. """ # Example: see GEOM_TestAll.py @@ -5505,7 +5505,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theVector The translation vector. theDistance The translation distance. - Returns: + Returns: New GEOM.GEOM_Object, containing the translated object. """ # Example: see GEOM_TestAll.py @@ -5531,7 +5531,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theAxis Rotation axis. theAngle Rotation angle in radians. - Returns: + Returns: New GEOM.GEOM_Object, containing the rotated object. """ # Example: see GEOM_TestAll.py @@ -5625,7 +5625,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Passing None for it means scaling relatively the origin of global CS. theFactor Scaling factor value. - Returns: + Returns: New GEOM.GEOM_Object, containing the scaled shape. """ # Example: see GEOM_TestAll.py @@ -5704,7 +5704,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theObject The object to be mirrored. theAxis Axis of symmetry. - Returns: + Returns: New GEOM.GEOM_Object, containing the mirrored shape. """ # Example: see GEOM_TestAll.py @@ -5728,7 +5728,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theObject The object to be mirrored. thePoint Point of symmetry. - Returns: + Returns: New GEOM.GEOM_Object, containing the mirrored shape. """ # Example: see GEOM_TestAll.py @@ -5761,7 +5761,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): its location will be changed to theEndLCS. theEndLCS Coordinate system to perform displacement to it. - Returns: + Returns: New GEOM.GEOM_Object, containing the displaced shape. Example of usage: @@ -5796,7 +5796,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theCopy is to create a copy objects if true. theReverse 0 - for usual direction, 1 - to reverse path direction. - Returns: + Returns: New GEOM.GEOM_Object, containing the displaced shape. Example of usage: @@ -5821,7 +5821,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theObject The base object for the offset. theOffset Offset value. - Returns: + Returns: New GEOM.GEOM_Object, containing the offset object. Example of usage: @@ -5850,7 +5850,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theSource The source object for the projection. It can be a point, edge or wire. theTarget The target object. It can be planar or cylindrical face. - Returns: + Returns: New GEOM.GEOM_Object, containing the projection. """ # Example: see GEOM_TestAll.py @@ -5881,7 +5881,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theStep Distance to translate on. theNbTimes Quantity of translations to be done. - Returns: + Returns: New GEOM.GEOM_Object, containing compound of all the shapes, obtained after each translation. @@ -5955,7 +5955,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theAxis The rotation axis. theNbTimes Quantity of rotations to be done. - Returns: + Returns: New GEOM.GEOM_Object, containing compound of all the shapes, obtained after each rotation. @@ -6000,7 +6000,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theStep Translation distance. theNbTimes2 Quantity of translations to be done. - Returns: + Returns: New GEOM.GEOM_Object, containing compound of all the shapes, obtained after each transformation. @@ -6037,7 +6037,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): """ The same, as MultiRotate2D(), but axis is given by direction and point - + Example of usage: pz = geompy.MakeVertex(0, 0, 100) vy = geompy.MakeVectorDXDYDZ(0, 100, 0) @@ -6069,11 +6069,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): theShape Shape, to perform fillet on. theR Fillet radius. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. - Example of usage: - filletall = geompy.MakeFilletAll(prism, 10.) + Example of usage: + filletall = geompy.MakeFilletAll(prism, 10.) """ # Example: see GEOM_TestOthers.py theR,Parameters = ParseParameters(theR) @@ -6104,7 +6104,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. Example of usage: @@ -6190,10 +6190,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): The list of vertices could be empty,in this case fillet will done done at all vertices in wire - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. - Example of usage: + Example of usage: # create wire Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4]) # make fillet at given wire vertices with giver radius @@ -6225,7 +6225,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. Example of usage: @@ -6254,7 +6254,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theShape Shape, to perform chamfer on. theD Chamfer size along each face. - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. Example of usage: @@ -6291,7 +6291,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. Example of usage: @@ -6327,7 +6327,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. Example of usage: @@ -6373,10 +6373,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): theD2 Chamfer size along another of two faces, connected to the edge. theFaces Sequence of global indices of faces of theShape. - + Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). - Returns: + Returns: New GEOM.GEOM_Object, containing the result shape. """ # Example: see GEOM_TestAll.py @@ -6418,7 +6418,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Perform a chamfer on edges, with distance D1 on the first specified face (if several for one edge) - + Parameters: theShape Shape, to perform chamfer on. theD1,theD2 Chamfer size @@ -6465,14 +6465,14 @@ class geompyDC(GEOM._objref_GEOM_Gen): else: anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape) return anObj - + ## Remove material from a solid by extrusion of the base shape on the given distance. - # @param theInit Shape to remove material from. It must be a solid or + # @param theInit Shape to remove material from. It must be a solid or # a compound made of a single solid. # @param theBase Closed edge or wire defining the base shape to be extruded. # @param theH Prism dimension along the normal to theBase # @param theAngle Draft angle in degrees. - # @return New GEOM.GEOM_Object, containing the initial shape with removed material + # @return New GEOM.GEOM_Object, containing the initial shape with removed material # # @ref tui_creation_prism "Example" def MakeExtrudedCut(self, theInit, theBase, theH, theAngle): @@ -6493,15 +6493,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False) RaiseIfFailed("MakeExtrudedBoss", self.PrimOp) #anObj.SetParameters(Parameters) - return anObj - + return anObj + ## Add material to a solid by extrusion of the base shape on the given distance. - # @param theInit Shape to add material to. It must be a solid or + # @param theInit Shape to add material to. It must be a solid or # a compound made of a single solid. # @param theBase Closed edge or wire defining the base shape to be extruded. # @param theH Prism dimension along the normal to theBase # @param theAngle Draft angle in degrees. - # @return New GEOM.GEOM_Object, containing the initial shape with added material + # @return New GEOM.GEOM_Object, containing the initial shape with added material # # @ref tui_creation_prism "Example" def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle): @@ -6522,7 +6522,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True) RaiseIfFailed("MakeExtrudedBoss", self.PrimOp) #anObj.SetParameters(Parameters) - return anObj + return anObj # end of l3_local ## @} @@ -6545,13 +6545,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): Perform an Archimde operation on the given shape with given parameters. The object presenting the resulting face is returned. - Parameters: + Parameters: theShape Shape to be put in water. theWeight Weight og the shape. theWaterDensity Density of the water. theMeshDeflection Deflection of the mesh, using to compute the section. - Returns: + Returns: New GEOM.GEOM_Object, containing a section of theShape by a plane, corresponding to water level. """ @@ -6599,7 +6599,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Get summarized length of all wires, area of surface and volume of the given shape. - Parameters: + Parameters: theShape Shape to define properties of. Returns: @@ -6625,7 +6625,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get parameters of bounding box of the given shape - Parameters: + Parameters: theShape Shape to obtain bounding box of. Returns: @@ -6650,7 +6650,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get inertia matrix and moments of inertia of theShape. - Parameters: + Parameters: theShape Shape to calculate inertia of. Returns: @@ -6671,8 +6671,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): def AreCoordsInside(self, theShape, coords, tolerance=1.e-7): """ Get if coords are included in the shape (ST_IN or ST_ON) - - Parameters: + + Parameters: theShape Shape coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...] tolerance to be used (default is 1.0e-7) @@ -6690,11 +6690,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): def MinDistance(self, theShape1, theShape2): """ Get minimal distance between the given shapes. - - Parameters: + + Parameters: theShape1,theShape2 Shapes to find minimal distance between. - Returns: + Returns: Value of the minimal distance between the given shapes. """ # Example: see GEOM_TestMeasures.py @@ -6711,10 +6711,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get minimal distance between the given shapes. - Parameters: + Parameters: theShape1,theShape2 Shapes to find minimal distance between. - Returns: + Returns: Value of the minimal distance between the given shapes. """ # Example: see GEOM_TestMeasures.py @@ -6734,14 +6734,14 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get angle between the given shapes in degrees. - Parameters: + Parameters: theShape1,theShape2 Lines or linear edges to find angle between. Note: If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed. - Returns: + Returns: Value of the angle between the given shapes in degrees. """ # Example: see GEOM_TestMeasures.py @@ -6760,15 +6760,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get angle between the given shapes in radians. - Parameters: + Parameters: theShape1,theShape2 Lines or linear edges to find angle between. - + Note: If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed. - Returns: + Returns: Value of the angle between the given shapes in radians. """ # Example: see GEOM_TestMeasures.py @@ -6787,12 +6787,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get angle between the given vectors in degrees. - Parameters: + Parameters: theShape1,theShape2 Vectors to find angle between. theFlag If True, the normal vector is defined by the two vectors cross, if False, the opposite vector to the normal vector is used. - Returns: + Returns: Value of the angle between the given vectors in degrees. """ anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2) @@ -6806,12 +6806,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get angle between the given vectors in radians. - Parameters: + Parameters: theShape1,theShape2 Vectors to find angle between. theFlag If True, the normal vector is defined by the two vectors cross, if False, the opposite vector to the normal vector is used. - Returns: + Returns: Value of the angle between the given vectors in radians. """ anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180. @@ -6832,11 +6832,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Measure curvature of a curve at a point, set by parameter. - Parameters: + Parameters: theCurve a curve. theParam parameter. - Returns: + Returns: radius of curvature of theCurve. """ # Example: see GEOM_TestMeasures.py @@ -6854,12 +6854,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Measure curvature of a curve at a point. - Parameters: + Parameters: theCurve a curve. thePoint given point. - Returns: - radius of curvature of theCurve. + Returns: + radius of curvature of theCurve. """ aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint) RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp) @@ -6882,12 +6882,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Measure max radius of curvature of surface. - Parameters: + Parameters: theSurf the given surface. theUParam Value of U-parameter on the referenced surface. theVParam Value of V-parameter on the referenced surface. - - Returns: + + Returns: max radius of curvature of theSurf. """ # Example: see GEOM_TestMeasures.py @@ -6905,12 +6905,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Measure max radius of curvature of surface in the given point. - Parameters: + Parameters: theSurf the given surface. thePoint given point. - - Returns: - max radius of curvature of theSurf. + + Returns: + max radius of curvature of theSurf. """ aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint) RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp) @@ -6921,18 +6921,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theUParam Value of U-parameter on the referenced surface. # @param theVParam Value of V-parameter on the referenced surface. # @return min radius of curvature of theSurf. - # + # ## @ref swig_todo "Example" def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam): """ Measure min radius of curvature of surface. - Parameters: + Parameters: theSurf the given surface. theUParam Value of U-parameter on the referenced surface. theVParam Value of V-parameter on the referenced surface. - - Returns: + + Returns: Min radius of curvature of theSurf. """ aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam) @@ -6949,12 +6949,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Measure min radius of curvature of surface in the given point. - Parameters: + Parameters: theSurf the given surface. thePoint given point. - - Returns: - Min radius of curvature of theSurf. + + Returns: + Min radius of curvature of theSurf. """ aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint) RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp) @@ -6973,10 +6973,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get min and max tolerances of sub-shapes of theShape - Parameters: + Parameters: theShape Shape, to get tolerances of. - Returns: + Returns: [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax] FaceMin,FaceMax: Min and max tolerances of the faces. EdgeMin,EdgeMax: Min and max tolerances of the edges. @@ -7120,7 +7120,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape Shape to find first vertex. - Returns: + Returns: New GEOM.GEOM_Object, containing the created vertex. """ # Example: see GEOM_TestMeasures.py @@ -7137,10 +7137,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get the last vertex of wire/edge depended orientation. - Parameters: + Parameters: theShape Shape to find last vertex. - Returns: + Returns: New GEOM.GEOM_Object, containing the created vertex. """ # Example: see GEOM_TestMeasures.py @@ -7160,12 +7160,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get a normale to the given face. If the point is not given, the normale is calculated at the center of mass. - - Parameters: + + Parameters: theFace Face to define normale of. theOptionalPoint Point to compute the normale at. - Returns: + Returns: New GEOM.GEOM_Object, containing the created vector. """ # Example: see GEOM_TestMeasures.py @@ -7179,7 +7179,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # if TRUE, the shape's geometry will be checked also. # @param theReturnStatus If FALSE and if theShape is invalid, a description \n # of problem is printed. - # if TRUE and if theShape is invalid, the description + # if TRUE and if theShape is invalid, the description # of problem is also returned. # @return TRUE, if the shape "seems to be valid". # @@ -7188,16 +7188,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Check a topology of the given shape. - Parameters: + Parameters: theShape Shape to check validity of. theIsCheckGeom If FALSE, only the shape's topology will be checked, if TRUE, the shape's geometry will be checked also. theReturnStatus If FALSE and if theShape is invalid, a description of problem is printed. - if TRUE and if theShape is invalid, the description + if TRUE and if theShape is invalid, the description of problem is returned. - Returns: + Returns: TRUE, if the shape "seems to be valid". If theShape is invalid, prints a description of problem. This description can also be returned. @@ -7225,10 +7225,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Detect self-intersections in the given shape. - Parameters: + Parameters: theShape Shape to check. - Returns: + Returns: TRUE, if the shape contains no self-intersections. """ # Example: see GEOM_TestMeasures.py @@ -7256,10 +7256,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane. - Parameters: + Parameters: theShape Shape to calculate position of. - Returns: + Returns: [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. Ox,Oy,Oz: Coordinates of shape's LCS origin. Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. @@ -7282,8 +7282,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): def KindOfShape(self,theShape): """ Get kind of theShape. - - Parameters: + + Parameters: theShape Shape to get a kind of. Returns: @@ -7334,7 +7334,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Import a shape from the BREP or IGES or STEP file (depends on given format) with given name. - Parameters: + Parameters: theFileName The file, containing the shape. theFormatName Specify format for the file reading. Available formats can be obtained with geompy.InsertOp.ImportTranslators() method. @@ -7371,7 +7371,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): geompy.ImportFile(...) function for BREP format Import a shape from the BREP file with given name. - Parameters: + Parameters: theFileName The file, containing the shape. Returns: @@ -7486,7 +7486,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: shape.GetShapeStream() method can be used to obtain the shape's BRep stream. - Parameters: + Parameters: theStream The BRep binary stream. Returns: @@ -7508,7 +7508,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Export the given shape into a file with given name. - Parameters: + Parameters: theObject Shape to be stored in the file. theFileName Name of the file to store the given shape in. theFormatName Specify format for the shape storage. @@ -7568,13 +7568,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a quadrangle face from four edges. Order of Edges is not important. It is not necessary that edges share the same vertex. - Parameters: + Parameters: E1,E2,E3,E4 Edges for the face bound. - Returns: + Returns: New GEOM.GEOM_Object, containing the created face. - Example of usage: + Example of usage: qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4) """ # Example: see GEOM_Spanner.py @@ -7593,12 +7593,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a quadrangle face on two edges. The missing edges will be built by creating the shortest ones. - Parameters: + Parameters: E1,E2 Two opposite edges for the face. - Returns: + Returns: New GEOM.GEOM_Object, containing the created face. - + Example of usage: # create vertices p1 = geompy.MakeVertex( 0., 0., 0.) @@ -7628,10 +7628,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a quadrangle face with specified corners. The missing edges will be built by creating the shortest ones. - Parameters: + Parameters: V1,V2,V3,V4 Corner vertices for the face. - Returns: + Returns: New GEOM.GEOM_Object, containing the created face. Example of usage: @@ -7660,10 +7660,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a hexahedral solid, bounded by the six given faces. Order of faces is not important. It is not necessary that Faces share the same edge. - Parameters: + Parameters: F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid. - Returns: + Returns: New GEOM.GEOM_Object, containing the created solid. Example of usage: @@ -7686,7 +7686,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Create a hexahedral solid between two given faces. The missing faces will be built by creating the smallest ones. - Parameters: + Parameters: F1,F2 Two opposite faces for the hexahedral solid. Returns: @@ -7718,13 +7718,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get a vertex, found in the given shape by its coordinates. - Parameters: + Parameters: theShape Block or a compound of blocks. theX,theY,theZ Coordinates of the sought vertex. theEpsilon Maximum allowed distance between the resulting vertex and point with the given coordinates. - Returns: + Returns: New GEOM.GEOM_Object, containing the found vertex. Example of usage: @@ -7745,7 +7745,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Find a vertex of the given shape, which has minimal distance to the given point. - Parameters: + Parameters: theShape Any shape. thePoint Point, close to the desired vertex. @@ -7771,7 +7771,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get an edge, found in the given shape by two given vertices. - Parameters: + Parameters: theShape Block or a compound of blocks. thePoint1,thePoint2 Points, close to the ends of the desired edge. @@ -7793,7 +7793,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Find an edge of the given shape, which has minimal distance to the given point. - Parameters: + Parameters: theShape Block or a compound of blocks. thePoint Point, close to the desired edge. @@ -7863,7 +7863,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theBlock Must be a hexahedral solid. theFace Face of theBlock, opposite to the desired face. - Returns: + Returns: New GEOM.GEOM_Object, containing the found face. """ # Example: see GEOM_Spanner.py @@ -7981,7 +7981,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Returns: TRUE, if the given shape is a compound of blocks. - If theCompound is not valid, prints all discovered errors. + If theCompound is not valid, prints all discovered errors. """ # Example: see GEOM_Spanner.py (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound) @@ -8041,7 +8041,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): doUnionFaces If True, then unite faces. If False (the default value), do not unite faces. - Returns: + Returns: Improved shape. """ # Example: see GEOM_TestOthers.py @@ -8069,7 +8069,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theShape The compound to check and improve. - Returns: + Returns: Improved compound. """ # Example: see GEOM_TestOthers.py @@ -8104,7 +8104,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Note: If theMaxNbFaces = 0, the maximum number of faces is not restricted. - Returns: + Returns: List of GEOM.GEOM_Object, containing the retrieved blocks. """ # Example: see GEOM_TestOthers.py @@ -8154,7 +8154,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theCompound Compound, to find block in. theParts List of faces and/or edges and/or vertices to be parts of the found block. - Returns: + Returns: New GEOM_Object, containing the found block. """ # Example: see GEOM_TestOthers.py @@ -8302,7 +8302,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Example of usage: group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"]) - + """ # Example: see GEOM_TestOthers.py anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType) @@ -8324,7 +8324,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): theSubShapeID is a sub-shape ID in the main object. Note: - Use method GetSubShapeID() to get an unique ID of the sub-shape + Use method GetSubShapeID() to get an unique ID of the sub-shape """ # Example: see GEOM_TestOthers.py self.GroupOp.AddObject(theGroup, theSubShapeID) @@ -8421,7 +8421,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theGroup is a GEOM group from which the sub-shapes are removed. theSubShapes is a list of indices of sub-shapes to be removed. - """ + """ # Example: see GEOM_TestOthers.py self.GroupOp.DifferenceIDs(theGroup, theSubShapes) RaiseIfFailed("DifferenceIDs", self.GroupOp) @@ -8525,7 +8525,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Cut of lists of groups. # New group is created. It will contain only entities - # which are present in groups listed in theGList1 but + # which are present in groups listed in theGList1 but # are not present in groups from theGList2. # @param theGList1 is a list of GEOM groups to include elements of. # @param theGList2 is a list of GEOM groups to exclude elements of. @@ -8535,7 +8535,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Cut of lists of groups. New group is created. It will contain only entities - which are present in groups listed in theGList1 but + which are present in groups listed in theGList1 but are not present in groups from theGList2. Parameters: @@ -8552,7 +8552,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Cut of lists of groups. # New group is created. It will contain only entities - # which are present in groups listed in theGList1 but + # which are present in groups listed in theGList1 but # are not present in groups from theGList2. # @param theGList1 is a list of GEOM groups to include elements of. # @param theGList2 is a list of GEOM groups to exclude elements of. @@ -8562,7 +8562,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Cut of lists of groups. New group is created. It will contain only entities - which are present in groups listed in theGList1 but + which are present in groups listed in theGList1 but are not present in groups from theGList2. Parameters: @@ -8619,7 +8619,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): Parameters: theId is a GEOM obect type id. - + Returns: type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... ) """ @@ -8891,7 +8891,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # create PipeTShape object with position pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3) """ - theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2) + theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2) if (theP1 and theP2 and theP3): anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3) else: @@ -9007,16 +9007,16 @@ class geompyDC(GEOM._objref_GEOM_Gen): theP1 1st junction point of main pipe theP2 2nd junction point of main pipe theP3 Junction point of incident pipe - + Returns: List of GEOM_Object, containing the created shape and propagation groups. - + Example of usage: # create PipeTShape with fillet object pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0) # create PipeTShape with fillet object with position pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3) - + """ theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF) if (theP1 and theP2 and theP3): @@ -9042,7 +9042,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): RaiseIfFailed("MakeDividedDisk", self.AdvOp) if Parameters: anObj.SetParameters(Parameters) return anObj - + ## This function allows creating a disk already divided into blocks. It # can be used to create divided pipes for later meshing in hexaedra. # @param theCenter Center of the disk @@ -9073,20 +9073,36 @@ class geompyDC(GEOM._objref_GEOM_Gen): if Parameters: anObj.SetParameters(Parameters) return anObj - ## Export a shape to XAO Format - # @param shape Shape to export - # @param fileName The name of the exported file - # @param groups List of groups to export - # @param fields List of fields to export + ## Export a shape to XAO format + # @param shape The shape to export + # @param groups The list of groups to export + # @param fields The list of fields to export + # @param author The author of the export + # @param fileName The name of the file to export # @return boolean # - # @ref tui_creation_exportxao "Example" - def ExportXAO(self, fileName, shape, groups, fields): - fileName, shape, groups, fields, Parameters = ParseParameters(fileName, shape, groups, fields) - isGood = self.ImpExpOp.ExportXAO(fileName, shape, groups, fields) + # @ref tui_exportxao "Example" + def ExportXAO(self, shape, groups, fields, author, fileName): + res = self.ImpExpOp.ExportXAO(shape, groups, fields, author, fileName) RaiseIfFailed("ExportXAO", self.ImpExpOp) #if Parameters: anObj.SetParameters(Parameters) - return isGood + return res + + ## Import a shape from XAO format + # @param shape Shape to export + # @param fileName The name of the file to import + # @return tuple (res, shape, groups, fields) + # res Flag indicating if the import was succeful + # shape The imported shape + # groups The list of imported groups + # fields The list of imported fields + # + # @ref tui_importxao "Example" + def ImportXAO(self, fileName): + res = self.ImpExpOp.ImportXAO(fileName) + RaiseIfFailed("ImportXAO", self.ImpExpOp) + #if Parameters: anObj.SetParameters(Parameters) + return res #@@ insert new functions before this line @@ do not remove this line @@# @@ -9138,10 +9154,10 @@ class geompyDC(GEOM._objref_GEOM_Gen): def LoadTexture(self, Path): """ Load marker texture from the file - + Parameters: Path a path to the texture file - + Returns: unique texture identifier """ @@ -9152,7 +9168,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Get internal name of the object based on its study entry # @note This method does not provide an unique identifier of the geometry object. - # @note This is internal function of GEOM component, though it can be used outside it for + # @note This is internal function of GEOM component, though it can be used outside it for # appropriate reason (e.g. for identification of geometry object). # @param obj geometry object # @return unique object identifier @@ -9161,7 +9177,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): """ Get internal name of the object based on its study entry. Note: this method does not provide an unique identifier of the geometry object. - It is an internal function of GEOM component, though it can be used outside GEOM for + It is an internal function of GEOM component, though it can be used outside GEOM for appropriate reason (e.g. for identification of geometry object). Parameters: @@ -9175,11 +9191,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): if entry is not None: lst = entry.split(":") if len(lst) > 0: - ID = lst[-1] # -1 means last item in the list + ID = lst[-1] # -1 means last item in the list return "GEOM_" + ID return ID - - + + ## Add marker texture. @a Width and @a Height parameters # specify width and height of the texture in pixels. diff --git a/src/ImportExportGUI/ImportExportGUI.cxx b/src/ImportExportGUI/ImportExportGUI.cxx index b6b1bb9f3..a011e8a64 100644 --- a/src/ImportExportGUI/ImportExportGUI.cxx +++ b/src/ImportExportGUI/ImportExportGUI.cxx @@ -15,12 +15,9 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : ImportExportGUI.cxx -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// -#include "ImportExportGUI.h" +#include +#include #include "GeometryGUI.h" #include "GeometryGUI_Operations.h" @@ -32,10 +29,10 @@ #include #include "ImportExportGUI_ExportXAODlg.h" +#include "ImportExportGUI_ImportXAODlg.h" +#include "ImportExportGUI.h" //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@// -#include -#include //======================================================================= // function : ImportExportGUI() @@ -72,6 +69,7 @@ bool ImportExportGUI::OnGUIEvent(int commandId, SUIT_Desktop* parent) dialog = new ImportExportGUI_ExportXAODlg(getGeometryGUI(), parent); break; case GEOMOp::OpImportXAO: + dialog = new ImportExportGUI_ImportXAODlg(getGeometryGUI(), parent); break; //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@// default: diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx index 76d250646..1badb8891 100644 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx @@ -89,9 +89,10 @@ ImportExportGUI_ExportXAODlg::ImportExportGUI_ExportXAODlg(GeometryGUI* geometry ledShape = new QLineEdit(gbxExport); ledShape->setMinimumSize(QSize(100, 0)); - gridLayoutExport->addWidget(lblShape, 0, 0, 1, 1); - gridLayoutExport->addWidget(btnShapeSelect, 0, 1, 1, 1); - gridLayoutExport->addWidget(ledShape, 0, 2, 1, 1); + int line = 0, col = 0; + gridLayoutExport->addWidget(lblShape, line, col++, 1, 1); + gridLayoutExport->addWidget(btnShapeSelect, line, col++, 1, 1); + gridLayoutExport->addWidget(ledShape, line, col++, 1, 1); // Line 1 QLabel* lblFileName = new QLabel(tr("GEOM_EXPORTXAO_FILENAME"), gbxExport); @@ -99,9 +100,19 @@ ImportExportGUI_ExportXAODlg::ImportExportGUI_ExportXAODlg(GeometryGUI* geometry ledFileName = new QLineEdit(gbxExport); btnFileSelect->setText("..."); - gridLayoutExport->addWidget(lblFileName, 1, 0, 1, 1); - gridLayoutExport->addWidget(btnFileSelect, 1, 1, 1, 1); - gridLayoutExport->addWidget(ledFileName, 1, 2, 1, 1); + line++; col = 0; + gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1); + gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1); + gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1); + + // Line 2 + QLabel* lblAuthor = new QLabel(tr("GEOM_EXPORTXAO_AUTHOR"), gbxExport); + ledAuthor = new QLineEdit(gbxExport); + + line++; col = 0; + gridLayoutExport->addWidget(lblAuthor, line, col++, 2, 1); + col++; // span + gridLayoutExport->addWidget(ledAuthor, line, col++, 1, 1); //**************************** // Filter Group box @@ -118,8 +129,9 @@ ImportExportGUI_ExportXAODlg::ImportExportGUI_ExportXAODlg(GeometryGUI* geometry QLabel* lblGroups = new QLabel(tr("GEOM_EXPORTXAO_LGROUPS"), gbxFilter); QLabel* lblFields = new QLabel(tr("GEOM_EXPORTXAO_LFIELDS"), gbxFilter); - gridLayoutFilter->addWidget(lblGroups, 0, 0, 1, 1); - gridLayoutFilter->addWidget(lblFields, 0, 1, 1, 1); + line = 0, col = 0; + gridLayoutFilter->addWidget(lblGroups, line, col++, 1, 1); + gridLayoutFilter->addWidget(lblFields, line, col++, 1, 1); // Line 1 lstGroups = new QListWidget(gbxFilter); @@ -127,8 +139,9 @@ ImportExportGUI_ExportXAODlg::ImportExportGUI_ExportXAODlg(GeometryGUI* geometry lstFields = new QListWidget(gbxFilter); lstFields ->setSelectionMode(QAbstractItemView::ExtendedSelection); - gridLayoutFilter->addWidget(lstGroups, 1, 0, 1, 1); - gridLayoutFilter->addWidget(lstFields, 1, 1, 1, 1); + line++; col = 0; + gridLayoutFilter->addWidget(lstGroups, line, col++, 1, 1); + gridLayoutFilter->addWidget(lstFields, line, col++, 1, 1); //**************************** QVBoxLayout* layout = new QVBoxLayout(centralWidget()); @@ -334,6 +347,9 @@ bool ImportExportGUI_ExportXAODlg::execute(ObjectList& objects) { bool res = false; + QString author = ledAuthor->text(); + QString fileName = ledFileName->text(); + // get selected groups QList selGroups = lstGroups->selectedItems(); GEOM::ListOfGO_var groups = new GEOM::ListOfGO(); @@ -359,15 +375,9 @@ bool ImportExportGUI_ExportXAODlg::execute(ObjectList& objects) // call engine function GEOM::GEOM_IImportExportOperations_var ieOp = GEOM::GEOM_IImportExportOperations::_narrow(getOperation()); - char* xao; - res = ieOp->ExportXAO(m_mainObj, groups, fields, xao); - - // dump xao to file - ofstream exportFile; - exportFile.open(ledFileName->text().toStdString().c_str()); - exportFile << xao; - exportFile.close(); - delete xao; + res = ieOp->ExportXAO(m_mainObj, groups, fields, + author.toStdString().c_str(), + fileName.toStdString().c_str()); return res; } diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h index 60f5b92ad..acc4737cd 100644 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h +++ b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h @@ -57,6 +57,7 @@ private: QList m_fields; QLineEdit* ledShape; QLineEdit* ledFileName; + QLineEdit* ledAuthor; QListWidget* lstGroups; QListWidget* lstFields; QPushButton* btnShapeSelect; diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx new file mode 100644 index 000000000..fa6cd11eb --- /dev/null +++ b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx @@ -0,0 +1,251 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +// OCCT Includes +#include +#include +#include +#include +#include + +#include +#include "ImportExportGUI_ImportXAODlg.h" + +//================================================================================= +// Constructor +//================================================================================= +ImportExportGUI_ImportXAODlg::ImportExportGUI_ImportXAODlg(GeometryGUI* geometryGUI, QWidget* parent) +: + GEOMBase_Skeleton(geometryGUI, parent, false) +{ + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("ICON_DLG_IMPORTXAO"))); + QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); + + setWindowTitle(tr("GEOM_IMPORTXAO_TITLE")); + + /***************************************************************/ + mainFrame()->GroupConstructors->setTitle(tr("GEOM_IMPORTXAO_TITLE")); + mainFrame()->RadioButton1->setIcon(imageOp); + mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton3->close(); + + // hide name + mainFrame()->GroupBoxName->hide(); + + //**************************** + // Selection Group box + QGroupBox* gbxExport = new QGroupBox(parent); + + QGridLayout* gridLayoutExport = new QGridLayout(gbxExport); +#ifndef Q_OS_MAC + gridLayoutExport->setSpacing(6); + gridLayoutExport->setContentsMargins(9, 9, 9, 9); +#endif + gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport")); + + int line = 0, col = 0; + QLabel* lblFileName = new QLabel(tr("GEOM_IMPORTXAO_FILENAME"), gbxExport); + btnFileSelect = new QPushButton(gbxExport); + ledFileName = new QLineEdit(gbxExport); + btnFileSelect->setText("..."); + + line++; col = 0; + gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1); + gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1); + gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1); + + //**************************** + QVBoxLayout* layout = new QVBoxLayout(centralWidget()); + layout->setMargin(0); + layout->setSpacing(6); + layout->addWidget(gbxExport); + + // set help + setHelpFileName("create_importxao_page.html"); + + Init(); +} + +//================================================================================= +// Destructor +//================================================================================= +ImportExportGUI_ImportXAODlg::~ImportExportGUI_ImportXAODlg() +{ + // no need to delete child widgets, Qt does it all for us +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void ImportExportGUI_ImportXAODlg::Init() +{ + // Signal/slot connections + connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked())); + + initName(tr("GEOM_IMPORTXAO")); + //SelectionIntoArgument(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void ImportExportGUI_ImportXAODlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool ImportExportGUI_ImportXAODlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + + return true; +} + +//================================================================================= +// function : btnFileSelectClicked() +// purpose : +//================================================================================= +void ImportExportGUI_ImportXAODlg::btnFileSelectClicked() +{ + QString selFile = QFileDialog::getOpenFileName(this, tr("GEOM_SELECT_EXPORT_XAO"), + QString(), tr("XAO_FILES")); + if (!selFile.isEmpty()) + { + ledFileName->setText(selFile); + } +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void ImportExportGUI_ImportXAODlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); +} + +//================================================================================= +// function : enterEvent [REDEFINED] +// purpose : +//================================================================================= +void ImportExportGUI_ImportXAODlg::enterEvent(QEvent*) +{ + if (!mainFrame()->GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr ImportExportGUI_ImportXAODlg::createOperation() +{ + return getGeomEngine()->GetIImportExportOperations(getStudyId()); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool ImportExportGUI_ImportXAODlg::isValid(QString& msg) +{ + // check file name + if (ledFileName->text().isEmpty()) + return false; + + return true; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool ImportExportGUI_ImportXAODlg::execute(ObjectList& objects) +{ + bool res = false; + + QString fileName = ledFileName->text(); + GEOM::GEOM_Object_var shape; + GEOM::ListOfGO_var groups, fields; + + GEOM::GEOM_IImportExportOperations_var ieOp = GEOM::GEOM_IImportExportOperations::_narrow(getOperation()); + res = ieOp->ImportXAO(fileName.toStdString().c_str(), shape, groups, fields); + + if (!shape->_is_nil()) + { + objects.push_back(shape._retn()); + } + + for (int i = 0; i < groups->length(); i++) + { + objects.push_back(GEOM::GEOM_Object::_duplicate(groups[i])); + } + + return res; +} + +GEOM::GEOM_Object_ptr ImportExportGUI_ImportXAODlg::getFather(GEOM::GEOM_Object_ptr object) +{ + GEOM::GEOM_Object_var fatherObj; + if (object->GetType() == GEOM_GROUP) + { + GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations(getStudyId()); + fatherObj = groupOper->GetMainShape(object); + } + return fatherObj._retn(); +} + +QString ImportExportGUI_ImportXAODlg::getObjectName(GEOM::GEOM_Object_ptr object) const +{ + if (object->_is_nil()) + return QString::null; + return object->GetName(); +} diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h new file mode 100644 index 000000000..517d57624 --- /dev/null +++ b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h @@ -0,0 +1,65 @@ +// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef IMPORTEXPORTGUI_IMPORTXAODLG_H +#define IMPORTEXPORTGUI_IMPORTXAODLG_H + +#include +#include + +class QLineEdit; +class QButtonGroup; +class QListWidget; + +//================================================================================= +// class : ImportExportGUI_ImportXAODlg +// purpose : +//================================================================================= +class ImportExportGUI_ImportXAODlg: public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + ImportExportGUI_ImportXAODlg(GeometryGUI*, QWidget* = 0); + ~ImportExportGUI_ImportXAODlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid(QString&); + virtual bool execute(ObjectList&); + virtual GEOM::GEOM_Object_ptr getFather(GEOM::GEOM_Object_ptr object); + virtual QString getObjectName(GEOM::GEOM_Object_ptr object) const; + +private: + void Init(); + void enterEvent(QEvent*); + +private: + QLineEdit* ledFileName; + QPushButton* btnFileSelect; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void btnFileSelectClicked(); +}; + +#endif // IMPORTEXPORTGUI_EXPORTXAODLG_H diff --git a/src/ImportExportGUI/Makefile.am b/src/ImportExportGUI/Makefile.am index 28d9303b5..072e5ffb9 100644 --- a/src/ImportExportGUI/Makefile.am +++ b/src/ImportExportGUI/Makefile.am @@ -27,31 +27,31 @@ lib_LTLIBRARIES = libImportExportGUI.la # header files salomeinclude_HEADERS = \ - ImportExportGUI.h \ - ImportExportGUI_ExportXAODlg.h + ImportExportGUI.h -#IMPORTEXPORT_INCLUDES = -#IMPORTEXPORT_INCLUDES += ImportExportGUI_ExportXAODlg.h +libImportExportGUI_la_INCLUDES = +libImportExportGUI_la_INCLUDES += ImportExportGUI_ExportXAODlg.h +libImportExportGUI_la_INCLUDES += ImportExportGUI_ImportXAODlg.h ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## #salomeinclude_HEADERS += $(IMPORTEXPORT_INCLUDES) dist_libImportExportGUI_la_SOURCES = \ - ImportExportGUI_ExportXAODlg.h \ ImportExportGUI.h \ - ImportExportGUI_ExportXAODlg.cxx \ ImportExportGUI.cxx -#IMPORTEXPORT_SOURCES = -#IMPORTEXPORT_SOURCES += ImportExportGUI_ExportXAODlg.h ImportExportGUI_ExportXAODlg.cxx +libImportExportGUI_la_SOURCES = +libImportExportGUI_la_SOURCES += ImportExportGUI_ExportXAODlg.h ImportExportGUI_ExportXAODlg.cxx +libImportExportGUI_la_SOURCES += ImportExportGUI_ImportXAODlg.h ImportExportGUI_ImportXAODlg.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## #dist_libImportExportGUI_la_SOURCES += $(IMPORTEXPORT_SOURCES) MOC_FILES = -IMPORTEXPORT_MOC_FILES = ImportExportGUI_moc.cxx -IMPORTEXPORT_MOC_FILES += ImportExportGUI_ExportXAODlg_moc.cxx +MOC_FILES = ImportExportGUI_moc.cxx +MOC_FILES += ImportExportGUI_ExportXAODlg_moc.cxx +MOC_FILES += ImportExportGUI_ImportXAODlg_moc.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## MOC_FILES += $(IMPORTEXPORT_MOC_FILES)