From: gdd Date: Fri, 16 Apr 2010 11:52:22 +0000 (+0000) Subject: 0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape X-Git-Tag: V5_1_4a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef1b3d2d5aa608bbe91e9c750bfc506cee94b804;p=modules%2Fgeom.git 0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape Add YACS services --- diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index 1c7986bf8..b9e72f51f 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -575,7 +575,36 @@ module GEOM GEOM_Object GetMainShape(in GEOM_Object theGroup) ; GEOM_List GetObjects(in GEOM_Object theGroup) ; - }; + //-----------------------------------------------------------// + // AdvancedOperations // + //-----------------------------------------------------------// + GEOM_List MakePipeTShape (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in boolean theHexMesh); + + GEOM_List MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in boolean theHexMesh, + in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); + + GEOM_List MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in double theH, in double theW, in boolean theHexMesh); + + GEOM_List MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in double theH, in double theW, in boolean theHexMesh, + in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); + + GEOM_List MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in double theRF, in boolean theHexMesh); + + GEOM_List MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1, + in double theR2, in double theW2, in double theL2, + in double theRF, in boolean theHexMesh, + in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); + }; }; #endif diff --git a/resources/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in index aabc2a2eb..024cff426 100644 --- a/resources/GEOMCatalog.xml.in +++ b/resources/GEOMCatalog.xml.in @@ -51,6 +51,7 @@ + @@ -4810,6 +4811,397 @@ + + + MakePipeTShape + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theHewMesh + boolean + unknown + + + + + return + GEOM_List + unknown + + + + + + MakePipeTShapeWithPosition + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theHewMesh + boolean + unknown + + + theP1 + GEOM_Object + unknown + + + theP2 + GEOM_Object + unknown + + + theP3 + GEOM_Object + unknown + + + + + return + GEOM_List + unknown + + + + + + MakePipeTShapeChamfer + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theH + double + unknown + + + theR + double + unknown + + + theHewMesh + boolean + unknown + + + + + return + GEOM_List + unknown + + + + + + MakePipeTShapeChamferWithPosition + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theH + double + unknown + + + theR + double + unknown + + + theHewMesh + boolean + unknown + + + theP1 + GEOM_Object + unknown + + + theP2 + GEOM_Object + unknown + + + theP3 + GEOM_Object + unknown + + + + + return + GEOM_List + unknown + + + + + + + + MakePipeTShapeFillet + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theRF + double + unknown + + + theHewMesh + boolean + unknown + + + + + return + GEOM_List + unknown + + + + + + MakePipeTShapeFilletWithPosition + + + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theRF + double + unknown + + + theHewMesh + boolean + unknown + + + theP1 + GEOM_Object + unknown + + + theP2 + GEOM_Object + unknown + + + theP3 + GEOM_Object + unknown + + + + + return + GEOM_List + unknown + + + + + diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 9c0e56b52..74fba88e8 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -344,6 +344,18 @@ void GEOM_Superv_i::getGroupOp() if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID); } + +//============================================================================= +// getAdvancedOp: +//============================================================================= +void GEOM_Superv_i::getAdvancedOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IGroupOperations interface + if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) + myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID); +} //============================================================================= // GetServant: @@ -3192,6 +3204,116 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup) return aListPtr->_this(); } +//=============================== Advanced Operations ============================= +//============================================================================= +// MakePipeTShape +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh) +{ + beginService( " GEOM_Superv_i::MakePipeTShape" ); + MESSAGE("GEOM_Superv_i::MakePipeTShape"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShape" ); + return aSeqPtr->_this(); +} + +//============================================================================= +// MakePipeTShapeWithPosition +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) +{ + beginService( " GEOM_Superv_i::MakePipeTShapeWithPosition" ); + MESSAGE("GEOM_Superv_i::MakePipeTShapeWithPosition"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShapeWithPosition" ); + return aSeqPtr->_this(); +} + +//============================================================================= +// MakePipeTShapeChamfer +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh) +{ + beginService( " GEOM_Superv_i::MakePipeTShapeChamfer" ); + MESSAGE("GEOM_Superv_i::MakePipeTShapeChamfer"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShapeChamfer" ); + return aSeqPtr->_this(); +} + +//============================================================================= +// MakePipeTShapeChamferWithPosition +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) +{ + beginService( " GEOM_Superv_i::MakePipeTShapeChamferWithPosition" ); + MESSAGE("GEOM_Superv_i::MakePipeTShapeChamferWithPosition"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShapeChamferWithPosition" ); + return aSeqPtr->_this(); +} + +//============================================================================= +// MakePipeTShapeFillet +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theRF, CORBA::Boolean theHexMesh) +{ + beginService( " GEOM_Superv_i::MakePipeTShapeFillet" ); + MESSAGE("GEOM_Superv_i::MakePipeTShapeFillet"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShapeFillet" ); + return aSeqPtr->_this(); +} + +//============================================================================= +// MakePipeTShapeFilletWithPosition +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theRF, CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) +{ + beginService( " GEOM_Superv_i::MakePipeTShapeFilletWithPosition" ); + MESSAGE("GEOM_Superv_i::MakePipeTShapeFilletWithPosition"); + getAdvancedOp(); + + GEOM::ListOfGO* aSeq = myAdvancedOp->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3); + GEOM_List_i* aSeqPtr = new GEOM_List_i(*(aSeq)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::MakePipeTShapeFilletWithPosition" ); + return aSeqPtr->_this(); +} + //===================================================================================== // EXPORTED METHODS //===================================================================================== diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index a5f4c9f04..03afa5749 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -53,7 +53,8 @@ public: void getBlocksOp(); void getCurvesOp(); void getLocalOp(); - void getGroupOp(); + void getGroupOp(); + void getAdvancedOp(); PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject, PortableServer::POA_ptr thePOA); @@ -665,6 +666,31 @@ public: GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup); GEOM::GEOM_List_ptr GetObjects (GEOM::GEOM_Object_ptr theGroup); + //-----------------------------------------------------------// + // Advanced Operations // + //-----------------------------------------------------------// + GEOM::GEOM_List_ptr MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Boolean theHexMesh); + GEOM::GEOM_List_ptr MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); + GEOM::GEOM_List_ptr MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh); + GEOM::GEOM_List_ptr MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); + GEOM::GEOM_List_ptr MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theRF, CORBA::Boolean theHexMesh); + GEOM::GEOM_List_ptr MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, + CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, + CORBA::Double theRF, CORBA::Boolean theHexMesh, + GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); + private: SALOME_NamingService * name_service; GEOM::GEOM_Gen_var myGeomEngine; @@ -682,6 +708,7 @@ private: GEOM::GEOM_ICurvesOperations_var myCurvesOp; GEOM::GEOM_ILocalOperations_var myLocalOp; GEOM::GEOM_IGroupOperations_var myGroupOp; + GEOM::GEOM_IAdvancedOperations_var myAdvancedOp; };