From: smh Date: Fri, 10 Dec 2004 13:38:25 +0000 (+0000) Subject: Additional modifications for PAL6944 (for testing GEOM operations X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FJR_ASV_2_1_0_deb;p=modules%2Fgeom.git Additional modifications for PAL6944 (for testing GEOM operations which has ListOfLong, ListOfDouble or ListOfGO as arguments) : creation of additional nodes in Supervision module which allow to: 1.create an empty list of predefined type items, 2.add item to already existing list. --- diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index d50c74abe..4f2c94f36 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -29,6 +29,9 @@ module GEOM { + interface GEOM_List + { }; + interface GEOM_Superv : Engines::Component,SALOMEDS::Driver { //-----------------------------------------------------------// @@ -36,6 +39,27 @@ module GEOM //-----------------------------------------------------------// void SetStudyID (in long theStudyID) ; + //-----------------------------------------------------------// + // Create ListOfGO and add items to it // + //-----------------------------------------------------------// + GEOM_List CreateListOfGO(); + void AddItemToListOfGO( inout GEOM_List theList, + in GEOM_Object theObject); + + //-----------------------------------------------------------// + // Create ListOfLong and add items to it // + //-----------------------------------------------------------// + GEOM_List CreateListOfLong(); + void AddItemToListOfLong( inout GEOM_List theList, + in long theObject); + + //-----------------------------------------------------------// + // Create ListOfDouble and add items to it // + //-----------------------------------------------------------// + GEOM_List CreateListOfDouble(); + void AddItemToListOfDouble( inout GEOM_List theList, + in double theObject); + //-----------------------------------------------------------// // Primitives Construction : BasicOperations // //-----------------------------------------------------------// @@ -61,9 +85,9 @@ module GEOM in double theTrimSize) ; GEOM_Object MakePlanePntVec (in GEOM_Object thePnt, in GEOM_Object theVec, - in double theTrimSize) ; + in double theTrimSize) ; GEOM_Object MakePlaneFace (in GEOM_Object theFace, - in double theTrimSize) ; + in double theTrimSize) ; GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ, in double theXDX, in double theXDY, in double theXDZ, in double theYDX, in double theYDY, in double theYDZ) ; @@ -84,8 +108,8 @@ module GEOM in GEOM_Object thePnt2) ; GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt, in GEOM_Object theAxis, - in double theRadius, - in double theHeight) ; + in double theRadius, + in double theHeight) ; GEOM_Object MakeCylinderRH (in double theR, in double theH) ; GEOM_Object MakeSphere (in double theX, @@ -94,18 +118,18 @@ module GEOM in double theRadius) ; GEOM_Object MakeSphereR (in double theR) ; GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, - in double theR) ; + in double theR) ; GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt, in GEOM_Object theVec, - in double theRMajor, - in double theRMinor) ; + in double theRMajor, + in double theRMinor) ; GEOM_Object MakeTorusRR (in double theRMajor, in double theRMinor) ; GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt, in GEOM_Object theAxis, - in double theR1, - in double theR2, - in double theHeight) ; + in double theR1, + in double theR2, + in double theHeight) ; GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theHeight) ; @@ -119,7 +143,7 @@ module GEOM in GEOM_Object thePath) ; GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase, in GEOM_Object theAxis, - in double theAngle) ; + in double theAngle) ; GEOM_Object MakeFilling (in GEOM_Object theShape, in long theMinDeg, in long theMaxDeg, in double theTol2D, in double theTol3D, @@ -130,16 +154,16 @@ module GEOM //-----------------------------------------------------------// GEOM_Object MakeBoolean (in GEOM_Object theShape1, in GEOM_Object theShape2, - in long theOperation) ; + in long theOperation) ; GEOM_Object MakeFuse (in GEOM_Object theShape1, in GEOM_Object theShape2) ; - GEOM_Object MakePartition (in ListOfGO theShapes, - in ListOfGO theTools, - in ListOfGO theKeepInside, - in ListOfGO theRemoveInside, - in short theLimit, - in boolean theRemoveWebs, - in ListOfLong theMaterials) ; + GEOM_Object MakePartition (in GEOM_List theShapes, + in GEOM_List theTools, + in GEOM_List theKeepInside, + in GEOM_List theRemoveInside, + in short theLimit, + in boolean theRemoveWebs, + in GEOM_List theMaterials) ; GEOM_Object MakeHalfPartition (in GEOM_Object theShape, in GEOM_Object thePlane) ; @@ -164,55 +188,65 @@ module GEOM in GEOM_Object thePoint1, in GEOM_Object thePoint2) ; GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject, - in double theDX, - in double theDY, - in double theDZ) ; + in double theDX, + in double theDY, + in double theDZ) ; GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject, - in double theDX, - in double theDY, - in double theDZ) ; + in double theDX, + in double theDY, + in double theDZ) ; GEOM_Object TranslateVector (in GEOM_Object theObject, in GEOM_Object theVector) ; GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, in GEOM_Object theVector) ; GEOM_Object MultiTranslate1D (in GEOM_Object theObject, in GEOM_Object theVector, - in double theStep, - in long theNbTimes) ; + in double theStep, + in long theNbTimes) ; GEOM_Object MultiTranslate2D (in GEOM_Object theObject, in GEOM_Object theVector1, - in double theStep1, - in long theNbTimes1, + in double theStep1, + in long theNbTimes1, in GEOM_Object theVector2, - in double theStep2, - in long theNbTimes2) ; + in double theStep2, + in long theNbTimes2) ; GEOM_Object Rotate (in GEOM_Object theObject, in GEOM_Object theAxis, - in double theAngle) ; + in double theAngle) ; GEOM_Object RotateCopy (in GEOM_Object theObject, in GEOM_Object theAxis, - in double theAngle) ; + in double theAngle) ; GEOM_Object MultiRotate1D (in GEOM_Object theObject, in GEOM_Object theAxis, - in long theNbTimes) ; + in long theNbTimes) ; GEOM_Object MultiRotate2D (in GEOM_Object theObject, in GEOM_Object theAxis, - in double theAngle, - in long theNbTimes1, - in double theStep, - in long theNbTimes2) ; - GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane) ; - GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane) ; - GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis) ; - GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis) ; - GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint) ; - GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint) ; - GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset) ; - GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset) ; - GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint, - in double theFactor) ; - GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, - in double theFactor) ; + in double theAngle, + in long theNbTimes1, + in double theStep, + in long theNbTimes2) ; + GEOM_Object MirrorPlane (in GEOM_Object theObject, + in GEOM_Object thePlane) ; + GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, + in GEOM_Object thePlane) ; + GEOM_Object MirrorAxis (in GEOM_Object theObject, + in GEOM_Object theAxis) ; + GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, + in GEOM_Object theAxis) ; + GEOM_Object MirrorPoint (in GEOM_Object theObject, + in GEOM_Object thePoint) ; + GEOM_Object MirrorPointCopy (in GEOM_Object theObject, + in GEOM_Object thePoint) ; + GEOM_Object OffsetShape (in GEOM_Object theObject, + in double theOffset) ; + GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, + in double theOffset) ; + GEOM_Object ScaleShape (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactor) ; + GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactor) ; GEOM_Object PositionShape (in GEOM_Object theObject, in GEOM_Object theStartLCS, in GEOM_Object theEndLCS) ; @@ -223,18 +257,22 @@ module GEOM //-----------------------------------------------------------// // ShapesOperations // //-----------------------------------------------------------// - GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2) ; - GEOM_Object MakeWire (in ListOfGO theEdgesAndWires) ; - GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted) ; - GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted) ; - GEOM_Object MakeShell (in ListOfGO theFacesAndShells) ; + GEOM_Object MakeEdge (in GEOM_Object thePnt1, + in GEOM_Object thePnt2) ; + GEOM_Object MakeWire (in GEOM_List theEdgesAndWires) ; + GEOM_Object MakeFace (in GEOM_Object theWire, + in boolean isPlanarWanted) ; + GEOM_Object MakeFaceWires (in GEOM_List theWires, + in boolean isPlanarWanted) ; + GEOM_Object MakeShell (in GEOM_List theFacesAndShells) ; GEOM_Object MakeSolidShell (in GEOM_Object theShell) ; - GEOM_Object MakeSolidShells (in ListOfGO theShells) ; - GEOM_Object MakeCompound (in ListOfGO theShapes) ; - GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance) ; - ListOfGO MakeExplode (in GEOM_Object theShape, - in long theShapeType, - in boolean isSorted) ; + GEOM_Object MakeSolidShells (in GEOM_List theShells) ; + GEOM_Object MakeCompound (in GEOM_List theShapes) ; + GEOM_Object MakeGlueFaces (in GEOM_Object theShape, + in double theTolerance) ; + GEOM_List MakeExplode (in GEOM_Object theShape, + in long theShapeType, + in boolean isSorted) ; long NumberOfFaces (in GEOM_Object theShape) ; long NumberOfEdges (in GEOM_Object theShape) ; GEOM_Object ChangeOrientation (in GEOM_Object theShape) ; @@ -292,15 +330,15 @@ module GEOM out GEOM_IBlocksOperations::BCErrors theErrors) ; string PrintBCErrors (in GEOM_Object theCompound, in GEOM_IBlocksOperations::BCErrors theErrors) ; - ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, - in long theMinNbFaces, - in long theMaxNbFaces) ; + GEOM_List ExplodeCompoundOfBlocks (in GEOM_Object theCompound, + in long theMinNbFaces, + in long theMaxNbFaces) ; GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound, in GEOM_Object thePoint) ; GEOM_Object GetBlockByParts (in GEOM_Object theCompound, - in ListOfGO theParts) ; - ListOfGO GetBlocksByParts (in GEOM_Object theCompound, - in ListOfGO theParts) ; + in GEOM_List theParts) ; + GEOM_List GetBlocksByParts (in GEOM_Object theCompound, + in GEOM_List theParts) ; GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock, in long theDirFace1, in long theDirFace2, @@ -318,21 +356,22 @@ module GEOM //-----------------------------------------------------------// GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt, in GEOM_Object theVec, - in double theR) ; + in double theR) ; GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3) ; GEOM_Object MakeEllipse (in GEOM_Object thePnt, in GEOM_Object theVec, - in double theRMajor, - in double theRMinor) ; + in double theRMajor, + in double theRMinor) ; GEOM_Object MakeArc (in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3) ; - GEOM_Object MakePolyline (in ListOfGO thePoints) ; - GEOM_Object MakeSplineBezier (in ListOfGO thePoints) ; - GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints) ; - GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane) ; + GEOM_Object MakePolyline (in GEOM_List thePoints) ; + GEOM_Object MakeSplineBezier (in GEOM_List thePoints) ; + GEOM_Object MakeSplineInterpolation (in GEOM_List thePoints) ; + GEOM_Object MakeSketcher (in string theCommand, + in GEOM_List theWorkingPlane) ; //-----------------------------------------------------------// // LocalOperations // @@ -341,10 +380,10 @@ module GEOM in double theR) ; GEOM_Object MakeFilletEdges (in GEOM_Object theShape, in double theR, - in ListOfLong theEdges) ; + in GEOM_List theEdges) ; GEOM_Object MakeFilletFaces (in GEOM_Object theShape, in double theR, - in ListOfLong theFaces) ; + in GEOM_List theFaces) ; GEOM_Object MakeChamferAll (in GEOM_Object theShape, in double theD) ; GEOM_Object MakeChamferEdge (in GEOM_Object theShape, @@ -352,22 +391,26 @@ module GEOM in long theFace1, in long theFace2) ; GEOM_Object MakeChamferFaces (in GEOM_Object theShape, in double theD1, in double theD2, - in ListOfLong theFaces) ; + in GEOM_List theFaces) ; GEOM_Object MakeArchimede (in GEOM_Object theShape, - in double theWeight, - in double theWaterDensity, - in double theMeshDeflection) ; - long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape) ; + in double theWeight, + in double theWaterDensity, + in double theMeshDeflection) ; + long GetSubShapeIndex (in GEOM_Object theShape, + in GEOM_Object theSubShape) ; //-----------------------------------------------------------// // GroupOperations // //-----------------------------------------------------------// - GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType) ; - void AddObject (in GEOM_Object theGroup, in long theSubShapeId) ; - void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId) ; + GEOM_Object CreateGroup (in GEOM_Object theMainShape, + in long theShapeType) ; + void AddObject (in GEOM_Object theGroup, + in long theSubShapeId) ; + void RemoveObject (in GEOM_Object theGroup, + in long theSubShapeId) ; long GetType (in GEOM_Object theGroup) ; GEOM_Object GetMainShape(in GEOM_Object theGroup) ; - ListOfLong GetObjects(in GEOM_Object theGroup) ; + GEOM_List GetObjects(in GEOM_Object theGroup) ; }; }; diff --git a/resources/GEOMCatalog.xml b/resources/GEOMCatalog.xml index 136e16d19..098676741 100644 --- a/resources/GEOMCatalog.xml +++ b/resources/GEOMCatalog.xml @@ -525,7 +525,7 @@ GEOM_Superv GEOM_Superv OTHER - asv + mkr 2.1.0 unknown 1 @@ -537,7 +537,7 @@ SetStudyID - asv + mkr 2.1.0 unknown 0 @@ -551,9 +551,138 @@ + + CreateListOfGO + mkr + 2.1.0 + unknown + 0 + + + + return + GEOM_List + unknown + + + + + + AddItemToListOfGO + mkr + 2.1.0 + unknown + 0 + + + theList + GEOM_List + unknown + + + theObject + GEOM_Object + unknown + + + + + theList + GEOM_List + unknown + + + + + + CreateListOfLong + mkr + 2.1.0 + unknown + 0 + + + + return + GEOM_List + unknown + + + + + + AddItemToListOfLong + mkr + 2.1.0 + unknown + 0 + + + theList + GEOM_List + unknown + + + theObject + long + unknown + + + + + theList + GEOM_List + unknown + + + + + + CreateListOfDouble + mkr + 2.1.0 + unknown + 0 + + + + return + GEOM_List + unknown + + + + + + AddItemToListOfDouble + mkr + 2.1.0 + unknown + 0 + + + theList + GEOM_List + unknown + + + theObject + double + unknown + + + + + theList + GEOM_List + unknown + + + + MakePointXYZ - asv + mkr 2.1.0 unknown 0 @@ -585,7 +714,7 @@ MakePointWithReference - asv + mkr 2.1.0 unknown 0 @@ -622,7 +751,7 @@ MakePointOnCurve - asv + mkr 2.1.0 unknown 0 @@ -649,7 +778,7 @@ MakeVectorDXDYDZ - asv + mkr 2.1.0 unknown 0 @@ -681,7 +810,7 @@ MakeVectorTwoPnt - asv + mkr 2.1.0 unknown 0 @@ -708,7 +837,7 @@ MakeLineTwoPnt - asv + mkr 2.1.0 unknown 0 @@ -735,7 +864,7 @@ MakePlaneThreePnt - asv + mkr 2.1.0 unknown 0 @@ -772,7 +901,7 @@ MakePlanePntVec - asv + mkr 2.1.0 unknown 0 @@ -804,7 +933,7 @@ MakePlaneFace - asv + mkr 2.1.0 unknown 0 @@ -831,7 +960,7 @@ MakeMarker - asv + mkr 2.1.0 unknown 0 @@ -893,7 +1022,7 @@ MakeBox - asv + mkr 2.1.0 unknown 0 @@ -940,7 +1069,7 @@ MakeBoxDXDYDZ - asv + mkr 2.1.0 unknown 0 @@ -972,7 +1101,7 @@ MakeBoxTwoPnt - asv + mkr 2.1.0 unknown 0 @@ -999,7 +1128,7 @@ MakeCylinderPntVecRH - asv + mkr 2.1.0 unknown 0 @@ -1036,7 +1165,7 @@ MakeCylinderRH - asv + mkr 2.1.0 unknown 0 @@ -1063,7 +1192,7 @@ MakeSphere - asv + mkr 2.1.0 unknown 0 @@ -1100,7 +1229,7 @@ MakeSphereR - asv + mkr 2.1.0 unknown 0 @@ -1122,7 +1251,7 @@ MakeSpherePntR - asv + mkr 2.1.0 unknown 0 @@ -1149,7 +1278,7 @@ MakeTorusPntVecRR - asv + mkr 2.1.0 unknown 0 @@ -1186,7 +1315,7 @@ MakeTorusRR - asv + mkr 2.1.0 unknown 0 @@ -1213,7 +1342,7 @@ MakeConePntVecR1R2H - asv + mkr 2.1.0 unknown 0 @@ -1255,7 +1384,7 @@ MakeConeR1R2H - asv + mkr 2.1.0 unknown 0 @@ -1287,7 +1416,7 @@ MakePrismVecH - asv + mkr 2.1.0 unknown 0 @@ -1319,7 +1448,7 @@ MakePrismTwoPnt - asv + mkr 2.1.0 unknown 0 @@ -1351,7 +1480,7 @@ MakePipe - asv + mkr 2.1.0 unknown 0 @@ -1378,7 +1507,7 @@ MakeRevolutionAxisAngle - asv + mkr 2.1.0 unknown 0 @@ -1410,7 +1539,7 @@ MakeFilling - asv + mkr 2.1.0 unknown 0 @@ -1457,7 +1586,7 @@ MakeBoolean - asv + mkr 2.1.0 unknown 0 @@ -1489,7 +1618,7 @@ MakeFuse - asv + mkr 2.1.0 unknown 0 @@ -1516,29 +1645,29 @@ MakePartition - asv + mkr 2.1.0 unknown 0 theShapes - ListOfGO + GEOM_List unknown theTools - ListOfGO + GEOM_List unknown theKeepInside - ListOfGO + GEOM_List unknown theRemoveInside - ListOfGO + GEOM_List unknown @@ -1553,7 +1682,7 @@ theMaterials - ListOfLong + GEOM_List unknown @@ -1568,7 +1697,7 @@ MakeHalfPartition - asv + mkr 2.1.0 unknown 0 @@ -1595,7 +1724,7 @@ MakeCopy - asv + mkr 2.1.0 unknown 0 @@ -1617,7 +1746,7 @@ Export - asv + mkr 2.1.0 unknown 0 @@ -1643,7 +1772,7 @@ Import - asv + mkr 2.1.0 unknown 0 @@ -1670,7 +1799,7 @@ ImportTranslators - asv + mkr 2.1.0 unknown 0 @@ -1691,7 +1820,7 @@ ExportTranslators - asv + mkr 2.1.0 unknown 0 @@ -1712,7 +1841,7 @@ TranslateTwoPoints - asv + mkr 2.1.0 unknown 0 @@ -1744,7 +1873,7 @@ TranslateTwoPointsCopy - asv + mkr 2.1.0 unknown 0 @@ -1776,7 +1905,7 @@ TranslateDXDYDZ - asv + mkr 2.1.0 unknown 0 @@ -1813,7 +1942,7 @@ TranslateDXDYDZCopy - asv + mkr 2.1.0 unknown 0 @@ -1850,7 +1979,7 @@ TranslateVector - asv + mkr 2.1.0 unknown 0 @@ -1877,7 +2006,7 @@ TranslateVectorCopy - asv + mkr 2.1.0 unknown 0 @@ -1904,7 +2033,7 @@ MultiTranslate1D - asv + mkr 2.1.0 unknown 0 @@ -1941,7 +2070,7 @@ MultiTranslate2D - asv + mkr 2.1.0 unknown 0 @@ -1993,7 +2122,7 @@ Rotate - asv + mkr 2.1.0 unknown 0 @@ -2025,7 +2154,7 @@ RotateCopy - asv + mkr 2.1.0 unknown 0 @@ -2057,7 +2186,7 @@ MultiRotate1D - asv + mkr 2.1.0 unknown 0 @@ -2089,7 +2218,7 @@ MultiRotate2D - asv + mkr 2.1.0 unknown 0 @@ -2136,7 +2265,7 @@ MirrorPlane - asv + mkr 2.1.0 unknown 0 @@ -2163,7 +2292,7 @@ MirrorPlaneCopy - asv + mkr 2.1.0 unknown 0 @@ -2190,7 +2319,7 @@ MirrorAxis - asv + mkr 2.1.0 unknown 0 @@ -2217,7 +2346,7 @@ MirrorAxisCopy - asv + mkr 2.1.0 unknown 0 @@ -2244,7 +2373,7 @@ MirrorPoint - asv + mkr 2.1.0 unknown 0 @@ -2271,7 +2400,7 @@ MirrorPointCopy - asv + mkr 2.1.0 unknown 0 @@ -2298,7 +2427,7 @@ OffsetShape - asv + mkr 2.1.0 unknown 0 @@ -2325,7 +2454,7 @@ OffsetShapeCopy - asv + mkr 2.1.0 unknown 0 @@ -2352,7 +2481,7 @@ ScaleShape - asv + mkr 2.1.0 unknown 0 @@ -2384,7 +2513,7 @@ ScaleShapeCopy - asv + mkr 2.1.0 unknown 0 @@ -2416,7 +2545,7 @@ PositionShape - asv + mkr 2.1.0 unknown 0 @@ -2448,7 +2577,7 @@ PositionShapeCopy - asv + mkr 2.1.0 unknown 0 @@ -2480,7 +2609,7 @@ MakeEdge - asv + mkr 2.1.0 unknown 0 @@ -2507,14 +2636,14 @@ MakeWire - asv + mkr 2.1.0 unknown 0 theEdgesAndWires - ListOfGO + GEOM_List unknown @@ -2529,7 +2658,7 @@ MakeFace - asv + mkr 2.1.0 unknown 0 @@ -2556,14 +2685,14 @@ MakeFaceWires - asv + mkr 2.1.0 unknown 0 theWires - ListOfGO + GEOM_List unknown @@ -2583,14 +2712,14 @@ MakeShell - asv + mkr 2.1.0 unknown 0 theFacesAndShells - ListOfGO + GEOM_List unknown @@ -2605,7 +2734,7 @@ MakeSolidShell - asv + mkr 2.1.0 unknown 0 @@ -2627,14 +2756,14 @@ MakeSolidShells - asv + mkr 2.1.0 unknown 0 theShells - ListOfGO + GEOM_List unknown @@ -2649,14 +2778,14 @@ MakeCompound - asv + mkr 2.1.0 unknown 0 theShapes - ListOfGO + GEOM_List unknown @@ -2671,7 +2800,7 @@ MakeGlueFaces - asv + mkr 2.1.0 unknown 0 @@ -2698,7 +2827,7 @@ MakeExplode - asv + mkr 2.1.0 unknown 0 @@ -2722,7 +2851,7 @@ return - ListOfGO + GEOM_List unknown @@ -2730,7 +2859,7 @@ NumberOfFaces - asv + mkr 2.1.0 unknown 0 @@ -2752,7 +2881,7 @@ NumberOfEdges - asv + mkr 2.1.0 unknown 0 @@ -2774,7 +2903,7 @@ ChangeOrientation - asv + mkr 2.1.0 unknown 0 @@ -2796,7 +2925,7 @@ MakeQuad4Vertices - asv + mkr 2.1.0 unknown 0 @@ -2833,7 +2962,7 @@ MakeQuad - asv + mkr 2.1.0 unknown 0 @@ -2870,7 +2999,7 @@ MakeQuad2Edges - asv + mkr 2.1.0 unknown 0 @@ -2897,7 +3026,7 @@ MakeHexa - asv + mkr 2.1.0 unknown 0 @@ -2944,7 +3073,7 @@ MakeHexa2Faces - asv + mkr 2.1.0 unknown 0 @@ -2971,7 +3100,7 @@ GetPoint - asv + mkr 2.1.0 unknown 0 @@ -3013,7 +3142,7 @@ GetEdge - asv + mkr 2.1.0 unknown 0 @@ -3045,7 +3174,7 @@ GetEdgeNearPoint - asv + mkr 2.1.0 unknown 0 @@ -3072,7 +3201,7 @@ GetFaceByPoints - asv + mkr 2.1.0 unknown 0 @@ -3114,7 +3243,7 @@ GetFaceByEdges - asv + mkr 2.1.0 unknown 0 @@ -3146,7 +3275,7 @@ GetOppositeFace - asv + mkr 2.1.0 unknown 0 @@ -3173,7 +3302,7 @@ GetFaceNearPoint - asv + mkr 2.1.0 unknown 0 @@ -3200,7 +3329,7 @@ GetFaceByNormale - asv + mkr 2.1.0 unknown 0 @@ -3227,7 +3356,7 @@ IsCompoundOfBlocks - asv + mkr 2.1.0 unknown 0 @@ -3264,7 +3393,7 @@ CheckCompoundOfBlocks - asv + mkr 2.1.0 unknown 0 @@ -3291,7 +3420,7 @@ PrintBCErrors - asv + mkr 2.1.0 unknown 0 @@ -3318,7 +3447,7 @@ ExplodeCompoundOfBlocks - asv + mkr 2.1.0 unknown 0 @@ -3342,7 +3471,7 @@ return - ListOfGO + GEOM_List unknown @@ -3350,7 +3479,7 @@ GetBlockNearPoint - asv + mkr 2.1.0 unknown 0 @@ -3377,7 +3506,7 @@ GetBlockByParts - asv + mkr 2.1.0 unknown 0 @@ -3389,7 +3518,7 @@ theParts - ListOfGO + GEOM_List unknown @@ -3404,7 +3533,7 @@ GetBlocksByParts - asv + mkr 2.1.0 unknown 0 @@ -3416,14 +3545,14 @@ theParts - ListOfGO + GEOM_List unknown return - ListOfGO + GEOM_List unknown @@ -3431,7 +3560,7 @@ MakeMultiTransformation1D - asv + mkr 2.1.0 unknown 0 @@ -3468,7 +3597,7 @@ MakeMultiTransformation2D - asv + mkr 2.1.0 unknown 0 @@ -3520,7 +3649,7 @@ MakeCirclePntVecR - asv + mkr 2.1.0 unknown 0 @@ -3552,7 +3681,7 @@ MakeCircleThreePnt - asv + mkr 2.1.0 unknown 0 @@ -3584,7 +3713,7 @@ MakeEllipse - asv + mkr 2.1.0 unknown 0 @@ -3621,7 +3750,7 @@ MakeArc - asv + mkr 2.1.0 unknown 0 @@ -3653,14 +3782,14 @@ MakePolyline - asv + mkr 2.1.0 unknown 0 thePoints - ListOfGO + GEOM_List unknown @@ -3675,14 +3804,14 @@ MakeSplineBezier - asv + mkr 2.1.0 unknown 0 thePoints - ListOfGO + GEOM_List unknown @@ -3697,14 +3826,14 @@ MakeSplineInterpolation - asv + mkr 2.1.0 unknown 0 thePoints - ListOfGO + GEOM_List unknown @@ -3719,7 +3848,7 @@ MakeSketcher - asv + mkr 2.1.0 unknown 0 @@ -3731,7 +3860,7 @@ theWorkingPlane - ListOfDouble + GEOM_List unknown @@ -3746,7 +3875,7 @@ MakeFilletAll - asv + mkr 2.1.0 unknown 0 @@ -3773,7 +3902,7 @@ MakeFilletEdges - asv + mkr 2.1.0 unknown 0 @@ -3790,7 +3919,7 @@ theEdges - ListOfLong + GEOM_List unknown @@ -3805,7 +3934,7 @@ MakeFilletFaces - asv + mkr 2.1.0 unknown 0 @@ -3822,7 +3951,7 @@ theFaces - ListOfLong + GEOM_List unknown @@ -3837,7 +3966,7 @@ MakeChamferAll - asv + mkr 2.1.0 unknown 0 @@ -3864,7 +3993,7 @@ MakeChamferEdge - asv + mkr 2.1.0 unknown 0 @@ -3906,7 +4035,7 @@ MakeChamferFaces - asv + mkr 2.1.0 unknown 0 @@ -3928,7 +4057,7 @@ theFaces - ListOfLong + GEOM_List unknown @@ -3943,7 +4072,7 @@ MakeArchimede - asv + mkr 2.1.0 unknown 0 @@ -3980,7 +4109,7 @@ GetSubShapeIndex - asv + mkr 2.1.0 unknown 0 @@ -4007,7 +4136,7 @@ CreateGroup - asv + mkr 2.1.0 unknown 0 @@ -4034,7 +4163,7 @@ AddObject - asv + mkr 2.1.0 unknown 0 @@ -4055,7 +4184,7 @@ RemoveObject - asv + mkr 2.1.0 unknown 0 @@ -4076,7 +4205,7 @@ GetType - asv + mkr 2.1.0 unknown 0 @@ -4098,7 +4227,7 @@ GetMainShape - asv + mkr 2.1.0 unknown 0 @@ -4120,7 +4249,7 @@ GetObjects - asv + mkr 2.1.0 unknown 0 @@ -4134,7 +4263,7 @@ return - ListOfLong + GEOM_List unknown diff --git a/src/GEOM_I_Superv/GEOM_List_i.hh b/src/GEOM_I_Superv/GEOM_List_i.hh new file mode 100644 index 000000000..293881e9a --- /dev/null +++ b/src/GEOM_I_Superv/GEOM_List_i.hh @@ -0,0 +1,85 @@ +#ifndef __GEOM_LIST_I_H__ +#define __GEOM_LIST_I_H__ + +// IDL headers +#include +#include CORBA_SERVER_HEADER(GEOM_Superv) + +#include "GEOM_Gen_i.hh" +#include "utilities.h" + +template +class GEOM_List_i : + public virtual POA_GEOM::GEOM_List, + public virtual PortableServer::RefCountServantBase +{ +public: + GEOM_List_i(); + GEOM_List_i(const Type& theListToCopy); + ~GEOM_List_i(); + + const Type& GetList(); + + template + void AddObject(ElemType theObject); + +private: + Type myGOList; +}; + +//============================================================================= +// constructor: +//============================================================================= +template +GEOM_List_i::GEOM_List_i() +{ + MESSAGE("GEOM_List_i::GEOM_List_i"); + //create an empty list + myGOList.length(0); +} + +//============================================================================= +// constructor: +//============================================================================= +template +GEOM_List_i::GEOM_List_i(const Type& theListToCopy) +{ + int aLength = theListToCopy.length(); + myGOList.length(aLength); + for (int i = 0; i < aLength; i++) + myGOList[i] = theListToCopy[i]; +} + +//============================================================================= +// destructor: +//============================================================================= +template +GEOM_List_i::~GEOM_List_i() +{ + MESSAGE("GEOM_List_i::~GEOM_List_i"); +} + +//============================================================================= +// GetList: +//============================================================================= +template +const Type& GEOM_List_i::GetList() +{ + MESSAGE("GEOM_List_i::GetList()"); + return myGOList; +} + +//============================================================================= +// AddObject: +//============================================================================= +template +template +void GEOM_List_i::AddObject(ElemType theObject) +{ + MESSAGE("GEOM_List_i::AddObject(...)"); + int aLength = myGOList.length(); + myGOList.length(aLength+1); + myGOList[aLength] = theObject; +} + +#endif diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 360ad2686..445ba9b62 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -17,6 +17,10 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb, _thisObj = this ; _id = _poa->activate_object(_thisObj); name_service = new SALOME_NamingService(_orb); + //get RootPOA (the default) + //myPOA = PortableServer::RefCountServantBase::_default_POA(); + CORBA::Object_var anObj = _orb->resolve_initial_references("RootPOA"); + myPOA = PortableServer::POA::_narrow(anObj); myGeomEngine = GEOM::GEOM_Gen::_nil(); myStudyID = -1; @@ -72,6 +76,78 @@ void GEOM_Superv_i::SetStudyID( CORBA::Long theId ) myStudyID = theId; } +//============================================================================= +// CreateListOfGO: +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO() +{ + MESSAGE("GEOM_Superv_i::CreateListOfGO()"); + GEOM_List_i* aListPtr = new GEOM_List_i(); + return aListPtr->_this(); +} + +//============================================================================= +// AddItemToListOfGO: +//============================================================================= +void GEOM_Superv_i::AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, + GEOM::GEOM_Object_ptr theObject) +{ + MESSAGE("GEOM_Superv_i::AddItemToListOfGO(...)"); + if (GEOM_List_i* aList = + dynamic_cast*>(GetServant(theList, myPOA).in())) { + aList->AddObject(theObject); + MESSAGE(" NewLength = "<GetList().length()); + } +} + +//============================================================================= +// CreateListOfLong: +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong() +{ + MESSAGE("GEOM_Superv_i::CreateListOfLong()"); + GEOM_List_i* aListPtr = new GEOM_List_i(); + return aListPtr->_this(); +} + +//============================================================================= +// AddItemToListOfLong: +//============================================================================= +void GEOM_Superv_i::AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, + long theObject) +{ + MESSAGE("GEOM_Superv_i::AddItemToListOfLong(...)"); + if (GEOM_List_i* aList = + dynamic_cast*>(GetServant(theList, myPOA).in())) { + aList->AddObject(theObject); + MESSAGE(" NewLength = "<GetList().length()); + } +} + +//============================================================================= +// CreateListOfDouble: +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble() +{ + MESSAGE("GEOM_Superv_i::CreateListOfDouble()"); + GEOM_List_i* aListPtr = new GEOM_List_i(); + return aListPtr->_this(); +} + +//============================================================================= +// AddItemToListOfDouble: +//============================================================================= +void GEOM_Superv_i::AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, + double theObject) +{ + MESSAGE("GEOM_Superv_i::AddItemToListOfDouble(...)"); + if (GEOM_List_i* aList = + dynamic_cast*>(GetServant(theList, myPOA).in())) { + aList->AddObject(theObject); + MESSAGE(" NewLength = "<GetList().length()); + } +} + //============================================================================= // getBasicOp: //============================================================================= @@ -182,6 +258,17 @@ void GEOM_Superv_i::getGroupOp() myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID); } +//============================================================================= +// GetServant: +//============================================================================= +PortableServer::ServantBase_var GEOM_Superv_i::GetServant(CORBA::Object_ptr theObject, + PortableServer::POA_ptr thePOA) +{ + if(CORBA::is_nil(theObject)) return NULL; + PortableServer::Servant aServant = thePOA->reference_to_servant(theObject); + return aServant; +} + //============================================================================ // function : Save() // purpose : save OCAF/Geom document @@ -698,18 +785,32 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1, //============================================================================= // MakePartition: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (const GEOM::ListOfGO& theShapes, - const GEOM::ListOfGO& theTools, - const GEOM::ListOfGO& theKeepInside, - const GEOM::ListOfGO& theRemoveInside, +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes, + GEOM::GEOM_List_ptr theTools, + GEOM::GEOM_List_ptr theKeepInside, + GEOM::GEOM_List_ptr theRemoveInside, const CORBA::Short theLimit, const CORBA::Boolean theRemoveWebs, - const GEOM::ListOfLong& theMaterials) + GEOM::GEOM_List_ptr theMaterials) { MESSAGE("GEOM_Superv_i::MakePartition"); - if (CORBA::is_nil(myBoolOp)) getBoolOp(); - return myBoolOp->MakePartition(theShapes, theTools, theKeepInside, theRemoveInside, - theLimit, theRemoveWebs, theMaterials); + GEOM_List_i* aListImplS = + dynamic_cast*>(GetServant(theShapes, myPOA).in()); + GEOM_List_i* aListImplT = + dynamic_cast*>(GetServant(theTools, myPOA).in()); + GEOM_List_i* aListImplKI = + dynamic_cast*>(GetServant(theKeepInside, myPOA).in()); + GEOM_List_i* aListImplRI = + dynamic_cast*>(GetServant(theRemoveInside, myPOA).in()); + GEOM_List_i* aListImplM = + dynamic_cast*>(GetServant(theMaterials, myPOA).in()); + if (aListImplS && aListImplT && aListImplKI && aListImplRI && aListImplM) { + if (CORBA::is_nil(myBoolOp)) getBoolOp(); + return myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(), + aListImplKI->GetList(), aListImplRI->GetList(), + theLimit, theRemoveWebs, aListImplM->GetList()); + } + return NULL; } //============================================================================= @@ -1084,11 +1185,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1, //============================================================================= // MakeWire: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (const GEOM::ListOfGO& theEdgesAndWires) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires) { MESSAGE("GEOM_Superv_i::MakeWire"); - if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeWire(theEdgesAndWires); + if (GEOM_List_i* aListImplEW = + dynamic_cast*>(GetServant(theEdgesAndWires, myPOA).in())) { + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeWire(aListImplEW->GetList()); + } + return NULL; } //============================================================================= @@ -1105,22 +1210,30 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire, //============================================================================= // MakeFaceWires: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (const GEOM::ListOfGO& theWires, +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (GEOM::GEOM_List_ptr theWires, CORBA::Boolean isPlanarWanted) { MESSAGE("GEOM_Superv_i::MakeFaceWires"); - if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeFaceWires(theWires, isPlanarWanted); + if (GEOM_List_i* aListImplW = + dynamic_cast*>(GetServant(theWires, myPOA).in())) { + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted); + } + return NULL; } //============================================================================= // MakeShell: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (const GEOM::ListOfGO& theFacesAndShells) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (GEOM::GEOM_List_ptr theFacesAndShells) { MESSAGE("GEOM_Superv_i::MakeShell"); - if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeShell(theFacesAndShells); + if (GEOM_List_i* aListImplFS = + dynamic_cast*>(GetServant(theFacesAndShells, myPOA).in())) { + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeShell(aListImplFS->GetList()); + } + return NULL; } //============================================================================= @@ -1136,21 +1249,29 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theSh //============================================================================= // MakeSolidShells: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (const GEOM::ListOfGO& theShells) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (GEOM::GEOM_List_ptr theShells) { MESSAGE("GEOM_Superv_i::MakeSolidShells"); - if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeSolidShells(theShells); + if (GEOM_List_i* aListImplS = + dynamic_cast*>(GetServant(theShells, myPOA).in())) { + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeSolidShells(aListImplS->GetList()); + } + return NULL; } //============================================================================= // MakeCompound: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (const GEOM::ListOfGO& theShapes) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (GEOM::GEOM_List_ptr theShapes) { MESSAGE("GEOM_Superv_i::MakeCompound"); - if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeCompound(theShapes); + if (GEOM_List_i* aListImpl = + dynamic_cast*>(GetServant(theShapes, myPOA).in())) { + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeCompound(aListImpl->GetList()); + } + return NULL; } //============================================================================= @@ -1167,13 +1288,17 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theSha //============================================================================= // MakeExplode: //============================================================================= -GEOM::ListOfGO* GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape, - const CORBA::Long theShapeType, - const CORBA::Boolean isSorted) +GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted) { MESSAGE("GEOM_Superv_i::MakeExplode"); if (CORBA::is_nil(myShapesOp)) getShapesOp(); - return myShapesOp->MakeExplode(theShape, theShapeType, isSorted); + + GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted); + GEOM_List_i* aListPtr = new GEOM_List_i(*(aList)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + return aListPtr->_this(); } //============================================================================= @@ -1406,13 +1531,15 @@ char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, //============================================================================= // ExplodeCompoundOfBlocks: //============================================================================= -GEOM::ListOfGO* GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, - const CORBA::Long theMinNbFaces, - const CORBA::Long theMaxNbFaces) +GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces) { MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks"); if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); - return myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces); + GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces); + GEOM_List_i* aListPtr = new GEOM_List_i(*(aBlocks)); + return aListPtr->_this(); } //============================================================================= @@ -1430,22 +1557,33 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr th // GetBlockByParts: //============================================================================= GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, - const GEOM::ListOfGO& theParts) + GEOM::GEOM_List_ptr theParts) { MESSAGE("GEOM_Superv_i::GetBlockByParts"); - if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); - return myBlocksOp->GetBlockByParts(theCompound, theParts); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(theParts, myPOA).in())) { + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList()); + } + return NULL; } //============================================================================= // GetBlocksByParts: //============================================================================= -GEOM::ListOfGO* GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, - const GEOM::ListOfGO& theParts) +GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_List_ptr theParts) { MESSAGE("GEOM_Superv_i::GetBlocksByParts"); - if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); - return myBlocksOp->GetBlocksByParts(theCompound, theParts); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(theParts, myPOA).in())) { + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + + GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList()); + GEOM_List_i* aListPtr = new GEOM_List_i(*(aBlocks)); + return aListPtr->_this(); + } + return NULL; } //============================================================================= @@ -1533,42 +1671,58 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1, //============================================================================= // MakePolyline: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (const GEOM::ListOfGO& thePoints) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (GEOM::GEOM_List_ptr thePoints) { MESSAGE("GEOM_Superv_i::MakePolyline"); - if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); - return myCurvesOp->MakePolyline(thePoints); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(thePoints, myPOA).in())) { + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakePolyline(aListImplP->GetList()); + } + return NULL; } //============================================================================= // MakeSplineBezier: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (const GEOM::ListOfGO& thePoints) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (GEOM::GEOM_List_ptr thePoints) { MESSAGE("GEOM_Superv_i::MakeSplineBezier"); - if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); - return myCurvesOp->MakeSplineBezier(thePoints); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(thePoints, myPOA).in())) { + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSplineBezier(aListImplP->GetList()); + } + return NULL; } //============================================================================= // MakeSplineInterpolation: //============================================================================= -GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (const GEOM::ListOfGO& thePoints) +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints) { MESSAGE("GEOM_Superv_i::MakeSplineInterpolation"); - if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); - return myCurvesOp->MakeSplineInterpolation(thePoints); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(thePoints, myPOA).in())) { + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList()); + } + return NULL; } //============================================================================= // MakeSketcher: //============================================================================= GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, - const GEOM::ListOfDouble& theWorkingPlane) + GEOM::GEOM_List_ptr theWorkingPlane) { MESSAGE("GEOM_Superv_i::MakeSketcher"); - if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); - return myCurvesOp->MakeSketcher(theCommand, theWorkingPlane); + if (GEOM_List_i* aListImplWP = + dynamic_cast*>(GetServant(theWorkingPlane, myPOA).in())) { + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList()); + } + return NULL; } //=============================== LocalOperations ============================= @@ -1588,11 +1742,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theSha //============================================================================= GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, - const GEOM::ListOfLong& theEdges) + GEOM::GEOM_List_ptr theEdges) { MESSAGE("GEOM_Superv_i::MakeFilletEdges"); - if (CORBA::is_nil(myLocalOp)) getLocalOp(); - return myLocalOp->MakeFilletEdges(theShape, theR, theEdges); + if (GEOM_List_i* aListImplE = + dynamic_cast*>(GetServant(theEdges, myPOA).in())) { + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeFilletEdges(theShape, theR, aListImplE->GetList()); + } + return NULL; } //============================================================================= @@ -1600,11 +1758,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theS //============================================================================= GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, - const GEOM::ListOfLong& theFaces) + GEOM::GEOM_List_ptr theFaces) { MESSAGE("GEOM_Superv_i::MakeFilletFaces"); - if (CORBA::is_nil(myLocalOp)) getLocalOp(); - return myLocalOp->MakeFilletFaces(theShape, theR, theFaces); + if (GEOM_List_i* aListImplF = + dynamic_cast*>(GetServant(theFaces, myPOA).in())) { + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeFilletFaces(theShape, theR, aListImplF->GetList()); + } + return NULL; } //============================================================================= @@ -1634,11 +1796,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theS //============================================================================= GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD1, CORBA::Double theD2, - const GEOM::ListOfLong& theFaces) + GEOM::GEOM_List_ptr theFaces) { MESSAGE("GEOM_Superv_i::MakeChamferFaces"); - if (CORBA::is_nil(myLocalOp)) getLocalOp(); - return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, theFaces); + if (GEOM_List_i* aListImplF = + dynamic_cast*>(GetServant(theFaces, myPOA).in())) { + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, aListImplF->GetList()); + } + return NULL; } //============================================================================= @@ -1722,11 +1888,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGrou //============================================================================= // GetObjects: //============================================================================= -GEOM::ListOfLong* GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup) +GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup) { MESSAGE("GEOM_Superv_i::GetObjects"); if (CORBA::is_nil(myGroupOp)) getGroupOp(); - return myGroupOp->GetObjects(theGroup); + + GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup); + GEOM_List_i* aListPtr = new GEOM_List_i(*(aList)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + return aListPtr->_this(); } //===================================================================================== diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 67f780c10..3a3ce4596 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -6,6 +6,7 @@ #include CORBA_SERVER_HEADER(GEOM_Superv) #include "GEOM_Gen_i.hh" +#include "GEOM_List_i.hh" #include "QAD_Study.h" #include "QAD_Application.h" @@ -37,11 +38,35 @@ public: void getLocalOp(); void getGroupOp(); + PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject, + PortableServer::POA_ptr thePOA); + //-----------------------------------------------------------------------// // Set current stydy ID // //-----------------------------------------------------------------------// void SetStudyID( CORBA::Long theId ); + //-----------------------------------------------------------// + // Create ListOfGO and add items to it // + //-----------------------------------------------------------// + GEOM::GEOM_List_ptr CreateListOfGO(); + void AddItemToListOfGO(GEOM::GEOM_List_ptr& theList, + GEOM::GEOM_Object_ptr theObject); + + //-----------------------------------------------------------// + // Create ListOfLong and add items to it // + //-----------------------------------------------------------// + GEOM::GEOM_List_ptr CreateListOfLong(); + void AddItemToListOfLong(GEOM::GEOM_List_ptr& theList, + long theObject); + + //-----------------------------------------------------------// + // Create ListOfDouble and add items to it // + //-----------------------------------------------------------// + GEOM::GEOM_List_ptr CreateListOfDouble(); + void AddItemToListOfDouble(GEOM::GEOM_List_ptr& theList, + double theObject); + //-----------------------------------------------------------------------// // Inherited methods from SALOMEDS::Driver // //-----------------------------------------------------------------------// @@ -187,13 +212,13 @@ public: CORBA::Long theOperation); GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr theShape2); - GEOM::GEOM_Object_ptr MakePartition (const GEOM::ListOfGO& theShapes, - const GEOM::ListOfGO& theTools, - const GEOM::ListOfGO& theKeepInside, - const GEOM::ListOfGO& theRemoveInside, + GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes, + GEOM::GEOM_List_ptr theTools, + GEOM::GEOM_List_ptr theKeepInside, + GEOM::GEOM_List_ptr theRemoveInside, const CORBA::Short theLimit, const CORBA::Boolean theRemoveWebs, - const GEOM::ListOfLong& theMaterials); + GEOM::GEOM_List_ptr theMaterials); GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr thePlane); @@ -292,20 +317,20 @@ public: //-----------------------------------------------------------// GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2); - GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires); + GEOM::GEOM_Object_ptr MakeWire (GEOM::GEOM_List_ptr theEdgesAndWires); GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire, CORBA::Boolean isPlanarWanted); - GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires, + GEOM::GEOM_Object_ptr MakeFaceWires (GEOM::GEOM_List_ptr theWires, CORBA::Boolean isPlanarWanted); - GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells); + GEOM::GEOM_Object_ptr MakeShell (GEOM::GEOM_List_ptr theFacesAndShells); GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell); - GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells); - GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes); + GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells); + GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes); GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape, const CORBA::Double theTolerance); - GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape, - const CORBA::Long theShapeType, - const CORBA::Boolean isSorted); + GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted); CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape); CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape); GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape); @@ -363,15 +388,15 @@ public: GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors); char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors); - GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, - const CORBA::Long theMinNbFaces, - const CORBA::Long theMaxNbFaces); + GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces); GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_Object_ptr thePoint); GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, - const GEOM::ListOfGO& theParts); - GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, - const GEOM::ListOfGO& theParts); + GEOM::GEOM_List_ptr theParts); + GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_List_ptr theParts); GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock, const CORBA::Long theDirFace1, const CORBA::Long theDirFace2, @@ -399,11 +424,11 @@ public: GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2, GEOM::GEOM_Object_ptr thePnt3); - GEOM::GEOM_Object_ptr MakePolyline (const GEOM::ListOfGO& thePoints); - GEOM::GEOM_Object_ptr MakeSplineBezier (const GEOM::ListOfGO& thePoints); - GEOM::GEOM_Object_ptr MakeSplineInterpolation (const GEOM::ListOfGO& thePoints); + GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints); + GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints); + GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints); GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, - const GEOM::ListOfDouble& theWorkingPlane); + const GEOM::GEOM_List_ptr theWorkingPlane); //-----------------------------------------------------------// // LocalOperations // @@ -411,16 +436,16 @@ public: GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR); GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, - const GEOM::ListOfLong& theEdges); + GEOM::GEOM_List_ptr theEdges); GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, - const GEOM::ListOfLong& theFaces); + GEOM::GEOM_List_ptr theFaces); GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD); GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD1, CORBA::Double theD2, CORBA::Long theFace1, CORBA::Long theFace2); GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD1, CORBA::Double theD2, - const GEOM::ListOfLong& theFaces); + GEOM::GEOM_List_ptr theFaces); GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape, CORBA::Double theWeight, CORBA::Double theWaterDensity, @@ -439,12 +464,13 @@ public: CORBA::Long theSubShapeId); CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup); GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup); - GEOM::ListOfLong* GetObjects (GEOM::GEOM_Object_ptr theGroup); + GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup); private: SALOME_NamingService * name_service; GEOM::GEOM_Gen_ptr myGeomEngine; CORBA::Long myStudyID; + PortableServer::POA_var myPOA; GEOM::GEOM_IBasicOperations_ptr myBasicOp; GEOM::GEOM_I3DPrimOperations_ptr my3DPrimOp; diff --git a/src/GEOM_I_Superv/Makefile.in b/src/GEOM_I_Superv/Makefile.in index 14c03b7bf..961912a81 100644 --- a/src/GEOM_I_Superv/Makefile.in +++ b/src/GEOM_I_Superv/Makefile.in @@ -43,7 +43,7 @@ LIB_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOM SALOME_GenericObj.idl SALOME_ModuleCatalog.idl GEOM_Gen.idl GEOM_Superv.idl \ # Executables targets -BIN = +BIN = BIN_SRC = BIN_CLIENT_IDL = BIN_SERVER_IDL =