mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-31 00:20:33 +05:00
- delete dependency from study id
This commit is contained in:
parent
58df7626e7
commit
bac1427e5d
@ -214,11 +214,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudy</inParameter-name>
|
|
||||||
<inParameter-type>Study</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theObject</inParameter-name>
|
<inParameter-name>theObject</inParameter-name>
|
||||||
<inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
|
<inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
|
||||||
@ -251,11 +246,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudy</inParameter-name>
|
|
||||||
<inParameter-type>Study</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theObject</inParameter-name>
|
<inParameter-name>theObject</inParameter-name>
|
||||||
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
|
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
|
||||||
@ -298,11 +288,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudy</inParameter-name>
|
|
||||||
<inParameter-type>Study</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theObject</inParameter-name>
|
<inParameter-name>theObject</inParameter-name>
|
||||||
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
|
<inParameter-type>GEOM/GEOM_Object</inParameter-type>
|
||||||
@ -345,11 +330,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudy</inParameter-name>
|
|
||||||
<inParameter-type>Study</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theSObject</inParameter-name>
|
<inParameter-name>theSObject</inParameter-name>
|
||||||
<inParameter-type>SObject</inParameter-type>
|
<inParameter-type>SObject</inParameter-type>
|
||||||
@ -730,13 +710,7 @@
|
|||||||
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
<service-version>@SALOMEGEOM_VERSION@</service-version>
|
||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list></inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudyEntry</inParameter-name>
|
|
||||||
<inParameter-type>string</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
</inParameter-list>
|
|
||||||
<outParameter-list>
|
<outParameter-list>
|
||||||
<outParameter>
|
<outParameter>
|
||||||
<outParameter-name>return</outParameter-name>
|
<outParameter-name>return</outParameter-name>
|
||||||
@ -769,11 +743,6 @@
|
|||||||
<service-comment>unknown</service-comment>
|
<service-comment>unknown</service-comment>
|
||||||
<service-by-default>0</service-by-default>
|
<service-by-default>0</service-by-default>
|
||||||
<inParameter-list>
|
<inParameter-list>
|
||||||
<inParameter>
|
|
||||||
<inParameter-name>theStudy</inParameter-name>
|
|
||||||
<inParameter-type>Study</inParameter-type>
|
|
||||||
<inParameter-comment>unknown</inParameter-comment>
|
|
||||||
</inParameter>
|
|
||||||
<inParameter>
|
<inParameter>
|
||||||
<inParameter-name>theObject</inParameter-name>
|
<inParameter-name>theObject</inParameter-name>
|
||||||
<inParameter-type>CORBA/Object</inParameter-type>
|
<inParameter-type>CORBA/Object</inParameter-type>
|
||||||
|
@ -118,19 +118,19 @@
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
|
AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine) :
|
||||||
GEOM_IOperations(theEngine, theDocID)
|
GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
|
MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
|
||||||
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
|
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine());
|
||||||
myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
|
myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine());
|
||||||
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
|
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
|
||||||
myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
|
myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine());
|
||||||
myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
|
myBlocksOperations = new GEOMImpl_IBlocksOperations(GetEngine());
|
||||||
my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
|
my3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine());
|
||||||
myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
|
myLocalOperations = new GEOMImpl_ILocalOperations(GetEngine());
|
||||||
myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
|
myHealingOperations = new GEOMImpl_IHealingOperations(GetEngine());
|
||||||
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
|
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -1076,7 +1076,7 @@ bool AdvancedEngine_IOperations::MakeInternalGroup
|
|||||||
// Get faces that are laying on conical faces.
|
// Get faces that are laying on conical faces.
|
||||||
if (aConicalFaces.IsEmpty() == Standard_False) {
|
if (aConicalFaces.IsEmpty() == Standard_False) {
|
||||||
Handle(GEOM_Object) aCone =
|
Handle(GEOM_Object) aCone =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||||
TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
|
TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
|
||||||
@ -1915,7 +1915,7 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
|
MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
|
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||||
@ -2070,7 +2070,7 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
/////////////////
|
/////////////////
|
||||||
// TSHAPE CODE
|
// TSHAPE CODE
|
||||||
/////////////////
|
/////////////////
|
||||||
@ -2238,7 +2238,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||||
if (aFunction.IsNull()) return NULL;
|
if (aFunction.IsNull()) return NULL;
|
||||||
@ -2468,7 +2468,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||||
if (aFunction.IsNull()) return NULL;
|
if (aFunction.IsNull()) return NULL;
|
||||||
@ -2699,7 +2699,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||||
if (aFunction.IsNull()) return NULL;
|
if (aFunction.IsNull()) return NULL;
|
||||||
@ -2951,7 +2951,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
|||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||||
if (aFunction.IsNull()) return NULL;
|
if (aFunction.IsNull()) return NULL;
|
||||||
@ -3202,7 +3202,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
|
||||||
|
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
|
||||||
@ -3270,7 +3270,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
|
||||||
|
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
|
||||||
@ -3343,7 +3343,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDCYLINDER);
|
||||||
|
|
||||||
Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
|
Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
|
||||||
aBaseShape->GetLastFunction()->SetDescription(""); // Erase dump of MakeDividedDisk
|
aBaseShape->GetLastFunction()->SetDescription(""); // Erase dump of MakeDividedDisk
|
||||||
@ -3391,7 +3391,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_SMOOTHINGSURFACE);
|
||||||
|
|
||||||
//Add a new shape function with parameters
|
//Add a new shape function with parameters
|
||||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
|
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
|
||||||
|
@ -165,7 +165,7 @@ public:
|
|||||||
bool fuse);
|
bool fuse);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
|
AdvancedEngine_IOperations(GEOM_Engine* theEngine);
|
||||||
~AdvancedEngine_IOperations();
|
~AdvancedEngine_IOperations();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient)
|
Handle(TColStd_HSequenceOfTransient)
|
||||||
|
@ -56,11 +56,12 @@ GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::PO
|
|||||||
{
|
{
|
||||||
Unexpect aCatch(SALOME_SalomeException);
|
Unexpect aCatch(SALOME_SalomeException);
|
||||||
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
|
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
|
||||||
_operation = new AdvancedEngine_IOperations( theGenImpl );
|
return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
|
||||||
return new AdvancedEngine_IOperations_i( thePOA, theEngine, _operation );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get()
|
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
|
||||||
{
|
{
|
||||||
|
if( !_operation )
|
||||||
|
_operation = new AdvancedEngine_IOperations( theGenImpl );
|
||||||
return _operation;
|
return _operation;
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,9 @@ public:
|
|||||||
::GEOMImpl_Gen* theGenImpl);
|
::GEOMImpl_Gen* theGenImpl);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static AdvancedEngine_IOperations* get();
|
static AdvancedEngine_IOperations* get(::GEOMImpl_Gen* theGenImpl);
|
||||||
private:
|
private:
|
||||||
static AdvancedEngine_IOperations*_operation;
|
static AdvancedEngine_IOperations* _operation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1217,8 +1217,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
|
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
|
||||||
SALOMEDS::SObject_ptr theSObject)
|
|
||||||
{
|
{
|
||||||
SALOMEDS::GenericAttribute_var anAttr;
|
SALOMEDS::GenericAttribute_var anAttr;
|
||||||
if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
|
if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
|
||||||
@ -1236,7 +1235,7 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
|
|||||||
ObjectList::iterator it = pipeTShapeGroupObjects.begin();
|
ObjectList::iterator it = pipeTShapeGroupObjects.begin();
|
||||||
|
|
||||||
for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
|
for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
|
||||||
getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
|
getGeomEngine()->AddInStudy((*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid (QString&);
|
virtual bool isValid (QString&);
|
||||||
virtual bool execute (ObjectList&);
|
virtual bool execute (ObjectList&);
|
||||||
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -143,7 +143,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer().Display( main.in() );
|
||||||
main->UnRegister();
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -46,12 +46,11 @@ BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool
|
bool
|
||||||
BREPPlugin_IECallBack::Export( int theDocId,
|
BREPPlugin_IECallBack::Export( const Handle(GEOM_Object) theOriginal,
|
||||||
const Handle(GEOM_Object) theOriginal,
|
const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFormatName )
|
||||||
const TCollection_AsciiString& theFormatName )
|
|
||||||
{
|
{
|
||||||
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
|
||||||
aPluginOperations->ExportBREP( theOriginal, theFileName );
|
aPluginOperations->ExportBREP( theOriginal, theFileName );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -62,11 +61,10 @@ BREPPlugin_IECallBack::Export( int theDocId,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(TColStd_HSequenceOfTransient)
|
Handle(TColStd_HSequenceOfTransient)
|
||||||
BREPPlugin_IECallBack::Import( int theDocId,
|
BREPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFileName )
|
||||||
const TCollection_AsciiString& theFileName )
|
|
||||||
{
|
{
|
||||||
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
|
||||||
return aPluginOperations->ImportBREP( theFileName );
|
return aPluginOperations->ImportBREP( theFileName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,14 +36,12 @@ public:
|
|||||||
BREPPlugin_IECallBack();
|
BREPPlugin_IECallBack();
|
||||||
~BREPPlugin_IECallBack();
|
~BREPPlugin_IECallBack();
|
||||||
|
|
||||||
bool Export( int theDocId,
|
bool Export( const Handle(GEOM_Object) theOriginal,
|
||||||
const Handle(GEOM_Object) theOriginal,
|
const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFormatName );
|
||||||
const TCollection_AsciiString& theFormatName );
|
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
|
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFileName );
|
||||||
const TCollection_AsciiString& theFileName );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
|
BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine )
|
||||||
: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
|
: GEOMImpl_IBaseIEOperations( theEngine )
|
||||||
{
|
{
|
||||||
MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
|
MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object) theOrigi
|
|||||||
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
|
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
|
Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
|
||||||
|
|
||||||
//Add an Export function
|
//Add an Export function
|
||||||
Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
|
Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
|
||||||
@ -124,7 +124,7 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
|
|||||||
if( theFileName.IsEmpty() ) return NULL;
|
if( theFileName.IsEmpty() ) return NULL;
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
|
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
|
||||||
|
|
||||||
//Add an Import function
|
//Add an Import function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
|
class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BREPPlugin_IOperations( GEOM_Engine*, int );
|
BREPPlugin_IOperations( GEOM_Engine* );
|
||||||
~BREPPlugin_IOperations();
|
~BREPPlugin_IOperations();
|
||||||
|
|
||||||
void ExportBREP( const Handle(GEOM_Object),
|
void ExportBREP( const Handle(GEOM_Object),
|
||||||
|
@ -56,11 +56,12 @@ GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_pt
|
|||||||
{
|
{
|
||||||
Unexpect aCatch( SALOME_SalomeException );
|
Unexpect aCatch( SALOME_SalomeException );
|
||||||
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
|
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
|
||||||
_operation = new BREPPlugin_IOperations( theGenImpl );
|
return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
|
||||||
return new BREPPlugin_IOperations_i( thePOA, theEngine, _operation );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get()
|
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
|
||||||
{
|
{
|
||||||
|
if( !_operation )
|
||||||
|
_operation = new BREPPlugin_IOperations( theGenImpl );
|
||||||
return _operation;
|
return _operation;
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,10 @@ public:
|
|||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl );
|
::GEOMImpl_Gen* theGenImpl );
|
||||||
private:
|
private:
|
||||||
static BREPPlugin_IOperations* get();
|
static BREPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static BREPPlugin_IOperations* _operation;
|
static BREPPlugin_IOperations* _operation;
|
||||||
|
|
||||||
friend class BREPPlugin_IECallBack;
|
friend class BREPPlugin_IECallBack;
|
||||||
};
|
};
|
||||||
|
@ -457,12 +457,11 @@ bool BooleanGUI_Dialog::execute (ObjectList& objects)
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
|
void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
|
||||||
SALOMEDS::SObject_ptr theSObject)
|
|
||||||
{
|
{
|
||||||
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
|
||||||
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
||||||
/*theInheritFirstArg=*/myOperation == BooleanGUI::CUT,
|
/*theInheritFirstArg=*/myOperation == BooleanGUI::CUT,
|
||||||
mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false
|
mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false
|
||||||
|
@ -50,7 +50,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& );
|
virtual bool execute( ObjectList& );
|
||||||
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
|
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
|
||||||
virtual void addSubshapesToStudy();
|
virtual void addSubshapesToStudy();
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
|
@ -244,12 +244,11 @@ bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
|
void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
|
||||||
SALOMEDS::SObject_ptr theSObject )
|
|
||||||
{
|
{
|
||||||
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
|
||||||
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
||||||
/*theInheritFirstArg=*/false,
|
/*theInheritFirstArg=*/false,
|
||||||
mainFrame()->CheckBoxAddPrefix->isChecked() );
|
mainFrame()->CheckBoxAddPrefix->isChecked() );
|
||||||
|
@ -49,7 +49,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& );
|
virtual bool execute( ObjectList& );
|
||||||
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
|
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -66,8 +66,7 @@ void DependencyTree_ViewModel::onShowSelected()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects(aSelList);
|
aSelMgr->selectedObjects(aSelList);
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
GEOM_Displayer disp;
|
||||||
GEOM_Displayer disp( appStudy );
|
|
||||||
|
|
||||||
OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
||||||
|
|
||||||
@ -96,8 +95,7 @@ void DependencyTree_ViewModel::onShowOnlySelected()
|
|||||||
SALOME_ListIO aSelList;
|
SALOME_ListIO aSelList;
|
||||||
aSelMgr->selectedObjects( aSelList );
|
aSelMgr->selectedObjects( aSelList );
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
GEOM_Displayer disp;
|
||||||
GEOM_Displayer disp( appStudy );
|
|
||||||
|
|
||||||
OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
|
||||||
|
|
||||||
|
@ -87,9 +87,6 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
|||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if (!app) return false;
|
if (!app) return false;
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
if ( !appStudy ) return false;
|
|
||||||
|
|
||||||
LightApp_SelectionMgr *Sel = app->selectionMgr();
|
LightApp_SelectionMgr *Sel = app->selectionMgr();
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
Sel->selectedObjects( selected );
|
Sel->selectedObjects( selected );
|
||||||
@ -173,7 +170,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Sel->setSelectedObjects( selected );
|
Sel->setSelectedObjects( selected );
|
||||||
GEOM_Displayer( appStudy ).UpdateColorScale();
|
GEOM_Displayer().UpdateColorScale();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +207,7 @@ void DisplayGUI::DisplayAll()
|
|||||||
}
|
}
|
||||||
anIter->Next();
|
anIter->Next();
|
||||||
}
|
}
|
||||||
GEOM_Displayer( appStudy ).Display( listIO, true );
|
GEOM_Displayer().Display( listIO, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
@ -225,11 +222,10 @@ void DisplayGUI::EraseAll()
|
|||||||
if ( app ) {
|
if ( app ) {
|
||||||
SUIT_ViewWindow* vw = app->desktop()->activeWindow();
|
SUIT_ViewWindow* vw = app->desktop()->activeWindow();
|
||||||
if ( vw ) {
|
if ( vw ) {
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
SUIT_ViewManager* vman = vw->getViewManager();
|
SUIT_ViewManager* vman = vw->getViewManager();
|
||||||
if ( vman->getType() == OCCViewer_Viewer::Type() ||
|
if ( vman->getType() == OCCViewer_Viewer::Type() ||
|
||||||
vman->getType() == SVTK_Viewer::Type() ) {
|
vman->getType() == SVTK_Viewer::Type() ) {
|
||||||
GEOM_Displayer( appStudy ).EraseAll(true);
|
GEOM_Displayer().EraseAll(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -258,8 +254,8 @@ void DisplayGUI::DisplayOnlyChildren()
|
|||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if (!app) return;
|
if (!app) return;
|
||||||
|
|
||||||
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
||||||
if (!anActiveStudy) return;
|
if (!aStudy) return;
|
||||||
|
|
||||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||||
if (!aSelMgr) return;
|
if (!aSelMgr) return;
|
||||||
@ -275,14 +271,14 @@ void DisplayGUI::DisplayOnlyChildren()
|
|||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next()) {
|
||||||
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
||||||
if (anIObject->hasEntry()) {
|
if (anIObject->hasEntry()) {
|
||||||
_PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
|
_PTR(SObject) SO (aStudy->studyDS()->FindObjectID(anIObject->getEntry()));
|
||||||
if (SO) {
|
if (SO) {
|
||||||
_PTR(SComponent) SC (SO->GetFatherComponent());
|
_PTR(SComponent) SC (SO->GetFatherComponent());
|
||||||
if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
|
if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
|
||||||
// if component is selected, pass it
|
// if component is selected, pass it
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
|
_PTR(ChildIterator) anIter (aStudy->studyDS()->NewChildIterator(SO));
|
||||||
anIter->InitEx(true);
|
anIter->InitEx(true);
|
||||||
while (anIter->More()) {
|
while (anIter->More()) {
|
||||||
_PTR(SObject) valSO (anIter->Value());
|
_PTR(SObject) valSO (anIter->Value());
|
||||||
@ -298,7 +294,7 @@ void DisplayGUI::DisplayOnlyChildren()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GEOM_Displayer(anActiveStudy).Display(listIO, true);
|
GEOM_Displayer().Display(listIO, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================================================================
|
//=====================================================================================
|
||||||
@ -312,8 +308,8 @@ void DisplayGUI::Display()
|
|||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if ( !app ) return;
|
if ( !app ) return;
|
||||||
|
|
||||||
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
if ( !anActiveStudy ) return;
|
if ( !aStudy ) return;
|
||||||
|
|
||||||
//get SalomeApp selection manager
|
//get SalomeApp selection manager
|
||||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||||
@ -328,12 +324,12 @@ void DisplayGUI::Display()
|
|||||||
for( ;It.More();It.Next() ) {
|
for( ;It.More();It.Next() ) {
|
||||||
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
||||||
if ( anIObject->hasEntry() ) {
|
if ( anIObject->hasEntry() ) {
|
||||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
_PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||||
// if component is selected
|
// if component is selected
|
||||||
listIO.Clear();
|
listIO.Clear();
|
||||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
_PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
|
||||||
anIter->InitEx( true );
|
anIter->InitEx( true );
|
||||||
while( anIter->More() ) {
|
while( anIter->More() ) {
|
||||||
_PTR(SObject) valSO ( anIter->Value() );
|
_PTR(SObject) valSO ( anIter->Value() );
|
||||||
@ -355,7 +351,7 @@ void DisplayGUI::Display()
|
|||||||
listIO.Append( anIObject );
|
listIO.Append( anIObject );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GEOM_Displayer( anActiveStudy ).Display( listIO, true );
|
GEOM_Displayer().Display( listIO, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -370,8 +366,8 @@ void DisplayGUI::Erase()
|
|||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if ( !app ) return;
|
if ( !app ) return;
|
||||||
|
|
||||||
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
if ( !anActiveStudy ) return;
|
if ( !aStudy ) return;
|
||||||
|
|
||||||
//get SalomeApp selection manager
|
//get SalomeApp selection manager
|
||||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||||
@ -386,12 +382,12 @@ void DisplayGUI::Erase()
|
|||||||
for( ; It.More(); It.Next() ) {
|
for( ; It.More(); It.Next() ) {
|
||||||
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
Handle(SALOME_InteractiveObject) anIObject = It.Value();
|
||||||
if ( anIObject->hasEntry() ) {
|
if ( anIObject->hasEntry() ) {
|
||||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
_PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||||
// if component is selected
|
// if component is selected
|
||||||
listIO.Clear();
|
listIO.Clear();
|
||||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
_PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
|
||||||
anIter->InitEx( true );
|
anIter->InitEx( true );
|
||||||
while( anIter->More() ) {
|
while( anIter->More() ) {
|
||||||
_PTR(SObject) valSO ( anIter->Value() );
|
_PTR(SObject) valSO ( anIter->Value() );
|
||||||
@ -419,7 +415,7 @@ void DisplayGUI::Erase()
|
|||||||
if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
|
if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
|
||||||
aIsForced = false;
|
aIsForced = false;
|
||||||
|
|
||||||
GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
|
GEOM_Displayer().Erase( listIO, aIsForced);
|
||||||
getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
|
getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,7 +436,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
|||||||
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
||||||
if ( !aStudy ) return;
|
if ( !aStudy ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
int mgrId = viewWindow->getViewManager()->getGlobalId();
|
int mgrId = viewWindow->getViewManager()->getGlobalId();
|
||||||
|
|
||||||
@ -476,7 +472,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
if ( !viewWindow )
|
if ( !viewWindow )
|
||||||
viewWindow = app->desktop()->activeWindow();
|
viewWindow = app->desktop()->activeWindow();
|
||||||
|
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
viewWindow->setProperty( "VectorsMode", mode );
|
viewWindow->setProperty( "VectorsMode", mode );
|
||||||
|
|
||||||
@ -525,7 +521,7 @@ void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
if ( !viewWindow )
|
if ( !viewWindow )
|
||||||
viewWindow = app->desktop()->activeWindow();
|
viewWindow = app->desktop()->activeWindow();
|
||||||
|
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
viewWindow->setProperty( "VerticesMode", mode );
|
viewWindow->setProperty( "VerticesMode", mode );
|
||||||
|
|
||||||
@ -576,7 +572,7 @@ void DisplayGUI::SetNameMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
|
|
||||||
viewWindow->setProperty( "NameMode", mode );
|
viewWindow->setProperty( "NameMode", mode );
|
||||||
|
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
int aMgrId = viewWindow->getViewManager()->getGlobalId();
|
int aMgrId = viewWindow->getViewManager()->getGlobalId();
|
||||||
|
|
||||||
@ -631,7 +627,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
int mgrId = viewWindow->getViewManager()->getGlobalId();
|
int mgrId = viewWindow->getViewManager()->getGlobalId();
|
||||||
|
|
||||||
|
@ -35,21 +35,6 @@
|
|||||||
|
|
||||||
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
|
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
|
||||||
|
|
||||||
//================================================================================
|
|
||||||
/*!
|
|
||||||
* Returns document id
|
|
||||||
*/
|
|
||||||
//================================================================================
|
|
||||||
int GEOM_BaseDriver::GetDocID() const
|
|
||||||
{
|
|
||||||
int docId = 0;
|
|
||||||
if (!Label().IsNull()) {
|
|
||||||
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data());
|
|
||||||
docId = GEOM_Engine::GetEngine()->GetDocID(aDoc);
|
|
||||||
}
|
|
||||||
return docId;
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||||
|
@ -76,8 +76,6 @@ struct GEOM_Param
|
|||||||
class GEOM_BaseDriver : public TFunction_Driver
|
class GEOM_BaseDriver : public TFunction_Driver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Returns document id
|
|
||||||
Standard_EXPORT int GetDocID() const;
|
|
||||||
|
|
||||||
// Returns a name of creation operation and names and values of creation parameters
|
// Returns a name of creation operation and names and values of creation parameters
|
||||||
// (Use AddParam() methods declared below to fill params vector while implementing
|
// (Use AddParam() methods declared below to fill params vector while implementing
|
||||||
|
@ -85,15 +85,9 @@ Handle(GEOM_BaseObject) GEOM_BaseObject::GetObject(const TDF_Label& theLabel)
|
|||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(theLabel, anEntry);
|
TDF_Tool::Entry(theLabel, anEntry);
|
||||||
|
|
||||||
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
|
|
||||||
if(aDoc.IsNull()) return NULL;
|
|
||||||
|
|
||||||
Handle(TDataStd_Integer) anID;
|
|
||||||
if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
|
|
||||||
|
|
||||||
GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
|
GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
|
||||||
if(anEngine == NULL) return NULL;
|
if(anEngine == NULL) return NULL;
|
||||||
return anEngine->GetObject(anID->Get(), anEntry.ToCString());
|
return anEngine->GetObject(anEntry.ToCString());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -167,14 +161,8 @@ int GEOM_BaseObject::GetType(const TDF_Label& theLabel)
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
|
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
|
||||||
: _label(theEntry), _ior(""), _docID(-1)
|
: _label(theEntry), _ior("")
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
|
|
||||||
if(!aDoc.IsNull()) {
|
|
||||||
Handle(TDataStd_Integer) anID;
|
|
||||||
if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
|
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
|
||||||
_root = TDataStd_TreeNode::Set(theEntry);
|
_root = TDataStd_TreeNode::Set(theEntry);
|
||||||
}
|
}
|
||||||
@ -185,14 +173,8 @@ GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
|
GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
|
||||||
: _label(theEntry), _ior(""), _docID(-1)
|
: _label(theEntry), _ior("")
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
|
|
||||||
if(!aDoc.IsNull()) {
|
|
||||||
Handle(TDataStd_Integer) anID;
|
|
||||||
if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
|
|
||||||
}
|
|
||||||
|
|
||||||
theEntry.ForgetAllAttributes(Standard_True);
|
theEntry.ForgetAllAttributes(Standard_True);
|
||||||
|
|
||||||
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
|
if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
|
||||||
@ -288,17 +270,6 @@ void GEOM_BaseObject::IncrementTic()
|
|||||||
TDataStd_Integer::Set(aTicLabel, aTic + 1);
|
TDataStd_Integer::Set(aTicLabel, aTic + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* GetDocID
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
int GEOM_BaseObject::GetDocID()
|
|
||||||
{
|
|
||||||
return _docID;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SetName
|
* SetName
|
||||||
|
@ -92,9 +92,6 @@ public:
|
|||||||
Standard_EXPORT void SetTic(int theTic);
|
Standard_EXPORT void SetTic(int theTic);
|
||||||
Standard_EXPORT void IncrementTic();
|
Standard_EXPORT void IncrementTic();
|
||||||
|
|
||||||
//Returns an ID of the OCAF document where this GEOM_BaseObject is stored
|
|
||||||
Standard_EXPORT int GetDocID();
|
|
||||||
|
|
||||||
//Sets a name of this GEOM_BaseObject
|
//Sets a name of this GEOM_BaseObject
|
||||||
Standard_EXPORT void SetName(const char* theName);
|
Standard_EXPORT void SetName(const char* theName);
|
||||||
|
|
||||||
@ -163,7 +160,6 @@ public:
|
|||||||
TDF_Label _label;
|
TDF_Label _label;
|
||||||
TCollection_AsciiString _ior;
|
TCollection_AsciiString _ior;
|
||||||
TCollection_AsciiString _parameters;
|
TCollection_AsciiString _parameters;
|
||||||
int _docID;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
|
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
|
||||||
|
@ -100,24 +100,9 @@ static GEOM_Engine* TheEngine = NULL;
|
|||||||
|
|
||||||
static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_BaseObject)& theObject)
|
static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_BaseObject)& theObject)
|
||||||
{
|
{
|
||||||
TCollection_AsciiString anID(theObject->GetDocID()), anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
||||||
anID+=(TCollection_AsciiString("_")+anEntry);
|
return anEntry;
|
||||||
return anID;
|
|
||||||
}
|
|
||||||
|
|
||||||
static TCollection_AsciiString BuildID(Standard_Integer theDocID, const char* theEntry)
|
|
||||||
{
|
|
||||||
TCollection_AsciiString anID(theDocID);
|
|
||||||
anID+=(TCollection_AsciiString("_")+theEntry);
|
|
||||||
return anID;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Standard_Integer ExtractDocID(TCollection_AsciiString& theID)
|
|
||||||
{
|
|
||||||
TCollection_AsciiString aDocID = theID.Token("_");
|
|
||||||
if(aDocID.Length() < 1) return -1;
|
|
||||||
return aDocID.IntegerValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProcessFunction(Handle(GEOM_Function)& theFunction,
|
bool ProcessFunction(Handle(GEOM_Function)& theFunction,
|
||||||
@ -146,11 +131,10 @@ void ReplaceEntriesByNames (TCollection_AsciiString& theScript,
|
|||||||
Standard_Integer& objectCounter,
|
Standard_Integer& objectCounter,
|
||||||
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
||||||
|
|
||||||
void AddObjectColors (int theDocID,
|
void AddObjectColors (TCollection_AsciiString& theScript,
|
||||||
TCollection_AsciiString& theScript,
|
|
||||||
const TSting2ObjDataMap& theEntry2ObjData);
|
const TSting2ObjDataMap& theEntry2ObjData);
|
||||||
|
|
||||||
void AddTextures (int theDocID, TCollection_AsciiString& theScript);
|
void AddTextures (TCollection_AsciiString& theScript);
|
||||||
|
|
||||||
void PublishObject (TObjectData& theObjectData,
|
void PublishObject (TObjectData& theObjectData,
|
||||||
TSting2ObjDataMap& theEntry2ObjData,
|
TSting2ObjDataMap& theEntry2ObjData,
|
||||||
@ -252,14 +236,8 @@ GEOM_Engine::~GEOM_Engine()
|
|||||||
for(objit = objs.begin(); objit != objs.end(); ++objit)
|
for(objit = objs.begin(); objit != objs.end(); ++objit)
|
||||||
RemoveObject(*objit);
|
RemoveObject(*objit);
|
||||||
|
|
||||||
//Close all documents not closed
|
//Close document
|
||||||
TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
|
Close();
|
||||||
for (; anItr.More(); anItr.Next())
|
|
||||||
{
|
|
||||||
Close(anItr.Key());
|
|
||||||
anItr.Initialize( _mapIDDocument ); // anItr becomes invalid at _mapIDDocument.UnBind(docId)
|
|
||||||
}
|
|
||||||
_mapIDDocument.Clear();
|
|
||||||
_objects.Clear();
|
_objects.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,11 +246,11 @@ GEOM_Engine::~GEOM_Engine()
|
|||||||
* GetDocument
|
* GetDocument
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
|
Handle(TDocStd_Document) GEOM_Engine::GetDocument(bool force)
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc;
|
Handle(TDocStd_Document) aDoc;
|
||||||
if(_mapIDDocument.IsBound(theDocID)) {
|
if (_document) {
|
||||||
aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
|
aDoc = _document;
|
||||||
}
|
}
|
||||||
else if (force) {
|
else if (force) {
|
||||||
#if OCC_VERSION_MAJOR > 6
|
#if OCC_VERSION_MAJOR > 6
|
||||||
@ -281,44 +259,26 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
|
|||||||
_OCAFApp->NewDocument("SALOME_GEOM", aDoc);
|
_OCAFApp->NewDocument("SALOME_GEOM", aDoc);
|
||||||
#endif
|
#endif
|
||||||
aDoc->SetUndoLimit(_UndoLimit);
|
aDoc->SetUndoLimit(_UndoLimit);
|
||||||
_mapIDDocument.Bind(theDocID, aDoc);
|
_document = aDoc;
|
||||||
TDataStd_Integer::Set(aDoc->Main(), theDocID);
|
|
||||||
}
|
}
|
||||||
return aDoc;
|
return aDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
* GetDocID
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
|
|
||||||
{
|
|
||||||
if (theDocument.IsNull()) return -1;
|
|
||||||
TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
|
|
||||||
for (; anItr.More(); anItr.Next())
|
|
||||||
if (anItr.Value() == theDocument) return anItr.Key();
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* GetObject
|
* GetObject
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntry, bool force)
|
Handle(GEOM_BaseObject) GEOM_Engine::GetObject(const char* theEntry, bool force)
|
||||||
{
|
{
|
||||||
Handle(GEOM_BaseObject) anObject;
|
Handle(GEOM_BaseObject) anObject;
|
||||||
|
|
||||||
TCollection_AsciiString anID = BuildID(theDocID, theEntry);
|
if (_objects.IsBound(theEntry)) {
|
||||||
|
anObject = Handle(GEOM_BaseObject)::DownCast(_objects(theEntry));
|
||||||
if (_objects.IsBound(anID)) {
|
|
||||||
anObject = Handle(GEOM_BaseObject)::DownCast(_objects(anID));
|
|
||||||
}
|
}
|
||||||
else if (force) {
|
else if (force) {
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID, force);
|
Handle(TDocStd_Document) aDoc = GetDocument(force);
|
||||||
if ( !aDoc.IsNull()) {
|
if ( !aDoc.IsNull()) {
|
||||||
TDF_Label aLabel;
|
TDF_Label aLabel;
|
||||||
TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True);
|
TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True);
|
||||||
@ -329,7 +289,7 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
|
|||||||
case GEOM_FIELD_STEP_OBJTYPE: anObject = new GEOM_FieldStep(aLabel); break;
|
case GEOM_FIELD_STEP_OBJTYPE: anObject = new GEOM_FieldStep(aLabel); break;
|
||||||
default: anObject = new GEOM_Object (aLabel);
|
default: anObject = new GEOM_Object (aLabel);
|
||||||
}
|
}
|
||||||
_objects.Bind(anID, anObject);
|
_objects.Bind(theEntry, anObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,22 +303,19 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
|
Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theType)
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||||
|
|
||||||
// NPAL18604: use existing label to decrease memory usage,
|
// NPAL18604: use existing label to decrease memory usage,
|
||||||
// if this label has been freed (object deleted)
|
// if this label has been freed (object deleted)
|
||||||
bool useExisting = false;
|
bool useExisting = false;
|
||||||
TDF_Label aChild;
|
TDF_Label aChild;
|
||||||
if (_freeLabels.find(theDocID) != _freeLabels.end()) {
|
if (!_freeLabels.empty()) {
|
||||||
std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
|
useExisting = true;
|
||||||
if (!aFreeLabels.empty()) {
|
aChild = _freeLabels.front();
|
||||||
useExisting = true;
|
_freeLabels.pop_front();
|
||||||
aChild = aFreeLabels.front();
|
|
||||||
aFreeLabels.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!useExisting) {
|
if (!useExisting) {
|
||||||
// create new label
|
// create new label
|
||||||
@ -386,9 +343,9 @@ Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
|
Handle(GEOM_Object) GEOM_Engine::AddObject(int theType)
|
||||||
{
|
{
|
||||||
return Handle(GEOM_Object)::DownCast( AddBaseObject(theDocID, theType) );
|
return Handle(GEOM_Object)::DownCast( AddBaseObject(theType) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -403,21 +360,17 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) th
|
|||||||
{
|
{
|
||||||
if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
|
if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
|
||||||
|
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||||
|
|
||||||
// NPAL18604: use existing label to decrease memory usage,
|
// NPAL18604: use existing label to decrease memory usage,
|
||||||
// if this label has been freed (object deleted)
|
// if this label has been freed (object deleted)
|
||||||
bool useExisting = false;
|
bool useExisting = false;
|
||||||
TDF_Label aChild;
|
TDF_Label aChild;;
|
||||||
int aDocID = theMainShape->GetDocID();
|
if (!_freeLabels.empty()) {
|
||||||
if (_freeLabels.find(aDocID) != _freeLabels.end()) {
|
useExisting = true;
|
||||||
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
|
aChild = _freeLabels.front();
|
||||||
if (!aFreeLabels.empty()) {
|
_freeLabels.pop_front();
|
||||||
useExisting = true;
|
|
||||||
aChild = aFreeLabels.front();
|
|
||||||
aFreeLabels.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!useExisting) {
|
if (!useExisting) {
|
||||||
// create new label
|
// create new label
|
||||||
@ -479,8 +432,7 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
|
|||||||
{
|
{
|
||||||
if (theObject.IsNull()) return false;
|
if (theObject.IsNull()) return false;
|
||||||
|
|
||||||
int aDocID = theObject->GetDocID();
|
if(!_document)
|
||||||
if(!_mapIDDocument.IsBound(aDocID))
|
|
||||||
return false; // document is closed...
|
return false; // document is closed...
|
||||||
|
|
||||||
//Remove an object from the map of available objects
|
//Remove an object from the map of available objects
|
||||||
@ -515,16 +467,14 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
|
|||||||
aLabel.ForgetAllAttributes(Standard_True);
|
aLabel.ForgetAllAttributes(Standard_True);
|
||||||
|
|
||||||
// Remember the label to reuse it then
|
// Remember the label to reuse it then
|
||||||
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
|
if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
|
||||||
if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
|
_freeLabels.push_back(aLabel);
|
||||||
aFreeLabels.push_back(aLabel);
|
|
||||||
|
|
||||||
// we can't explicitely delete theObject. At least prevent its functioning
|
// we can't explicitely delete theObject. At least prevent its functioning
|
||||||
// as an alive object when aLabel is reused for a new object
|
// as an alive object when aLabel is reused for a new object
|
||||||
theObject->_label = aLabel.Root();
|
theObject->_label = aLabel.Root();
|
||||||
theObject->_ior.Clear();
|
theObject->_ior.Clear();
|
||||||
theObject->_parameters.Clear();
|
theObject->_parameters.Clear();;
|
||||||
theObject->_docID = -1;
|
|
||||||
|
|
||||||
theObject.Nullify();
|
theObject.Nullify();
|
||||||
|
|
||||||
@ -536,9 +486,9 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
|
|||||||
* Undo
|
* Undo
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_Engine::Undo(int theDocID)
|
void GEOM_Engine::Undo()
|
||||||
{
|
{
|
||||||
GetDocument(theDocID)->Undo();
|
GetDocument()->Undo();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -546,9 +496,9 @@ void GEOM_Engine::Undo(int theDocID)
|
|||||||
* Redo
|
* Redo
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_Engine::Redo(int theDocID)
|
void GEOM_Engine::Redo()
|
||||||
{
|
{
|
||||||
GetDocument(theDocID)->Redo();
|
GetDocument()->Redo();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -556,12 +506,11 @@ void GEOM_Engine::Redo(int theDocID)
|
|||||||
* Save
|
* Save
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool GEOM_Engine::Save(int theDocID, const char* theFileName)
|
bool GEOM_Engine::Save(const char* theFileName)
|
||||||
{
|
{
|
||||||
if(!_mapIDDocument.IsBound(theDocID)) return false;
|
if(!_document) return false;
|
||||||
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
|
|
||||||
|
|
||||||
_OCAFApp->SaveAs(aDoc, theFileName);
|
_OCAFApp->SaveAs(_document, theFileName);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -571,7 +520,7 @@ bool GEOM_Engine::Save(int theDocID, const char* theFileName)
|
|||||||
* Load
|
* Load
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool GEOM_Engine::Load(int theDocID, const char* theFileName)
|
bool GEOM_Engine::Load(const char* theFileName)
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc;
|
Handle(TDocStd_Document) aDoc;
|
||||||
if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
|
if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
|
||||||
@ -587,10 +536,7 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
|
|||||||
|
|
||||||
aDoc->SetUndoLimit(_UndoLimit);
|
aDoc->SetUndoLimit(_UndoLimit);
|
||||||
|
|
||||||
if(_mapIDDocument.IsBound(theDocID)) _mapIDDocument.UnBind(theDocID);
|
_document = aDoc;
|
||||||
_mapIDDocument.Bind(theDocID, aDoc);
|
|
||||||
|
|
||||||
TDataStd_Integer::Set(aDoc->Main(), theDocID);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -600,30 +546,19 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
|
|||||||
* Close
|
* Close
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_Engine::Close(int theDocID)
|
void GEOM_Engine::Close()
|
||||||
{
|
{
|
||||||
if (_mapIDDocument.IsBound(theDocID)) {
|
if (_document) {
|
||||||
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
|
//Remove all GEOM Objects associated to the document
|
||||||
|
|
||||||
//Remove all GEOM Objects associated to the given document
|
|
||||||
TColStd_SequenceOfAsciiString aSeq;
|
|
||||||
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
|
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
|
||||||
for (; It.More(); It.Next()) {
|
for (; It.More(); It.Next())
|
||||||
TCollection_AsciiString anObjID (It.Key());
|
_objects.UnBind(It.Key());
|
||||||
Standard_Integer anID = ExtractDocID(anObjID);
|
|
||||||
if (theDocID == anID) aSeq.Append(It.Key());
|
|
||||||
}
|
|
||||||
for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
|
|
||||||
|
|
||||||
// Forget free labels for this document
|
// Forget free labels for document
|
||||||
TFreeLabelsList::iterator anIt = _freeLabels.find(theDocID);
|
_freeLabels.clear();
|
||||||
if (anIt != _freeLabels.end()) {
|
|
||||||
_freeLabels.erase(anIt);
|
|
||||||
}
|
|
||||||
|
|
||||||
_mapIDDocument.UnBind(theDocID);
|
_OCAFApp->Close(_document);
|
||||||
_OCAFApp->Close(aDoc);
|
_document.Nullify();
|
||||||
aDoc.Nullify();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,8 +567,7 @@ void GEOM_Engine::Close(int theDocID)
|
|||||||
* DumpPython
|
* DumpPython
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObjectData,
|
||||||
std::vector<TObjectData>& theObjectData,
|
|
||||||
TVariablesList theVariables,
|
TVariablesList theVariables,
|
||||||
bool isPublished,
|
bool isPublished,
|
||||||
bool isMultiFile,
|
bool isMultiFile,
|
||||||
@ -643,7 +577,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
Kernel_Utils::Localizer loc;
|
Kernel_Utils::Localizer loc;
|
||||||
|
|
||||||
TCollection_AsciiString aScript;
|
TCollection_AsciiString aScript;
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
|
|
||||||
if (aDoc.IsNull())
|
if (aDoc.IsNull())
|
||||||
{
|
{
|
||||||
@ -662,7 +596,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
|
|
||||||
aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
|
aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
|
||||||
|
|
||||||
AddTextures(theDocID, aScript);
|
AddTextures(aScript);
|
||||||
|
|
||||||
Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
|
Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
|
||||||
|
|
||||||
@ -798,7 +732,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
aScript += aFuncScript;
|
aScript += aFuncScript;
|
||||||
|
|
||||||
// ouv : NPAL12872
|
// ouv : NPAL12872
|
||||||
AddObjectColors( theDocID, aScript, aEntry2ObjData );
|
AddObjectColors(aScript, aEntry2ObjData );
|
||||||
|
|
||||||
// Make script to publish in study
|
// Make script to publish in study
|
||||||
TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
|
TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
|
||||||
@ -908,24 +842,21 @@ Handle(TColStd_HSequenceOfAsciiString) GEOM_Engine::GetAllDumpNames() const
|
|||||||
#define TEXTURE_LABEL_HEIGHT 4
|
#define TEXTURE_LABEL_HEIGHT 4
|
||||||
#define TEXTURE_LABEL_DATA 5
|
#define TEXTURE_LABEL_DATA 5
|
||||||
|
|
||||||
int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
|
int GEOM_Engine::addTexture(int theWidth, int theHeight,
|
||||||
const Handle(TColStd_HArray1OfByte)& theTexture,
|
const Handle(TColStd_HArray1OfByte)& theTexture,
|
||||||
const TCollection_AsciiString& theFileName)
|
const TCollection_AsciiString& theFileName)
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
|
||||||
|
|
||||||
// NPAL18604: use existing label to decrease memory usage,
|
// NPAL18604: use existing label to decrease memory usage,
|
||||||
// if this label has been freed (object deleted)
|
// if this label has been freed (object deleted)
|
||||||
bool useExisting = false;
|
bool useExisting = false;
|
||||||
TDF_Label aChild;
|
TDF_Label aChild;
|
||||||
if (_freeLabels.find(theDocID) != _freeLabels.end()) {
|
if (!_freeLabels.empty()) {
|
||||||
std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
|
useExisting = true;
|
||||||
if (!aFreeLabels.empty()) {
|
aChild = _freeLabels.front();
|
||||||
useExisting = true;
|
_freeLabels.pop_front();
|
||||||
aChild = aFreeLabels.front();
|
|
||||||
aFreeLabels.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!useExisting) {
|
if (!useExisting) {
|
||||||
// create new label
|
// create new label
|
||||||
@ -954,14 +885,14 @@ int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
|
|||||||
return aTextureID;
|
return aTextureID;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
|
Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theTextureID,
|
||||||
int& theWidth, int& theHeight,
|
int& theWidth, int& theHeight,
|
||||||
TCollection_AsciiString& theFileName)
|
TCollection_AsciiString& theFileName)
|
||||||
{
|
{
|
||||||
Handle(TColStd_HArray1OfByte) anArray;
|
Handle(TColStd_HArray1OfByte) anArray;
|
||||||
theWidth = theHeight = 0;
|
theWidth = theHeight = 0;
|
||||||
|
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
|
|
||||||
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
|
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -995,11 +926,11 @@ Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextu
|
|||||||
return anArray;
|
return anArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<int> GEOM_Engine::getAllTextures(int theDocID)
|
std::list<int> GEOM_Engine::getAllTextures()
|
||||||
{
|
{
|
||||||
std::list<int> id_list;
|
std::list<int> id_list;
|
||||||
|
|
||||||
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = GetDocument();
|
||||||
|
|
||||||
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
|
TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
|
||||||
for (; anIterator.More(); anIterator.Next()) {
|
for (; anIterator.More(); anIterator.Next()) {
|
||||||
@ -1014,17 +945,6 @@ std::list<int> GEOM_Engine::getAllTextures(int theDocID)
|
|||||||
return id_list;
|
return id_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GEOM_Engine::DocumentModified(const int theDocId, const bool isModified)
|
|
||||||
{
|
|
||||||
if (isModified) _mapModifiedDocs.Add(theDocId);
|
|
||||||
else _mapModifiedDocs.Remove(theDocId);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GEOM_Engine::DocumentModified(const int theDocId)
|
|
||||||
{
|
|
||||||
return _mapModifiedDocs.Contains(theDocId);
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Internal functions
|
// Internal functions
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@ -1665,12 +1585,11 @@ void ReplaceEntriesByNames (TCollection_AsciiString& theScript,
|
|||||||
* AddObjectColors: Add color to objects
|
* AddObjectColors: Add color to objects
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void AddObjectColors (int theDocID,
|
void AddObjectColors (TCollection_AsciiString& theScript,
|
||||||
TCollection_AsciiString& theScript,
|
|
||||||
const TSting2ObjDataMap& theEntry2ObjData)
|
const TSting2ObjDataMap& theEntry2ObjData)
|
||||||
{
|
{
|
||||||
GEOM_Engine* engine = GEOM_Engine::GetEngine();
|
GEOM_Engine* engine = GEOM_Engine::GetEngine();
|
||||||
Handle(TDocStd_Document) aDoc = engine->GetDocument(theDocID);
|
Handle(TDocStd_Document) aDoc = engine->GetDocument();
|
||||||
|
|
||||||
TSting2ObjDataMap::const_iterator anEntryToNameIt;
|
TSting2ObjDataMap::const_iterator anEntryToNameIt;
|
||||||
for (anEntryToNameIt = theEntry2ObjData.begin();
|
for (anEntryToNameIt = theEntry2ObjData.begin();
|
||||||
@ -1774,10 +1693,10 @@ static TCollection_AsciiString pack_data (const Handle(TColStd_HArray1OfByte)& a
|
|||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddTextures (int theDocID, TCollection_AsciiString& theScript)
|
void AddTextures (TCollection_AsciiString& theScript)
|
||||||
{
|
{
|
||||||
GEOM_Engine* engine = GEOM_Engine::GetEngine();
|
GEOM_Engine* engine = GEOM_Engine::GetEngine();
|
||||||
std::list<int> allTextures = engine->getAllTextures(theDocID);
|
std::list<int> allTextures = engine->getAllTextures();
|
||||||
std::list<int>::const_iterator it;
|
std::list<int>::const_iterator it;
|
||||||
|
|
||||||
if (allTextures.size() > 0) {
|
if (allTextures.size() > 0) {
|
||||||
@ -1788,7 +1707,7 @@ void AddTextures (int theDocID, TCollection_AsciiString& theScript)
|
|||||||
Standard_Integer aWidth, aHeight;
|
Standard_Integer aWidth, aHeight;
|
||||||
TCollection_AsciiString aFileName;
|
TCollection_AsciiString aFileName;
|
||||||
Handle(TColStd_HArray1OfByte) aTexture =
|
Handle(TColStd_HArray1OfByte) aTexture =
|
||||||
engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
|
engine->getTexture(*it, aWidth, aHeight, aFileName);
|
||||||
if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
|
if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
|
||||||
TCollection_AsciiString aCommand = "\n\t";
|
TCollection_AsciiString aCommand = "\n\t";
|
||||||
aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
|
aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
|
||||||
|
@ -99,53 +99,48 @@ class GEOM_Engine
|
|||||||
Standard_EXPORT static GEOM_Engine* GetEngine();
|
Standard_EXPORT static GEOM_Engine* GetEngine();
|
||||||
|
|
||||||
//Returns the OCAF document by its ID, if document doesn't exists it will be created
|
//Returns the OCAF document by its ID, if document doesn't exists it will be created
|
||||||
Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID, bool force=true);
|
Standard_EXPORT Handle(TDocStd_Document) GetDocument(bool force=true);
|
||||||
|
|
||||||
//Returns the ID of the given OCAF document
|
|
||||||
Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
|
|
||||||
|
|
||||||
//Returns the OCAF appliaction
|
//Returns the OCAF appliaction
|
||||||
Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
|
Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
|
||||||
|
|
||||||
//Returns a pointer to GEOM_BaseObject defined by a document and the entry
|
//Returns a pointer to GEOM_BaseObject defined by a document and the entry
|
||||||
Standard_EXPORT Handle(GEOM_BaseObject) GetObject(int theDocID,
|
Standard_EXPORT Handle(GEOM_BaseObject) GetObject(const char* theEntry,
|
||||||
const char* theEntry,
|
|
||||||
bool force=true);
|
bool force=true);
|
||||||
|
|
||||||
//Adds a new object of the type theType in the OCAF document
|
//Adds a new object of the type theType in the OCAF document
|
||||||
Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theDocID, int theType);
|
Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theType);
|
||||||
|
|
||||||
//Adds a new object of the type theType in the OCAF document
|
//Adds a new object of the type theType in the OCAF document
|
||||||
Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType);
|
Standard_EXPORT Handle(GEOM_Object) AddObject(int theType);
|
||||||
|
|
||||||
//Removes the object from the OCAF document
|
//Removes the object from the OCAF document
|
||||||
Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);
|
Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);
|
||||||
|
|
||||||
//Saves the OCAF document with ID = theDocID with file with name theFileName
|
//Saves the OCAF document with file with name theFileName
|
||||||
Standard_EXPORT bool Save(int theDocID, const char* theFileName);
|
Standard_EXPORT bool Save(const char* theFileName);
|
||||||
|
|
||||||
//Loads the OCAF document into the application and assigns to it an ID = theDocID
|
//Loads the OCAF document into the application
|
||||||
Standard_EXPORT bool Load(int theDocID, const char* theFileName);
|
Standard_EXPORT bool Load(const char* theFileName);
|
||||||
|
|
||||||
//Closes the document with ID = theDocID
|
//Closes the document
|
||||||
Standard_EXPORT void Close(int theDocID);
|
Standard_EXPORT void Close();
|
||||||
|
|
||||||
//Sets the number of Undos (default value = 10)
|
//Sets the number of Undos (default value = 10)
|
||||||
Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
|
Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
|
||||||
|
|
||||||
//Applies an Undo to document with ID = theDocID
|
//Applies an Undo to document
|
||||||
Standard_EXPORT void Undo(int theDocID);
|
Standard_EXPORT void Undo();
|
||||||
|
|
||||||
//Applies an Redo to document with ID = theDocID
|
//Applies an Redo to document
|
||||||
Standard_EXPORT void Redo(int theDocID);
|
Standard_EXPORT void Redo();
|
||||||
|
|
||||||
//Adds a new sub-shape object of the MainShape object
|
//Adds a new sub-shape object of the MainShape object
|
||||||
Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
|
Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape,
|
||||||
Handle(TColStd_HArray1OfInteger) theIndices,
|
Handle(TColStd_HArray1OfInteger) theIndices,
|
||||||
bool isStandaloneOperation = false);
|
bool isStandaloneOperation = false);
|
||||||
|
|
||||||
Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID,
|
Standard_EXPORT TCollection_AsciiString DumpPython(std::vector<TObjectData>& theObjectData,
|
||||||
std::vector<TObjectData>& theObjectData,
|
|
||||||
TVariablesList theVariables,
|
TVariablesList theVariables,
|
||||||
bool isPublished,
|
bool isPublished,
|
||||||
bool isMultiFile,
|
bool isMultiFile,
|
||||||
@ -155,15 +150,15 @@ class GEOM_Engine
|
|||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
|
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
|
||||||
|
|
||||||
Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
|
Standard_EXPORT int addTexture(int theWidth, int theHeight,
|
||||||
const Handle(TColStd_HArray1OfByte)& theTexture,
|
const Handle(TColStd_HArray1OfByte)& theTexture,
|
||||||
const TCollection_AsciiString& theFileName = "");
|
const TCollection_AsciiString& theFileName = "");
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
|
Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theTextureID,
|
||||||
int& theWidth, int& theHeight,
|
int& theWidth, int& theHeight,
|
||||||
TCollection_AsciiString& theFileName);
|
TCollection_AsciiString& theFileName);
|
||||||
|
|
||||||
Standard_EXPORT std::list<int> getAllTextures(int theDocID);
|
Standard_EXPORT std::list<int> getAllTextures();
|
||||||
|
|
||||||
static const Standard_GUID& GetTextureGUID();
|
static const Standard_GUID& GetTextureGUID();
|
||||||
|
|
||||||
@ -171,25 +166,20 @@ class GEOM_Engine
|
|||||||
const TCollection_AsciiString& anEntry,
|
const TCollection_AsciiString& anEntry,
|
||||||
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
|
||||||
|
|
||||||
Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
|
|
||||||
|
|
||||||
Standard_EXPORT bool DocumentModified(const int theDocId);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
|
Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Handle(GEOM_Application) _OCAFApp;
|
Handle(GEOM_Application) _OCAFApp;
|
||||||
TColStd_DataMapOfIntegerTransient _mapIDDocument;
|
Handle(TDocStd_Document) _document;
|
||||||
TColStd_MapOfInteger _mapModifiedDocs; // keeps the identifiers of the modified document ids
|
|
||||||
|
|
||||||
int _UndoLimit;
|
int _UndoLimit;
|
||||||
GEOM_DataMapOfAsciiStringTransient _objects;
|
GEOM_DataMapOfAsciiStringTransient _objects;
|
||||||
|
|
||||||
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
|
Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
|
||||||
|
|
||||||
TFreeLabelsList _freeLabels;
|
std::list<TDF_Label> _freeLabels;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -364,7 +364,7 @@ Handle(GEOM_FieldStep) GEOM_Field::AddStep(const int stepID, const int stamp)
|
|||||||
if(anEngine == NULL) return NULL;
|
if(anEngine == NULL) return NULL;
|
||||||
|
|
||||||
step = Handle(GEOM_FieldStep)::DownCast
|
step = Handle(GEOM_FieldStep)::DownCast
|
||||||
( anEngine->AddBaseObject( GetDocID(),GEOM_FIELD_STEP_OBJTYPE ));
|
( anEngine->AddBaseObject( GEOM_FIELD_STEP_OBJTYPE ));
|
||||||
if ( step.IsNull())
|
if ( step.IsNull())
|
||||||
return step;
|
return step;
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine, int theDocID)
|
GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine)
|
||||||
: _engine(theEngine), _docID(theDocID)
|
: _engine(theEngine)
|
||||||
{
|
{
|
||||||
_solver = new GEOM_Solver(theEngine);
|
_solver = new GEOM_Solver(theEngine);
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ GEOM_IOperations::~GEOM_IOperations()
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_IOperations::StartOperation()
|
void GEOM_IOperations::StartOperation()
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
|
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
|
||||||
if(aDoc->GetUndoLimit() > 0)
|
if(aDoc->GetUndoLimit() > 0)
|
||||||
aDoc->NewCommand();
|
aDoc->NewCommand();
|
||||||
}
|
}
|
||||||
@ -76,10 +76,9 @@ void GEOM_IOperations::StartOperation()
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_IOperations::FinishOperation()
|
void GEOM_IOperations::FinishOperation()
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
|
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
|
||||||
if(aDoc->GetUndoLimit() > 0)
|
if(aDoc->GetUndoLimit() > 0)
|
||||||
aDoc->CommitCommand();
|
aDoc->CommitCommand();
|
||||||
_engine->DocumentModified(_docID, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -89,7 +88,7 @@ void GEOM_IOperations::FinishOperation()
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
void GEOM_IOperations::AbortOperation()
|
void GEOM_IOperations::AbortOperation()
|
||||||
{
|
{
|
||||||
Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
|
Handle(TDocStd_Document) aDoc = _engine->GetDocument();
|
||||||
aDoc->AbortCommand();
|
aDoc->AbortCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
class GEOM_IOperations
|
class GEOM_IOperations
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOM_IOperations();
|
Standard_EXPORT ~GEOM_IOperations();
|
||||||
|
|
||||||
//Starts a new operation (opens a tansaction)
|
//Starts a new operation (opens a tansaction)
|
||||||
@ -73,15 +73,11 @@ class GEOM_IOperations
|
|||||||
//Return a pointer to Solver associated with this operation interface
|
//Return a pointer to Solver associated with this operation interface
|
||||||
Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
|
Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
|
||||||
|
|
||||||
//Returns an ID of the OCAF document where this operation stores the data
|
|
||||||
Standard_EXPORT int GetDocID() { return _docID; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
TCollection_AsciiString _errorCode;
|
TCollection_AsciiString _errorCode;
|
||||||
GEOM_Engine* _engine;
|
GEOM_Engine* _engine;
|
||||||
GEOM_Solver* _solver;
|
GEOM_Solver* _solver;
|
||||||
int _docID;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* Update
|
* Update
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool GEOM_Solver::Update(int theDocID, TDF_LabelSequence& theSeq)
|
bool GEOM_Solver::Update(TDF_LabelSequence& theSeq)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,9 @@ class GEOM_Solver
|
|||||||
Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
|
Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
|
||||||
Standard_EXPORT ~GEOM_Solver() {}
|
Standard_EXPORT ~GEOM_Solver() {}
|
||||||
|
|
||||||
//Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels
|
//Update the values of all GEOM_Object in the document, theSeq will contain a list of touched labels
|
||||||
//Note: not Implemented
|
//Note: not Implemented
|
||||||
Standard_EXPORT bool Update(int theDocID, TDF_LabelSequence& theSeq);
|
Standard_EXPORT bool Update(TDF_LabelSequence& theSeq);
|
||||||
|
|
||||||
//Updates a value of theObject, theSeq will contain a list of touched labels
|
//Updates a value of theObject, theSeq will contain a list of touched labels
|
||||||
//Note: not implemented
|
//Note: not implemented
|
||||||
|
@ -704,7 +704,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
|
|||||||
GEOM_Displayer* GEOMBase_Helper::getDisplayer()
|
GEOM_Displayer* GEOMBase_Helper::getDisplayer()
|
||||||
{
|
{
|
||||||
if ( !myDisplayer )
|
if ( !myDisplayer )
|
||||||
myDisplayer = new GEOM_Displayer( getStudy() );
|
myDisplayer = new GEOM_Displayer();
|
||||||
return myDisplayer;
|
return myDisplayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,9 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
|
||||||
GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
|
GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
|
||||||
: myDisplayer(NULL)
|
|
||||||
{
|
{
|
||||||
myStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
myStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
myDisplayer = GEOM_Displayer( myStudy );
|
myDisplayer = GEOM_Displayer();
|
||||||
|
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
myVisibleIcon = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
|
myVisibleIcon = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
|
||||||
|
@ -459,15 +459,12 @@ static std::string getName( GEOM::GEOM_BaseObject_ptr object )
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=================================================================
|
//=================================================================
|
||||||
GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
|
GEOM_Displayer::GEOM_Displayer()
|
||||||
{
|
{
|
||||||
if( st )
|
SUIT_Session* session = SUIT_Session::session();
|
||||||
myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
|
myApp = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
|
||||||
else
|
|
||||||
myApp = 0;
|
|
||||||
|
|
||||||
/* Shading Color */
|
/* Shading Color */
|
||||||
SUIT_Session* session = SUIT_Session::session();
|
|
||||||
SUIT_ResourceMgr* resMgr = session->resourceMgr();
|
SUIT_ResourceMgr* resMgr = session->resourceMgr();
|
||||||
|
|
||||||
QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
|
QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
|
||||||
@ -779,7 +776,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
|
|||||||
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
|
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
|
||||||
|
|
||||||
// get presentation properties
|
// get presentation properties
|
||||||
PropMap propMap = getObjectProperties( study, entry, myViewFrame );
|
PropMap propMap = getObjectProperties( entry, myViewFrame );
|
||||||
|
|
||||||
// Temporary staff: vertex must be infinite for correct visualization
|
// Temporary staff: vertex must be infinite for correct visualization
|
||||||
AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
|
AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
|
||||||
@ -921,14 +918,14 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
|
|||||||
aImagePath = GetTexture().c_str();
|
aImagePath = GetTexture().c_str();
|
||||||
if ( ! entry.isEmpty() ) {
|
if ( ! entry.isEmpty() ) {
|
||||||
// check that study is active
|
// check that study is active
|
||||||
SalomeApp_Study* study = getActiveStudy();
|
SalomeApp_Study* study = getStudy();
|
||||||
if ( study ) {
|
if ( study ) {
|
||||||
// Store the texture in object properties for next displays
|
// Store the texture in object properties for next displays
|
||||||
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
|
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
|
||||||
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
|
study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
|
||||||
|
|
||||||
// Update propeties map
|
// Update propeties map
|
||||||
propMap = getObjectProperties( study, entry, myViewFrame );
|
propMap = getObjectProperties( entry, myViewFrame );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -986,7 +983,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
|
|||||||
int textureId = aList[0].toInt();
|
int textureId = aList[0].toInt();
|
||||||
Standard_Integer aWidth, aHeight;
|
Standard_Integer aWidth, aHeight;
|
||||||
Handle(TColStd_HArray1OfByte) aTexture =
|
Handle(TColStd_HArray1OfByte) aTexture =
|
||||||
GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
|
GeometryGUI::getTexture( textureId, aWidth, aHeight );
|
||||||
if ( !aTexture.IsNull() ) {
|
if ( !aTexture.IsNull() ) {
|
||||||
Handle(Prs3d_PointAspect) aTextureAspect =
|
Handle(Prs3d_PointAspect) aTextureAspect =
|
||||||
new Prs3d_PointAspect( HasColor() ?
|
new Prs3d_PointAspect( HasColor() ?
|
||||||
@ -1049,7 +1046,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
|
|||||||
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
|
int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
|
||||||
|
|
||||||
// get presentation properties
|
// get presentation properties
|
||||||
PropMap propMap = getObjectProperties( study, entry, myViewFrame );
|
PropMap propMap = getObjectProperties( entry, myViewFrame );
|
||||||
QColor c;
|
QColor c;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
@ -1738,49 +1735,43 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
|
|||||||
// set interactive object
|
// set interactive object
|
||||||
setIO( theIO );
|
setIO( theIO );
|
||||||
// Find SOBject (because shape should be published previously)
|
// Find SOBject (because shape should be published previously)
|
||||||
SUIT_Session* session = SUIT_Session::session();
|
if ( getStudy() )
|
||||||
SUIT_Application* app = session->activeApplication();
|
|
||||||
if ( app )
|
|
||||||
{
|
{
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
_PTR(SObject) SO ( getStudy()->studyDS()->FindObjectID( theIO->getEntry() ) );
|
||||||
if ( study )
|
if ( SO )
|
||||||
{
|
{
|
||||||
_PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) );
|
// get CORBA reference to data object
|
||||||
if ( SO )
|
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
|
||||||
|
if ( !CORBA::is_nil( object ) )
|
||||||
{
|
{
|
||||||
// get CORBA reference to data object
|
// downcast to GEOM base object
|
||||||
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
|
GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
|
||||||
if ( !CORBA::is_nil( object ) )
|
if ( !GeomBaseObject->_is_nil() )
|
||||||
{
|
{
|
||||||
// downcast to GEOM base object
|
myType = GeomBaseObject->GetType();
|
||||||
GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
|
|
||||||
if ( !GeomBaseObject->_is_nil() )
|
// downcast to GEOM object
|
||||||
|
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
|
||||||
|
if ( myType == GEOM_FIELD_STEP )
|
||||||
{
|
{
|
||||||
myType = GeomBaseObject->GetType();
|
// get the GEOM object from the field's shape
|
||||||
|
GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
|
||||||
// downcast to GEOM object
|
if ( !GeomFieldStep->_is_nil() )
|
||||||
GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
|
|
||||||
if ( myType == GEOM_FIELD_STEP )
|
|
||||||
{
|
{
|
||||||
// get the GEOM object from the field's shape
|
GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
|
||||||
GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
|
if ( !GeomField->_is_nil() )
|
||||||
if ( !GeomFieldStep->_is_nil() )
|
GeomObject = GeomField->GetShape();
|
||||||
{
|
|
||||||
GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
|
|
||||||
if ( !GeomField->_is_nil() )
|
|
||||||
GeomObject = GeomField->GetShape();
|
|
||||||
}
|
|
||||||
|
|
||||||
// read the field step information
|
|
||||||
readFieldStepInfo( GeomFieldStep );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !GeomObject->_is_nil() )
|
// read the field step information
|
||||||
{
|
readFieldStepInfo( GeomFieldStep );
|
||||||
theIO->setName( GeomObject->GetName() );
|
}
|
||||||
// finally set shape
|
|
||||||
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
|
if ( !GeomObject->_is_nil() )
|
||||||
}
|
{
|
||||||
|
theIO->setName( GeomObject->GetName() );
|
||||||
|
// finally set shape
|
||||||
|
setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2459,21 +2450,20 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
|
|||||||
return aSColor;
|
return aSColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
|
PropMap GEOM_Displayer::getObjectProperties( const QString& entry,
|
||||||
const QString& entry,
|
|
||||||
SALOME_View* view )
|
SALOME_View* view )
|
||||||
{
|
{
|
||||||
// get default properties for the explicitly specified default view type
|
// get default properties for the explicitly specified default view type
|
||||||
PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
|
PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
|
||||||
|
|
||||||
if ( study && view ) {
|
if ( getStudy() && view ) {
|
||||||
SUIT_ViewModel* viewModel = dynamic_cast<SUIT_ViewModel*>( view );
|
SUIT_ViewModel* viewModel = dynamic_cast<SUIT_ViewModel*>( view );
|
||||||
SUIT_ViewManager* viewMgr = ( viewModel != 0 ) ? viewModel->getViewManager() : 0;
|
SUIT_ViewManager* viewMgr = ( viewModel != 0 ) ? viewModel->getViewManager() : 0;
|
||||||
int viewId = ( viewMgr != 0 ) ? viewMgr->getGlobalId() : -1;
|
int viewId = ( viewMgr != 0 ) ? viewMgr->getGlobalId() : -1;
|
||||||
|
|
||||||
if ( viewModel && viewId != -1 ) {
|
if ( viewModel && viewId != -1 ) {
|
||||||
// get properties from the study
|
// get properties from the study
|
||||||
PropMap storedMap = study->getObjectProperties( viewId, entry );
|
PropMap storedMap = getStudy()->getObjectProperties( viewId, entry );
|
||||||
// overwrite default properties from stored ones (that are specified)
|
// overwrite default properties from stored ones (that are specified)
|
||||||
for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
|
for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
|
||||||
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
|
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
|
||||||
@ -2493,7 +2483,7 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
|
|||||||
|
|
||||||
if ( !entry.isEmpty() ) {
|
if ( !entry.isEmpty() ) {
|
||||||
// get CORBA reference to geom object
|
// get CORBA reference to geom object
|
||||||
_PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
|
_PTR(SObject) SO( getStudy()->studyDS()->FindObjectID( entry.toStdString() ) );
|
||||||
if ( SO ) {
|
if ( SO ) {
|
||||||
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
|
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
|
||||||
if ( !CORBA::is_nil( object ) ) {
|
if ( !CORBA::is_nil( object ) ) {
|
||||||
@ -2691,16 +2681,9 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
|
|||||||
|
|
||||||
|
|
||||||
void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
|
void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
|
||||||
const bool eraseOnlyChildren) {
|
const bool eraseOnlyChildren)
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
{
|
||||||
if ( !app )
|
LightApp_DataObject* parent = getStudy()->findObjectByEntry(theIO->getEntry());
|
||||||
return;
|
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
if ( !appStudy )
|
|
||||||
return;
|
|
||||||
|
|
||||||
LightApp_DataObject* parent = appStudy->findObjectByEntry(theIO->getEntry());
|
|
||||||
|
|
||||||
if( !parent)
|
if( !parent)
|
||||||
return;
|
return;
|
||||||
@ -2708,7 +2691,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t
|
|||||||
// Erase from all views
|
// Erase from all views
|
||||||
QList<SALOME_View*> views;
|
QList<SALOME_View*> views;
|
||||||
SALOME_View* view;
|
SALOME_View* view;
|
||||||
ViewManagerList vmans = app->viewManagers();
|
ViewManagerList vmans = myApp->viewManagers();
|
||||||
SUIT_ViewManager* vman;
|
SUIT_ViewManager* vman;
|
||||||
foreach ( vman, vmans ) {
|
foreach ( vman, vmans ) {
|
||||||
SUIT_ViewModel* vmod = vman->getViewModel();
|
SUIT_ViewModel* vmod = vman->getViewModel();
|
||||||
@ -2974,10 +2957,6 @@ Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
|
|||||||
|
|
||||||
void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
|
void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
|
||||||
{
|
{
|
||||||
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
|
||||||
if( !aStudy )
|
|
||||||
return;
|
|
||||||
|
|
||||||
SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
|
SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
|
||||||
if( !aViewModel )
|
if( !aViewModel )
|
||||||
return;
|
return;
|
||||||
@ -3092,14 +3071,14 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
|
|||||||
|
|
||||||
if( theIsRedisplayFieldSteps )
|
if( theIsRedisplayFieldSteps )
|
||||||
{
|
{
|
||||||
_PTR(Study) aStudyDS = aStudy->studyDS();
|
_PTR(Study) aStudyDS = getStudy()->studyDS();
|
||||||
QList<SUIT_ViewManager*> vmList;
|
QList<SUIT_ViewManager*> vmList;
|
||||||
myApp->viewManagers( vmList );
|
myApp->viewManagers( vmList );
|
||||||
for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
|
for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
|
||||||
{
|
{
|
||||||
if( SUIT_ViewManager* aViewManager = *vmIt )
|
if( SUIT_ViewManager* aViewManager = *vmIt )
|
||||||
{
|
{
|
||||||
const ObjMap& anObjects = aStudy->getObjectProperties( aViewManager->getGlobalId() );
|
const ObjMap& anObjects = getStudy()->getObjectProperties( aViewManager->getGlobalId() );
|
||||||
for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
|
for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
|
||||||
{
|
{
|
||||||
_PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );
|
_PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );
|
||||||
|
@ -76,7 +76,7 @@ class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/* Constructor */
|
/* Constructor */
|
||||||
GEOM_Displayer( SalomeApp_Study* app );
|
GEOM_Displayer();
|
||||||
/* Destructor */
|
/* Destructor */
|
||||||
virtual ~GEOM_Displayer();
|
virtual ~GEOM_Displayer();
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ protected:
|
|||||||
void updateActorProperties( GEOM_Actor*, bool );
|
void updateActorProperties( GEOM_Actor*, bool );
|
||||||
void updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
|
void updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
|
||||||
|
|
||||||
PropMap getObjectProperties( SalomeApp_Study*, const QString&, SALOME_View* = 0 );
|
PropMap getObjectProperties( const QString&, SALOME_View* = 0 );
|
||||||
PropMap getDefaultPropertyMap();
|
PropMap getDefaultPropertyMap();
|
||||||
|
|
||||||
/* Methods for reading the field step information */
|
/* Methods for reading the field step information */
|
||||||
|
@ -2094,7 +2094,7 @@ void GeometryGUI::onAutoBringToFront()
|
|||||||
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
|
||||||
if (!appStudy) return;
|
if (!appStudy) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -2137,11 +2137,8 @@ void GeometryGUI::onAutoBringToFront()
|
|||||||
|
|
||||||
void GeometryGUI::updateFieldColorScale()
|
void GeometryGUI::updateFieldColorScale()
|
||||||
{
|
{
|
||||||
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
|
GEOM_Displayer aDisplayer;
|
||||||
{
|
aDisplayer.UpdateColorScale();
|
||||||
GEOM_Displayer aDisplayer( aStudy );
|
|
||||||
aDisplayer.UpdateColorScale();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GeometryGUI::engineIOR() const
|
QString GeometryGUI::engineIOR() const
|
||||||
@ -2688,12 +2685,9 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
|||||||
param == QString("scalar_bar_height") ||
|
param == QString("scalar_bar_height") ||
|
||||||
param == QString("scalar_bar_text_height") ||
|
param == QString("scalar_bar_text_height") ||
|
||||||
param == QString("scalar_bar_nb_intervals")) {
|
param == QString("scalar_bar_nb_intervals")) {
|
||||||
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
|
GEOM_Displayer aDisplayer;
|
||||||
{
|
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
|
||||||
GEOM_Displayer aDisplayer( aStudy );
|
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
|
||||||
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
|
|
||||||
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( param == QString("dimensions_color") ||
|
else if ( param == QString("dimensions_color") ||
|
||||||
param == QString("dimensions_line_width") ||
|
param == QString("dimensions_line_width") ||
|
||||||
@ -2711,13 +2705,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
|
GEOM_Displayer aDisplayer;
|
||||||
if ( !aStudy )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GEOM_Displayer aDisplayer( aStudy );
|
|
||||||
|
|
||||||
ViewManagerList aVMs;
|
ViewManagerList aVMs;
|
||||||
anApp->viewManagers( OCCViewer_Viewer::Type(), aVMs );
|
anApp->viewManagers( OCCViewer_Viewer::Type(), aVMs );
|
||||||
@ -2760,7 +2748,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
|
|||||||
LightApp_Displayer* GeometryGUI::displayer()
|
LightApp_Displayer* GeometryGUI::displayer()
|
||||||
{
|
{
|
||||||
if ( !myDisplayer )
|
if ( !myDisplayer )
|
||||||
myDisplayer = new GEOM_Displayer( dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) );
|
myDisplayer = new GEOM_Displayer();
|
||||||
return myDisplayer;
|
return myDisplayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3135,7 +3123,7 @@ void UpdateNameMode( SalomeApp_Application* app )
|
|||||||
bool isMode = false;
|
bool isMode = false;
|
||||||
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
||||||
SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
|
SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
|
||||||
GEOM_Displayer displayer( aStudy );
|
GEOM_Displayer displayer;
|
||||||
int aMgrId = viewWindow->getViewManager()->getGlobalId();
|
int aMgrId = viewWindow->getViewManager()->getGlobalId();
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
@ -3238,11 +3226,14 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
|
|||||||
TCollection_AsciiString asciiIOR( (char *)IOR.in() );
|
TCollection_AsciiString asciiIOR( (char *)IOR.in() );
|
||||||
GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
|
GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
|
||||||
|
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
|
SalomeApp_Application* app =
|
||||||
if ( !appStudy )
|
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
|
||||||
return;
|
SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
|
||||||
|
|
||||||
_PTR(Study) aStudy = appStudy->studyDS();
|
if (!appStudy)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_PTR(Study) aStudy = appStudy->studyDS();
|
||||||
|
|
||||||
if ( !aStudy )
|
if ( !aStudy )
|
||||||
return;
|
return;
|
||||||
|
@ -85,7 +85,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(LOGBOOK& log) const
|
|||||||
if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
|
if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( GetDocID(), obj, aFileName, aFormatName ) );
|
if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( obj, aFileName, aFormatName ) );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#if OCC_VERSION_MAJOR < 7
|
#if OCC_VERSION_MAJOR < 7
|
||||||
|
@ -93,7 +93,6 @@
|
|||||||
GEOMImpl_Gen::GEOMImpl_Gen()
|
GEOMImpl_Gen::GEOMImpl_Gen()
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen");
|
MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen");
|
||||||
_mapOfBasicOperations.clear();
|
|
||||||
|
|
||||||
// Basic elements
|
// Basic elements
|
||||||
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver());
|
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver());
|
||||||
@ -182,57 +181,19 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
|
|||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen");
|
MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen");
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IBasicOperations*>::iterator aBasicIter = _mapOfBasicOperations.begin();
|
delete _BasicOperations;
|
||||||
for (; aBasicIter != _mapOfBasicOperations.end(); aBasicIter++)
|
delete _TransformOperations;
|
||||||
delete (*aBasicIter).second;
|
delete _3DPrimOperations;
|
||||||
|
delete _ShapesOperations;
|
||||||
std::map<int, GEOMImpl_ITransformOperations*>::iterator aTransformIter = _mapOfTransformOperations.begin();
|
delete _BlocksOperations;
|
||||||
for (; aTransformIter != _mapOfTransformOperations.end(); aTransformIter++)
|
delete _BooleanOperations;
|
||||||
delete (*aTransformIter).second;
|
delete _HealingOperations;
|
||||||
|
delete _CurvesOperations;
|
||||||
std::map<int, GEOMImpl_I3DPrimOperations*>::iterator a3DPrimIter = _mapOf3DPrimOperations.begin();
|
delete _LocalOperations;
|
||||||
for (; a3DPrimIter != _mapOf3DPrimOperations.end(); a3DPrimIter++)
|
delete _InsertOperations;
|
||||||
delete (*a3DPrimIter).second;
|
delete _MeasureOperations;
|
||||||
|
delete _GroupOperations;
|
||||||
std::map<int, GEOMImpl_IShapesOperations*>::iterator aShapesIter = _mapOfShapesOperations.begin();
|
delete _FieldOperations;
|
||||||
for (; aShapesIter != _mapOfShapesOperations.end(); aShapesIter++)
|
|
||||||
delete (*aShapesIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IBlocksOperations*>::iterator aBlocksIter = _mapOfBlocksOperations.begin();
|
|
||||||
for (; aBlocksIter != _mapOfBlocksOperations.end(); aBlocksIter++)
|
|
||||||
delete (*aBlocksIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IBooleanOperations*>::iterator aBooleanIter = _mapOfBooleanOperations.begin();
|
|
||||||
for (; aBooleanIter != _mapOfBooleanOperations.end(); aBooleanIter++)
|
|
||||||
delete (*aBooleanIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IHealingOperations*>::iterator aHealingIter = _mapOfHealingOperations.begin();
|
|
||||||
for (; aHealingIter != _mapOfHealingOperations.end(); aHealingIter++)
|
|
||||||
delete (*aHealingIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_ICurvesOperations*>::iterator aCurvesIter = _mapOfCurvesOperations.begin();
|
|
||||||
for (; aCurvesIter != _mapOfCurvesOperations.end(); aCurvesIter++)
|
|
||||||
delete (*aCurvesIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_ILocalOperations*>::iterator aLocalIter = _mapOfLocalOperations.begin();
|
|
||||||
for (; aLocalIter != _mapOfLocalOperations.end(); aLocalIter++)
|
|
||||||
delete (*aLocalIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IInsertOperations*>::iterator aInsertIter = _mapOfInsertOperations.begin();
|
|
||||||
for (; aInsertIter != _mapOfInsertOperations.end(); aInsertIter++)
|
|
||||||
delete (*aInsertIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IMeasureOperations*>::iterator aMeasureIter = _mapOfMeasureOperations.begin();
|
|
||||||
for (; aMeasureIter != _mapOfMeasureOperations.end(); aMeasureIter++)
|
|
||||||
delete (*aMeasureIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IGroupOperations*>::iterator aGroupIter = _mapOfGroupOperations.begin();
|
|
||||||
for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++)
|
|
||||||
delete (*aGroupIter).second;
|
|
||||||
|
|
||||||
std::map<int, GEOMImpl_IFieldOperations*>::iterator aFieldIter = _mapOfFieldOperations.begin();
|
|
||||||
for (; aFieldIter != _mapOfFieldOperations.end(); aFieldIter++)
|
|
||||||
delete (*aFieldIter).second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -240,13 +201,9 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
|
|||||||
* GetIBasicOperations
|
* GetIBasicOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
|
GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfBasicOperations.find(theDocID) == _mapOfBasicOperations.end()) {
|
return _BasicOperations;
|
||||||
_mapOfBasicOperations[theDocID] = new GEOMImpl_IBasicOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfBasicOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -254,13 +211,9 @@ GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
|
|||||||
* GetITransformOperations
|
* GetITransformOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocID)
|
GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfTransformOperations.find(theDocID) == _mapOfTransformOperations.end()) {
|
return _TransformOperations;
|
||||||
_mapOfTransformOperations[theDocID] = new GEOMImpl_ITransformOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfTransformOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -268,13 +221,9 @@ GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocI
|
|||||||
* GetIBooleanOperations
|
* GetIBooleanOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
|
GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfBooleanOperations.find(theDocID) == _mapOfBooleanOperations.end()) {
|
return _BooleanOperations;
|
||||||
_mapOfBooleanOperations[theDocID] = new GEOMImpl_IBooleanOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfBooleanOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -282,13 +231,9 @@ GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
|
|||||||
* GetIHealingOperations
|
* GetIHealingOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
|
GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfHealingOperations.find(theDocID) == _mapOfHealingOperations.end()) {
|
return _HealingOperations;
|
||||||
_mapOfHealingOperations[theDocID] = new GEOMImpl_IHealingOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfHealingOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -296,13 +241,9 @@ GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
|
|||||||
* GetI3DPrimOperations
|
* GetI3DPrimOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
|
GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations()
|
||||||
{
|
{
|
||||||
if(_mapOf3DPrimOperations.find(theDocID) == _mapOf3DPrimOperations.end()) {
|
return _3DPrimOperations;
|
||||||
_mapOf3DPrimOperations[theDocID] = new GEOMImpl_I3DPrimOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOf3DPrimOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -310,13 +251,9 @@ GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
|
|||||||
* GetIShapesOperations
|
* GetIShapesOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
|
GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfShapesOperations.find(theDocID) == _mapOfShapesOperations.end()) {
|
return _ShapesOperations;
|
||||||
_mapOfShapesOperations[theDocID] = new GEOMImpl_IShapesOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfShapesOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -324,13 +261,9 @@ GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
|
|||||||
* GetIBlocksOperations
|
* GetIBlocksOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
|
GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfBlocksOperations.find(theDocID) == _mapOfBlocksOperations.end()) {
|
return _BlocksOperations;
|
||||||
_mapOfBlocksOperations[theDocID] = new GEOMImpl_IBlocksOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfBlocksOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -338,13 +271,9 @@ GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
|
|||||||
* GetICurvesOperations
|
* GetICurvesOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
|
GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfCurvesOperations.find(theDocID) == _mapOfCurvesOperations.end()) {
|
return _CurvesOperations;
|
||||||
_mapOfCurvesOperations[theDocID] = new GEOMImpl_ICurvesOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfCurvesOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -352,13 +281,9 @@ GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
|
|||||||
* GetILocalOperations
|
* GetILocalOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
|
GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfLocalOperations.find(theDocID) == _mapOfLocalOperations.end()) {
|
return _LocalOperations;
|
||||||
_mapOfLocalOperations[theDocID] = new GEOMImpl_ILocalOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfLocalOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -366,13 +291,9 @@ GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
|
|||||||
* GetIInsertOperations
|
* GetIInsertOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
|
GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfInsertOperations.find(theDocID) == _mapOfInsertOperations.end()) {
|
return _InsertOperations;
|
||||||
_mapOfInsertOperations[theDocID] = new GEOMImpl_IInsertOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfInsertOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -380,13 +301,9 @@ GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
|
|||||||
* GetIMeasureOperations
|
* GetIMeasureOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
|
GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfMeasureOperations.find(theDocID) == _mapOfMeasureOperations.end()) {
|
return _MeasureOperations;
|
||||||
_mapOfMeasureOperations[theDocID] = new GEOMImpl_IMeasureOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfMeasureOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -394,13 +311,9 @@ GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
|
|||||||
* GetIGroupOperations
|
* GetIGroupOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
|
GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfGroupOperations.find(theDocID) == _mapOfGroupOperations.end()) {
|
return _GroupOperations;
|
||||||
_mapOfGroupOperations[theDocID] = new GEOMImpl_IGroupOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfGroupOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -408,11 +321,7 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
|
|||||||
* GetIFieldOperations
|
* GetIFieldOperations
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations(int theDocID)
|
GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations()
|
||||||
{
|
{
|
||||||
if(_mapOfFieldOperations.find(theDocID) == _mapOfFieldOperations.end()) {
|
return _FieldOperations;
|
||||||
_mapOfFieldOperations[theDocID] = new GEOMImpl_IFieldOperations(this, theDocID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _mapOfFieldOperations[theDocID];
|
|
||||||
}
|
}
|
||||||
|
@ -48,47 +48,47 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
|
|||||||
GEOMImpl_Gen();
|
GEOMImpl_Gen();
|
||||||
~GEOMImpl_Gen();
|
~GEOMImpl_Gen();
|
||||||
|
|
||||||
GEOMImpl_IBasicOperations* GetIBasicOperations(int theDocID);
|
GEOMImpl_IBasicOperations* GetIBasicOperations();
|
||||||
|
|
||||||
GEOMImpl_ITransformOperations* GetITransformOperations(int theDocID);
|
GEOMImpl_ITransformOperations* GetITransformOperations();
|
||||||
|
|
||||||
GEOMImpl_I3DPrimOperations* GetI3DPrimOperations(int theDocID);
|
GEOMImpl_I3DPrimOperations* GetI3DPrimOperations();
|
||||||
|
|
||||||
GEOMImpl_IShapesOperations* GetIShapesOperations(int theDocID);
|
GEOMImpl_IShapesOperations* GetIShapesOperations();
|
||||||
|
|
||||||
GEOMImpl_IBlocksOperations* GetIBlocksOperations(int theDocID);
|
GEOMImpl_IBlocksOperations* GetIBlocksOperations();
|
||||||
|
|
||||||
GEOMImpl_IMeasureOperations* GetIMeasureOperations(int theDocID);
|
GEOMImpl_IMeasureOperations* GetIMeasureOperations();
|
||||||
|
|
||||||
GEOMImpl_IBooleanOperations* GetIBooleanOperations(int theDocID);
|
GEOMImpl_IBooleanOperations* GetIBooleanOperations();
|
||||||
|
|
||||||
GEOMImpl_ICurvesOperations* GetICurvesOperations(int theDocID);
|
GEOMImpl_ICurvesOperations* GetICurvesOperations();
|
||||||
|
|
||||||
GEOMImpl_ILocalOperations* GetILocalOperations(int theDocID);
|
GEOMImpl_ILocalOperations* GetILocalOperations();
|
||||||
|
|
||||||
GEOMImpl_IInsertOperations* GetIInsertOperations(int theDocID);
|
GEOMImpl_IInsertOperations* GetIInsertOperations();
|
||||||
|
|
||||||
GEOMImpl_IHealingOperations* GetIHealingOperations(int theDocID);
|
GEOMImpl_IHealingOperations* GetIHealingOperations();
|
||||||
|
|
||||||
GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
|
GEOMImpl_IGroupOperations* GetIGroupOperations();
|
||||||
|
|
||||||
GEOMImpl_IFieldOperations* GetIFieldOperations(int theDocID);
|
GEOMImpl_IFieldOperations* GetIFieldOperations();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::map <int, GEOMImpl_IBasicOperations*> _mapOfBasicOperations;
|
GEOMImpl_IBasicOperations* _BasicOperations;
|
||||||
std::map <int, GEOMImpl_ITransformOperations*> _mapOfTransformOperations;
|
GEOMImpl_ITransformOperations* _TransformOperations;
|
||||||
std::map <int, GEOMImpl_I3DPrimOperations*> _mapOf3DPrimOperations;
|
GEOMImpl_I3DPrimOperations* _3DPrimOperations;
|
||||||
std::map <int, GEOMImpl_IShapesOperations*> _mapOfShapesOperations;
|
GEOMImpl_IShapesOperations* _ShapesOperations;
|
||||||
std::map <int, GEOMImpl_IBlocksOperations*> _mapOfBlocksOperations;
|
GEOMImpl_IBlocksOperations* _BlocksOperations;
|
||||||
std::map <int, GEOMImpl_IBooleanOperations*> _mapOfBooleanOperations;
|
GEOMImpl_IBooleanOperations* _BooleanOperations;
|
||||||
std::map <int, GEOMImpl_IHealingOperations*> _mapOfHealingOperations;
|
GEOMImpl_IHealingOperations* _HealingOperations;
|
||||||
std::map <int, GEOMImpl_ICurvesOperations*> _mapOfCurvesOperations;
|
GEOMImpl_ICurvesOperations* _CurvesOperations;
|
||||||
std::map <int, GEOMImpl_ILocalOperations*> _mapOfLocalOperations;
|
GEOMImpl_ILocalOperations* _LocalOperations;
|
||||||
std::map <int, GEOMImpl_IInsertOperations*> _mapOfInsertOperations;
|
GEOMImpl_IInsertOperations* _InsertOperations;
|
||||||
std::map <int, GEOMImpl_IMeasureOperations*> _mapOfMeasureOperations;
|
GEOMImpl_IMeasureOperations* _MeasureOperations;
|
||||||
std::map <int, GEOMImpl_IGroupOperations*> _mapOfGroupOperations;
|
GEOMImpl_IGroupOperations* _GroupOperations;
|
||||||
std::map <int, GEOMImpl_IFieldOperations*> _mapOfFieldOperations;
|
GEOMImpl_IFieldOperations* _FieldOperations;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,11 +85,11 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
|
MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
|
||||||
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
|
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -114,7 +114,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, dou
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Box object
|
//Add a new Box object
|
||||||
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
|
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
|
||||||
|
|
||||||
//Add a new Box function with DX_DY_DZ parameters
|
//Add a new Box function with DX_DY_DZ parameters
|
||||||
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
|
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
|
||||||
@ -165,7 +165,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Objec
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Box object
|
//Add a new Box object
|
||||||
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
|
Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
|
||||||
|
|
||||||
//Add a new Box function for creation a box relatively to two points
|
//Add a new Box function for creation a box relatively to two points
|
||||||
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
|
Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
|
||||||
@ -218,7 +218,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceHW (double theH, double
|
|||||||
if (theH == 0 || theW == 0) return NULL;
|
if (theH == 0 || theW == 0) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Box function for creation a box relatively to two points
|
//Add a new Box function for creation a box relatively to two points
|
||||||
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
|
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
|
||||||
@ -268,7 +268,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceObjHW (Handle(GEOM_Objec
|
|||||||
if (theObj.IsNull()) return NULL;
|
if (theObj.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Box function for creation a box relatively to two points
|
//Add a new Box function for creation a box relatively to two points
|
||||||
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
|
Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
|
||||||
@ -323,7 +323,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskPntVecR
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Disk object
|
//Add a new Disk object
|
||||||
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Disk function for creation a disk relatively to point and vector
|
//Add a new Disk function for creation a disk relatively to point and vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -380,7 +380,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskThreePnt (Handle(GEOM_Ob
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Disk object
|
//Add a new Disk object
|
||||||
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Disk function for creation a disk relatively to three points
|
//Add a new Disk function for creation a disk relatively to three points
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -436,7 +436,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskR (double theR, int theO
|
|||||||
if (theR == 0 ) return NULL;
|
if (theR == 0 ) return NULL;
|
||||||
|
|
||||||
//Add a new Disk object
|
//Add a new Disk object
|
||||||
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Box function for creation a box relatively to two points
|
//Add a new Box function for creation a box relatively to two points
|
||||||
Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
|
Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
|
||||||
@ -482,7 +482,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Cylinder object
|
//Add a new Cylinder object
|
||||||
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
|
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
|
||||||
|
|
||||||
//Add a new Cylinder function with R and H parameters
|
//Add a new Cylinder function with R and H parameters
|
||||||
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
|
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
|
||||||
@ -528,7 +528,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRHA (double theR, do
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Cylinder object
|
//Add a new Cylinder object
|
||||||
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
|
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
|
||||||
|
|
||||||
//Add a new Cylinder function with R and H parameters
|
//Add a new Cylinder function with R and H parameters
|
||||||
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
|
Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
|
||||||
@ -579,7 +579,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Cylinder object
|
//Add a new Cylinder object
|
||||||
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
|
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
|
||||||
|
|
||||||
//Add a new Cylinder function for creation a cylinder relatively to point and vector
|
//Add a new Cylinder function for creation a cylinder relatively to point and vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -637,7 +637,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GE
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Cylinder object
|
//Add a new Cylinder object
|
||||||
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
|
Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
|
||||||
|
|
||||||
//Add a new Cylinder function for creation a cylinder relatively to point and vector
|
//Add a new Cylinder function for creation a cylinder relatively to point and vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -694,7 +694,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, dou
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Cone object
|
//Add a new Cone object
|
||||||
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
|
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
|
||||||
|
|
||||||
//Add a new Cone function with R and H parameters
|
//Add a new Cone function with R and H parameters
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -748,7 +748,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Cone object
|
//Add a new Cone object
|
||||||
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
|
Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
|
||||||
|
|
||||||
//Add a new Cone function for creation a cone relatively to point and vector
|
//Add a new Cone function for creation a cone relatively to point and vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -804,7 +804,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR)
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Sphere object
|
//Add a new Sphere object
|
||||||
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
|
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
|
||||||
|
|
||||||
//Add a new Sphere function with R parameter
|
//Add a new Sphere function with R parameter
|
||||||
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
|
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
|
||||||
@ -852,7 +852,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Obje
|
|||||||
if (thePnt.IsNull()) return NULL;
|
if (thePnt.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Point object
|
//Add a new Point object
|
||||||
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
|
Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
|
||||||
|
|
||||||
//Add a new Sphere function for creation a sphere relatively to point
|
//Add a new Sphere function for creation a sphere relatively to point
|
||||||
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
|
Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
|
||||||
@ -904,7 +904,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Torus object
|
//Add a new Torus object
|
||||||
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
|
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
|
||||||
|
|
||||||
//Add a new Torus function
|
//Add a new Torus function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -955,7 +955,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Torus object
|
//Add a new Torus object
|
||||||
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
|
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
|
||||||
|
|
||||||
//Add a new Torus function
|
//Add a new Torus function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1014,7 +1014,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec
|
|||||||
if (theBase.IsNull() || theVec.IsNull()) return NULL;
|
if (theBase.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism relatively to vector
|
//Add a new Prism function for creation a Prism relatively to vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1077,7 +1077,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH2Ways (Handle(GEOM_
|
|||||||
if (theBase.IsNull() || theVec.IsNull()) return NULL;
|
if (theBase.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism relatively to vector
|
//Add a new Prism function for creation a Prism relatively to vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1136,7 +1136,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt
|
|||||||
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
|
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism relatively to two points
|
//Add a new Prism function for creation a Prism relatively to two points
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1200,7 +1200,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt2Ways
|
|||||||
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
|
if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism relatively to two points
|
//Add a new Prism function for creation a Prism relatively to two points
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1259,7 +1259,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ
|
|||||||
if (theBase.IsNull()) return NULL;
|
if (theBase.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism by DXDYDZ
|
//Add a new Prism function for creation a Prism by DXDYDZ
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1321,7 +1321,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ2Ways
|
|||||||
if (theBase.IsNull()) return NULL;
|
if (theBase.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Prism object
|
//Add a new Prism object
|
||||||
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
|
Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
|
||||||
|
|
||||||
//Add a new Prism function for creation a Prism by DXDYDZ
|
//Add a new Prism function for creation a Prism by DXDYDZ
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1381,12 +1381,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
|
|||||||
if ( theFuse )
|
if ( theFuse )
|
||||||
{
|
{
|
||||||
//Add a new Extruded Boss object
|
//Add a new Extruded Boss object
|
||||||
aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_BOSS);
|
aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_BOSS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Add a new Extruded Cut object
|
//Add a new Extruded Cut object
|
||||||
aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_CUT);
|
aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_CUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Prism function for the creation of a Draft Prism feature
|
//Add a new Prism function for the creation of a Draft Prism feature
|
||||||
@ -1464,7 +1464,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_I3DPrimOperations::MakePipe
|
|||||||
if (theBase.IsNull() || thePath.IsNull()) return NULL;
|
if (theBase.IsNull() || thePath.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Pipe object
|
//Add a new Pipe object
|
||||||
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
|
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
|
||||||
|
|
||||||
//Add a new Pipe function
|
//Add a new Pipe function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1541,7 +1541,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
|
|||||||
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
|
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Revolution object
|
//Add a new Revolution object
|
||||||
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
|
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
|
||||||
|
|
||||||
//Add a new Revolution function for creation a revolution relatively to axis
|
//Add a new Revolution function for creation a revolution relatively to axis
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1597,7 +1597,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle2Ways
|
|||||||
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
|
if (theBase.IsNull() || theAxis.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Revolution object
|
//Add a new Revolution object
|
||||||
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
|
Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
|
||||||
|
|
||||||
//Add a new Revolution function for creation a revolution relatively to axis
|
//Add a new Revolution function for creation a revolution relatively to axis
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1659,7 +1659,7 @@ GEOMImpl_I3DPrimOperations::MakeFilling (std::list< Handle(GEOM_Object)> & theCo
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
//Add a new Filling object
|
//Add a new Filling object
|
||||||
Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
|
Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GEOM_FILLING);
|
||||||
|
|
||||||
//Add a new Filling function for creation a filling from a compound
|
//Add a new Filling function for creation a filling from a compound
|
||||||
Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
|
Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
|
||||||
@ -1735,7 +1735,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections(
|
|||||||
return anObj;
|
return anObj;
|
||||||
|
|
||||||
//Add a new ThruSections object
|
//Add a new ThruSections object
|
||||||
Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GetDocID(), GEOM_THRUSECTIONS);
|
Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GEOM_THRUSECTIONS);
|
||||||
|
|
||||||
|
|
||||||
//Add a new ThruSections function
|
//Add a new ThruSections function
|
||||||
@ -1840,7 +1840,7 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
|
|
||||||
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
||||||
//Add a new Pipe object
|
//Add a new Pipe object
|
||||||
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
|
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
|
||||||
|
|
||||||
//Add a new Pipe function
|
//Add a new Pipe function
|
||||||
|
|
||||||
@ -2016,7 +2016,7 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
||||||
|
|
||||||
//Add a new Pipe object
|
//Add a new Pipe object
|
||||||
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
|
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
|
||||||
|
|
||||||
//Add a new Pipe function
|
//Add a new Pipe function
|
||||||
|
|
||||||
@ -2205,7 +2205,7 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
Standard_Integer nbLocs = (theLocations.IsNull() ? 0 :theLocations->Length());
|
||||||
|
|
||||||
//Add a new Pipe object
|
//Add a new Pipe object
|
||||||
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
|
Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
|
||||||
|
|
||||||
//Add a new Pipe function
|
//Add a new Pipe function
|
||||||
|
|
||||||
@ -2348,7 +2348,7 @@ Handle(TColStd_HSequenceOfTransient)
|
|||||||
if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
|
if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Pipe object
|
//Add a new Pipe object
|
||||||
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
|
Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
|
||||||
|
|
||||||
//Add a new Pipe function
|
//Add a new Pipe function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2438,7 +2438,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
|
|||||||
if (isCopy)
|
if (isCopy)
|
||||||
{
|
{
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
|
aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2521,7 +2521,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath (Handle(GEOM_Object)
|
|||||||
if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
|
if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
|
||||||
|
|
||||||
// Add a new Path object
|
// Add a new Path object
|
||||||
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
|
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
|
||||||
|
|
||||||
// Add a new Path function
|
// Add a new Path function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2586,7 +2586,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Add a new Path object
|
// Add a new Path object
|
||||||
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
|
Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
|
||||||
|
|
||||||
// Add a new Path function
|
// Add a new Path function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -36,7 +36,7 @@ class GEOMImpl_IPipe;
|
|||||||
|
|
||||||
class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
|
class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_I3DPrimOperations();
|
Standard_EXPORT ~GEOMImpl_I3DPrimOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ);
|
Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ);
|
||||||
|
@ -39,12 +39,12 @@ typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List<TopoDS
|
|||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine(), GetDocID() );
|
myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine() );
|
||||||
myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine(), GetDocID() );
|
myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine() );
|
||||||
myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine(), GetDocID() );
|
myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -33,7 +33,7 @@ class GEOMImpl_IShapesOperations;
|
|||||||
class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
|
class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
|
Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
|
MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Point object
|
//Add a new Point object
|
||||||
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
|
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
|
||||||
|
|
||||||
//Add a new Point function with XYZ parameters
|
//Add a new Point function with XYZ parameters
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -138,7 +138,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
|
|||||||
if (theReference.IsNull()) return NULL;
|
if (theReference.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Point object
|
//Add a new Point object
|
||||||
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
|
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
|
||||||
|
|
||||||
//Add a new Point function for creation a point relativley another point
|
//Add a new Point function for creation a point relativley another point
|
||||||
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
|
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
|
||||||
@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
|
|||||||
if (theGeomObj.IsNull()) return NULL;
|
if (theGeomObj.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Point object
|
//Add a new Point object
|
||||||
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
|
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
|
||||||
|
|
||||||
//Add a new Point function for creation a point relativley another point
|
//Add a new Point function for creation a point relativley another point
|
||||||
int fType = POINT_CURVE_PAR;
|
int fType = POINT_CURVE_PAR;
|
||||||
@ -403,7 +403,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnLinesIntersection
|
|||||||
if (theLine1.IsNull() || theLine2.IsNull()) return NULL;
|
if (theLine1.IsNull() || theLine2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Point object
|
//Add a new Point object
|
||||||
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
|
Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
|
||||||
|
|
||||||
//Add a new Point function for creation a point relativley another point
|
//Add a new Point function for creation a point relativley another point
|
||||||
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_LINES_INTERSECTION);
|
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_LINES_INTERSECTION);
|
||||||
@ -455,7 +455,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentOnCurve
|
|||||||
if (theCurve.IsNull()) return NULL;
|
if (theCurve.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Vector object
|
//Add a new Vector object
|
||||||
Handle(GEOM_Object) aVec = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
|
Handle(GEOM_Object) aVec = GetEngine()->AddObject(GEOM_VECTOR);
|
||||||
|
|
||||||
//Add a new Point function for creation a point relativley another point
|
//Add a new Point function for creation a point relativley another point
|
||||||
Handle(GEOM_Function) aFunction = aVec->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TANGENT_CURVE_PAR);
|
Handle(GEOM_Function) aFunction = aVec->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TANGENT_CURVE_PAR);
|
||||||
@ -504,7 +504,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Vector object
|
//Add a new Vector object
|
||||||
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
|
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
|
||||||
|
|
||||||
//Add a new Vector function with DXDYDZ parameters
|
//Add a new Vector function with DXDYDZ parameters
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -555,7 +555,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Vector object
|
//Add a new Vector object
|
||||||
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
|
Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -609,7 +609,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine
|
|||||||
if (thePnt.IsNull() || theDir.IsNull()) return NULL;
|
if (thePnt.IsNull() || theDir.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Line object
|
//Add a new Line object
|
||||||
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
|
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
|
||||||
|
|
||||||
//Add a new Line function
|
//Add a new Line function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -662,7 +662,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Line object
|
//Add a new Line object
|
||||||
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
|
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
|
||||||
|
|
||||||
//Add a new Line function
|
//Add a new Line function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -715,7 +715,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoFaces
|
|||||||
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
|
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Line object
|
//Add a new Line object
|
||||||
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
|
Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
|
||||||
|
|
||||||
//Add a new Line function
|
//Add a new Line function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -769,7 +769,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -826,7 +826,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
|
|||||||
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -880,7 +880,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
|
|||||||
if (theFace.IsNull()) return NULL;
|
if (theFace.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -933,7 +933,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlane2Vec
|
|||||||
if (theVec1.IsNull() || theVec2.IsNull()) return NULL;
|
if (theVec1.IsNull() || theVec2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -985,7 +985,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneLCS
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1040,7 +1040,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Marker object
|
//Add a new Marker object
|
||||||
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
|
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
|
||||||
|
|
||||||
//Add a new Marker function
|
//Add a new Marker function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1091,7 +1091,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerFromShape
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Marker object
|
//Add a new Marker object
|
||||||
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
|
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
|
||||||
|
|
||||||
//Add a new Marker function
|
//Add a new Marker function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1142,7 +1142,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerPntTwoVec
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Marker object
|
//Add a new Marker object
|
||||||
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
|
Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
|
||||||
|
|
||||||
//Add a new Marker function
|
//Add a new Marker function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1201,7 +1201,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentPlaneOnFace(const Hand
|
|||||||
if (theFace.IsNull()) return NULL;
|
if (theFace.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Plane object
|
//Add a new Plane object
|
||||||
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
|
Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
|
||||||
|
|
||||||
//Add a new Plane function
|
//Add a new Plane function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
class GEOMImpl_IBasicOperations : public GEOM_IOperations {
|
class GEOMImpl_IBasicOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IBasicOperations();
|
Standard_EXPORT ~GEOMImpl_IBasicOperations();
|
||||||
|
|
||||||
// Point
|
// Point
|
||||||
|
@ -249,8 +249,8 @@ static Standard_Boolean IsQuadrangle(const TopoDS_Face &theFace,
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
|
MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
|
|||||||
theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
|
theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Face function
|
//Add a new Face function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -342,7 +342,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
|
|||||||
if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
|
if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Face function
|
//Add a new Face function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -400,7 +400,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
|
|||||||
thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
|
thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Face function
|
//Add a new Face function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -465,7 +465,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
|
|||||||
theFace5.IsNull() || theFace6.IsNull()) return NULL;
|
theFace5.IsNull() || theFace6.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Solid object
|
//Add a new Solid object
|
||||||
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
|
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
|
||||||
|
|
||||||
//Add a new Block function
|
//Add a new Block function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -532,7 +532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
|
|||||||
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
|
if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Solid object
|
//Add a new Solid object
|
||||||
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
|
Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
|
||||||
|
|
||||||
//Add a new Block function
|
//Add a new Block function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
|
|||||||
if (theCompound.IsNull()) return NULL;
|
if (theCompound.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GetDocID(), GEOM_COMPOUND);
|
Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GEOM_COMPOUND);
|
||||||
|
|
||||||
//Add a new BlocksComp function
|
//Add a new BlocksComp function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2430,7 +2430,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a function
|
//Add a function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2482,7 +2482,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a function
|
//Add a function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2532,7 +2532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a function
|
//Add a function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -3091,7 +3091,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -3150,7 +3150,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -36,7 +36,7 @@ class GEOM_Object;
|
|||||||
|
|
||||||
class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
|
class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IBlocksOperations();
|
Standard_EXPORT ~GEOMImpl_IBlocksOperations();
|
||||||
|
|
||||||
// Creation of blocks and block faces
|
// Creation of blocks and block faces
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
|
MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean
|
|||||||
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
|
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
|
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
|
||||||
|
|
||||||
//Add a new Boolean function
|
//Add a new Boolean function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -162,7 +162,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse
|
|||||||
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
|
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
|
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
|
||||||
|
|
||||||
//Add a new Boolean function
|
//Add a new Boolean function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -225,7 +225,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList
|
|||||||
if (theShapes.IsNull()) return NULL;
|
if (theShapes.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
|
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
|
||||||
|
|
||||||
//Add a new Boolean function
|
//Add a new Boolean function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -286,7 +286,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList
|
|||||||
if (theShapes.IsNull()) return NULL;
|
if (theShapes.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
|
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
|
||||||
|
|
||||||
//Add a new Boolean function
|
//Add a new Boolean function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -353,7 +353,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList
|
|||||||
if (theShapes.IsNull()) return NULL;
|
if (theShapes.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
|
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
|
||||||
|
|
||||||
//Add a new Boolean function
|
//Add a new Boolean function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -429,7 +429,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Partition object
|
//Add a new Partition object
|
||||||
Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
|
Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GEOM_PARTITION);
|
||||||
|
|
||||||
//Add a new Partition function
|
//Add a new Partition function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -565,7 +565,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
|
|||||||
if (theShape.IsNull() || thePlane.IsNull()) return NULL;
|
if (theShape.IsNull() || thePlane.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Boolean object
|
//Add a new Boolean object
|
||||||
Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
|
Handle(GEOM_Object) aPart = GetEngine()->AddObject(GEOM_PARTITION);
|
||||||
|
|
||||||
//Add a new Partition function
|
//Add a new Partition function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -33,7 +33,7 @@ class GEOM_Object;
|
|||||||
|
|
||||||
class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
|
class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IBooleanOperations();
|
Standard_EXPORT ~GEOMImpl_IBooleanOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeBoolean
|
Standard_EXPORT Handle(GEOM_Object) MakeBoolean
|
||||||
|
@ -183,8 +183,8 @@ namespace
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations");
|
MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations");
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle object
|
//Add a new Circle object
|
||||||
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
|
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
|
||||||
|
|
||||||
//Add a new Circle function for creation a circle relatively to three points
|
//Add a new Circle function for creation a circle relatively to three points
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -272,7 +272,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleCenter2Pnt (Handle(GEO
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle object
|
//Add a new Circle object
|
||||||
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
|
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
|
||||||
|
|
||||||
//Add a new Circle function for creation a circle relatively to center and 2 points
|
//Add a new Circle function for creation a circle relatively to center and 2 points
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -331,7 +331,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR
|
|||||||
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle object
|
//Add a new Circle object
|
||||||
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
|
Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
|
||||||
|
|
||||||
//Add a new Circle function for creation a circle relatively to point and vector
|
//Add a new Circle function for creation a circle relatively to point and vector
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -397,7 +397,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse
|
|||||||
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
//if (thePnt.IsNull() || theVec.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Ellipse object
|
//Add a new Ellipse object
|
||||||
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE);
|
Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_ELLIPSE);
|
||||||
|
|
||||||
//Add a new Ellipse function
|
//Add a new Ellipse function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -473,7 +473,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) the
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle Arc object
|
//Add a new Circle Arc object
|
||||||
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
|
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
|
||||||
|
|
||||||
//Add a new Circle Arc function
|
//Add a new Circle Arc function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -531,7 +531,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcCenter (Handle(GEOM_Objec
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle Arc object
|
//Add a new Circle Arc object
|
||||||
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
|
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
|
||||||
|
|
||||||
//Add a new Circle Arc function
|
//Add a new Circle Arc function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -589,7 +589,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Circle Arc object
|
//Add a new Circle Arc object
|
||||||
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE_ARC);
|
Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_ELLIPSE_ARC);
|
||||||
|
|
||||||
//Add a new Circle Arc function
|
//Add a new Circle Arc function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -644,7 +644,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list<Handle(G
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Polyline object
|
//Add a new Polyline object
|
||||||
Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
|
Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GEOM_POLYLINE);
|
||||||
|
|
||||||
//Add a new Polyline function for creation a polyline relatively to points set
|
//Add a new Polyline function for creation a polyline relatively to points set
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -714,7 +714,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
|
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
|
||||||
|
|
||||||
//Add a new Spline function for creation a bezier curve relatively to points set
|
//Add a new Spline function for creation a bezier curve relatively to points set
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -784,7 +784,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
|
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
|
||||||
|
|
||||||
//Add a new Spline function for interpolation type
|
//Add a new Spline function for interpolation type
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -855,7 +855,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolWithTangents
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
|
Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
|
||||||
|
|
||||||
//Add a new Spline function for interpolation type
|
//Add a new Spline function for interpolation type
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1069,7 +1069,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
|
|||||||
switch(theCurveType) {
|
switch(theCurveType) {
|
||||||
case Polyline: {
|
case Polyline: {
|
||||||
//Add a new Polyline object
|
//Add a new Polyline object
|
||||||
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
|
aCurve = GetEngine()->AddObject(GEOM_POLYLINE);
|
||||||
|
|
||||||
//Add a new Polyline function for creation a polyline relatively to points set
|
//Add a new Polyline function for creation a polyline relatively to points set
|
||||||
aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
|
aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
|
||||||
@ -1089,7 +1089,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
|
|||||||
}
|
}
|
||||||
case Bezier: {
|
case Bezier: {
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
|
aCurve = GetEngine()->AddObject(GEOM_SPLINE);
|
||||||
//Add a new Spline function for creation a bezier curve relatively to points set
|
//Add a new Spline function for creation a bezier curve relatively to points set
|
||||||
aFunction =
|
aFunction =
|
||||||
aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
|
aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
|
||||||
@ -1108,7 +1108,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
|
|||||||
}
|
}
|
||||||
case Interpolation: {
|
case Interpolation: {
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
|
aCurve = GetEngine()->AddObject(GEOM_SPLINE);
|
||||||
|
|
||||||
//Add a new Spline function for creation a bezier curve relatively to points set
|
//Add a new Spline function for creation a bezier curve relatively to points set
|
||||||
aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
|
aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
|
||||||
@ -1185,7 +1185,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom
|
|||||||
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
||||||
|
|
||||||
//Add a new Sketcher object
|
//Add a new Sketcher object
|
||||||
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
|
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
|
||||||
|
|
||||||
//Add a new Sketcher function
|
//Add a new Sketcher function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1248,7 +1248,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcherOnPlane
|
|||||||
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
||||||
|
|
||||||
//Add a new Sketcher object
|
//Add a new Sketcher object
|
||||||
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
|
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
|
||||||
|
|
||||||
//Add a new Sketcher function
|
//Add a new Sketcher function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1301,7 +1301,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcherCommand (const cha
|
|||||||
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
|
||||||
|
|
||||||
//Add a new Sketcher object
|
//Add a new Sketcher object
|
||||||
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
|
Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
|
||||||
|
|
||||||
//Add a new Sketcher function
|
//Add a new Sketcher function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1348,7 +1348,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list<double
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Sketcher object
|
//Add a new Sketcher object
|
||||||
Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
|
Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
|
||||||
|
|
||||||
//Add a new Sketcher function
|
//Add a new Sketcher function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1421,7 +1421,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeIsoline
|
|||||||
|
|
||||||
//Add a new Spline object
|
//Add a new Spline object
|
||||||
Handle(GEOM_Object) anIsoline =
|
Handle(GEOM_Object) anIsoline =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_ISOLINE);
|
GetEngine()->AddObject(GEOM_ISOLINE);
|
||||||
|
|
||||||
//Add a new Spline function for interpolation type
|
//Add a new Spline function for interpolation type
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1490,7 +1490,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2D
|
|||||||
|
|
||||||
// Add a new Polyline object
|
// Add a new Polyline object
|
||||||
Handle(GEOM_Object) aResult =
|
Handle(GEOM_Object) aResult =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
|
GetEngine()->AddObject(GEOM_POLYLINE2D);
|
||||||
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
||||||
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_COORDS);
|
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_COORDS);
|
||||||
|
|
||||||
@ -1563,7 +1563,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2DOnPlane
|
|||||||
|
|
||||||
//Add a new Polyline object
|
//Add a new Polyline object
|
||||||
Handle(GEOM_Object) aResult =
|
Handle(GEOM_Object) aResult =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
|
GetEngine()->AddObject(GEOM_POLYLINE2D);
|
||||||
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
||||||
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_OBJECT);
|
(GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_OBJECT);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations {
|
|||||||
|
|
||||||
enum CurveType { Polyline, Bezier, Interpolation };
|
enum CurveType { Polyline, Bezier, Interpolation };
|
||||||
|
|
||||||
Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_ICurvesOperations();
|
Standard_EXPORT ~GEOMImpl_ICurvesOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
|
Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
|
||||||
|
@ -56,8 +56,7 @@ GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine()
|
|||||||
* Export
|
* Export
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool GEOMImpl_IECallBack::Export( int /*theDocId*/,
|
bool GEOMImpl_IECallBack::Export( const Handle(GEOM_Object) /*theOriginal*/,
|
||||||
const Handle(GEOM_Object) /*theOriginal*/,
|
|
||||||
const TCollection_AsciiString& /*theFileName*/,
|
const TCollection_AsciiString& /*theFileName*/,
|
||||||
const TCollection_AsciiString& /*theFormatName*/ )
|
const TCollection_AsciiString& /*theFormatName*/ )
|
||||||
{
|
{
|
||||||
@ -70,8 +69,7 @@ bool GEOMImpl_IECallBack::Export( int /*theDocId*/,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(TColStd_HSequenceOfTransient)
|
Handle(TColStd_HSequenceOfTransient)
|
||||||
GEOMImpl_IECallBack::Import( int /*theDocId*/,
|
GEOMImpl_IECallBack::Import( const TCollection_AsciiString& /*theFormatName*/,
|
||||||
const TCollection_AsciiString& /*theFormatName*/,
|
|
||||||
const TCollection_AsciiString& /*theFileName*/ )
|
const TCollection_AsciiString& /*theFileName*/ )
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -83,8 +81,7 @@ GEOMImpl_IECallBack::Import( int /*theDocId*/,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
TCollection_AsciiString
|
TCollection_AsciiString
|
||||||
GEOMImpl_IECallBack::ReadValue( int /*theDocId*/,
|
GEOMImpl_IECallBack::ReadValue( const TCollection_AsciiString& /*theFileName*/,
|
||||||
const TCollection_AsciiString& /*theFileName*/,
|
|
||||||
const TCollection_AsciiString& /*theFormatName*/,
|
const TCollection_AsciiString& /*theFormatName*/,
|
||||||
const TCollection_AsciiString& /*theParameterName*/ )
|
const TCollection_AsciiString& /*theParameterName*/ )
|
||||||
{
|
{
|
||||||
|
@ -37,21 +37,18 @@ class GEOMImpl_IECallBack
|
|||||||
Standard_EXPORT GEOMImpl_IECallBack();
|
Standard_EXPORT GEOMImpl_IECallBack();
|
||||||
Standard_EXPORT ~GEOMImpl_IECallBack();
|
Standard_EXPORT ~GEOMImpl_IECallBack();
|
||||||
|
|
||||||
Standard_EXPORT virtual bool Export( int theDocId,
|
Standard_EXPORT virtual bool Export( const Handle(GEOM_Object) theOriginal,
|
||||||
const Handle(GEOM_Object) theOriginal,
|
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFormatName );
|
const TCollection_AsciiString& theFormatName );
|
||||||
|
|
||||||
Standard_EXPORT virtual
|
Standard_EXPORT virtual
|
||||||
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
|
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFileName );
|
||||||
const TCollection_AsciiString& theFileName );
|
|
||||||
|
|
||||||
Standard_EXPORT virtual
|
Standard_EXPORT virtual
|
||||||
TCollection_AsciiString ReadValue( int theDocId,
|
TCollection_AsciiString ReadValue( const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theParameterName );
|
||||||
const TCollection_AsciiString& theParameterName );
|
|
||||||
|
|
||||||
Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );
|
Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations");
|
MESSAGE("GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations");
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ CreateField( const Handle(GEOM_Object)& theShape,
|
|||||||
|
|
||||||
// make a field
|
// make a field
|
||||||
Handle(GEOM_Field) aField = Handle(GEOM_Field)::DownCast
|
Handle(GEOM_Field) aField = Handle(GEOM_Field)::DownCast
|
||||||
( GetEngine()->AddBaseObject( GetDocID(), GEOM_FIELD ));
|
( GetEngine()->AddBaseObject( GEOM_FIELD ));
|
||||||
|
|
||||||
// set field data
|
// set field data
|
||||||
aField->Init( theShape, theName, theType, theDimension, theComponentNames );
|
aField->Init( theShape, theName, theType, theDimension, theComponentNames );
|
||||||
@ -142,7 +142,7 @@ int GEOMImpl_IFieldOperations::CountFields( const Handle(GEOM_Object)& theShape
|
|||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
TCollection_ExtendedString& anEntry = anIt.Value();
|
TCollection_ExtendedString& anEntry = anIt.Value();
|
||||||
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
||||||
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
|
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
|
||||||
nbFields += ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) );
|
nbFields += ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
|
|||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
TCollection_ExtendedString& anEntry = anIt.Value();
|
TCollection_ExtendedString& anEntry = anIt.Value();
|
||||||
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
||||||
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
|
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
|
||||||
if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
|
if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
|
||||||
{
|
{
|
||||||
Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
|
Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
|
||||||
@ -222,7 +222,7 @@ GEOMImpl_IFieldOperations::GetField( const Handle(GEOM_Object)& theShape,
|
|||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
TCollection_ExtendedString& anEntry = anIt.Value();
|
TCollection_ExtendedString& anEntry = anIt.Value();
|
||||||
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
|
||||||
field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( GetDocID(), entry, false ));
|
field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( entry, false ));
|
||||||
if ( !field.IsNull() && field->GetName() == theName ) {
|
if ( !field.IsNull() && field->GetName() == theName ) {
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
break;
|
break;
|
||||||
|
@ -34,7 +34,7 @@ class GEOM_Object;
|
|||||||
|
|
||||||
class GEOMImpl_IFieldOperations : public GEOM_IOperations {
|
class GEOMImpl_IFieldOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IFieldOperations();
|
Standard_EXPORT ~GEOMImpl_IFieldOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Field)
|
Standard_EXPORT Handle(GEOM_Field)
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
|
MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
class GEOMImpl_IGroupOperations : public GEOM_IOperations {
|
class GEOMImpl_IGroupOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IGroupOperations();
|
Standard_EXPORT ~GEOMImpl_IGroupOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum theShapeType);
|
Standard_EXPORT Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum theShapeType);
|
||||||
|
@ -60,8 +60,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
myModifStats = new ShHealOper_ModifStats;
|
myModifStats = new ShHealOper_ModifStats;
|
||||||
MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
|
MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
|
||||||
@ -117,7 +117,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Objec
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS);
|
||||||
@ -334,7 +334,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES);
|
||||||
@ -402,7 +402,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR);
|
||||||
@ -471,7 +471,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES);
|
||||||
@ -538,7 +538,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES);
|
||||||
@ -611,7 +611,7 @@ GEOMImpl_IHealingOperations::Sew (std::list<Handle(GEOM_Object)>& theObjects,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
|
int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
|
||||||
@ -680,7 +680,7 @@ GEOMImpl_IHealingOperations::RemoveInternalFaces (std::list< Handle(GEOM_Object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
Handle(GEOM_Function)
|
Handle(GEOM_Function)
|
||||||
@ -738,7 +738,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE);
|
||||||
@ -805,7 +805,7 @@ GEOMImpl_IHealingOperations::DivideEdgeByPoint (Handle(GEOM_Object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
|
||||||
|
|
||||||
//Add the function
|
//Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
|
||||||
@ -860,7 +860,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FuseCollinearEdgesWithinWire
|
|||||||
if (theWire.IsNull()) return NULL;
|
if (theWire.IsNull()) return NULL;
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), theWire->GetType());
|
Handle(GEOM_Object) aRes = GetEngine()->AddObject(theWire->GetType());
|
||||||
|
|
||||||
// Add a new function
|
// Add a new function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -973,7 +973,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
|
|||||||
TopExp_Explorer anExp;
|
TopExp_Explorer anExp;
|
||||||
for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() )
|
for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() )
|
||||||
{
|
{
|
||||||
anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
|
anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
|
||||||
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
|
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
|
||||||
TopoDS_Shape aValueShape = anExp.Current();
|
TopoDS_Shape aValueShape = anExp.Current();
|
||||||
aFunction->SetValue( aValueShape );
|
aFunction->SetValue( aValueShape );
|
||||||
@ -981,7 +981,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
|
|||||||
}
|
}
|
||||||
for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() )
|
for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() )
|
||||||
{
|
{
|
||||||
anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
|
anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
|
||||||
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
|
aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
|
||||||
TopoDS_Shape aValueShape = anExp.Current();
|
TopoDS_Shape aValueShape = anExp.Current();
|
||||||
aFunction->SetValue( aValueShape );
|
aFunction->SetValue( aValueShape );
|
||||||
@ -1116,7 +1116,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
|
|||||||
return NULL; //There is no function which creates an object to be processed
|
return NULL; //There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
|
if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
|
||||||
//Add the function
|
//Add the function
|
||||||
@ -1189,7 +1189,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Obj
|
|||||||
return NULL; // There is no function which creates an object to be processed
|
return NULL; // There is no function which creates an object to be processed
|
||||||
|
|
||||||
// Add a new object
|
// Add a new object
|
||||||
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
// Add the function
|
// Add the function
|
||||||
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), LIMIT_TOLERANCE);
|
aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), LIMIT_TOLERANCE);
|
||||||
|
@ -37,7 +37,7 @@ class ShHealOper_ModifStats;
|
|||||||
|
|
||||||
class GEOMImpl_IHealingOperations : public GEOM_IOperations {
|
class GEOMImpl_IHealingOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IHealingOperations();
|
Standard_EXPORT ~GEOMImpl_IHealingOperations();
|
||||||
|
|
||||||
// Apply Shape Processing to the selected Object
|
// Apply Shape Processing to the selected Object
|
||||||
|
@ -73,13 +73,13 @@
|
|||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations");
|
MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations");
|
||||||
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
|
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
|
||||||
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
|
myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
|
||||||
myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine(), GetDocID());
|
myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -107,7 +107,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy (Handle(GEOM_Object) th
|
|||||||
if (theOriginal.IsNull()) return NULL;
|
if (theOriginal.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a Copy function for creation a copy object
|
//Add a Copy function for creation a copy object
|
||||||
Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF);
|
Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF);
|
||||||
@ -157,7 +157,7 @@ void GEOMImpl_IInsertOperations::Export
|
|||||||
|
|
||||||
if (theOriginal.IsNull()) return;
|
if (theOriginal.IsNull()) return;
|
||||||
|
|
||||||
if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) )
|
if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( theOriginal, theFileName, theFormatName ) )
|
||||||
return;
|
return;
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
}
|
}
|
||||||
@ -176,7 +176,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IInsertOperations::Import
|
|||||||
if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
|
if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aSeq =
|
Handle(TColStd_HSequenceOfTransient) aSeq =
|
||||||
GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( GetDocID(), theFormatName, theFileName );
|
GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( theFormatName, theFileName );
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
|
|||||||
TCollection_AsciiString aValue;
|
TCollection_AsciiString aValue;
|
||||||
if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
|
if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
|
||||||
|
|
||||||
aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( GetDocID(), theFileName, theFormatName, theParameterName );
|
aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( theFileName, theFormatName, theParameterName );
|
||||||
|
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
return aValue;
|
return aValue;
|
||||||
@ -211,7 +211,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::RestoreShape (std::istringstream
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a Copy function
|
//Add a Copy function
|
||||||
Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
|
Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
|
||||||
@ -298,7 +298,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
|
|||||||
for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
|
for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
|
||||||
aTexture->SetValue(i, (Standard_Byte)(*bdit));
|
aTexture->SetValue(i, (Standard_Byte)(*bdit));
|
||||||
|
|
||||||
int aTextureId = GetEngine()->addTexture(GetDocID(), lenbytes*8, lines.size(), aTexture, theTextureFile);
|
int aTextureId = GetEngine()->addTexture(lenbytes*8, lines.size(), aTexture, theTextureFile);
|
||||||
if (aTextureId > 0) SetErrorCode(OK);
|
if (aTextureId > 0) SetErrorCode(OK);
|
||||||
return aTextureId;
|
return aTextureId;
|
||||||
}
|
}
|
||||||
@ -307,7 +307,7 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
|
|||||||
const Handle(TColStd_HArray1OfByte)& theTexture)
|
const Handle(TColStd_HArray1OfByte)& theTexture)
|
||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
|
int aTextureId = GetEngine()->addTexture(theWidth, theHeight, theTexture);
|
||||||
if (aTextureId > 0) SetErrorCode(OK);
|
if (aTextureId > 0) SetErrorCode(OK);
|
||||||
return aTextureId;
|
return aTextureId;
|
||||||
}
|
}
|
||||||
@ -325,7 +325,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
|
|||||||
if (theTextureId <= 0)
|
if (theTextureId <= 0)
|
||||||
return aTexture;
|
return aTexture;
|
||||||
|
|
||||||
aTexture = GetEngine()->getTexture(GetDocID(), theTextureId, theWidth, theHeight, aFileName);
|
aTexture = GetEngine()->getTexture(theTextureId, theWidth, theHeight, aFileName);
|
||||||
|
|
||||||
if (theWidth > 0 && theHeight > 0 && aTexture->Length() > 0) SetErrorCode(OK);
|
if (theWidth > 0 && theHeight > 0 && aTexture->Length() > 0) SetErrorCode(OK);
|
||||||
|
|
||||||
@ -335,7 +335,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
|
|||||||
std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
|
std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
|
||||||
{
|
{
|
||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
std::list<int> id_list = GetEngine()->getAllTextures(GetDocID());
|
std::list<int> id_list = GetEngine()->getAllTextures();
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
return id_list;
|
return id_list;
|
||||||
}
|
}
|
||||||
@ -359,7 +359,7 @@ bool GEOMImpl_IInsertOperations::TransferData
|
|||||||
|
|
||||||
//Add a new Transfer Data object object
|
//Add a new Transfer Data object object
|
||||||
Handle(GEOM_Object) aTDObj =
|
Handle(GEOM_Object) aTDObj =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_TRANSFER_DATA);
|
GetEngine()->AddObject(GEOM_TRANSFER_DATA);
|
||||||
|
|
||||||
//Add a Transfer Data function for created object
|
//Add a Transfer Data function for created object
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -56,7 +56,7 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
|
|||||||
long myMaxNumber;
|
long myMaxNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IInsertOperations();
|
Standard_EXPORT ~GEOMImpl_IInsertOperations();
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations");
|
MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations");
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -146,7 +146,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -213,7 +213,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -282,7 +282,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -349,7 +349,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
|
Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -417,7 +417,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet2D
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_2D);
|
Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GEOM_FILLET_2D);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -485,7 +485,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet1D
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Fillet object
|
//Add a new Fillet object
|
||||||
Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_1D);
|
Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GEOM_FILLET_1D);
|
||||||
|
|
||||||
//Add a new Fillet function
|
//Add a new Fillet function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -553,7 +553,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Objec
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -605,7 +605,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -661,7 +661,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -716,7 +716,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -785,7 +785,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -854,7 +854,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -924,7 +924,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Chamfer object
|
//Add a new Chamfer object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
|
||||||
|
|
||||||
//Add a new Chamfer function
|
//Add a new Chamfer function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -995,7 +995,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new Archimede object
|
//Add a new Archimede object
|
||||||
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_ARCHIMEDE);
|
Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_ARCHIMEDE);
|
||||||
|
|
||||||
//Add a new Archimede function
|
//Add a new Archimede function
|
||||||
Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE);
|
Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE);
|
||||||
@ -1073,7 +1073,7 @@ Standard_Integer GEOMImpl_ILocalOperations::GetSubShapeIndex (Handle(GEOM_Object
|
|||||||
|
|
||||||
if (aGen) {
|
if (aGen) {
|
||||||
GEOMImpl_IShapesOperations* anIShapesOperations =
|
GEOMImpl_IShapesOperations* anIShapesOperations =
|
||||||
aGen->GetIShapesOperations(GetDocID());
|
aGen->GetIShapesOperations();
|
||||||
anInd = anIShapesOperations->GetSubShapeIndex(theShape, theSubShape);
|
anInd = anIShapesOperations->GetSubShapeIndex(theShape, theSubShape);
|
||||||
SetErrorCode(anIShapesOperations->GetErrorCode());
|
SetErrorCode(anIShapesOperations->GetErrorCode());
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
class GEOMImpl_ILocalOperations : public GEOM_IOperations {
|
class GEOMImpl_ILocalOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_ILocalOperations();
|
Standard_EXPORT ~GEOMImpl_ILocalOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR);
|
Standard_EXPORT Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR);
|
||||||
|
@ -86,8 +86,8 @@
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations");
|
MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations");
|
||||||
}
|
}
|
||||||
@ -807,7 +807,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass
|
|||||||
if (theShape.IsNull()) return NULL;
|
if (theShape.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new CentreOfMass object
|
//Add a new CentreOfMass object
|
||||||
Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GetDocID(), GEOM_CDG);
|
Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GEOM_CDG);
|
||||||
|
|
||||||
//Add a new CentreOfMass function
|
//Add a new CentreOfMass function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -862,7 +862,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetVertexByIndex
|
|||||||
if (aRefShape.IsNull()) return NULL;
|
if (aRefShape.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Vertex object
|
//Add a new Vertex object
|
||||||
Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
|
Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GEOM_POINT);
|
||||||
|
|
||||||
//Add a function
|
//Add a function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -911,7 +911,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetNormal
|
|||||||
if (theFace.IsNull()) return NULL;
|
if (theFace.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Normale object
|
//Add a new Normale object
|
||||||
Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
|
Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GEOM_VECTOR);
|
||||||
|
|
||||||
//Add a new Normale function
|
//Add a new Normale function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1152,7 +1152,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetBoundingBox
|
|||||||
if (theShape.IsNull()) return NULL;
|
if (theShape.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new BoundingBox object
|
//Add a new BoundingBox object
|
||||||
Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
|
Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GEOM_BOX);
|
||||||
|
|
||||||
//Add a new BoundingBox function
|
//Add a new BoundingBox function
|
||||||
const int aType = (precise ? BND_BOX_MEASURE_PRECISE : BND_BOX_MEASURE);
|
const int aType = (precise ? BND_BOX_MEASURE_PRECISE : BND_BOX_MEASURE);
|
||||||
|
@ -41,7 +41,7 @@ class GEOM_Object;
|
|||||||
|
|
||||||
class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
|
class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IMeasureOperations();
|
Standard_EXPORT ~GEOMImpl_IMeasureOperations();
|
||||||
|
|
||||||
enum ShapeKind {
|
enum ShapeKind {
|
||||||
|
@ -168,8 +168,8 @@ namespace
|
|||||||
* constructor:
|
* constructor:
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
|
MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge
|
|||||||
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Edge object
|
//Add a new Edge object
|
||||||
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
|
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -252,7 +252,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeOnCurveByLength
|
|||||||
if (theRefCurve.IsNull()) return NULL;
|
if (theRefCurve.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Edge object
|
//Add a new Edge object
|
||||||
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
|
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -311,7 +311,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeWire
|
|||||||
if (theWire.IsNull()) return NULL;
|
if (theWire.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Edge object
|
//Add a new Edge object
|
||||||
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
|
Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -377,7 +377,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeWire
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aWire = GetEngine()->AddObject(GetDocID(), GEOM_WIRE);
|
Handle(GEOM_Object) aWire = GetEngine()->AddObject(GEOM_WIRE);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -449,7 +449,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
|
|||||||
if (theWire.IsNull()) return NULL;
|
if (theWire.IsNull()) return NULL;
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Shape function for creation of a face from a wire
|
//Add a new Shape function for creation of a face from a wire
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -509,7 +509,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceFromSurface
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -658,7 +658,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWithConstraints
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FILLING);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -799,7 +799,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), theObjectType);
|
Handle(GEOM_Object) aShape = GetEngine()->AddObject(theObjectType);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -869,7 +869,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidFromConnectedFaces
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
//Add a new object
|
//Add a new object
|
||||||
Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
|
Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GEOM_SOLID);
|
||||||
|
|
||||||
//Add a new function
|
//Add a new function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -947,7 +947,7 @@ GEOMImpl_IShapesOperations::MakeGlueFaces (std::list< Handle(GEOM_Object) >& the
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Glued object
|
//Add a new Glued object
|
||||||
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
|
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
|
||||||
|
|
||||||
//Add a new Glue function
|
//Add a new Glue function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -1095,7 +1095,7 @@ GEOMImpl_IShapesOperations::MakeGlueFacesByList(std::list< Handle(GEOM_Object) >
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Glued object
|
//Add a new Glued object
|
||||||
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
|
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
|
||||||
|
|
||||||
//Add a new Glue function
|
//Add a new Glue function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -1163,7 +1163,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdges (std::list< Handle(GEOM_Object) >& the
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Glued object
|
//Add a new Glued object
|
||||||
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
|
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
|
||||||
|
|
||||||
//Add a new Glue function
|
//Add a new Glue function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -1344,7 +1344,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdgesByList (std::list< Handle(GEOM_Object)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
//Add a new Glued object
|
//Add a new Glued object
|
||||||
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
|
Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
|
||||||
|
|
||||||
//Add a new Glue function
|
//Add a new Glue function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -1452,7 +1452,7 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object) theShap
|
|||||||
Standard_Integer aStrLen = anEntry.LengthOfCString();
|
Standard_Integer aStrLen = anEntry.LengthOfCString();
|
||||||
char* anEntryStr = new char[aStrLen+1];
|
char* anEntryStr = new char[aStrLen+1];
|
||||||
anEntry.ToUTF8CString(anEntryStr);
|
anEntry.ToUTF8CString(anEntryStr);
|
||||||
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
|
Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(anEntryStr, false);
|
||||||
if (!anObj.IsNull() ) {
|
if (!anObj.IsNull() ) {
|
||||||
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
|
bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
|
||||||
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
|
bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
|
||||||
@ -1553,7 +1553,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
|
|||||||
|
|
||||||
//anObj = GetEngine()->AddSubShape(theShape, anArray);
|
//anObj = GetEngine()->AddSubShape(theShape, anArray);
|
||||||
{
|
{
|
||||||
anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
|
anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
|
||||||
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
||||||
if (aFunction.IsNull()) return aSeq;
|
if (aFunction.IsNull()) return aSeq;
|
||||||
|
|
||||||
@ -1766,7 +1766,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeSubShapes
|
|||||||
anArray = new TColStd_HArray1OfInteger(1,1);
|
anArray = new TColStd_HArray1OfInteger(1,1);
|
||||||
anArray->SetValue(1, id);
|
anArray->SetValue(1, id);
|
||||||
|
|
||||||
anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
|
anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
|
||||||
if (!anObj.IsNull()) {
|
if (!anObj.IsNull()) {
|
||||||
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
||||||
if (aFunction.IsNull()) return aSeq;
|
if (aFunction.IsNull()) return aSeq;
|
||||||
@ -2155,7 +2155,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
//Add a new reversed object
|
//Add a new reversed object
|
||||||
Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType());
|
Handle(GEOM_Object) aReversed = GetEngine()->AddObject(theShape->GetType());
|
||||||
|
|
||||||
//Add a new Revese function
|
//Add a new Revese function
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
@ -2201,7 +2201,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
|
|||||||
|
|
||||||
if (aGen) {
|
if (aGen) {
|
||||||
GEOMImpl_IHealingOperations* anIHealingOperations =
|
GEOMImpl_IHealingOperations* anIHealingOperations =
|
||||||
aGen->GetIHealingOperations(GetDocID());
|
aGen->GetIHealingOperations();
|
||||||
aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
|
aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
|
||||||
SetErrorCode(anIHealingOperations->GetErrorCode());
|
SetErrorCode(anIHealingOperations->GetErrorCode());
|
||||||
}
|
}
|
||||||
@ -3000,7 +3000,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetShapesOnShapeAsCompound
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), GEOM_SHAPES_ON_SHAPE);
|
Handle(GEOM_Object) aRes = GetEngine()->AddObject(GEOM_SHAPES_ON_SHAPE);
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE);
|
aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE);
|
||||||
aFunction->SetValue(aCompound);
|
aFunction->SetValue(aCompound);
|
||||||
@ -3182,7 +3182,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeExtraction
|
|||||||
|
|
||||||
//Add a new Result object
|
//Add a new Result object
|
||||||
Handle(GEOM_Object) aResult =
|
Handle(GEOM_Object) aResult =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_EXTRACTION);
|
GetEngine()->AddObject(GEOM_EXTRACTION);
|
||||||
|
|
||||||
//Add a new Extraction function
|
//Add a new Extraction function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -5140,7 +5140,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendEdge
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Edge object
|
//Add a new Edge object
|
||||||
Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
|
Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GEOM_EDGE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -5207,7 +5207,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -5273,7 +5273,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Face object
|
//Add a new Face object
|
||||||
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
|
Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
|
||||||
|
|
||||||
//Add a new Vector function
|
//Add a new Vector function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -78,7 +78,7 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
|
|||||||
std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
|
std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
|
||||||
};
|
};
|
||||||
|
|
||||||
Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_IShapesOperations();
|
Standard_EXPORT ~GEOMImpl_IShapesOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
|
Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
|
||||||
|
@ -77,8 +77,8 @@
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine, int theDocID)
|
GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine)
|
||||||
: GEOM_IOperations(theEngine, theDocID)
|
: GEOM_IOperations(theEngine)
|
||||||
{
|
{
|
||||||
MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations");
|
MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations");
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -270,7 +270,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -375,7 +375,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -431,7 +431,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance
|
|||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
if (theCopy) {
|
if (theCopy) {
|
||||||
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE);
|
aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -493,7 +493,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -552,7 +552,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Obje
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a translate function
|
//Add a translate function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -806,7 +806,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a mirror function
|
//Add a mirror function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -909,7 +909,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a mirror function
|
//Add a mirror function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1012,7 +1012,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a mirror function
|
//Add a mirror function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1113,7 +1113,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
|
|||||||
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
|
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a new Offset function
|
//Add a new Offset function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1184,7 +1184,7 @@ GEOMImpl_ITransformOperations::ProjectShapeCopy (Handle(GEOM_Object) theSource,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Add a new Projection object
|
//Add a new Projection object
|
||||||
aCopy = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
|
aCopy = GetEngine()->AddObject(GEOM_PROJECTION);
|
||||||
|
|
||||||
//Add a Projection function
|
//Add a Projection function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1248,7 +1248,7 @@ Standard_Real GEOMImpl_ITransformOperations::ProjectPointOnWire
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Add a new Projection object
|
//Add a new Projection object
|
||||||
thePointOnEdge = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
|
thePointOnEdge = GetEngine()->AddObject(GEOM_PROJECTION);
|
||||||
|
|
||||||
//Add a Projection function
|
//Add a Projection function
|
||||||
Handle(GEOM_Function) aFunction = thePointOnEdge->AddFunction
|
Handle(GEOM_Function) aFunction = thePointOnEdge->AddFunction
|
||||||
@ -1363,7 +1363,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy
|
|||||||
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled
|
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a scale function
|
//Add a scale function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -1429,7 +1429,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeAlongAxes (Handle(G
|
|||||||
Handle(GEOM_Object) aCopy; //Add a new Copy object
|
Handle(GEOM_Object) aCopy; //Add a new Copy object
|
||||||
Handle(GEOM_Function) aFunction;
|
Handle(GEOM_Function) aFunction;
|
||||||
if (doCopy) {
|
if (doCopy) {
|
||||||
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY);
|
aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1554,7 +1554,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy
|
|||||||
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
|
if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a position function
|
//Add a position function
|
||||||
Standard_Integer aType = POSITION_SHAPE_COPY;
|
Standard_Integer aType = POSITION_SHAPE_COPY;
|
||||||
@ -1616,7 +1616,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath
|
|||||||
Handle(GEOM_Object) aCopy;
|
Handle(GEOM_Object) aCopy;
|
||||||
|
|
||||||
if (theCopy) {
|
if (theCopy) {
|
||||||
aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_ALONG_PATH);
|
aFunction = aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_ALONG_PATH);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1733,7 +1733,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Objec
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY);
|
||||||
@ -1786,7 +1786,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D);
|
||||||
@ -1841,7 +1841,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D_STEP);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D_STEP);
|
||||||
@ -1902,7 +1902,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
|
||||||
@ -1965,7 +1965,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
|
||||||
@ -2087,7 +2087,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle
|
|||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
|
||||||
|
|
||||||
//Add a new Copy object
|
//Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
//Add a rotate function
|
//Add a rotate function
|
||||||
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
|
aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
|
||||||
@ -2144,7 +2144,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TransformLikeOtherCopy
|
|||||||
if (aSampleFunc.IsNull()) return NULL; // There is no function which creates a sample object
|
if (aSampleFunc.IsNull()) return NULL; // There is no function which creates a sample object
|
||||||
|
|
||||||
// Add a new Copy object
|
// Add a new Copy object
|
||||||
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
|
Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
|
||||||
|
|
||||||
// Add a transform function (depends on theSample function)
|
// Add a transform function (depends on theSample function)
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
@ -2295,7 +2295,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MakeProjectionOnCylinder
|
|||||||
|
|
||||||
//Add a new Projection object
|
//Add a new Projection object
|
||||||
Handle(GEOM_Object) aResult =
|
Handle(GEOM_Object) aResult =
|
||||||
GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
|
GetEngine()->AddObject(GEOM_PROJECTION);
|
||||||
|
|
||||||
//Add a Projection function
|
//Add a Projection function
|
||||||
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
Handle(GEOM_Function) aFunction = aResult->AddFunction
|
||||||
|
@ -37,7 +37,7 @@ class GEOMImpl_IRotate;
|
|||||||
class GEOMImpl_ITransformOperations : public GEOM_IOperations
|
class GEOMImpl_ITransformOperations : public GEOM_IOperations
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine);
|
||||||
Standard_EXPORT ~GEOMImpl_ITransformOperations();
|
Standard_EXPORT ~GEOMImpl_ITransformOperations();
|
||||||
|
|
||||||
Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,
|
Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,
|
||||||
|
@ -69,7 +69,7 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(LOGBOOK& log) const
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aSeq =
|
Handle(TColStd_HSequenceOfTransient) aSeq =
|
||||||
GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( GetDocID(), aFormatName, aFileName );
|
GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( aFormatName, aFileName );
|
||||||
if( aSeq.IsNull() )
|
if( aSeq.IsNull() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ void GEOMToolsGUI::OnEditDelete()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
|
_PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
|
||||||
GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
|
GEOM_Displayer* disp = new GEOM_Displayer();
|
||||||
|
|
||||||
if ( isComponentSelected ) {
|
if ( isComponentSelected ) {
|
||||||
// GEOM component is selected: delete all objects recursively
|
// GEOM component is selected: delete all objects recursively
|
||||||
@ -572,8 +572,7 @@ void GEOMToolsGUI::deactivate()
|
|||||||
{
|
{
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( app ) {
|
if ( app ) {
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
GEOM_Displayer aDisp;
|
||||||
GEOM_Displayer aDisp (appStudy);
|
|
||||||
aDisp.GlobalSelection();
|
aDisp.GlobalSelection();
|
||||||
getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
|
getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ void GEOMToolsGUI::OnAutoColor()
|
|||||||
|
|
||||||
QList<SALOMEDS::Color> aReservedColors;
|
QList<SALOMEDS::Color> aReservedColors;
|
||||||
|
|
||||||
GEOM_Displayer displayer ( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -256,7 +256,7 @@ void GEOMToolsGUI::OnColor()
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
// get active view
|
// get active view
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
@ -308,7 +308,7 @@ void GEOMToolsGUI::OnTexture()
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ void GEOMToolsGUI::OnNbIsos( ActionType actionType )
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ void GEOMToolsGUI::OnDeflection()
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
|
||||||
@ -496,8 +496,7 @@ void GEOMToolsGUI::OnSelectOnly(int mode)
|
|||||||
{
|
{
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if ( app ) {
|
if ( app ) {
|
||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
GEOM_Displayer aDisp;
|
||||||
GEOM_Displayer aDisp (appStudy);
|
|
||||||
aDisp.GlobalSelection(mode);
|
aDisp.GlobalSelection(mode);
|
||||||
getGeometryGUI()->setLocalSelectionMode(mode);
|
getGeometryGUI()->setLocalSelectionMode(mode);
|
||||||
}
|
}
|
||||||
@ -665,7 +664,7 @@ void GEOMToolsGUI::OnEdgeWidth()
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -708,7 +707,7 @@ void GEOMToolsGUI::OnIsosWidth() {
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -750,7 +749,7 @@ void GEOMToolsGUI::OnBringToFront() {
|
|||||||
aSelMgr->selectedObjects( selected );
|
aSelMgr->selectedObjects( selected );
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -776,7 +775,7 @@ void GEOMToolsGUI::OnClsBringToFront() {
|
|||||||
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
|
||||||
if ( !appStudy ) return;
|
if ( !appStudy ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( appStudy );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
@ -815,7 +814,7 @@ void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
|
|||||||
|
|
||||||
if ( selected.IsEmpty() ) return;
|
if ( selected.IsEmpty() ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( study );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
@ -237,7 +237,7 @@ void GEOMToolsGUI_MarkerDlg::accept()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GEOM_Displayer displayer( getStudy() );
|
GEOM_Displayer displayer;
|
||||||
displayer.Redisplay( selected, true );
|
displayer.Redisplay( selected, true );
|
||||||
selMgr->setSelectedObjects( selected );
|
selMgr->setSelectedObjects( selected );
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ void GEOMToolsGUI_MarkerDlg::init()
|
|||||||
// ---
|
// ---
|
||||||
|
|
||||||
GEOM::GEOM_Gen_var engine = GeometryGUI::GetGeomGen();
|
GEOM::GEOM_Gen_var engine = GeometryGUI::GetGeomGen();
|
||||||
myOperation = engine->GetIInsertOperations( getStudy()->id() );
|
myOperation = engine->GetIInsertOperations();
|
||||||
GEOM::ListOfLong_var ids = myOperation->GetAllTextures();
|
GEOM::ListOfLong_var ids = myOperation->GetAllTextures();
|
||||||
for ( int i = 0; i < ids->length(); i++ )
|
for ( int i = 0; i < ids->length(); i++ )
|
||||||
addTexture( ids[i] );
|
addTexture( ids[i] );
|
||||||
@ -339,7 +339,7 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const
|
|||||||
if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
|
if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
|
||||||
int tWidth, tHeight;
|
int tWidth, tHeight;
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
|
Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(id, tWidth, tHeight);
|
||||||
|
|
||||||
if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
|
if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
|
||||||
QImage image( tWidth, tHeight, QImage::Format_Mono );
|
QImage image( tWidth, tHeight, QImage::Format_Mono );
|
||||||
|
@ -141,22 +141,22 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
|
|||||||
if ( appStudy ) {
|
if ( appStudy ) {
|
||||||
_PTR(Study) aStudy = appStudy->studyDS();
|
_PTR(Study) aStudy = appStudy->studyDS();
|
||||||
if ( aStudy ) {
|
if ( aStudy ) {
|
||||||
GEOM_Displayer displayer ( appStudy );
|
GEOM_Displayer displayer;
|
||||||
QTreeWidgetItemIterator it( myTreeWidget );
|
QTreeWidgetItemIterator it( myTreeWidget );
|
||||||
while ( *it ) {
|
while ( *it ) {
|
||||||
QString entry = myEntryToItem.key( *it );
|
QString entry = myEntryToItem.key( *it );
|
||||||
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
|
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
|
||||||
if ( SO ) {
|
if ( SO ) {
|
||||||
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
|
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
|
||||||
if ( CORBA::is_nil( aGeomObject ) ) continue;
|
if ( CORBA::is_nil( aGeomObject ) ) continue;
|
||||||
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
|
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
|
||||||
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
|
||||||
displayer.Erase( io );
|
displayer.Erase( io );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
displayer.UpdateViewer();
|
||||||
++it;
|
|
||||||
}
|
|
||||||
displayer.UpdateViewer();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -458,7 +458,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
|
|||||||
if ( !SO ) return;
|
if ( !SO ) return;
|
||||||
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
|
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
|
||||||
if ( CORBA::is_nil( aGeomObject ) ) return;
|
if ( CORBA::is_nil( aGeomObject ) ) return;
|
||||||
GEOM_Displayer displayer ( appStudy );
|
GEOM_Displayer displayer;
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
|
||||||
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
|
if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
|
||||||
|
@ -42,8 +42,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
GEOMToolsGUI_ReduceStudyDlg::GEOMToolsGUI_ReduceStudyDlg( QWidget* parent )
|
GEOMToolsGUI_ReduceStudyDlg::GEOMToolsGUI_ReduceStudyDlg( QWidget* parent )
|
||||||
:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
|
:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
|
||||||
myDisplayer(NULL)
|
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
myVisible = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
|
myVisible = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
|
||||||
@ -53,7 +52,7 @@ myDisplayer(NULL)
|
|||||||
if ( !myApp ) return;
|
if ( !myApp ) return;
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
||||||
myStudy = study->studyDS();
|
myStudy = study->studyDS();
|
||||||
myDisplayer = GEOM_Displayer( study );
|
myDisplayer = GEOM_Displayer();
|
||||||
|
|
||||||
setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
|
setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
@ -83,12 +83,11 @@ void ConvertV6toV7( TCollection_AsciiString& theScript )
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
|
Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Boolean isPublished,
|
||||||
CORBA::Boolean isPublished,
|
CORBA::Boolean isMultiFile,
|
||||||
CORBA::Boolean isMultiFile,
|
|
||||||
CORBA::Boolean& isValidScript)
|
CORBA::Boolean& isValidScript)
|
||||||
{
|
{
|
||||||
SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
|
SALOMEDS::Study_var aStudy = GetStudy();
|
||||||
if(CORBA::is_nil(aStudy))
|
if(CORBA::is_nil(aStudy))
|
||||||
return new Engines::TMPFile(0);
|
return new Engines::TMPFile(0);
|
||||||
|
|
||||||
|
@ -69,8 +69,7 @@ GEOM::GEOM_Object_ptr GEOM_Field_i::GetShape()
|
|||||||
HANDLE_NAMESPACE(GEOM_Object) shape = _impl->GetShape();
|
HANDLE_NAMESPACE(GEOM_Object) shape = _impl->GetShape();
|
||||||
if ( !shape.IsNull() )
|
if ( !shape.IsNull() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetDocID(),
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetEntryString().ToCString());
|
||||||
shape->GetEntryString().ToCString());
|
|
||||||
shapeVar = GEOM::GEOM_Object::_narrow( obj );
|
shapeVar = GEOM::GEOM_Object::_narrow( obj );
|
||||||
}
|
}
|
||||||
return shapeVar._retn();
|
return shapeVar._retn();
|
||||||
@ -138,8 +137,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::AddStep(::CORBA::Long stepID, ::CORBA::Lo
|
|||||||
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
|
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
|
||||||
if ( !step.IsNull() )
|
if ( !step.IsNull() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
|
||||||
step->GetEntryString().ToCString());
|
|
||||||
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
|
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
|
||||||
}
|
}
|
||||||
return stepVar._retn();
|
return stepVar._retn();
|
||||||
@ -201,8 +199,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::GetStep(CORBA::Long stepID)
|
|||||||
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->GetStep(stepID);
|
HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->GetStep(stepID);
|
||||||
if ( !step.IsNull() )
|
if ( !step.IsNull() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
|
||||||
step->GetEntryString().ToCString());
|
|
||||||
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
|
stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
|
||||||
}
|
}
|
||||||
return stepVar._retn();
|
return stepVar._retn();
|
||||||
@ -291,8 +288,7 @@ GEOM::GEOM_Field_ptr GEOM_FieldStep_i::GetField()
|
|||||||
HANDLE_NAMESPACE(GEOM_Field) field = _impl->GetField();
|
HANDLE_NAMESPACE(GEOM_Field) field = _impl->GetField();
|
||||||
if ( !field.IsNull() )
|
if ( !field.IsNull() )
|
||||||
{
|
{
|
||||||
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetDocID(),
|
GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetEntryString().ToCString());
|
||||||
field->GetEntryString().ToCString());
|
|
||||||
fieldVar = GEOM::GEOM_Field::_narrow( obj );
|
fieldVar = GEOM::GEOM_Field::_narrow( obj );
|
||||||
}
|
}
|
||||||
return fieldVar._retn();
|
return fieldVar._retn();
|
||||||
|
@ -171,7 +171,8 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
|
|||||||
// : Used when a study is loaded
|
// : Used when a study is loaded
|
||||||
// : The IOR (IORName) of object created is returned
|
// : The IOR (IORName) of object created is returned
|
||||||
//============================================================================
|
//============================================================================
|
||||||
char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
|
char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
|
||||||
|
const char* aLocalPersistentID,
|
||||||
CORBA::Boolean isMultiFile,
|
CORBA::Boolean isMultiFile,
|
||||||
CORBA::Boolean isASCII)
|
CORBA::Boolean isASCII)
|
||||||
{
|
{
|
||||||
@ -181,7 +182,7 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
|
|||||||
{
|
{
|
||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
|
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
|
||||||
GEOM::GEOM_BaseObject_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
|
GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
|
||||||
|
|
||||||
CORBA::String_var aPersRefString = _orb->object_to_string(obj);
|
CORBA::String_var aPersRefString = _orb->object_to_string(obj);
|
||||||
return CORBA::string_dup(aPersRefString);
|
return CORBA::string_dup(aPersRefString);
|
||||||
@ -419,7 +420,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObjec
|
|||||||
//Set NoteBook variables used in the object creation
|
//Set NoteBook variables used in the object creation
|
||||||
TCollection_AsciiString aVars;
|
TCollection_AsciiString aVars;
|
||||||
CORBA::String_var aString=aBaseObj->GetParameters();
|
CORBA::String_var aString=aBaseObj->GetParameters();
|
||||||
SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aString);
|
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aString);
|
||||||
for(int i = 0, n = aSections->length(); i < n; i++) {
|
for(int i = 0, n = aSections->length(); i < n; i++) {
|
||||||
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
|
SALOMEDS::ListOfStrings aListOfVars = aSections[i];
|
||||||
for(int j = 0, m = aListOfVars.length(); j < m; j++) {
|
for(int j = 0, m = aListOfVars.length(); j < m; j++) {
|
||||||
@ -474,7 +475,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
|
|||||||
Standard_Integer anIndex = anIndices.FindIndex(aValue);
|
Standard_Integer anIndex = anIndices.FindIndex(aValue);
|
||||||
//anArray->SetValue(1, anIndex);
|
//anArray->SetValue(1, anIndex);
|
||||||
GOp->AddObject(GrObj,anIndex);
|
GOp->AddObject(GrObj,anIndex);
|
||||||
//anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
|
//anObj = GEOM_Engine::GetEngine()->AddObject(GEOM_SUBSHAPE);
|
||||||
//if (anObj.IsNull()) continue;
|
//if (anObj.IsNull()) continue;
|
||||||
//HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
//HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
|
||||||
//if (aFunction.IsNull()) continue;
|
//if (aFunction.IsNull()) continue;
|
||||||
@ -486,8 +487,8 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
|
|||||||
//SALOMEDS::SObject_var aResultSO;
|
//SALOMEDS::SObject_var aResultSO;
|
||||||
//TCollection_AsciiString anEntry;
|
//TCollection_AsciiString anEntry;
|
||||||
//TDF_Tool::Entry(anObj->GetEntry(),anEntry);
|
//TDF_Tool::Entry(anObj->GetEntry(),anEntry);
|
||||||
//GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
|
//GEOM::GEOM_Object_var aGObj = GetObject(anEntry.ToCString());
|
||||||
//AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
|
//AddInStudy(aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -730,7 +731,7 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
|
|||||||
// function : Close()
|
// function : Close()
|
||||||
// purpose :
|
// purpose :
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void GEOM_Gen_i::Close()
|
void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
|
||||||
{
|
{
|
||||||
_impl->Close();
|
_impl->Close();
|
||||||
}
|
}
|
||||||
@ -826,7 +827,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
|
|||||||
|
|
||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
|
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
|
||||||
GEOM::GEOM_BaseObject_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
|
GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
|
||||||
|
|
||||||
//Set the study entry of the published GEOM_Object
|
//Set the study entry of the published GEOM_Object
|
||||||
obj->SetStudyEntry(aNewSO->GetID());
|
obj->SetStudyEntry(aNewSO->GetID());
|
||||||
@ -865,7 +866,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (GEOM::GEOM_BaseObject_ptr theObjec
|
|||||||
{
|
{
|
||||||
SALOMEDS::SObject_var aResultSO;
|
SALOMEDS::SObject_var aResultSO;
|
||||||
SALOMEDS::Study_var aStudy = GetStudy();
|
SALOMEDS::Study_var aStudy = GetStudy();
|
||||||
if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
|
if(theObject->_is_nil() || aStudy->_is_nil()) return aResultSO;
|
||||||
|
|
||||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
CORBA::String_var IOR;
|
CORBA::String_var IOR;
|
||||||
@ -951,7 +952,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr theO
|
|||||||
|
|
||||||
// find SObject in the study if it is already published
|
// find SObject in the study if it is already published
|
||||||
CORBA::String_var anIORo = _orb->object_to_string(theObject);
|
CORBA::String_var anIORo = _orb->object_to_string(theObject);
|
||||||
SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in());
|
SALOMEDS::SObject_var aSO = GetStudy()->FindObjectIOR(anIORo.in());
|
||||||
//PTv, IMP 0020001, The salome object <aSO>
|
//PTv, IMP 0020001, The salome object <aSO>
|
||||||
// is not obligatory in case of invokation from script
|
// is not obligatory in case of invokation from script
|
||||||
// if (CORBA::is_nil(aSO))
|
// if (CORBA::is_nil(aSO))
|
||||||
@ -2567,7 +2568,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainSh
|
|||||||
|
|
||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
|
TDF_Tool::Entry(anObject->GetEntry(), anEntry);
|
||||||
return GEOM::GEOM_Object::_narrow( GetObject(anObject->GetDocID(), anEntry.ToCString()));
|
return GEOM::GEOM_Object::_narrow( GetObject(anEntry.ToCString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -131,7 +131,7 @@ GEOM_IOperations_i::GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject)
|
|||||||
if (theObject.IsNull()) return GO._retn();
|
if (theObject.IsNull()) return GO._retn();
|
||||||
TCollection_AsciiString anEntry;
|
TCollection_AsciiString anEntry;
|
||||||
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
|
||||||
GO = _engine->GetObject(theObject->GetDocID(), (char*) anEntry.ToCString());
|
GO = _engine->GetObject((char*) anEntry.ToCString());
|
||||||
return GO._retn();
|
return GO._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ char* GEOM_Object_i::GetSubShapeName(CORBA::Long subID)
|
|||||||
{
|
{
|
||||||
TCollection_AsciiString anEntry = anIt.Value();
|
TCollection_AsciiString anEntry = anIt.Value();
|
||||||
HANDLE_NAMESPACE(GEOM_BaseObject) anObj =
|
HANDLE_NAMESPACE(GEOM_BaseObject) anObj =
|
||||||
GEOM_Engine::GetEngine()->GetObject( _impl->GetDocID(), anEntry.ToCString(), false );
|
GEOM_Engine::GetEngine()->GetObject( anEntry.ToCString(), false );
|
||||||
if ( anObj.IsNull() ) continue;
|
if ( anObj.IsNull() ) continue;
|
||||||
|
|
||||||
TCollection_AsciiString aSubName = anObj->GetName();
|
TCollection_AsciiString aSubName = anObj->GetName();
|
||||||
|
@ -891,10 +891,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
"""
|
"""
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
try:
|
try:
|
||||||
aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
|
aSObject = self.AddInStudy(aShape, aName, None)
|
||||||
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
||||||
if doRestoreSubShapes:
|
if doRestoreSubShapes:
|
||||||
self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
|
self.RestoreSubShapesSO(aSObject, theArgs,
|
||||||
theFindMethod, theInheritFirstArg, True )
|
theFindMethod, theInheritFirstArg, True )
|
||||||
except:
|
except:
|
||||||
print "addToStudy() failed"
|
print "addToStudy() failed"
|
||||||
@ -1010,7 +1010,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
list of published sub-shapes
|
list of published sub-shapes
|
||||||
"""
|
"""
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
|
return self.RestoreSubShapesO(theObject, theArgs,
|
||||||
theFindMethod, theInheritFirstArg, theAddPrefix)
|
theFindMethod, theInheritFirstArg, theAddPrefix)
|
||||||
|
|
||||||
## Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
## Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
||||||
|
@ -124,14 +124,9 @@ void GEOM_Swig::createAndDisplayGO( const char* theEntry, bool theUpdateViewer )
|
|||||||
{}
|
{}
|
||||||
virtual void Execute()
|
virtual void Execute()
|
||||||
{
|
{
|
||||||
SUIT_Application* app = SUIT_Session::session()->activeApplication();
|
|
||||||
if ( !app ) return;
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
if ( !study ) return;
|
|
||||||
|
|
||||||
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
|
||||||
|
|
||||||
GEOM_Displayer( study ).Display( io, myUpdateViewer );
|
GEOM_Displayer().Display( io, myUpdateViewer );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -186,14 +181,9 @@ void GEOM_Swig::eraseGO( const char* theEntry, bool theUpdateViewer )
|
|||||||
{}
|
{}
|
||||||
virtual void Execute()
|
virtual void Execute()
|
||||||
{
|
{
|
||||||
SUIT_Application* app = SUIT_Session::session()->activeApplication();
|
|
||||||
if ( !app ) return;
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
if ( !study ) return;
|
|
||||||
|
|
||||||
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
|
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
|
||||||
|
|
||||||
GEOM_Displayer( study ).Erase( io, true, myUpdateViewer );
|
GEOM_Displayer().Erase( io, true, myUpdateViewer );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -212,13 +202,7 @@ void GEOM_Swig::UpdateViewer()
|
|||||||
{}
|
{}
|
||||||
virtual void Execute()
|
virtual void Execute()
|
||||||
{
|
{
|
||||||
SUIT_Application* app = SUIT_Session::session()->activeApplication();
|
GEOM_Displayer().UpdateViewer();
|
||||||
if ( !app ) return;
|
|
||||||
|
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
|
||||||
if ( !study ) return;
|
|
||||||
|
|
||||||
GEOM_Displayer( study ).UpdateViewer();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -354,7 +338,7 @@ void TSetPropertyEvent::Execute()
|
|||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
if ( !study ) return;
|
if ( !study ) return;
|
||||||
|
|
||||||
GEOM_Displayer displayer( study );
|
GEOM_Displayer displayer;
|
||||||
|
|
||||||
SALOME_View* window = displayer.GetActiveView();
|
SALOME_View* window = displayer.GetActiveView();
|
||||||
if ( !window ) return;
|
if ( !window ) return;
|
||||||
|
@ -642,8 +642,7 @@ bool GenerationGUI_PipeDlg::extractPrefix() const
|
|||||||
// purpose : virtual method to restore tree of argument's sub-shapes under
|
// purpose : virtual method to restore tree of argument's sub-shapes under
|
||||||
// the resulting shape. Redefined from GEOMBase_Helper class.
|
// the resulting shape. Redefined from GEOMBase_Helper class.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void GenerationGUI_PipeDlg::restoreSubShapes
|
void GenerationGUI_PipeDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
|
||||||
(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject)
|
|
||||||
{
|
{
|
||||||
QCheckBox *aGenGroupCheck = NULL;
|
QCheckBox *aGenGroupCheck = NULL;
|
||||||
QLineEdit *aPrefixEdit = NULL;
|
QLineEdit *aPrefixEdit = NULL;
|
||||||
@ -691,8 +690,7 @@ void GenerationGUI_PipeDlg::restoreSubShapes
|
|||||||
}
|
}
|
||||||
|
|
||||||
aName += tr((*it)->GetName());
|
aName += tr((*it)->GetName());
|
||||||
getGeomEngine()->AddInStudy(theStudy, (*it).get(),
|
getGeomEngine()->AddInStudy((*it).get(), aName.toStdString().c_str(), aFather);
|
||||||
aName.toStdString().c_str(), aFather);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,7 @@ protected:
|
|||||||
virtual bool execute( ObjectList& );
|
virtual bool execute( ObjectList& );
|
||||||
virtual void addSubshapesToStudy();
|
virtual void addSubshapesToStudy();
|
||||||
virtual bool extractPrefix() const;
|
virtual bool extractPrefix() const;
|
||||||
virtual void restoreSubShapes
|
virtual void restoreSubShapes(SALOMEDS::SObject_ptr);
|
||||||
(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -107,8 +107,6 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if ( !app ) return false;
|
if ( !app ) return false;
|
||||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
|
||||||
if ( !study ) return false;
|
|
||||||
|
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
|
||||||
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
||||||
@ -182,7 +180,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer().Display( main.in() );
|
||||||
main->UnRegister();
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -45,12 +45,11 @@ IGESPlugin_IECallBack::~IGESPlugin_IECallBack()
|
|||||||
* Export
|
* Export
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool IGESPlugin_IECallBack::Export( int theDocId,
|
bool IGESPlugin_IECallBack::Export( const Handle(GEOM_Object) theOriginal,
|
||||||
const Handle(GEOM_Object) theOriginal,
|
const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFormatName )
|
||||||
const TCollection_AsciiString& theFormatName )
|
|
||||||
{
|
{
|
||||||
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
|
||||||
TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
|
TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
|
||||||
aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
|
aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
|
||||||
return true;
|
return true;
|
||||||
@ -62,11 +61,10 @@ bool IGESPlugin_IECallBack::Export( int theDocId,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(TColStd_HSequenceOfTransient)
|
Handle(TColStd_HSequenceOfTransient)
|
||||||
IGESPlugin_IECallBack::Import( int theDocId,
|
IGESPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFileName )
|
||||||
const TCollection_AsciiString& theFileName )
|
|
||||||
{
|
{
|
||||||
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
|
||||||
bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
|
bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
|
||||||
return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
|
return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
|
||||||
}
|
}
|
||||||
@ -77,11 +75,10 @@ IGESPlugin_IECallBack::Import( int theDocId,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
TCollection_AsciiString
|
TCollection_AsciiString
|
||||||
IGESPlugin_IECallBack::ReadValue( int theDocId,
|
IGESPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theParameterName )
|
||||||
const TCollection_AsciiString& theParameterName )
|
|
||||||
{
|
{
|
||||||
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
|
||||||
return aPluginOperations->ReadValue( theFileName, theParameterName );
|
return aPluginOperations->ReadValue( theFileName, theParameterName );
|
||||||
}
|
}
|
||||||
|
@ -36,17 +36,14 @@ public:
|
|||||||
IGESPlugin_IECallBack();
|
IGESPlugin_IECallBack();
|
||||||
~IGESPlugin_IECallBack();
|
~IGESPlugin_IECallBack();
|
||||||
|
|
||||||
bool Export( int theDocId,
|
bool Export( const Handle(GEOM_Object) theOriginal,
|
||||||
const Handle(GEOM_Object) theOriginal,
|
const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
|
||||||
const TCollection_AsciiString& theFormatName );
|
const TCollection_AsciiString& theFormatName );
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
|
Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFileName );
|
||||||
const TCollection_AsciiString& theFileName );
|
|
||||||
|
|
||||||
TCollection_AsciiString ReadValue( int theDocId,
|
TCollection_AsciiString ReadValue( const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& theFileName,
|
|
||||||
const TCollection_AsciiString& theFormatName,
|
const TCollection_AsciiString& theFormatName,
|
||||||
const TCollection_AsciiString& theParameterName );
|
const TCollection_AsciiString& theParameterName );
|
||||||
};
|
};
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
|
IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine )
|
||||||
: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
|
: GEOMImpl_IBaseIEOperations( theEngine )
|
||||||
{
|
{
|
||||||
MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
|
MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ void IGESPlugin_IOperations::ExportIGES( const Handle(GEOM_Object) theOrigi
|
|||||||
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
|
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
|
Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
|
||||||
|
|
||||||
//Add an Export function
|
//Add an Export function
|
||||||
Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
|
Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
|
||||||
@ -129,7 +129,7 @@ IGESPlugin_IOperations::ImportIGES( const TCollection_AsciiString& theFileName,
|
|||||||
if( theFileName.IsEmpty() ) return NULL;
|
if( theFileName.IsEmpty() ) return NULL;
|
||||||
|
|
||||||
//Add a new result object
|
//Add a new result object
|
||||||
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
|
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
|
||||||
|
|
||||||
//Add an Import function
|
//Add an Import function
|
||||||
Handle(GEOM_Function) aFunction =
|
Handle(GEOM_Function) aFunction =
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
|
class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IGESPlugin_IOperations( GEOM_Engine*, int );
|
IGESPlugin_IOperations( GEOM_Engine* );
|
||||||
~IGESPlugin_IOperations();
|
~IGESPlugin_IOperations();
|
||||||
|
|
||||||
void ExportIGES( const Handle(GEOM_Object),
|
void ExportIGES( const Handle(GEOM_Object),
|
||||||
|
@ -59,11 +59,12 @@ GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_pt
|
|||||||
{
|
{
|
||||||
Unexpect aCatch( SALOME_SalomeException );
|
Unexpect aCatch( SALOME_SalomeException );
|
||||||
MESSAGE( "IGESPlugin_OperationsCreator::Create" );
|
MESSAGE( "IGESPlugin_OperationsCreator::Create" );
|
||||||
_operation = new IGESPlugin_IOperations( theGenImpl );
|
return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
|
||||||
return new IGESPlugin_IOperations_i( thePOA, theEngine, _operation );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get()
|
IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
|
||||||
{
|
{
|
||||||
|
if( !_operation )
|
||||||
|
_operation = new IGESPlugin_IOperations( theGenImpl );
|
||||||
return _operation;
|
return _operation;
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,10 @@ public:
|
|||||||
GEOM::GEOM_Gen_ptr theEngine,
|
GEOM::GEOM_Gen_ptr theEngine,
|
||||||
::GEOMImpl_Gen* theGenImpl );
|
::GEOMImpl_Gen* theGenImpl );
|
||||||
private:
|
private:
|
||||||
static IGESPlugin_IOperations* get();
|
static IGESPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IGESPlugin_IOperations* _operation;
|
static IGESPlugin_IOperations* _operation;
|
||||||
|
|
||||||
friend class IGESPlugin_IECallBack;
|
friend class IGESPlugin_IECallBack;
|
||||||
};
|
};
|
||||||
|
@ -178,8 +178,8 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
|
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
|
||||||
if ( !anActiveStudy )
|
if ( !aStudy )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -205,16 +205,16 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOMGUI_DimensionProperty aDimensions( anActiveStudy, anIObject->getEntry() );
|
GEOMGUI_DimensionProperty aDimensions( aStudy, anIObject->getEntry() );
|
||||||
|
|
||||||
for ( int anIt = 0; anIt < aDimensions.GetNumber(); ++anIt )
|
for ( int anIt = 0; anIt < aDimensions.GetNumber(); ++anIt )
|
||||||
{
|
{
|
||||||
aDimensions.SetVisible( anIt, theIsVisible );
|
aDimensions.SetVisible( anIt, theIsVisible );
|
||||||
}
|
}
|
||||||
|
|
||||||
aDimensions.SaveToAttribute( anActiveStudy, anIObject->getEntry() );
|
aDimensions.SaveToAttribute( aStudy, anIObject->getEntry() );
|
||||||
|
|
||||||
GEOM_Displayer( anActiveStudy ).Redisplay( anIObject, true );
|
GEOM_Displayer().Redisplay( anIObject, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -363,7 +363,7 @@ bool MeasureGUI_Skeleton::isValid( QString& )
|
|||||||
GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
|
GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
|
||||||
{
|
{
|
||||||
if ( !myDisplayer )
|
if ( !myDisplayer )
|
||||||
myDisplayer = new GEOM_Displayer( getStudy() );
|
myDisplayer = new GEOM_Displayer();
|
||||||
return myDisplayer;
|
return myDisplayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,12 +505,11 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
|
void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
|
||||||
SALOMEDS::SObject_ptr theSObject )
|
|
||||||
{
|
{
|
||||||
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
|
||||||
/*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
|
/*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
|
||||||
/*theInheritFirstArg=*/myListShapes.length() == 1 && myListTools.length() == 0,
|
/*theInheritFirstArg=*/myListShapes.length() == 1 && myListTools.length() == 0,
|
||||||
mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false
|
mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false
|
||||||
|
@ -50,7 +50,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& );
|
virtual bool execute( ObjectList& );
|
||||||
virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
|
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -364,7 +364,7 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
|
|||||||
GEOM_Displayer* RepairGUI_FreeFacesDlg::getDisplayer()
|
GEOM_Displayer* RepairGUI_FreeFacesDlg::getDisplayer()
|
||||||
{
|
{
|
||||||
if ( !myDisplayer )
|
if ( !myDisplayer )
|
||||||
myDisplayer = new GEOM_Displayer( getStudy() );
|
myDisplayer = new GEOM_Displayer();
|
||||||
return myDisplayer;
|
return myDisplayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,8 +542,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
|
void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject)
|
||||||
SALOMEDS::SObject_ptr theSObject)
|
|
||||||
{
|
{
|
||||||
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
||||||
GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
|
GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
|
||||||
@ -551,7 +550,7 @@ void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
|
|||||||
aFindMethod = GEOM::FSM_GetInPlaceByHistory;
|
aFindMethod = GEOM::FSM_GetInPlaceByHistory;
|
||||||
|
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
|
||||||
aFindMethod, /*theInheritFirstArg=*/true,
|
aFindMethod, /*theInheritFirstArg=*/true,
|
||||||
mainFrame()->CheckBoxAddPrefix->isChecked());
|
mainFrame()->CheckBoxAddPrefix->isChecked());
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid (QString&);
|
virtual bool isValid (QString&);
|
||||||
virtual bool execute (ObjectList&);
|
virtual bool execute (ObjectList&);
|
||||||
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -433,12 +433,11 @@ void RepairGUI_LimitToleranceDlg::updateButtonState()
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
|
void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
|
||||||
SALOMEDS::SObject_ptr theSObject)
|
|
||||||
{
|
{
|
||||||
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
|
||||||
GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
|
GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
|
||||||
mainFrame()->CheckBoxAddPrefix->isChecked());
|
mainFrame()->CheckBoxAddPrefix->isChecked());
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ protected:
|
|||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid (QString&);
|
virtual bool isValid (QString&);
|
||||||
virtual bool execute (ObjectList&);
|
virtual bool execute (ObjectList&);
|
||||||
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
|
||||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user