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.
This commit is contained in:
smh 2004-12-10 13:38:25 +00:00
parent d3dd282390
commit 3a15080295
6 changed files with 769 additions and 316 deletions

View File

@ -29,6 +29,9 @@
module GEOM module GEOM
{ {
interface GEOM_List
{ };
interface GEOM_Superv : Engines::Component,SALOMEDS::Driver interface GEOM_Superv : Engines::Component,SALOMEDS::Driver
{ {
//-----------------------------------------------------------// //-----------------------------------------------------------//
@ -36,6 +39,27 @@ module GEOM
//-----------------------------------------------------------// //-----------------------------------------------------------//
void SetStudyID (in long theStudyID) ; 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 // // Primitives Construction : BasicOperations //
//-----------------------------------------------------------// //-----------------------------------------------------------//
@ -61,9 +85,9 @@ module GEOM
in double theTrimSize) ; in double theTrimSize) ;
GEOM_Object MakePlanePntVec (in GEOM_Object thePnt, GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
in GEOM_Object theVec, in GEOM_Object theVec,
in double theTrimSize) ; in double theTrimSize) ;
GEOM_Object MakePlaneFace (in GEOM_Object theFace, 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, GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
in double theXDX, in double theXDY, in double theXDZ, in double theXDX, in double theXDY, in double theXDZ,
in double theYDX, in double theYDY, in double theYDZ) ; in double theYDX, in double theYDY, in double theYDZ) ;
@ -84,8 +108,8 @@ module GEOM
in GEOM_Object thePnt2) ; in GEOM_Object thePnt2) ;
GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt, GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theRadius, in double theRadius,
in double theHeight) ; in double theHeight) ;
GEOM_Object MakeCylinderRH (in double theR, GEOM_Object MakeCylinderRH (in double theR,
in double theH) ; in double theH) ;
GEOM_Object MakeSphere (in double theX, GEOM_Object MakeSphere (in double theX,
@ -94,18 +118,18 @@ module GEOM
in double theRadius) ; in double theRadius) ;
GEOM_Object MakeSphereR (in double theR) ; GEOM_Object MakeSphereR (in double theR) ;
GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, GEOM_Object MakeSpherePntR (in GEOM_Object thePnt,
in double theR) ; in double theR) ;
GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt, GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
in GEOM_Object theVec, in GEOM_Object theVec,
in double theRMajor, in double theRMajor,
in double theRMinor) ; in double theRMinor) ;
GEOM_Object MakeTorusRR (in double theRMajor, GEOM_Object MakeTorusRR (in double theRMajor,
in double theRMinor) ; in double theRMinor) ;
GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt, GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theR1, in double theR1,
in double theR2, in double theR2,
in double theHeight) ; in double theHeight) ;
GEOM_Object MakeConeR1R2H (in double theR1, GEOM_Object MakeConeR1R2H (in double theR1,
in double theR2, in double theR2,
in double theHeight) ; in double theHeight) ;
@ -119,7 +143,7 @@ module GEOM
in GEOM_Object thePath) ; in GEOM_Object thePath) ;
GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase, GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theAngle) ; in double theAngle) ;
GEOM_Object MakeFilling (in GEOM_Object theShape, GEOM_Object MakeFilling (in GEOM_Object theShape,
in long theMinDeg, in long theMaxDeg, in long theMinDeg, in long theMaxDeg,
in double theTol2D, in double theTol3D, in double theTol2D, in double theTol3D,
@ -130,16 +154,16 @@ module GEOM
//-----------------------------------------------------------// //-----------------------------------------------------------//
GEOM_Object MakeBoolean (in GEOM_Object theShape1, GEOM_Object MakeBoolean (in GEOM_Object theShape1,
in GEOM_Object theShape2, in GEOM_Object theShape2,
in long theOperation) ; in long theOperation) ;
GEOM_Object MakeFuse (in GEOM_Object theShape1, GEOM_Object MakeFuse (in GEOM_Object theShape1,
in GEOM_Object theShape2) ; in GEOM_Object theShape2) ;
GEOM_Object MakePartition (in ListOfGO theShapes, GEOM_Object MakePartition (in GEOM_List theShapes,
in ListOfGO theTools, in GEOM_List theTools,
in ListOfGO theKeepInside, in GEOM_List theKeepInside,
in ListOfGO theRemoveInside, in GEOM_List theRemoveInside,
in short theLimit, in short theLimit,
in boolean theRemoveWebs, in boolean theRemoveWebs,
in ListOfLong theMaterials) ; in GEOM_List theMaterials) ;
GEOM_Object MakeHalfPartition (in GEOM_Object theShape, GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
in GEOM_Object thePlane) ; in GEOM_Object thePlane) ;
@ -164,55 +188,65 @@ module GEOM
in GEOM_Object thePoint1, in GEOM_Object thePoint1,
in GEOM_Object thePoint2) ; in GEOM_Object thePoint2) ;
GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject, GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
in double theDX, in double theDX,
in double theDY, in double theDY,
in double theDZ) ; in double theDZ) ;
GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject, GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
in double theDX, in double theDX,
in double theDY, in double theDY,
in double theDZ) ; in double theDZ) ;
GEOM_Object TranslateVector (in GEOM_Object theObject, GEOM_Object TranslateVector (in GEOM_Object theObject,
in GEOM_Object theVector) ; in GEOM_Object theVector) ;
GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
in GEOM_Object theVector) ; in GEOM_Object theVector) ;
GEOM_Object MultiTranslate1D (in GEOM_Object theObject, GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
in GEOM_Object theVector, in GEOM_Object theVector,
in double theStep, in double theStep,
in long theNbTimes) ; in long theNbTimes) ;
GEOM_Object MultiTranslate2D (in GEOM_Object theObject, GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
in GEOM_Object theVector1, in GEOM_Object theVector1,
in double theStep1, in double theStep1,
in long theNbTimes1, in long theNbTimes1,
in GEOM_Object theVector2, in GEOM_Object theVector2,
in double theStep2, in double theStep2,
in long theNbTimes2) ; in long theNbTimes2) ;
GEOM_Object Rotate (in GEOM_Object theObject, GEOM_Object Rotate (in GEOM_Object theObject,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theAngle) ; in double theAngle) ;
GEOM_Object RotateCopy (in GEOM_Object theObject, GEOM_Object RotateCopy (in GEOM_Object theObject,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theAngle) ; in double theAngle) ;
GEOM_Object MultiRotate1D (in GEOM_Object theObject, GEOM_Object MultiRotate1D (in GEOM_Object theObject,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in long theNbTimes) ; in long theNbTimes) ;
GEOM_Object MultiRotate2D (in GEOM_Object theObject, GEOM_Object MultiRotate2D (in GEOM_Object theObject,
in GEOM_Object theAxis, in GEOM_Object theAxis,
in double theAngle, in double theAngle,
in long theNbTimes1, in long theNbTimes1,
in double theStep, in double theStep,
in long theNbTimes2) ; in long theNbTimes2) ;
GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane) ; GEOM_Object MirrorPlane (in GEOM_Object theObject,
GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane) ; in GEOM_Object thePlane) ;
GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis) ; GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject,
GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis) ; in GEOM_Object thePlane) ;
GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint) ; GEOM_Object MirrorAxis (in GEOM_Object theObject,
GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint) ; in GEOM_Object theAxis) ;
GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset) ; GEOM_Object MirrorAxisCopy (in GEOM_Object theObject,
GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset) ; in GEOM_Object theAxis) ;
GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint, GEOM_Object MirrorPoint (in GEOM_Object theObject,
in double theFactor) ; in GEOM_Object thePoint) ;
GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, GEOM_Object MirrorPointCopy (in GEOM_Object theObject,
in double theFactor) ; 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, GEOM_Object PositionShape (in GEOM_Object theObject,
in GEOM_Object theStartLCS, in GEOM_Object theStartLCS,
in GEOM_Object theEndLCS) ; in GEOM_Object theEndLCS) ;
@ -223,18 +257,22 @@ module GEOM
//-----------------------------------------------------------// //-----------------------------------------------------------//
// ShapesOperations // // ShapesOperations //
//-----------------------------------------------------------// //-----------------------------------------------------------//
GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2) ; GEOM_Object MakeEdge (in GEOM_Object thePnt1,
GEOM_Object MakeWire (in ListOfGO theEdgesAndWires) ; in GEOM_Object thePnt2) ;
GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted) ; GEOM_Object MakeWire (in GEOM_List theEdgesAndWires) ;
GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted) ; GEOM_Object MakeFace (in GEOM_Object theWire,
GEOM_Object MakeShell (in ListOfGO theFacesAndShells) ; 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 MakeSolidShell (in GEOM_Object theShell) ;
GEOM_Object MakeSolidShells (in ListOfGO theShells) ; GEOM_Object MakeSolidShells (in GEOM_List theShells) ;
GEOM_Object MakeCompound (in ListOfGO theShapes) ; GEOM_Object MakeCompound (in GEOM_List theShapes) ;
GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance) ; GEOM_Object MakeGlueFaces (in GEOM_Object theShape,
ListOfGO MakeExplode (in GEOM_Object theShape, in double theTolerance) ;
in long theShapeType, GEOM_List MakeExplode (in GEOM_Object theShape,
in boolean isSorted) ; in long theShapeType,
in boolean isSorted) ;
long NumberOfFaces (in GEOM_Object theShape) ; long NumberOfFaces (in GEOM_Object theShape) ;
long NumberOfEdges (in GEOM_Object theShape) ; long NumberOfEdges (in GEOM_Object theShape) ;
GEOM_Object ChangeOrientation (in GEOM_Object theShape) ; GEOM_Object ChangeOrientation (in GEOM_Object theShape) ;
@ -292,15 +330,15 @@ module GEOM
out GEOM_IBlocksOperations::BCErrors theErrors) ; out GEOM_IBlocksOperations::BCErrors theErrors) ;
string PrintBCErrors (in GEOM_Object theCompound, string PrintBCErrors (in GEOM_Object theCompound,
in GEOM_IBlocksOperations::BCErrors theErrors) ; in GEOM_IBlocksOperations::BCErrors theErrors) ;
ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, GEOM_List ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
in long theMinNbFaces, in long theMinNbFaces,
in long theMaxNbFaces) ; in long theMaxNbFaces) ;
GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound, GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
in GEOM_Object thePoint) ; in GEOM_Object thePoint) ;
GEOM_Object GetBlockByParts (in GEOM_Object theCompound, GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
in ListOfGO theParts) ; in GEOM_List theParts) ;
ListOfGO GetBlocksByParts (in GEOM_Object theCompound, GEOM_List GetBlocksByParts (in GEOM_Object theCompound,
in ListOfGO theParts) ; in GEOM_List theParts) ;
GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock, GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
in long theDirFace1, in long theDirFace1,
in long theDirFace2, in long theDirFace2,
@ -318,21 +356,22 @@ module GEOM
//-----------------------------------------------------------// //-----------------------------------------------------------//
GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt, GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
in GEOM_Object theVec, in GEOM_Object theVec,
in double theR) ; in double theR) ;
GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1, GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
in GEOM_Object thePnt2, in GEOM_Object thePnt2,
in GEOM_Object thePnt3) ; in GEOM_Object thePnt3) ;
GEOM_Object MakeEllipse (in GEOM_Object thePnt, GEOM_Object MakeEllipse (in GEOM_Object thePnt,
in GEOM_Object theVec, in GEOM_Object theVec,
in double theRMajor, in double theRMajor,
in double theRMinor) ; in double theRMinor) ;
GEOM_Object MakeArc (in GEOM_Object thePnt1, GEOM_Object MakeArc (in GEOM_Object thePnt1,
in GEOM_Object thePnt2, in GEOM_Object thePnt2,
in GEOM_Object thePnt3) ; in GEOM_Object thePnt3) ;
GEOM_Object MakePolyline (in ListOfGO thePoints) ; GEOM_Object MakePolyline (in GEOM_List thePoints) ;
GEOM_Object MakeSplineBezier (in ListOfGO thePoints) ; GEOM_Object MakeSplineBezier (in GEOM_List thePoints) ;
GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints) ; GEOM_Object MakeSplineInterpolation (in GEOM_List thePoints) ;
GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane) ; GEOM_Object MakeSketcher (in string theCommand,
in GEOM_List theWorkingPlane) ;
//-----------------------------------------------------------// //-----------------------------------------------------------//
// LocalOperations // // LocalOperations //
@ -341,10 +380,10 @@ module GEOM
in double theR) ; in double theR) ;
GEOM_Object MakeFilletEdges (in GEOM_Object theShape, GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
in double theR, in double theR,
in ListOfLong theEdges) ; in GEOM_List theEdges) ;
GEOM_Object MakeFilletFaces (in GEOM_Object theShape, GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
in double theR, in double theR,
in ListOfLong theFaces) ; in GEOM_List theFaces) ;
GEOM_Object MakeChamferAll (in GEOM_Object theShape, GEOM_Object MakeChamferAll (in GEOM_Object theShape,
in double theD) ; in double theD) ;
GEOM_Object MakeChamferEdge (in GEOM_Object theShape, GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
@ -352,22 +391,26 @@ module GEOM
in long theFace1, in long theFace2) ; in long theFace1, in long theFace2) ;
GEOM_Object MakeChamferFaces (in GEOM_Object theShape, GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
in double theD1, in double theD2, in double theD1, in double theD2,
in ListOfLong theFaces) ; in GEOM_List theFaces) ;
GEOM_Object MakeArchimede (in GEOM_Object theShape, GEOM_Object MakeArchimede (in GEOM_Object theShape,
in double theWeight, in double theWeight,
in double theWaterDensity, in double theWaterDensity,
in double theMeshDeflection) ; in double theMeshDeflection) ;
long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape) ; long GetSubShapeIndex (in GEOM_Object theShape,
in GEOM_Object theSubShape) ;
//-----------------------------------------------------------// //-----------------------------------------------------------//
// GroupOperations // // GroupOperations //
//-----------------------------------------------------------// //-----------------------------------------------------------//
GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType) ; GEOM_Object CreateGroup (in GEOM_Object theMainShape,
void AddObject (in GEOM_Object theGroup, in long theSubShapeId) ; in long theShapeType) ;
void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId) ; void AddObject (in GEOM_Object theGroup,
in long theSubShapeId) ;
void RemoveObject (in GEOM_Object theGroup,
in long theSubShapeId) ;
long GetType (in GEOM_Object theGroup) ; long GetType (in GEOM_Object theGroup) ;
GEOM_Object GetMainShape(in GEOM_Object theGroup) ; GEOM_Object GetMainShape(in GEOM_Object theGroup) ;
ListOfLong GetObjects(in GEOM_Object theGroup) ; GEOM_List GetObjects(in GEOM_Object theGroup) ;
}; };
}; };

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
#ifndef __GEOM_LIST_I_H__
#define __GEOM_LIST_I_H__
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Superv)
#include "GEOM_Gen_i.hh"
#include "utilities.h"
template <class Type>
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 <class ElemType>
void AddObject(ElemType theObject);
private:
Type myGOList;
};
//=============================================================================
// constructor:
//=============================================================================
template <class Type>
GEOM_List_i<Type>::GEOM_List_i()
{
MESSAGE("GEOM_List_i::GEOM_List_i");
//create an empty list
myGOList.length(0);
}
//=============================================================================
// constructor:
//=============================================================================
template <class Type>
GEOM_List_i<Type>::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 <class Type>
GEOM_List_i<Type>::~GEOM_List_i()
{
MESSAGE("GEOM_List_i::~GEOM_List_i");
}
//=============================================================================
// GetList:
//=============================================================================
template <class Type>
const Type& GEOM_List_i<Type>::GetList()
{
MESSAGE("GEOM_List_i::GetList()");
return myGOList;
}
//=============================================================================
// AddObject:
//=============================================================================
template <class Type>
template <class ElemType>
void GEOM_List_i<Type>::AddObject(ElemType theObject)
{
MESSAGE("GEOM_List_i::AddObject(...)");
int aLength = myGOList.length();
myGOList.length(aLength+1);
myGOList[aLength] = theObject;
}
#endif

