0021684: EDF 2221 : Display the arguments and the name of the operations

+ virtual bool GetCreationInformation(std::string&             theOperationName,
+                                     std::vector<GEOM_Param>& params);
This commit is contained in:
eap 2013-06-17 12:44:32 +00:00
parent 1fc45b2209
commit c7ffbf7b4e
100 changed files with 2714 additions and 5945 deletions

View File

@ -323,45 +323,47 @@ Standard_Integer GEOMImpl_3DSketcherDriver::Execute(TFunction_Logbook& log) cons
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_3DSketcherDriver::
//function : GEOMImpl_3DSketcherDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_3DSketcherDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_I3DSketcher aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "3DSKETCH";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; if (aType == SKETCHER3D_COORDS)
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_3DSketcherDriver",
sizeof(GEOMImpl_3DSketcherDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_3DSketcherDriver) Handle(GEOMImpl_3DSketcherDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_3DSketcherDriver) _anOtherObject; theParams.resize( 1 );
theParams[0].Set( "(X,Y,Z)" );
if (!AnObject.IsNull()) { Handle(TColStd_HArray1OfReal) aCoordsArray = aCI.GetCoordinates();
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_3DSketcherDriver))) { int anArrayLength = aCoordsArray->Length();
_anOtherObject = Handle(GEOMImpl_3DSketcherDriver)((Handle(GEOMImpl_3DSketcherDriver)&)AnObject); for (int i = 0; i <= (anArrayLength-3); i += 3)
theParams[0] << "( "
<< aCoordsArray->Value(i+1) << ", "
<< aCoordsArray->Value(i+2) << ", "
<< aCoordsArray->Value(i+3) << " ) ";
} }
else if (aType == SKETCHER3D_COMMAND)
{
AddParam( theParams, "Command", aCI.GetCommand() );
}
else {
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);

View File

