From: abuhsing Date: Tue, 25 Jun 2013 12:22:20 +0000 (+0000) Subject: Hexa 6 : Elimination repertoires idl + impl + creation repertoire swig X-Git-Tag: V7_3_0a1~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a4201d217fb2137fa5824f284531e2e0e8a94b90;p=modules%2Fhexablock.git Hexa 6 : Elimination repertoires idl + impl + creation repertoire swig --- diff --git a/idl/BiCylinder.idl b/idl/BiCylinder.idl deleted file mode 100755 index d96fde8..0000000 --- a/idl/BiCylinder.idl +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __BiCylinder__ -#define __BiCylinder__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Edge.idl" -#include "Quad.idl" -#include "Hexa.idl" -#include "Cylinder.idl" - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - - interface BiCylinder: Element - { - Hexa getHexaIJK(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Quad getQuadIJ(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Quad getQuadJK(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Quad getQuadIK(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Edge getEdgeI(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Edge getEdgeJ(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Edge getEdgeK(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - Vertex getVertexIJK(in long part, in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - - long saveVtk( in string fname );//CS_NOT_SPEC - }; - -}; - -#endif diff --git a/idl/CrossElements.idl b/idl/CrossElements.idl deleted file mode 100755 index 23fd1e2..0000000 --- a/idl/CrossElements.idl +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __CrossElements_idl__ -#define __CrossElements_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Edge.idl" -#include "Quad.idl" -#include "Hexa.idl" -#include "Cylinder.idl" - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - -// interface CrossElements : Elements - interface CrossElements: Element - { - Hexa getHexaIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Quad getQuadIJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Quad getQuadJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Quad getQuadIK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Edge getEdgeI(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Edge getEdgeJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Edge getEdgeK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - Vertex getVertexIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); - - long saveVtk( in string fname );//CS_NOT_SPEC - }; - -}; - -#endif diff --git a/idl/Cylinder.idl b/idl/Cylinder.idl deleted file mode 100755 index 6da6de8..0000000 --- a/idl/Cylinder.idl +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Cylinder_idl__ -#define __Cylinder_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ - -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Vector.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface Cylinder : Element - { - Vertex getBase() raises (SALOME::SALOME_Exception); - Vector getDirection() raises (SALOME::SALOME_Exception); - double getRadius() raises (SALOME::SALOME_Exception); - double getHeight() raises (SALOME::SALOME_Exception); - -// long saveVtk( in string fname );//CS_NOT_SPEC - }; -}; - -#endif - diff --git a/idl/Document.idl b/idl/Document.idl deleted file mode 100755 index 6ac7228..0000000 --- a/idl/Document.idl +++ /dev/null @@ -1,609 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Document_idl__ -#define __Document_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "GEOM_Gen.idl" - -#include "Edge.idl" -#include "Hexa.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - - interface Element; - interface Vertex; - interface Edge; - interface Quad; - interface Hexa; - interface Vector; - interface Cylinder; - interface Pipe; - interface Elements; - interface CrossElements; - interface Law; - interface Group; - interface Propagation; - - interface NewShape; - - typedef sequence Quads; - typedef sequence IntVector; - typedef sequence RealVector; - typedef sequence NewShapes; - - typedef GEOM::GEOM_Object Shape; - typedef sequence Shapes; - - interface Document : SALOME::GenericObj - { - void purge() - raises (SALOME::SALOME_Exception); - - void dump() - raises (SALOME::SALOME_Exception); //CS_NOT_SPEC - /*! - */ - string getName() - raises (SALOME::SALOME_Exception); - - long setName (in string name ) - raises (SALOME::SALOME_Exception); - - long save( in string fileName ) - raises (SALOME::SALOME_Exception); - - long saveVtk( in string fname ); - - void setLevel (in long debug_level ) - raises (SALOME::SALOME_Exception); - - - /*! - */ - void setTolerance( in double tol ) raises (SALOME::SALOME_Exception); - double getTolerance() raises (SALOME::SALOME_Exception); - - /*! - Sommets - */ - Vertex addVertex( in double x, in double y, in double z ) - raises (SALOME::SALOME_Exception); - - long countVertex() - raises (SALOME::SALOME_Exception); - - Vertex getVertex( in long i ) - raises (SALOME::SALOME_Exception); - - Vertex findVertex( in double x, in double y, in double z ) - raises (SALOME::SALOME_Exception); - - - /*! - Aretes - */ - Edge addEdge( in Vertex v0, in Vertex v1 ) - raises (SALOME::SALOME_Exception); - - Edge addEdgeVector ( in Vertex v0, in Vector w1 ) - raises (SALOME::SALOME_Exception); - - long countEdge() - raises (SALOME::SALOME_Exception); - - Edge getEdge( in long i ) - raises (SALOME::SALOME_Exception); - - Edge findEdge( in Vertex p1, in Vertex p2 ) - raises (SALOME::SALOME_Exception); - - - /*! - Quadrangles - */ - Quad addQuad( in Edge e0, in Edge e1, in Edge e2, in Edge e3 ) - raises (SALOME::SALOME_Exception); - - Quad addQuadVertices( in Vertex v0, in Vertex v1, in Vertex v2, in Vertex v3 ) - raises (SALOME::SALOME_Exception); - - long countQuad() - raises (SALOME::SALOME_Exception); - - Quad getQuad( in long i ) - raises (SALOME::SALOME_Exception); - - Quad findQuad( in Vertex v1, in Vertex v2 ) - raises (SALOME::SALOME_Exception); - - - - /*! - Hexaedre - */ - Hexa addHexa( in Quad q0, in Quad q1, in Quad q2, in Quad q3, in Quad q4, in Quad q5 ) - raises (SALOME::SALOME_Exception); - - Hexa addHexaVertices( in Vertex v1, in Vertex v2, in Vertex v3, in Vertex v4, - in Vertex v5, in Vertex v6, in Vertex v7, in Vertex v8 ) - raises (SALOME::SALOME_Exception); - - long countHexa() - raises (SALOME::SALOME_Exception); - - Hexa getHexa( in long i ) - raises (SALOME::SALOME_Exception); - - Hexa findHexa( in Vertex p1, in Vertex p2 ) - raises (SALOME::SALOME_Exception); - - - - /*! - Vecteurs - */ - Vector addVector( in double dx, in double dy, in double dz ) - raises (SALOME::SALOME_Exception); - - Vector addVectorVertices( in Vertex v1, in Vertex v2 ) - raises (SALOME::SALOME_Exception); - - long countVector() - raises (SALOME::SALOME_Exception); - - Vector getVector( in long i ) - raises (SALOME::SALOME_Exception); - - - /*! - Cylindre - */ - Cylinder addCylinder( in Vertex base, in Vector direction, in double radius, in double height ) - raises (SALOME::SALOME_Exception); - - long countCylinder() - raises (SALOME::SALOME_Exception); - - Cylinder getCylinder( in long i ) - raises (SALOME::SALOME_Exception); - - - /*! - Pipe - */ - Pipe addPipe( in Vertex base, in Vector direction, - in double int_radius, in double ext_radius, - in double height ) - raises (SALOME::SALOME_Exception); - - long countPipe() - raises (SALOME::SALOME_Exception); - - Pipe getPipe( in long i ) - raises (SALOME::SALOME_Exception); - - - /*! - Remove block - */ - boolean removeHexa( in Hexa h ) - raises (SALOME::SALOME_Exception); - - boolean removeConnectedHexa( in Hexa h ) - raises (SALOME::SALOME_Exception); - - /*! - Grille cartesiennes - */ - Elements makeCartesian( in Vertex pt, - in Vector vx, in Vector vy, in Vector vz, - in long nx, in long ny, in long nz) - raises (SALOME::SALOME_Exception); - - Elements makeCartesian1( in Vertex v, - in Vector v1, - in long px, in long py, in long pz, - in long mx, in long my, in long mz ) - raises (SALOME::SALOME_Exception); - - /*! - Grille cylindrique - */ - Elements makeCylindrical( in Vertex pt, - in Vector vex, in Vector vez, - in double dr, in double da, in double dl, - in long nr, in long na, in long nl, - in boolean fill ) - raises (SALOME::SALOME_Exception); - - /*! - Grille cylindrique (variante) - */ - Elements makeCylindricals( in Vertex pt, - in Vector vex, in Vector vez, - in RealVector tdr, in RealVector tda, in RealVector tdl, - in boolean fill ) - raises (SALOME::SALOME_Exception); - - /*! - Grille spherique - */ - - Elements makeSpherical( in Vertex pt, - in double rayon, - in long n, - in double k ) - raises (SALOME::SALOME_Exception); - - - /*! - Cylindre decoupe en blocs - */ -// Elements makeCylinder( in Cylinder cyl, in long nr, in long na, in long nl ) -// raises (SALOME::SALOME_Exception);//CS_TODO - Elements makeCylinder( in Cylinder cyl, in Vector vr, in long nr, in long na, in long nl ) - raises (SALOME::SALOME_Exception);//CS_NEW CS_NOT_SPEC - - - /*! - Tuyau decoupe en blocs - */ - Elements makePipe( in Pipe p, in Vector v, in long nr, in long na, in long nl ) - raises (SALOME::SALOME_Exception); - - /*! - 2 Cylindres en T decoupes en blocs - */ - CrossElements makeCylinders( in Cylinder c1, in Cylinder c2 ) - raises (SALOME::SALOME_Exception); - - /*! - 2 Tuyau decoupe en intersection decoupees en blocs - */ - CrossElements makePipes( in Pipe p1, in Pipe p2 ) - raises (SALOME::SALOME_Exception); - - /*! - Prismer des quadrangles - */ - Elements prismQuad( in Quad qd, in Vector v, in long nb ) - raises (SALOME::SALOME_Exception); - - Elements prismQuads( in Quads qds, in Vector v, in long nb ) - raises (SALOME::SALOME_Exception); - - Elements prismQuadsVec (in Quads qds, in Vector v, in RealVector thaut, - in long opt ) - raises (SALOME::SALOME_Exception); - - Elements joinQuad( in Quad qa, in Quad qb, - in Vertex va1, in Vertex vb1, - in Vertex va2, in Vertex vb2, - in long nb ) - raises (SALOME::SALOME_Exception); - - Elements joinQuads( in Quads qds, - in Quad qb, - in Vertex va1, in Vertex vb1, - in Vertex va2, in Vertex vb2, - in long nb ) - raises (SALOME::SALOME_Exception); - - // HexaBlock V3 - Elements revolutionQuads( in Quads qds, in Vertex ori, in Vector dir, - in RealVector angles) - raises (SALOME::SALOME_Exception); - - Elements replace( in Quads qds, in Vertex p1, in Vertex c1, - in Vertex p2, in Vertex c2, in Vertex p3, in Vertex c3) - raises (SALOME::SALOME_Exception); - - Elements makeSphere (in Vertex center, in Vector vx, in Vector vz, - in double radius, in double radhole, - in Vertex plorig, - in long nrad, in long nang, in long nhaut) - raises (SALOME::SALOME_Exception); - - Elements makePartSphere (in Vertex center, in Vector vx, in Vector vz, - in double radius, in double radhole, - in Vertex plorig, in double angle, - in long nrad, in long nang, in long nhaut) - raises (SALOME::SALOME_Exception); - - Elements makeRind (in Vertex center, in Vector vx, in Vector vz, - in double radext, in double radint, in double radhole, - in Vertex plorig, - in long nrad, in long nang, in long nhaut) - raises (SALOME::SALOME_Exception); - - Elements makePartRind (in Vertex center, in Vector vx, in Vector vz, - in double radext, in double radint, in double radhole, - in Vertex plorig, in double angle, - in long nrad, in long nang, in long nhaut) - raises (SALOME::SALOME_Exception); -// -// -// /*! -// Fusionner 2 elements de meme nature //CS_NOT_SPEC -// */ - -// Elements mergeQuads( in Quad qa, in Quad qb, -// in Vertex va1, in Vertex vb1, -// in Vertex va2, in Vertex vb2 ) -// raises (SALOME::SALOME_Exception); - - long mergeQuads( in Quad qa, in Quad qb, - in Vertex va1, in Vertex vb1, - in Vertex va2, in Vertex vb2 ) - raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW - -// -// Elements mergeEdges( in Edge e1, in Edge e2, -// in Vertex v1, in Vertex v2 ) -// raises (SALOME::SALOME_Exception); - - long mergeEdges( in Edge e1, in Edge e2, - in Vertex v1, in Vertex v2 ) - raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW - -// Elements mergeVertices( in Vertex v1, in Vertex v2 ) -// raises (SALOME::SALOME_Exception); - long mergeVertices( in Vertex v1, in Vertex v2 ) - raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW - - - /*! - Deconnecter des elements du modele - */ - Elements disconnectQuad( in Hexa h, in Quad q ) - raises (SALOME::SALOME_Exception); - - Elements disconnectEdge( in Hexa h, in Edge e ) - raises (SALOME::SALOME_Exception); - - Elements disconnectVertex( in Hexa h, in Vertex v ) - raises (SALOME::SALOME_Exception); - - Elements disconnectEdges( in Hexas th, in Edges te ) - raises (SALOME::SALOME_Exception); - - /*! - Couper des hexaedres du modele - */ - Elements cut( in Edge e, in long nb_of_cuts ) - raises (SALOME::SALOME_Exception); - - /*! - Make elements by transforming elements - */ -// Elements makeTranslation( in Elements e, in Vector vec ) -// raises (SALOME::SALOME_Exception); - Elements makeTranslation( in Elements l, in Vector vec ) - raises (SALOME::SALOME_Exception); -// -// - Elements makeRotation (in Elements l, in Vertex ver, in Vector vec, in double angle) - raises (SALOME::SALOME_Exception); - Elements makeScale (in Elements e, in Vertex ver, in double k ) - raises (SALOME::SALOME_Exception); - - Elements makeSymmetryPoint (in Elements e, in Vertex ver) - raises (SALOME::SALOME_Exception); - - Elements makeSymmetryLine (in Elements e, in Vertex ver, in Vector vec) - raises (SALOME::SALOME_Exception); - - Elements makeSymmetryPlane (in Elements e, in Vertex ver, in Vector vec) - raises (SALOME::SALOME_Exception); - - /*! - Modify elements by transforming elements - */ -// void performTranslation(in Elements e, in Vector vec) -// raises (SALOME::SALOME_Exception); - - void performTranslation(in Elements l, in Vector vec) - raises (SALOME::SALOME_Exception); -// - void performRotation(in Elements l, in Vertex ver, in Vector vec, in double angle) - raises (SALOME::SALOME_Exception); -// - void performScale(in Elements e, in Vertex ver, in double k) - raises (SALOME::SALOME_Exception); - - void performSymmetryPoint(in Elements e, in Vertex ver) - raises (SALOME::SALOME_Exception); - - void performSymmetryLine(in Elements e, in Vertex ver, in Vector vec) - raises (SALOME::SALOME_Exception); - - void performSymmetryPlane(in Elements e, in Vertex ver, in Vector vec) - raises (SALOME::SALOME_Exception); -// -// /*! -// -------- -// MAILLAGE -// -------- -// */ -// -// /*! -// Creer, editer et supprimer un groupe -// */ -// HexaGroup addHexaGroup( in string name ) - Group addHexaGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// QuadGroup addQuadGroup( in string name ) - Group addQuadGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// EdgeGroup addEdgeGroup( in string name ) - Group addEdgeGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// HexaNodeGroup addHexaNodeGroup( in string name ) - Group addHexaNodeGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// QuadNodeGroup addQuadNodeGroup( in string name ) - Group addQuadNodeGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// EdgeNodeGroup addEdgeNodeGroup( in string name ) - Group addEdgeNodeGroup( in string name ) - raises (SALOME::SALOME_Exception); - -// VertexNodeGroup addVertexNodeGroup( in string name ) - Group addVertexNodeGroup( in string name ) - raises (SALOME::SALOME_Exception); - - long removeGroup( in Group g) - raises (SALOME::SALOME_Exception); - - long countGroup() - raises (SALOME::SALOME_Exception); - - Group getGroup( in long i ) - raises (SALOME::SALOME_Exception); - - Group findGroup( in string name ) - raises (SALOME::SALOME_Exception); - - - - /*! - Definir une loi de discretisation - */ - Law addLaw( in string name, in long nb_nodes ) - raises (SALOME::SALOME_Exception); - - long countLaw() - raises (SALOME::SALOME_Exception); - - Law getLaw( in long i ) - raises (SALOME::SALOME_Exception); - - void removeLaw( in Law l ) - raises (SALOME::SALOME_Exception); - - Law findLaw( in string name ) - raises (SALOME::SALOME_Exception); - - - /*! - Discretization defined on the model of blocks - */ - long countPropagation() - raises (SALOME::SALOME_Exception); - - Propagation getPropagation( in long i ) - raises (SALOME::SALOME_Exception); - - Propagation findPropagation( in Edge e ) - raises (SALOME::SALOME_Exception); - - /*! - Association on lines - */ -// Shape - -// Ajouts 05/09/20011 - - long countUsedVertex() - raises (SALOME::SALOME_Exception); - long countUsedEdge() - raises (SALOME::SALOME_Exception); - long countUsedQuad() - raises (SALOME::SALOME_Exception); - long countUsedHexa() - raises (SALOME::SALOME_Exception); - - Vertex getUsedVertex( in long i ) - raises (SALOME::SALOME_Exception); - Edge getUsedEdge( in long i ) - raises (SALOME::SALOME_Exception); - Quad getUsedQuad( in long i ) - raises (SALOME::SALOME_Exception); - Hexa getUsedHexa( in long i ) - raises (SALOME::SALOME_Exception); - - Hexa addHexa5Quads (in Quad q1, in Quad q2, in Quad q3, in Quad q4, - in Quad q5) raises (SALOME::SALOME_Exception); - Hexa addHexa4Quads ( in Quad q1, in Quad q2, in Quad q3, in Quad q4) - raises (SALOME::SALOME_Exception); - Hexa addHexa3Quads ( in Quad q1, in Quad q2, in Quad q3) - raises (SALOME::SALOME_Exception); - Hexa addHexa2Quads ( in Quad q1, in Quad q2) - raises (SALOME::SALOME_Exception); - - boolean removeQuad( in Quad q ) - raises (SALOME::SALOME_Exception);//CS_NOT_SPEC - boolean removeElements( in Elements b ) - raises (SALOME::SALOME_Exception); - - void clearAssociation () - raises (SALOME::SALOME_Exception); - - // Hexa 5 - - NewShape addShape (in GEOM::GEOM_Object geometry, in string name) - raises (SALOME::SALOME_Exception); - - NewShape getShape (in long nro) raises (SALOME::SALOME_Exception); - - long countShape () - raises (SALOME::SALOME_Exception); - - long associateOpenedLine (in Edges mlines, - in Shapes glines, in IntVector subids, - in double pstart, in double pend) - raises (SALOME::SALOME_Exception); - - long associateClosedLine (in Vertex mfirst, in Edges mlines, - in Shapes glines, in IntVector subids, - in double pstart, in boolean inv) - raises (SALOME::SALOME_Exception); - /*! - 2 Cylindres en T decoupes en blocs (Hexa5) - */ - Elements makeBiCylinder ( in Cylinder c1, in Cylinder c2 ) - raises (SALOME::SALOME_Exception); - - /*! - 2 Tuyau decoupe en intersection decoupees en blocs (Hexa5) - */ - Elements makeBiPipe ( in Pipe p1, in Pipe p2 ) - raises (SALOME::SALOME_Exception); - }; -}; - - -#endif - diff --git a/idl/Edge.idl b/idl/Edge.idl deleted file mode 100755 index bf3a91f..0000000 --- a/idl/Edge.idl +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Edge_idl__ -#define __Edge_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "GEOM_Gen.idl" - -#include "Element.idl" -#include "Vertex.idl" - - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - - struct EdgeAssociation - { - GEOM::GEOM_Object geomObj; - double debut; - double fin; - }; - - typedef sequence EdgeAssociations; - - interface Edge : Element - { - Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception); - boolean getWay() raises (SALOME::SALOME_Exception); - - void clearAssociation ( ) - raises (SALOME::SALOME_Exception); - - void setColor (in double val) - raises (SALOME::SALOME_Exception); - - long addAssociation (in NewShape geom, in long subid, in double debut, - in double fin ) - raises (SALOME::SALOME_Exception); - }; - - typedef sequence Edges; -}; - -#endif diff --git a/idl/Element.idl b/idl/Element.idl deleted file mode 100755 index ba9750b..0000000 --- a/idl/Element.idl +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Element_idl__ -#define __Element_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - interface Element : SALOME::GenericObj - { - void dump () raises (SALOME::SALOME_Exception);//CS_NOT_SPEC - void printName () raises (SALOME::SALOME_Exception);//CS_NOT_SPEC - string getName () raises (SALOME::SALOME_Exception); - void setName (in string name) raises (SALOME::SALOME_Exception); - }; - - - -}; - -#endif diff --git a/idl/Elements.idl b/idl/Elements.idl deleted file mode 100755 index 294c3bb..0000000 --- a/idl/Elements.idl +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Elements_idl__ -#define __Elements_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Edge.idl" -#include "Quad.idl" -#include "Hexa.idl" - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - -// enum EnumCoord { dir_x, dir_y, dir_z, DIM3 }; - // enum EnumVertex { V_AMONT, V_AVAL, V_TWO }; - // enum EnumQuad { E_A, E_B, E_C, E_D, QUAD4 }; - - // z=0 z=1 y=0 y=1 x=0 x=1 - // enum EnumHQuad {Q_A, Q_B, Q_C, Q_D, Q_E, Q_F, HQ_MAXI}; - // enum EnumHEdge {E_AC, E_AD, E_BC, E_BD, - // E_AE, E_AF, E_BE, E_BF, - // E_CE, E_CF, E_DE, E_DF, HE_MAXI }; - // enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, - // HV_MAXI }; - // enum EnumVCyl { V_E, V_NE, V_N, V_NW, V_W, V_SW, V_S, V_SE, CV_MAXI }; - // enum EnumCyl { CYL_BIG, CYL_SMALL }; - // enum EnumCyl { CYL_BIG, CYL_SMALL }; - - // EnumCoord - const long DIR_X = 0; - const long DIR_Y = 1; - const long DIR_Z = 2; - const long DIM3 = 3; - // EnumVertex - const long V_AMONT = 0; - const long V_AVAL = 1; - const long V_TWO = 2; - // EnumQuad - const long E_A = 0; - const long E_B = 1; - const long E_C = 2; - const long E_D = 3; - const long QUAD4 = 4; - - // EnumHQuad - const long Q_A = 0; // z=0 - const long Q_B = 1; // z=1 - const long Q_C = 2; // y=0 - const long Q_D = 3; // y=1 - const long Q_E = 4; // x=0 - const long Q_F = 5; // x=1 - const long HQ_MAXI = 6; - // EnumHEdge - const long E_AC = 0; - const long E_AD = 1; - const long E_BC = 2; - const long E_BD = 3; - const long E_AE = 4; - const long E_AF = 5; - const long E_BE = 6; - const long E_BF = 7; - const long E_CE = 8; - const long E_CF = 9; - const long E_DE = 10; - const long E_DF = 11; - const long HE_MAXI = 12; - // EnumHVertex - const long V_ACE = 0; - const long V_ACF = 1; - const long V_ADE = 2; - const long V_ADF = 3; - const long V_BCE = 4; - const long V_BCF = 5; - const long V_BDE = 6; - const long V_BDF = 7; - const long HV_MAXI = 8; - // EnumVCyl - const long V_E = 0; - const long V_NE = 1; - const long V_N = 2; - const long V_NW = 3; - const long V_W = 4; - const long V_SW = 5; - const long V_S = 6; - const long V_SE = 7; - const long CV_MAXI = 8; - const long CV_MAXI_EXT = 8; - const long CV_MAXI_INT = 4; - - const long CYL_SMALL = 0; - const long CYL_BIG = 1; - - const long CYL_BIG_SLICES = 4; - const long CYL_SMALL_SLICES = 6; - const long CYL_LAYERS = 2; - - interface Elements : Element - { - long countVertex() raises (SALOME::SALOME_Exception); - long countEdge() raises (SALOME::SALOME_Exception); - long countQuad() raises (SALOME::SALOME_Exception); - long countHexa() raises (SALOME::SALOME_Exception); - - Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception); - Edge getEdge( in long n ) raises (SALOME::SALOME_Exception); - Quad getQuad( in long n ) raises (SALOME::SALOME_Exception); - Hexa getHexa( in long n ) raises (SALOME::SALOME_Exception); - - long findVertex( in Vertex p ) raises (SALOME::SALOME_Exception);//CS_NOT_SPEC - - Vertex getVertexIJK( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - - Edge getEdgeI( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - Edge getEdgeJ( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - Edge getEdgeK( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - - Quad getQuadIJ( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - Quad getQuadIK( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - Quad getQuadJK( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - - Hexa getHexaIJK( in long x, in long y, in long z) - raises (SALOME::SALOME_Exception); - - -// Quad getQuad1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC -// -// Edge getEdge1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC - - long saveVtk( in string fname ) - raises (SALOME::SALOME_Exception);//CS_NOT_SPEC - - void clearAssociation () - raises (SALOME::SALOME_Exception); - - }; - - -}; - -#endif diff --git a/idl/Group.idl b/idl/Group.idl deleted file mode 100755 index e47d7bb..0000000 --- a/idl/Group.idl +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Group_idl__ -#define __Group_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" - - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - enum GroupKind { HEXA_GROUP, - QUAD_GROUP, - EDGE_GROUP, - HEXANODE_GROUP, - QUADNODE_GROUP, - EDGENODE_GROUP, - VERTEXNODE_GROUP }; - - interface Group : SALOME::GenericObj - { - /*! - comment - */ - string getName() - raises (SALOME::SALOME_Exception); - void setName( in string name ) - raises (SALOME::SALOME_Exception); - GroupKind getKind() - raises (SALOME::SALOME_Exception); - long addElement( in Element e) - raises (SALOME::SALOME_Exception); - long countElement() - raises (SALOME::SALOME_Exception); - Element getElement( in long index ) - raises (SALOME::SALOME_Exception); - long removeElement( in Element elt ) - raises (SALOME::SALOME_Exception); - void clearElement() - raises (SALOME::SALOME_Exception); - }; - -// interface HexaGroup : Group {}; -// interface QuadGroup : Group {}; -// interface EdgeGroup : Group {}; -// -// interface HexaNodeGroup : Group {}; -// interface QuadNodeGroup : Group {}; -// interface EdgeNodeGroup : Group {}; -// interface VertexNodeGroup : Group {}; -}; - -#endif diff --git a/idl/HEXABLOCK_Gen.idl b/idl/HEXABLOCK_Gen.idl deleted file mode 100755 index 374d0a7..0000000 --- a/idl/HEXABLOCK_Gen.idl +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HEXABLOCK_GEN__ -#define __HEXABLOCK_GEN__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Component.idl" -#include "SALOME_Exception.idl" -#include "Document.idl" - - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - /*! \brief Interface of the %HEXABLOCK component - 03/07/2012 : ajout de SALOMEDS::Driver (Abu) - */ - interface HEXABLOCK_Gen : Engines::EngineComponent, SALOMEDS::Driver - { - /*! - Donne le nombre de documents ouverts en session. - */ - long countDocument() - raises (SALOME::SALOME_Exception); - - Document getDocument(in long i) - raises (SALOME::SALOME_Exception); - - void removeDocument( in Document d) - raises (SALOME::SALOME_Exception); - - Document addDocument(in string name) - raises (SALOME::SALOME_Exception); - - Document findDocument(in string name) - raises (SALOME::SALOME_Exception); - - Document loadDocument(in string xmlFilename) - raises (SALOME::SALOME_Exception); - - /*! - Set the current study - */ - void SetCurrentStudy( in SALOMEDS::Study theStudy ); - - long addDocInStudy (in Document doc) - raises (SALOME::SALOME_Exception); - - void test() raises (SALOME::SALOME_Exception); - - }; -}; - - -#endif diff --git a/idl/Hexa.idl b/idl/Hexa.idl deleted file mode 100755 index 2334001..0000000 --- a/idl/Hexa.idl +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Hexa_idl__ -#define __Hexa_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Edge.idl" -#include "Quad.idl" - - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface Hexa : Element - { - Quad getQuad( in long n ) raises(SALOME::SALOME_Exception); - Edge getEdge( in long n ) raises(SALOME::SALOME_Exception); - Vertex getVertex( in long n ) raises(SALOME::SALOME_Exception); - - void setColor (in double value)//CS_NOT_SPEC - raises (SALOME::SALOME_Exception); - - void setScalar( in double val ) //CS_NOT_SPEC --> To delete - raises (SALOME::SALOME_Exception); - }; - - typedef sequence Hexas; -}; -#endif - diff --git a/idl/Law.idl b/idl/Law.idl deleted file mode 100755 index d8edf25..0000000 --- a/idl/Law.idl +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Law_idl__ -#define __Law_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Vertex.idl" - -/*! \ingroup EXAMPLES -*/ -module HEXABLOCK_ORB -{ - enum KindLaw { UNIFORM, ARITHMETIC, GEOMETRIC }; - - interface Law : SALOME::GenericObj - { - void setName( in string name ) raises (SALOME::SALOME_Exception); - string getName() raises (SALOME::SALOME_Exception); - - void setNodes( in long n ) raises (SALOME::SALOME_Exception); - long getNodes() raises (SALOME::SALOME_Exception); - - void setKind( in KindLaw k ) raises (SALOME::SALOME_Exception); - KindLaw getKind() raises (SALOME::SALOME_Exception); - - void setCoefficient( in double c ) raises (SALOME::SALOME_Exception); - double getCoefficient() raises (SALOME::SALOME_Exception); - }; -}; - -#endif diff --git a/idl/Makefile.am b/idl/Makefile.am deleted file mode 100755 index c173cc5..0000000 --- a/idl/Makefile.am +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright (C) 2009-2013 CEA/DEN, EDF R&D -# -# 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 -# - -# This Makefile is responsible of generating the client and server -# implementation of IDL interfaces for both C++ and python usage. -# The building process of the C++ files is in charge of each source -# package and then is not manage here. - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -BASEIDL_FILES = \ - Element.idl\ - NewShape.idl\ - Vertex.idl\ - Edge.idl\ - Quad.idl\ - Hexa.idl\ - Vector.idl\ - Elements.idl\ - Cylinder.idl\ - CrossElements.idl\ - Pipe.idl\ - Law.idl\ - Propagation.idl\ - Group.idl\ - Document.idl\ - HEXABLOCK_Gen.idl - -BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py) - -# This variable defines the files to be installed -dist_salomeidl_DATA = $(BASEIDL_FILES) - -# GUI idl common library -lib_LTLIBRARIES = libSalomeIDLHEXABLOCK.la - - - - -# Sources built from idl files -nodist_libSalomeIDLHEXABLOCK_la_SOURCES = \ - ElementSK.cc\ - ElementDynSK.cc\ - VertexSK.cc\ - VertexDynSK.cc\ - EdgeSK.cc\ - EdgeDynSK.cc\ - QuadSK.cc\ - QuadDynSK.cc\ - NewShapeSK.cc\ - NewShapeDynSK.cc\ - HexaSK.cc\ - HexaDynSK.cc\ - VectorSK.cc\ - VectorDynSK.cc\ - ElementsSK.cc\ - ElementsDynSK.cc\ - CylinderSK.cc\ - CylinderDynSK.cc\ - CrossElementsSK.cc\ - CrossElementsDynSK.cc\ - PipeSK.cc\ - PipeDynSK.cc\ - LawSK.cc\ - LawDynSK.cc\ - PropagationSK.cc\ - PropagationDynSK.cc\ - GroupSK.cc\ - GroupDynSK.cc\ - DocumentSK.cc\ - DocumentDynSK.cc\ - HEXABLOCK_GenSK.cc\ - HEXABLOCK_GenDynSK.cc - -ElementDynSK.cc: ElementSK.cc -VertexDynSK.cc: VertexSK.cc -EdgeDynSK.cc: EdgeSK.cc -PropagationDynSK.cc: PropagationSK.cc -LawDynSK.cc: LawSK.cc -ElementsDynSK.cc: ElementsSK.cc -CrossElementsDynSK.cc: CrossElementsSK.cc -QuadDynSK.cc: QuadSK.cc -NewShapeDynSK.cc: NewShapeSK.cc -VectorDynSK.cc: VectorSK.cc -CylinderDynSK.cc: CylinderSK.cc -GroupDynSK.cc: GroupSK.cc -HexaDynSK.cc: HexaSK.cc -PipeDynSK.cc: PipeSK.cc -DocumentDynSK.cc: DocumentSK.cc -HEXABLOCK_GenDynSK.cc: HEXABLOCK_GenSK.cc - - -# header files must be exported: other modules have to use this library -nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh) - -libSalomeIDLHEXABLOCK_la_CPPFLAGS =\ - @CORBA_CXXFLAGS@ \ - @CORBA_INCLUDES@ \ - $(KERNEL_CXXFLAGS) \ - $(GEOM_CXXFLAGS) \ - -I$(top_builddir)/salome_adm/unix \ - -I$(top_builddir)/idl - - -libSalomeIDLHEXABLOCK_la_LDFLAGS = -no-undefined -version-info=0:0:0 - -libSalomeIDLHEXABLOCK_la_LIBADD = \ - $(KERNEL_LDFLAGS) -lSalomeIDLKernel \ - $(GEOM_LDFLAGS) -lSalomeIDLGEOM \ - @CORBA_LIBS@ - -# These variables defines the building process of CORBA files -OMNIORB_IDL = @OMNIORB_IDL@ -OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ -OMNIORB_IDLPYFLAGS = \ - @OMNIORB_IDLPYFLAGS@ \ - -I$(top_builddir)/idl/salome \ - -I$(KERNEL_ROOT_DIR)/idl/salome \ - -I$(GEOM_ROOT_DIR)/idl/salome - - -IDLCXXFLAGS = \ - -bcxx \ - @IDLCXXFLAGS@ \ - -I$(top_builddir)/idl/salome \ - -I$(KERNEL_ROOT_DIR)/idl/salome \ - -I$(GEOM_ROOT_DIR)/idl/salome \ - -I$(top_builddir)/salome_adm/unix \ - -I$(srcdir) -# -I$(srcdir)/SD/Vertex -# -I$(srcdir)/SD/Edge - -IDLPYFLAGS = \ - @IDLPYFLAGS@ \ - -I$(KERNEL_ROOT_DIR)/idl/salome \ - -I$(GEOM_ROOT_DIR)/idl/salome - - - -# potential problem on parallel make on the following - multiple outputs -SUFFIXES = .idl .hh SK.cc -.idlSK.cc: - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< -.idl.hh: - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< - -install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%) - $(INSTALL) -d $(DESTDIR)$(salomepythondir) - ls $^ | while read file; do \ - $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ - done - -# we want to remove only staff generated for IDL files and nothing more -uninstall-local: - @for modulen in HEXABLOCK_ORB ; do \ - test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \ - test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \ - done ; \ - for filen in $(BASEIDL_FILES_PY) ; do \ - echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \ - done - -mostlyclean-local: - -rm -f *.hh *.cc .depidl - -# we use cpp to generate dependencies between idl files. -# option x c tells the preprocessor to consider idl as a c file. -# if an idl is modified, all idl dependencies are rebuilt - -.depidl: $(BASEIDL_FILES) - @echo "" > $@ - @for dep in $^ dummy; do \ - if [ $$dep != "dummy" ]; then \ - echo Building dependencies for $$dep; \ - $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome $$dep 2>/dev/null \ | \ - sed 's/\.o/\SK.cc/' >>$@; \ - fi; \ - done ; - --include .depidl - -# -I$(GEOM_ROOT_DIR)/include/salome diff --git a/idl/NewShape.idl b/idl/NewShape.idl deleted file mode 100755 index a116294..0000000 --- a/idl/NewShape.idl +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __NewShape_idl_ -#define __NewShape_idl_ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -// #include "GEOM_Gen.idl" -#include "Element.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface NewShape : Element - { - long countVertex () raises (SALOME::SALOME_Exception); - long countEdge () raises (SALOME::SALOME_Exception); - long countFace () raises (SALOME::SALOME_Exception); - - - long getVertex (in long nro) raises (SALOME::SALOME_Exception); - long getEdge (in long nro) raises (SALOME::SALOME_Exception); - long getFace (in long nro) raises (SALOME::SALOME_Exception); - - - string getNameVertex (in long nro) raises (SALOME::SALOME_Exception); - string getNameEdge (in long nro) raises (SALOME::SALOME_Exception); - string getNameFace (in long nro) raises (SALOME::SALOME_Exception); - }; -}; - -#endif diff --git a/idl/Pipe.idl b/idl/Pipe.idl deleted file mode 100755 index d430cf4..0000000 --- a/idl/Pipe.idl +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Pipe_idl__ -#define __Pipe_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Vector.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface Pipe : Element - { - Vertex getBase() raises (SALOME::SALOME_Exception); - Vector getDirection() raises (SALOME::SALOME_Exception); - double getInternal_radius() raises (SALOME::SALOME_Exception); - double getRadius() raises (SALOME::SALOME_Exception); - double getHeight() raises (SALOME::SALOME_Exception); - }; -}; - -#endif - diff --git a/idl/Propagation.idl b/idl/Propagation.idl deleted file mode 100755 index 5918632..0000000 --- a/idl/Propagation.idl +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Propagation_idl__ -#define __Propagation_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" -#include "Edge.idl" -#include "Law.idl" - - - -/*! \ingroup EXAMPLES - -*/ -module HEXABLOCK_ORB -{ - typedef sequence Ways; - - interface Propagation : SALOME::GenericObj - { - Edges getEdges() raises (SALOME::SALOME_Exception); -// Ways getWays() raises (SALOME::SALOME_Exception); - void setLaw(in Law l) raises (SALOME::SALOME_Exception); - Law getLaw() raises (SALOME::SALOME_Exception); - void setWay(in boolean w) raises (SALOME::SALOME_Exception); - boolean getWay() raises (SALOME::SALOME_Exception); - }; - -}; - -#endif diff --git a/idl/Quad.idl b/idl/Quad.idl deleted file mode 100755 index 3962ff6..0000000 --- a/idl/Quad.idl +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Quad_idl__ -#define __Quad_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "GEOM_Gen.idl" - -#include "Element.idl" -#include "Vertex.idl" -#include "Edge.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface Quad : Element - { - Edge getEdge( in long n ) - raises (SALOME::SALOME_Exception); - - Vertex getVertex( in long n ) - raises (SALOME::SALOME_Exception); - - void clearAssociation ( ) - raises (SALOME::SALOME_Exception); - - long addAssociation (in NewShape geom, in long subid) // - raises (SALOME::SALOME_Exception); - - void setColor (in double value)//CS_NOT_SPEC - raises (SALOME::SALOME_Exception); - - void setScalar( in double val ) //CS_NOT_SPEC --> To delete - raises (SALOME::SALOME_Exception); - - }; -}; - -#endif diff --git a/idl/Vector.idl b/idl/Vector.idl deleted file mode 100755 index 923fb46..0000000 --- a/idl/Vector.idl +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Vector_idl__ -#define __Vector_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "Element.idl" - - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component as an example in %SALOME application. -*/ -module HEXABLOCK_ORB -{ - interface Vector : Element - { - double getDX() raises (SALOME::SALOME_Exception); - double getDY() raises (SALOME::SALOME_Exception); - double getDZ() raises (SALOME::SALOME_Exception); - - double getAngleX () raises (SALOME::SALOME_Exception); - double getNorm () raises (SALOME::SALOME_Exception); - }; -}; - -#endif diff --git a/idl/Vertex.idl b/idl/Vertex.idl deleted file mode 100755 index 4ec287d..0000000 --- a/idl/Vertex.idl +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Vertex_idl__ -#define __Vertex_idl__ -/*! - \defgroup EXAMPLES SALOME EXAMPLES components - */ -#include "SALOME_Exception.idl" -#include "SALOME_GenericObj.idl" - -#include "GEOM_Gen.idl" - -#include "Element.idl" - -/*! \ingroup EXAMPLES - -This package contains the interface HEXABLOCK_ORB used -for %HEXABLOCK component -*/ -module HEXABLOCK_ORB -{ - - interface NewShape; - interface Vertex : Element - { - double getX() raises (SALOME::SALOME_Exception); - double getY() raises (SALOME::SALOME_Exception); - double getZ() raises (SALOME::SALOME_Exception); - - void setX( in double x ) raises (SALOME::SALOME_Exception); - void setY( in double y ) raises (SALOME::SALOME_Exception); - void setZ( in double z ) raises (SALOME::SALOME_Exception); - - void clearAssociation() - raises (SALOME::SALOME_Exception); - - void setColor (in double value) - raises (SALOME::SALOME_Exception); - - long setAssociation ( in NewShape geom, in long subid) - raises (SALOME::SALOME_Exception); - - double getAssoX () raises (SALOME::SALOME_Exception); - double getAssoY () raises (SALOME::SALOME_Exception); - double getAssoZ () raises (SALOME::SALOME_Exception); - - - }; - - -}; - -#endif - diff --git a/src/HEXABLOCK_I/HEXABLOCK.cxx b/src/HEXABLOCK_I/HEXABLOCK.cxx deleted file mode 100755 index 99a4f3d..0000000 --- a/src/HEXABLOCK_I/HEXABLOCK.cxx +++ /dev/null @@ -1,861 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; - - -static bool db = false; - -// #include -// -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include - -//////////// - -#include -#include -#include -#include -#include -#include - - -#include - -#include -#include -#include -#include - -#include "SALOME_NamingService.hxx" -#include "SALOME_LifeCycleCORBA.hxx" -#include "Utils_SINGLETON.hxx" -#include "Utils_ExceptHandlers.hxx" -#include "HexElements_grid.cxx" - - -#include "HEXABLOCK.hxx" -#include "HEXABLOCK_version.h" -#include "utilities.h" - -#include "HexDocument_impl.hxx" -#include - -#include "SALOMEDS_Tool.hxx" -// #include "SALOMEDSImpl_TMPFile.hxx" - -using namespace HEXABLOCK_ORB; - - -// Static variables definition -PortableServer::POA_var HEXABLOCK_Gen_i::_poa; -HEXABLOCK_Gen_i* HEXABLOCK_Gen_i::_HEXABLOCKGen = NULL; -SALOME_LifeCycleCORBA* HEXABLOCK_Gen_i::_lcc = NULL; -GEOM::GEOM_Gen_var HEXABLOCK_Gen_i::_geomGen = GEOM::GEOM_Gen::_nil(); -// GEOM_Client* HEXABLOCK_Gen_i::_geomClient = NULL; -CORBA::ORB_var HEXABLOCK_Gen_i::_orb; -SALOME_NamingService* HEXABLOCK_Gen_i::_ns = NULL; - -//============================================================================= -/*! - * standard constructor - */ -//============================================================================= - -HEXABLOCK_Gen_i::HEXABLOCK_Gen_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName) -{ - _thisObj = this ; - _poa = PortableServer::POA::_duplicate(poa); - _orb = CORBA::ORB::_duplicate(orb); - _id = _poa->activate_object(_thisObj); -//_engine_cpp = new HEXA_NS::Hex; - _engine_cpp = HEXA_NS::Hex::getInstance (); - _geomClient = NULL; - _HEXABLOCKGen = this; -} - -//============================================================================= -/*! - * GetServant [ static ] - * - * Get servant of the CORBA object - */ -//============================================================================= - -PortableServer::ServantBase_var HEXABLOCK_Gen_i::GetServant( CORBA::Object_ptr theObject ) -{ - if( CORBA::is_nil( theObject ) || CORBA::is_nil( GetPOA() ) ) - return NULL; - try { - PortableServer::Servant aServant = GetPOA()->reference_to_servant( theObject ); - return aServant; - } - catch (...) { - INFOS( "GetServant - Unknown exception was caught!!!" ); - return NULL; - } -} - - - -//============================================================================= -// destructor -//============================================================================= -HEXABLOCK_Gen_i::~HEXABLOCK_Gen_i() -{ -} - -//============================================================================= -/*! - * DumpPython - */ -//============================================================================= -Engines::TMPFile* HEXABLOCK_Gen_i::DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean /*isPublished*/, - CORBA::Boolean /*isMultiFile*/, - CORBA::Boolean& isValidScript) -{ - std::cout << "DumpPython DumpPython DumpPython DumpPython" << std::endl; - isValidScript = true; // to avoid dump python operation failing - Engines::TMPFile_var aStreamFile = new Engines::TMPFile(0); - return aStreamFile._retn(); -} -// SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy); -// if(CORBA::is_nil(aStudy)) -// return new Engines::TMPFile(0); -// -// SALOMEDS::SObject_var aSO = aStudy->FindComponent(ComponentDataType()); -// if(CORBA::is_nil(aSO)) -// return new Engines::TMPFile(0); -// -// TObjectData objData; -// std::vector objectDataVec; -// -// TVariablesList aVariableMap; -// -// SALOMEDS::ChildIterator_var Itr = aStudy->NewChildIterator(aSO); -// for(Itr->InitEx(true); Itr->More(); Itr->Next()) { -// SALOMEDS::SObject_var aValue = Itr->Value(); -// CORBA::String_var IOR = aValue->GetIOR(); -// if(strlen(IOR.in()) > 0) { -// CORBA::Object_var obj = _orb->string_to_object(IOR); -// GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_narrow(obj); -// if(!CORBA::is_nil(GO)) { -// CORBA::String_var aName = aValue->GetName(); -// CORBA::String_var anEntry = GO->GetEntry(); -// CORBA::String_var aStudyEntry = aValue->GetID(); -// objData._name = aName.in(); -// objData._entry = anEntry.in(); -// objData._studyEntry = aStudyEntry.in(); -// objectDataVec.push_back( objData ); -// -// //Find attribute with list of used notebook variables -// SALOMEDS::GenericAttribute_var anAttr; -// SALOMEDS::AttributeString_var anAttrStr; -// if(aValue->FindAttribute(anAttr,"AttributeString")){ -// anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr); -// SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value()); -// ObjectStates* aStates = new ObjectStates(); -// for(int i = 0; i < aSections->length(); i++) { -// TState aState; -// SALOMEDS::ListOfStrings aListOfVars = aSections[i]; -// for(int j = 0; j < aListOfVars.length(); j++) { -// bool isVar = aStudy->IsVariable(aListOfVars[j].in()); -// TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar ); -// aState.push_back(aVar); -// } -// aStates->AddState(aState); -// } -// aVariableMap.insert(std::make_pair(TCollection_AsciiString(anEntry),aStates)); -// } -// } -// } -// } -// -// TCollection_AsciiString aScript; -// aScript += _impl->DumpPython(aStudy->StudyId(), objectDataVec, aVariableMap, isPublished, isValidScript); -// -// if (isPublished) -// { -// //Output the script that sets up the visual parameters. -// char* script = aStudy->GetDefaultScript(ComponentDataType(), "\t"); -// if (script && strlen(script) > 0) { -// aScript += "\n\t### Store presentation parameters of displayed objects\n"; -// aScript += script; -// CORBA::string_free(script); -// } -// } -// -// aScript += "\n\tpass\n"; -// -// int aLen = aScript.Length(); -// unsigned char* aBuffer = new unsigned char[aLen+1]; -// strcpy((char*)aBuffer, aScript.ToCString()); -// -// CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; -// Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); -// -// return aStreamFile._retn(); -// } - - - - -void HEXABLOCK_Gen_i::test() -{ -} - -CORBA::Long HEXABLOCK_Gen_i::countDocument() -{ - CORBA::Long nbDocument = _engine_cpp->countDocument(); -// CORBA::Long nbDocument = 333; - return nbDocument; -} - -Document_ptr HEXABLOCK_Gen_i::getDocument(CORBA::Long i) -{ - HEXA_NS::Document *doc=_engine_cpp->getDocument(i); - if ( doc == NULL ) - return Document::_nil(); - - Document_impl *servantCorba = new Document_impl( GetPOA(), doc ); - return servantCorba->_this(); -} - -void HEXABLOCK_Gen_i::removeDocument(HEXABLOCK_ORB::Document_ptr docIn) -{ - Document_impl* docServant = ::DownCast( docIn ); - ASSERT( docServant ); - if ( docServant ) { - HEXA_NS::Document* doc = docServant->GetImpl(); - _engine_cpp->removeDocument( doc ); - } -} - -Document_ptr HEXABLOCK_Gen_i::findDocument(const char* name) -{ - HEXA_NS::Document *doc=_engine_cpp->findDocument (name); - - if (doc==NULL) - return Document::_nil(); - - Document_impl *servantCorba=new Document_impl( GetPOA(), doc); - return servantCorba->_this(); -} - -Document_ptr HEXABLOCK_Gen_i::addDocument(const char* name) -{ - // HEXA_NS::Document *doc=_engine_cpp->addDocument (name); - // Document_impl *servantCorba=new Document_impl( GetPOA(), doc); - // return servantCorba->_this(); - - return createDocInStudy(name); -} - - - -Document_ptr HEXABLOCK_Gen_i::loadDocument(const char* xmlFilename) -{ - HEXA_NS::Document *doc=_engine_cpp->loadDocument(xmlFilename); - Document_impl *servantCorba=new Document_impl( GetPOA(), doc ); - return servantCorba->_this(); -} - -GEOM_Client* HEXABLOCK_Gen_i::getGeomClient() -{ - // create shape reader if necessary - if ( _geomClient == NULL ) - _geomClient = new GEOM_Client(GetContainerRef()); - ASSERT( _geomClient); - return _geomClient; -} - - -TopoDS_Shape HEXABLOCK_Gen_i::geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject) -{ - TopoDS_Shape S; - if ( !theGeomObject->_is_nil() ){ - _geomClient = getGeomClient(); - - if(CORBA::is_nil(_geomGen)) { - Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM"); - _geomGen=GEOM::GEOM_Gen::_narrow(temp); - } - if ( _geomClient != NULL && !_geomGen->_is_nil () ) - S = _geomClient->GetShape( _geomGen, theGeomObject ); - } - return S; -} - - - - - -// HEXABLOCK_ORB::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape ) -// { -// HEXABLOCK_ORB::GEOM_Object_var aShapeObj; -// if ( !theShape.IsNull() ) { -// _geomClient = getGeomClient();//new GEOM_Client(GetContainerRef()); -// TCollection_AsciiString IOR; -// bool found = _geomClient->Find(theShape, IOR); -// if (found){ -// CORBA::Object_var obj = _orb->string_to_object( IOR.ToCString() ); -// aShapeObj = HEXABLOCK_ORB::GEOM_Object::_narrow ( obj ); -// } -// } -// return aShapeObj._retn(); -// } - - - -// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeFace( const TopoDS_Shape& theShape ) -// { -// ASSERT ( theShape.ShapeType() == TopAbs_FACE ); -// -// int theStudyID = 0; -// GEOM::GEOM_Object_var result; -// -// // PrimOp = self.GetI3DPrimOperations -// // GEOM_IShapesOperations -// return result._retn(); -// } - -// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeEdge( const TopoDS_Shape& theShape ) -// { -// ASSERT ( theShape.ShapeType() == TopAbs_EDGE ); -// int theStudyID = 0; -// GEOM::GEOM_Object_var result; -// GEOM::GEOM_Object_var p1; -// GEOM::GEOM_Object_var p2; -// -// if ( CORBA::is_nil(_geomGen) ) { //_geomGen->_is_nil() -// Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM"); -// _geomGen=GEOM::GEOM_Gen::_narrow(temp); -// } -// GEOM::GEOM_IBasicOperations_var aBasicOp = _geomGen->GetIBasicOperations(theStudyID); -// GEOM::GEOM_IShapesOperations_var aShapesOp = _geomGen->GetIShapesOperations(theStudyID); -// -// TopoDS_Edge anEdge = TopoDS::Edge( theShape ); -// double f, l; -// Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, f, l); -// -// gp_Pnt aCurveStart = aCurve->Value( f ); -// gp_Pnt aCurveEnd = aCurve->Value( l ); -// -// double x1, y1, z1; -// double x2, y2, z2; -// -// x1 = aCurveStart.X(); y1 = aCurveStart.Y(); z1 = aCurveStart.Z(); -// x2 = aCurveEnd.X(); y2 = aCurveEnd.Y(); z2 = aCurveEnd.Z(); -// p1= aBasicOp->MakePointXYZ(x1, y1, z1); -// p2= aBasicOp->MakePointXYZ(x2, y2, z2); -// result = aShapesOp->MakeEdge(p1, p2); -// -// return result._retn(); -// } - -// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::_makeVertex( const TopoDS_Shape& theShape ) -// { -// ASSERT ( theShape.ShapeType() == TopAbs_VERTEX ); -// -// int theStudyID = 0; -// GEOM::GEOM_Object_var result; -// -// TopoDS_Vertex aPoint; -// aPoint = TopoDS::Vertex( theShape ); -// gp_Pnt aPnt = BRep_Tool::Pnt( aPoint ); -// double x = aPnt.X(); -// double y = aPnt.Y(); -// double z = aPnt.Z(); -// -// GEOM::GEOM_IBasicOperations_var aBasicOp = _geomGen->GetIBasicOperations(theStudyID); -// result = aBasicOp->MakePointXYZ(x, y, z); -// -// return result._retn(); -// } - - -// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape ) -// { -// std::cout << "XXXXXXXX shapeToGeomObject "<< std::endl; -// GEOM::GEOM_Object_var aShapeObj; -// if ( !theShape.IsNull() ) { -// switch ( theShape.ShapeType() ){ -// case TopAbs_VERTEX: aShapeObj = _makeVertex( theShape ); break; -// // case TopAbs_FACE: aShapeObj = _makeFace( theShape ); break; //CS_TODO -// case TopAbs_EDGE: aShapeObj = _makeEdge( theShape ); break; -// default: throw (SALOME_Exception(LOCALIZED("shapeToGeomObject : shape type not supported"))); -// } -// } -// return aShapeObj._retn(); -// } - - - - -GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::brepToGeomObject(const std::string& theBrep) -{ - int theStudyID = 0; //CS_TODO - GEOM::GEOM_Object_var aShapeObj; - - if ( CORBA::is_nil(_geomGen) ){ - Engines::EngineComponent_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM"); - _geomGen=GEOM::GEOM_Gen::_narrow(temp); - } - GEOM::GEOM_IInsertOperations_var aInsOp = _geomGen->GetIInsertOperations(theStudyID); - - // char *tmpname = strdup("HexaAssocXXXXXX"); // killed by Abu - char tmpname [32]; // Abu 11/07 - sprintf (tmpname, "/tmp/tmpHexaAsso%dXXXXXX", getpid()); // Abu 11/07 - // strcpy (tmpname, "HexaAssocXXXXXX"); // killed by Abu - - int fd = mkstemp( tmpname ); - if ( fd != -1 ) - { - ofstream tmpfile( tmpname ); - tmpfile << theBrep; - tmpfile.close(); - aShapeObj = aInsOp->ImportFile( tmpname, "BREP" ); - close(fd); - unlink(tmpname); - } - - return aShapeObj._retn(); -} - - - - - - -// GEOM::GEOM_Object_ptr HEXABLOCK_Gen_i::shapeToGeomObject (const TopoDS_Shape& theShape ) -// { -// GEOM::GEOM_Object_var aShapeObj; -// std::cout<<"shapeToGeomObject "<Find(theShape, IOR); -// std::cout<<"shapeToGeomObject found"<string_to_object( IOR.ToCString() ); -// aShapeObj = GEOM::GEOM_Object::_narrow ( obj ); -// } -// } -// return aShapeObj._retn(); -// } - - -StudyContext* HEXABLOCK_Gen_i::GetCurrentStudyContext() -{ - if ( !CORBA::is_nil( myCurrentStudy ) && - myStudyContextMap.find( GetCurrentStudyID() ) != myStudyContextMap.end() ) - return myStudyContextMap[ myCurrentStudy->StudyId() ]; - else - return 0; -} - -int HEXABLOCK_Gen_i::RegisterObject(CORBA::Object_ptr theObject) -{ - StudyContext* myStudyContext = GetCurrentStudyContext(); - if ( myStudyContext && !CORBA::is_nil( theObject )) { - CORBA::String_var iorString = GetORB()->object_to_string( theObject ); - return myStudyContext->addObject( string( iorString.in() ) ); - } - return 0; -} - - -char* HEXABLOCK_Gen_i::ComponentDataType() -{ - return CORBA::string_dup( "HEXABLOCK" ); -} - - -Document_ptr HEXABLOCK_Gen_i::createDoc (const char* name) - throw ( SALOME::SALOME_Exception ) -{ - Unexpect aCatch(SALOME_SalomeException); - - // Get or create the GEOM_Client instance - try { - HEXA_NS::Document *doc = NULL; - doc = _engine_cpp->addDocument (name); - Document_impl *docImpl = new Document_impl( GetPOA(), doc ); - - // activate the CORBA servant of Mesh - Document_var docServant = Document::_narrow( docImpl->_this() ); - /* int nextId = */ RegisterObject( docServant ); - - return docServant._retn(); - } - catch (SALOME_Exception& S_ex) { - } - return Document::_nil(); -} - -Document_ptr HEXABLOCK_Gen_i::createDocInStudy (const char* name) - throw ( SALOME::SALOME_Exception ) -{ - Unexpect aCatch(SALOME_SalomeException); - // create mesh - Document_var doc = this->createDoc (name); - - // publish mesh in the study - if ( CanPublishInStudy( doc ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); - aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_var aSO = PublishDoc( myCurrentStudy, doc.in() ); - aStudyBuilder->CommitCommand(); - } - - return doc._retn(); -} - - - - -SALOME_LifeCycleCORBA* HEXABLOCK_Gen_i::GetLCC() { - if ( _lcc == NULL ) { - _lcc = new SALOME_LifeCycleCORBA( GetNS() ); - } - return _lcc; -} - -SALOME_NamingService* HEXABLOCK_Gen_i::GetNS() -{ - if ( _ns == NULL ) { - _ns = SINGLETON_::Instance(); - ASSERT(SINGLETON_::IsAlreadyExisting()); - _ns->init_orb( _orb ); - } - return _ns; -} - - - -int HEXABLOCK_Gen_i::GetCurrentStudyID() -{ - return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId(); -} - - -void HEXABLOCK_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy ) -{ - /*int curStudyId = */ GetCurrentStudyID(); - myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy ); - // create study context, if it doesn't exist and set current study - int studyId = GetCurrentStudyID(); - if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) { - myStudyContextMap[ studyId ] = new StudyContext; - } - -// // myCurrentStudy may be nil -// if ( !CORBA::is_nil( myCurrentStudy ) ) { -// SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); -// if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() ) -// aStudyBuilder->LoadWith( myCurrentStudy->FindComponent( "GEOM" ), GetGeomEngine() ); -// -// // NPAL16168, issue 0020210 -// // Let meshes update their data depending on GEOM groups that could change -// if ( curStudyId != studyId ) -// { -// //SALOMEDS::SComponent_var me = PublishComponent( myCurrentStudy ); -// SALOMEDS::SComponent_var me = SALOMEDS::SComponent::_narrow -// ( myCurrentStudy->FindComponent( ComponentDataType() ) ); -// if ( !me->_is_nil() ) { -// SALOMEDS::ChildIterator_var anIter = myCurrentStudy->NewChildIterator( me ); -// for ( ; anIter->More(); anIter->Next() ) { -// SALOMEDS::SObject_var so = anIter->Value(); -// CORBA::Object_var ior = SObjectToObject( so ); -// if ( SMESH_Mesh_i* mesh = SMESH::DownCast( ior )) -// mesh->CheckGeomGroupModif(); -// } -// } -// } -// } -} - - -TopoDS_Shape string2shape( const string& brep ) -{ - TopoDS_Shape shape; - - istringstream streamBrep(brep); - - BRep_Builder aBuilder; - BRepTools::Read(shape, streamBrep, aBuilder); - return shape; -} - -// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf ) -// { -// TopoDS_Shape shape; -// std::istrstream streamBrep(buf,sizebuf); -// BRep_Builder aBuilder; -// BRepTools::Read(shape, streamBrep, aBuilder); -// return(shape); -// } - -// ===================================================== shape2string -string shape2string( const TopoDS_Shape& aShape ) -{ - ostringstream streamShape; - BRepTools::Write(aShape, streamShape); - - return streamShape.str(); -} -// ===================================================== HEXABLOCKEngine_factory -extern "C" -{ - PortableServer::ObjectId * HEXABLOCKEngine_factory( - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - SCRUTE(interfaceName); - HEXABLOCK_Gen_i *myHEXABLOCK - = new HEXABLOCK_Gen_i(orb, poa, contId, instanceName, interfaceName); - return myHEXABLOCK->getId() ; - } -} -// ------------------------------------------------------------------------ -// -// Heritage de SALOMEDSImpl_Driver -// -// ------------------------------------------------------------------------ -// -/* *********************************************************************** -// ========================================================= GetIOR -std::string HEXABLOCK_Gen_i::GetIOR() -{ - return ""; -} - *********************************************************************** */ -// =========================================================== SaveASCII -SALOMEDS::TMPFile* HEXABLOCK_Gen_i::SaveASCII ( - const SALOMEDS::SComponent_ptr compo, - const char* theURL, - bool isMultiFile) -{ - SALOMEDS::TMPFile* fic = Save (compo, theURL, isMultiFile); - return fic; -} -// =========================================================== LoadASCII -CORBA::Boolean HEXABLOCK_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr compo, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile) -{ - bool rep = Load (compo, theStream, theURL, isMultiFile); - return rep; -} -// =========================================================== Close -void HEXABLOCK_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "Close" << endl; -} -// =================================================== IORToLocalPersistentID -char* HEXABLOCK_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, - const char* IORString, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "IORToLocalPersistentID" << endl; - const char* empty = ""; - return CORBA::string_dup (empty); -} -// =================================================== LocalPersistentIDToIOR -char* HEXABLOCK_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, - const char* aLocalPersistentID, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "LocalPersistentIDToIOR" << endl; - - const char* empty = ""; - return CORBA::string_dup (empty); -} -// -// =========================================================== CanCopy -CORBA::Boolean HEXABLOCK_Gen_i::CanCopy (SALOMEDS::SObject_ptr theObject) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "CanCopy" << endl; - return false; -} -// =========================================================== CopyFrom -SALOMEDS::TMPFile* HEXABLOCK_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, - CORBA::Long& theObjectID) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "CopyFrom" << endl; - return NULL; -} -// =========================================================== CanPaste -CORBA::Boolean HEXABLOCK_Gen_i:: CanPaste (const char* theComponentName, - CORBA::Long theObjectID) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "CanPaste" << endl; - return false; -} -// =========================================================== PasteInto -SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PasteInto(const SALOMEDS::TMPFile& fic, - CORBA::Long theObjectID, - SALOMEDS::SObject_ptr theObject) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "PasteInto" << endl; - return NULL; -} -// =========================================================== CanPaste -SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PublishInStudy (SALOMEDS::Study_ptr stud, - SALOMEDS::SObject_ptr theSObject, - CORBA::Object_ptr theObject, - const char* theName) - throw (SALOME::SALOME_Exception) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "PublishInStudy" << endl; - return NULL; -} -// =========================================================== Save -SALOMEDS::TMPFile* HEXABLOCK_Gen_i::Save(const SALOMEDS::SComponent_ptr compo, - const char* theURL, - bool isMultiFile) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "Save" << endl; - - string tmp_fic = SALOMEDS_Tool::GetTmpDir(); -// tmp_fic += "hexablock.xml"; - tmp_fic = "hexablock.xml"; - cpchar fic_study = tmp_fic.c_str(); - - int len_buffer = 4; - char* ch_buffer = NULL; - int ier = _engine_cpp->saveAllDocs (fic_study); - if (ier==HOK) - ch_buffer = Hex::read_file (fic_study, len_buffer); - else - ch_buffer = strdup ("<0>"); - - CORBA::Octet* oct_buffer = (CORBA::Octet*) ch_buffer; - SALOMEDS::TMPFile* oct_stream = new SALOMEDS::TMPFile (len_buffer, - len_buffer, oct_buffer, 1); - return oct_stream; -} -// =========================================================== Load -CORBA::Boolean HEXABLOCK_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& stream, - const char* theURL, - bool isMultiFile) -{ - if (db) cout << " +++++++ Je suis passe par HEXABLOCK_Gen_i::" - << "Load" << endl; - - char *ch_buffer = (char*) stream.NP_data(); - - int ier = _engine_cpp->loadAllDocs (ch_buffer); - return ier==HOK; -} - -// =========================================================== addDocInStudy -CORBA::Long HEXABLOCK_Gen_i::addDocInStudy (Document_ptr doc_in) - throw ( SALOME::SALOME_Exception ) -{ - if (CORBA::is_nil(myCurrentStudy)) - return 986; - - Document_impl* doc_servant = ::DownCast (doc_in); - if (doc_servant == NULL) - return 987; - - HEXA_NS::Document* doc = doc_servant->GetImpl(); - if (doc == NULL) - return 988; - - cpchar name = doc->getName(); - PutData (name); - - SALOMEDS::StudyBuilder_var study_builder = myCurrentStudy->NewBuilder(); - // study_builder->NewCommand(); // There is a transaction ??? - - - SALOMEDS::SObject_var obj = ObjectToSObject( myCurrentStudy, doc_in ); - if ( obj->_is_nil() ) - { - SALOMEDS::SComponent_var father = PublishComponent( myCurrentStudy ); - if ( father->_is_nil() ) - return 989; - - // SALOMEDS::SObject_var - // s_obj = HEXABLOCK_Gen_i::ObjectToSObject( my_current_study, doc_in ); ??? - // if ( obj->_is_nil() ) --> C'est le cas - - SALOMEDS::SObject_var s_obj = study_builder->NewObject (father); - obj = s_obj._retn(); - if ( obj->_is_nil() ) - return 981; - } - - SALOMEDS::GenericAttribute_var attrib; - SALOMEDS::AttributeName_var attname; - - attrib = study_builder->FindOrCreateAttribute( obj, "AttributeName" ); - attname = SALOMEDS::AttributeName::_narrow( attrib ); - attname->SetValue (name); - /// ----------- Fin de SetName - // study_builder->CommitCommand(); ??? - return HOK; -} -// =========================================================== Version information - -char* HEXABLOCK_Gen_i::getVersion() -{ -#if HEXABLOCK_DEVELOPMENT - return CORBA::string_dup(HEXABLOCK_VERSION_STR"dev"); -#else - return CORBA::string_dup(HEXABLOCK_VERSION_STR); -#endif -} diff --git a/src/HEXABLOCK_I/HEXABLOCK.hxx b/src/HEXABLOCK_I/HEXABLOCK.hxx deleted file mode 100755 index bcc8faa..0000000 --- a/src/HEXABLOCK_I/HEXABLOCK.hxx +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 _HEXABLOCK_HXX_ -#define _HEXABLOCK_HXX_ - -#include -#include CORBA_SERVER_HEADER(HEXABLOCK_Gen) -#include "SALOME_Component_i.hxx" -// #include "SALOMEDSImpl_TMPFile.hxx" -// #include "SALOMEDSImpl_SComponent.hxx" - - - -#include - - -#include -#include "GEOM_Client.hxx" - -#include "hexa_base.hxx" -#include "Hex.hxx" - -using namespace HEXABLOCK_ORB; - -class SALOME_LifeCycleCORBA; -class SALOME_NamingService; - - - - - -// =========================================================== -// Study context - stores study-connected objects references -// ========================================================== -class StudyContext -{ -public: - // constructor - StudyContext() {} - // destructor - ~StudyContext() - { - mapIdToIOR.clear(); - mapIdToId.clear(); - } - // register object in the internal map and return its id - int addObject( string theIOR ) - { - int nextId = getNextId(); - mapIdToIOR[ nextId ] = theIOR; - return nextId; - } - // find the object id in the internal map by the IOR - int findId( string theIOR ) - { - map::iterator imap; - for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) { - if ( imap->second == theIOR ) - return imap->first; - } - return 0; - } - // get object's IOR by id - string getIORbyId( const int theId ) - { - if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() ) - return mapIdToIOR[ theId ]; - return string( "" ); - } - // get object's IOR by old id - string getIORbyOldId( const int theOldId ) - { - if ( mapIdToId.find( theOldId ) != mapIdToId.end() ) - return getIORbyId( mapIdToId[ theOldId ] ); - return string( "" ); - } - // maps old object id to the new one (used when restoring data) - void mapOldToNew( const int oldId, const int newId ) { - mapIdToId[ oldId ] = newId; - } - // get old id by a new one - int getOldId( const int newId ) { - map::iterator imap; - for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) { - if ( imap->second == newId ) - return imap->first; - } - return 0; - } - -private: - // get next free object identifier - int getNextId() - { - int id = 1; - while( mapIdToIOR.find( id ) != mapIdToIOR.end() ) - id++; - return id; - } - - map mapIdToIOR; // persistent-to-transient map - map mapIdToId; // used to translate object from persistent to transient form -}; - - - -class HEXABLOCK_Gen_i: public POA_HEXABLOCK_ORB::HEXABLOCK_Gen, - public Engines_Component_i -{ -public: - HEXABLOCK_Gen_i( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName); - // Get object of the CORBA reference - static CORBA::ORB_var GetORB() { return _orb;} - static PortableServer::POA_var GetPOA() { return _poa;} - static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject ); - - virtual ~HEXABLOCK_Gen_i(); - - void test(); - ::CORBA::Long countDocument(); - Document_ptr getDocument(::CORBA::Long i); - void removeDocument(Document_ptr d); //CS_TODO - Document_ptr addDocument (const char* name); - Document_ptr findDocument (const char* name); - Document_ptr loadDocument (const char* xmlFilename); - - GEOM_Client* getGeomClient(); - TopoDS_Shape geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject); -// GEOM::GEOM_Object_ptr shapeToGeomObject(const TopoDS_Shape& theShape ); - GEOM::GEOM_Object_ptr brepToGeomObject(const std::string& theBrep); - static SALOME_LifeCycleCORBA* GetLCC(); - static SALOME_NamingService* GetNS(); - static HEXABLOCK_Gen_i* GetHEXABLOCKGen() { return _HEXABLOCKGen;} - - - virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean isMultiFile, - CORBA::Boolean& isValidScript); - - void SetCurrentStudy( SALOMEDS::Study_ptr theStudy ); - int GetCurrentStudyID(); - StudyContext* GetCurrentStudyContext(); - std::string /*void */SetName( SALOMEDS::SObject_ptr theSObject, - const char* theName, - const char* theDefaultName ); - int RegisterObject(CORBA::Object_ptr theObject); -// SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh() throw ( SALOME::SALOME_Exception ) - char* ComponentDataType(); - - - bool CanPublishInStudy(CORBA::Object_ptr theIOR); - SALOMEDS::SComponent_ptr PublishComponent(SALOMEDS::Study_ptr theStudy); - static SALOMEDS::SObject_ptr ObjectToSObject(SALOMEDS::Study_ptr theStudy, CORBA::Object_ptr theObject); - - SALOMEDS::SObject_ptr PublishDoc( SALOMEDS::Study_ptr theStudy, - Document_ptr theDoc, - const char* theName = 0); - - - - Document_ptr createDoc (const char* name) - throw ( SALOME::SALOME_Exception ); - Document_ptr createDocInStudy (const char* name) - throw ( SALOME::SALOME_Exception ); - CORBA::Long addDocInStudy (Document_ptr doc) - throw ( SALOME::SALOME_Exception ); - - //-----------------------------------------------------------------------// - // Inherited methods from SALOMEDS::Driver // - //-----------------------------------------------------------------------// - -public : - SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile); - - CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile); - - void Close(SALOMEDS::SComponent_ptr theComponent); - // char* ComponentDataType(); Deja la - - CORBA::Boolean CanCopy (SALOMEDS::SObject_ptr theObject); - CORBA::Boolean CanPaste (const char* theComponentName, - CORBA::Long theObjectID); - - SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, - CORBA::Long& theObjectID); - - SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream, - CORBA::Long theObjectID, - SALOMEDS::SObject_ptr theObject); - SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, - CORBA::Object_ptr theObject, - const char* theName) throw (SALOME::SALOME_Exception) ; - - - char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, - const char* IORString, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII); - char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, - const char* aLocalPersistentID, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII); - - char* getVersion(); - -#if 0 - virtual std::string GetIOR(); - - /******************* - virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& compo, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile); - - virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& compo, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile); - *********************/ - - virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - - virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - - - virtual bool Load(const SALOMEDSImpl_SComponent& compo, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile); - - virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile); - - virtual void Close(const SALOMEDSImpl_SComponent& theComponent); - - // virtual std::string ComponentDataType(); - - virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject, - const std::string& IORString, - bool isMultiFile, - bool isASCII); - - virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject, - const std::string& aLocalPersistentID, - bool isMultiFile, - bool isASCII); - - virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject); - - virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject, - int& theObjectID, - long& theStreamLength); - - virtual bool CanPaste(const std::string& theComponentName, int theObjectID); - - virtual std::string PasteInto(const unsigned char* theStream, - const long theStreamLength, - int theObjectID, - const SALOMEDSImpl_SObject& theObject); - - virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy, - bool isPublished, - bool isMultiFile, - bool& isValidScript, - long& theStreamLength); -#endif -private : - HEXA_NS::Hex* _engine_cpp; - GEOM_Client* _geomClient; - - - static PortableServer::POA_var _poa;// POA reference - static GEOM::GEOM_Gen_var _geomGen; - static SALOME_LifeCycleCORBA* _lcc; - static CORBA::ORB_var _orb; - static SALOME_NamingService* _ns; - static HEXABLOCK_Gen_i* _HEXABLOCKGen; - - - GEOM::GEOM_Object_ptr _makeVertex( const TopoDS_Shape& theShape ); - GEOM::GEOM_Object_ptr _makeEdge( const TopoDS_Shape& theShape ); - - map myStudyContextMap; // Map of study context objects - SALOMEDS::Study_var myCurrentStudy; // Current study - - bool first_document; - -}; - -extern "C" - PortableServer::ObjectId * HEXABLOCKEngine_factory( - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName - ); - - -template - T - DownCast(CORBA::Object_ptr theArg) - { - return dynamic_cast(HEXABLOCK_Gen_i::GetServant(theArg).in()); - } - - - - - -TopoDS_Shape string2shape( const string& brep ); - - -string shape2string( const TopoDS_Shape& aShape ); - - - - -#endif - - -// 1) Séquence de code convertissant une chaîne au format BREP vers un TopoDS_Shape -// -// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf ) -// { -// TopoDS_Shape shape; -// std::istrstream streamBrep(buf,sizebuf); -// BRep_Builder aBuilder; -// BRepTools::Read(shape, streamBrep, aBuilder); -// return(shape); -// } -// -// 2) Séquence de code convertissant un TopoDS_Shape en une chaîne au format BREP -// -// char* SHAPE_TO_STRING( TopoDS_Shape aShape, int& sizebuf ) -// { -// ostrstream streamShape; -// BRepTools::Write(aShape, streamShape); -// sizebuf = streamShape.pcount(); -// char* buf = new char [sizebuf]; -// char* valueOfStream = streamShape.str(); -// memcpy(buf, valueOfStream, size); -// return buf; -// } -// -// 3) Séquence de code accédant aux coordonnées d'un TopoDS_Shape qui est un Vertex -// -// bool SHAPE_TO_COORD(TopoDS_Shape aShape, double& x, double& y, double& z) -// { -// if ( aShape.ShapeType() == TopAbs_VERTEX ) { -// TopoDS_Vertex aPoint; -// aPoint = TopoDS::Vertex( aShape ); -// gp_Pnt aPnt = BRep_Tool::Pnt( aPoint ); -// x = aPnt.X(); -// y = aPnt.Y(); -// z = aPnt.Z(); -// return(1); -// } else { -// return(0); -// }; -// } -// -// 4) Séquence de code créant un TopoDS_Shape à partir de coordonnées -// -// TopoDS_Shape COORD_TO_SHAPE(double x, double y, double z) -// { -// gp_Pnt aPnt(x, y, z); -// BRepBuilderAPI_MakeVertex mkVertex (aPnt); -// TopoDS_Vertex aVertex = TopoDS::Vertex(mkVertex.Shape()); -// return aVertex; -// } diff --git a/src/HEXABLOCK_I/HEXABLOCK_1.cxx b/src/HEXABLOCK_I/HEXABLOCK_1.cxx deleted file mode 100644 index 38f76d3..0000000 --- a/src/HEXABLOCK_I/HEXABLOCK_1.cxx +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 "HEXABLOCK.hxx" - -#include "SALOME_NamingService.hxx" - -#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog) - -#include "utilities.h" -#include "Utils_ExceptHandlers.hxx" - -#include - -static int MYDEBUG = 1; - - -using namespace HEXABLOCK_ORB; - -//============================================================================= -/*! - * SMESH_Gen_i::CanPublishInStudy - * - * Returns true if object can be published in the study - */ -//============================================================================= -bool HEXABLOCK_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) -{ - if(CORBA::is_nil(myCurrentStudy)) - return false; - - Document_var aDoc = Document::_narrow(theIOR); - if( !aDoc->_is_nil() ) - return true; - - - return false; -} - -//======================================================================= -//function : ObjectToSObject -//purpose : -//======================================================================= - -SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::ObjectToSObject( SALOMEDS::Study_ptr theStudy, - CORBA::Object_ptr theObject ) -{ - SALOMEDS::SObject_var aSO; - if ( !CORBA::is_nil( theStudy ) && !CORBA::is_nil( theObject )) - { - CORBA::String_var objStr = HEXABLOCK_Gen_i::GetORB()->object_to_string( theObject ); - aSO = theStudy->FindObjectIOR( objStr.in() ); - } - return aSO._retn(); -} - - - -//======================================================================= -//function : publish -//purpose : -//======================================================================= - -static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, - CORBA::Object_ptr theIOR, - SALOMEDS::SObject_ptr theFatherObject, - const int theTag = 0, - const char* thePixMap = 0, - const bool theSelectable = true) -{ - SALOMEDS::SObject_var SO = HEXABLOCK_Gen_i::ObjectToSObject( theStudy, theIOR ); - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - if ( SO->_is_nil() ) { - if ( theTag == 0 ) - SO = aStudyBuilder->NewObject( theFatherObject ); - else if ( !theFatherObject->FindSubObject( theTag, SO )) - SO = aStudyBuilder->NewObjectToTag( theFatherObject, theTag ); - } - - SALOMEDS::GenericAttribute_var anAttr; - if ( !CORBA::is_nil( theIOR )) { - anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeIOR" ); - CORBA::String_var objStr = HEXABLOCK_Gen_i::GetORB()->object_to_string( theIOR ); - SALOMEDS::AttributeIOR::_narrow(anAttr)->SetValue( objStr.in() ); - } - - if ( thePixMap ) { - anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributePixMap" ); - SALOMEDS::AttributePixMap_var pm = SALOMEDS::AttributePixMap::_narrow( anAttr ); - pm->SetPixMap( thePixMap ); - } - - return SO._retn(); -} - - -//======================================================================= -//function : setName -//purpose : -//======================================================================= -std::string HEXABLOCK_Gen_i::SetName( SALOMEDS::SObject_ptr theSObject, - const char* theName, - const char* theDefaultName ) -{ - std::string attrName; - if (theSObject->_is_nil() ) - return attrName; - - SALOMEDS::StudyBuilder_var aStudyBuilder = theSObject->GetStudy()->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr = - aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" ); - SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr ); - if ( theName && strlen( theName ) != 0 ) - attrName = theName; - else { - CORBA::String_var curName = CORBA::string_dup( aNameAttr->Value() ); - if ( strlen( curName ) == 0 ) { - TCollection_AsciiString aName( (char*) theDefaultName ); - attrName = aName.ToCString(); - } - } - - aNameAttr->SetValue( attrName.c_str() ); - return attrName; -} - -// ======================================================================= -// function : PublishComponent -// purpose : -// ======================================================================= -SALOMEDS::SComponent_ptr HEXABLOCK_Gen_i::PublishComponent(SALOMEDS::Study_ptr theStudy) -{ - if ( CORBA::is_nil( theStudy )) - return SALOMEDS::SComponent::_nil(); - - SALOMEDS::SComponent_var father = - SALOMEDS::SComponent::_narrow( theStudy->FindComponent( ComponentDataType() ) ); - if ( !CORBA::is_nil( father ) ) - return father._retn(); - - SALOME_ModuleCatalog::ModuleCatalog_var aCat = - SALOME_ModuleCatalog::ModuleCatalog::_narrow( GetNS()->Resolve("/Kernel/ModulCatalog") ); - if ( CORBA::is_nil( aCat ) ) - return father._retn(); - - SALOME_ModuleCatalog::Acomponent_var aComp = aCat->GetComponent( ComponentDataType() ); - if ( CORBA::is_nil( aComp ) ) - return father._retn(); - - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributePixMap_var aPixmap; - - father = aStudyBuilder->NewComponent( ComponentDataType() ); - aStudyBuilder->DefineComponentInstance( father, HEXABLOCK_Gen_i::_this() ); - - - anAttr = aStudyBuilder->FindOrCreateAttribute( father, "AttributePixMap" ); - aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr ); - aPixmap ->SetPixMap( "ICON_OBJBROWSER_HEXABLOCK" ); - SetName( father, aComp->componentusername(), "HEXABLOCK" ); - - return father._retn(); -} - - - - - - -// bool HEXABLOCKGUI::createSComponent() //addComponent -// { -// DEBTRACE("HEXABLOCKGUI::createSComponent"); -// _PTR(Study) aStudy = (( SalomeApp_Study* )(getApp()->activeStudy()))->studyDS(); -// _PTR(StudyBuilder) aBuilder (aStudy->NewBuilder()); -// _PTR(GenericAttribute) anAttr; -// _PTR(AttributeName) aName; -// -// // --- Find or create "HEXABLOCK" SComponent in the study -// _PTR(SComponent) aComponent = aStudy->FindComponent("HEXABLOCK"); -// if ( !aComponent ) -// { -// aComponent = aBuilder->NewComponent("HEXABLOCK"); -// anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName"); -// aName = _PTR(AttributeName) (anAttr); -// aName->SetValue(getApp()->moduleTitle("HEXABLOCK").toStdString()); -// -// anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap"); -// _PTR(AttributePixMap) aPixmap(anAttr); -// aPixmap->SetPixMap("share/salome/resources/hexablock/ModuleHexablock.png"); -// -// aBuilder->DefineComponentInstance(aComponent, getApp()->defaultEngineIOR().toStdString()); -// -// DEBTRACE("HEXABLOCKGUI::createSComponent defaultEngineIOR=>"<defaultEngineIOR().toStdString()); -// // SalomeApp_DataModel::synchronize( aComponent, HEXABLOCKGUI::activeStudy() ); -// return true; -// } -// return false; -// } - - - -//============================================================================= -/*! - * findMaxChildTag [ static internal ] - * - * Finds maximum child tag for the given object - */ -//============================================================================= - -static long findMaxChildTag( SALOMEDS::SObject_ptr theSObject ) -{ - long aTag = 0; - if ( !theSObject->_is_nil() ) { - SALOMEDS::Study_var aStudy = theSObject->GetStudy(); - if ( !aStudy->_is_nil() ) { - SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator( theSObject ); - for ( ; anIter->More(); anIter->Next() ) { - long nTag = anIter->Value()->Tag(); - if ( nTag > aTag ) - aTag = nTag; - } - } - } - return aTag; -} - -//======================================================================= -//function : PublishMesh -//purpose : -//======================================================================= -SALOMEDS::SObject_ptr HEXABLOCK_Gen_i::PublishDoc ( SALOMEDS::Study_ptr theStudy, - Document_ptr theDoc, - const char* theName) -{ - if ( CORBA::is_nil( theStudy ) || - CORBA::is_nil( theDoc )) - return SALOMEDS::SComponent::_nil(); - - // find or publish a mesh - - SALOMEDS::SObject_var aDocSO = ObjectToSObject( theStudy, theDoc ); - if ( aDocSO->_is_nil() ) - { - SALOMEDS::SComponent_var father = PublishComponent( theStudy ); - if ( father->_is_nil() ) - return aDocSO._retn(); - - // Find correct free tag - long aTag = findMaxChildTag( father.in() ); - aTag++; - - aDocSO = publish (theStudy, theDoc, father, aTag); - if ( aDocSO->_is_nil() ) - return aDocSO._retn(); - } - std::string docName = SetName( aDocSO, theName, theDoc->getName()); // Bph - - // Add shape reference - - return aDocSO._retn(); -} - diff --git a/src/HEXABLOCK_I/HexBiCylinder_impl.cxx b/src/HEXABLOCK_I/HexBiCylinder_impl.cxx deleted file mode 100755 index 44667f8..0000000 --- a/src/HEXABLOCK_I/HexBiCylinder_impl.cxx +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "hexa_base.hxx" -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexHexa_impl.hxx" -#include "HexCylinder_impl.hxx" -#include "HexBiCylinder_impl.hxx" -#include "HEXABLOCK.hxx" - - -BiCylinder_impl::BiCylinder_impl( HEXA_NS::BiCylinder *ptrCpp ) -{ - bi_cylinder_cpp = ptrCpp; -} - - -HEXA_NS::BiCylinder* BiCylinder_impl::GetImpl() -{ - return bi_cylinder_cpp; -} - - -Vertex_ptr BiCylinder_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - HEXA_NS::Vertex* v = bi_cylinder_cpp->getVertexIJK(part, x, y, z); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr BiCylinder_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeI(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr BiCylinder_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeJ(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr BiCylinder_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeK(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Quad_ptr BiCylinder_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadIJ(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr BiCylinder_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadIK(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr BiCylinder_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadJK(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Hexa_ptr BiCylinder_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - HEXA_NS::Hexa* h = bi_cylinder_cpp->getHexaIJK(part, x, y, z); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - return result; -} -::CORBA::Long BiCylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = bi_cylinder_cpp->saveVtk( fname ); - return ret; -} - -void BiCylinder_impl::dump() throw (SALOME::SALOME_Exception) -{ - bi_cylinder_cpp->dump(); -} - - -void BiCylinder_impl::printName() throw (SALOME::SALOME_Exception) -{ - bi_cylinder_cpp->printName(); -} - -char* BiCylinder_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( bi_cylinder_cpp->getName() ); -} - -// ========================================================= setName -void BiCylinder_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - bi_cylinder_cpp->setName (name); -} - diff --git a/src/HEXABLOCK_I/HexBiCylinder_impl.hxx b/src/HEXABLOCK_I/HexBiCylinder_impl.hxx deleted file mode 100755 index 261bd33..0000000 --- a/src/HEXABLOCK_I/HexBiCylinder_impl.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexBiCylinder_impl__ -#define __HexBiCylinder_impl__ - -#include -#include CORBA_SERVER_HEADER(BiCylinder) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexBiCylinder.hxx" - -using namespace HEXABLOCK_ORB; - -class BiCylinder_impl : public POA_HEXABLOCK_ORB::BiCylinder, - public SALOME::GenericObj_i -{ -public: - BiCylinder_impl(HEXA_NS::BiCylinder *ptrCpp); - HEXA_NS::BiCylinder* GetImpl(); - - Vertex_ptr getVertexIJK(::CORBA::Long part,::CORBA::Long x,::CORBA::Long y,::CORBA::Long z) - throw (SALOME::SALOME_Exception); - - Edge_ptr getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - - Quad_ptr getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - Quad_ptr getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - Quad_ptr getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - - Hexa_ptr getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception); - - ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::BiCylinder* bi_cylinder_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.cxx b/src/HEXABLOCK_I/HexCrossElements_impl.cxx deleted file mode 100755 index 5b6c90c..0000000 --- a/src/HEXABLOCK_I/HexCrossElements_impl.cxx +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "hexa_base.hxx" -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexHexa_impl.hxx" -#include "HexCylinder_impl.hxx" -#include "HexCrossElements_impl.hxx" -#include "HEXABLOCK.hxx" - - -CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp) -{ -} - - -HEXA_NS::CrossElements* CrossElements_impl::GetImpl() -{ - return _crossElements_cpp; -} - - -Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - return result; -} - -::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname ); - return ret; -} - -void CrossElements_impl::dump() throw (SALOME::SALOME_Exception) -{ - _crossElements_cpp->dump(); -} - - -void CrossElements_impl::printName() throw (SALOME::SALOME_Exception) -{ - _crossElements_cpp->printName(); -} - -char* CrossElements_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _crossElements_cpp->getName() ); -} - -// ========================================================= setName -void CrossElements_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _crossElements_cpp->setName (name); -} - -// ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long n = _crossElements_cpp->countVertex(); -// return n; -// } -// -// ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long n = _crossElements_cpp->countEdge(); -// return n; -// } -// -// ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long n = _crossElements_cpp->countQuad(); -// return n; -// } -// -// ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long n = _crossElements_cpp->countHexa(); -// return n; -// } -// -// -// -// Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception) -// { -// HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n); -// Vertex_impl* servantCorba = new Vertex_impl(v); -// return servantCorba->_this(); -// } -// -// Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception) -// { -// HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n); -// Edge_impl* servantCorba = new Edge_impl(e); -// return servantCorba->_this(); -// } -// -// Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception) -// { -// HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n); -// Quad_impl* servantCorba = new Quad_impl(q); -// return servantCorba->_this(); -// } -// -// Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception) -// { -// HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n); -// Hexa_impl* servantCorba = new Hexa_impl(h); -// return servantCorba->_this(); -// } -// -// -// -// ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname ); -// return ret; -// } -// -// -// -// Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Vertex_ptr result = Vertex::_nil(); -// // HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(x, y,z); -// HEXA_NS::Vertex* v = NULL; -// _crossElements_cpp->toto(); -// if ( v != NULL ){ -// Vertex_impl* servantCorba = new Vertex_impl(v); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Edge_ptr result = Edge::_nil(); -// HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z); -// if ( e != NULL ){ -// Edge_impl* servantCorba = new Edge_impl(e); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Edge_ptr result = Edge::_nil(); -// HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z); -// if ( e != NULL ){ -// Edge_impl* servantCorba = new Edge_impl(e); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Edge_ptr result = Edge::_nil(); -// HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z); -// if ( e != NULL ){ -// Edge_impl* servantCorba = new Edge_impl(e); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Quad_ptr result = Quad::_nil(); -// HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z); -// if ( q != NULL ){ -// Quad_impl* servantCorba = new Quad_impl(q); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Quad_ptr result = Quad::_nil(); -// HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z); -// if ( q != NULL ){ -// Quad_impl* servantCorba = new Quad_impl(q); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) -// throw (SALOME::SALOME_Exception) -// { -// Quad_ptr result = Quad::_nil(); -// HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z); -// if ( q != NULL ){ -// Quad_impl* servantCorba = new Quad_impl(q); -// result = servantCorba->_this(); -// } -// return result; -// } -// -// -// Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception) -// { -// Hexa_ptr result = Hexa::_nil(); -// HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z); -// if ( h != NULL ){ -// Hexa_impl* servantCorba = new Hexa_impl(h); -// result = servantCorba->_this(); -// } -// return result; -// } - - diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.hxx b/src/HEXABLOCK_I/HexCrossElements_impl.hxx deleted file mode 100755 index c00b742..0000000 --- a/src/HEXABLOCK_I/HexCrossElements_impl.hxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexCrossElements_impl__ -#define __HexCrossElements_impl__ - -#include -#include CORBA_SERVER_HEADER(CrossElements) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexCrossElements.hxx" - -using namespace HEXABLOCK_ORB; - -class CrossElements_impl : public POA_HEXABLOCK_ORB::CrossElements, - public SALOME::GenericObj_i -{ -public: - CrossElements_impl(HEXA_NS::CrossElements *ptrCpp); - HEXA_NS::CrossElements* GetImpl(); - - Vertex_ptr getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Edge_ptr getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Quad_ptr getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Quad_ptr getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Quad_ptr getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Hexa_ptr getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::CrossElements *_crossElements_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexCylinder_impl.cxx b/src/HEXABLOCK_I/HexCylinder_impl.cxx deleted file mode 100755 index 2cdbb24..0000000 --- a/src/HEXABLOCK_I/HexCylinder_impl.cxx +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexCylinder_impl.hxx" -#include "HexVertex_impl.hxx" -#include "HexVector_impl.hxx" - -Cylinder_impl::Cylinder_impl( HEXA_NS::Cylinder *ptrCpp ):_cylinder_cpp(ptrCpp) -{ -} - -HEXA_NS::Cylinder* Cylinder_impl::GetImpl() - throw (SALOME::SALOME_Exception) -{ - return _cylinder_cpp; -} - - -Vertex_ptr Cylinder_impl::getBase() - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _cylinder_cpp->getBase(); - if ( v!= NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - - return result; -} - -Vector_ptr Cylinder_impl::getDirection() - throw (SALOME::SALOME_Exception) -{ - Vector_ptr result = Vector::_nil(); - - HEXA_NS::Vector* v = _cylinder_cpp->getDirection(); - if ( v!= NULL ){ - Vector_impl* servantCorba = new Vector_impl(v); - result = servantCorba->_this(); - } - return result; -} - - -::CORBA::Double Cylinder_impl::getRadius() - throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double d = _cylinder_cpp->getRadius(); - return d; -} - - -::CORBA::Double Cylinder_impl::getHeight() - throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double d = _cylinder_cpp->getHeight(); - return d; -} - - -void Cylinder_impl::dump() throw (SALOME::SALOME_Exception) -{ - _cylinder_cpp->dump(); -} - - -void Cylinder_impl::printName() throw (SALOME::SALOME_Exception) -{ - _cylinder_cpp->printName(); -} - - -char* Cylinder_impl::getName() throw (SALOME::SALOME_Exception) -{ - char name[12]; - return CORBA::string_dup( _cylinder_cpp->getName(name) ); -} -// ========================================================= setName -void Cylinder_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _cylinder_cpp->setName (name); -} - -// ::CORBA::Long Cylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception) -// { -// ::CORBA::Long ret = _cylinder_cpp->saveVtk( fname ); -// return ret; -// } - - diff --git a/src/HEXABLOCK_I/HexCylinder_impl.hxx b/src/HEXABLOCK_I/HexCylinder_impl.hxx deleted file mode 100755 index 9386d13..0000000 --- a/src/HEXABLOCK_I/HexCylinder_impl.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexCylinder_impl__ -#define __HexCylinder_impl__ - -#include -#include CORBA_SERVER_HEADER(Cylinder) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexCylinder.hxx" - -using namespace HEXABLOCK_ORB; - -class Cylinder_impl : public POA_HEXABLOCK_ORB::Cylinder, - public SALOME::GenericObj_i -{ -public: - Cylinder_impl(HEXA_NS::Cylinder *ptrCpp); - HEXA_NS::Cylinder* GetImpl() throw (SALOME::SALOME_Exception); - - Vertex_ptr getBase() throw (SALOME::SALOME_Exception); - Vector_ptr getDirection() throw (SALOME::SALOME_Exception); - ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception); - ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception); - -// ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Cylinder *_cylinder_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexDocument_impl.cxx b/src/HEXABLOCK_I/HexDocument_impl.cxx deleted file mode 100755 index eef08fc..0000000 --- a/src/HEXABLOCK_I/HexDocument_impl.cxx +++ /dev/null @@ -1,2449 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; - -#include "utilities.h" - -#include - -#include "HEXABLOCK.hxx" -#include "HexDocument_impl.hxx" -// - -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexHexa_impl.hxx" -#include "HexVector_impl.hxx" -#include "HexElements_impl.hxx" -#include "HexCrossElements_impl.hxx" -#include "HexCylinder_impl.hxx" -#include "HexPipe_impl.hxx" -#include "HexLaw_impl.hxx" -#include "HexPropagation_impl.hxx" -#include "HexGroup_impl.hxx" -#include "HexPipe_impl.hxx" - -#include "HexBiCylinder.hxx" -#include "HexNewShape_impl.hxx" - - -using namespace HEXABLOCK_ORB; - - -Document_impl::Document_impl( PortableServer::POA_ptr thePOA, HEXA_NS::Document *ptrCpp): -SALOME::GenericObj_i( thePOA ), -_document_cpp(ptrCpp) -{ -} - - -// Document_impl::Document_impl(HEXA_NS::Document *ptrCpp):_document_cpp(ptrCpp) -// { -// } - -::CORBA::Long Document_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = _document_cpp->saveVtk( fname ); - return ret; -} -void Document_impl::purge() throw (SALOME::SALOME_Exception) -{ - _document_cpp->purge(); -} -void Document_impl::dump() throw (SALOME::SALOME_Exception) -{ - _document_cpp->dump(); -} - -HEXA_NS::Document* Document_impl::GetImpl() throw (SALOME::SALOME_Exception) -{ - return _document_cpp; -} - -::CORBA::Long Document_impl::save(const char* fileName) - throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = _document_cpp->save(fileName); - return ret; -} - -::CORBA::Long Document_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = _document_cpp->setName(name); - return ret; -} - -void Document_impl::setTolerance(::CORBA::Double tol) - throw (SALOME::SALOME_Exception) -{ - _document_cpp->setTolerance(tol); -} - -::CORBA::Double Document_impl::getTolerance() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->getTolerance(); -} - -Vertex_ptr Document_impl::addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) - throw(SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _document_cpp->addVertex( x, y, z ); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - -::CORBA::Long Document_impl::countVertex() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countVertex(); -} - -Vertex_ptr Document_impl::getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _document_cpp->getVertex(i); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - - -Vertex_ptr Document_impl::findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _document_cpp->findVertex( x, y, z); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - -// ======================================================== addEdge -Edge_ptr Document_impl::addEdge(Vertex_ptr v0In, Vertex_ptr v1In) - throw(SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - Vertex_impl* v0InServant = ::DownCast( v0In ); - Vertex_impl* v1InServant = ::DownCast( v1In ); - ASSERT( v0InServant ); - ASSERT( v1InServant ); - if ( v0InServant && v1InServant ) { - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vertex* v1 = v1InServant->GetImpl(); - HEXA_NS::Edge* e = _document_cpp->addEdge( v0, v1 ); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - } - return result; -} -// ======================================================== addEdgeVector -Edge_ptr Document_impl::addEdgeVector (Vertex_ptr v0In, Vector_ptr w1In) - throw(SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - Vertex_impl* v0InServant = ::DownCast( v0In ); - Vector_impl* w1InServant = ::DownCast( w1In ); - ASSERT( v0InServant ); - ASSERT( w1InServant ); - if ( v0InServant && w1InServant ) { - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vector* w1 = w1InServant->GetImpl(); - HEXA_NS::Edge* e = _document_cpp->addEdgeVector ( v0, w1 ); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - } - return result; -} - - -::CORBA::Long Document_impl::countEdge() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countEdge(); -} - -Edge_ptr Document_impl::getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - HEXA_NS::Edge* e = _document_cpp->getEdge(i); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Edge_ptr Document_impl::findEdge(Vertex_ptr p0In, Vertex_ptr p1In) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - Vertex_impl* p0InServant = ::DownCast( p0In ); - Vertex_impl* p1InServant = ::DownCast( p1In ); - ASSERT( p0InServant ); - ASSERT( p1InServant ); - - if ( p0InServant && p1InServant ) { - HEXA_NS::Vertex* p0 = p0InServant->GetImpl(); - HEXA_NS::Vertex* p1 = p1InServant->GetImpl(); - HEXA_NS::Edge* e = _document_cpp->findEdge( p0, p1 ); - - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - } - return result; -} - - -Quad_ptr Document_impl::addQuad(Edge_ptr e0In, Edge_ptr e1In, Edge_ptr e2In, Edge_ptr e3In) -throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - Edge_impl* e0InServant = ::DownCast( e0In ); - Edge_impl* e1InServant = ::DownCast( e1In ); - Edge_impl* e2InServant = ::DownCast( e2In ); - Edge_impl* e3InServant = ::DownCast( e3In ); - ASSERT( e0InServant ); - ASSERT( e1InServant ); - ASSERT( e2InServant ); - ASSERT( e3InServant ); - if ( e0InServant && e1InServant && e2InServant && e3InServant) { - HEXA_NS::Edge* e0 = e0InServant->GetImpl(); - HEXA_NS::Edge* e1 = e1InServant->GetImpl(); - HEXA_NS::Edge* e2 = e2InServant->GetImpl(); - HEXA_NS::Edge* e3 = e3InServant->GetImpl(); - HEXA_NS::Quad* q = _document_cpp->addQuad( e0, e1, e2, e3 ); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - } - return result; -} - -Quad_ptr Document_impl::addQuadVertices( Vertex_ptr v0In, Vertex_ptr v1In, - Vertex_ptr v2In, Vertex_ptr v3In ) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - Vertex_impl* v0InServant = ::DownCast( v0In ); - Vertex_impl* v1InServant = ::DownCast( v1In ); - Vertex_impl* v2InServant = ::DownCast( v2In ); - Vertex_impl* v3InServant = ::DownCast( v3In ); - ASSERT( v0InServant ); - ASSERT( v1InServant ); - ASSERT( v2InServant ); - ASSERT( v3InServant ); - - if ( v0InServant && v1InServant && v2InServant && v3InServant) { - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vertex* v1 = v1InServant->GetImpl(); - HEXA_NS::Vertex* v2 = v2InServant->GetImpl(); - HEXA_NS::Vertex* v3 = v3InServant->GetImpl(); - HEXA_NS::Quad* q = _document_cpp->addQuadVertices( v0, v1, v2, v3 ); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - } - return result; -} - -::CORBA::Long Document_impl::countQuad() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countQuad(); -} - -Quad_ptr Document_impl::getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - HEXA_NS::Quad* q = _document_cpp->getQuad(i); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - -Quad_ptr Document_impl::findQuad(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - Vertex_impl* p0InServant = ::DownCast( p0In ); - Vertex_impl* p1InServant = ::DownCast( p1In ); - ASSERT( p0InServant ); - ASSERT( p1InServant ); - - if ( p0InServant && p1InServant ) { - HEXA_NS::Vertex* p0 = p0InServant->GetImpl(); - HEXA_NS::Vertex* p1 = p1InServant->GetImpl(); - - HEXA_NS::Quad* q = _document_cpp->findQuad( p0, p1 ); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - } - return result; -} - - -Hexa_ptr Document_impl::addHexa(Quad_ptr q0In, Quad_ptr q1In, Quad_ptr q2In, Quad_ptr q3In, Quad_ptr q4In, Quad_ptr q5In) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Quad_impl* q0InServant = ::DownCast( q0In ); - Quad_impl* q1InServant = ::DownCast( q1In ); - Quad_impl* q2InServant = ::DownCast( q2In ); - Quad_impl* q3InServant = ::DownCast( q3In ); - Quad_impl* q4InServant = ::DownCast( q4In ); - Quad_impl* q5InServant = ::DownCast( q5In ); - - ASSERT( q0InServant ); - ASSERT( q1InServant ); - ASSERT( q2InServant ); - ASSERT( q3InServant ); - ASSERT( q4InServant ); - ASSERT( q5InServant ); - - if ( q0InServant && q1InServant && q2InServant && q3InServant - && q4InServant && q5InServant ){ - HEXA_NS::Quad* q0 = q0InServant->GetImpl(); - HEXA_NS::Quad* q1 = q1InServant->GetImpl(); - HEXA_NS::Quad* q2 = q2InServant->GetImpl(); - HEXA_NS::Quad* q3 = q3InServant->GetImpl(); - HEXA_NS::Quad* q4 = q4InServant->GetImpl(); - HEXA_NS::Quad* q5 = q5InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->addHexa( q0, q1, q2, q3, q4, q5 ); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - return result; -} - - - -Hexa_ptr Document_impl::addHexaVertices( Vertex_ptr v0In, Vertex_ptr v1In, Vertex_ptr v2In, Vertex_ptr v3In, Vertex_ptr v4In, Vertex_ptr v5In, Vertex_ptr v6In, Vertex_ptr v7In ) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Vertex_impl* v0InServant = ::DownCast( v0In ); - Vertex_impl* v1InServant = ::DownCast( v1In ); - Vertex_impl* v2InServant = ::DownCast( v2In ); - Vertex_impl* v3InServant = ::DownCast( v3In ); - Vertex_impl* v4InServant = ::DownCast( v4In ); - Vertex_impl* v5InServant = ::DownCast( v5In ); - Vertex_impl* v6InServant = ::DownCast( v6In ); - Vertex_impl* v7InServant = ::DownCast( v7In ); - ASSERT( v0InServant ); - ASSERT( v1InServant ); - ASSERT( v2InServant ); - ASSERT( v3InServant ); - ASSERT( v4InServant ); - ASSERT( v5InServant ); - ASSERT( v6InServant ); - ASSERT( v7InServant ); - - if ( v0InServant && v1InServant && v2InServant && v3InServant - && v4InServant && v5InServant && v6InServant && v7InServant ){ - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vertex* v1 = v1InServant->GetImpl(); - HEXA_NS::Vertex* v2 = v2InServant->GetImpl(); - HEXA_NS::Vertex* v3 = v3InServant->GetImpl(); - HEXA_NS::Vertex* v4 = v4InServant->GetImpl(); - HEXA_NS::Vertex* v5 = v5InServant->GetImpl(); - HEXA_NS::Vertex* v6 = v6InServant->GetImpl(); - HEXA_NS::Vertex* v7 = v7InServant->GetImpl(); - - HEXA_NS::Hexa* h = _document_cpp->addHexaVertices( v0, v1, v2, v3, v4, v5, v6, v7 ); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - return result; -} - - - -::CORBA::Long Document_impl::countHexa() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countHexa(); -} - -Hexa_ptr Document_impl::getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - HEXA_NS::Hexa* h = _document_cpp->getHexa(i); - if ( h!= NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - return result; -} - - -Hexa_ptr Document_impl::findHexa(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Vertex_impl* v0InServant = ::DownCast( p0In ); - Vertex_impl* v1InServant = ::DownCast( p1In ); - ASSERT( v0InServant ); - ASSERT( v1InServant ); - - if ( v0InServant && v1InServant ) { - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vertex* v1 = v1InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->findHexa( v0, v1 ); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - return result; -} - -Vector_ptr Document_impl::addVector( ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz ) - throw(SALOME::SALOME_Exception) -{ - Vector_ptr result = Vector::_nil(); - HEXA_NS::Vector* v = _document_cpp->addVector( dx, dy, dz ); - - if ( v != NULL ){ - Vector_impl* servantCorba = new Vector_impl(v); - result = servantCorba->_this(); - } - return result; -} - -Vector_ptr Document_impl::addVectorVertices( Vertex_ptr v0In, Vertex_ptr v1In ) - throw(SALOME::SALOME_Exception) -{ - Vector_ptr result = Vector::_nil(); - - Vertex_impl* v0InServant = ::DownCast( v0In ); - Vertex_impl* v1InServant = ::DownCast( v1In ); - ASSERT( v0InServant ); - ASSERT( v1InServant ); - - if ( v0InServant && v1InServant ) { - HEXA_NS::Vertex* v0 = v0InServant->GetImpl(); - HEXA_NS::Vertex* v1 = v1InServant->GetImpl(); - HEXA_NS::Vector* v = _document_cpp->addVectorVertices( v0, v1 ); - if ( v != NULL ){ - Vector_impl* servantCorba = new Vector_impl(v); - result = servantCorba->_this(); - } - } - return result; -} - - -::CORBA::Long Document_impl::countVector() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countVector(); -} - -Vector_ptr Document_impl::getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - HEXA_NS::Vector* h = _document_cpp->getVector(i); - Vector_impl* servantCorba = new Vector_impl(h); - return servantCorba->_this(); -} - - -Cylinder_ptr Document_impl::addCylinder( Vertex_ptr baseIn, Vector_ptr directionIn, - ::CORBA::Double radius, ::CORBA::Double height) -throw (SALOME::SALOME_Exception) -{ - Cylinder_ptr result = Cylinder::_nil(); - - Vertex_impl* baseServant = ::DownCast( baseIn ); - Vector_impl* directionServant = ::DownCast( directionIn ); - ASSERT( baseServant ); - ASSERT( directionServant ); - - if ( baseServant && directionServant ) { - HEXA_NS::Vertex* base = baseServant->GetImpl(); - HEXA_NS::Vector* direction = directionServant->GetImpl(); - HEXA_NS::Cylinder* c = _document_cpp->addCylinder( base, direction, radius, height ); - if ( c!= NULL ){ - Cylinder_impl* servantCorba = new Cylinder_impl(c); - result = servantCorba->_this(); - } - } - - return result; -} - -::CORBA::Long Document_impl::countCylinder() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countCylinder(); -} - -Cylinder_ptr Document_impl::getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - HEXA_NS::Cylinder* c = _document_cpp->getCylinder(i); - Cylinder_impl* servantCorba = new Cylinder_impl(c); - return servantCorba->_this(); -} - - -Pipe_ptr Document_impl::addPipe( Vertex_ptr baseIn, Vector_ptr directionIn, - ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height) -throw (SALOME::SALOME_Exception) -{ - Pipe_ptr result = Pipe::_nil(); - - Vertex_impl* baseServant = ::DownCast( baseIn ); - Vector_impl* directionServant = ::DownCast( directionIn ); - ASSERT( baseServant ); - ASSERT( directionServant ); - - if ( baseServant && directionServant ) { - HEXA_NS::Vertex* base = baseServant->GetImpl(); - HEXA_NS::Vector* direction = directionServant->GetImpl(); - HEXA_NS::Pipe* c = _document_cpp->addPipe( base, direction, int_radius, ext_radius, height ); - if ( c!= NULL ){ - Pipe_impl* servantCorba = new Pipe_impl(c); - result = servantCorba->_this(); - } - } - - return result; -} - - -::CORBA::Long Document_impl::countPipe() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countPipe(); -} - -Pipe_ptr Document_impl::getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - HEXA_NS::Pipe* p = _document_cpp->getPipe(i); - Pipe_impl* servantCorba = new Pipe_impl(p); - return servantCorba->_this(); -} - -::CORBA::Boolean Document_impl::removeHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception) -{ - Hexa_impl* hServant = ::DownCast( hIn ); - ASSERT( hServant ); - - if ( hServant ) { - HEXA_NS::Hexa* h = hServant->GetImpl(); - int ok = _document_cpp->removeHexa(h); - if ( ok == HOK ) - return true; - else - return false; - } -} - - -::CORBA::Boolean Document_impl::removeConnectedHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception) -{ - Hexa_impl* hServant = ::DownCast( hIn ); - ASSERT( hServant ); - - if ( hServant ) { - HEXA_NS::Hexa* h = hServant->GetImpl(); - int ok = _document_cpp->removeConnectedHexa(h); - if ( ok == HOK ) - return true; - else - return false; - } -} - - -Elements_ptr Document_impl::makeCartesian( Vertex_ptr ptIn, - Vector_ptr vxIn, Vector_ptr vyIn, Vector_ptr vzIn, - ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* ptInServant = ::DownCast( ptIn); - Vector_impl* vxInServant = ::DownCast( vxIn ); - Vector_impl* vyInServant = ::DownCast( vyIn ); - Vector_impl* vzInServant = ::DownCast( vzIn ); - ASSERT( ptInServant ); - ASSERT( vxInServant ); - ASSERT( vyInServant ); - ASSERT( vzInServant ); - - if ( ptInServant && vxInServant && vyInServant && vzInServant ){ - HEXA_NS::Vertex* pt = ptInServant->GetImpl(); - HEXA_NS::Vector* vx = vxInServant->GetImpl(); - HEXA_NS::Vector* vy = vyInServant->GetImpl(); - HEXA_NS::Vector* vz = vzInServant->GetImpl(); - - HEXA_NS::Elements* grid = _document_cpp->makeCartesian( - pt, - vx, vy, vz, - nx, ny, nz ); - if ( grid != NULL ){ - Elements_impl* servantCorba = new Elements_impl(grid); - result = servantCorba->_this(); - } - } - return result; - -} - - - -Elements_ptr Document_impl::makeCartesian1( - Vertex_ptr vxIn, - Vector_ptr vr1In, - ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz, - ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz ) - throw(SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* vxInServant = ::DownCast( vxIn ); - Vector_impl* vr1InServant = ::DownCast( vr1In ); - ASSERT( vxInServant ); - ASSERT( vr1InServant ); - - if ( vxInServant && vr1InServant ){ - HEXA_NS::Vertex* vx = vxInServant->GetImpl(); - HEXA_NS::Vector* vr1 = vr1InServant->GetImpl(); - - HEXA_NS::Elements* grid = _document_cpp->makeCartesian( - vx, - vr1, - px, py, pz, - mx, my, mz ); - - if ( grid != NULL ){ - Elements_impl* servantCorba = new Elements_impl(grid); - result = servantCorba->_this(); - } - } - return result; -} - - -Elements_ptr Document_impl::makeCylindrical( Vertex_ptr ptIn, - Vector_ptr vexIn, Vector_ptr vezIn, - ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl, - ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl, - ::CORBA::Boolean fill) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* ptServant = ::DownCast( ptIn ); - Vector_impl* vexServant = ::DownCast( vexIn ); - Vector_impl* vezServant = ::DownCast( vezIn ); - ASSERT( ptServant ); - ASSERT( vexServant ); - ASSERT( vezServant ); - - if ( ptServant && vexServant && vezServant) { - HEXA_NS::Vertex* pt = ptServant->GetImpl(); - HEXA_NS::Vector* vex = vexServant->GetImpl(); - HEXA_NS::Vector* vez = vezServant->GetImpl(); - HEXA_NS::Elements* grid = _document_cpp->makeCylindrical( pt, - vex, vez, - dr, da, dl, nr, na, nl, fill ); - if ( grid != NULL ){ - Elements_impl* servantCorba = new Elements_impl(grid); - result = servantCorba->_this(); - } - } - return result; -} - -// =================================================== makeCylindricals -Elements_ptr Document_impl::makeCylindricals (Vertex_ptr ptin, - Vector_ptr vexin, Vector_ptr vezin, - const RealVector& tdr, const RealVector& tda, const RealVector& tdl, - ::CORBA::Boolean fill) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* ptServant = ::DownCast( ptin ); - Vector_impl* vexServant = ::DownCast( vexin ); - Vector_impl* vezServant = ::DownCast( vezin ); - - ASSERT( ptServant ); - ASSERT( vexServant ); - ASSERT( vezServant ); - - if ( ptServant==NULL || vexServant == NULL || vezServant== NULL ) - return result; - - std::vector cdr, cda, cdl; - for ( int nro = 0; nro < tdr.length(); nro++) - cdr.push_back (tdr[nro]); - - for ( int nro = 0; nro < tda.length(); nro++) - cda.push_back (tda[nro]); - - for ( int nro = 0; nro < tdl.length(); nro++) - cdl.push_back (tdl[nro]); - - HEXA_NS::Vertex* pt = ptServant->GetImpl(); - HEXA_NS::Vector* vex = vexServant->GetImpl(); - HEXA_NS::Vector* vez = vezServant->GetImpl(); - HEXA_NS::Elements* grid = _document_cpp->makeCylindricals ( pt, vex, vez, - cdr, cda, cdl, fill ); - if ( grid != NULL ) - { - Elements_impl* servantCorba = new Elements_impl (grid); - result = servantCorba->_this(); - } - - return result; -} - - - -// Elements_ptr Document_impl::makeSpherical( Vertex_ptr ptIn, -// ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz, -// ::CORBA::Long n) -// throw (SALOME::SALOME_Exception) -// { -// Vertex_impl* ptServant = ::DownCast( ptIn ); -// ASSERT( ptServant ); -// -// if ( ptServant ) { -// HEXA_NS::Vertex* pt = ptServant->GetImpl(); -// HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt, dx, dy, dz, n ); -// Elements_impl* servantCorba = new Elements_impl(l); -// return servantCorba->_this(); -// } -// } - -Elements_ptr Document_impl::makeSpherical( - Vertex_ptr ptIn, - ::CORBA::Double rayon, - ::CORBA::Long n, - ::CORBA::Double k ) - throw (SALOME::SALOME_Exception) //CS_TODO -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* ptServant = ::DownCast( ptIn ); - ASSERT( ptServant ); - - if ( ptServant ) { - HEXA_NS::Vertex* pt = ptServant->GetImpl(); - HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt, rayon, n, k ); - if ( l != NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - return result; -} - - - - - - -// Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) -Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, Vector_ptr vrIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Cylinder_impl* cylServant = ::DownCast( cylIn ); - Vector_impl* vrServant = ::DownCast( vrIn ); - ASSERT( cylServant ); - ASSERT( vrServant ); - - if ( cylServant && vrServant ) { - HEXA_NS::Cylinder* cyl = cylServant->GetImpl(); - HEXA_NS::Vector* vr = vrServant->GetImpl(); - HEXA_NS::Elements* l = _document_cpp->makeCylinder( cyl, vr, nr, na, nl ); - if ( l != NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - return result; -} - -Elements_ptr Document_impl::makePipe( Pipe_ptr pIn, Vector_ptr vrIn, - ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) - throw (SALOME::SALOME_Exception) -{ - Pipe_impl* pServant = ::DownCast( pIn ); - Vector_impl* vrServant = ::DownCast( vrIn ); - ASSERT( pServant ); - - if ( pServant ) { - HEXA_NS::Pipe* p = pServant ->GetImpl(); - HEXA_NS::Vector* vr = vrServant->GetImpl(); - HEXA_NS::Elements* l = _document_cpp->makePipe( p, vr, nr, na, nl ); - Elements_impl* servantCorba = new Elements_impl(l); - return servantCorba->_this(); - } -} - - -CrossElements_ptr Document_impl::makeCylinders(Cylinder_ptr c1In, Cylinder_ptr c2In) - throw (SALOME::SALOME_Exception) -{ - CrossElements_ptr result = CrossElements::_nil(); - - Cylinder_impl* c1Servant = ::DownCast( c1In ); - Cylinder_impl* c2Servant = ::DownCast( c2In ); - ASSERT( c1Servant ); - ASSERT( c2Servant ); - - if ( c1Servant && c2Servant ) { - HEXA_NS::Cylinder* c1= c1Servant->GetImpl(); - HEXA_NS::Cylinder* c2= c2Servant->GetImpl(); - - HEXA_NS::CrossElements* l = _document_cpp->makeCylinders(c1,c2); - if (l != NULL ){ - CrossElements_impl* servantCorba = new CrossElements_impl(l); - result = servantCorba->_this(); - } - } - return result; -} - -CrossElements_ptr Document_impl::makePipes( Pipe_ptr p1In, Pipe_ptr p2In) - throw (SALOME::SALOME_Exception) -{ - Pipe_impl* p1Servant = ::DownCast( p1In ); - Pipe_impl* p2Servant = ::DownCast( p2In ); - ASSERT( p1Servant ); - ASSERT( p2Servant ); - - if ( p1Servant && p2Servant ) { - HEXA_NS::Pipe* p1= p1Servant->GetImpl(); - HEXA_NS::Pipe* p2= p2Servant->GetImpl(); - - HEXA_NS::CrossElements* l = _document_cpp->makePipes( p1, p2); - CrossElements_impl* servantCorba = new CrossElements_impl(l); - return servantCorba->_this(); - } -} - - - -Elements_ptr Document_impl::prismQuad(Quad_ptr qdIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Quad_impl* qServant = ::DownCast( qdIn ); - Vector_impl* vServant = ::DownCast( vIn ); - ASSERT( qServant ); - ASSERT( vServant); - - if ( qServant && vServant ) { - HEXA_NS::Quad* qd = qServant->GetImpl(); - HEXA_NS::Vector* v = vServant->GetImpl(); - - HEXA_NS::Elements* l = _document_cpp->prismQuad(qd, v, nb); - if ( l!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - - return result; -} - - -//CS_Bruno - -// // loop on meshes -// for ( int i = 0; i < theMeshesArray.length(); i++) { -// SMESH::SMESH_Mesh_var anInitMesh = theMeshesArray[i]; -// if ( !anInitMesh->_is_nil() ) { -// SMESH_Mesh_i* anInitImpl = dynamic_cast( GetServant( anInitMesh ).in() ); -// if ( anInitImpl ) { -// ::SMESH_Mesh& aInitLocMesh = anInitImpl->GetImpl(); - -Elements_ptr Document_impl::prismQuads(const Quads& qdsIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - HEXA_NS::Quads qds; - for ( int i = 0; i < qdsIn.length(); i++) { - Quad_impl* qServant = ::DownCast( qdsIn[i] ); - ASSERT( qServant ); - HEXA_NS::Quad* qd = qServant->GetImpl(); - qds.push_back(qd); - } - - Vector_impl* vServant = ::DownCast( vIn ); - ASSERT( vServant); - - if ( vServant ) { - HEXA_NS::Vector* v = vServant->GetImpl(); - HEXA_NS::Elements* l = _document_cpp->prismQuads(qds, v, nb); - if ( l!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - - return result; -} - - -Elements_ptr Document_impl::joinQuad(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Quad_impl* qaServant = ::DownCast( qaIn ); - Quad_impl* qbServant = ::DownCast( qbIn ); - - Vertex_impl* va1Servant = ::DownCast( va1In ); - Vertex_impl* vb1Servant = ::DownCast( vb1In ); - Vertex_impl* va2Servant = ::DownCast( va2In ); - Vertex_impl* vb2Servant = ::DownCast( vb2In ); - - ASSERT( qaServant ); - ASSERT( qbServant ); - ASSERT( va1Servant ); - ASSERT( vb1Servant ); - ASSERT( va2Servant ); - ASSERT( vb2Servant ); - - if ( qaServant && qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ){ - HEXA_NS::Quad* qa = qaServant->GetImpl(); - HEXA_NS::Quad* qb = qbServant->GetImpl(); - HEXA_NS::Vertex* va1 = va1Servant->GetImpl(); - HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl(); - HEXA_NS::Vertex* va2 = va2Servant->GetImpl(); - HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl(); - - HEXA_NS::Elements* l = _document_cpp->joinQuad(qa, qb, va1, vb1, va2, vb2, nb); - if ( l!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - - return result; -} - - - -Elements_ptr Document_impl::joinQuads(const Quads& qdsIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Quad_impl* qbServant = ::DownCast( qbIn ); - Vertex_impl* va1Servant = ::DownCast( va1In ); - Vertex_impl* vb1Servant = ::DownCast( vb1In ); - Vertex_impl* va2Servant = ::DownCast( va2In ); - Vertex_impl* vb2Servant = ::DownCast( vb2In ); - - ASSERT( qbServant ); - ASSERT( va1Servant ); - ASSERT( vb1Servant ); - ASSERT( va2Servant ); - ASSERT( vb2Servant ); - - if ( qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ) { - HEXA_NS::Quad* qb = qbServant->GetImpl(); - HEXA_NS::Vertex* va1 = va1Servant->GetImpl(); - HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl(); - HEXA_NS::Vertex* va2 = va2Servant->GetImpl(); - HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl(); - - HEXA_NS::Quads qds; - for ( int i = 0; i < qdsIn.length(); i++) { - Quad_impl* qServant = ::DownCast( qdsIn[i] ); - ASSERT( qServant ); - HEXA_NS::Quad* qd = qServant->GetImpl(); - qds.push_back(qd); - } - - HEXA_NS::Elements* l = _document_cpp->joinQuads(qds, qb, va1, vb1, va2, vb2, nb); - if ( l!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(l); - result = servantCorba->_this(); - } - } - - return result; -} - - - - - - -::CORBA::Long Document_impl::mergeQuads(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In) throw (SALOME::SALOME_Exception) -{ - Quad_impl* qaServant = ::DownCast( qaIn ); - Quad_impl* qbServant = ::DownCast( qbIn ); - - Vertex_impl* va1Servant = ::DownCast( va1In ); - Vertex_impl* vb1Servant = ::DownCast( vb1In ); - Vertex_impl* va2Servant = ::DownCast( va2In ); - Vertex_impl* vb2Servant = ::DownCast( vb2In ); - - ASSERT( qaServant ); - ASSERT( qbServant ); - // ASSERT( va1Servant ); Controle supprime Abu - // ASSERT( vb1Servant ); - // ASSERT( va2Servant ); - // ASSERT( vb2Servant ); - - if ( qaServant && qbServant) - { - HEXA_NS::Vertex* va1 = NULL; - HEXA_NS::Vertex* vb1 = NULL; - HEXA_NS::Vertex* va2 = NULL; - HEXA_NS::Vertex* vb2 = NULL; - - if (va1Servant && vb1Servant && va2Servant && vb2Servant ) - { - va1 = va1Servant->GetImpl(); - vb1 = vb1Servant->GetImpl(); - va2 = va2Servant->GetImpl(); - vb2 = vb2Servant->GetImpl(); - } - - HEXA_NS::Quad* qa = qaServant->GetImpl(); - HEXA_NS::Quad* qb = qbServant->GetImpl(); - - return _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2); -// HEXA_NS::Elements* l = _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2); -// Elements_impl* servantCorba = new Elements_impl(l); -// return servantCorba->_this(); - } -} - - - -::CORBA::Long Document_impl::mergeEdges(Edge_ptr e1In, Edge_ptr e2In, Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception) -{ - Edge_impl* e1Servant = ::DownCast( e1In ); - Edge_impl* e2Servant = ::DownCast( e2In ); - - Vertex_impl* v1Servant = ::DownCast( v1In ); - Vertex_impl* v2Servant = ::DownCast( v2In ); - - ASSERT( e1Servant ); - ASSERT( e2Servant ); - ASSERT( v1Servant ); - ASSERT( v2Servant ); - - if ( e1Servant && e2Servant && v1Servant && v2Servant ){ - HEXA_NS::Edge* e1 = e1Servant->GetImpl(); - HEXA_NS::Edge* e2 = e2Servant->GetImpl(); - - HEXA_NS::Vertex* v1 = v1Servant->GetImpl(); - HEXA_NS::Vertex* v2 = v2Servant->GetImpl(); - -// HEXA_NS::Elements* l = _document_cpp->mergeEdges(e1, e2, v1, v2); -// Elements_impl* servantCorba = new Elements_impl(l); -// return servantCorba->_this(); - - return _document_cpp->mergeEdges(e1, e2, v1, v2); - } -} - -::CORBA::Long Document_impl::mergeVertices(Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception) -{ - Vertex_impl* v1Servant = ::DownCast( v1In ); - Vertex_impl* v2Servant = ::DownCast( v2In ); - - ASSERT( v1Servant ); - ASSERT( v2Servant ); - - if ( v1Servant && v2Servant ){ - HEXA_NS::Vertex* v1 = v1Servant->GetImpl(); - HEXA_NS::Vertex* v2 = v2Servant->GetImpl(); - -// HEXA_NS::Elements* l = _document_cpp->mergeVertices(v1, v2); -// Elements_impl* servantCorba = new Elements_impl(l); -// return servantCorba->_this(); - return _document_cpp->mergeVertices(v1, v2); - } -} - - -Elements_ptr Document_impl::disconnectQuad(Hexa_ptr hexIn, Quad_ptr quadIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); -// Quad_ptr result = Quad::_nil(); - Hexa_impl* hServant = ::DownCast( hexIn ); - Quad_impl* qServant = ::DownCast( quadIn ); - - ASSERT( hServant ); - ASSERT( qServant ); - - if ( hServant && qServant ){ - HEXA_NS::Hexa* h = hServant->GetImpl(); - HEXA_NS::Quad* q = qServant->GetImpl(); - - HEXA_NS::Elements* elements = _document_cpp->disconnectQuad(h, q); - if (elements != NULL ){ - Elements_impl* servantCorba = new Elements_impl(elements); - result = servantCorba->_this(); - } - } - return result; -} - -Elements_ptr Document_impl::disconnectEdge(Hexa_ptr hexIn, Edge_ptr edgeIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Hexa_impl* hServant = ::DownCast( hexIn ); - Edge_impl* eServant = ::DownCast( edgeIn ); - - ASSERT( hServant ); - ASSERT( eServant ); - - if ( hServant && eServant ){ - HEXA_NS::Hexa* h = hServant->GetImpl(); - HEXA_NS::Edge* e = eServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->disconnectEdge(h, e); - if ( r!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} - -Elements_ptr Document_impl::disconnectVertex(Hexa_ptr hexIn, Vertex_ptr vxIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Hexa_impl* hServant = ::DownCast( hexIn ); - Vertex_impl* vServant = ::DownCast( vxIn ); - - ASSERT( hServant ); - ASSERT( vServant ); - - if ( hServant && vServant ){ - HEXA_NS::Hexa* h = hServant->GetImpl(); - HEXA_NS::Vertex* v = vServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->disconnectVertex(h, v); - if ( r!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - - return result; -} -// ====================================================== disconnectEdges -Elements_ptr Document_impl::disconnectEdges (const Hexas& hexas_in, - const Edges& edges_in) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - std::vector tab_hexas; - for (int i = 0; i < hexas_in.length(); i++) - { - Hexa_impl* im_hexa = ::DownCast ( hexas_in[i] ); - ASSERT( im_hexa ); - HEXA_NS::Hexa* un_hexa = im_hexa->GetImpl(); - tab_hexas.push_back (un_hexa); - } - - std::vector tab_edges; - for (int i = 0; i < edges_in.length(); i++) - { - Edge_impl* im_edge = ::DownCast ( edges_in[i] ); - ASSERT( im_edge ); - HEXA_NS::Edge* un_edge = im_edge->GetImpl(); - tab_edges.push_back (un_edge); - } - - HEXA_NS::Elements* r = _document_cpp->disconnectEdges (tab_hexas, tab_edges); - - if ( r!= NULL ) - { - Elements_impl* servantCorba = new Elements_impl (r); - result = servantCorba->_this(); - } - - return result; -} -// ====================================================== cut -Elements_ptr Document_impl::cut(Edge_ptr eIn, ::CORBA::Long nb_of_cuts) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Edge_impl* eServant = ::DownCast( eIn ); - ASSERT( eServant ); - - if ( eServant ){ - HEXA_NS::Edge* e = eServant->GetImpl(); - HEXA_NS::Elements* r = _document_cpp->cut(e, nb_of_cuts); - if ( r!= NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - - return result; -} - - -Elements_ptr Document_impl::makeTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast( lIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - ASSERT( lServant ); - ASSERT( vecServant ); - - if ( lServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeTranslation(l, vec); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} - - -Elements_ptr Document_impl::makeRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeRotation(l, p, vec, angle); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} -void Document_impl::performTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( vecServant ); - - if ( lServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - _document_cpp->performTranslation(l, vec); - } -} - - -void Document_impl::performRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - _document_cpp->performRotation(l, p, vec, angle); - } -} - -Group_ptr Document_impl::addHexaGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaCell ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -Group_ptr Document_impl::addQuadGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadCell ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - -Group_ptr Document_impl::addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeCell ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -Group_ptr Document_impl::addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaNode ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - -Group_ptr Document_impl::addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadNode ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -Group_ptr Document_impl::addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeNode ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - -Group_ptr Document_impl::addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::VertexNode ); - if ( g != NULL ){ - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -::CORBA::Long Document_impl::removeGroup(Group_ptr gIn) throw (SALOME::SALOME_Exception) -{ - Group_impl* gInServant = ::DownCast( gIn ); - ASSERT( gInServant ); - - if ( gInServant ) { - HEXA_NS::Group* g = gInServant->GetImpl(); - int ok = _document_cpp->removeGroup(g); - return ok; - } -} - -::CORBA::Long Document_impl::countGroup() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countGroup(); -} - - -Group_ptr Document_impl::getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->getGroup(i); - if ( g != NULL ){ //CS_TODO - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -Group_ptr Document_impl::findGroup(const char* name) throw (SALOME::SALOME_Exception) -{ - Group_ptr result = Group::_nil(); - HEXA_NS::Group* g = _document_cpp->findGroup(name); - if ( g != NULL ){ //CS_TODO - Group_impl* servantCorba = new Group_impl(g); - result = servantCorba->_this(); - } - return result; -} - - -Law_ptr Document_impl::addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception) -{ - Law_ptr result = Law::_nil(); - - HEXA_NS::Law* l = _document_cpp->addLaw(name, nb_nodes); - if ( l != NULL ){ - Law_impl* servantCorba = new Law_impl(l); - result = servantCorba->_this(); - } - - return result; -} - - -::CORBA::Long Document_impl::countLaw() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countLaw(); -} - -Law_ptr Document_impl::getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Law_ptr result = Law::_nil(); - - HEXA_NS::Law* l = _document_cpp->getLaw(i); - if ( l != NULL ){ - Law_impl* servantCorba = new Law_impl(l); - result = servantCorba->_this(); - } - return result; -} - - -void Document_impl::removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception) -{ - Law_impl* lServant = ::DownCast(l); - ASSERT( lServant ); - if ( lServant ) { - HEXA_NS::Law* l = lServant->GetImpl(); - _document_cpp->removeLaw(l); - } -} - - - -Law_ptr Document_impl::findLaw(const char* name) throw (SALOME::SALOME_Exception) -{ - Law_ptr result = Law::_nil(); - - HEXA_NS::Law* l = _document_cpp->findLaw(name); - if ( l != NULL ){ - Law_impl* servantCorba = new Law_impl(l); - result = servantCorba->_this(); - } - - return result; -} - - -::CORBA::Long Document_impl::countPropagation() throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countPropagation(); -} - - -Propagation_ptr Document_impl::getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception) -{ - Propagation_ptr result = Propagation::_nil(); - - HEXA_NS::Propagation* p = _document_cpp->getPropagation(i); -// //CS_Test -// -// const HEXA_NS::Edges& edges_cpp = p->getEdges(); -// -// // HEXA_NS::Edges::const_iterator itertest = edges_cpp.begin(); -// // itertest != edges_cpp.end(); -// for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin(); -// iter != edges_cpp.end(); -// ++iter ){ -// *iter; -// } -// //CS_Test - - if ( p != NULL ){ - Propagation_impl* servantCorba = new Propagation_impl(p); - result = servantCorba->_this(); - } - return result; -} - -Propagation_ptr Document_impl::findPropagation(Edge_ptr eIn) throw (SALOME::SALOME_Exception) -{ - Propagation_ptr result = Propagation::_nil(); - - Edge_impl* eServant = ::DownCast( eIn ); - ASSERT( eServant ); - - if ( eServant ) { - HEXA_NS::Edge* e= eServant->GetImpl(); - - HEXA_NS::Propagation* p = _document_cpp->findPropagation(e); - if ( p != NULL ){ - Propagation_impl* servantCorba = new Propagation_impl(p); - result = servantCorba->_this(); - } - } - - return result; -} -// ===================================================== getName -char* Document_impl::getName () throw (SALOME::SALOME_Exception) -{ - const char* name = _document_cpp->getName(); - return CORBA::string_dup (name); -} -// ===================================================== countUsedVertex -::CORBA::Long Document_impl::countUsedVertex() - throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countUsedVertex(); -} -// ===================================================== getUsedVertex -Vertex_ptr Document_impl::getUsedVertex(::CORBA::Long i) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _document_cpp->getUsedVertex(i); - if ( v != NULL ) - { - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} -// ===================================================== countUsedEdge -::CORBA::Long Document_impl::countUsedEdge() - throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countUsedEdge(); -} -// ===================================================== getUsedEdge -Edge_ptr Document_impl::getUsedEdge(::CORBA::Long i) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - HEXA_NS::Edge* v = _document_cpp->getUsedEdge(i); - if ( v != NULL ) - { - Edge_impl* servantCorba = new Edge_impl(v); - result = servantCorba->_this(); - } - return result; -} -// ===================================================== countUsedQuad -::CORBA::Long Document_impl::countUsedQuad() - throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countUsedQuad(); -} -// ===================================================== getUsedQuad -Quad_ptr Document_impl::getUsedQuad(::CORBA::Long i) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - HEXA_NS::Quad* v = _document_cpp->getUsedQuad(i); - if ( v != NULL ) - { - Quad_impl* servantCorba = new Quad_impl(v); - result = servantCorba->_this(); - } - return result; -} -// ===================================================== countUsedHexa -::CORBA::Long Document_impl::countUsedHexa() - throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countUsedHexa(); -} -// ===================================================== getUsedHexa -Hexa_ptr Document_impl::getUsedHexa(::CORBA::Long i) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - HEXA_NS::Hexa* v = _document_cpp->getUsedHexa(i); - if ( v != NULL ) - { - Hexa_impl* servantCorba = new Hexa_impl(v); - result = servantCorba->_this(); - } - return result; -} -// ===================================================== addHexa5Quads -Hexa_ptr Document_impl::addHexa5Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, - Quad_ptr q4, Quad_ptr q5) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Quad_impl* q1InServant = ::DownCast( q1 ); - Quad_impl* q2InServant = ::DownCast( q2 ); - Quad_impl* q3InServant = ::DownCast( q3 ); - Quad_impl* q4InServant = ::DownCast( q4 ); - Quad_impl* q5InServant = ::DownCast( q5 ); - - ASSERT( q1InServant ); - ASSERT( q2InServant ); - ASSERT( q3InServant ); - ASSERT( q4InServant ); - ASSERT( q5InServant ); - - if (q1InServant && q2InServant && q3InServant && q4InServant && q5InServant) - { - HEXA_NS::Quad* q1 = q1InServant->GetImpl(); - HEXA_NS::Quad* q2 = q2InServant->GetImpl(); - HEXA_NS::Quad* q3 = q3InServant->GetImpl(); - HEXA_NS::Quad* q4 = q4InServant->GetImpl(); - HEXA_NS::Quad* q5 = q5InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->addHexa5Quads (q1, q2, q3, q4, q5); - - if ( h != NULL ) - { - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - return result; -} -// ===================================================== addHexa4Quads -Hexa_ptr Document_impl::addHexa4Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, - Quad_ptr q4) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Quad_impl* q1InServant = ::DownCast( q1 ); - Quad_impl* q2InServant = ::DownCast( q2 ); - Quad_impl* q3InServant = ::DownCast( q3 ); - Quad_impl* q4InServant = ::DownCast( q4 ); - - ASSERT( q1InServant ); - ASSERT( q2InServant ); - ASSERT( q3InServant ); - ASSERT( q4InServant ); - - if (q1InServant && q2InServant && q3InServant && q4InServant) - { - HEXA_NS::Quad* q1 = q1InServant->GetImpl(); - HEXA_NS::Quad* q2 = q2InServant->GetImpl(); - HEXA_NS::Quad* q3 = q3InServant->GetImpl(); - HEXA_NS::Quad* q4 = q4InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->addHexa4Quads (q1, q2, q3, q4); - - if ( h != NULL ) - { - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - return result; -} -// ===================================================== addHexa3Quads -Hexa_ptr Document_impl::addHexa3Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Quad_impl* q1InServant = ::DownCast( q1 ); - Quad_impl* q2InServant = ::DownCast( q2 ); - Quad_impl* q3InServant = ::DownCast( q3 ); - - ASSERT( q1InServant ); - ASSERT( q2InServant ); - ASSERT( q3InServant ); - - if (q1InServant && q2InServant && q3InServant) - { - HEXA_NS::Quad* q1 = q1InServant->GetImpl(); - HEXA_NS::Quad* q2 = q2InServant->GetImpl(); - HEXA_NS::Quad* q3 = q3InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->addHexa3Quads (q1, q2, q3); - - if ( h != NULL ) - { - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - - return result; -} -// ===================================================== addHexa2Quads -Hexa_ptr Document_impl::addHexa2Quads (Quad_ptr q1, Quad_ptr q2) - throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - Quad_impl* q1InServant = ::DownCast( q1 ); - Quad_impl* q2InServant = ::DownCast( q2 ); - - ASSERT( q1InServant ); - ASSERT( q2InServant ); - - if (q1InServant && q2InServant) - { - HEXA_NS::Quad* q1 = q1InServant->GetImpl(); - HEXA_NS::Quad* q2 = q2InServant->GetImpl(); - HEXA_NS::Hexa* h = _document_cpp->addHexa2Quads (q1, q2); - - if ( h != NULL ) - { - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - } - - return result; -} - -// ===================================================== removeQuad -::CORBA::Boolean Document_impl::removeQuad(Quad_ptr quad) - throw (SALOME::SALOME_Exception) -{ - Quad_impl* hServant = ::DownCast( quad ); - ASSERT( hServant ); - - if ( hServant ) { - HEXA_NS::Quad* q = hServant->GetImpl(); - int ok = _document_cpp->removeQuad(q); - if ( ok == HOK ) - return true; - else - return false; - } -} -// ===================================================== removeElements -::CORBA::Boolean Document_impl::removeElements(Elements_ptr bloc) - throw (SALOME::SALOME_Exception) -{ - Elements_impl* hServant = ::DownCast( bloc ); - ASSERT( hServant ); - - if ( hServant ) { - HEXA_NS::Elements* q = hServant->GetImpl(); - int ok = _document_cpp->removeElements(q); - if ( ok == HOK ) - return true; - else - return false; - } -} -// ===================================================== revolutionQuads -Elements_ptr Document_impl::revolutionQuads (const Quads& start, - Vertex_ptr center, Vector_ptr axis, - const RealVector &angles) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vector_impl* v_axis = ::DownCast (axis); - Vertex_impl* v_center = ::DownCast (center); - - ASSERT (v_axis); - ASSERT (v_center); - - if (v_axis==NULL || v_center==NULL) - return result; - - HEXA_NS::Quads t_start; - for ( int nq = 0; nq < start.length(); nq++) - { - Quad_impl* v_quad = ::DownCast (start[nq]); - ASSERT( v_quad ); - HEXA_NS::Quad* i_quad = v_quad->GetImpl(); - t_start.push_back(i_quad); - } - - std::vector t_angles; - for ( int na = 0; na < angles.length(); na++) - { - CORBA::Double alpha = angles[na]; - t_angles.push_back (alpha); - } - - HEXA_NS::Vector* i_axis = v_axis ->GetImpl(); - HEXA_NS::Vertex* i_center = v_center->GetImpl(); - HEXA_NS::Elements* i_elts = _document_cpp->revolutionQuads (t_start, - i_center, i_axis, t_angles); - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== prismQuadsVec -Elements_ptr Document_impl::prismQuadsVec (const Quads& start, Vector_ptr dir, - const RealVector &thaut, ::CORBA::Long opt) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - Vector_impl* v_dir = ::DownCast (dir); - - ASSERT (v_dir); - - if (v_dir==NULL) - return result; - - HEXA_NS::Quads t_start; - for ( int nq = 0; nq < start.length(); nq++) - { - Quad_impl* v_quad = ::DownCast (start[nq]); - ASSERT( v_quad ); - HEXA_NS::Quad* i_quad = v_quad->GetImpl(); - t_start.push_back(i_quad); - } - - std::vector t_haut; - for ( int na = 0; na < thaut.length(); na++) - { - CORBA::Double alpha = thaut[na]; - t_haut.push_back (alpha); - } - - HEXA_NS::Vector* i_dir = v_dir ->GetImpl(); - HEXA_NS::Elements* i_elts = _document_cpp->prismQuadsVec (t_start, - i_dir, t_haut, opt); - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== makeSphere - -Elements_ptr Document_impl::replace (const Quads& pattern, - Vertex_ptr p1, Vertex_ptr c1, - Vertex_ptr p2, Vertex_ptr c2, - Vertex_ptr p3, Vertex_ptr c3) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* v_p1 = ::DownCast (p1); - Vertex_impl* v_p2 = ::DownCast (p2); - Vertex_impl* v_p3 = ::DownCast (p3); - - Vertex_impl* v_c1 = ::DownCast (c1); - Vertex_impl* v_c2 = ::DownCast (c2); - Vertex_impl* v_c3 = ::DownCast (c3); - - ASSERT (v_p1); ASSERT (v_p2); ASSERT (v_p3); - ASSERT (v_c1); ASSERT (v_c2); ASSERT (v_c3); - - if ( v_c1==NULL || v_c2==NULL || v_c3==NULL - || v_p1==NULL || v_p2==NULL || v_p3==NULL) - return result; - - HEXA_NS::Quads t_pattern; - for ( int nq = 0; nq < pattern.length(); nq++) - { - Quad_impl* v_quad = ::DownCast (pattern[nq]); - ASSERT( v_quad ); - HEXA_NS::Quad* i_quad = v_quad->GetImpl(); - t_pattern.push_back(i_quad); - } - - - HEXA_NS::Vertex* i_p1 = v_p1->GetImpl(); - HEXA_NS::Vertex* i_p2 = v_p2->GetImpl(); - HEXA_NS::Vertex* i_p3 = v_p3->GetImpl(); - - HEXA_NS::Vertex* i_c1 = v_c1->GetImpl(); - HEXA_NS::Vertex* i_c2 = v_c2->GetImpl(); - HEXA_NS::Vertex* i_c3 = v_c3->GetImpl(); - - HEXA_NS::Elements* i_elts = _document_cpp->replace (t_pattern, - i_p1, i_c1, i_p2, i_c2, i_p3, i_c3); - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== makeSphere -Elements_ptr Document_impl::makeSphere (Vertex_ptr center, Vector_ptr vx, - Vector_ptr vz, ::CORBA::Double radius, - ::CORBA::Double radhole, Vertex_ptr plorig, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* v_center = ::DownCast (center); - Vertex_impl* v_orig = ::DownCast (plorig); - Vector_impl* v_x = ::DownCast (vx); - Vector_impl* v_z = ::DownCast (vz); - - ASSERT (v_center); - ASSERT (v_orig); - ASSERT (v_x); - ASSERT (v_z); - - HEXA_NS::Vertex* i_center = v_center->GetImpl(); - HEXA_NS::Vertex* i_orig = v_orig ->GetImpl(); - HEXA_NS::Vector* i_x = v_x ->GetImpl(); - HEXA_NS::Vector* i_z = v_z ->GetImpl(); - - HEXA_NS::Elements* i_elts = _document_cpp->makeSphere (i_center, i_x, i_z, - radius, radhole, i_orig, nrad, nang, nhaut); - - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== makePartSphere -Elements_ptr Document_impl::makePartSphere (Vertex_ptr center, Vector_ptr vx, - Vector_ptr vz, ::CORBA::Double radius, - ::CORBA::Double radhole, - Vertex_ptr plorig, ::CORBA::Double angle, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - - Vertex_impl* v_center = ::DownCast (center); - Vertex_impl* v_orig = ::DownCast (plorig); - Vector_impl* v_x = ::DownCast (vx); - Vector_impl* v_z = ::DownCast (vz); - - ASSERT (v_center); - ASSERT (v_orig); - ASSERT (v_x); - ASSERT (v_z); - - HEXA_NS::Vertex* i_center = v_center->GetImpl(); - HEXA_NS::Vertex* i_orig = v_orig ->GetImpl(); - HEXA_NS::Vector* i_x = v_x ->GetImpl(); - HEXA_NS::Vector* i_z = v_z ->GetImpl(); - - HEXA_NS::Elements* i_elts = _document_cpp->makePartSphere (i_center, i_x, - i_z, radius, radhole, i_orig, angle, nrad, nang, nhaut); - - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== makeRind -Elements_ptr Document_impl::makeRind (Vertex_ptr center, Vector_ptr vx, - Vector_ptr vz, - ::CORBA::Double radext, ::CORBA::Double radint, - ::CORBA::Double radhole, Vertex_ptr plorig, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Vertex_impl* v_center = ::DownCast (center); - Vertex_impl* v_orig = ::DownCast (plorig); - Vector_impl* v_x = ::DownCast (vx); - Vector_impl* v_z = ::DownCast (vz); - - ASSERT (v_center); - ASSERT (v_orig); - ASSERT (v_x); - ASSERT (v_z); - - HEXA_NS::Vertex* i_center = v_center->GetImpl(); - HEXA_NS::Vertex* i_orig = v_orig ->GetImpl(); - HEXA_NS::Vector* i_x = v_x ->GetImpl(); - HEXA_NS::Vector* i_z = v_z ->GetImpl(); - - HEXA_NS::Elements* i_elts = _document_cpp->makeRind (i_center, i_x, i_z, - radext, radint, radhole, i_orig, nrad, nang, nhaut); - - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== makePartRind -Elements_ptr Document_impl::makePartRind (Vertex_ptr center, Vector_ptr vx, - Vector_ptr vz, - ::CORBA::Double radext, ::CORBA::Double radint, - ::CORBA::Double radhole, - Vertex_ptr plorig, ::CORBA::Double angle, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - - Vertex_impl* v_center = ::DownCast (center); - Vertex_impl* v_orig = ::DownCast (plorig); - Vector_impl* v_x = ::DownCast (vx); - Vector_impl* v_z = ::DownCast (vz); - - ASSERT (v_center); - ASSERT (v_orig); - ASSERT (v_x); - ASSERT (v_z); - - HEXA_NS::Vertex* i_center = v_center->GetImpl(); - HEXA_NS::Vertex* i_orig = v_orig ->GetImpl(); - HEXA_NS::Vector* i_x = v_x ->GetImpl(); - HEXA_NS::Vector* i_z = v_z ->GetImpl(); - - HEXA_NS::Elements* i_elts = _document_cpp->makePartRind (i_center, i_x, i_z, - radext, radint, radhole, i_orig, angle, nrad, nang, nhaut); - if (i_elts != NULL) - { - Elements_impl* servantCorba = new Elements_impl(i_elts); - result = servantCorba->_this(); - } - - return result; -} -// ================================================== makeScale -Elements_ptr Document_impl::makeScale (Elements_ptr lIn, Vertex_ptr pIn, - ::CORBA::Double k) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast ( lIn ); - Vertex_impl* pServant = ::DownCast ( pIn ); - - ASSERT (lServant); - ASSERT (pServant); - - if ( lServant && pServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeScale(l, p, k); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} -// ================================================== makeSymmetryLine -Elements_ptr Document_impl::makeSymmetryLine (Elements_ptr lIn, Vertex_ptr pIn, - Vector_ptr vecIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeSymmetryLine(l, p, vec); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} -// ================================================== makeSymmetryPlane -Elements_ptr Document_impl::makeSymmetryPlane (Elements_ptr lIn, Vertex_ptr pIn, - Vector_ptr vecIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeSymmetryPlane(l, p, vec); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} -// ================================================== makeSymmetryPoint -Elements_ptr Document_impl::makeSymmetryPoint (Elements_ptr lIn, Vertex_ptr pIn) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - - if ( lServant && pServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - - HEXA_NS::Elements* r = _document_cpp->makeSymmetryPoint(l, p); - if ( r != NULL ){ - Elements_impl* servantCorba = new Elements_impl(r); - result = servantCorba->_this(); - } - } - return result; -} -// ================================================== performScale -void Document_impl::performScale (Elements_ptr lIn, Vertex_ptr pIn, - ::CORBA::Double k) - throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - - if ( lServant && pServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - _document_cpp->performScale (l, p, k); - } -} -// ================================================== performSymmetryPlane -void Document_impl::performSymmetryPlane (Elements_ptr lIn, Vertex_ptr pIn, - Vector_ptr vecIn) - throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - _document_cpp->performSymmetryPlane (l, p, vec); - } -} -// ================================================== performSymmetryLine -void Document_impl::performSymmetryLine (Elements_ptr lIn, Vertex_ptr pIn, - Vector_ptr vecIn) - throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - Vector_impl* vecServant = ::DownCast( vecIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - ASSERT( vecServant ); - - if ( lServant && pServant && vecServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - HEXA_NS::Vector* vec = vecServant->GetImpl(); - _document_cpp->performSymmetryLine (l, p, vec); - } -} -// ================================================== performSymmetryPoint -void Document_impl::performSymmetryPoint (Elements_ptr lIn, Vertex_ptr pIn) - throw (SALOME::SALOME_Exception) -{ - Elements_impl* lServant = ::DownCast( lIn ); - Vertex_impl* pServant = ::DownCast( pIn ); - - ASSERT( lServant ); - ASSERT( pServant ); - - if ( lServant && pServant ){ - HEXA_NS::Elements* l = lServant->GetImpl(); - HEXA_NS::Vertex* p = pServant->GetImpl(); - _document_cpp->performSymmetryPoint (l, p); - } -} -// ================================================== setLevel -void Document_impl::setLevel(::CORBA::Long debug) - throw (SALOME::SALOME_Exception) -{ - _document_cpp->setLevel (debug); -} -// ================================================== clearAssociation -void Document_impl::clearAssociation () - throw (SALOME::SALOME_Exception) -{ - _document_cpp->clearAssociation (); -} -// ---------------------------------------------- Ajouts Hexa5 (nov 2012) -// ===================================================== addShape -NewShape_ptr Document_impl::addShape (GEOM::GEOM_Object_ptr gobject, - const char* name) - throw (SALOME::SALOME_Exception) -{ - TopoDS_Shape shape = HEXABLOCK_Gen_i::GetHEXABLOCKGen() - ->geomObjectToShape(gobject); - - HEXA_NS::NewShape* new_shape = _document_cpp->addShape (shape, name); - - NewShape_ptr result = NewShape::_nil(); - if (new_shape != NULL) - { - NewShape_impl* servantCorba = new NewShape_impl (new_shape); - result = servantCorba->_this(); - } - - return result; -} -// ===================================================== countShape -::CORBA::Long Document_impl::countShape () - throw (SALOME::SALOME_Exception) -{ - return _document_cpp->countShape(); -} -// ========================================================= getShape -NewShape_ptr Document_impl::getShape (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - HEXA_NS::NewShape* new_shape = _document_cpp->getShape (nro); - - NewShape_ptr result = NewShape::_nil(); - if (new_shape != NULL) - { - NewShape_impl* servantCorba = new NewShape_impl (new_shape); - result = servantCorba->_this(); - } - - return result; -} -// ==================================================== associateOpenedLine -::CORBA::Long Document_impl::associateOpenedLine (const Edges& mline, - const Shapes& gline, - const IntVector& subid, - ::CORBA::Double pstart, - ::CORBA::Double pend) - throw (SALOME::SALOME_Exception) -{ - Hex::Edges md_line; - Hex::NewShapes geo_line; - Hex::IntVector sub_ids; - - for (int nro = 0; nro < mline.length(); nro++) - { - Edge_impl* im_edge = ::DownCast (mline[nro]); - ASSERT (im_edge); - HEXA_NS::Edge* un_edge = im_edge->GetImpl(); - md_line.push_back (un_edge); - } - - for (int nro = 0; nro < gline.length(); nro++) - { - NewShape_impl* im_shape = ::DownCast (gline[nro]); - ASSERT (im_shape); - HEXA_NS::NewShape* la_shape = im_shape->GetImpl(); - geo_line.push_back (la_shape); - } - - for (int nro = 0; nro < subid.length(); nro++) - { - int alpha = subid [nro]; - sub_ids.push_back (alpha); - } - - ::CORBA::Long ier = _document_cpp->associateOpenedLine (md_line, geo_line, - sub_ids, pstart, pend); - return ier; -} -// ====================================================== associateClosedLine -::CORBA::Long Document_impl::associateClosedLine (Vertex_ptr mfirst, - const Edges& mline, - const Shapes& gline, - const IntVector& subid, - ::CORBA::Double pstart, - ::CORBA::Boolean inv) - throw (SALOME::SALOME_Exception) -{ - Hex::Edges md_line; - Hex::NewShapes geo_line; - Hex::IntVector sub_ids; - - Vertex_impl* im_first = ::DownCast( mfirst ); - HEXA_NS::Vertex* md_first = im_first->GetImpl(); - - for (int nro = 0; nro < mline.length(); nro++) - { - Edge_impl* im_edge = ::DownCast (mline[nro]); - ASSERT (im_edge); - HEXA_NS::Edge* un_edge = im_edge->GetImpl(); - md_line.push_back (un_edge); - } - - for (int nro = 0; nro < gline.length(); nro++) - { - NewShape_impl* im_shape = ::DownCast (gline[nro]); - ASSERT (im_shape); - HEXA_NS::NewShape* la_shape = im_shape->GetImpl(); - geo_line.push_back (la_shape); - } - - for (int nro = 0; nro < subid.length(); nro++) - { - int alpha = subid [nro]; - sub_ids.push_back (alpha); - } - - ::CORBA::Long ier = _document_cpp->associateClosedLine (md_first, md_line, - geo_line, sub_ids, pstart, inv); - return ier; -} -//--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 -// =========================================================== MakeBiCylinder -Elements_ptr Document_impl::makeBiCylinder (Cylinder_ptr c1In, - Cylinder_ptr c2In) - throw (SALOME::SALOME_Exception) -{ - Elements_ptr result = Elements::_nil(); - - Cylinder_impl* c1Servant = ::DownCast( c1In ); - Cylinder_impl* c2Servant = ::DownCast( c2In ); - - ASSERT( c1Servant ); - ASSERT( c2Servant ); - - if ( c1Servant && c2Servant ) { - HEXA_NS::Cylinder* c1= c1Servant->GetImpl(); - HEXA_NS::Cylinder* c2= c2Servant->GetImpl(); - - HEXA_NS::Elements* grid = _document_cpp->makeBiCylinder (c1,c2); - Elements_impl* servantCorba = new Elements_impl(grid); - result = servantCorba->_this(); - } - return result; -} -// ================================================================ MakeBiPipe -Elements_ptr Document_impl::makeBiPipe (Pipe_ptr p1In, Pipe_ptr p2In) - throw (SALOME::SALOME_Exception) -{ - Pipe_impl* p1Servant = ::DownCast( p1In ); - Pipe_impl* p2Servant = ::DownCast( p2In ); - - ASSERT( p1Servant ); - ASSERT( p2Servant ); - - Elements_ptr result = Elements::_nil(); - - if ( p1Servant && p2Servant ) - { - HEXA_NS::Pipe* p1= p1Servant->GetImpl(); - HEXA_NS::Pipe* p2= p2Servant->GetImpl(); - - HEXA_NS::Elements* grid = _document_cpp->makeBiPipe ( p1, p2); - Elements_impl* servantCorba = new Elements_impl(grid); - result = servantCorba->_this(); - } - - return result; -} - diff --git a/src/HEXABLOCK_I/HexDocument_impl.hxx b/src/HEXABLOCK_I/HexDocument_impl.hxx deleted file mode 100755 index 3933d8e..0000000 --- a/src/HEXABLOCK_I/HexDocument_impl.hxx +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexDocument_impl__ -#define __HexDocument_impl__ - -#include -#include CORBA_SERVER_HEADER(Document) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexDocument.hxx" - - -// #define HEXA_NS Hex -using namespace HEXABLOCK_ORB; - -class Document_impl: - public POA_HEXABLOCK_ORB::Document, - public SALOME::GenericObj_i -{ - -public: -// Document_impl(HEXA_NS::Document *ptrCpp); - Document_impl( PortableServer::POA_ptr thePOA, HEXA_NS::Document *ptrCpp); - - HEXA_NS::Document* GetImpl() throw (SALOME::SALOME_Exception); - - void purge() throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - - ::CORBA::Long saveVtk (const char* fname) throw (SALOME::SALOME_Exception); - ::CORBA::Long save (const char* fileName) throw (SALOME::SALOME_Exception); - ::CORBA::Long setName (const char* fileName) throw (SALOME::SALOME_Exception); - char* getName () throw (SALOME::SALOME_Exception); - - - void setTolerance(::CORBA::Double tol) throw (SALOME::SALOME_Exception); - ::CORBA::Double getTolerance() throw (SALOME::SALOME_Exception); - Vertex_ptr addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception); - ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception); - Vertex_ptr getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Vertex_ptr findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception); - Edge_ptr addEdge(Vertex_ptr v0, Vertex_ptr v1) - throw (SALOME::SALOME_Exception); - Edge_ptr addEdgeVector (Vertex_ptr v0, Vector_ptr w1) - throw (SALOME::SALOME_Exception); - ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception); - Edge_ptr getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Edge_ptr findEdge(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception); - Quad_ptr addQuad(Edge_ptr e0, Edge_ptr e1, Edge_ptr e2, Edge_ptr e3) throw (SALOME::SALOME_Exception); - Quad_ptr addQuadVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3) throw (SALOME::SALOME_Exception); - ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception); - Quad_ptr getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Quad_ptr findQuad(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception); - Hexa_ptr addHexa(Quad_ptr q0, Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4, Quad_ptr q5) throw (SALOME::SALOME_Exception); - Hexa_ptr addHexaVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3, Vertex_ptr v4, Vertex_ptr v5, Vertex_ptr v6, Vertex_ptr v7) throw (SALOME::SALOME_Exception); - ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception); - Hexa_ptr getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Hexa_ptr findHexa(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception); - Vector_ptr addVector(::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz) throw (SALOME::SALOME_Exception); - Vector_ptr addVectorVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception); -::CORBA::Long countVector() throw (SALOME::SALOME_Exception); -Vector_ptr getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Cylinder_ptr addCylinder(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception); -::CORBA::Long countCylinder() throw (SALOME::SALOME_Exception); -Cylinder_ptr getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Pipe_ptr addPipe(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception); -::CORBA::Long countPipe() throw (SALOME::SALOME_Exception); -Pipe_ptr getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception); - ::CORBA::Boolean removeHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception); - ::CORBA::Boolean removeConnectedHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception); - Elements_ptr makeCartesian(Vertex_ptr pt, Vector_ptr vx, Vector_ptr vy, Vector_ptr vz, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) throw (SALOME::SALOME_Exception); - Elements_ptr makeCartesian1(Vertex_ptr v, Vector_ptr v1, ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz, ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz) throw (SALOME::SALOME_Exception); - - Elements_ptr makeCylindrical(Vertex_ptr pt, Vector_ptr vex, Vector_ptr vez, ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl, ::CORBA::Boolean fill) throw (SALOME::SALOME_Exception); - - Elements_ptr makeCylindricals (Vertex_ptr pt, Vector_ptr vex, Vector_ptr vez, - const RealVector& tdr, const RealVector& tda, const RealVector& tdl, - ::CORBA::Boolean fill) - throw (SALOME::SALOME_Exception); - - Elements_ptr makeSpherical( Vertex_ptr ptIn, - ::CORBA::Double rayon, - ::CORBA::Long n, - ::CORBA::Double k ) throw (SALOME::SALOME_Exception); - - Elements_ptr makeCylinder(Cylinder_ptr cyl, Vector_ptr vr, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) throw (SALOME::SALOME_Exception); - Elements_ptr makePipe(Pipe_ptr p, Vector_ptr vr, ::CORBA::Long nr, - ::CORBA::Long na, ::CORBA::Long nl) - throw (SALOME::SALOME_Exception); - -// Elements_ptr makeCylinders(Cylinder_ptr c1, Cylinder_ptr c2) throw (SALOME::SALOME_Exception); - CrossElements_ptr makeCylinders(Cylinder_ptr cyl1, Cylinder_ptr cyl2) - throw (SALOME::SALOME_Exception); - CrossElements_ptr makePipes(Pipe_ptr p1, Pipe_ptr p2) - throw (SALOME::SALOME_Exception); - - Elements_ptr prismQuad(Quad_ptr qd, Vector_ptr v, ::CORBA::Long nb) - throw (SALOME::SALOME_Exception); - Elements_ptr prismQuads(const Quads& qds, Vector_ptr v, ::CORBA::Long nb) - throw (SALOME::SALOME_Exception); - Elements_ptr prismQuadsVec(const Quads& qds, Vector_ptr v, - const RealVector &thaut, ::CORBA::Long opt) - throw (SALOME::SALOME_Exception); - - Elements_ptr joinQuad(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception); - Elements_ptr joinQuads(const Quads& qds, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception); - - ::CORBA::Long mergeQuads(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2) throw (SALOME::SALOME_Exception); - ::CORBA::Long mergeEdges(Edge_ptr e1, Edge_ptr e2, Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception); - ::CORBA::Long mergeVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception); - - Elements_ptr disconnectQuad(Hexa_ptr h, Quad_ptr q) - throw (SALOME::SALOME_Exception); - Elements_ptr disconnectEdge(Hexa_ptr h, Edge_ptr e) - throw (SALOME::SALOME_Exception); - Elements_ptr disconnectVertex(Hexa_ptr h, Vertex_ptr v) - throw (SALOME::SALOME_Exception); - - Elements_ptr disconnectEdges(const Hexas& th, const Edges& e) - throw (SALOME::SALOME_Exception); - - Elements_ptr cut(Edge_ptr e, ::CORBA::Long nb_of_cuts) throw (SALOME::SALOME_Exception); - - Elements_ptr makeTranslation(Elements_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception); - -Elements_ptr makeRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, - ::CORBA::Double angle) - throw (SALOME::SALOME_Exception); - -Elements_ptr makeScale (Elements_ptr e, Vertex_ptr ver, ::CORBA::Double k) - throw (SALOME::SALOME_Exception); -Elements_ptr makeSymmetryPoint (Elements_ptr e, Vertex_ptr ver) - throw (SALOME::SALOME_Exception); -Elements_ptr makeSymmetryLine (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) - throw (SALOME::SALOME_Exception); -Elements_ptr makeSymmetryPlane (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) - throw (SALOME::SALOME_Exception); - -// void performTranslation(Element_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception); - void performTranslation(Elements_ptr l, Vector_ptr vec) throw (SALOME::SALOME_Exception); - -void performRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, ::CORBA::Double angle) throw (SALOME::SALOME_Exception); - -void performScale (Elements_ptr e, Vertex_ptr ver, ::CORBA::Double k) - throw (SALOME::SALOME_Exception); -void performSymmetryPoint (Elements_ptr e, Vertex_ptr ver) - throw (SALOME::SALOME_Exception); -void performSymmetryLine (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) - throw (SALOME::SALOME_Exception); -void performSymmetryPlane (Elements_ptr e, Vertex_ptr ver, Vector_ptr vec) - throw (SALOME::SALOME_Exception); - - Group_ptr addHexaGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addQuadGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception); - Group_ptr addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception); - ::CORBA::Long removeGroup(Group_ptr g) throw (SALOME::SALOME_Exception); - ::CORBA::Long countGroup() throw (SALOME::SALOME_Exception); - Group_ptr getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Group_ptr findGroup(const char* name) throw (SALOME::SALOME_Exception); - - Law_ptr addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception); - ::CORBA::Long countLaw() throw (SALOME::SALOME_Exception); - Law_ptr getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception); - void removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception); - Law_ptr findLaw(const char* name) throw (SALOME::SALOME_Exception); - ::CORBA::Long countPropagation() throw (SALOME::SALOME_Exception); - Propagation_ptr getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception); - Propagation_ptr findPropagation(Edge_ptr e) throw (SALOME::SALOME_Exception); - - // Evols 13/12/2010 - - // Evols 05/09/2011 - // - ::CORBA::Long countUsedVertex () throw (SALOME::SALOME_Exception); - ::CORBA::Long countUsedEdge () throw (SALOME::SALOME_Exception); - ::CORBA::Long countUsedQuad () throw (SALOME::SALOME_Exception); - ::CORBA::Long countUsedHexa () throw (SALOME::SALOME_Exception); - - Vertex_ptr getUsedVertex (::CORBA::Long i) throw (SALOME::SALOME_Exception); - Edge_ptr getUsedEdge (::CORBA::Long i) throw (SALOME::SALOME_Exception); - Quad_ptr getUsedQuad (::CORBA::Long i) throw (SALOME::SALOME_Exception); - Hexa_ptr getUsedHexa (::CORBA::Long i) throw (SALOME::SALOME_Exception); - - Hexa_ptr addHexa5Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4, - Quad_ptr q5) - throw (SALOME::SALOME_Exception); - Hexa_ptr addHexa4Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4) - throw (SALOME::SALOME_Exception); - Hexa_ptr addHexa3Quads (Quad_ptr q1, Quad_ptr q2, Quad_ptr q3) - throw (SALOME::SALOME_Exception); - Hexa_ptr addHexa2Quads (Quad_ptr q1, Quad_ptr q2) - throw (SALOME::SALOME_Exception); - - Elements_ptr revolutionQuads (const Quads& start, Vertex_ptr center, - Vector_ptr axis, const RealVector &angles) - throw (SALOME::SALOME_Exception); - - Elements_ptr replace (const Quads& pattern, Vertex_ptr p1, Vertex_ptr c1, - Vertex_ptr p2, Vertex_ptr c2, Vertex_ptr p3, Vertex_ptr c3) - throw (SALOME::SALOME_Exception); - - Elements_ptr makeSphere (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, - ::CORBA::Double radius, ::CORBA::Double radhole, - Vertex_ptr plorig, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception); - - Elements_ptr makePartSphere (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, - ::CORBA::Double radius, ::CORBA::Double radhole, - Vertex_ptr plorig, ::CORBA::Double angle, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception); - - Elements_ptr makeRind (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, - ::CORBA::Double radext, ::CORBA::Double radint, - ::CORBA::Double radhole, Vertex_ptr plorig, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception); - - Elements_ptr makePartRind (Vertex_ptr center, Vector_ptr vx, Vector_ptr vz, - ::CORBA::Double radext, ::CORBA::Double radint, - ::CORBA::Double radhole, - Vertex_ptr plorig, ::CORBA::Double angle, - ::CORBA::Long nrad, ::CORBA::Long nang, ::CORBA::Long nhaut) - throw (SALOME::SALOME_Exception); -public: - - ::CORBA::Boolean removeQuad (Quad_ptr quad) - throw (SALOME::SALOME_Exception); - ::CORBA::Boolean removeElements (Elements_ptr bloc) - throw (SALOME::SALOME_Exception); - - void setLevel(::CORBA::Long level) throw (SALOME::SALOME_Exception); - void clearAssociation () throw (SALOME::SALOME_Exception); - - // Hexa5 - - NewShape_ptr addShape (GEOM::GEOM_Object_ptr geom_object, const char* name) - throw (SALOME::SALOME_Exception); - ::CORBA::Long countShape () throw (SALOME::SALOME_Exception); - NewShape_ptr getShape (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - - ::CORBA::Long associateOpenedLine (const Edges& mline, - const Shapes& gline, - const IntVector& subid, - ::CORBA::Double pstart, - ::CORBA::Double pend) - throw (SALOME::SALOME_Exception); - - ::CORBA::Long associateClosedLine (Vertex_ptr mfirst, - const Edges& mline, - const Shapes& gline, - const IntVector& subid, - ::CORBA::Double pstart, - ::CORBA::Boolean inv) - throw (SALOME::SALOME_Exception); - // Hexa5 - Elements_ptr makeBiCylinder (Cylinder_ptr cyl1, Cylinder_ptr cyl2) - throw (SALOME::SALOME_Exception); - Elements_ptr makeBiPipe (Pipe_ptr p1, Pipe_ptr p2) - throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Document *_document_cpp; -}; -//--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 -#endif diff --git a/src/HEXABLOCK_I/HexEdge_impl.cxx b/src/HEXABLOCK_I/HexEdge_impl.cxx deleted file mode 100755 index 84fd73a..0000000 --- a/src/HEXABLOCK_I/HexEdge_impl.cxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include -#include "hexa_base.hxx" - -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexNewShape_impl.hxx" - -using namespace HEXABLOCK_ORB; - -Edge_impl::Edge_impl( HEXA_NS::Edge *ptrCpp ): -_edge_cpp(ptrCpp) -{ -} - -HEXA_NS::Edge* Edge_impl::GetImpl() - throw (SALOME::SALOME_Exception) -{ - return _edge_cpp; -} - - -::CORBA::Boolean Edge_impl::getWay() throw (SALOME::SALOME_Exception) -{ - return _edge_cpp->getWay(); -} - - -Vertex_ptr Edge_impl::getVertex(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _edge_cpp->getVertex(n); - if ( v!= NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result ; -} - - -void Edge_impl::dump() throw (SALOME::SALOME_Exception) -{ - _edge_cpp->dump(); -} - - -void Edge_impl::printName()throw (SALOME::SALOME_Exception) -{ - _edge_cpp->printName(); -} - -char* Edge_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _edge_cpp->getName() ); -} - -// ========================================================= setName -void Edge_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _edge_cpp->setName (name); -} - -// ========================================================= setColor -void Edge_impl::setColor (::CORBA::Double val) - throw (SALOME::SALOME_Exception) -{ - _edge_cpp->setColor (val); -} - -// ========================================================= clearAssociation -void Edge_impl::clearAssociation() - throw (SALOME::SALOME_Exception) -{ - _edge_cpp->clearAssociation (); -} - -// =========================================================== countAssociation -::CORBA::Long Edge_impl::countAssociation () - throw (SALOME::SALOME_Exception) -{ - return _edge_cpp->countAssociation (); -} -// ========================================================= addAssociation -::CORBA::Long Edge_impl::addAssociation (NewShape_ptr geom, - ::CORBA::Long subid, - double debut, double fin ) - throw (SALOME::SALOME_Exception) -{ - NewShape_impl* im_shape = ::DownCast (geom ); - HEXA_NS::NewShape* md_shape = im_shape->GetImpl(); - - ::CORBA::Long ier = _edge_cpp->addAssociation (md_shape, subid, debut, fin); - return ier; -} diff --git a/src/HEXABLOCK_I/HexEdge_impl.hxx b/src/HEXABLOCK_I/HexEdge_impl.hxx deleted file mode 100755 index 817efa5..0000000 --- a/src/HEXABLOCK_I/HexEdge_impl.hxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexEdge_impl__ -#define __HexEdge_impl__ - -#include -#include CORBA_SERVER_HEADER(Edge) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexEdge.hxx" -#include "HexNewShape_impl.hxx" - -using namespace HEXABLOCK_ORB; - -class Edge_impl : public POA_HEXABLOCK_ORB::Edge, - public SALOME::GenericObj_i -{ - struct Assoc { - GEOM::GEOM_Object_ptr geomObj; - double debut; - double fin; - }; - -public: - Edge_impl(HEXA_NS::Edge *ptrCpp); - HEXA_NS::Edge* GetImpl() throw (SALOME::SALOME_Exception); - - ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception); - Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception); - void clearAssociation() throw (SALOME::SALOME_Exception); - - ::CORBA::Long countAssociation () - throw (SALOME::SALOME_Exception); - - void setColor (::CORBA::Double val) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - - ::CORBA::Long addAssociation (NewShape_ptr geom, ::CORBA::Long subid, - double debut, double fin ) - throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Edge* _edge_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexElements_impl.cxx b/src/HEXABLOCK_I/HexElements_impl.cxx deleted file mode 100755 index 48b3099..0000000 --- a/src/HEXABLOCK_I/HexElements_impl.cxx +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "hexa_base.hxx" -#include "HexElements_impl.hxx" -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexHexa_impl.hxx" - - -Elements_impl::Elements_impl( HEXA_NS::Elements *ptrCpp ):_elements_cpp(ptrCpp) -{ -} - -HEXA_NS::Elements* Elements_impl::GetImpl() -{ - return _elements_cpp; -} - -::CORBA::Long Elements_impl::countVertex() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long n = _elements_cpp->countVertex(); - return n; -} - -::CORBA::Long Elements_impl::countEdge() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long n = _elements_cpp->countEdge(); - return n; -} - -::CORBA::Long Elements_impl::countQuad() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long n = _elements_cpp->countQuad(); - return n; -} - -::CORBA::Long Elements_impl::countHexa() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long n = _elements_cpp->countHexa(); - return n; -} - -::CORBA::Long Elements_impl::findVertex( Vertex_ptr pIn ) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long n; - Vertex_impl* pInServant = ::DownCast( pIn ); - ASSERT( pInServant ); - HEXA_NS::Vertex* p = pInServant->GetImpl(); - n = _elements_cpp->findVertex( p ); - return n; -} - - - -Vertex_ptr Elements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _elements_cpp->getVertex(n); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - -Edge_ptr Elements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - HEXA_NS::Edge* e = _elements_cpp->getEdge(n); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Quad_ptr Elements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - HEXA_NS::Quad* q = _elements_cpp->getQuad(n); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - -Hexa_ptr Elements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - - HEXA_NS::Hexa* h = _elements_cpp->getHexa(n); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - return result; -} - - -::CORBA::Long Elements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ret = _elements_cpp->saveVtk( fname ); - return ret; -} - - -void Elements_impl::dump() throw (SALOME::SALOME_Exception) -{ - _elements_cpp->dump(); -} - - -void Elements_impl::printName() throw (SALOME::SALOME_Exception) -{ - _elements_cpp->printName(); -} - -char* Elements_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _elements_cpp->getName() ); -} - -// ========================================================= setName -void Elements_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _elements_cpp->setName (name); -} - - - - -Vertex_ptr Elements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - HEXA_NS::Vertex* v = _elements_cpp->getVertexIJK(x, y, z); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr Elements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _elements_cpp->getEdgeI(x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr Elements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _elements_cpp->getEdgeJ(x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Edge_ptr Elements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - HEXA_NS::Edge* e = _elements_cpp->getEdgeK(x, y, z); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Quad_ptr Elements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _elements_cpp->getQuadIJ(x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr Elements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _elements_cpp->getQuadIK(x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Quad_ptr Elements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - HEXA_NS::Quad* q = _elements_cpp->getQuadJK(x, y, z); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - - -Hexa_ptr Elements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception) -{ - Hexa_ptr result = Hexa::_nil(); - HEXA_NS::Hexa* h = _elements_cpp->getHexaIJK(x, y, z); - if ( h != NULL ){ - Hexa_impl* servantCorba = new Hexa_impl(h); - result = servantCorba->_this(); - } - return result; -} - -// ================================================== clearAssociation -void Elements_impl::clearAssociation () - throw (SALOME::SALOME_Exception) -{ - _elements_cpp->clearAssociation (); -} - -// Quad_ptr Elements_impl::getQuad1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) -// throw (SALOME::SALOME_Exception) -// { -// Quad_ptr result = Quad::_nil(); -// -// // EnumCoord k; -// // HEXA_NS::EnumCoord k_cpp; -// HEXA_NS::EnumCoord dir_cpp; -// -// switch (dirIn) { -// case DIR_X : dir_cpp = HEXA_NS::dir_x; break; -// case DIR_Y : dir_cpp = HEXA_NS::dir_y; break; -// case DIR_Z : dir_cpp = HEXA_NS::dir_z; break; -// case DIM3: dir_cpp = HEXA_NS::DIM3; break; -// } -// -// HEXA_NS::Quad* q = _elements_cpp->getQuad(dir_cpp, nx, ny, nz); -// if ( q != NULL ){ -// Quad_impl* servantCorba = new Quad_impl(q); -// result = servantCorba->_this(); -// } -// -// return result; -// } -// -// Edge_ptr Elements_impl::getEdge1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) -// throw (SALOME::SALOME_Exception) -// { -// Edge_ptr result = Edge::_nil(); -// -// // EnumCoord k; -// // HEXA_NS::EnumCoord k_cpp; -// HEXA_NS::EnumCoord dir_cpp; -// -// switch (dirIn) { -// case DIR_X : dir_cpp = HEXA_NS::dir_x; break; -// case DIR_Y : dir_cpp = HEXA_NS::dir_y; break; -// case DIR_Z : dir_cpp = HEXA_NS::dir_z; break; -// case DIM3: dir_cpp = HEXA_NS::DIM3; break; -// } -// -// HEXA_NS::Edge* e = _elements_cpp->getEdge(dir_cpp, nx, ny, nz); -// if ( e != NULL ){ -// Edge_impl* servantCorba = new Edge_impl(e); -// result = servantCorba->_this(); -// } -// -// return result; -// } - diff --git a/src/HEXABLOCK_I/HexElements_impl.hxx b/src/HEXABLOCK_I/HexElements_impl.hxx deleted file mode 100755 index bbb2327..0000000 --- a/src/HEXABLOCK_I/HexElements_impl.hxx +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexElements_impl__ -#define __HexElements_impl__ - -#include -#include CORBA_SERVER_HEADER(Elements) -// #include CORBA_SERVER_HEADER(Vertex) -// #include CORBA_SERVER_HEADER(Edge) -// #include CORBA_SERVER_HEADER(Quad) -// #include CORBA_SERVER_HEADER(Hexa) - -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexElements.hxx" - -using namespace HEXABLOCK_ORB; - -class Elements_impl : public POA_HEXABLOCK_ORB::Elements, - public SALOME::GenericObj_i -{ -public: - Elements_impl(HEXA_NS::Elements *ptrCpp); - HEXA_NS::Elements* GetImpl(); - - ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception); - ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception); - ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception); - ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception); - ::CORBA::Long findVertex( Vertex_ptr p ) throw (SALOME::SALOME_Exception); - Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Hexa_ptr getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception); - - Vertex_ptr getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Edge_ptr getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Edge_ptr getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Quad_ptr getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Quad_ptr getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - Quad_ptr getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - - Hexa_ptr getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception); - -// Quad_ptr getQuad1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) -// throw (SALOME::SALOME_Exception); -// -// Edge_ptr getEdge1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) -// throw (SALOME::SALOME_Exception); - - ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - void clearAssociation () throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Elements *_elements_cpp; -// void *_elements_cpp; - -}; - -#endif diff --git a/src/HEXABLOCK_I/HexGroup_impl.cxx b/src/HEXABLOCK_I/HexGroup_impl.cxx deleted file mode 100755 index ff9b3b5..0000000 --- a/src/HEXABLOCK_I/HexGroup_impl.cxx +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexEltBase.hxx" -#include "HexGroup.hxx" - -#include "HexElements_impl.hxx" - -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexHexa_impl.hxx" -#include "HexGroup_impl.hxx" - -Group_impl::Group_impl( HEXA_NS::Group *ptrCpp ):_group_cpp(ptrCpp) -{ -} - -HEXA_NS::Group* Group_impl::GetImpl() throw (SALOME::SALOME_Exception) -{ - return _group_cpp; -} - -char* Group_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup (_group_cpp->getName()); -} - -void Group_impl::setName(const char* name) throw (SALOME::SALOME_Exception) -{ - _group_cpp->setName( name ); -} - - -GroupKind Group_impl::getKind() throw (SALOME::SALOME_Exception) -{ - HEXA_NS::EnumGroup k = _group_cpp->getKind(); - - switch (k){ - case HEXA_NS::HexaCell: return HEXA_GROUP; - case HEXA_NS::QuadCell: return QUAD_GROUP; - case HEXA_NS::EdgeCell: return EDGE_GROUP; - case HEXA_NS::HexaNode: return HEXANODE_GROUP; - case HEXA_NS::QuadNode: return QUADNODE_GROUP; - case HEXA_NS::EdgeNode: return EDGENODE_GROUP; - case HEXA_NS::VertexNode: return VERTEXNODE_GROUP; - default : ASSERT(false); - } -} - - -::CORBA::Long Group_impl::addElement(Element_ptr eIn) throw (SALOME::SALOME_Exception) -{ - ::CORBA::Long ok; - Vertex_impl* vInServant = ::DownCast( eIn ); - Edge_impl* eInServant = ::DownCast( eIn ); - Quad_impl* qInServant = ::DownCast( eIn ); - Hexa_impl* hInServant = ::DownCast( eIn ); - - ASSERT( vInServant or eInServant or qInServant or hInServant ); - HEXA_NS::EltBase* e = NULL; - if ( vInServant ) { - e = vInServant->GetImpl(); - } else if ( eInServant ) { - e = eInServant->GetImpl(); - } else if ( qInServant ) { - e = qInServant->GetImpl(); - } else if ( hInServant ) { - e = hInServant->GetImpl(); - } - ok = _group_cpp->addElement(e); - - return ok; -} - - -::CORBA::Long Group_impl::countElement() throw (SALOME::SALOME_Exception) -{ - return _group_cpp->countElement(); -} - - -Element_ptr Group_impl::getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception) -{ - HEXA_NS::EltBase* elt = _group_cpp->getElement(index); - - HEXA_NS::Vertex* v = dynamic_cast(elt); - HEXA_NS::Edge* e = dynamic_cast(elt); - HEXA_NS::Quad* q = dynamic_cast(elt); - HEXA_NS::Hexa* h = dynamic_cast(elt); - - ASSERT( v or e or q or h ); - - if (v){ - Vertex_impl* servantCorba = new Vertex_impl(v); - return servantCorba->_this(); - } else if (e){ - Edge_impl* servantCorba = new Edge_impl(e); - return servantCorba->_this(); - } else if (q){ - Quad_impl* servantCorba = new Quad_impl(q); - return servantCorba->_this(); - } else if (h){ - Hexa_impl* servantCorba = new Hexa_impl(h); - return servantCorba->_this(); - } else { - return Element::_nil(); - } -} - - -::CORBA::Long Group_impl::removeElement(Element_ptr eIn) - throw (SALOME::SALOME_Exception) -{ - Vertex_impl* vInServant = ::DownCast( eIn ); - Edge_impl* eInServant = ::DownCast( eIn ); - Quad_impl* qInServant = ::DownCast( eIn ); - Hexa_impl* hInServant = ::DownCast( eIn ); - - ASSERT( vInServant or eInServant or qInServant or hInServant ); - HEXA_NS::EltBase* elt = NULL; - if (vInServant != NULL) - elt = vInServant->GetImpl(); - else if (eInServant != NULL) - elt = eInServant->GetImpl(); - else if (qInServant != NULL) - elt = qInServant->GetImpl(); - else if (hInServant != NULL) - elt = hInServant->GetImpl(); - - ::CORBA::Long ier = _group_cpp->removeElement (elt); - return ier; -} - -void Group_impl::clearElement() throw (SALOME::SALOME_Exception) -{ - _group_cpp->clearElement(); -} - diff --git a/src/HEXABLOCK_I/HexGroup_impl.hxx b/src/HEXABLOCK_I/HexGroup_impl.hxx deleted file mode 100755 index 162d715..0000000 --- a/src/HEXABLOCK_I/HexGroup_impl.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexGroup_impl__ -#define __HexGroup_impl__ - -#include -#include CORBA_SERVER_HEADER(Group) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexGroup.hxx" - - -using namespace HEXABLOCK_ORB; -class Group_impl : public POA_HEXABLOCK_ORB::Group, - public SALOME::GenericObj_i -{ - public: - Group_impl(HEXA_NS::Group *ptrCpp); - HEXA_NS::Group* GetImpl() throw (SALOME::SALOME_Exception); - - char* getName() throw (SALOME::SALOME_Exception); - void setName(const char* name) throw (SALOME::SALOME_Exception); - GroupKind getKind() throw (SALOME::SALOME_Exception); - ::CORBA::Long addElement(Element_ptr e) throw (SALOME::SALOME_Exception); - ::CORBA::Long countElement() throw (SALOME::SALOME_Exception); - Element_ptr getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception); - ::CORBA::Long removeElement(Element_ptr elt) throw (SALOME::SALOME_Exception); - void clearElement() throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Group *_group_cpp; -}; - - -// class HexaGroup_impl : public Group_impl {}; -// class QuadGroup_impl : public Group_impl {}; -// class EdgeGroup_impl : public Group_impl {}; -// class HexaNodeGroup_impl : public Group_impl {}; -// class QuadNodeGroup_impl : public Group_impl {}; -// class EdgeNodeGroup_impl : public Group_impl {}; -// class VertexNodeGroup_impl : public Group_impl {}; - - -#endif diff --git a/src/HEXABLOCK_I/HexHexa_impl.cxx b/src/HEXABLOCK_I/HexHexa_impl.cxx deleted file mode 100755 index 07531c8..0000000 --- a/src/HEXABLOCK_I/HexHexa_impl.cxx +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexHexa_impl.hxx" -#include "HexQuad_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexVertex_impl.hxx" - -Hexa_impl::Hexa_impl( HEXA_NS::Hexa *ptrCpp ):_hexa_cpp(ptrCpp) -{ -} - -HEXA_NS::Hexa* Hexa_impl::GetImpl() - throw (SALOME::SALOME_Exception) -{ - return _hexa_cpp; -} - -Quad_ptr Hexa_impl::getQuad(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Quad_ptr result = Quad::_nil(); - - HEXA_NS::Quad* q = _hexa_cpp->getQuad(n); - if ( q != NULL ){ - Quad_impl* servantCorba = new Quad_impl(q); - result = servantCorba->_this(); - } - return result; -} - -Edge_ptr Hexa_impl::getEdge(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - HEXA_NS::Edge* e = _hexa_cpp->getEdge(n); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - -Vertex_ptr Hexa_impl::getVertex(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - -void Hexa_impl::setColor (::CORBA::Double val) - throw (SALOME::SALOME_Exception) -{ - _hexa_cpp->setColor (val); -} - -void Hexa_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception) -{ - _hexa_cpp->setScalar(val); -} - -void Hexa_impl::dump() throw (SALOME::SALOME_Exception) -{ - _hexa_cpp->dump(); -} - - -void Hexa_impl::printName() throw (SALOME::SALOME_Exception) -{ - _hexa_cpp->printName(); -} - - -char* Hexa_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _hexa_cpp->getName() ); -} - -// ========================================================= setName -void Hexa_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _hexa_cpp->setName (name); -} diff --git a/src/HEXABLOCK_I/HexHexa_impl.hxx b/src/HEXABLOCK_I/HexHexa_impl.hxx deleted file mode 100755 index 6e0f750..0000000 --- a/src/HEXABLOCK_I/HexHexa_impl.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexHexa_impl__ -#define __HexHexa_impl__ - -#include -#include CORBA_SERVER_HEADER(Hexa) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexHexa.hxx" - -using namespace HEXABLOCK_ORB; - -class Hexa_impl : public POA_HEXABLOCK_ORB::Hexa, - public SALOME::GenericObj_i -{ -public: - Hexa_impl(HEXA_NS::Hexa *ptrCpp); - HEXA_NS::Hexa* GetImpl() throw (SALOME::SALOME_Exception); - - Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception); - - void setColor (::CORBA::Double val) throw (SALOME::SALOME_Exception); - void setScalar( ::CORBA::Double val ) throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Hexa *_hexa_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexLaw_impl.cxx b/src/HEXABLOCK_I/HexLaw_impl.cxx deleted file mode 100755 index b83b884..0000000 --- a/src/HEXABLOCK_I/HexLaw_impl.cxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexLaw_impl.hxx" - -Law_impl::Law_impl( HEXA_NS::Law *ptrCpp ):_law_cpp(ptrCpp) -{ -} - -HEXA_NS::Law* Law_impl::GetImpl() -throw (SALOME::SALOME_Exception) -{ - return _law_cpp; -} - -// HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n); -// Vertex_impl* servantCorba = new Vertex_impl(v); -// return servantCorba->_this(); - - -void Law_impl::setName(const char* name) -throw (SALOME::SALOME_Exception) -{ - _law_cpp->setName(name); -} - -char* Law_impl::getName() -throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _law_cpp->getName() ); -} - -void Law_impl::setNodes(::CORBA::Long n) -throw (SALOME::SALOME_Exception) -{ - _law_cpp->setNodes(n); -} - -::CORBA::Long Law_impl::getNodes() -throw (SALOME::SALOME_Exception) -{ - return _law_cpp->getNodes(); -} - -void Law_impl::setKind( HEXABLOCK_ORB::KindLaw kIn ) -throw (SALOME::SALOME_Exception) -{ - HEXA_NS::KindLaw k_impl; - switch (kIn) { - case HEXABLOCK_ORB::UNIFORM : k_impl = HEXA_NS::Uniform; break; - case HEXABLOCK_ORB::ARITHMETIC : k_impl = HEXA_NS::Arithmetic; break; - case HEXABLOCK_ORB::GEOMETRIC : k_impl = HEXA_NS::Geometric; break; - } - _law_cpp->setKind(k_impl); -} - -HEXABLOCK_ORB::KindLaw Law_impl::getKind() -throw (SALOME::SALOME_Exception) -{ - HEXABLOCK_ORB::KindLaw k; - HEXA_NS::KindLaw k_cpp = _law_cpp->getKind(); - switch (k_cpp) { - case HEXA_NS::Uniform : k = HEXABLOCK_ORB::UNIFORM; break; - case HEXA_NS::Arithmetic : k = HEXABLOCK_ORB::ARITHMETIC; break; - case HEXA_NS::Geometric : k = HEXABLOCK_ORB::GEOMETRIC; break; - default : ASSERT( false ); break; - } - return k; -} - - -void Law_impl::setCoefficient(::CORBA::Double c) -throw (SALOME::SALOME_Exception) -{ - _law_cpp->setCoefficient(c); -} - -::CORBA::Double Law_impl::getCoefficient() -throw (SALOME::SALOME_Exception) -{ - return _law_cpp->getCoefficient(); -} diff --git a/src/HEXABLOCK_I/HexLaw_impl.hxx b/src/HEXABLOCK_I/HexLaw_impl.hxx deleted file mode 100755 index df69de8..0000000 --- a/src/HEXABLOCK_I/HexLaw_impl.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Law_impl__ -#define __Law_impl__ - -#include -#include CORBA_SERVER_HEADER(Law) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexLaw.hxx" - - -using namespace HEXABLOCK_ORB; - -class Law_impl : public POA_HEXABLOCK_ORB::Law, - public SALOME::GenericObj_i -{ -public: - Law_impl(HEXA_NS::Law *ptrCpp); - HEXA_NS::Law* GetImpl() throw (SALOME::SALOME_Exception); - - void setName(const char* name) throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setNodes(::CORBA::Long n) throw (SALOME::SALOME_Exception); - ::CORBA::Long getNodes() throw (SALOME::SALOME_Exception); - void setKind(KindLaw k) throw (SALOME::SALOME_Exception); - KindLaw getKind() throw (SALOME::SALOME_Exception); - void setCoefficient(::CORBA::Double c) throw (SALOME::SALOME_Exception); - ::CORBA::Double getCoefficient() throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Law *_law_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexNewShape_impl.cxx b/src/HEXABLOCK_I/HexNewShape_impl.cxx deleted file mode 100755 index a22ec1d..0000000 --- a/src/HEXABLOCK_I/HexNewShape_impl.cxx +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "HexNewShape_impl.hxx" - -// ============================================================== Constructeur -NewShape_impl::NewShape_impl( HEXA_NS::NewShape *ptrCpp ) -{ - _shape_cpp = ptrCpp; -} -// ============================================================== GetImpl -HEXA_NS::NewShape* NewShape_impl::GetImpl() - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp; -} -// ========================================================= countVertex -::CORBA::Long NewShape_impl::countVertex () - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->countVertex (); -} -// ========================================================= countEdge -::CORBA::Long NewShape_impl::countEdge () - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->countEdge (); -} -// ========================================================= countFace -::CORBA::Long NewShape_impl::countFace () - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->countFace (); -} -// --------------------------------------------------------------------- -// ========================================================= getVertex -::CORBA::Long NewShape_impl::getVertex (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->getVertex (nro); -} -// ========================================================= getEdge -::CORBA::Long NewShape_impl::getEdge (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->getEdge (nro); -} -// ========================================================= getFace -::CORBA::Long NewShape_impl::getFace (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return _shape_cpp->getFace (nro); -} -// --------------------------------------------------------------------- -// ========================================================= getNameVertex -char* NewShape_impl::getNameVertex (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup (_shape_cpp->getNameVertex (nro)); -} -// ========================================================= getNameEdge -char* NewShape_impl::getNameEdge (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup (_shape_cpp->getNameEdge (nro)); -} -// ========================================================= getNameFace -char* NewShape_impl::getNameFace (::CORBA::Long nro) - throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup (_shape_cpp->getNameFace (nro)); -} -// ========================================================= dump -void NewShape_impl::dump() throw (SALOME::SALOME_Exception) -{ - -} -// ========================================================= setName -void NewShape_impl::printName() throw (SALOME::SALOME_Exception) -{ - _shape_cpp->printName(); -} -// ========================================================= setName -char* NewShape_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _shape_cpp->getName() ); -} -// ========================================================= setName -void NewShape_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _shape_cpp->setName (name); -} diff --git a/src/HEXABLOCK_I/HexNewShape_impl.hxx b/src/HEXABLOCK_I/HexNewShape_impl.hxx deleted file mode 100755 index 687d21c..0000000 --- a/src/HEXABLOCK_I/HexNewShape_impl.hxx +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexNewShape_impl__ -#define __HexNewShape_impl__ - -#include -#include CORBA_SERVER_HEADER(NewShape) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexNewShape.hxx" - -using namespace HEXABLOCK_ORB; - -class NewShape_impl : public POA_HEXABLOCK_ORB::NewShape, - public SALOME::GenericObj_i -{ -public: - NewShape_impl (HEXA_NS::NewShape *ptrCpp); - HEXA_NS::NewShape* GetImpl() throw (SALOME::SALOME_Exception); - - - ::CORBA::Long countVertex () - throw (SALOME::SALOME_Exception); - ::CORBA::Long countEdge () - throw (SALOME::SALOME_Exception); - ::CORBA::Long countFace () - throw (SALOME::SALOME_Exception); - - ::CORBA::Long getVertex (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - ::CORBA::Long getEdge (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - ::CORBA::Long getFace (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - - char* getNameVertex (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - char* getNameEdge (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - char* getNameFace (::CORBA::Long nro) - throw (SALOME::SALOME_Exception); - - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - - -private: - HEXA_NS::NewShape* _shape_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexPipe_impl.cxx b/src/HEXABLOCK_I/HexPipe_impl.cxx deleted file mode 100755 index 6ce6999..0000000 --- a/src/HEXABLOCK_I/HexPipe_impl.cxx +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexVertex_impl.hxx" -#include "HexVector_impl.hxx" -#include "HexPipe_impl.hxx" - -Pipe_impl::Pipe_impl( HEXA_NS::Pipe *ptrCpp ):_pipe_cpp(ptrCpp) -{ -} - -HEXA_NS::Pipe* Pipe_impl::GetImpl() throw (SALOME::SALOME_Exception) -{ - return _pipe_cpp; -} - -Vertex_ptr Pipe_impl::getBase() throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _pipe_cpp->getBase(); - if ( v!= NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - -Vector_ptr Pipe_impl::getDirection() throw (SALOME::SALOME_Exception) -{ - Vector_ptr result = Vector::_nil(); - - HEXA_NS::Vector* v = _pipe_cpp->getDirection(); - - if ( v!= NULL ){ - Vector_impl* servantCorba = new Vector_impl(v); - result = servantCorba->_this(); - } - return result; -} - -::CORBA::Double Pipe_impl::getInternal_radius() throw (SALOME::SALOME_Exception) -{ -// ::CORBA::Double d = _pipe_cpp->getInternal_radius(); CS_TODO - ::CORBA::Double d = _pipe_cpp->getInternalRadius(); - return d; -} - -::CORBA::Double Pipe_impl::getRadius() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double d = _pipe_cpp->getRadius(); - return d; -} - -::CORBA::Double Pipe_impl::getHeight() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double d = _pipe_cpp->getHeight(); - return d; -} - - -void Pipe_impl::dump() throw (SALOME::SALOME_Exception) -{ - _pipe_cpp->dump(); -} - - -void Pipe_impl::printName() throw (SALOME::SALOME_Exception) -{ - _pipe_cpp->printName(); -} - - -char* Pipe_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _pipe_cpp->getName() ); -} -// ========================================================= setName -void Pipe_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _pipe_cpp->setName (name); -} diff --git a/src/HEXABLOCK_I/HexPipe_impl.hxx b/src/HEXABLOCK_I/HexPipe_impl.hxx deleted file mode 100755 index 80259a4..0000000 --- a/src/HEXABLOCK_I/HexPipe_impl.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexPipe_impl__ -#define __HexPipe_impl__ - -#include -#include CORBA_SERVER_HEADER(Pipe) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexPipe.hxx" - -using namespace HEXABLOCK_ORB; - -class Pipe_impl : public POA_HEXABLOCK_ORB::Pipe, - public SALOME::GenericObj_i -{ -public: - Pipe_impl(HEXA_NS::Pipe *ptrCpp); - HEXA_NS::Pipe* GetImpl() throw (SALOME::SALOME_Exception); - - Vertex_ptr getBase() throw (SALOME::SALOME_Exception); - Vector_ptr getDirection() throw (SALOME::SALOME_Exception); - ::CORBA::Double getInternal_radius() throw (SALOME::SALOME_Exception); - ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception); - ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Pipe *_pipe_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexPropagation_impl.cxx b/src/HEXABLOCK_I/HexPropagation_impl.cxx deleted file mode 100755 index 2aa92b4..0000000 --- a/src/HEXABLOCK_I/HexPropagation_impl.cxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - - -#include "hexa_base.hxx" -#include "HexPropagation_impl.hxx" -#include "HexEdge_impl.hxx" -#include "HexLaw_impl.hxx" - -Propagation_impl::Propagation_impl( HEXA_NS::Propagation *ptrCpp ):_propagation_cpp(ptrCpp) -{ -} - - - -HEXA_NS::Propagation* Propagation_impl::GetImpl() throw (SALOME::SALOME_Exception) -{ - return _propagation_cpp; -} - - -HEXABLOCK_ORB::Edges* Propagation_impl::getEdges() throw (SALOME::SALOME_Exception) -{ - HEXABLOCK_ORB::Edges* result = new HEXABLOCK_ORB::Edges; - - const HEXA_NS::Edges& edges_cpp = _propagation_cpp->getEdges(); - - CORBA::ULong i = 0; - result->length( edges_cpp.size() ); - for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin(); - iter != edges_cpp.end(); - ++iter){ - Edge_impl *servantEdge = new Edge_impl( *iter ); - (*result)[ i++ ] = servantEdge->_this(); - - } - return result; -} - - -void Propagation_impl::setLaw(HEXABLOCK_ORB::Law_ptr lawIn) throw (SALOME::SALOME_Exception) -{ - Law_impl* lawInServant = ::DownCast( lawIn ); - ASSERT( lawInServant ); - - if ( lawInServant ){ - HEXA_NS::Law* law = lawInServant->GetImpl(); - _propagation_cpp->setLaw(law); - } -} - -HEXABLOCK_ORB::Law_ptr Propagation_impl::getLaw() throw (SALOME::SALOME_Exception) -{ - Law_ptr result = Law::_nil(); - HEXA_NS::Law* l = _propagation_cpp->getLaw(); - - if ( l != NULL ){ - Law_impl* servantCorba = new Law_impl(l); - result = servantCorba->_this(); - } - return result; -} - - - -void Propagation_impl::setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception) -{ - _propagation_cpp->setWay(w); -} - - - -::CORBA::Boolean Propagation_impl::getWay() throw (SALOME::SALOME_Exception) -{ -// bool way = _propagation_cpp->getWay(); -// if ( way == true ) { -// return CORBA::TRUE; -// else { -// return CORBA::FALSE; -// } - return _propagation_cpp->getWay(); -} - diff --git a/src/HEXABLOCK_I/HexPropagation_impl.hxx b/src/HEXABLOCK_I/HexPropagation_impl.hxx deleted file mode 100755 index 841c015..0000000 --- a/src/HEXABLOCK_I/HexPropagation_impl.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __Propagation_impl__ -#define __Propagation_impl__ - -#include -#include CORBA_SERVER_HEADER(Propagation) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexPropagation.hxx" - -using namespace HEXABLOCK_ORB; - -class Propagation_impl : public POA_HEXABLOCK_ORB::Propagation, - public SALOME::GenericObj_i -{ -public: - Propagation_impl(HEXA_NS::Propagation *ptrCpp); - HEXA_NS::Propagation* GetImpl() throw (SALOME::SALOME_Exception); - - Edges* getEdges() throw (SALOME::SALOME_Exception); -// Ways* getWays() throw (SALOME::SALOME_Exception); - - void setLaw(Law_ptr l) throw (SALOME::SALOME_Exception); - Law_ptr getLaw() throw (SALOME::SALOME_Exception); - void setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception); - ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception); - - -private: - HEXA_NS::Propagation *_propagation_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexQuad_impl.cxx b/src/HEXABLOCK_I/HexQuad_impl.cxx deleted file mode 100755 index 2682fa1..0000000 --- a/src/HEXABLOCK_I/HexQuad_impl.cxx +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexQuad_impl.hxx" -#include "HexVertex_impl.hxx" -#include "HexEdge_impl.hxx" - -Quad_impl::Quad_impl( HEXA_NS::Quad *ptrCpp ):_quad_cpp(ptrCpp) -{ -} - -HEXA_NS::Quad* Quad_impl::GetImpl() - throw (SALOME::SALOME_Exception) -{ - return _quad_cpp; -} - -Edge_ptr Quad_impl::getEdge(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Edge_ptr result = Edge::_nil(); - - HEXA_NS::Edge* e = _quad_cpp->getEdge( n ); - if ( e != NULL ){ - Edge_impl* servantCorba = new Edge_impl(e); - result = servantCorba->_this(); - } - return result; -} - - -Vertex_ptr Quad_impl::getVertex(::CORBA::Long n) - throw (SALOME::SALOME_Exception) -{ - Vertex_ptr result = Vertex::_nil(); - - HEXA_NS::Vertex* v = _quad_cpp->getVertex( n ); - if ( v != NULL ){ - Vertex_impl* servantCorba = new Vertex_impl(v); - result = servantCorba->_this(); - } - return result; -} - - - - -::CORBA::Long Quad_impl::addAssociation(NewShape_ptr geom, ::CORBA::Long subid) - throw (SALOME::SALOME_Exception) -{ - NewShape_impl* im_shape = ::DownCast (geom ); - HEXA_NS::NewShape* md_shape = im_shape->GetImpl(); - - ::CORBA::Long ier = _quad_cpp->addAssociation (md_shape, subid); - return ier; -} - -void Quad_impl::clearAssociation() - throw (SALOME::SALOME_Exception) -{ - _quad_cpp->clearAssociation (); -} - -void Quad_impl::setColor (::CORBA::Double val) - throw (SALOME::SALOME_Exception) -{ - _quad_cpp->setColor (val); -} - -void Quad_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception) -{ - _quad_cpp->setScalar(val); -} - -void Quad_impl::dump() throw (SALOME::SALOME_Exception) -{ - _quad_cpp->dump(); -} - - -void Quad_impl::printName() throw (SALOME::SALOME_Exception) -{ - _quad_cpp->printName(); -} - -char* Quad_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _quad_cpp->getName() ); -} -// ========================================================= setName -void Quad_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _quad_cpp->setName (name); -} diff --git a/src/HEXABLOCK_I/HexQuad_impl.hxx b/src/HEXABLOCK_I/HexQuad_impl.hxx deleted file mode 100755 index ab4454a..0000000 --- a/src/HEXABLOCK_I/HexQuad_impl.hxx +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexQuad_impl__ -#define __HexQuad_impl__ - -#include -#include CORBA_SERVER_HEADER(GEOM_Gen) -#include CORBA_SERVER_HEADER(Quad) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexQuad.hxx" - -using namespace HEXABLOCK_ORB; - -class Quad_impl : public POA_HEXABLOCK_ORB::Quad, - public SALOME::GenericObj_i -{ -public: - Quad_impl(HEXA_NS::Quad *ptrCpp); - HEXA_NS::Quad* GetImpl() throw (SALOME::SALOME_Exception); - - Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception); - Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception); - - ::CORBA::Long addAssociation (NewShape_ptr geom, ::CORBA::Long subid) - throw (SALOME::SALOME_Exception); - - GEOM::ListOfGO* getAssociations () //CS_NOT_SPEC - throw (SALOME::SALOME_Exception); - - - void clearAssociation() throw (SALOME::SALOME_Exception); - - void setColor (::CORBA::Double val) throw (SALOME::SALOME_Exception); - void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Quad *_quad_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/HexVector_impl.cxx b/src/HEXABLOCK_I/HexVector_impl.cxx deleted file mode 100755 index 87d9bc4..0000000 --- a/src/HEXABLOCK_I/HexVector_impl.cxx +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexVector_impl.hxx" - -using namespace HEXABLOCK_ORB; - -Vector_impl::Vector_impl( HEXA_NS::Vector *ptrCpp ):_vector_cpp(ptrCpp) -{ -} - -HEXA_NS::Vector* Vector_impl::GetImpl() throw (SALOME::SALOME_Exception) -{ - return _vector_cpp; -} - -::CORBA::Double Vector_impl::getDX() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double dx = _vector_cpp->getDx(); - return dx; -} -::CORBA::Double Vector_impl::getDY() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double dy = _vector_cpp->getDy(); - return dy; -} -::CORBA::Double Vector_impl::getDZ() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double dz = _vector_cpp->getDz(); - return dz; -} - - -void Vector_impl::dump() throw (SALOME::SALOME_Exception) -{ - _vector_cpp->dump(); -} - - -void Vector_impl::printName() throw (SALOME::SALOME_Exception) -{ - _vector_cpp->printName(); -} - -// ========================================================= getName -char* Vector_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _vector_cpp->getName() ); -} -// ========================================================= setName -void Vector_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _vector_cpp->setName (name); -} -// ========================================================= getNorm -::CORBA::Double Vector_impl::getNorm() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double val = _vector_cpp->getNorm(); - return val; -} -// ========================================================= getAngleX -::CORBA::Double Vector_impl::getAngleX() throw (SALOME::SALOME_Exception) -{ - ::CORBA::Double val = _vector_cpp->getAngleX(); - return val; -} diff --git a/src/HEXABLOCK_I/HexVector_impl.hxx b/src/HEXABLOCK_I/HexVector_impl.hxx deleted file mode 100755 index 1a06f15..0000000 --- a/src/HEXABLOCK_I/HexVector_impl.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexVector_impl__ -#define __HexVector_impl__ - -#include -#include CORBA_SERVER_HEADER(Vector) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" -#include "HexVector.hxx" - -using namespace HEXABLOCK_ORB; - -class Vector_impl : public POA_HEXABLOCK_ORB::Vector, - public SALOME::GenericObj_i -{ -public: - Vector_impl(HEXA_NS::Vector *ptrCpp); - HEXA_NS::Vector* GetImpl() throw (SALOME::SALOME_Exception); - - ::CORBA::Double getDX() throw(SALOME::SALOME_Exception); - ::CORBA::Double getDY() throw(SALOME::SALOME_Exception); - ::CORBA::Double getDZ() throw(SALOME::SALOME_Exception); - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - - ::CORBA::Double getNorm () throw (SALOME::SALOME_Exception); - ::CORBA::Double getAngleX () throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Vector *_vector_cpp; - -}; - -#endif diff --git a/src/HEXABLOCK_I/HexVertex_impl.cxx b/src/HEXABLOCK_I/HexVertex_impl.cxx deleted file mode 100755 index 980aa6c..0000000 --- a/src/HEXABLOCK_I/HexVertex_impl.cxx +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 -// -using namespace std; -#include "HEXABLOCK.hxx" -#include "utilities.h" - -#include - -#include "hexa_base.hxx" -#include "HexVertex_impl.hxx" -#include "HexNewShape_impl.hxx" - -Vertex_impl::Vertex_impl( HEXA_NS::Vertex *ptrCpp ): -_vertex_cpp( ptrCpp ) -{ -} - -HEXA_NS::Vertex* Vertex_impl::GetImpl() -{ - return _vertex_cpp; -} - -CORBA::Double Vertex_impl::getX() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getX(); -} - -CORBA::Double Vertex_impl::getY() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getY(); -} - -CORBA::Double Vertex_impl::getZ() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getZ(); -} - - -void Vertex_impl::setX( CORBA::Double x ) throw(SALOME::SALOME_Exception) -{ - _vertex_cpp->setX(x); -} -void Vertex_impl::setY( CORBA::Double y ) throw(SALOME::SALOME_Exception) -{ - _vertex_cpp->setY(y); -} - -void Vertex_impl::setZ( CORBA::Double z ) throw(SALOME::SALOME_Exception) -{ - _vertex_cpp->setZ(z); -} - -void Vertex_impl::clearAssociation() - throw (SALOME::SALOME_Exception) -{ - _vertex_cpp->clearAssociation (); -} - - -void Vertex_impl::setColor (::CORBA::Double val) - throw (SALOME::SALOME_Exception) -{ - _vertex_cpp->setColor (val); -} - -void Vertex_impl::dump() throw (SALOME::SALOME_Exception) -{ - _vertex_cpp->dump(); -} - - -void Vertex_impl::printName()throw (SALOME::SALOME_Exception) -{ - _vertex_cpp->printName(); -} - - -char* Vertex_impl::getName() throw (SALOME::SALOME_Exception) -{ - return CORBA::string_dup( _vertex_cpp->getName() ); -} -// ========================================================== setAssociation -::CORBA::Long Vertex_impl::setAssociation (NewShape_ptr geom, - ::CORBA::Long subid) - throw (SALOME::SALOME_Exception) -{ - NewShape_impl* im_shape = ::DownCast (geom ); - HEXA_NS::NewShape* md_shape = im_shape->GetImpl(); - - ::CORBA::Long ier = _vertex_cpp->setAssociation (md_shape, subid); - return ier; -} -// ========================================================= setName -void Vertex_impl::setName(const char* name) - throw (SALOME::SALOME_Exception) -{ - _vertex_cpp->setName (name); -} -// ========================================================= getAssoX -CORBA::Double Vertex_impl::getAssoX() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getAssoX(); -} -// ========================================================= getAssoY -CORBA::Double Vertex_impl::getAssoY() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getAssoY(); -} -// ========================================================= getAssoZ -CORBA::Double Vertex_impl::getAssoZ() throw(SALOME::SALOME_Exception) -{ - return _vertex_cpp->getAssoZ(); -} diff --git a/src/HEXABLOCK_I/HexVertex_impl.hxx b/src/HEXABLOCK_I/HexVertex_impl.hxx deleted file mode 100755 index bd2719f..0000000 --- a/src/HEXABLOCK_I/HexVertex_impl.hxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2009-2013 CEA/DEN, EDF R&D -// -// 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 __HexVertex_impl__ -#define __HexVertex_impl__ - -#include -#include CORBA_SERVER_HEADER(Vertex) -#include "SALOME_GenericObj_i.hh" - -#include "hexa_base.hxx" - -#include "HexVertex.hxx" -#include "HexNewShape_impl.hxx" - -class Vertex_impl : public POA_HEXABLOCK_ORB::Vertex, - public SALOME::GenericObj_i -{ -public: - Vertex_impl(HEXA_NS::Vertex *ptrCpp); - HEXA_NS::Vertex* GetImpl(); - - ::CORBA::Double getX() throw (SALOME::SALOME_Exception); - ::CORBA::Double getY() throw (SALOME::SALOME_Exception); - ::CORBA::Double getZ() throw (SALOME::SALOME_Exception); - - void setX(::CORBA::Double x) throw (SALOME::SALOME_Exception); - void setY(::CORBA::Double y) throw (SALOME::SALOME_Exception); - void setZ(::CORBA::Double z) throw (SALOME::SALOME_Exception); - GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception); - void clearAssociation() throw (SALOME::SALOME_Exception); - - void setColor (::CORBA::Double val) throw (SALOME::SALOME_Exception); - - void dump() throw (SALOME::SALOME_Exception); - void printName() throw (SALOME::SALOME_Exception); - char* getName() throw (SALOME::SALOME_Exception); - void setName (const char* name) throw (SALOME::SALOME_Exception); - - ::CORBA::Long setAssociation (NewShape_ptr geom, ::CORBA::Long subid) - throw (SALOME::SALOME_Exception); // Hexa5 - - ::CORBA::Double getAssoX() throw (SALOME::SALOME_Exception); - ::CORBA::Double getAssoY() throw (SALOME::SALOME_Exception); - ::CORBA::Double getAssoZ() throw (SALOME::SALOME_Exception); - -private: - HEXA_NS::Vertex* _vertex_cpp; -}; - -#endif diff --git a/src/HEXABLOCK_I/Makefile.am b/src/HEXABLOCK_I/Makefile.am deleted file mode 100755 index 34ec60e..0000000 --- a/src/HEXABLOCK_I/Makefile.am +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (C) 2009-2013 CEA/DEN, EDF R&D -# -# 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 -# -# File : Makefile.in -# Author : , CEA -# Modified by : Alexander BORODIN (OCN) - autotools usage -# -include $(top_srcdir)/adm_local/unix/make_common_starter.am - - - -# =============================================================== -# Files to be installed -# =============================================================== -# -# header files -salomeinclude_HEADERS = \ - HEXABLOCK.hxx \ - HexCrossElements_impl.hxx \ - HexCylinder_impl.hxx \ - HexDocument_impl.hxx \ - HexEdge_impl.hxx \ - HexElements_impl.hxx \ - HexGroup_impl.hxx \ - HexHexa_impl.hxx \ - HexLaw_impl.hxx \ - HexPipe_impl.hxx \ - HexPropagation_impl.hxx \ - HexQuad_impl.hxx \ - HexVector_impl.hxx \ - HexNewShape_impl.hxx \ - HexVertex_impl.hxx - -# Scripts to be installed -dist_salomescript_PYTHON = hexablock.py - -# Libraries targets -# SD/Propagation/HexPropagation.cxx \ -# SD/Law/HexLaw.cxx \ -# -lib_LTLIBRARIES = libHEXABLOCKEngine.la -dist_libHEXABLOCKEngine_la_SOURCES = \ - HexVertex_impl.cxx \ - HexEdge_impl.cxx \ - HexQuad_impl.cxx \ - HexHexa_impl.cxx \ - HexVector_impl.cxx \ - HexNewShape_impl.cxx \ - HexElements_impl.cxx \ - HexCrossElements_impl.cxx \ - HexCylinder_impl.cxx \ - HexPipe_impl.cxx \ - HexPropagation_impl.cxx \ - HexLaw_impl.cxx \ - HexGroup_impl.cxx \ - HexDocument_impl.cxx \ - HEXABLOCK.cxx \ - HEXABLOCK_1.cxx - - - -libHEXABLOCKEngine_la_CPPFLAGS = \ - $(CORBA_CXXFLAGS) \ - $(CORBA_INCLUDES) \ - $(KERNEL_CXXFLAGS) \ - $(GEOM_CXXFLAGS) \ - $(CAS_CPPFLAGS) \ - -I$(srcdir)/../HEXABLOCK \ - -I$(top_builddir) \ - -I$(top_builddir)/idl \ - -I$(top_builddir)/salome_adm/unix - -libHEXABLOCKEngine_la_LDFLAGS = \ - ../../idl/libSalomeIDLHEXABLOCK.la \ - ../HEXABLOCK/libHEXABLOCKimpl.la \ - $(KERNEL_LDFLAGS) -lOpUtil -lSalomeNS -lSalomeContainer -lSalomeGenericObj -lSalomeLifeCycleCORBA \ - $(CAS_LDPATH) \ - $(GEOM_LDFLAGS) -lGEOMClient - diff --git a/src/HEXABLOCK_I/hexablock.py b/src/HEXABLOCK_I/hexablock.py deleted file mode 100755 index 9f55227..0000000 --- a/src/HEXABLOCK_I/hexablock.py +++ /dev/null @@ -1,255 +0,0 @@ -# -*- coding: latin-1 -*- - -# Copyright (C) 2009-2013 CEA/DEN, EDF R&D -# -# 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 -# - -# Francis KLOSS - 2011-2013 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France -# ============================================================================================= - -import salome -import smesh - -from HEXABLOCK_ORB import * -import HEXABLOCKPlugin - -geompy = smesh.geompy - -# Gives the component name -# ----------------------------------------------------------- - -def moduleName() : - return "HEXABLOCK" - -# Load HEXABLOCK componant -# ------------------------ - -component = salome.lcc.FindOrLoadComponent("FactoryServer", moduleName()) -component = component._narrow(HEXABLOCK_Gen) - -for k in dir(component): - if k[0] == '_': - continue - globals()[k] = getattr(component, k) - -del k - -# Gives the component -# ----------------------------------------------------------- - -def getEngine() : - return component - -# Add laws on propagations based on min or max segment length -# ----------------------------------------------------------- - -def addLaws(doc, lg, lgmax=True): - laws = {} - n = doc.countPropagation() - for i in xrange(n): - p = doc.getPropagation(i) - if lgmax: - m = 0 - else: - m = (max) - for e in p.getEdges(): - a = e.getAssociations() - - if a == []: - vam = e.getVertex(0) - vag = vam.getAssociation() - if vag == None: - vax = vam.getX() - vay = vam.getY() - vaz = vam.getZ() - else: - vax, vay, vaz = geompy.PointCoordinates(vag) - - vbm = e.getVertex(1) - vbg = vbm.getAssociation() - if vbg == None: - vbx = vbm.getX() - vby = vbm.getY() - vbz = vbm.getZ() - else: - vbx, vby, vbz = geompy.PointCoordinates(vbg) - - l = ( (vbx-vax)**2 + (vby-vay)**2 + (vbz-vaz)**2 )**0.5 - - else: - l = 0.0 - for gdf in a: - le, su, vo = geompy.BasicProperties(gdf.geomObj) - l += le * (gdf.fin - gdf.debut) - - if ( lgmax and l>m ) or ( (not lgmax) and l