View File

@ -17,6 +17,10 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
_thisObj = this ; _thisObj = this ;
_id = _poa->activate_object(_thisObj); _id = _poa->activate_object(_thisObj);
name_service = new SALOME_NamingService(_orb); 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(); myGeomEngine = GEOM::GEOM_Gen::_nil();
myStudyID = -1; myStudyID = -1;
@ -72,6 +76,78 @@ void GEOM_Superv_i::SetStudyID( CORBA::Long theId )
myStudyID = theId; myStudyID = theId;
} }
//=============================================================================
// CreateListOfGO:
//=============================================================================
GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfGO()
{
MESSAGE("GEOM_Superv_i::CreateListOfGO()");
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>();
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<GEOM::ListOfGO>* aList =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theList, myPOA).in())) {
aList->AddObject(theObject);
MESSAGE(" NewLength = "<<aList->GetList().length());
}
}
//=============================================================================
// CreateListOfLong:
//=============================================================================
GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfLong()
{
MESSAGE("GEOM_Superv_i::CreateListOfLong()");
GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>();
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<GEOM::ListOfLong>* aList =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(GetServant(theList, myPOA).in())) {
aList->AddObject(theObject);
MESSAGE(" NewLength = "<<aList->GetList().length());
}
}
//=============================================================================
// CreateListOfDouble:
//=============================================================================
GEOM::GEOM_List_ptr GEOM_Superv_i::CreateListOfDouble()
{
MESSAGE("GEOM_Superv_i::CreateListOfDouble()");
GEOM_List_i<GEOM::ListOfDouble>* aListPtr = new GEOM_List_i<GEOM::ListOfDouble>();
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<GEOM::ListOfDouble>* aList =
dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theList, myPOA).in())) {
aList->AddObject(theObject);
MESSAGE(" NewLength = "<<aList->GetList().length());
}
}
//============================================================================= //=============================================================================
// getBasicOp: // getBasicOp:
//============================================================================= //=============================================================================
@ -182,6 +258,17 @@ void GEOM_Superv_i::getGroupOp()
myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID); 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() // function : Save()
// purpose : save OCAF/Geom document // purpose : save OCAF/Geom document
@ -698,18 +785,32 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1,
//============================================================================= //=============================================================================
// MakePartition: // MakePartition:
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (const GEOM::ListOfGO& theShapes, GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr theShapes,
const GEOM::ListOfGO& theTools, GEOM::GEOM_List_ptr theTools,
const GEOM::ListOfGO& theKeepInside, GEOM::GEOM_List_ptr theKeepInside,
const GEOM::ListOfGO& theRemoveInside, GEOM::GEOM_List_ptr theRemoveInside,
const CORBA::Short theLimit, const CORBA::Short theLimit,
const CORBA::Boolean theRemoveWebs, const CORBA::Boolean theRemoveWebs,
const GEOM::ListOfLong& theMaterials) GEOM::GEOM_List_ptr theMaterials)
{ {
MESSAGE("GEOM_Superv_i::MakePartition"); MESSAGE("GEOM_Superv_i::MakePartition");
if (CORBA::is_nil(myBoolOp)) getBoolOp(); GEOM_List_i<GEOM::ListOfGO>* aListImplS =
return myBoolOp->MakePartition(theShapes, theTools, theKeepInside, theRemoveInside, dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShapes, myPOA).in());
theLimit, theRemoveWebs, theMaterials); GEOM_List_i<GEOM::ListOfGO>* aListImplT =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theTools, myPOA).in());
GEOM_List_i<GEOM::ListOfGO>* aListImplKI =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theKeepInside, myPOA).in());
GEOM_List_i<GEOM::ListOfGO>* aListImplRI =
dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theRemoveInside, myPOA).in());
GEOM_List_i<GEOM::ListOfLong>* aListImplM =
dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(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: // 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"); MESSAGE("GEOM_Superv_i::MakeWire");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplEW =
return myShapesOp->MakeWire(theEdgesAndWires); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(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: // 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) CORBA::Boolean isPlanarWanted)
{ {
MESSAGE("GEOM_Superv_i::MakeFaceWires"); MESSAGE("GEOM_Superv_i::MakeFaceWires");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplW =
return myShapesOp->MakeFaceWires(theWires, isPlanarWanted); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theWires, myPOA).in())) {
if (CORBA::is_nil(myShapesOp)) getShapesOp();
return myShapesOp->MakeFaceWires(aListImplW->GetList(), isPlanarWanted);
}
return NULL;
} }
//============================================================================= //=============================================================================
// MakeShell: // 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"); MESSAGE("GEOM_Superv_i::MakeShell");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplFS =
return myShapesOp->MakeShell(theFacesAndShells); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(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: // 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"); MESSAGE("GEOM_Superv_i::MakeSolidShells");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplS =
return myShapesOp->MakeSolidShells(theShells); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theShells, myPOA).in())) {
if (CORBA::is_nil(myShapesOp)) getShapesOp();
return myShapesOp->MakeSolidShells(aListImplS->GetList());
}
return NULL;
} }
//============================================================================= //=============================================================================
// MakeCompound: // 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"); MESSAGE("GEOM_Superv_i::MakeCompound");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImpl =
return myShapesOp->MakeCompound(theShapes); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(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: // MakeExplode:
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_List_ptr GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape,
const CORBA::Long theShapeType, const CORBA::Long theShapeType,
const CORBA::Boolean isSorted) const CORBA::Boolean isSorted)
{ {
MESSAGE("GEOM_Superv_i::MakeExplode"); MESSAGE("GEOM_Superv_i::MakeExplode");
if (CORBA::is_nil(myShapesOp)) getShapesOp(); if (CORBA::is_nil(myShapesOp)) getShapesOp();
return myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
GEOM::ListOfGO* aList = myShapesOp->MakeExplode(theShape, theShapeType, isSorted);
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
return aListPtr->_this();
} }
//============================================================================= //=============================================================================
@ -1406,13 +1531,15 @@ char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
//============================================================================= //=============================================================================
// ExplodeCompoundOfBlocks: // ExplodeCompoundOfBlocks:
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_List_ptr GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
const CORBA::Long theMinNbFaces, const CORBA::Long theMinNbFaces,
const CORBA::Long theMaxNbFaces) const CORBA::Long theMaxNbFaces)
{ {
MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks"); MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks");
if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
return myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces); GEOM::ListOfGO* aBlocks = myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces);
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
return aListPtr->_this();
} }
//============================================================================= //=============================================================================
@ -1430,22 +1557,33 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr th
// GetBlockByParts: // GetBlockByParts:
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, 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"); MESSAGE("GEOM_Superv_i::GetBlockByParts");
if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
return myBlocksOp->GetBlockByParts(theCompound, theParts); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
return myBlocksOp->GetBlockByParts(theCompound, aListImplP->GetList());
}
return NULL;
} }
//============================================================================= //=============================================================================
// GetBlocksByParts: // GetBlocksByParts:
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_List_ptr GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
const GEOM::ListOfGO& theParts) GEOM::GEOM_List_ptr theParts)
{ {
MESSAGE("GEOM_Superv_i::GetBlocksByParts"); MESSAGE("GEOM_Superv_i::GetBlocksByParts");
if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
return myBlocksOp->GetBlocksByParts(theCompound, theParts); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(theParts, myPOA).in())) {
if (CORBA::is_nil(myBlocksOp)) getBlocksOp();
GEOM::ListOfGO* aBlocks = myBlocksOp->GetBlocksByParts(theCompound, aListImplP->GetList());
GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aBlocks));
return aListPtr->_this();
}
return NULL;
} }
//============================================================================= //=============================================================================
@ -1533,42 +1671,58 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1,
//============================================================================= //=============================================================================
// MakePolyline: // 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"); MESSAGE("GEOM_Superv_i::MakePolyline");
if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
return myCurvesOp->MakePolyline(thePoints); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
return myCurvesOp->MakePolyline(aListImplP->GetList());
}
return NULL;
} }
//============================================================================= //=============================================================================
// MakeSplineBezier: // 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"); MESSAGE("GEOM_Superv_i::MakeSplineBezier");
if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
return myCurvesOp->MakeSplineBezier(thePoints); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
return myCurvesOp->MakeSplineBezier(aListImplP->GetList());
}
return NULL;
} }
//============================================================================= //=============================================================================
// MakeSplineInterpolation: // 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"); MESSAGE("GEOM_Superv_i::MakeSplineInterpolation");
if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
return myCurvesOp->MakeSplineInterpolation(thePoints); dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thePoints, myPOA).in())) {
if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
return myCurvesOp->MakeSplineInterpolation(aListImplP->GetList());
}
return NULL;
} }
//============================================================================= //=============================================================================
// MakeSketcher: // MakeSketcher:
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, 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"); MESSAGE("GEOM_Superv_i::MakeSketcher");
if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); if (GEOM_List_i<GEOM::ListOfDouble>* aListImplWP =
return myCurvesOp->MakeSketcher(theCommand, theWorkingPlane); dynamic_cast<GEOM_List_i<GEOM::ListOfDouble>*>(GetServant(theWorkingPlane, myPOA).in())) {
if (CORBA::is_nil(myCurvesOp)) getCurvesOp();
return myCurvesOp->MakeSketcher(theCommand, aListImplWP->GetList());
}
return NULL;
} }
//=============================== LocalOperations ============================= //=============================== 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, GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theR, CORBA::Double theR,
const GEOM::ListOfLong& theEdges) GEOM::GEOM_List_ptr theEdges)
{ {
MESSAGE("GEOM_Superv_i::MakeFilletEdges"); MESSAGE("GEOM_Superv_i::MakeFilletEdges");
if (CORBA::is_nil(myLocalOp)) getLocalOp(); if (GEOM_List_i<GEOM::ListOfLong>* aListImplE =
return myLocalOp->MakeFilletEdges(theShape, theR, theEdges); dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(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, GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theR, CORBA::Double theR,
const GEOM::ListOfLong& theFaces) GEOM::GEOM_List_ptr theFaces)
{ {
MESSAGE("GEOM_Superv_i::MakeFilletFaces"); MESSAGE("GEOM_Superv_i::MakeFilletFaces");
if (CORBA::is_nil(myLocalOp)) getLocalOp(); if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
return myLocalOp->MakeFilletFaces(theShape, theR, theFaces); dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(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, GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theD1, CORBA::Double theD2, CORBA::Double theD1, CORBA::Double theD2,
const GEOM::ListOfLong& theFaces) GEOM::GEOM_List_ptr theFaces)
{ {
MESSAGE("GEOM_Superv_i::MakeChamferFaces"); MESSAGE("GEOM_Superv_i::MakeChamferFaces");
if (CORBA::is_nil(myLocalOp)) getLocalOp(); if (GEOM_List_i<GEOM::ListOfLong>* aListImplF =
return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, theFaces); dynamic_cast<GEOM_List_i<GEOM::ListOfLong>*>(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: // 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"); MESSAGE("GEOM_Superv_i::GetObjects");
if (CORBA::is_nil(myGroupOp)) getGroupOp(); if (CORBA::is_nil(myGroupOp)) getGroupOp();
return myGroupOp->GetObjects(theGroup);
GEOM::ListOfLong* aList = myGroupOp->GetObjects(theGroup);
GEOM_List_i<GEOM::ListOfLong>* aListPtr = new GEOM_List_i<GEOM::ListOfLong>(*(aList));
MESSAGE(" List of "<<aListPtr->GetList().length()<<" element(s)");
return aListPtr->_this();
} }
//===================================================================================== //=====================================================================================

View File

@ -6,6 +6,7 @@
#include CORBA_SERVER_HEADER(GEOM_Superv) #include CORBA_SERVER_HEADER(GEOM_Superv)
#include "GEOM_Gen_i.hh" #include "GEOM_Gen_i.hh"
#include "GEOM_List_i.hh"
#include "QAD_Study.h" #include "QAD_Study.h"
#include "QAD_Application.h" #include "QAD_Application.h"
@ -37,11 +38,35 @@ public:
void getLocalOp(); void getLocalOp();
void getGroupOp(); void getGroupOp();
PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject,
PortableServer::POA_ptr thePOA);
//-----------------------------------------------------------------------// //-----------------------------------------------------------------------//
// Set current stydy ID // // Set current stydy ID //
//-----------------------------------------------------------------------// //-----------------------------------------------------------------------//
void SetStudyID( CORBA::Long theId ); 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 // // Inherited methods from SALOMEDS::Driver //
//-----------------------------------------------------------------------// //-----------------------------------------------------------------------//
@ -187,13 +212,13 @@ public:
CORBA::Long theOperation); CORBA::Long theOperation);
GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1,
GEOM::GEOM_Object_ptr theShape2); GEOM::GEOM_Object_ptr theShape2);
GEOM::GEOM_Object_ptr MakePartition (const GEOM::ListOfGO& theShapes, GEOM::GEOM_Object_ptr MakePartition (GEOM::GEOM_List_ptr theShapes,
const GEOM::ListOfGO& theTools, GEOM::GEOM_List_ptr theTools,
const GEOM::ListOfGO& theKeepInside, GEOM::GEOM_List_ptr theKeepInside,
const GEOM::ListOfGO& theRemoveInside, GEOM::GEOM_List_ptr theRemoveInside,
const CORBA::Short theLimit, const CORBA::Short theLimit,
const CORBA::Boolean theRemoveWebs, 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 MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
GEOM::GEOM_Object_ptr thePlane); GEOM::GEOM_Object_ptr thePlane);
@ -292,20 +317,20 @@ public:
//-----------------------------------------------------------// //-----------------------------------------------------------//
GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
GEOM::GEOM_Object_ptr thePnt2); 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, GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
CORBA::Boolean isPlanarWanted); 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); 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 MakeSolidShell (GEOM::GEOM_Object_ptr theShell);
GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells); GEOM::GEOM_Object_ptr MakeSolidShells (GEOM::GEOM_List_ptr theShells);
GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes); GEOM::GEOM_Object_ptr MakeCompound (GEOM::GEOM_List_ptr theShapes);
GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
const CORBA::Double theTolerance); const CORBA::Double theTolerance);
GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_List_ptr MakeExplode (GEOM::GEOM_Object_ptr theShape,
const CORBA::Long theShapeType, const CORBA::Long theShapeType,
const CORBA::Boolean isSorted); const CORBA::Boolean isSorted);
CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape); CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape);
CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape); CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape);
GEOM::GEOM_Object_ptr ChangeOrientation (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); GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors); const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_List_ptr ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
const CORBA::Long theMinNbFaces, const CORBA::Long theMinNbFaces,
const CORBA::Long theMaxNbFaces); const CORBA::Long theMaxNbFaces);
GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
GEOM::GEOM_Object_ptr thePoint); GEOM::GEOM_Object_ptr thePoint);
GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
const GEOM::ListOfGO& theParts); GEOM::GEOM_List_ptr theParts);
GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, GEOM::GEOM_List_ptr GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
const GEOM::ListOfGO& theParts); GEOM::GEOM_List_ptr theParts);
GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock, GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
const CORBA::Long theDirFace1, const CORBA::Long theDirFace1,
const CORBA::Long theDirFace2, const CORBA::Long theDirFace2,
@ -399,11 +424,11 @@ public:
GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1,
GEOM::GEOM_Object_ptr thePnt2, GEOM::GEOM_Object_ptr thePnt2,
GEOM::GEOM_Object_ptr thePnt3); GEOM::GEOM_Object_ptr thePnt3);
GEOM::GEOM_Object_ptr MakePolyline (const GEOM::ListOfGO& thePoints); GEOM::GEOM_Object_ptr MakePolyline (GEOM::GEOM_List_ptr thePoints);
GEOM::GEOM_Object_ptr MakeSplineBezier (const GEOM::ListOfGO& thePoints); GEOM::GEOM_Object_ptr MakeSplineBezier (GEOM::GEOM_List_ptr thePoints);
GEOM::GEOM_Object_ptr MakeSplineInterpolation (const GEOM::ListOfGO& thePoints); GEOM::GEOM_Object_ptr MakeSplineInterpolation (GEOM::GEOM_List_ptr thePoints);
GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand,
const GEOM::ListOfDouble& theWorkingPlane); const GEOM::GEOM_List_ptr theWorkingPlane);
//-----------------------------------------------------------// //-----------------------------------------------------------//
// LocalOperations // // LocalOperations //
@ -411,16 +436,16 @@ public:
GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theR); CORBA::Double theR);
GEOM::GEOM_Object_ptr MakeFilletEdges (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, 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 MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD);
GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theD1, CORBA::Double theD2, CORBA::Double theD1, CORBA::Double theD2,
CORBA::Long theFace1, CORBA::Long theFace2); CORBA::Long theFace1, CORBA::Long theFace2);
GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theD1, CORBA::Double theD2, 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, GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape,
CORBA::Double theWeight, CORBA::Double theWeight,
CORBA::Double theWaterDensity, CORBA::Double theWaterDensity,
@ -439,12 +464,13 @@ public:
CORBA::Long theSubShapeId); CORBA::Long theSubShapeId);
CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup); CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup);
GEOM::GEOM_Object_ptr GetMainShape (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: private:
SALOME_NamingService * name_service; SALOME_NamingService * name_service;
GEOM::GEOM_Gen_ptr myGeomEngine; GEOM::GEOM_Gen_ptr myGeomEngine;
CORBA::Long myStudyID; CORBA::Long myStudyID;
PortableServer::POA_var myPOA;
GEOM::GEOM_IBasicOperations_ptr myBasicOp; GEOM::GEOM_IBasicOperations_ptr myBasicOp;
GEOM::GEOM_I3DPrimOperations_ptr my3DPrimOp; GEOM::GEOM_I3DPrimOperations_ptr my3DPrimOp;

View File

@ -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 \ SALOME_GenericObj.idl SALOME_ModuleCatalog.idl GEOM_Gen.idl GEOM_Superv.idl \
# Executables targets # Executables targets
BIN = BIN =
BIN_SRC = BIN_SRC =
BIN_CLIENT_IDL = BIN_CLIENT_IDL =
BIN_SERVER_IDL = BIN_SERVER_IDL =