@ -44,70 +44,12 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile #include <GEOM_BaseDriver.hxx>
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient; DEFINE_STANDARD_HANDLE( GEOMImpl_3DSketcherDriver, GEOM_BaseDriver );
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_3DSketcherDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_3DSketcherDriver); #ifndef _GEOM_BaseDriver_HeaderFile
#include <GEOM_BaseDriver.hxx>
class Handle(GEOMImpl_3DSketcherDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_3DSketcherDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_3DSketcherDriver)(const Handle(GEOMImpl_3DSketcherDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_3DSketcherDriver)(const GEOMImpl_3DSketcherDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_3DSketcherDriver)& operator=(const Handle(GEOMImpl_3DSketcherDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_3DSketcherDriver)& operator=(const GEOMImpl_3DSketcherDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_3DSketcherDriver* operator->()
{
return (GEOMImpl_3DSketcherDriver *)ControlAccess();
}
GEOMImpl_3DSketcherDriver* operator->() const
{
return (GEOMImpl_3DSketcherDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_3DSketcherDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_3DSketcherDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx>
#endif #endif
#ifndef _TFunction_Logbook_HeaderFile #ifndef _TFunction_Logbook_HeaderFile
#include <TFunction_Logbook.hxx> #include <TFunction_Logbook.hxx>
@ -116,26 +58,11 @@ class Handle(GEOMImpl_3DSketcherDriver) : public Handle(TFunction_Driver) {
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#endif #endif
class TColStd_SequenceOfExtendedString;
class GEOMImpl_3DSketcherDriver : public GEOM_BaseDriver {
class GEOMImpl_3DSketcherDriver : public TFunction_Driver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_3DSketcherDriver(); Standard_EXPORT GEOMImpl_3DSketcherDriver();
@ -145,14 +72,12 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {}; Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_3DSketcherDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_3DSketcherDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_3DSketcherDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_3DSketcherDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -162,45 +162,48 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ArcDriver::
//function : GEOMImpl_ArcDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArcDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IArc aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "ARC";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArcDriver", case CIRC_ARC_THREE_PNT:
sizeof(GEOMImpl_ArcDriver), AddParam( theParams, "Point 1", aCI.GetPoint1() );
1, AddParam( theParams, "Point 2", aCI.GetPoint2() );
(Standard_Address)_Ancestors, AddParam( theParams, "Point 3", aCI.GetPoint3() );
(Standard_Address)NULL); break;
case CIRC_ARC_CENTER:
return _aType; AddParam( theParams, "Center Point", aCI.GetPoint1() );
AddParam( theParams, "Point Start", aCI.GetPoint2() );
AddParam( theParams, "Point End", aCI.GetPoint3() );
AddParam( theParams, "Reverse", aCI.GetSense() );
break;
case ELLIPSE_ARC_CENTER_TWO_PNT:
AddParam( theParams, "Center Point", aCI.GetPoint1() );
AddParam( theParams, "Point 1", aCI.GetPoint2() );
AddParam( theParams, "Point 2", aCI.GetPoint3() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ArcDriver) Handle(GEOMImpl_ArcDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ArcDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ArcDriver))) {
_anOtherObject = Handle(GEOMImpl_ArcDriver)((Handle(GEOMImpl_ArcDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ArcDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ArcDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ArcDriver);
class Handle(GEOMImpl_ArcDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ArcDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ArcDriver)(const Handle(GEOMImpl_ArcDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ArcDriver)(const GEOMImpl_ArcDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ArcDriver)& operator=(const Handle(GEOMImpl_ArcDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ArcDriver)& operator=(const GEOMImpl_ArcDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ArcDriver* operator->()
{
return (GEOMImpl_ArcDriver *)ControlAccess();
}
GEOMImpl_ArcDriver* operator->() const
{
return (GEOMImpl_ArcDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ArcDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ArcDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ArcDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ArcDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ArcDriver, GEOM_BaseDriver );
class GEOMImpl_ArcDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ArcDriver(); Standard_EXPORT GEOMImpl_ArcDriver();
@ -148,14 +77,10 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArcDriver() {}; Standard_EXPORT ~GEOMImpl_ArcDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ArcDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ArcDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ArcDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ArcDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -147,46 +147,33 @@ Standard_Integer GEOMImpl_ArchimedeDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ArchimedeDriver::
//function : GEOMImpl_ArchimedeDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IArchimede IA (function);
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); if (aType != ARCHIMEDE_TYPE) return 0;
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "ARCHIMEDE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; AddParam( theParams, "Objects", IA.GetBasicShape() );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArchimedeDriver", AddParam( theParams, "Weight", IA.GetWeight() );
sizeof(GEOMImpl_ArchimedeDriver), AddParam( theParams, "Water Density", IA.GetDensity() );
1, AddParam( theParams, "Meshing Deflect.", IA.GetDeflection() );
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; return true;
} }
//======================================================================= IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ArchimedeDriver) Handle(GEOMImpl_ArchimedeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
{
Handle(GEOMImpl_ArchimedeDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ArchimedeDriver))) {
_anOtherObject = Handle(GEOMImpl_ArchimedeDriver)((Handle(GEOMImpl_ArchimedeDriver)&)AnObject);
}
}
return _anOtherObject;
}

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ArchimedeDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ArchimedeDriver);
class Handle(GEOMImpl_ArchimedeDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ArchimedeDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ArchimedeDriver)(const Handle(GEOMImpl_ArchimedeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ArchimedeDriver)(const GEOMImpl_ArchimedeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ArchimedeDriver)& operator=(const Handle(GEOMImpl_ArchimedeDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ArchimedeDriver)& operator=(const GEOMImpl_ArchimedeDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ArchimedeDriver* operator->()
{
return (GEOMImpl_ArchimedeDriver *)ControlAccess();
}
GEOMImpl_ArchimedeDriver* operator->() const
{
return (GEOMImpl_ArchimedeDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ArchimedeDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ArchimedeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ArchimedeDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ArchimedeDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ArchimedeDriver, GEOM_BaseDriver );
class GEOMImpl_ArchimedeDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ArchimedeDriver(); Standard_EXPORT GEOMImpl_ArchimedeDriver();
@ -148,14 +77,10 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {}; Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ArchimedeDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ArchimedeDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ArchimedeDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -1063,45 +1063,99 @@ void GEOMImpl_BlockDriver::MultiTransformate2D (const TopoDS_Shape& theBlock,
theResult = aCompound; theResult = aCompound;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_BlockDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BlockDriver_Type_() //================================================================================
bool GEOMImpl_BlockDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IBlocks aCI1 (function);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); GEOMImpl_IBlockTrsf aCI2 (function);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); Handle(TColStd_HSequenceOfTransient) aShapes = aCI1.GetShapes();
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case BLOCK_FACE_FOUR_EDGES:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BlockDriver", theOperationName = "Q_FACE";
sizeof(GEOMImpl_BlockDriver), AddParam( theParams, "Edge 1", aShapes->Value(1) );
1, AddParam( theParams, "Edge 2", aShapes->Value(2) );
(Standard_Address)_Ancestors, AddParam( theParams, "Edge 3", aShapes->Value(3) );
(Standard_Address)NULL); AddParam( theParams, "Edge 4", aShapes->Value(4) );
break;
return _aType; case BLOCK_FACE_TWO_EDGES:
theOperationName = "Q_FACE";
AddParam( theParams, "Edge 1", aShapes->Value(1) );
AddParam( theParams, "Edge 2", aShapes->Value(2) );
break;
case BLOCK_FACE_FOUR_PNT:
theOperationName = "Q_FACE";
AddParam( theParams, "Point 1", aShapes->Value(1) );
AddParam( theParams, "Point 2", aShapes->Value(2) );
AddParam( theParams, "Point 3", aShapes->Value(3) );
AddParam( theParams, "Point 4", aShapes->Value(4) );
break;
case BLOCK_SIX_FACES:
theOperationName = "HEX_SOLID";
AddParam( theParams, "Face 1", aShapes->Value(1) );
AddParam( theParams, "Face 2", aShapes->Value(2) );
AddParam( theParams, "Face 3", aShapes->Value(3) );
AddParam( theParams, "Face 4", aShapes->Value(4) );
AddParam( theParams, "Face 5", aShapes->Value(5) );
AddParam( theParams, "Face 6", aShapes->Value(6) );
break;
case BLOCK_TWO_FACES:
theOperationName = "HEX_SOLID";
AddParam( theParams, "Face 1", aShapes->Value(1) );
AddParam( theParams, "Face 2", aShapes->Value(2) );
break;
case BLOCK_COMPOUND_GLUE:
theOperationName = "MakeBlockCompound";
AddParam( theParams, "Compound", aShapes->Value(1) );
break;
case BLOCK_REMOVE_EXTRA:
theOperationName = "REMOVE_EXTRA_EDGES";
AddParam( theParams, "Selected shape", aCI2.GetOriginal() );
AddParam( theParams, "Union faces", aCI2.GetOptimumNbFaces() == 0);
break;
case BLOCK_COMPOUND_IMPROVE:
theOperationName = "CHECK_COMPOUND";
AddParam( theParams, "Selected shape", aCI2.GetOriginal() );
break;
case BLOCK_MULTI_TRANSFORM_1D:
theOperationName = "MUL_TRANSFORM";
AddParam( theParams, "Main Object", aCI2.GetOriginal() );
AddParam( theParams, "Face 1", aCI2.GetFace1U() );
AddParam( theParams, "Face 2", aCI2.GetFace2U() );
AddParam( theParams, "Nb. Times", aCI2.GetNbIterU() );
break;
case BLOCK_MULTI_TRANSFORM_2D:
theOperationName = "MUL_TRANSFORM";
AddParam( theParams, "Main Object", aCI2.GetOriginal() );
AddParam( theParams, "Face 1 U", aCI2.GetFace1U() );
AddParam( theParams, "Face 2 U", aCI2.GetFace2U() );
AddParam( theParams, "Nb. Times V", aCI2.GetNbIterV() );
AddParam( theParams, "Face 1 V", aCI2.GetFace1V() );
AddParam( theParams, "Face 2 V", aCI2.GetFace2V() );
AddParam( theParams, "Nb. Times V", aCI2.GetNbIterV() );
break;
case BLOCK_UNION_FACES:
theOperationName = "UNION_FACES";
AddParam( theParams, "Selected shape", aCI2.GetOriginal() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_BlockDriver) Handle(GEOMImpl_BlockDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_BlockDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BlockDriver))) {
_anOtherObject = Handle(GEOMImpl_BlockDriver)((Handle(GEOMImpl_BlockDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BlockDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_BlockDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BlockDriver);
class Handle(GEOMImpl_BlockDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_BlockDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_BlockDriver)(const Handle(GEOMImpl_BlockDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_BlockDriver)(const GEOMImpl_BlockDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_BlockDriver)& operator=(const Handle(GEOMImpl_BlockDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_BlockDriver)& operator=(const GEOMImpl_BlockDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_BlockDriver* operator->()
{
return (GEOMImpl_BlockDriver *)ControlAccess();
}
GEOMImpl_BlockDriver* operator->() const
{
return (GEOMImpl_BlockDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_BlockDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_BlockDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -123,23 +61,14 @@ class Handle(GEOMImpl_BlockDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_BlockDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_BlockDriver, GEOM_BaseDriver );
class GEOMImpl_BlockDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_BlockDriver(); Standard_EXPORT GEOMImpl_BlockDriver();
@ -149,12 +78,8 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BlockDriver() {}; Standard_EXPORT ~GEOMImpl_BlockDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
// Type management std::vector<GEOM_Param>& params);
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BlockDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BlockDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BlockDriver) == AType || TFunction_Driver::IsKind(AType)); }
private: private:
void MultiTransformate1D (const TopoDS_Shape& theBlock, void MultiTransformate1D (const TopoDS_Shape& theBlock,
@ -172,6 +97,8 @@ private:
const Standard_Integer theNbIterV, const Standard_Integer theNbIterV,
TopoDS_Shape& theResult) const; TopoDS_Shape& theResult) const;
DEFINE_STANDARD_RTTI( GEOMImpl_BlockDriver )
}; };
#endif #endif

View File

@ -510,42 +510,63 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
return aShape; return aShape;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_BooleanDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_() //================================================================================
bool GEOMImpl_BooleanDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IBoolean aCI (function);
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BooleanDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_BooleanDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; switch ( aType ) {
case BOOLEAN_COMMON:
theOperationName = "COMMON";
AddParam( theParams, "Object 1", aCI.GetShape1() );
AddParam( theParams, "Object 2", aCI.GetShape2() );
break;
case BOOLEAN_CUT:
theOperationName = "CUT";
AddParam( theParams, "Main Object", aCI.GetShape1() );
AddParam( theParams, "Tool Object", aCI.GetShape2() );
break;
case BOOLEAN_FUSE:
theOperationName = "FUSE";
AddParam( theParams, "Object 1", aCI.GetShape1() );
AddParam( theParams, "Object 2", aCI.GetShape2() );
break;
case BOOLEAN_SECTION:
theOperationName = "SECTION";
AddParam( theParams, "Object 1", aCI.GetShape1() );
AddParam( theParams, "Object 2", aCI.GetShape2() );
break;
case BOOLEAN_COMMON_LIST:
theOperationName = "COMMON";
AddParam( theParams, "Selected objects", aCI.GetShapes() );
break;
case BOOLEAN_FUSE_LIST:
theOperationName = "FUSE";
AddParam( theParams, "Selected objects", aCI.GetShapes() );
break;
case BOOLEAN_CUT_LIST:
theOperationName = "CUT";
AddParam( theParams, "Main Object", aCI.GetShape1() );
AddParam( theParams, "Tool Objects", aCI.GetShapes() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_BooleanDriver) Handle(GEOMImpl_BooleanDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_BooleanDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BooleanDriver))) {
_anOtherObject = Handle(GEOMImpl_BooleanDriver)((Handle(GEOMImpl_BooleanDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);

View File

@ -47,10 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile #ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#endif #endif
@ -61,58 +57,7 @@ class Handle_Standard_Type;
class Handle(TFunction_Driver); class Handle(TFunction_Driver);
class GEOMImpl_BooleanDriver; class GEOMImpl_BooleanDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BooleanDriver);
class Handle(GEOMImpl_BooleanDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_BooleanDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_BooleanDriver)(const Handle(GEOMImpl_BooleanDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_BooleanDriver)(const GEOMImpl_BooleanDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_BooleanDriver)& operator=(const Handle(GEOMImpl_BooleanDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_BooleanDriver)& operator=(const GEOMImpl_BooleanDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_BooleanDriver* operator->()
{
return (GEOMImpl_BooleanDriver *)ControlAccess();
}
GEOMImpl_BooleanDriver* operator->() const
{
return (GEOMImpl_BooleanDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_BooleanDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_BooleanDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
@ -127,23 +72,14 @@ class Handle(GEOMImpl_BooleanDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_BooleanDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_BooleanDriver, GEOM_BaseDriver );
class GEOMImpl_BooleanDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_BooleanDriver(); Standard_EXPORT GEOMImpl_BooleanDriver();
@ -153,13 +89,8 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BooleanDriver() {}; Standard_EXPORT ~GEOMImpl_BooleanDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
// Type management std::vector<GEOM_Param>& params);
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BooleanDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BooleanDriver) == AType || TFunction_Driver::IsKind(AType)); }
private: private:
@ -167,6 +98,7 @@ private:
const TopoDS_Shape theShape2, const TopoDS_Shape theShape2,
const Standard_Integer theType) const; const Standard_Integer theType) const;
DEFINE_STANDARD_RTTI( GEOMImpl_BooleanDriver )
}; };
#endif #endif

View File

@ -121,45 +121,42 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_BoxDriver::GetCreationInformation(std::string& theOperationName,
//function : GEOMImpl_BoxDriver_Type_ std::vector<GEOM_Param>& theParams)
//purpose :
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BoxDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IBox aBI (aFunction);
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = aFunction->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "BOX";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; if (aType == BOX_DX_DY_DZ)
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BoxDriver",
sizeof(GEOMImpl_BoxDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_BoxDriver) Handle(GEOMImpl_BoxDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_BoxDriver) _anOtherObject; AddParam( theParams, "Dx", aBI.GetDX() );
AddParam( theParams, "Dy", aBI.GetDY() );
if (!AnObject.IsNull()) { AddParam( theParams, "Dz", aBI.GetDZ() );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BoxDriver))) {
_anOtherObject = Handle(GEOMImpl_BoxDriver)((Handle(GEOMImpl_BoxDriver)&)AnObject);
} }
else if (aType == BOX_TWO_PNT)
{
AddParam( theParams, "Point 1", aBI.GetRef1() );
AddParam( theParams, "Point 2", aBI.GetRef2() );
}
else {
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BoxDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_BoxDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BoxDriver);
class Handle(GEOMImpl_BoxDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_BoxDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_BoxDriver)(const Handle(GEOMImpl_BoxDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_BoxDriver)(const GEOMImpl_BoxDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_BoxDriver)& operator=(const Handle(GEOMImpl_BoxDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_BoxDriver)& operator=(const GEOMImpl_BoxDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_BoxDriver* operator->()
{
return (GEOMImpl_BoxDriver *)ControlAccess();
}
GEOMImpl_BoxDriver* operator->() const
{
return (GEOMImpl_BoxDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_BoxDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_BoxDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_BoxDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_BoxDriver, GEOM_BaseDriver );
class GEOMImpl_BoxDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_BoxDriver(); Standard_EXPORT GEOMImpl_BoxDriver();
@ -148,14 +77,12 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BoxDriver() {}; Standard_EXPORT ~GEOMImpl_BoxDriver() {};
Standard_EXPORT virtual
// Type management bool GetCreationInformation(std::string& theOperationNameName,
// std::vector<GEOM_Param>& params);
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BoxDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BoxDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BoxDriver) == AType || TFunction_Driver::IsKind(AType)); }
DEFINE_STANDARD_RTTI( GEOMImpl_BoxDriver )
}; };
#endif #endif

View File

@ -286,43 +286,91 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ChamferDriver::
//function : GEOMImpl_ChamferDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ChamferDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IChamfer aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ChamferDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_ChamferDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; theOperationName = "CHAMFER";
switch ( aType ) {
case CHAMFER_SHAPE_ALL:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected Edges", "all" );
AddParam( theParams, "D", aCI.GetD() );
break;
case CHAMFER_SHAPE_EDGE:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Face 1", aCI.GetFace1() );
AddParam( theParams, "Face 2", aCI.GetFace2() );
AddParam( theParams, "D1", aCI.GetD1() );
AddParam( theParams, "D2", aCI.GetD2() );
break;
case CHAMFER_SHAPE_EDGE_AD:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Face 1", aCI.GetFace1() );
AddParam( theParams, "Face 2", aCI.GetFace2() );
AddParam( theParams, "D", aCI.GetD() );
AddParam( theParams, "Angle", aCI.GetAngle() );
break;
case CHAMFER_SHAPE_FACES:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected Faces" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " faces: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[1] << aCI.GetFace(i) << " ";
AddParam( theParams, "D1", aCI.GetD1() );
AddParam( theParams, "D2", aCI.GetD2() );
break;
case CHAMFER_SHAPE_FACES_AD:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected Faces" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " faces: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[1] << aCI.GetFace(i) << " ";
AddParam( theParams, "D", aCI.GetD() );
AddParam( theParams, "Angle", aCI.GetAngle() );
break;
case CHAMFER_SHAPE_EDGES:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected Edges" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " edges: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[1] << aCI.GetEdge(i) << " ";
AddParam( theParams, "D1", aCI.GetD1() );
AddParam( theParams, "D2", aCI.GetD2() );
break;
case CHAMFER_SHAPE_EDGES_AD:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected Edges" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " edges: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[1] << aCI.GetFace(i) << " ";
AddParam( theParams, "D", aCI.GetD() );
AddParam( theParams, "Angle", aCI.GetAngle() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ChamferDriver) Handle(GEOMImpl_ChamferDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ChamferDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ChamferDriver))) {
_anOtherObject = Handle(GEOMImpl_ChamferDriver)((Handle(GEOMImpl_ChamferDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ChamferDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ChamferDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ChamferDriver);
class Handle(GEOMImpl_ChamferDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ChamferDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ChamferDriver)(const Handle(GEOMImpl_ChamferDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ChamferDriver)(const GEOMImpl_ChamferDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ChamferDriver)& operator=(const Handle(GEOMImpl_ChamferDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ChamferDriver)& operator=(const GEOMImpl_ChamferDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ChamferDriver* operator->()
{
return (GEOMImpl_ChamferDriver *)ControlAccess();
}
GEOMImpl_ChamferDriver* operator->() const
{
return (GEOMImpl_ChamferDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ChamferDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ChamferDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ChamferDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ChamferDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ChamferDriver, GEOM_BaseDriver );
class GEOMImpl_ChamferDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ChamferDriver(); Standard_EXPORT GEOMImpl_ChamferDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ChamferDriver() {}; Standard_EXPORT ~GEOMImpl_ChamferDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ChamferDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ChamferDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ChamferDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ChamferDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -192,45 +192,47 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_CircleDriver::
//function : GEOMImpl_CircleDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CircleDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICircle aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "CIRCLE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CircleDriver", case CIRCLE_PNT_VEC_R:
sizeof(GEOMImpl_CircleDriver), AddParam( theParams, "Center Point", aCI.GetCenter(), "Origin" );
1, AddParam( theParams, "Vector", aCI.GetVector(), "Z axis" );
(Standard_Address)_Ancestors, AddParam( theParams, "Radius", aCI.GetRadius() );
(Standard_Address)NULL); break;
case CIRCLE_CENTER_TWO_PNT:
return _aType; AddParam( theParams, "Center Point", aCI.GetPoint1() );
AddParam( theParams, "Point 1", aCI.GetPoint2() );
AddParam( theParams, "Point 2", aCI.GetPoint3() );
break;
case CIRCLE_THREE_PNT:
AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
AddParam( theParams, "Point 3", aCI.GetPoint3() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_CircleDriver) Handle(GEOMImpl_CircleDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_CircleDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CircleDriver))) {
_anOtherObject = Handle(GEOMImpl_CircleDriver)((Handle(GEOMImpl_CircleDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CircleDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_CircleDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CircleDriver);
class Handle(GEOMImpl_CircleDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_CircleDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_CircleDriver)(const Handle(GEOMImpl_CircleDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_CircleDriver)(const GEOMImpl_CircleDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_CircleDriver)& operator=(const Handle(GEOMImpl_CircleDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_CircleDriver)& operator=(const GEOMImpl_CircleDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_CircleDriver* operator->()
{
return (GEOMImpl_CircleDriver *)ControlAccess();
}
GEOMImpl_CircleDriver* operator->() const
{
return (GEOMImpl_CircleDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_CircleDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_CircleDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CircleDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_CircleDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_CircleDriver, GEOM_BaseDriver );
class GEOMImpl_CircleDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_CircleDriver(); Standard_EXPORT GEOMImpl_CircleDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CircleDriver() {}; Standard_EXPORT ~GEOMImpl_CircleDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_CircleDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CircleDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CircleDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CircleDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -143,45 +143,44 @@ Standard_Integer GEOMImpl_ConeDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ConeDriver::
//function : GEOMImpl_ConeDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ConeDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICone aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "CONE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ConeDriver", case CONE_R1_R2_H:
sizeof(GEOMImpl_ConeDriver), AddParam( theParams, "Radius 1", aCI.GetR1() );
1, AddParam( theParams, "Radius 2", aCI.GetR2() );
(Standard_Address)_Ancestors, AddParam( theParams, "Height", aCI.GetH() );
(Standard_Address)NULL); break;
case CONE_PNT_VEC_R1_R2_H:
return _aType; AddParam( theParams, "Base Point", aCI.GetPoint() );
AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Radius 1", aCI.GetR1() );
AddParam( theParams, "Radius 2", aCI.GetR2() );
AddParam( theParams, "Height", aCI.GetH() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ConeDriver) Handle(GEOMImpl_ConeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ConeDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ConeDriver))) {
_anOtherObject = Handle(GEOMImpl_ConeDriver)((Handle(GEOMImpl_ConeDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ConeDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ConeDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ConeDriver);
class Handle(GEOMImpl_ConeDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ConeDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ConeDriver)(const Handle(GEOMImpl_ConeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ConeDriver)(const GEOMImpl_ConeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ConeDriver)& operator=(const Handle(GEOMImpl_ConeDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ConeDriver)& operator=(const GEOMImpl_ConeDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ConeDriver* operator->()
{
return (GEOMImpl_ConeDriver *)ControlAccess();
}
GEOMImpl_ConeDriver* operator->() const
{
return (GEOMImpl_ConeDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ConeDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ConeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ConeDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ConeDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ConeDriver, GEOM_BaseDriver );
class GEOMImpl_ConeDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ConeDriver(); Standard_EXPORT GEOMImpl_ConeDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ConeDriver() {}; Standard_EXPORT ~GEOMImpl_ConeDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ConeDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ConeDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ConeDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ConeDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -20,12 +20,11 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
#include <Standard_Stream.hxx> #include "GEOMImpl_CopyDriver.hxx"
#include "GEOMImpl_ICopy.hxx"
#include <GEOMImpl_CopyDriver.hxx> #include "GEOMImpl_Types.hxx"
#include <GEOMImpl_ICopy.hxx> #include "GEOM_Function.hxx"
#include <GEOMImpl_Types.hxx> #include "GEOM_Object.hxx"
#include <GEOM_Function.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
@ -92,45 +91,44 @@ Standard_Integer GEOMImpl_CopyDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_CopyDriver::
//function : GEOMImpl_CopyDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CopyDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICopy aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CopyDriver", case COPY_WITH_REF:
sizeof(GEOMImpl_CopyDriver), theOperationName = "MakeCopy";
1, AddParam( theParams, "Original", aCI.GetOriginal() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case COPY_WITHOUT_REF:
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_CopyDriver) Handle(GEOMImpl_CopyDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_CopyDriver) _anOtherObject; theOperationName = "RestoreShape";
TDF_Label label = Label();
if (!AnObject.IsNull()) { Handle(GEOM_Object) obj = GEOM_Object::GetObject(label);
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CopyDriver))) { if ( !obj.IsNull() && obj->GetType() == GEOM_FREE_BOUNDS )
_anOtherObject = Handle(GEOMImpl_CopyDriver)((Handle(GEOMImpl_CopyDriver)&)AnObject); theOperationName = "CHECK_FREE_BNDS";
break;
} }
default:
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CopyDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_CopyDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CopyDriver);
class Handle(GEOMImpl_CopyDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_CopyDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_CopyDriver)(const Handle(GEOMImpl_CopyDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_CopyDriver)(const GEOMImpl_CopyDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_CopyDriver)& operator=(const Handle(GEOMImpl_CopyDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_CopyDriver)& operator=(const GEOMImpl_CopyDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_CopyDriver* operator->()
{
return (GEOMImpl_CopyDriver *)ControlAccess();
}
GEOMImpl_CopyDriver* operator->() const
{
return (GEOMImpl_CopyDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_CopyDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_CopyDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CopyDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_CopyDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_CopyDriver, GEOM_BaseDriver );
class GEOMImpl_CopyDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_CopyDriver(); Standard_EXPORT GEOMImpl_CopyDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CopyDriver() {}; Standard_EXPORT ~GEOMImpl_CopyDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_CopyDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CopyDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CopyDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CopyDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -126,45 +126,42 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_CylinderDriver::
//function : GEOMImpl_CylinderDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICylinder aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "CYLINDER";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CylinderDriver", case CYLINDER_R_H:
sizeof(GEOMImpl_CylinderDriver), AddParam( theParams, "Radius", aCI.GetR() );
1, AddParam( theParams, "Height", aCI.GetH() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case CONE_PNT_VEC_R1_R2_H:
AddParam( theParams, "Base Point", aCI.GetPoint() );
return _aType; AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Radius", aCI.GetR() );
AddParam( theParams, "Height", aCI.GetH() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_CylinderDriver) Handle(GEOMImpl_CylinderDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_CylinderDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CylinderDriver))) {
_anOtherObject = Handle(GEOMImpl_CylinderDriver)((Handle(GEOMImpl_CylinderDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CylinderDriver,GEOM_BaseDriver);
}
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_CylinderDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CylinderDriver);
class Handle(GEOMImpl_CylinderDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_CylinderDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_CylinderDriver)(const Handle(GEOMImpl_CylinderDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_CylinderDriver)(const GEOMImpl_CylinderDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_CylinderDriver)& operator=(const Handle(GEOMImpl_CylinderDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_CylinderDriver)& operator=(const GEOMImpl_CylinderDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_CylinderDriver* operator->()
{
return (GEOMImpl_CylinderDriver *)ControlAccess();
}
GEOMImpl_CylinderDriver* operator->() const
{
return (GEOMImpl_CylinderDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_CylinderDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_CylinderDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CylinderDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_CylinderDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_CylinderDriver, GEOM_BaseDriver );
class GEOMImpl_CylinderDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_CylinderDriver(); Standard_EXPORT GEOMImpl_CylinderDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CylinderDriver() {}; Standard_EXPORT ~GEOMImpl_CylinderDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_CylinderDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CylinderDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CylinderDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -159,45 +159,45 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_DiskDriver::
//function : GEOMImpl_DiskDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_DiskDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IDisk aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "DISK";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_DiskDriver", case DISK_PNT_VEC_R:
sizeof(GEOMImpl_DiskDriver), AddParam( theParams, "Center Point", aCI.GetCenter() );
1, AddParam( theParams, "Vector", aCI.GetVector() );
(Standard_Address)_Ancestors, AddParam( theParams, "Radius", aCI.GetRadius() );
(Standard_Address)NULL); break;
case DISK_THREE_PNT:
return _aType; AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
AddParam( theParams, "Point 3", aCI.GetPoint3() );
break;
case DISK_R:
AddParam( theParams, "Radius", aCI.GetRadius() );
AddParam( theParams, "Orientation", aCI.GetOrientation() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast }
//purpose : IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DiskDriver,GEOM_BaseDriver);
//=======================================================================
const Handle(GEOMImpl_DiskDriver) Handle(GEOMImpl_DiskDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_DiskDriver) _anOtherObject;
if (!AnObject.IsNull()) { IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DiskDriver,GEOM_BaseDriver);
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_DiskDriver))) {
_anOtherObject = Handle(GEOMImpl_DiskDriver)((Handle(GEOMImpl_DiskDriver)&)AnObject);
}
}
return _anOtherObject ;
}

View File

@ -44,68 +44,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_DiskDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_DiskDriver);
class Handle(GEOMImpl_DiskDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_DiskDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_DiskDriver)(const Handle(GEOMImpl_DiskDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_DiskDriver)(const GEOMImpl_DiskDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_DiskDriver)& operator=(const Handle(GEOMImpl_DiskDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_DiskDriver)& operator=(const GEOMImpl_DiskDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_DiskDriver* operator->()
{
return (GEOMImpl_DiskDriver *)ControlAccess();
}
GEOMImpl_DiskDriver* operator->() const
{
return (GEOMImpl_DiskDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_DiskDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_DiskDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -119,23 +57,14 @@ class Handle(GEOMImpl_DiskDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_DiskDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_DiskDriver, GEOM_BaseDriver );
class GEOMImpl_DiskDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_DiskDriver(); Standard_EXPORT GEOMImpl_DiskDriver();
@ -145,14 +74,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_DiskDriver() {}; Standard_EXPORT ~GEOMImpl_DiskDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_DiskDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_DiskDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_DiskDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_DiskDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -485,41 +485,43 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape,
return aTransformation.Shape(); return aTransformation.Shape();
} }
//======================================================================= //================================================================================
//function : GEOMImpl_DividedDiskDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_DividedDiskDriver_Type_() //================================================================================
bool GEOMImpl_DividedDiskDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IDividedDisk aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_DividedDiskDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_DividedDiskDriver),
1, theOperationName = "DIVIDEDDISK";
(Standard_Address)_Ancestors,
(Standard_Address)NULL); switch ( aType ) {
return _aType; case DIVIDEDDISK_R_RATIO:
AddParam( theParams, "Radius", aCI.GetR() );
AddParam( theParams, "Ratio", aCI.GetRatio() );
AddParam( theParams, "Orientation", aCI.GetOrientation() );
AddParam( theParams, "Division pattern", aCI.GetType() );
break;
case DIVIDEDDISK_R_VECTOR_PNT:
AddParam( theParams, "Center Point", aCI.GetCenter() );
AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Radius", aCI.GetR() );
AddParam( theParams, "Division pattern", aCI.GetType() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_DividedDiskDriver) Handle(GEOMImpl_DividedDiskDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_DividedDiskDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_DividedDiskDriver))) {
_anOtherObject = Handle(GEOMImpl_DividedDiskDriver)((Handle(GEOMImpl_DividedDiskDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);

View File

@ -33,72 +33,12 @@ class gp_Pnt;
class gp_Dir; class gp_Dir;
class gp_Ax3; class gp_Ax3;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_DividedDiskDriver); #include "GEOM_BaseDriver.hxx"
class Handle(GEOMImpl_DividedDiskDriver) : public Handle(TFunction_Driver) { DEFINE_STANDARD_HANDLE( GEOMImpl_DividedDiskDriver, GEOM_BaseDriver );
class GEOMImpl_DividedDiskDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_DividedDiskDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_DividedDiskDriver)(const Handle(GEOMImpl_DividedDiskDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{}
Handle(GEOMImpl_DividedDiskDriver)(const GEOMImpl_DividedDiskDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{}
Handle(GEOMImpl_DividedDiskDriver)& operator=(const Handle(GEOMImpl_DividedDiskDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_DividedDiskDriver)& operator=(const GEOMImpl_DividedDiskDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_DividedDiskDriver* operator->()
{
return (GEOMImpl_DividedDiskDriver *)ControlAccess();
}
GEOMImpl_DividedDiskDriver* operator->() const
{
return (GEOMImpl_DividedDiskDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_DividedDiskDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_DividedDiskDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
class GEOMImpl_DividedDiskDriver : public TFunction_Driver {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_DividedDiskDriver(); Standard_EXPORT GEOMImpl_DividedDiskDriver();
@ -111,24 +51,17 @@ public:
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {}; Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {};
// Type management Standard_EXPORT virtual
// bool GetCreationInformation(std::string& theOperationName,
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_DividedDiskDriver_Type_(); std::vector<GEOM_Param>& params);
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{
return STANDARD_TYPE(GEOMImpl_DividedDiskDriver);
}
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{
return (STANDARD_TYPE(GEOMImpl_DividedDiskDriver) == AType || TFunction_Driver::IsKind(AType));
}
private: private:
TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) const; TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) const;
TopoDS_Shape TransformShape (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const; TopoDS_Shape TransformShape (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const;
TopoDS_Shape WPlaneTransform (TopoDS_Shape aShape, gp_Ax3 theWPlane) const; TopoDS_Shape WPlaneTransform (TopoDS_Shape aShape, gp_Ax3 theWPlane) const;
TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const; TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const; TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
DEFINE_STANDARD_RTTI( GEOMImpl_DividedDiskDriver )
}; };
#endif // _GEOMImpl_DividedDiskDriver_HXX #endif // _GEOMImpl_DividedDiskDriver_HXX

View File

@ -159,45 +159,38 @@ Standard_Integer GEOMImpl_EllipseDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_EllipseDriver::
//function : GEOMImpl_EllipseDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IEllipse aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "ELLIPSE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_EllipseDriver", case ELLIPSE_PNT_VEC_RR:
sizeof(GEOMImpl_EllipseDriver), AddParam( theParams, "Center", aCI.GetCenter(), "Origin" );
1, AddParam( theParams, "Vector", aCI.GetVector(), "Z axis" );
(Standard_Address)_Ancestors, AddParam( theParams, "Major Axis", aCI.GetVectorMajor(), "X axis");
(Standard_Address)NULL); AddParam( theParams, "Major radius", aCI.GetRMajor() );
AddParam( theParams, "Minor radius", aCI.GetRMinor() );
return _aType; break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_EllipseDriver) Handle(GEOMImpl_EllipseDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_EllipseDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_EllipseDriver))) {
_anOtherObject = Handle(GEOMImpl_EllipseDriver)((Handle(GEOMImpl_EllipseDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_EllipseDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_EllipseDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_EllipseDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_EllipseDriver);
class Handle(GEOMImpl_EllipseDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_EllipseDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_EllipseDriver)(const Handle(GEOMImpl_EllipseDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_EllipseDriver)(const GEOMImpl_EllipseDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_EllipseDriver)& operator=(const Handle(GEOMImpl_EllipseDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_EllipseDriver)& operator=(const GEOMImpl_EllipseDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_EllipseDriver* operator->()
{
return (GEOMImpl_EllipseDriver *)ControlAccess();
}
GEOMImpl_EllipseDriver* operator->() const
{
return (GEOMImpl_EllipseDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_EllipseDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_EllipseDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_EllipseDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_EllipseDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_EllipseDriver, GEOM_BaseDriver );
class GEOMImpl_EllipseDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_EllipseDriver(); Standard_EXPORT GEOMImpl_EllipseDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_EllipseDriver() {}; Standard_EXPORT ~GEOMImpl_EllipseDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_EllipseDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_EllipseDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_EllipseDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -126,45 +126,18 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const
return res; return res;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ExportDriver::
//function : GEOMImpl_ExportDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ExportDriver_Type_()
{ {
return false;
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ExportDriver",
sizeof(GEOMImpl_ExportDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
} }
//======================================================================= IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ExportDriver,GEOM_BaseDriver);
//function : DownCast IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ExportDriver,GEOM_BaseDriver);
//purpose :
//=======================================================================
const Handle(GEOMImpl_ExportDriver) Handle(GEOMImpl_ExportDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ExportDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ExportDriver))) {
_anOtherObject = Handle(GEOMImpl_ExportDriver)((Handle(GEOMImpl_ExportDriver)&)AnObject);
}
}
return _anOtherObject ;
}

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ExportDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ExportDriver);
class Handle(GEOMImpl_ExportDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ExportDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ExportDriver)(const Handle(GEOMImpl_ExportDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ExportDriver)(const GEOMImpl_ExportDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ExportDriver)& operator=(const Handle(GEOMImpl_ExportDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ExportDriver)& operator=(const GEOMImpl_ExportDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ExportDriver* operator->()
{
return (GEOMImpl_ExportDriver *)ControlAccess();
}
GEOMImpl_ExportDriver* operator->() const
{
return (GEOMImpl_ExportDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ExportDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ExportDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ExportDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ExportDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ExportDriver, GEOM_BaseDriver );
class GEOMImpl_ExportDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ExportDriver(); Standard_EXPORT GEOMImpl_ExportDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ExportDriver() {}; Standard_EXPORT ~GEOMImpl_ExportDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ExportDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ExportDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ExportDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ExportDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -123,45 +123,48 @@ Standard_Integer GEOMImpl_FaceDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_FaceDriver::
//function : GEOMImpl_FaceDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FaceDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IFace aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "RECTANGLE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FaceDriver", case FACE_OBJ_H_W:
sizeof(GEOMImpl_FaceDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_FaceDriver) Handle(GEOMImpl_FaceDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_FaceDriver) _anOtherObject; Handle(GEOM_Function) aRefFunct = aCI.GetRef1();
TopoDS_Shape aRefShape = aRefFunct->GetValue();
if (!AnObject.IsNull()) { if (aRefShape.ShapeType() == TopAbs_EDGE)
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FaceDriver))) { AddParam( theParams, "Edge", aRefFunct );
_anOtherObject = Handle(GEOMImpl_FaceDriver)((Handle(GEOMImpl_FaceDriver)&)AnObject); else
AddParam( theParams, "Face", aRefFunct );
AddParam( theParams, "Height", aCI.GetH() );
AddParam( theParams, "Width", aCI.GetW() );
break;
} }
case FACE_H_W:
AddParam( theParams, "Height", aCI.GetH() );
AddParam( theParams, "Width", aCI.GetW() );
AddParam( theParams, "Orientation", aCI.GetOrientation() );
break;
default:
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FaceDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FaceDriver,GEOM_BaseDriver);

View File

@ -44,68 +44,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_FaceDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_FaceDriver);
class Handle(GEOMImpl_FaceDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_FaceDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_FaceDriver)(const Handle(GEOMImpl_FaceDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_FaceDriver)(const GEOMImpl_FaceDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_FaceDriver)& operator=(const Handle(GEOMImpl_FaceDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_FaceDriver)& operator=(const GEOMImpl_FaceDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_FaceDriver* operator->()
{
return (GEOMImpl_FaceDriver *)ControlAccess();
}
GEOMImpl_FaceDriver* operator->() const
{
return (GEOMImpl_FaceDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_FaceDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_FaceDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -119,23 +57,14 @@ class Handle(GEOMImpl_FaceDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_FaceDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_FaceDriver, GEOM_BaseDriver );
class GEOMImpl_FaceDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_FaceDriver(); Standard_EXPORT GEOMImpl_FaceDriver();
@ -145,14 +74,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FaceDriver() {}; Standard_EXPORT ~GEOMImpl_FaceDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_FaceDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_FaceDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_FaceDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_FaceDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -367,44 +367,41 @@ bool GEOMImpl_Fillet1dDriver::MakeFillet(const TopoDS_Wire& aWire,
return isAllStepsOk; return isAllStepsOk;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
bool GEOMImpl_Fillet1dDriver::
//======================================================================= GetCreationInformation(std::string& theOperationName,
//function : GEOMImpl_Fillet1dDriver_Type_ std::vector<GEOM_Param>& theParams)
//purpose :
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet1dDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IFillet1d aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet1dDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_Fillet1dDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; theOperationName = "FILLET_1D";
switch ( aType ) {
case GEOM_FILLET_1D:
AddParam( theParams, "Wire", aCI.GetShape() );
AddParam( theParams, "Vertexes");
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " vertexes: ";
for (int i = 1; i <= aCI.GetLength(); ++i )
theParams[1] << aCI.GetVertex( i ) << " ";
AddParam( theParams, "Radius", aCI.GetR() );
AddParam( theParams, "Fuse collinear edges", aCI.GetFlag() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_Fillet1dDriver) Handle(GEOMImpl_Fillet1dDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_Fillet1dDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Fillet1dDriver))) {
_anOtherObject = Handle(GEOMImpl_Fillet1dDriver)((Handle(GEOMImpl_Fillet1dDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);

View File

@ -44,10 +44,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
#include <TopoDS_Wire.hxx> #include <TopoDS_Wire.hxx>
#include <TopTools_ListOfShape.hxx> #include <TopTools_ListOfShape.hxx>
@ -56,58 +52,7 @@ class Handle_Standard_Type;
class Handle(TFunction_Driver); class Handle(TFunction_Driver);
class GEOMImpl_Fillet1dDriver; class GEOMImpl_Fillet1dDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_Fillet1dDriver);
class Handle(GEOMImpl_Fillet1dDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_Fillet1dDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_Fillet1dDriver)(const Handle(GEOMImpl_Fillet1dDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_Fillet1dDriver)(const GEOMImpl_Fillet1dDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_Fillet1dDriver)& operator=(const Handle(GEOMImpl_Fillet1dDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_Fillet1dDriver)& operator=(const GEOMImpl_Fillet1dDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_Fillet1dDriver* operator->()
{
return (GEOMImpl_Fillet1dDriver *)ControlAccess();
}
GEOMImpl_Fillet1dDriver* operator->() const
{
return (GEOMImpl_Fillet1dDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_Fillet1dDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_Fillet1dDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
@ -122,23 +67,14 @@ class Handle(GEOMImpl_Fillet1dDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_Fillet1dDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_Fillet1dDriver, GEOM_BaseDriver );
class GEOMImpl_Fillet1dDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_Fillet1dDriver(); Standard_EXPORT GEOMImpl_Fillet1dDriver();
@ -150,19 +86,15 @@ public:
Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
// Type management Standard_EXPORT virtual
// bool GetCreationInformation(std::string& theOperationName,
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_Fillet1dDriver_Type_(); std::vector<GEOM_Param>& params);
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{ return STANDARD_TYPE(GEOMImpl_Fillet1dDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{ return (STANDARD_TYPE(GEOMImpl_Fillet1dDriver) == AType || TFunction_Driver::IsKind(AType)); }
private: private:
Standard_EXPORT bool MakeFillet(const TopoDS_Wire&, const TopTools_ListOfShape&, Standard_EXPORT bool MakeFillet(const TopoDS_Wire&, const TopTools_ListOfShape&,
const Standard_Real, bool, TopoDS_Wire&) const; const Standard_Real, bool, TopoDS_Wire&) const;
DEFINE_STANDARD_RTTI( GEOMImpl_Fillet1dDriver )
}; };
#endif #endif

View File

@ -179,44 +179,40 @@ Standard_Integer GEOMImpl_Fillet2dDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_Fillet2dDriver::
//function : GEOMImpl_Fillet2dDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet2dDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IFillet2d aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet2dDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_Fillet2dDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; theOperationName = "FILLET_2D";
switch ( aType ) {
case FILLET_2D_SHAPE_VERTEXES:
AddParam( theParams, "Face", aCI.GetShape() );
AddParam( theParams, "Vertexes");
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " vertexes: ";
for (int i = 1; i <= aCI.GetLength(); ++i )
theParams[1] << aCI.GetVertex( i ) << " ";
AddParam( theParams, "Radius", aCI.GetR() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_Fillet2dDriver) Handle(GEOMImpl_Fillet2dDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_Fillet2dDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Fillet2dDriver))) {
_anOtherObject = Handle(GEOMImpl_Fillet2dDriver)((Handle(GEOMImpl_Fillet2dDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);

View File

@ -44,68 +44,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_Fillet2dDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_Fillet2dDriver);
class Handle(GEOMImpl_Fillet2dDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_Fillet2dDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_Fillet2dDriver)(const Handle(GEOMImpl_Fillet2dDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_Fillet2dDriver)(const GEOMImpl_Fillet2dDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_Fillet2dDriver)& operator=(const Handle(GEOMImpl_Fillet2dDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_Fillet2dDriver)& operator=(const GEOMImpl_Fillet2dDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_Fillet2dDriver* operator->()
{
return (GEOMImpl_Fillet2dDriver *)ControlAccess();
}
GEOMImpl_Fillet2dDriver* operator->() const
{
return (GEOMImpl_Fillet2dDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_Fillet2dDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_Fillet2dDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -119,23 +57,14 @@ class Handle(GEOMImpl_Fillet2dDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_Fillet2dDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_Fillet2dDriver, GEOM_BaseDriver );
class GEOMImpl_Fillet2dDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_Fillet2dDriver(); Standard_EXPORT GEOMImpl_Fillet2dDriver();
@ -145,14 +74,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_Fillet2dDriver() {}; Standard_EXPORT ~GEOMImpl_Fillet2dDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_Fillet2dDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_Fillet2dDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_Fillet2dDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_Fillet2dDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -157,45 +157,67 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_FilletDriver::
//function : GEOMImpl_FilletDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FilletDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IFillet aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "FILLET";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FilletDriver", case FILLET_SHAPE_ALL:
sizeof(GEOMImpl_FilletDriver), AddParam( theParams, "Main Object", aCI.GetShape() );
1, AddParam( theParams, "Selected edges", "all" );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case FILLET_SHAPE_EDGES:
case FILLET_SHAPE_EDGES_2R:
return _aType; AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected edges" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " edges: ";
for (int i = 1; i <= aCI.GetLength(); ++i )
theParams[1] << aCI.GetEdge( i ) << " ";
if ( aType == FILLET_SHAPE_EDGES ) {
AddParam( theParams, "Radius", aCI.GetR() );
}
else {
AddParam( theParams, "R1", aCI.GetR1() );
AddParam( theParams, "R2", aCI.GetR2() );
}
break;
case FILLET_SHAPE_FACES:
case FILLET_SHAPE_FACES_2R:
AddParam( theParams, "Main Object", aCI.GetShape() );
AddParam( theParams, "Selected faces" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " faces: ";
for (int i = 1; i <= aCI.GetLength(); ++i )
theParams[1] << aCI.GetFace( i ) << " ";
if ( aType == FILLET_SHAPE_FACES ) {
AddParam( theParams, "Radius", aCI.GetR() );
}
else {
AddParam( theParams, "R1", aCI.GetR1() );
AddParam( theParams, "R2", aCI.GetR2() );
}
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_FilletDriver) Handle(GEOMImpl_FilletDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_FilletDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FilletDriver))) {
_anOtherObject = Handle(GEOMImpl_FilletDriver)((Handle(GEOMImpl_FilletDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FilletDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FilletDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_FilletDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_FilletDriver);
class Handle(GEOMImpl_FilletDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_FilletDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_FilletDriver)(const Handle(GEOMImpl_FilletDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_FilletDriver)(const GEOMImpl_FilletDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_FilletDriver)& operator=(const Handle(GEOMImpl_FilletDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_FilletDriver)& operator=(const GEOMImpl_FilletDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_FilletDriver* operator->()
{
return (GEOMImpl_FilletDriver *)ControlAccess();
}
GEOMImpl_FilletDriver* operator->() const
{
return (GEOMImpl_FilletDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_FilletDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_FilletDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_FilletDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_FilletDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_FilletDriver, GEOM_BaseDriver );
class GEOMImpl_FilletDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_FilletDriver(); Standard_EXPORT GEOMImpl_FilletDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FilletDriver() {}; Standard_EXPORT ~GEOMImpl_FilletDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_FilletDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_FilletDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_FilletDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_FilletDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -386,44 +386,47 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_FillingDriver::
//function : GEOMImpl_FillingDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FillingDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IFilling aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FillingDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_FillingDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; theOperationName = "FILLING";
}
//======================================================================= switch ( aType ) {
//function : DownCast case BASIC_FILLING:
//purpose :
//=======================================================================
const Handle(GEOMImpl_FillingDriver) Handle(GEOMImpl_FillingDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_FillingDriver) _anOtherObject; AddParam( theParams, "Input compound", aCI.GetShape() );
AddParam( theParams, "Method", aCI.GetMethod() );
if (!AnObject.IsNull()) { const char* method[3] =
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FillingDriver))) { { "Standard", "Use edges orientation", "Correct edges orientation" };
_anOtherObject = Handle(GEOMImpl_FillingDriver)((Handle(GEOMImpl_FillingDriver)&)AnObject); if ( 0 <= aCI.GetMethod() && aCI.GetMethod() < 3 )
theParams[1] << " = " << method[ aCI.GetMethod() ];
AddParam( theParams, "Min deg", aCI.GetMinDeg() );
AddParam( theParams, "Max deg", aCI.GetMaxDeg() );
AddParam( theParams, "Nb. Iter", aCI.GetNbIter() );
AddParam( theParams, "Tol. 2D", aCI.GetTol2D() );
AddParam( theParams, "Tol. 3D", aCI.GetTol3D() );
AddParam( theParams, "Approximation", aCI.GetApprox() );
break;
} }
default:
return false;
} }
return _anOtherObject; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FillingDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FillingDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_FillingDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_FillingDriver);
class Handle(GEOMImpl_FillingDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_FillingDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_FillingDriver)(const Handle(GEOMImpl_FillingDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_FillingDriver)(const GEOMImpl_FillingDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_FillingDriver)& operator=(const Handle(GEOMImpl_FillingDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_FillingDriver)& operator=(const GEOMImpl_FillingDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_FillingDriver* operator->()
{
return (GEOMImpl_FillingDriver *)ControlAccess();
}
GEOMImpl_FillingDriver* operator->() const
{
return (GEOMImpl_FillingDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_FillingDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_FillingDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_FillingDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_FillingDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_FillingDriver, GEOM_BaseDriver );
class GEOMImpl_FillingDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_FillingDriver(); Standard_EXPORT GEOMImpl_FillingDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_FillingDriver() {}; Standard_EXPORT ~GEOMImpl_FillingDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_FillingDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_FillingDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_FillingDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_FillingDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -756,7 +756,6 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
TopoDS_Shape aFace = aRefSh->GetValue(); TopoDS_Shape aFace = aRefSh->GetValue();
if (aFace.IsNull()) if (aFace.IsNull())
continue; continue;
if (!aFaces.Contains(aFace))
aFaces.Add(aFace); aFaces.Add(aFace);
} }
@ -781,44 +780,54 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_GlueDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_() //================================================================================
bool GEOMImpl_GlueDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IGlue aCI( function );
if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case GLUE_FACES:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver", theOperationName = "GLUE_FACES";
sizeof(GEOMImpl_GlueDriver), AddParam( theParams, "Selected shape", aCI.GetBase() );
1, AddParam( theParams, "Tolerance", aCI.GetTolerance() );
(Standard_Address)_Ancestors, AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() );
(Standard_Address)NULL); break;
case GLUE_EDGES:
return _aType; theOperationName = "GLUE_EDGES";
AddParam( theParams, "Selected shape", aCI.GetBase() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
break;
case GLUE_FACES_BY_LIST:
theOperationName = "GLUE_FACES";
AddParam( theParams, "Selected shape", aCI.GetBase() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
AddParam( theParams, "Faces", aCI.GetFaces() );
AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() );
AddParam( theParams, "To glue all edges", aCI.GetGlueAllEdges() );
break;
case GLUE_EDGES_BY_LIST:
theOperationName = "GLUE_EDGES";
AddParam( theParams, "Selected shape", aCI.GetBase() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
AddParam( theParams, "Edges", aCI.GetFaces() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_GlueDriver) Handle(GEOMImpl_GlueDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_GlueDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_GlueDriver))) {
_anOtherObject = Handle(GEOMImpl_GlueDriver)((Handle(GEOMImpl_GlueDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_GlueDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);

View File

@ -47,69 +47,8 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_GlueDriver;
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_GlueDriver);
class Handle(GEOMImpl_GlueDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_GlueDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_GlueDriver)(const Handle(GEOMImpl_GlueDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_GlueDriver)(const GEOMImpl_GlueDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_GlueDriver)& operator=(const Handle(GEOMImpl_GlueDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_GlueDriver)& operator=(const GEOMImpl_GlueDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_GlueDriver* operator->()
{
return (GEOMImpl_GlueDriver *)ControlAccess();
}
GEOMImpl_GlueDriver* operator->() const
{
return (GEOMImpl_GlueDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_GlueDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_GlueDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
@ -126,23 +65,14 @@ class Handle(GEOMImpl_GlueDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_GlueDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_GlueDriver, GEOM_BaseDriver );
class GEOMImpl_GlueDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_GlueDriver(); Standard_EXPORT GEOMImpl_GlueDriver();
@ -152,6 +82,10 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_GlueDriver() {}; Standard_EXPORT ~GEOMImpl_GlueDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
Standard_EXPORT static TopoDS_Shape GlueFaces (const TopoDS_Shape& theShape, Standard_EXPORT static TopoDS_Shape GlueFaces (const TopoDS_Shape& theShape,
const Standard_Real theTolerance, const Standard_Real theTolerance,
const Standard_Boolean doKeepNonSolids = Standard_True); const Standard_Boolean doKeepNonSolids = Standard_True);
@ -179,13 +113,7 @@ Standard_EXPORT static TopoDS_Shape GlueByList (const TopoDS_Shape& theShape,
const Standard_Boolean doGlueAllEdges); const Standard_Boolean doGlueAllEdges);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_GlueDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_GlueDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_GlueDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_GlueDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -812,45 +812,105 @@ Standard_Boolean GEOMImpl_HealingDriver::AreEdgesC1 (const TopoDS_Edge& E1, cons
return Standard_False; return Standard_False;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_HealingDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_HealingDriver_Type_() //================================================================================
bool GEOMImpl_HealingDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IHealing aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case SHAPE_PROCESS:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_HealingDriver",
sizeof(GEOMImpl_HealingDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_HealingDriver) Handle(GEOMImpl_HealingDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_HealingDriver) _anOtherObject; theOperationName = "SHAPE_PROCESS";
AddParam( theParams, "Object", aCI.GetOriginal() );
if (!AnObject.IsNull()) { Handle(TColStd_HArray1OfExtendedString) anOperators = aCI.GetOperators();
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_HealingDriver))) { Handle(TColStd_HArray1OfExtendedString) aParams = aCI.GetParameters();
_anOtherObject = Handle(GEOMImpl_HealingDriver)((Handle(GEOMImpl_HealingDriver)&)AnObject); Handle(TColStd_HArray1OfExtendedString) aValues = aCI.GetValues();
for ( int i = anOperators->Lower(), nb = anOperators->Upper(); i <= nb; ++i )
{
const TCollection_ExtendedString& op = anOperators->Value(i);
AddParam( theParams, "Operation", op );
for ( int iP = aParams->Lower(), nbP = aParams->Upper(); iP <= nbP; ++iP )
{
const TCollection_ExtendedString& par = aParams->Value(i);
TCollection_AsciiString parAscii( par );
if ( par.Search( op ) == 1 && parAscii.Value( op.Length() + 1 ) == '.' )
{
GEOM_Param& p = AddParam( theParams, parAscii.ToCString() );
if ( iP <= aValues->Upper() )
p << aValues->Value( iP );
} }
} }
}
break;
}
case SUPPRESS_FACES:
theOperationName = "SUPPRESS_FACES";
AddParam( theParams, "Selected Shape", aCI.GetOriginal() );
AddParam( theParams, "Faces to remove", aCI.GetFaces() );
break;
case CLOSE_CONTOUR:
theOperationName = "CLOSE_CONTOUR";
AddParam( theParams, "Selected Shape", aCI.GetOriginal() );
AddParam( theParams, "Contour to close", aCI.GetWires() );
AddParam( theParams, "Close by common vertex", aCI.GetIsCommonVertex() );
break;
case REMOVE_INT_WIRES:
theOperationName = "SUPPRESS_INT_WIRES";
AddParam( theParams, "Selected face", aCI.GetOriginal() );
AddParam( theParams, "Wires to remove", aCI.GetWires(), "all" );
break;
case FILL_HOLES:
theOperationName = "SUPPERSS_HOLES";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
AddParam( theParams, "Wires to remove", aCI.GetWires(), "all" );
break;
case SEWING:
case SEWING_NON_MANIFOLD:
theOperationName = "SEWING";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
AddParam( theParams, "Allow Non Manifold", ( aType == SEWING_NON_MANIFOLD ));
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
break;
case DIVIDE_EDGE:
theOperationName = "POINT_ON_EDGE";
if ( aCI.GetIndex() > 0 )
AddParam( theParams, "Edge", "#" ) << aCI.GetIndex() << " of " << aCI.GetOriginal();
else
AddParam( theParams, "Edge", aCI.GetOriginal() );
AddParam( theParams, "By parameter", aCI.GetIsByParameter() );
AddParam( theParams, "Value", aCI.GetDevideEdgeValue() );
break;
case CHANGE_ORIENTATION:
theOperationName = "CHANGE_ORIENTATION";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
break;
case LIMIT_TOLERANCE:
theOperationName = "LIMIT_TOLERANCE";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
break;
case FUSE_COLLINEAR_EDGES:
theOperationName = "FUSE_EDGES";
AddParam( theParams, "Wire", aCI.GetOriginal() );
AddParam( theParams, "Vertexes", aCI.GetShapes() );
break;
default:
return false;
}
return _anOtherObject; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_HealingDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_HealingDriver,GEOM_BaseDriver);

View File

@ -46,72 +46,10 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_HealingDriver;
class GEOMImpl_IHealing;
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
#include <TColStd_HSequenceOfTransient.hxx> #include <TColStd_HSequenceOfTransient.hxx>
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_HealingDriver);
class Handle(GEOMImpl_HealingDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_HealingDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_HealingDriver)(const Handle(GEOMImpl_HealingDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_HealingDriver)(const GEOMImpl_HealingDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_HealingDriver)& operator=(const Handle(GEOMImpl_HealingDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_HealingDriver)& operator=(const GEOMImpl_HealingDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_HealingDriver* operator->()
{
return (GEOMImpl_HealingDriver *)ControlAccess();
}
GEOMImpl_HealingDriver* operator->() const
{
return (GEOMImpl_HealingDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_HealingDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_HealingDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
@ -123,26 +61,17 @@ class Handle(GEOMImpl_HealingDriver) : public Handle(TFunction_Driver) {
#include <Standard_CString.hxx> #include <Standard_CString.hxx>
#endif #endif
class TColStd_SequenceOfExtendedString; class GEOMImpl_IHealing;
class GEOMImpl_HealingDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_HealingDriver, GEOM_BaseDriver );
class GEOMImpl_HealingDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_HealingDriver(); Standard_EXPORT GEOMImpl_HealingDriver();
@ -158,12 +87,14 @@ public:
Standard_EXPORT static void FuseCollinearEdges (const TopoDS_Shape&, Standard_EXPORT static void FuseCollinearEdges (const TopoDS_Shape&,
const Handle(TColStd_HSequenceOfTransient)&, const Handle(TColStd_HSequenceOfTransient)&,
TopoDS_Shape&); TopoDS_Shape&);
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_HealingDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_HealingDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_HealingDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_HealingDriver) == AType || TFunction_Driver::IsKind(AType)); }
private: private:
Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;

View File

@ -183,46 +183,36 @@ TCollection_AsciiString GEOMImpl_ImportDriver::ReadValue(const TCollection_Ascii
return aValue; return aValue;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ImportDriver::
//function : GEOMImpl_ImportDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ImportDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IImportExport aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "IMPORT";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ImportDriver", case IMPORT_SHAPE:
sizeof(GEOMImpl_ImportDriver), AddParam( theParams, "File name", aCI.GetFileName() );
1, AddParam( theParams, "Format", aCI.GetFormatName() );
(Standard_Address)_Ancestors, AddParam( theParams, "Plugin name", aCI.GetPluginName() );
(Standard_Address)NULL); break;
default:
return _aType; return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ImportDriver) Handle(GEOMImpl_ImportDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ImportDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ImportDriver))) {
_anOtherObject = Handle(GEOMImpl_ImportDriver)((Handle(GEOMImpl_ImportDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ImportDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ImportDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ImportDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ImportDriver);
class Handle(GEOMImpl_ImportDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ImportDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ImportDriver)(const Handle(GEOMImpl_ImportDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ImportDriver)(const GEOMImpl_ImportDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ImportDriver)& operator=(const Handle(GEOMImpl_ImportDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ImportDriver)& operator=(const GEOMImpl_ImportDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ImportDriver* operator->()
{
return (GEOMImpl_ImportDriver *)ControlAccess();
}
GEOMImpl_ImportDriver* operator->() const
{
return (GEOMImpl_ImportDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ImportDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ImportDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -124,23 +62,14 @@ class Handle(GEOMImpl_ImportDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ImportDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ImportDriver, GEOM_BaseDriver );
class GEOMImpl_ImportDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ImportDriver(); Standard_EXPORT GEOMImpl_ImportDriver();
@ -150,19 +79,17 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ImportDriver() {}; Standard_EXPORT ~GEOMImpl_ImportDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Static method // Static method
Standard_EXPORT static TCollection_AsciiString ReadValue (const TCollection_AsciiString& theFileName, Standard_EXPORT static TCollection_AsciiString ReadValue (const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& theLibName, const TCollection_AsciiString& theLibName,
const TCollection_AsciiString& theParameterName, const TCollection_AsciiString& theParameterName,
TCollection_AsciiString& theError); TCollection_AsciiString& theError);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ImportDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ImportDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ImportDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ImportDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -182,46 +182,43 @@ Standard_Integer GEOMImpl_LineDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_LineDriver::
//function : GEOMImpl_LineDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_LineDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ILine aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "LINE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_LineDriver", case LINE_TWO_PNT:
sizeof(GEOMImpl_LineDriver), AddParam( theParams, "Point 1", aCI.GetPoint1() );
1, AddParam( theParams, "Point 2", aCI.GetPoint2() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case LINE_TWO_FACES:
AddParam( theParams, "Face 1", aCI.GetFace1() );
return _aType; AddParam( theParams, "Face 2", aCI.GetFace2() );
break;
case LINE_PNT_DIR:
AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Vector", aCI.GetPoint2() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_LineDriver) Handle(GEOMImpl_LineDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_LineDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_LineDriver))) {
_anOtherObject = Handle(GEOMImpl_LineDriver)((Handle(GEOMImpl_LineDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_LineDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_LineDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_LineDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_LineDriver);
class Handle(GEOMImpl_LineDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_LineDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_LineDriver)(const Handle(GEOMImpl_LineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_LineDriver)(const GEOMImpl_LineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_LineDriver)& operator=(const Handle(GEOMImpl_LineDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_LineDriver)& operator=(const GEOMImpl_LineDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_LineDriver* operator->()
{
return (GEOMImpl_LineDriver *)ControlAccess();
}
GEOMImpl_LineDriver* operator->() const
{
return (GEOMImpl_LineDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_LineDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_LineDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_LineDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_LineDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_LineDriver, GEOM_BaseDriver );
class GEOMImpl_LineDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_LineDriver(); Standard_EXPORT GEOMImpl_LineDriver();
@ -148,13 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_LineDriver() {}; Standard_EXPORT ~GEOMImpl_LineDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_LineDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_LineDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_LineDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_LineDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -162,46 +162,50 @@ Standard_Integer GEOMImpl_MarkerDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_MarkerDriver::
//function : GEOMImpl_MarkerDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MarkerDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IMarker aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "LOCAL_CS";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MarkerDriver", case MARKER_CS:
sizeof(GEOMImpl_MarkerDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_MarkerDriver) Handle(GEOMImpl_MarkerDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_MarkerDriver) _anOtherObject; double OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ;
aCI.GetOrigin(OX, OY, OZ);
if (!AnObject.IsNull()) { aCI.GetXDir(XDX, XDY, XDZ);
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MarkerDriver))) { aCI.GetYDir(YDX, YDY, YDZ);
_anOtherObject = Handle(GEOMImpl_MarkerDriver)((Handle(GEOMImpl_MarkerDriver)&)AnObject); AddParam( theParams, "Coordinates of origin" ) << OX << ", " << OY << ", " << OZ;
AddParam( theParams, "X axis direction" ) << XDX << ", " << XDY << ", " << XDZ;
AddParam( theParams, "Y axis direction" ) << YDX << ", " << YDY << ", " << YDZ;
break;
} }
case MARKER_SHAPE:
AddParam( theParams, "Object", aCI.GetShape() );
break;
case MARKER_PNT2VEC:
AddParam( theParams, "Point", aCI.GetOrigin() );
AddParam( theParams, "X axis direction", aCI.GetXVec() );
AddParam( theParams, "Y axis direction", aCI.GetYVec() );
break;
default:
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MarkerDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MarkerDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_MarkerDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MarkerDriver);
class Handle(GEOMImpl_MarkerDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_MarkerDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_MarkerDriver)(const Handle(GEOMImpl_MarkerDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_MarkerDriver)(const GEOMImpl_MarkerDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_MarkerDriver)& operator=(const Handle(GEOMImpl_MarkerDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_MarkerDriver)& operator=(const GEOMImpl_MarkerDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_MarkerDriver* operator->()
{
return (GEOMImpl_MarkerDriver *)ControlAccess();
}
GEOMImpl_MarkerDriver* operator->() const
{
return (GEOMImpl_MarkerDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_MarkerDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_MarkerDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MarkerDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_MarkerDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_MarkerDriver, GEOM_BaseDriver );
class GEOMImpl_MarkerDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_MarkerDriver(); Standard_EXPORT GEOMImpl_MarkerDriver();
@ -148,13 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MarkerDriver() {}; Standard_EXPORT ~GEOMImpl_MarkerDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_MarkerDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MarkerDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MarkerDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MarkerDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -322,45 +322,48 @@ Standard_Integer GEOMImpl_MeasureDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_MeasureDriver::
//function : GEOMImpl_MeasureDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IMeasure aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case CDG_MEASURE:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MeasureDriver", theOperationName = "MASS_CENTER";
sizeof(GEOMImpl_MeasureDriver), AddParam( theParams, "Object", aCI.GetBase() );
1, break;
(Standard_Address)_Ancestors, case BND_BOX_MEASURE:
(Standard_Address)NULL); case BND_BOX_MEASURE_PRECISE:
theOperationName = "BND_BOX";
return _aType; AddParam( theParams, "Object", aCI.GetBase() );
break;
case VERTEX_BY_INDEX:
theOperationName = "GetVertexByIndex";
AddParam( theParams, "Object", aCI.GetBase() );
AddParam( theParams, "Index", aCI.GetIndex() );
break;
case VECTOR_FACE_NORMALE:
theOperationName = "NORMALE";
AddParam( theParams, "Face", aCI.GetBase() );
AddParam( theParams, "Point", aCI.GetPoint(), "face center" );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast }
//purpose : IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
//=======================================================================
const Handle(GEOMImpl_MeasureDriver) Handle(GEOMImpl_MeasureDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_MeasureDriver) _anOtherObject;
if (!AnObject.IsNull()) { IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MeasureDriver))) {
_anOtherObject = Handle(GEOMImpl_MeasureDriver)((Handle(GEOMImpl_MeasureDriver)&)AnObject);
}
}
return _anOtherObject ;
}

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_MeasureDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MeasureDriver);
class Handle(GEOMImpl_MeasureDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_MeasureDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_MeasureDriver)(const Handle(GEOMImpl_MeasureDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_MeasureDriver)(const GEOMImpl_MeasureDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_MeasureDriver)& operator=(const Handle(GEOMImpl_MeasureDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_MeasureDriver)& operator=(const GEOMImpl_MeasureDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_MeasureDriver* operator->()
{
return (GEOMImpl_MeasureDriver *)ControlAccess();
}
GEOMImpl_MeasureDriver* operator->() const
{
return (GEOMImpl_MeasureDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_MeasureDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_MeasureDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MeasureDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_MeasureDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_MeasureDriver, GEOM_BaseDriver );
class GEOMImpl_MeasureDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_MeasureDriver(); Standard_EXPORT GEOMImpl_MeasureDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MeasureDriver() {}; Standard_EXPORT ~GEOMImpl_MeasureDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_MeasureDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MeasureDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MeasureDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -161,46 +161,46 @@ Standard_Integer GEOMImpl_MirrorDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_MirrorDriver::
//function : GEOMImpl_MirrorDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IMirror aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "MIRROR";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MirrorDriver", case MIRROR_PLANE:
sizeof(GEOMImpl_MirrorDriver), case MIRROR_PLANE_COPY:
1, AddParam( theParams, "Object", aCI.GetOriginal() );
(Standard_Address)_Ancestors, AddParam( theParams, "Plane Mirror", aCI.GetPlane() );
(Standard_Address)NULL); break;
case MIRROR_AXIS:
return _aType; case MIRROR_AXIS_COPY:
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Axis Mirror", aCI.GetAxis() );
break;
case MIRROR_POINT:
case MIRROR_POINT_COPY:
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Point Mirror", aCI.GetPoint() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_MirrorDriver) Handle(GEOMImpl_MirrorDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_MirrorDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MirrorDriver))) {
_anOtherObject = Handle(GEOMImpl_MirrorDriver)((Handle(GEOMImpl_MirrorDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MirrorDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MirrorDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_MirrorDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MirrorDriver);
class Handle(GEOMImpl_MirrorDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_MirrorDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_MirrorDriver)(const Handle(GEOMImpl_MirrorDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_MirrorDriver)(const GEOMImpl_MirrorDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_MirrorDriver)& operator=(const Handle(GEOMImpl_MirrorDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_MirrorDriver)& operator=(const GEOMImpl_MirrorDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_MirrorDriver* operator->()
{
return (GEOMImpl_MirrorDriver *)ControlAccess();
}
GEOMImpl_MirrorDriver* operator->() const
{
return (GEOMImpl_MirrorDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_MirrorDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_MirrorDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MirrorDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_MirrorDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_MirrorDriver, GEOM_BaseDriver );
class GEOMImpl_MirrorDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_MirrorDriver(); Standard_EXPORT GEOMImpl_MirrorDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_MirrorDriver() {}; Standard_EXPORT ~GEOMImpl_MirrorDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_MirrorDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MirrorDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MirrorDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -158,45 +158,41 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_OffsetDriver::
//function : GEOMImpl_OffsetDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IOffset aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case OFFSET_SHAPE:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_OffsetDriver", case OFFSET_SHAPE_COPY:
sizeof(GEOMImpl_OffsetDriver), theOperationName = "OFFSET";
1, AddParam( theParams, "Object", aCI.GetShape() );
(Standard_Address)_Ancestors, AddParam( theParams, "Offset", aCI.GetValue() );
(Standard_Address)NULL); break;
case OFFSET_THICKENING:
return _aType; case OFFSET_THICKENING_COPY:
theOperationName = "MakeThickening";
AddParam( theParams, "Object", aCI.GetShape() );
AddParam( theParams, "Offset", aCI.GetValue() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_OffsetDriver) Handle(GEOMImpl_OffsetDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_OffsetDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_OffsetDriver))) {
_anOtherObject = Handle(GEOMImpl_OffsetDriver)((Handle(GEOMImpl_OffsetDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_OffsetDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_OffsetDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_OffsetDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_OffsetDriver);
class Handle(GEOMImpl_OffsetDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_OffsetDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_OffsetDriver)(const Handle(GEOMImpl_OffsetDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_OffsetDriver)(const GEOMImpl_OffsetDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_OffsetDriver)& operator=(const Handle(GEOMImpl_OffsetDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_OffsetDriver)& operator=(const GEOMImpl_OffsetDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_OffsetDriver* operator->()
{
return (GEOMImpl_OffsetDriver *)ControlAccess();
}
GEOMImpl_OffsetDriver* operator->() const
{
return (GEOMImpl_OffsetDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_OffsetDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_OffsetDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_OffsetDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_OffsetDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_OffsetDriver, GEOM_BaseDriver );
class GEOMImpl_OffsetDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_OffsetDriver(); Standard_EXPORT GEOMImpl_OffsetDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_OffsetDriver() {}; Standard_EXPORT ~GEOMImpl_OffsetDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_OffsetDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_OffsetDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_OffsetDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -478,41 +478,54 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_PartitionDriver::
//function : GEOMImpl_PartitionDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[] = {aType1,aType2,aType3,NULL}; GEOMImpl_IPartition aCI( function );
static Handle_Standard_Type _aType = Standard_Integer aType = function->GetType();
new Standard_Type ("GEOMImpl_PartitionDriver", sizeof(GEOMImpl_PartitionDriver),
1, (Standard_Address)_Ancestors, (Standard_Address)NULL);
return _aType; theOperationName = "PARTITION";
}
//======================================================================= switch ( aType ) {
//function : DownCast case PARTITION_PARTITION:
//purpose : case PARTITION_NO_SELF_INTERSECTIONS:
//======================================================================= AddParam( theParams, "Objects", aCI.GetShapes() );
const Handle(GEOMImpl_PartitionDriver) Handle(GEOMImpl_PartitionDriver)::DownCast(const Handle(Standard_Transient)& AnObject) AddParam( theParams, "Tool objects", aCI.GetTools() );
{ {
Handle(GEOMImpl_PartitionDriver) _anOtherObject; Handle(TColStd_HSequenceOfTransient) objSeq = aCI.GetKeepIns();
if ( !objSeq.IsNull() && objSeq->Length() > 0 )
if (!AnObject.IsNull()) { AddParam( theParams, "Objects to keep inside", objSeq );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PartitionDriver))) { objSeq = aCI.GetRemoveIns();
_anOtherObject = Handle(GEOMImpl_PartitionDriver)((Handle(GEOMImpl_PartitionDriver)&)AnObject); if ( !objSeq.IsNull() && objSeq->Length() > 0 )
AddParam( theParams, "Objects to remove inside", objSeq );
Handle(TColStd_HArray1OfInteger) intSeq = aCI.GetMaterials();
if ( !intSeq.IsNull() && intSeq->Length() > 0 )
AddParam( theParams, "Materials", aCI.GetMaterials() );
} }
AddParam( theParams, "Resulting type", (TopAbs_ShapeEnum) aCI.GetLimit());
AddParam( theParams, "Keep shapes of lower type", aCI.GetKeepNonlimitShapes());
AddParam( theParams, "No object intersections", ( aType == PARTITION_NO_SELF_INTERSECTIONS ));
break;
case PARTITION_HALF:
AddParam( theParams, "Object", aCI.GetShape() );
AddParam( theParams, "Plane", aCI.GetPlane() );
break;
default:
return false;
} }
return _anOtherObject; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PartitionDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PartitionDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PartitionDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PartitionDriver);
class Handle(GEOMImpl_PartitionDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PartitionDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PartitionDriver)(const Handle(GEOMImpl_PartitionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PartitionDriver)(const GEOMImpl_PartitionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PartitionDriver)& operator=(const Handle(GEOMImpl_PartitionDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PartitionDriver)& operator=(const GEOMImpl_PartitionDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PartitionDriver* operator->()
{
return (GEOMImpl_PartitionDriver *)ControlAccess();
}
GEOMImpl_PartitionDriver* operator->() const
{
return (GEOMImpl_PartitionDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PartitionDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PartitionDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PartitionDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PartitionDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PartitionDriver, GEOM_BaseDriver );
class GEOMImpl_PartitionDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PartitionDriver(); Standard_EXPORT GEOMImpl_PartitionDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PartitionDriver() {}; Standard_EXPORT ~GEOMImpl_PartitionDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_PartitionDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PartitionDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PartitionDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -2502,42 +2502,75 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
return 1; return 1;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_PipeDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipeDriver_Type_() //================================================================================
bool GEOMImpl_PipeDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); Standard_Integer aType = function->GetType();
if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipeDriver", case PIPE_BASE_PATH:
sizeof(GEOMImpl_PipeDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PipeDriver) Handle(GEOMImpl_PipeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_PipeDriver) _anOtherObject; theOperationName = "PIPE";
GEOMImpl_IPipe aCI( function );
if (!AnObject.IsNull()) { AddParam( theParams, "Base Object", aCI.GetBase() );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipeDriver))) { AddParam( theParams, "Path Object", aCI.GetPath() );
_anOtherObject = Handle(GEOMImpl_PipeDriver)((Handle(GEOMImpl_PipeDriver)&)AnObject); break;
} }
case PIPE_BI_NORMAL_ALONG_VECTOR:
{
theOperationName = "PIPE";
GEOMImpl_IPipeBiNormal aCI( function );
AddParam( theParams, "Base Object", aCI.GetBase() );
AddParam( theParams, "Path Object", aCI.GetPath() );
AddParam( theParams, "BiNormal", aCI.GetVector() );
break;
}
case PIPE_DIFFERENT_SECTIONS:
{
theOperationName = "PIPE";
GEOMImpl_IPipeDiffSect aCI( function );
AddParam( theParams, "Bases", aCI.GetBases() );
AddParam( theParams, "Locations", aCI.GetLocations() );
AddParam( theParams, "Path", aCI.GetPath() );
AddParam( theParams, "With contact", aCI.GetWithContactMode() );
AddParam( theParams, "With correction", aCI.GetWithCorrectionMode() );
break;
}
case PIPE_SHELL_SECTIONS:
{
theOperationName = "PIPE";
GEOMImpl_IPipeShellSect aCI( function );
AddParam( theParams, "Bases", aCI.GetBases() );
AddParam( theParams, "Sub-Bases", aCI.GetSubBases() );
AddParam( theParams, "Locations", aCI.GetLocations() );
AddParam( theParams, "Path", aCI.GetPath() );
AddParam( theParams, "With contact", aCI.GetWithContactMode() );
AddParam( theParams, "With correction", aCI.GetWithCorrectionMode() );
break;
}
case PIPE_SHELLS_WITHOUT_PATH:
{
theOperationName = "PIPE"; // MakePipeShellsWithoutPath
GEOMImpl_IPipeShellSect aCI( function );
AddParam( theParams, "Bases", aCI.GetBases() );
AddParam( theParams, "Locations", aCI.GetLocations() );
break;
}
default:
return false;
} }
return _anOtherObject; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeDriver,GEOM_BaseDriver);

View File

@ -47,69 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PipeDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PipeDriver);
class Handle(GEOMImpl_PipeDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PipeDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PipeDriver)(const Handle(GEOMImpl_PipeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PipeDriver)(const GEOMImpl_PipeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PipeDriver)& operator=(const Handle(GEOMImpl_PipeDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PipeDriver)& operator=(const GEOMImpl_PipeDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PipeDriver* operator->()
{
return (GEOMImpl_PipeDriver *)ControlAccess();
}
GEOMImpl_PipeDriver* operator->() const
{
return (GEOMImpl_PipeDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PipeDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PipeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -127,23 +64,14 @@ class Handle(GEOMImpl_PipeDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PipeDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PipeDriver, GEOM_BaseDriver );
class GEOMImpl_PipeDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PipeDriver(); Standard_EXPORT GEOMImpl_PipeDriver();
@ -161,15 +89,14 @@ public:
const Standard_Boolean theWithContact, const Standard_Boolean theWithContact,
const Standard_Boolean theWithCorrect); const Standard_Boolean theWithCorrect);
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_PipeDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{ return STANDARD_TYPE(GEOMImpl_PipeDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{ return (STANDARD_TYPE(GEOMImpl_PipeDriver) == AType ||
TFunction_Driver::IsKind(AType)); }
}; };

View File

@ -202,42 +202,41 @@ Standard_Integer GEOMImpl_PipePathDriver::Execute (TFunction_Logbook& log) const
return 1; return 1;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_PipePathDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipePathDriver_Type_() //================================================================================
bool GEOMImpl_PipePathDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IPipePath aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipePathDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_PipePathDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; theOperationName = "PIPE_PATH";
switch ( aType ) {
case PIPE_PATH_TWO_BASES:
AddParam( theParams, "Pipe-like object", aCI.GetShape() );
AddParam( theParams, "First base", aCI.GetBase1() );
AddParam( theParams, "Second base", aCI.GetBase2() );
break;
case PIPE_PATH_TWO_SEQS:
AddParam( theParams, "Pipe-like object", aCI.GetShape() );
AddParam( theParams, "First bases", aCI.GetBaseSeq1() );
AddParam( theParams, "Second bases", aCI.GetBaseSeq2() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PipePathDriver) Handle(GEOMImpl_PipePathDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PipePathDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipePathDriver))) {
_anOtherObject = Handle(GEOMImpl_PipePathDriver)((Handle(GEOMImpl_PipePathDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipePathDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipePathDriver,GEOM_BaseDriver);

View File

@ -47,69 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PipePathDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PipePathDriver);
class Handle(GEOMImpl_PipePathDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PipePathDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PipePathDriver)(const Handle(GEOMImpl_PipePathDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PipePathDriver)(const GEOMImpl_PipePathDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PipePathDriver)& operator=(const Handle(GEOMImpl_PipePathDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PipePathDriver)& operator=(const GEOMImpl_PipePathDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PipePathDriver* operator->()
{
return (GEOMImpl_PipePathDriver *)ControlAccess();
}
GEOMImpl_PipePathDriver* operator->() const
{
return (GEOMImpl_PipePathDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PipePathDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PipePathDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -127,23 +64,14 @@ class Handle(GEOMImpl_PipePathDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PipePathDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PipePathDriver, GEOM_BaseDriver );
class GEOMImpl_PipePathDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PipePathDriver(); Standard_EXPORT GEOMImpl_PipePathDriver();
@ -154,14 +82,13 @@ public:
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PipePathDriver() {}; Standard_EXPORT ~GEOMImpl_PipePathDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipePathDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_PipePathDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{ return STANDARD_TYPE(GEOMImpl_PipePathDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{ return (STANDARD_TYPE(GEOMImpl_PipePathDriver) == AType ||
TFunction_Driver::IsKind(AType)); }
}; };

View File

@ -616,41 +616,61 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) con
return 1; return 1;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_PipeTShapeDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipeTShapeDriver_Type_() //================================================================================
bool GEOMImpl_PipeTShapeDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IPipeTShape aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipeTShapeDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_PipeTShapeDriver),
1, theOperationName = "PIPETSHAPE";
(Standard_Address)_Ancestors,
(Standard_Address)NULL); switch ( aType ) {
return _aType; case TSHAPE_BASIC:
AddParam( theParams, "Main radius", aCI.GetR1() );
AddParam( theParams, "Main width", aCI.GetW1() );
AddParam( theParams, "Main half-length", aCI.GetL1() );
AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
AddParam( theParams, "Incident pipe width", aCI.GetW2() );
AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
break;
case TSHAPE_CHAMFER:
AddParam( theParams, "Main radius", aCI.GetR1() );
AddParam( theParams, "Main width", aCI.GetW1() );
AddParam( theParams, "Main half-length", aCI.GetL1() );
AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
AddParam( theParams, "Incident pipe width", aCI.GetW2() );
AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
AddParam( theParams, "Chamfer height", aCI.GetH() );
AddParam( theParams, "Chamfer width", aCI.GetW() );
AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
break;
case TSHAPE_FILLET:
AddParam( theParams, "Main radius", aCI.GetR1() );
AddParam( theParams, "Main width", aCI.GetW1() );
AddParam( theParams, "Main half-length", aCI.GetL1() );
AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
AddParam( theParams, "Incident pipe width", aCI.GetW2() );
AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
AddParam( theParams, "Fillet radius", aCI.GetRF() );
AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PipeTShapeDriver) Handle(GEOMImpl_PipeTShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PipeTShapeDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipeTShapeDriver))) {
_anOtherObject = Handle(GEOMImpl_PipeTShapeDriver)((Handle(GEOMImpl_PipeTShapeDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);

View File

@ -36,72 +36,14 @@
class Handle_Standard_Type; class Handle_Standard_Type;
class GEOMImpl_PipeTShapeDriver; class GEOMImpl_PipeTShapeDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PipeTShapeDriver);
class Handle(GEOMImpl_PipeTShapeDriver) : public Handle(TFunction_Driver) {
#include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PipeTShapeDriver, GEOM_BaseDriver );
class GEOMImpl_PipeTShapeDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PipeTShapeDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PipeTShapeDriver)(const Handle(GEOMImpl_PipeTShapeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{}
Handle(GEOMImpl_PipeTShapeDriver)(const GEOMImpl_PipeTShapeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{}
Handle(GEOMImpl_PipeTShapeDriver)& operator=(const Handle(GEOMImpl_PipeTShapeDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PipeTShapeDriver)& operator=(const GEOMImpl_PipeTShapeDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PipeTShapeDriver* operator->()
{
return (GEOMImpl_PipeTShapeDriver *)ControlAccess();
}
GEOMImpl_PipeTShapeDriver* operator->() const
{
return (GEOMImpl_PipeTShapeDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PipeTShapeDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PipeTShapeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
class GEOMImpl_PipeTShapeDriver : public TFunction_Driver {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PipeTShapeDriver(); Standard_EXPORT GEOMImpl_PipeTShapeDriver();
@ -114,17 +56,13 @@ public:
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {}; Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeTShapeDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_PipeTShapeDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{
return STANDARD_TYPE(GEOMImpl_PipeTShapeDriver);
}
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{
return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType));
}
private: private:
/*! /*!

View File

@ -247,45 +247,62 @@ Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const
} }
//======================================================================= //================================================================================
//function : GEOMImpl_PlaneDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_() //================================================================================
bool GEOMImpl_PlaneDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IPlane aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "PLANE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PlaneDriver", case PLANE_PNT_VEC:
sizeof(GEOMImpl_PlaneDriver), AddParam( theParams, "Point", aCI.GetPoint() );
1, AddParam( theParams, "Vector", aCI.GetVector() );
(Standard_Address)_Ancestors, AddParam( theParams, "Size of plane", aCI.GetSize() );
(Standard_Address)NULL); break;
case PLANE_THREE_PNT:
return _aType; AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
AddParam( theParams, "Point 3", aCI.GetPoint3() );
AddParam( theParams, "Size of plane", aCI.GetSize() );
break;
case PLANE_FACE:
AddParam( theParams, "Face", aCI.GetFace() );
AddParam( theParams, "Size of plane", aCI.GetSize() );
break;
case PLANE_TANGENT_FACE:
AddParam( theParams, "Face", aCI.GetFace() );
AddParam( theParams, "Parameter U", aCI.GetParameterU() );
AddParam( theParams, "Parameter V", aCI.GetParameterV() );
AddParam( theParams, "Size of plane", aCI.GetSize() );
break;
case PLANE_2_VEC:
AddParam( theParams, "Vector 1", aCI.GetVector1() );
AddParam( theParams, "Vector 2", aCI.GetVector2() );
AddParam( theParams, "Size of plane", aCI.GetSize() );
break;
case PLANE_LCS:
AddParam( theParams, "Local coordinate system", aCI.GetLCS() );
AddParam( theParams, "Orientation", aCI.GetOrientation() );
AddParam( theParams, "Size of plane", aCI.GetSize() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PlaneDriver) Handle(GEOMImpl_PlaneDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PlaneDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PlaneDriver))) {
_anOtherObject = Handle(GEOMImpl_PlaneDriver)((Handle(GEOMImpl_PlaneDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PlaneDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PlaneDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PlaneDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PlaneDriver);
class Handle(GEOMImpl_PlaneDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PlaneDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PlaneDriver)(const Handle(GEOMImpl_PlaneDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PlaneDriver)(const GEOMImpl_PlaneDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PlaneDriver)& operator=(const Handle(GEOMImpl_PlaneDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PlaneDriver)& operator=(const GEOMImpl_PlaneDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PlaneDriver* operator->()
{
return (GEOMImpl_PlaneDriver *)ControlAccess();
}
GEOMImpl_PlaneDriver* operator->() const
{
return (GEOMImpl_PlaneDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PlaneDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PlaneDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PlaneDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PlaneDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PlaneDriver, GEOM_BaseDriver );
class GEOMImpl_PlaneDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PlaneDriver(); Standard_EXPORT GEOMImpl_PlaneDriver();
@ -148,13 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PlaneDriver() {}; Standard_EXPORT ~GEOMImpl_PlaneDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_PlaneDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PlaneDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PlaneDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -360,46 +360,75 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_PointDriver::
//function : GEOMImpl_PointDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PointDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IPoint aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "POINT";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PointDriver", case POINT_XYZ:
sizeof(GEOMImpl_PointDriver), AddParam( theParams, "X", aCI.GetX() );
1, AddParam( theParams, "Y", aCI.GetY() );
(Standard_Address)_Ancestors, AddParam( theParams, "Z", aCI.GetZ() );
(Standard_Address)NULL); break;
case POINT_XYZ_REF:
return _aType; AddParam( theParams, "Point", aCI.GetRef() );
AddParam( theParams, "Dx", aCI.GetX() );
AddParam( theParams, "Dy", aCI.GetY() );
AddParam( theParams, "Dz", aCI.GetZ() );
break;
case POINT_CURVE_PAR:
AddParam( theParams, "Edge", aCI.GetCurve() );
AddParam( theParams, "Parameter", aCI.GetParameter() );
break;
case POINT_CURVE_COORD:
AddParam( theParams, "X", aCI.GetX() );
AddParam( theParams, "Y", aCI.GetY() );
AddParam( theParams, "Z", aCI.GetZ() );
AddParam( theParams, "Edge", aCI.GetCurve() );
break;
case POINT_CURVE_LENGTH:
AddParam( theParams, "Edge", aCI.GetCurve() );
AddParam( theParams, "Start Point", aCI.GetRef(), "First Vertex" );
AddParam( theParams, "Length", aCI.GetLength() );
break;
case POINT_SURFACE_PAR:
AddParam( theParams, "Face", aCI.GetSurface() );
AddParam( theParams, "U-Parameter", aCI.GetParameter() );
AddParam( theParams, "V-Parameter", aCI.GetParameter2() );
break;
case POINT_SURFACE_COORD:
AddParam( theParams, "X", aCI.GetX() );
AddParam( theParams, "Y", aCI.GetY() );
AddParam( theParams, "Z", aCI.GetZ() );
AddParam( theParams, "Face", aCI.GetSurface() );
break;
case POINT_FACE_ANY:
AddParam( theParams, "Face", aCI.GetSurface() );
break;
case POINT_LINES_INTERSECTION:
AddParam( theParams, "Line 1", aCI.GetLine1() );
AddParam( theParams, "Line 2", aCI.GetLine2() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PointDriver) Handle(GEOMImpl_PointDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PointDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PointDriver))) {
_anOtherObject = Handle(GEOMImpl_PointDriver)((Handle(GEOMImpl_PointDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PointDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PointDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PointDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PointDriver);
class Handle(GEOMImpl_PointDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PointDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PointDriver)(const Handle(GEOMImpl_PointDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PointDriver)(const GEOMImpl_PointDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PointDriver)& operator=(const Handle(GEOMImpl_PointDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PointDriver)& operator=(const GEOMImpl_PointDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PointDriver* operator->()
{
return (GEOMImpl_PointDriver *)ControlAccess();
}
GEOMImpl_PointDriver* operator->() const
{
return (GEOMImpl_PointDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PointDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PointDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PointDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PointDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PointDriver, GEOM_BaseDriver );
class GEOMImpl_PointDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PointDriver(); Standard_EXPORT GEOMImpl_PointDriver();
@ -148,13 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PointDriver() {}; Standard_EXPORT ~GEOMImpl_PointDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_PointDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PointDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PointDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PointDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -20,25 +20,24 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
#include <Standard_Stream.hxx> #include "GEOMImpl_PolylineDriver.hxx"
#include <GEOMImpl_PolylineDriver.hxx> #include "GEOMImpl_ICurveParametric.hxx"
#include <GEOMImpl_IPolyline.hxx> #include "GEOMImpl_IPolyline.hxx"
#include <GEOMImpl_Types.hxx> #include "GEOMImpl_Types.hxx"
#include <GEOM_Function.hxx> #include "GEOM_Function.hxx"
#include <TColgp_Array1OfPnt.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx> #include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <Precision.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx> #include <TopoDS_Wire.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
//======================================================================= //=======================================================================
@ -150,45 +149,69 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_PolylineDriver::
//function : GEOMImpl_PolylineDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IPolyline aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICurveParametric aIP( function );
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); Standard_Integer aType = function->GetType();
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "CURVE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PolylineDriver", case POLYLINE_POINTS:
sizeof(GEOMImpl_PolylineDriver), AddParam( theParams, "Type", "Polyline");
1, if ( aIP.HasData() )
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
//=======================================================================
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PolylineDriver) Handle(GEOMImpl_PolylineDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_PolylineDriver) _anOtherObject; AddParam( theParams, "X(t) equation", aIP.GetExprX() );
AddParam( theParams, "Y(t) equation", aIP.GetExprY() );
if (!AnObject.IsNull()) { AddParam( theParams, "Z(t) equation", aIP.GetExprZ() );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PolylineDriver))) { AddParam( theParams, "Min t", aIP.GetParamMin() );
_anOtherObject = Handle(GEOMImpl_PolylineDriver)((Handle(GEOMImpl_PolylineDriver)&)AnObject); AddParam( theParams, "Max t", aIP.GetParamMax() );
if ( aIP.GetParamNbStep() )
AddParam( theParams, "Number of steps", aIP.GetParamNbStep() );
else
AddParam( theParams, "t step", aIP.GetParamStep() );
} }
else
{
GEOM_Param& pntParam = AddParam( theParams, "Points");
if ( aCI.GetConstructorType() == COORD_CONSTRUCTOR )
{
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
if ( coords->Length() > 3 )
pntParam << ( coords->Length() ) / 3 << " points: ";
for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
pntParam << "( " << coords->Value( i++ )
<< ", " << coords->Value( i++ )
<< ", " << coords->Value( i++ ) << " ) ";
}
else
{
if ( aCI.GetLength() > 1 )
pntParam << aCI.GetLength() << " points: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
pntParam << aCI.GetPoint( i ) << " ";
}
AddParam( theParams, "Is closed", aCI.GetIsClosed() );
}
break;
default:
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PolylineDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PolylineDriver);
class Handle(GEOMImpl_PolylineDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PolylineDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PolylineDriver)(const Handle(GEOMImpl_PolylineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PolylineDriver)(const GEOMImpl_PolylineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PolylineDriver)& operator=(const Handle(GEOMImpl_PolylineDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PolylineDriver)& operator=(const GEOMImpl_PolylineDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PolylineDriver* operator->()
{
return (GEOMImpl_PolylineDriver *)ControlAccess();
}
GEOMImpl_PolylineDriver* operator->() const
{
return (GEOMImpl_PolylineDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PolylineDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PolylineDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PolylineDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PolylineDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PolylineDriver, GEOM_BaseDriver );
class GEOMImpl_PolylineDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PolylineDriver(); Standard_EXPORT GEOMImpl_PolylineDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PolylineDriver() {}; Standard_EXPORT ~GEOMImpl_PolylineDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_PolylineDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PolylineDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PolylineDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -219,45 +219,48 @@ Standard_Integer GEOMImpl_PositionDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_PositionDriver::
//function : GEOMImpl_PositionDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PositionDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IPosition aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "MODIFY_LOCATION";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PositionDriver", case POSITION_SHAPE:
sizeof(GEOMImpl_PositionDriver), case POSITION_SHAPE_COPY:
1, AddParam( theParams, "Object", aCI.GetShape() );
(Standard_Address)_Ancestors, AddParam( theParams, "Start LCS", aCI.GetStartLCS() );
(Standard_Address)NULL); AddParam( theParams, "End LCS", aCI.GetEndLCS() );
break;
return _aType; case POSITION_SHAPE_FROM_GLOBAL:
case POSITION_SHAPE_FROM_GLOBAL_COPY:
AddParam( theParams, "Object", aCI.GetShape() );
AddParam( theParams, "End LCS", aCI.GetEndLCS() );
break;
case POSITION_ALONG_PATH:
AddParam( theParams, "Object", aCI.GetShape() );
AddParam( theParams, "Path", aCI.GetPath() );
AddParam( theParams, "Distance", aCI.GetDistance() );
AddParam( theParams, "Reverse Direction", aCI.GetReverse() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PositionDriver) Handle(GEOMImpl_PositionDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PositionDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PositionDriver))) {
_anOtherObject = Handle(GEOMImpl_PositionDriver)((Handle(GEOMImpl_PositionDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PositionDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PositionDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PositionDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PositionDriver);
class Handle(GEOMImpl_PositionDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PositionDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PositionDriver)(const Handle(GEOMImpl_PositionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PositionDriver)(const GEOMImpl_PositionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PositionDriver)& operator=(const Handle(GEOMImpl_PositionDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PositionDriver)& operator=(const GEOMImpl_PositionDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PositionDriver* operator->()
{
return (GEOMImpl_PositionDriver *)ControlAccess();
}
GEOMImpl_PositionDriver* operator->() const
{
return (GEOMImpl_PositionDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PositionDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PositionDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PositionDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PositionDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PositionDriver, GEOM_BaseDriver );
class GEOMImpl_PositionDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_PositionDriver(); Standard_EXPORT GEOMImpl_PositionDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_PositionDriver() {}; Standard_EXPORT ~GEOMImpl_PositionDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_PositionDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PositionDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PositionDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PositionDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -495,44 +495,63 @@ TopoDS_Shape GEOMImpl_PrismDriver::MakeDraftPrism ( const TopoDS_Shape& theInitS
return aShape; return aShape;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_PrismDriver::
//function : GEOMImpl_PrismDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PrismDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IPrism aCI( function );
if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; theOperationName = "EXTRUSION";
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PrismDriver",
sizeof(GEOMImpl_PrismDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; switch ( aType ) {
case PRISM_BASE_VEC_H:
case PRISM_BASE_VEC_H_2WAYS:
AddParam( theParams, "Base", aCI.GetBase() );
AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Height", aCI.GetH() );
AddParam( theParams, "Both Directions", aType == PRISM_BASE_VEC_H_2WAYS );
AddParam( theParams, "Scale base-opposite face", aCI.GetScale() );
break;
case PRISM_BASE_TWO_PNT:
case PRISM_BASE_TWO_PNT_2WAYS:
AddParam( theParams, "Base", aCI.GetBase() );
AddParam( theParams, "Point 1", aCI.GetFirstPoint() );
AddParam( theParams, "Point 2", aCI.GetLastPoint() );
AddParam( theParams, "Both Directions", aType == PRISM_BASE_VEC_H_2WAYS );
AddParam( theParams, "Scale base-opposite face", aCI.GetScale() );
break;
case PRISM_BASE_DXDYDZ:
case PRISM_BASE_DXDYDZ_2WAYS:
AddParam( theParams, "Base", aCI.GetBase() );
AddParam( theParams, "Dx", aCI.GetDX() );
AddParam( theParams, "Dy", aCI.GetDY() );
AddParam( theParams, "Dz", aCI.GetDZ() );
AddParam( theParams, "Both Directions", aType == PRISM_BASE_VEC_H_2WAYS );
AddParam( theParams, "Scale base-opposite face", aCI.GetScale() );
break;
case DRAFT_PRISM_FEATURE:
theOperationName = aCI.GetFuseFlag() ? "EXTRUDED_BOSS" : "EXTRUDED_CUT";
AddParam( theParams, "Initial shape", aCI.GetInitShape() );
AddParam( theParams, "Profile", aCI.GetBase() );
AddParam( theParams, "Height", aCI.GetH() );
AddParam( theParams, "Draft angle", aCI.GetDraftAngle() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_PrismDriver) Handle(GEOMImpl_PrismDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PrismDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PrismDriver))) {
_anOtherObject = Handle(GEOMImpl_PrismDriver)((Handle(GEOMImpl_PrismDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PrismDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PrismDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_PrismDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PrismDriver);
class Handle(GEOMImpl_PrismDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_PrismDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_PrismDriver)(const Handle(GEOMImpl_PrismDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_PrismDriver)(const GEOMImpl_PrismDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_PrismDriver)& operator=(const Handle(GEOMImpl_PrismDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_PrismDriver)& operator=(const GEOMImpl_PrismDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_PrismDriver* operator->()
{
return (GEOMImpl_PrismDriver *)ControlAccess();
}
GEOMImpl_PrismDriver* operator->() const
{
return (GEOMImpl_PrismDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_PrismDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_PrismDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -126,23 +64,14 @@ class Handle(GEOMImpl_PrismDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_PrismDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_PrismDriver, GEOM_BaseDriver );
class GEOMImpl_PrismDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
Standard_EXPORT GEOMImpl_PrismDriver(); Standard_EXPORT GEOMImpl_PrismDriver();
@ -166,12 +95,14 @@ public:
bool isProtrusion, bool isProtrusion,
const TopoDS_Shape& theSupport); const TopoDS_Shape& theSupport);
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PrismDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_PrismDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PrismDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PrismDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };

View File

@ -220,46 +220,35 @@ Standard_Integer GEOMImpl_ProjectionDriver::Execute(TFunction_Logbook& log) cons
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ProjectionDriver::
//function : GEOMImpl_ProjectionDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ProjectionDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IMirror aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "PROJECTION";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ProjectionDriver", case PROJECTION_COPY:
sizeof(GEOMImpl_ProjectionDriver), AddParam( theParams, "Source object", aCI.GetOriginal() );
1, AddParam( theParams, "Target face", aCI.GetPlane() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); default:
return false;
return _aType;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ProjectionDriver) Handle(GEOMImpl_ProjectionDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ProjectionDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ProjectionDriver))) {
_anOtherObject = Handle(GEOMImpl_ProjectionDriver)((Handle(GEOMImpl_ProjectionDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ProjectionDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ProjectionDriver);
class Handle(GEOMImpl_ProjectionDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ProjectionDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ProjectionDriver)(const Handle(GEOMImpl_ProjectionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ProjectionDriver)(const GEOMImpl_ProjectionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ProjectionDriver)& operator=(const Handle(GEOMImpl_ProjectionDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ProjectionDriver)& operator=(const GEOMImpl_ProjectionDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ProjectionDriver* operator->()
{
return (GEOMImpl_ProjectionDriver *)ControlAccess();
}
GEOMImpl_ProjectionDriver* operator->() const
{
return (GEOMImpl_ProjectionDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ProjectionDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ProjectionDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ProjectionDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ProjectionDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ProjectionDriver, GEOM_BaseDriver );
class GEOMImpl_ProjectionDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ProjectionDriver(); Standard_EXPORT GEOMImpl_ProjectionDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ProjectionDriver() {}; Standard_EXPORT ~GEOMImpl_ProjectionDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ProjectionDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ProjectionDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ProjectionDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ProjectionDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -138,45 +138,38 @@ Standard_Integer GEOMImpl_RevolutionDriver::Execute(TFunction_Logbook& log) cons
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_RevolutionDriver::
//function : GEOMImpl_RevolutionDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IRevolution aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "REVOLUTION";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RevolutionDriver", case REVOLUTION_BASE_AXIS_ANGLE:
sizeof(GEOMImpl_RevolutionDriver), case REVOLUTION_BASE_AXIS_ANGLE_2WAYS:
1, AddParam( theParams, "Object", aCI.GetBase() );
(Standard_Address)_Ancestors, AddParam( theParams, "Axis", aCI.GetAxis() );
(Standard_Address)NULL); AddParam( theParams, "Angle", aCI.GetAngle() );
AddParam( theParams, "Both Directions", aType == REVOLUTION_BASE_AXIS_ANGLE_2WAYS );
return _aType; break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_RevolutionDriver) Handle(GEOMImpl_RevolutionDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_RevolutionDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_RevolutionDriver))) {
_anOtherObject = Handle(GEOMImpl_RevolutionDriver)((Handle(GEOMImpl_RevolutionDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_RevolutionDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_RevolutionDriver);
class Handle(GEOMImpl_RevolutionDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_RevolutionDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_RevolutionDriver)(const Handle(GEOMImpl_RevolutionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_RevolutionDriver)(const GEOMImpl_RevolutionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_RevolutionDriver)& operator=(const Handle(GEOMImpl_RevolutionDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_RevolutionDriver)& operator=(const GEOMImpl_RevolutionDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_RevolutionDriver* operator->()
{
return (GEOMImpl_RevolutionDriver *)ControlAccess();
}
GEOMImpl_RevolutionDriver* operator->() const
{
return (GEOMImpl_RevolutionDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_RevolutionDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_RevolutionDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_RevolutionDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_RevolutionDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_RevolutionDriver, GEOM_BaseDriver );
class GEOMImpl_RevolutionDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_RevolutionDriver(); Standard_EXPORT GEOMImpl_RevolutionDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_RevolutionDriver() {}; Standard_EXPORT ~GEOMImpl_RevolutionDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_RevolutionDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_RevolutionDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_RevolutionDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -316,43 +316,66 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_RotateDriver::
//function : GEOMImpl_RotateDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_IRotate aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_RotateDriver),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; switch ( aType ) {
case ROTATE:
case ROTATE_COPY:
theOperationName = "ROTATION";
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Axis", aCI.GetAxis() );
AddParam( theParams, "Angle", aCI.GetAngle() );
break;
case ROTATE_THREE_POINTS:
case ROTATE_THREE_POINTS_COPY:
theOperationName = "ROTATION";
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Central Point", aCI.GetCentPoint() );
AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
break;
case ROTATE_1D:
theOperationName = "MUL_ROTATION";
AddParam( theParams, "Main Object", aCI.GetOriginal() );
AddParam( theParams, "Axis", aCI.GetAxis(), "DZ" );
AddParam( theParams, "Nb. Times", aCI.GetNbIter1() );
break;
case ROTATE_1D_STEP:
theOperationName = "MUL_ROTATION";
AddParam( theParams, "Main Object", aCI.GetOriginal() );
AddParam( theParams, "Axis", aCI.GetAxis(), "DZ" );
AddParam( theParams, "Angular step", aCI.GetAngle() );
AddParam( theParams, "Nb. Times", aCI.GetNbIter1() );
break;
case ROTATE_2D:
theOperationName = "MUL_ROTATION";
AddParam( theParams, "Main Object", aCI.GetOriginal() );
AddParam( theParams, "Axis", aCI.GetAxis(), "DZ" );
AddParam( theParams, "Angular step", aCI.GetAngle() );
AddParam( theParams, "Angular Nb. Times", aCI.GetNbIter1() );
AddParam( theParams, "Radial step", aCI.GetStep() );
AddParam( theParams, "Radial Nb. Times", aCI.GetNbIter2() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_RotateDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_RotateDriver))) {
_anOtherObject = Handle(GEOMImpl_RotateDriver)((Handle(GEOMImpl_RotateDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_RotateDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RotateDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_RotateDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_RotateDriver);
class Handle(GEOMImpl_RotateDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_RotateDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_RotateDriver)(const Handle(GEOMImpl_RotateDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_RotateDriver)(const GEOMImpl_RotateDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_RotateDriver)& operator=(const Handle(GEOMImpl_RotateDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_RotateDriver)& operator=(const GEOMImpl_RotateDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_RotateDriver* operator->()
{
return (GEOMImpl_RotateDriver *)ControlAccess();
}
GEOMImpl_RotateDriver* operator->() const
{
return (GEOMImpl_RotateDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_RotateDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_RotateDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_RotateDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_RotateDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_RotateDriver, GEOM_BaseDriver );
class GEOMImpl_RotateDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_RotateDriver(); Standard_EXPORT GEOMImpl_RotateDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_RotateDriver() {}; Standard_EXPORT ~GEOMImpl_RotateDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_RotateDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_RotateDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_RotateDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_RotateDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -196,45 +196,45 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ScaleDriver::
//function : GEOMImpl_ScaleDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IScale aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "SCALE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ScaleDriver", case SCALE_SHAPE:
sizeof(GEOMImpl_ScaleDriver), case SCALE_SHAPE_COPY:
1, AddParam( theParams, "Object", aCI.GetShape() );
(Standard_Address)_Ancestors, AddParam( theParams, "Central Point", aCI.GetPoint(), "origin" );
(Standard_Address)NULL); AddParam( theParams, "Scale Factor", aCI.GetFactor() );
break;
return _aType; case SCALE_SHAPE_AXES:
case SCALE_SHAPE_AXES_COPY:
AddParam( theParams, "Object", aCI.GetShape() );
AddParam( theParams, "Central Point", aCI.GetPoint(), "origin" );
AddParam( theParams, "Scale Factor X", aCI.GetFactorX() );
AddParam( theParams, "Scale Factor Y", aCI.GetFactorY() );
AddParam( theParams, "Scale Factor Z", aCI.GetFactorZ() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ScaleDriver) Handle(GEOMImpl_ScaleDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ScaleDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ScaleDriver))) {
_anOtherObject = Handle(GEOMImpl_ScaleDriver)((Handle(GEOMImpl_ScaleDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ScaleDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ScaleDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ScaleDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ScaleDriver);
class Handle(GEOMImpl_ScaleDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ScaleDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ScaleDriver)(const Handle(GEOMImpl_ScaleDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ScaleDriver)(const GEOMImpl_ScaleDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ScaleDriver)& operator=(const Handle(GEOMImpl_ScaleDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ScaleDriver)& operator=(const GEOMImpl_ScaleDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ScaleDriver* operator->()
{
return (GEOMImpl_ScaleDriver *)ControlAccess();
}
GEOMImpl_ScaleDriver* operator->() const
{
return (GEOMImpl_ScaleDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ScaleDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ScaleDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ScaleDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ScaleDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ScaleDriver, GEOM_BaseDriver );
class GEOMImpl_ScaleDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ScaleDriver(); Standard_EXPORT GEOMImpl_ScaleDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ScaleDriver() {}; Standard_EXPORT ~GEOMImpl_ScaleDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ScaleDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ScaleDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ScaleDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -974,48 +974,88 @@ TopoDS_Edge GEOMImpl_ShapeDriver::MakeEdgeFromWire(const TopoDS_Shape& aWire,
return ResEdge; return ResEdge;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_ShapeDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_() //================================================================================
bool GEOMImpl_ShapeDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IShapes aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case WIRE_EDGES:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ShapeDriver", theOperationName = "WIRE";
sizeof(GEOMImpl_ShapeDriver), AddParam( theParams, "Wires/edges", aCI.GetShapes() );
1, AddParam( theParams, "Tolerance", aCI.GetTolerance() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case FACE_WIRE:
theOperationName = "FACE";
return _aType; AddParam( theParams, "Wire/edge", aCI.GetBase() );
} AddParam( theParams, "Is planar wanted", aCI.GetIsPlanar() );
break;
//======================================================================= case FACE_WIRES:
//function : DownCast theOperationName = "FACE";
//purpose : AddParam( theParams, "Wires/edges", aCI.GetShapes() );
//======================================================================= AddParam( theParams, "Is planar wanted", aCI.GetIsPlanar() );
const Handle(GEOMImpl_ShapeDriver) Handle(GEOMImpl_ShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) break;
case SHELL_FACES:
theOperationName = "SHELL";
AddParam( theParams, "Objects", aCI.GetShapes() );
break;
case SOLID_SHELL:
case SOLID_SHELLS:
theOperationName = "SOLID";
AddParam( theParams, "Objects", aCI.GetShapes() );
break;
case COMPOUND_SHAPES:
theOperationName = "COMPOUND";
AddParam( theParams, "Objects", aCI.GetShapes() );
break;
case EDGE_WIRE:
theOperationName = "EDGE";
AddParam( theParams, "Wire", aCI.GetBase() );
AddParam( theParams, "Linear Tolerance", aCI.GetTolerance() );
AddParam( theParams, "Angular Tolerance", aCI.GetAngularTolerance() );
break;
case EDGE_CURVE_LENGTH:
theOperationName = "EDGE";
{ {
Handle(GEOMImpl_ShapeDriver) _anOtherObject; GEOMImpl_IVector aCI( function );
AddParam( theParams, "Edge", aCI.GetPoint1() );
if (!AnObject.IsNull()) { AddParam( theParams, "Start point", aCI.GetPoint2() );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ShapeDriver))) { AddParam( theParams, "Length", aCI.GetParameter() );
_anOtherObject = Handle(GEOMImpl_ShapeDriver)((Handle(GEOMImpl_ShapeDriver)&)AnObject);
} }
break;
case SHAPES_ON_SHAPE:
{
theOperationName = "GetShapesOnShapeAsCompound";
Handle(TColStd_HSequenceOfTransient) shapes = aCI.GetShapes();
if ( !shapes.IsNull() && shapes->Length() > 0 )
AddParam( theParams, "Check shape", shapes->Value(1) );
if ( !shapes.IsNull() && shapes->Length() > 1 )
AddParam( theParams, "Shape", shapes->Value(2) );
AddParam( theParams, "Shape type", TopAbs_ShapeEnum( aCI.GetSubShapeType() ));
AddParam( theParams, "State", TopAbs_State( aCI.GetTolerance() ));
break;
}
default:
return false;
} }
return _anOtherObject; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ShapeDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ShapeDriver,GEOM_BaseDriver);
//modified by NIZNHY-PKV Wed Dec 28 13:48:31 2011f //modified by NIZNHY-PKV Wed Dec 28 13:48:31 2011f
#include <TopoDS_Iterator.hxx> #include <TopoDS_Iterator.hxx>
#include <TopTools_HSequenceOfShape.hxx> #include <TopTools_HSequenceOfShape.hxx>

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ShapeDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ShapeDriver);
class Handle(GEOMImpl_ShapeDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ShapeDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ShapeDriver)(const Handle(GEOMImpl_ShapeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ShapeDriver)(const GEOMImpl_ShapeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ShapeDriver)& operator=(const Handle(GEOMImpl_ShapeDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ShapeDriver)& operator=(const GEOMImpl_ShapeDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ShapeDriver* operator->()
{
return (GEOMImpl_ShapeDriver *)ControlAccess();
}
GEOMImpl_ShapeDriver* operator->() const
{
return (GEOMImpl_ShapeDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ShapeDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ShapeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -127,23 +65,14 @@ class Handle(GEOMImpl_ShapeDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ShapeDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ShapeDriver, GEOM_BaseDriver );
class GEOMImpl_ShapeDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ShapeDriver(); Standard_EXPORT GEOMImpl_ShapeDriver();
@ -161,12 +90,14 @@ public:
Standard_EXPORT static TopoDS_Wire MakeWireFromEdges Standard_EXPORT static TopoDS_Wire MakeWireFromEdges
(const Handle(TColStd_HSequenceOfTransient)& theEdgesFuncs, (const Handle(TColStd_HSequenceOfTransient)& theEdgesFuncs,
const Standard_Real theTolerance); const Standard_Real theTolerance);
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_ShapeDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ShapeDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ShapeDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };

View File

@ -131,45 +131,50 @@ Standard_Integer GEOMImpl_SketcherDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_SketcherDriver::
//function : GEOMImpl_SketcherDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ISketcher aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "SKETCH";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SketcherDriver", case SKETCHER_NINE_DOUBLS:
sizeof(GEOMImpl_SketcherDriver), AddParam( theParams, "Command", aCI.GetCommand() );
1, AddParam( theParams, "Origin")
(Standard_Address)_Ancestors, << aCI.GetWorkingPlane(1) << " "
(Standard_Address)NULL); << aCI.GetWorkingPlane(2) << " "
<< aCI.GetWorkingPlane(3);
return _aType; AddParam( theParams, "OZ")
<< aCI.GetWorkingPlane(4) << " "
<< aCI.GetWorkingPlane(5) << " "
<< aCI.GetWorkingPlane(6);
AddParam( theParams, "OX")
<< aCI.GetWorkingPlane(7) << " "
<< aCI.GetWorkingPlane(8) << " "
<< aCI.GetWorkingPlane(9);
break;
case SKETCHER_PLANE:
AddParam( theParams, "Command", aCI.GetCommand() );
AddParam( theParams, "Working plane", aCI.GetWorkingPlane(), "XOY" );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_SketcherDriver) Handle(GEOMImpl_SketcherDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_SketcherDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SketcherDriver))) {
_anOtherObject = Handle(GEOMImpl_SketcherDriver)((Handle(GEOMImpl_SketcherDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SketcherDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SketcherDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_SketcherDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SketcherDriver);
class Handle(GEOMImpl_SketcherDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_SketcherDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_SketcherDriver)(const Handle(GEOMImpl_SketcherDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_SketcherDriver)(const GEOMImpl_SketcherDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_SketcherDriver)& operator=(const Handle(GEOMImpl_SketcherDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_SketcherDriver)& operator=(const GEOMImpl_SketcherDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_SketcherDriver* operator->()
{
return (GEOMImpl_SketcherDriver *)ControlAccess();
}
GEOMImpl_SketcherDriver* operator->() const
{
return (GEOMImpl_SketcherDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_SketcherDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_SketcherDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SketcherDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_SketcherDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_SketcherDriver, GEOM_BaseDriver );
class GEOMImpl_SketcherDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_SketcherDriver(); Standard_EXPORT GEOMImpl_SketcherDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SketcherDriver() {}; Standard_EXPORT ~GEOMImpl_SketcherDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_SketcherDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SketcherDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SketcherDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -193,41 +193,38 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
return 1; return 1;
} }
//======================================================================= //================================================================================
//function : GEOMImpl_SmoothingSurfaceDriver_Type_ /*!
//purpose : * \brief Returns a name of creation operation and names and values of creation parameters
//======================================================================= */
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_() //================================================================================
bool GEOMImpl_SmoothingSurfaceDriver::
GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& theParams)
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); if (Label().IsNull()) return 0;
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; GEOMImpl_ISmoothingSurface aCI( function );
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SmoothingSurfaceDriver", Standard_Integer aType = function->GetType();
sizeof(GEOMImpl_SmoothingSurfaceDriver),
1, theOperationName = "SMOOTHINGSURFACE";
(Standard_Address)_Ancestors,
(Standard_Address)NULL); switch ( aType ) {
return _aType; case SMOOTHINGSURFACE_LPOINTS:
AddParam( theParams, "Points" );
if ( aCI.GetLength() > 1 )
theParams[1] << aCI.GetLength() << " points: ";
for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
theParams[0] << aCI.GetPoint( i ) << " ";
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_SmoothingSurfaceDriver) Handle(GEOMImpl_SmoothingSurfaceDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_SmoothingSurfaceDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver))) {
_anOtherObject = Handle(GEOMImpl_SmoothingSurfaceDriver)((Handle(GEOMImpl_SmoothingSurfaceDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);

View File

@ -37,72 +37,14 @@
class Handle_Standard_Type; class Handle_Standard_Type;
class GEOMImpl_SmoothingSurfaceDriver; class GEOMImpl_SmoothingSurfaceDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver);
class Handle(GEOMImpl_SmoothingSurfaceDriver) : public Handle(TFunction_Driver) {
#include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_SmoothingSurfaceDriver, GEOM_BaseDriver );
class GEOMImpl_SmoothingSurfaceDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_SmoothingSurfaceDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_SmoothingSurfaceDriver)(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{}
Handle(GEOMImpl_SmoothingSurfaceDriver)(const GEOMImpl_SmoothingSurfaceDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{}
Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const GEOMImpl_SmoothingSurfaceDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_SmoothingSurfaceDriver* operator->()
{
return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess();
}
GEOMImpl_SmoothingSurfaceDriver* operator->() const
{
return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_SmoothingSurfaceDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_SmoothingSurfaceDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
class GEOMImpl_SmoothingSurfaceDriver : public TFunction_Driver {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver(); Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver();
@ -115,17 +57,13 @@ public:
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {}; Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_(); DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver )
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
{
return STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver);
}
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{
return (STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver) == AType || TFunction_Driver::IsKind(AType));
}
private: private:
TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const; TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const;
}; };

View File

@ -102,45 +102,38 @@ Standard_Integer GEOMImpl_SphereDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_SphereDriver::
//function : GEOMImpl_SphereDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SphereDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ISphere aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "SPHERE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SphereDriver", case SPHERE_R:
sizeof(GEOMImpl_SphereDriver), AddParam( theParams, "Radius", aCI.GetR() );
1, break;
(Standard_Address)_Ancestors, case SPHERE_PNT_R:
(Standard_Address)NULL); AddParam( theParams, "Center", aCI.GetPoint() );
AddParam( theParams, "Radius", aCI.GetR() );
return _aType; break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_SphereDriver) Handle(GEOMImpl_SphereDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_SphereDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SphereDriver))) {
_anOtherObject = Handle(GEOMImpl_SphereDriver)((Handle(GEOMImpl_SphereDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SphereDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SphereDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_SphereDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SphereDriver);
class Handle(GEOMImpl_SphereDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_SphereDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_SphereDriver)(const Handle(GEOMImpl_SphereDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_SphereDriver)(const GEOMImpl_SphereDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_SphereDriver)& operator=(const Handle(GEOMImpl_SphereDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_SphereDriver)& operator=(const GEOMImpl_SphereDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_SphereDriver* operator->()
{
return (GEOMImpl_SphereDriver *)ControlAccess();
}
GEOMImpl_SphereDriver* operator->() const
{
return (GEOMImpl_SphereDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_SphereDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_SphereDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SphereDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_SphereDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_SphereDriver, GEOM_BaseDriver );
class GEOMImpl_SphereDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_SphereDriver(); Standard_EXPORT GEOMImpl_SphereDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SphereDriver() {}; Standard_EXPORT ~GEOMImpl_SphereDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_SphereDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SphereDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SphereDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SphereDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -20,13 +20,14 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
#include <GEOMImpl_SplineDriver.hxx> #include "GEOMImpl_SplineDriver.hxx"
#include <GEOMImpl_ISpline.hxx> #include "GEOMImpl_ISpline.hxx"
#include <GEOMImpl_Types.hxx> #include "GEOMImpl_Types.hxx"
#include "GEOMImpl_ICurveParametric.hxx"
#include <GEOM_Function.hxx> #include "GEOM_Function.hxx"
#include <GEOMUtils.hxx> #include "GEOMUtils.hxx"
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBuilderAPI_MakeVertex.hxx>
@ -40,7 +41,6 @@
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <Geom_BezierCurve.hxx> #include <Geom_BezierCurve.hxx>
//#include <GeomAPI_PointsToBSpline.hxx>
#include <GeomAPI_Interpolate.hxx> #include <GeomAPI_Interpolate.hxx>
#include <gp.hxx> #include <gp.hxx>
@ -50,8 +50,6 @@
#include <TColgp_Array1OfPnt.hxx> #include <TColgp_Array1OfPnt.hxx>
#include <TColgp_HArray1OfPnt.hxx> #include <TColgp_HArray1OfPnt.hxx>
#include <Standard_Stream.hxx>
#include <Standard_NullObject.hxx> #include <Standard_NullObject.hxx>
//======================================================================= //=======================================================================
@ -268,45 +266,72 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_SplineDriver::
//function : GEOMImpl_SplineDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SplineDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ISpline aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ICurveParametric aPI( function );
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); Standard_Integer aType = function->GetType();
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "CURVE";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SplineDriver", case SPLINE_BEZIER:
sizeof(GEOMImpl_SplineDriver), case SPLINE_INTERPOLATION:
1, case SPLINE_INTERPOL_TANGENTS:
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType; AddParam( theParams, "Type", ( aType == SPLINE_BEZIER ? "Bezier" : "Interpolation"));
}
//======================================================================= if ( aPI.HasData() )
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_SplineDriver) Handle(GEOMImpl_SplineDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{ {
Handle(GEOMImpl_SplineDriver) _anOtherObject; AddParam( theParams, "X(t) equation", aPI.GetExprX() );
AddParam( theParams, "Y(t) equation", aPI.GetExprY() );
if (!AnObject.IsNull()) { AddParam( theParams, "Z(t) equation", aPI.GetExprZ() );
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SplineDriver))) { AddParam( theParams, "Min t", aPI.GetParamMin() );
_anOtherObject = Handle(GEOMImpl_SplineDriver)((Handle(GEOMImpl_SplineDriver)&)AnObject); AddParam( theParams, "Max t", aPI.GetParamMax() );
if ( aPI.GetParamNbStep() )
AddParam( theParams, "Number of steps", aPI.GetParamNbStep() );
else
AddParam( theParams, "t step", aPI.GetParamStep() );
} }
else
{
if ( aCI.GetConstructorType() == COORD_CONSTRUCTOR )
{
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
GEOM_Param& pntParam = AddParam( theParams, "Points");
pntParam << ( coords->Length() ) / 3 << " points: ";
for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
pntParam << "( " << coords->Value( i++ )
<< ", " << coords->Value( i++ )
<< ", " << coords->Value( i++ ) << " ) ";
}
else
{
AddParam( theParams, "Points", aCI.GetPoints() );
}
Handle(GEOM_Function) v1 = aCI.GetFirstVector();
Handle(GEOM_Function) v2 = aCI.GetLastVector();
if ( !v1.IsNull() ) AddParam( theParams, "First tangent vector", v1 );
if ( !v2.IsNull() ) AddParam( theParams, "Last tangent vector", v2 );
}
break;
default:
return false;
} }
return _anOtherObject ; return true;
} }
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SplineDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_SplineDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SplineDriver);
class Handle(GEOMImpl_SplineDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_SplineDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_SplineDriver)(const Handle(GEOMImpl_SplineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_SplineDriver)(const GEOMImpl_SplineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_SplineDriver)& operator=(const Handle(GEOMImpl_SplineDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_SplineDriver)& operator=(const GEOMImpl_SplineDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_SplineDriver* operator->()
{
return (GEOMImpl_SplineDriver *)ControlAccess();
}
GEOMImpl_SplineDriver* operator->() const
{
return (GEOMImpl_SplineDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_SplineDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_SplineDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SplineDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_SplineDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_SplineDriver, GEOM_BaseDriver );
class GEOMImpl_SplineDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_SplineDriver(); Standard_EXPORT GEOMImpl_SplineDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_SplineDriver() {}; Standard_EXPORT ~GEOMImpl_SplineDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_SplineDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SplineDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SplineDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SplineDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -154,45 +154,38 @@ Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(TFunction_Logbook& log) co
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_ThruSectionsDriver::
//function : GEOMImpl_ThruSectionsDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ThruSectionsDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IThruSections aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "MakeThruSections";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ThruSectionsDriver", case THRUSECTIONS_RULED:
sizeof(GEOMImpl_ThruSectionsDriver), case THRUSECTIONS_SMOOTHED:
1, AddParam( theParams, "Sections", aCI.GetSections() );
(Standard_Address)_Ancestors, AddParam( theParams, "Is solid", aCI.GetSolidMode() );
(Standard_Address)NULL); AddParam( theParams, "Precision", aCI.GetPrecision() );
AddParam( theParams, "Is ruled", aType == THRUSECTIONS_RULED );
return _aType; break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_ThruSectionsDriver) Handle(GEOMImpl_ThruSectionsDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_ThruSectionsDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ThruSectionsDriver))) {
_anOtherObject = Handle(GEOMImpl_ThruSectionsDriver)((Handle(GEOMImpl_ThruSectionsDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);

View File

@ -50,69 +50,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_ThruSectionsDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ThruSectionsDriver);
class Handle(GEOMImpl_ThruSectionsDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_ThruSectionsDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_ThruSectionsDriver)(const Handle(GEOMImpl_ThruSectionsDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_ThruSectionsDriver)(const GEOMImpl_ThruSectionsDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_ThruSectionsDriver)& operator=(const Handle(GEOMImpl_ThruSectionsDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_ThruSectionsDriver)& operator=(const GEOMImpl_ThruSectionsDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_ThruSectionsDriver* operator->()
{
return (GEOMImpl_ThruSectionsDriver *)ControlAccess();
}
GEOMImpl_ThruSectionsDriver* operator->() const
{
return (GEOMImpl_ThruSectionsDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_ThruSectionsDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_ThruSectionsDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -126,23 +63,14 @@ class Handle(GEOMImpl_ThruSectionsDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_ThruSectionsDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_ThruSectionsDriver, GEOM_BaseDriver );
class GEOMImpl_ThruSectionsDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_ThruSectionsDriver(); Standard_EXPORT GEOMImpl_ThruSectionsDriver();
@ -152,14 +80,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ThruSectionsDriver() {}; Standard_EXPORT ~GEOMImpl_ThruSectionsDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_ThruSectionsDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ThruSectionsDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ThruSectionsDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ThruSectionsDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -120,45 +120,41 @@ Standard_Integer GEOMImpl_TorusDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_TorusDriver::
//function : GEOMImpl_TorusDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_TorusDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ITorus aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
theOperationName = "TORUS";
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TorusDriver", case TORUS_RR:
sizeof(GEOMImpl_TorusDriver), AddParam( theParams, "Radius 1", aCI.GetRMajor() );
1, AddParam( theParams, "Radius 2", aCI.GetRMinor() );
(Standard_Address)_Ancestors, break;
(Standard_Address)NULL); case TORUS_PNT_VEC_RR:
AddParam( theParams, "Base Point", aCI.GetCenter() );
return _aType; AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Radius 1", aCI.GetRMajor() );
AddParam( theParams, "Radius 2", aCI.GetRMinor() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_TorusDriver) Handle(GEOMImpl_TorusDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_TorusDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_TorusDriver))) {
_anOtherObject = Handle(GEOMImpl_TorusDriver)((Handle(GEOMImpl_TorusDriver)&)AnObject);
}
} }
return _anOtherObject ; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_TorusDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TorusDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_TorusDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_TorusDriver);
class Handle(GEOMImpl_TorusDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_TorusDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_TorusDriver)(const Handle(GEOMImpl_TorusDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_TorusDriver)(const GEOMImpl_TorusDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_TorusDriver)& operator=(const Handle(GEOMImpl_TorusDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_TorusDriver)& operator=(const GEOMImpl_TorusDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_TorusDriver* operator->()
{
return (GEOMImpl_TorusDriver *)ControlAccess();
}
GEOMImpl_TorusDriver* operator->() const
{
return (GEOMImpl_TorusDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_TorusDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_TorusDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_TorusDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_TorusDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_TorusDriver, GEOM_BaseDriver );
class GEOMImpl_TorusDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_TorusDriver(); Standard_EXPORT GEOMImpl_TorusDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_TorusDriver() {}; Standard_EXPORT ~GEOMImpl_TorusDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_TorusDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_TorusDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_TorusDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_TorusDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -277,44 +277,73 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_TranslateDriver::
//function : GEOMImpl_TranslateDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_ITranslate aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; switch ( aType ) {
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver", case TRANSLATE_TWO_POINTS:
sizeof(GEOMImpl_TranslateDriver), case TRANSLATE_TWO_POINTS_COPY:
1, theOperationName = "TRANSLATION";
(Standard_Address)_Ancestors, AddParam( theParams, "Object", aCI.GetOriginal() );
(Standard_Address)NULL); AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
return _aType; break;
case TRANSLATE_VECTOR:
case TRANSLATE_VECTOR_COPY:
theOperationName = "TRANSLATION";
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Vector", aCI.GetVector() );
break;
case TRANSLATE_VECTOR_DISTANCE:
theOperationName = "TRANSLATION";
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Vector", aCI.GetVector() );
AddParam( theParams, "Distance", aCI.GetDistance() );
break;
case TRANSLATE_XYZ:
case TRANSLATE_XYZ_COPY:
theOperationName = "TRANSLATION";
AddParam( theParams, "Object", aCI.GetOriginal() );
AddParam( theParams, "Dx", aCI.GetDX() );
AddParam( theParams, "Dy", aCI.GetDY() );
AddParam( theParams, "Dz", aCI.GetDZ() );
break;
case TRANSLATE_1D:
theOperationName = "MUL_TRANSLATION";
AddParam( theParams, "Main Object", aCI.GetOriginal() );
AddParam( theParams, "Vector", aCI.GetVector(), "DX" );
AddParam( theParams, "Step", aCI.GetStep1() );
AddParam( theParams, "Nb. Times", aCI.GetNbIter1() );
break;
case TRANSLATE_2D:
theOperationName = "MUL_TRANSLATION";
AddParam( theParams, "Main Object", aCI.GetOriginal() );
AddParam( theParams, "Vector U", aCI.GetVector(), "DX" );
AddParam( theParams, "Vector V", aCI.GetVector2(), "DY" );
AddParam( theParams, "Step U", aCI.GetStep1() );
AddParam( theParams, "Nb. Times U", aCI.GetNbIter1() );
AddParam( theParams, "Step V", aCI.GetStep2() );
AddParam( theParams, "Nb. Times V", aCI.GetNbIter2() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_TranslateDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_TranslateDriver))) {
_anOtherObject = Handle(GEOMImpl_TranslateDriver)((Handle(GEOMImpl_TranslateDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_TranslateDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TranslateDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_TranslateDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_TranslateDriver);
class Handle(GEOMImpl_TranslateDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_TranslateDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_TranslateDriver)(const Handle(GEOMImpl_TranslateDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_TranslateDriver)(const GEOMImpl_TranslateDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_TranslateDriver)& operator=(const Handle(GEOMImpl_TranslateDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_TranslateDriver)& operator=(const GEOMImpl_TranslateDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_TranslateDriver* operator->()
{
return (GEOMImpl_TranslateDriver *)ControlAccess();
}
GEOMImpl_TranslateDriver* operator->() const
{
return (GEOMImpl_TranslateDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_TranslateDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_TranslateDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_TranslateDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_TranslateDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_TranslateDriver, GEOM_BaseDriver );
class GEOMImpl_TranslateDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_TranslateDriver(); Standard_EXPORT GEOMImpl_TranslateDriver();
@ -148,14 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_TranslateDriver() {}; Standard_EXPORT ~GEOMImpl_TranslateDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_TranslateDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_TranslateDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_TranslateDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif

View File

@ -20,28 +20,27 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
#include <Standard_Stream.hxx> #include "GEOMImpl_VectorDriver.hxx"
#include <GEOMImpl_VectorDriver.hxx> #include "GEOMImpl_IVector.hxx"
#include <GEOMImpl_IVector.hxx> #include "GEOMImpl_Types.hxx"
#include <GEOMImpl_Types.hxx> #include "GEOM_Function.hxx"
#include <GEOM_Function.hxx> #include "GEOM_Object.hxx"
#include <BRep_Tool.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRep_Tool.hxx>
#include <Geom_Curve.hxx>
#include <Precision.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopAbs.hxx> #include <TopAbs.hxx>
#include <TopExp.hxx> #include <TopExp.hxx>
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <TopoDS_Edge.hxx> #include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <Precision.hxx>
#include <Geom_Curve.hxx>
#include <gp_Vec.hxx> #include <gp_Vec.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_ConstructionError.hxx> #include <Standard_ConstructionError.hxx>
//======================================================================= //=======================================================================
@ -156,46 +155,55 @@ Standard_Integer GEOMImpl_VectorDriver::Execute(TFunction_Logbook& log) const
return 1; return 1;
} }
//================================================================================
/*!
* \brief Returns a name of creation operation and names and values of creation parameters
*/
//================================================================================
//======================================================================= bool GEOMImpl_VectorDriver::
//function : GEOMImpl_VectorDriver_Type_ GetCreationInformation(std::string& theOperationName,
//purpose : std::vector<GEOM_Param>& theParams)
//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_VectorDriver_Type_()
{ {
if (Label().IsNull()) return 0;
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); GEOMImpl_IVector aCI( function );
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); Standard_Integer aType = function->GetType();
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
switch ( aType ) {
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; case VECTOR_DX_DY_DZ:
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_VectorDriver", theOperationName = "VECTOR";
sizeof(GEOMImpl_VectorDriver), AddParam( theParams, "Dx", aCI.GetDX() );
1, AddParam( theParams, "Dy", aCI.GetDY() );
(Standard_Address)_Ancestors, AddParam( theParams, "Dz", aCI.GetDZ() );
(Standard_Address)NULL); break;
case VECTOR_TWO_PNT: {
return _aType; TDF_Label label = Label();
Handle(GEOM_Object) obj = GEOM_Object::GetObject( label );
if ( !obj.IsNull() && obj->GetType() == GEOM_EDGE )
theOperationName = "EDGE";
else
theOperationName = "VECTOR";
AddParam( theParams, "Point 1", aCI.GetPoint1() );
AddParam( theParams, "Point 2", aCI.GetPoint2() );
break;
}
case VECTOR_TANGENT_CURVE_PAR:
theOperationName = "MakeTangentOnCurve";
AddParam( theParams, "Curve", aCI.GetCurve() );
AddParam( theParams, "Parameter", aCI.GetParameter() );
break;
case VECTOR_REVERSE:
theOperationName = "CHANGE_ORIENTATION";
AddParam( theParams, "Vector", aCI.GetCurve() );
break;
default:
return false;
} }
//======================================================================= return true;
//function : DownCast
//purpose :
//=======================================================================
const Handle(GEOMImpl_VectorDriver) Handle(GEOMImpl_VectorDriver)::DownCast
(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_VectorDriver) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_VectorDriver))) {
_anOtherObject = Handle(GEOMImpl_VectorDriver)((Handle(GEOMImpl_VectorDriver)&)AnObject);
}
} }
return _anOtherObject; IMPLEMENT_STANDARD_HANDLE (GEOMImpl_VectorDriver,GEOM_BaseDriver);
} IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_VectorDriver,GEOM_BaseDriver);

View File

@ -47,68 +47,6 @@
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
#ifndef _Handle_TFunction_Driver_HeaderFile
#include <Handle_TFunction_Driver.hxx>
#endif
class Standard_Transient;
class Handle_Standard_Type;
class Handle(TFunction_Driver);
class GEOMImpl_VectorDriver;
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_VectorDriver);
class Handle(GEOMImpl_VectorDriver) : public Handle(TFunction_Driver) {
public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Handle(GEOMImpl_VectorDriver)():Handle(TFunction_Driver)() {}
Handle(GEOMImpl_VectorDriver)(const Handle(GEOMImpl_VectorDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
{
}
Handle(GEOMImpl_VectorDriver)(const GEOMImpl_VectorDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
{
}
Handle(GEOMImpl_VectorDriver)& operator=(const Handle(GEOMImpl_VectorDriver)& aHandle)
{
Assign(aHandle.Access());
return *this;
}
Handle(GEOMImpl_VectorDriver)& operator=(const GEOMImpl_VectorDriver* anItem)
{
Assign((Standard_Transient *)anItem);
return *this;
}
GEOMImpl_VectorDriver* operator->()
{
return (GEOMImpl_VectorDriver *)ControlAccess();
}
GEOMImpl_VectorDriver* operator->() const
{
return (GEOMImpl_VectorDriver *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOMImpl_VectorDriver)() {};
Standard_EXPORT static const Handle(GEOMImpl_VectorDriver) DownCast(const Handle(Standard_Transient)& AnObject);
};
#ifndef _TFunction_Driver_HeaderFile #ifndef _TFunction_Driver_HeaderFile
#include <TFunction_Driver.hxx> #include <TFunction_Driver.hxx>
#endif #endif
@ -122,23 +60,14 @@ class Handle(GEOMImpl_VectorDriver) : public Handle(TFunction_Driver) {
class TColStd_SequenceOfExtendedString; class TColStd_SequenceOfExtendedString;
class GEOMImpl_VectorDriver : public TFunction_Driver { #include "GEOM_BaseDriver.hxx"
DEFINE_STANDARD_HANDLE( GEOMImpl_VectorDriver, GEOM_BaseDriver );
class GEOMImpl_VectorDriver : public GEOM_BaseDriver {
public: public:
inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
inline void* operator new(size_t size)
{
return Standard::Allocate(size);
}
inline void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOMImpl_VectorDriver(); Standard_EXPORT GEOMImpl_VectorDriver();
@ -148,13 +77,11 @@ Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { r
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_VectorDriver() {}; Standard_EXPORT ~GEOMImpl_VectorDriver() {};
Standard_EXPORT virtual
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
// Type management DEFINE_STANDARD_RTTI( GEOMImpl_VectorDriver )
//
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_VectorDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_VectorDriver) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_VectorDriver) == AType || TFunction_Driver::IsKind(AType)); }
}; };
#endif #endif