mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
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:
parent
1fc45b2209
commit
c7ffbf7b4e
@ -323,45 +323,47 @@ Standard_Integer GEOMImpl_3DSketcherDriver::Execute(TFunction_Logbook& log) cons
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_3DSketcherDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_3DSketcherDriver_Type_()
|
||||
bool GEOMImpl_3DSketcherDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_I3DSketcher aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "3DSKETCH";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_3DSketcherDriver",
|
||||
sizeof(GEOMImpl_3DSketcherDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
if (aType == SKETCHER3D_COORDS)
|
||||
{
|
||||
theParams.resize( 1 );
|
||||
theParams[0].Set( "(X,Y,Z)" );
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_3DSketcherDriver) Handle(GEOMImpl_3DSketcherDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_3DSketcherDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_3DSketcherDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_3DSketcherDriver)((Handle(GEOMImpl_3DSketcherDriver)&)AnObject);
|
||||
}
|
||||
Handle(TColStd_HArray1OfReal) aCoordsArray = aCI.GetCoordinates();
|
||||
int anArrayLength = aCoordsArray->Length();
|
||||
for (int i = 0; i <= (anArrayLength-3); i += 3)
|
||||
theParams[0] << "( "
|
||||
<< aCoordsArray->Value(i+1) << ", "
|
||||
<< aCoordsArray->Value(i+2) << ", "
|
||||
<< aCoordsArray->Value(i+3) << " ) ";
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
else if (aType == SKETCHER3D_COMMAND)
|
||||
{
|
||||
AddParam( theParams, "Command", aCI.GetCommand() );
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);
|
||||
|
@ -44,70 +44,12 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _Handle_TFunction_Driver_HeaderFile
|
||||
#include <Handle_TFunction_Driver.hxx>
|
||||
#endif
|
||||
#include <GEOM_BaseDriver.hxx>
|
||||
|
||||
class Standard_Transient;
|
||||
class Handle_Standard_Type;
|
||||
class Handle(TFunction_Driver);
|
||||
class GEOMImpl_3DSketcherDriver;
|
||||
DEFINE_STANDARD_HANDLE( GEOMImpl_3DSketcherDriver, GEOM_BaseDriver );
|
||||
|
||||
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_3DSketcherDriver);
|
||||
|
||||
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>
|
||||
#ifndef _GEOM_BaseDriver_HeaderFile
|
||||
#include <GEOM_BaseDriver.hxx>
|
||||
#endif
|
||||
#ifndef _TFunction_Logbook_HeaderFile
|
||||
#include <TFunction_Logbook.hxx>
|
||||
@ -116,26 +58,11 @@ class Handle(GEOMImpl_3DSketcherDriver) : public Handle(TFunction_Driver) {
|
||||
#include <Standard_CString.hxx>
|
||||
#endif
|
||||
|
||||
class TColStd_SequenceOfExtendedString;
|
||||
|
||||
|
||||
class GEOMImpl_3DSketcherDriver : public TFunction_Driver {
|
||||
class GEOMImpl_3DSketcherDriver : public GEOM_BaseDriver {
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_3DSketcherDriver() {};
|
||||
|
||||
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_3DSketcherDriver_Type_();
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_3DSketcherDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -162,45 +162,48 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ArcDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArcDriver_Type_()
|
||||
bool GEOMImpl_ArcDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IArc aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArcDriver",
|
||||
sizeof(GEOMImpl_ArcDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "ARC";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case CIRC_ARC_THREE_PNT:
|
||||
AddParam( theParams, "Point 1", aCI.GetPoint1() );
|
||||
AddParam( theParams, "Point 2", aCI.GetPoint2() );
|
||||
AddParam( theParams, "Point 3", aCI.GetPoint3() );
|
||||
break;
|
||||
case CIRC_ARC_CENTER:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ArcDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ArcDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ArcDriver() {};
|
||||
|
||||
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ArcDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -147,46 +147,33 @@ Standard_Integer GEOMImpl_ArchimedeDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ArchimedeDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_()
|
||||
bool GEOMImpl_ArchimedeDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IArchimede IA (function);
|
||||
Standard_Integer aType = function->GetType();
|
||||
if (aType != ARCHIMEDE_TYPE) return 0;
|
||||
|
||||
theOperationName = "ARCHIMEDE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArchimedeDriver",
|
||||
sizeof(GEOMImpl_ArchimedeDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
AddParam( theParams, "Objects", IA.GetBasicShape() );
|
||||
AddParam( theParams, "Weight", IA.GetWeight() );
|
||||
AddParam( theParams, "Water Density", IA.GetDensity() );
|
||||
AddParam( theParams, "Meshing Deflect.", IA.GetDeflection() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
|
||||
|
||||
const Handle(GEOMImpl_ArchimedeDriver) Handle(GEOMImpl_ArchimedeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_ArchimedeDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ArchimedeDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_ArchimedeDriver)((Handle(GEOMImpl_ArchimedeDriver)&)AnObject);
|
||||
}
|
||||
}
|
||||
|
||||
return _anOtherObject;
|
||||
}
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ArchimedeDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ArchimedeDriver() {};
|
||||
|
||||
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ArchimedeDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1063,45 +1063,99 @@ void GEOMImpl_BlockDriver::MultiTransformate2D (const TopoDS_Shape& theBlock,
|
||||
theResult = aCompound;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_BlockDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BlockDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
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);
|
||||
Standard_Integer aType = function->GetType();
|
||||
GEOMImpl_IBlocks aCI1 (function);
|
||||
GEOMImpl_IBlockTrsf aCI2 (function);
|
||||
Handle(TColStd_HSequenceOfTransient) aShapes = aCI1.GetShapes();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BlockDriver",
|
||||
sizeof(GEOMImpl_BlockDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case BLOCK_FACE_FOUR_EDGES:
|
||||
theOperationName = "Q_FACE";
|
||||
AddParam( theParams, "Edge 1", aShapes->Value(1) );
|
||||
AddParam( theParams, "Edge 2", aShapes->Value(2) );
|
||||
AddParam( theParams, "Edge 3", aShapes->Value(3) );
|
||||
AddParam( theParams, "Edge 4", aShapes->Value(4) );
|
||||
break;
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BlockDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -123,23 +61,14 @@ class Handle(GEOMImpl_BlockDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_BlockDriver() {};
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
private:
|
||||
void MultiTransformate1D (const TopoDS_Shape& theBlock,
|
||||
@ -172,6 +97,8 @@ private:
|
||||
const Standard_Integer theNbIterV,
|
||||
TopoDS_Shape& theResult) const;
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_BlockDriver )
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -510,42 +510,63 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
||||
return aShape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_BooleanDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_BooleanDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BooleanDriver",
|
||||
sizeof(GEOMImpl_BooleanDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IBoolean aCI (function);
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
|
||||
|
@ -47,10 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _Handle_TFunction_Driver_HeaderFile
|
||||
#include <Handle_TFunction_Driver.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _TopoDS_Shape_HeaderFile
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#endif
|
||||
@ -61,58 +57,7 @@ class Handle_Standard_Type;
|
||||
class Handle(TFunction_Driver);
|
||||
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
|
||||
#include <TFunction_Driver.hxx>
|
||||
@ -127,23 +72,14 @@ class Handle(GEOMImpl_BooleanDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_BooleanDriver() {};
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
private:
|
||||
|
||||
@ -167,6 +98,7 @@ private:
|
||||
const TopoDS_Shape theShape2,
|
||||
const Standard_Integer theType) const;
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_BooleanDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -121,45 +121,42 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_BoxDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_BoxDriver_Type_()
|
||||
bool GEOMImpl_BoxDriver::GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
|
||||
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);
|
||||
GEOMImpl_IBox aBI (aFunction);
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
theOperationName = "BOX";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
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;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BoxDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_BoxDriver)((Handle(GEOMImpl_BoxDriver)&)AnObject);
|
||||
}
|
||||
if (aType == BOX_DX_DY_DZ)
|
||||
{
|
||||
AddParam( theParams, "Dx", aBI.GetDX() );
|
||||
AddParam( theParams, "Dy", aBI.GetDY() );
|
||||
AddParam( theParams, "Dz", aBI.GetDZ() );
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
else if (aType == BOX_TWO_PNT)
|
||||
{
|
||||
AddParam( theParams, "Point 1", aBI.GetRef1() );
|
||||
AddParam( theParams, "Point 2", aBI.GetRef2() );
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_BoxDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_BoxDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_BoxDriver() {};
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationNameName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_BoxDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -286,43 +286,91 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ChamferDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ChamferDriver_Type_()
|
||||
bool GEOMImpl_ChamferDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ChamferDriver",
|
||||
sizeof(GEOMImpl_ChamferDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IChamfer aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "CHAMFER";
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ChamferDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ChamferDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ChamferDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ChamferDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -192,45 +192,47 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_CircleDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CircleDriver_Type_()
|
||||
bool GEOMImpl_CircleDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ICircle aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "CIRCLE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CircleDriver",
|
||||
sizeof(GEOMImpl_CircleDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case CIRCLE_PNT_VEC_R:
|
||||
AddParam( theParams, "Center Point", aCI.GetCenter(), "Origin" );
|
||||
AddParam( theParams, "Vector", aCI.GetVector(), "Z axis" );
|
||||
AddParam( theParams, "Radius", aCI.GetRadius() );
|
||||
break;
|
||||
case CIRCLE_CENTER_TWO_PNT:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CircleDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CircleDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_CircleDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_CircleDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -143,45 +143,44 @@ Standard_Integer GEOMImpl_ConeDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ConeDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ConeDriver_Type_()
|
||||
bool GEOMImpl_ConeDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ICone aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "CONE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ConeDriver",
|
||||
sizeof(GEOMImpl_ConeDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case CONE_R1_R2_H:
|
||||
AddParam( theParams, "Radius 1", aCI.GetR1() );
|
||||
AddParam( theParams, "Radius 2", aCI.GetR2() );
|
||||
AddParam( theParams, "Height", aCI.GetH() );
|
||||
break;
|
||||
case CONE_PNT_VEC_R1_R2_H:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ConeDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ConeDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ConeDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ConeDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -20,12 +20,11 @@
|
||||
// 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_Types.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include "GEOMImpl_CopyDriver.hxx"
|
||||
#include "GEOMImpl_ICopy.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
#include "GEOM_Function.hxx"
|
||||
#include "GEOM_Object.hxx"
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
@ -92,45 +91,44 @@ Standard_Integer GEOMImpl_CopyDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_CopyDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CopyDriver_Type_()
|
||||
bool GEOMImpl_CopyDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_ICopy aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CopyDriver",
|
||||
sizeof(GEOMImpl_CopyDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_CopyDriver) Handle(GEOMImpl_CopyDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_CopyDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CopyDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_CopyDriver)((Handle(GEOMImpl_CopyDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case COPY_WITH_REF:
|
||||
theOperationName = "MakeCopy";
|
||||
AddParam( theParams, "Original", aCI.GetOriginal() );
|
||||
break;
|
||||
case COPY_WITHOUT_REF:
|
||||
{
|
||||
theOperationName = "RestoreShape";
|
||||
TDF_Label label = Label();
|
||||
Handle(GEOM_Object) obj = GEOM_Object::GetObject(label);
|
||||
if ( !obj.IsNull() && obj->GetType() == GEOM_FREE_BOUNDS )
|
||||
theOperationName = "CHECK_FREE_BNDS";
|
||||
break;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CopyDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CopyDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_CopyDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_CopyDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -126,45 +126,42 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_CylinderDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_()
|
||||
bool GEOMImpl_CylinderDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ICylinder aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "CYLINDER";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CylinderDriver",
|
||||
sizeof(GEOMImpl_CylinderDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case CYLINDER_R_H:
|
||||
AddParam( theParams, "Radius", aCI.GetR() );
|
||||
AddParam( theParams, "Height", aCI.GetH() );
|
||||
break;
|
||||
case CONE_PNT_VEC_R1_R2_H:
|
||||
AddParam( theParams, "Base Point", aCI.GetPoint() );
|
||||
AddParam( theParams, "Vector", aCI.GetVector() );
|
||||
AddParam( theParams, "Radius", aCI.GetR() );
|
||||
AddParam( theParams, "Height", aCI.GetH() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CylinderDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_CylinderDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_CylinderDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_CylinderDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -159,45 +159,45 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_DiskDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_DiskDriver_Type_()
|
||||
bool GEOMImpl_DiskDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IDisk aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_DiskDriver",
|
||||
sizeof(GEOMImpl_DiskDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "DISK";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_DiskDriver) Handle(GEOMImpl_DiskDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_DiskDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_DiskDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_DiskDriver)((Handle(GEOMImpl_DiskDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case DISK_PNT_VEC_R:
|
||||
AddParam( theParams, "Center Point", aCI.GetCenter() );
|
||||
AddParam( theParams, "Vector", aCI.GetVector() );
|
||||
AddParam( theParams, "Radius", aCI.GetRadius() );
|
||||
break;
|
||||
case DISK_THREE_PNT:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DiskDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DiskDriver,GEOM_BaseDriver);
|
||||
|
@ -44,68 +44,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -119,23 +57,14 @@ class Handle(GEOMImpl_DiskDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_DiskDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_DiskDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -485,41 +485,43 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape,
|
||||
return aTransformation.Shape();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_DividedDiskDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_DividedDiskDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_DividedDiskDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_DividedDiskDriver",
|
||||
sizeof(GEOMImpl_DividedDiskDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
return _aType;
|
||||
}
|
||||
GEOMImpl_IDividedDisk aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_DividedDiskDriver) Handle(GEOMImpl_DividedDiskDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_DividedDiskDriver) _anOtherObject;
|
||||
theOperationName = "DIVIDEDDISK";
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_DividedDiskDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_DividedDiskDriver)((Handle(GEOMImpl_DividedDiskDriver)&)AnObject);
|
||||
}
|
||||
switch ( 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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
|
||||
|
@ -33,73 +33,13 @@ class gp_Pnt;
|
||||
class gp_Dir;
|
||||
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:
|
||||
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 virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
@ -110,25 +50,18 @@ public:
|
||||
}
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {};
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_DividedDiskDriver_Type_();
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
private:
|
||||
TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) 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_Shell MakeDiskHexagon (double R, double Ratio) const;
|
||||
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_DividedDiskDriver )
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_DividedDiskDriver_HXX
|
||||
|
@ -159,45 +159,38 @@ Standard_Integer GEOMImpl_EllipseDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_EllipseDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_()
|
||||
bool GEOMImpl_EllipseDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IEllipse aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_EllipseDriver",
|
||||
sizeof(GEOMImpl_EllipseDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "ELLIPSE";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case ELLIPSE_PNT_VEC_RR:
|
||||
AddParam( theParams, "Center", aCI.GetCenter(), "Origin" );
|
||||
AddParam( theParams, "Vector", aCI.GetVector(), "Z axis" );
|
||||
AddParam( theParams, "Major Axis", aCI.GetVectorMajor(), "X axis");
|
||||
AddParam( theParams, "Major radius", aCI.GetRMajor() );
|
||||
AddParam( theParams, "Minor radius", aCI.GetRMinor() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_EllipseDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_EllipseDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_EllipseDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_EllipseDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_EllipseDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -126,45 +126,18 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const
|
||||
return res;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ExportDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ExportDriver_Type_()
|
||||
bool GEOMImpl_ExportDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//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 ;
|
||||
}
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ExportDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ExportDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ExportDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ExportDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ExportDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -123,45 +123,48 @@ Standard_Integer GEOMImpl_FaceDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_FaceDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FaceDriver_Type_()
|
||||
bool GEOMImpl_FaceDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IFace aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "RECTANGLE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FaceDriver",
|
||||
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;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FaceDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_FaceDriver)((Handle(GEOMImpl_FaceDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case FACE_OBJ_H_W:
|
||||
{
|
||||
Handle(GEOM_Function) aRefFunct = aCI.GetRef1();
|
||||
TopoDS_Shape aRefShape = aRefFunct->GetValue();
|
||||
if (aRefShape.ShapeType() == TopAbs_EDGE)
|
||||
AddParam( theParams, "Edge", aRefFunct );
|
||||
else
|
||||
AddParam( theParams, "Face", aRefFunct );
|
||||
AddParam( theParams, "Height", aCI.GetH() );
|
||||
AddParam( theParams, "Width", aCI.GetW() );
|
||||
break;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
case FACE_H_W:
|
||||
AddParam( theParams, "Height", aCI.GetH() );
|
||||
AddParam( theParams, "Width", aCI.GetW() );
|
||||
AddParam( theParams, "Orientation", aCI.GetOrientation() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FaceDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FaceDriver,GEOM_BaseDriver);
|
||||
|
@ -44,68 +44,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -119,23 +57,14 @@ class Handle(GEOMImpl_FaceDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_FaceDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_FaceDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -367,44 +367,41 @@ bool GEOMImpl_Fillet1dDriver::MakeFillet(const TopoDS_Wire& aWire,
|
||||
|
||||
return isAllStepsOk;
|
||||
}
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_Fillet1dDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet1dDriver_Type_()
|
||||
bool GEOMImpl_Fillet1dDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet1dDriver",
|
||||
sizeof(GEOMImpl_Fillet1dDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IFillet1d aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "FILLET_1D";
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet1dDriver,GEOM_BaseDriver);
|
||||
|
@ -44,10 +44,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _Handle_TFunction_Driver_HeaderFile
|
||||
#include <Handle_TFunction_Driver.hxx>
|
||||
#endif
|
||||
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
|
||||
@ -56,58 +52,7 @@ class Handle_Standard_Type;
|
||||
class Handle(TFunction_Driver);
|
||||
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
|
||||
#include <TFunction_Driver.hxx>
|
||||
@ -122,24 +67,15 @@ class Handle(GEOMImpl_Fillet1dDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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 Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_Fillet1dDriver_Type_();
|
||||
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)); }
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
private:
|
||||
|
||||
Standard_EXPORT bool MakeFillet(const TopoDS_Wire&, const TopTools_ListOfShape&,
|
||||
const Standard_Real, bool, TopoDS_Wire&) const;
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_Fillet1dDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -179,44 +179,40 @@ Standard_Integer GEOMImpl_Fillet2dDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_Fillet2dDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet2dDriver_Type_()
|
||||
bool GEOMImpl_Fillet2dDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet2dDriver",
|
||||
sizeof(GEOMImpl_Fillet2dDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IFillet2d aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "FILLET_2D";
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_Fillet2dDriver,GEOM_BaseDriver);
|
||||
|
@ -44,68 +44,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -119,23 +57,14 @@ class Handle(GEOMImpl_Fillet2dDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_Fillet2dDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_Fillet2dDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -157,45 +157,67 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_FilletDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FilletDriver_Type_()
|
||||
bool GEOMImpl_FilletDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IFillet aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "FILLET";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FilletDriver",
|
||||
sizeof(GEOMImpl_FilletDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case FILLET_SHAPE_ALL:
|
||||
AddParam( theParams, "Main Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Selected edges", "all" );
|
||||
break;
|
||||
case FILLET_SHAPE_EDGES:
|
||||
case FILLET_SHAPE_EDGES_2R:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FilletDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FilletDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_FilletDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_FilletDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_FilletDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -386,44 +386,47 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_FillingDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_FillingDriver_Type_()
|
||||
bool GEOMImpl_FillingDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FillingDriver",
|
||||
sizeof(GEOMImpl_FillingDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IFilling aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "FILLING";
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_FillingDriver) Handle(GEOMImpl_FillingDriver)::DownCast
|
||||
(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_FillingDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FillingDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_FillingDriver)((Handle(GEOMImpl_FillingDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case BASIC_FILLING:
|
||||
{
|
||||
AddParam( theParams, "Input compound", aCI.GetShape() );
|
||||
AddParam( theParams, "Method", aCI.GetMethod() );
|
||||
const char* method[3] =
|
||||
{ "Standard", "Use edges orientation", "Correct edges orientation" };
|
||||
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);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_FillingDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_FillingDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_FillingDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -456,7 +456,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape
|
||||
const TopTools_ListOfShape& aLSS = aIDMSS.FindFromIndex(i);
|
||||
aItLS.Initialize(aLSS);
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
const TopoDS_Shape& aSs = aItLS.Value();
|
||||
const TopoDS_Shape& aSs = aItLS.Value();
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -756,8 +756,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
|
||||
TopoDS_Shape aFace = aRefSh->GetValue();
|
||||
if (aFace.IsNull())
|
||||
continue;
|
||||
if (!aFaces.Contains(aFace))
|
||||
aFaces.Add(aFace);
|
||||
aFaces.Add(aFace);
|
||||
}
|
||||
|
||||
Standard_Boolean aGlueAllEdges = Standard_False;
|
||||
@ -781,44 +780,54 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_GlueDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IGlue aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver",
|
||||
sizeof(GEOMImpl_GlueDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case GLUE_FACES:
|
||||
theOperationName = "GLUE_FACES";
|
||||
AddParam( theParams, "Selected shape", aCI.GetBase() );
|
||||
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
|
||||
AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() );
|
||||
break;
|
||||
case GLUE_EDGES:
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_GlueDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);
|
||||
|
@ -47,69 +47,8 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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>
|
||||
|
||||
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
|
||||
#include <TFunction_Driver.hxx>
|
||||
@ -126,23 +65,14 @@ class Handle(GEOMImpl_GlueDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~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,
|
||||
const Standard_Real theTolerance,
|
||||
const Standard_Boolean doKeepNonSolids = Standard_True);
|
||||
@ -179,13 +113,7 @@ Standard_EXPORT static TopoDS_Shape GlueByList (const TopoDS_Shape& theShape,
|
||||
const Standard_Boolean doGlueAllEdges);
|
||||
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_GlueDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -812,45 +812,105 @@ Standard_Boolean GEOMImpl_HealingDriver::AreEdgesC1 (const TopoDS_Edge& E1, cons
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_HealingDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_HealingDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IHealing aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
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;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_HealingDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_HealingDriver)((Handle(GEOMImpl_HealingDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case SHAPE_PROCESS:
|
||||
{
|
||||
theOperationName = "SHAPE_PROCESS";
|
||||
AddParam( theParams, "Object", aCI.GetOriginal() );
|
||||
Handle(TColStd_HArray1OfExtendedString) anOperators = aCI.GetOperators();
|
||||
Handle(TColStd_HArray1OfExtendedString) aParams = aCI.GetParameters();
|
||||
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;
|
||||
}
|
||||
|
||||
return _anOtherObject;
|
||||
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 true;
|
||||
}
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_HealingDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_HealingDriver,GEOM_BaseDriver);
|
||||
|
@ -46,72 +46,10 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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_Edge.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
|
||||
#include <TFunction_Driver.hxx>
|
||||
@ -123,27 +61,18 @@ class Handle(GEOMImpl_HealingDriver) : public Handle(TFunction_Driver) {
|
||||
#include <Standard_CString.hxx>
|
||||
#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:
|
||||
|
||||
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&,
|
||||
const Handle(TColStd_HSequenceOfTransient)&,
|
||||
TopoDS_Shape&);
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_HealingDriver_Type_();
|
||||
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)); }
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_HealingDriver )
|
||||
|
||||
|
||||
private:
|
||||
Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const;
|
||||
|
@ -183,46 +183,36 @@ TCollection_AsciiString GEOMImpl_ImportDriver::ReadValue(const TCollection_Ascii
|
||||
return aValue;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ImportDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ImportDriver_Type_()
|
||||
bool GEOMImpl_ImportDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IImportExport aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "IMPORT";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ImportDriver",
|
||||
sizeof(GEOMImpl_ImportDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case IMPORT_SHAPE:
|
||||
AddParam( theParams, "File name", aCI.GetFileName() );
|
||||
AddParam( theParams, "Format", aCI.GetFormatName() );
|
||||
AddParam( theParams, "Plugin name", aCI.GetPluginName() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ImportDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ImportDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -124,23 +62,14 @@ class Handle(GEOMImpl_ImportDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ImportDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Static method
|
||||
Standard_EXPORT static TCollection_AsciiString ReadValue (const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& theLibName,
|
||||
const TCollection_AsciiString& theParameterName,
|
||||
TCollection_AsciiString& theError);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ImportDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -182,46 +182,43 @@ Standard_Integer GEOMImpl_LineDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_LineDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_LineDriver_Type_()
|
||||
bool GEOMImpl_LineDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ILine aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "LINE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_LineDriver",
|
||||
sizeof(GEOMImpl_LineDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case LINE_TWO_PNT:
|
||||
AddParam( theParams, "Point 1", aCI.GetPoint1() );
|
||||
AddParam( theParams, "Point 2", aCI.GetPoint2() );
|
||||
break;
|
||||
case LINE_TWO_FACES:
|
||||
AddParam( theParams, "Face 1", aCI.GetFace1() );
|
||||
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 _anOtherObject ;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_LineDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_LineDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_LineDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_LineDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_LineDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -162,46 +162,50 @@ Standard_Integer GEOMImpl_MarkerDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_MarkerDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MarkerDriver_Type_()
|
||||
bool GEOMImpl_MarkerDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IMarker aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "LOCAL_CS";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MarkerDriver",
|
||||
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;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MarkerDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_MarkerDriver)((Handle(GEOMImpl_MarkerDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case MARKER_CS:
|
||||
{
|
||||
double OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ;
|
||||
aCI.GetOrigin(OX, OY, OZ);
|
||||
aCI.GetXDir(XDX, XDY, XDZ);
|
||||
aCI.GetYDir(YDX, YDY, YDZ);
|
||||
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;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
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 true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MarkerDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MarkerDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MarkerDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_MarkerDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_MarkerDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -322,45 +322,48 @@ Standard_Integer GEOMImpl_MeasureDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_MeasureDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_()
|
||||
bool GEOMImpl_MeasureDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IMeasure aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MeasureDriver",
|
||||
sizeof(GEOMImpl_MeasureDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_MeasureDriver) Handle(GEOMImpl_MeasureDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_MeasureDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MeasureDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_MeasureDriver)((Handle(GEOMImpl_MeasureDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case CDG_MEASURE:
|
||||
theOperationName = "MASS_CENTER";
|
||||
AddParam( theParams, "Object", aCI.GetBase() );
|
||||
break;
|
||||
case BND_BOX_MEASURE:
|
||||
case BND_BOX_MEASURE_PRECISE:
|
||||
theOperationName = "BND_BOX";
|
||||
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 _anOtherObject ;
|
||||
return true;
|
||||
}
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MeasureDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MeasureDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_MeasureDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_MeasureDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -161,46 +161,46 @@ Standard_Integer GEOMImpl_MirrorDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_MirrorDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_()
|
||||
bool GEOMImpl_MirrorDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IMirror aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MirrorDriver",
|
||||
sizeof(GEOMImpl_MirrorDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "MIRROR";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case MIRROR_PLANE:
|
||||
case MIRROR_PLANE_COPY:
|
||||
AddParam( theParams, "Object", aCI.GetOriginal() );
|
||||
AddParam( theParams, "Plane Mirror", aCI.GetPlane() );
|
||||
break;
|
||||
case MIRROR_AXIS:
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_MirrorDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_MirrorDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_MirrorDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_MirrorDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_MirrorDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -81,20 +81,20 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
TopoDS_Shape aShape;
|
||||
|
||||
|
||||
Handle(GEOM_Function) aRefShape = aCI.GetShape();
|
||||
TopoDS_Shape aShapeBase = aRefShape->GetValue();
|
||||
Standard_Real anOffset = aCI.GetValue();
|
||||
Standard_Real aTol = Precision::Confusion();
|
||||
|
||||
|
||||
if (Abs(anOffset) < aTol) {
|
||||
TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value (");
|
||||
aMsg += TCollection_AsciiString(aTol);
|
||||
aMsg += ")";
|
||||
StdFail_NotDone::Raise(aMsg.ToCString());
|
||||
TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value (");
|
||||
aMsg += TCollection_AsciiString(aTol);
|
||||
aMsg += ")";
|
||||
StdFail_NotDone::Raise(aMsg.ToCString());
|
||||
}
|
||||
|
||||
if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {
|
||||
if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {
|
||||
BRepOffsetAPI_MakeOffsetShape MO (aShapeBase,
|
||||
aCI.GetValue(),
|
||||
aTol);
|
||||
@ -118,7 +118,7 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
|
||||
else {
|
||||
StdFail_NotDone::Raise("Offset construction failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (aType == OFFSET_THICKENING || aType == OFFSET_THICKENING_COPY)
|
||||
{
|
||||
BRepClass3d_SolidClassifier aClassifier = BRepClass3d_SolidClassifier(aShapeBase);
|
||||
@ -132,13 +132,13 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
|
||||
|
||||
BRepOffset_MakeOffset myOffsetShape(aShapeBase, anOffset, aTol, BRepOffset_Skin,
|
||||
Standard_False, Standard_False, GeomAbs_Intersection, Standard_True);
|
||||
|
||||
|
||||
if (!myOffsetShape.IsDone())
|
||||
{
|
||||
StdFail_NotDone::Raise("Thickening construction failed");
|
||||
}
|
||||
aShape = myOffsetShape.Shape();
|
||||
|
||||
|
||||
// Control the solid orientation. This is mostly done to fix a bug in case of extrusion
|
||||
// of a circle. The built solid is then badly oriented
|
||||
BRepClass3d_SolidClassifier anotherClassifier = BRepClass3d_SolidClassifier(aShape);
|
||||
@ -158,45 +158,41 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_OffsetDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_()
|
||||
bool GEOMImpl_OffsetDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IOffset aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_OffsetDriver",
|
||||
sizeof(GEOMImpl_OffsetDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case OFFSET_SHAPE:
|
||||
case OFFSET_SHAPE_COPY:
|
||||
theOperationName = "OFFSET";
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Offset", aCI.GetValue() );
|
||||
break;
|
||||
case OFFSET_THICKENING:
|
||||
case OFFSET_THICKENING_COPY:
|
||||
theOperationName = "MakeThickening";
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Offset", aCI.GetValue() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_OffsetDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_OffsetDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_OffsetDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_OffsetDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_OffsetDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -478,41 +478,54 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PartitionDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_()
|
||||
bool GEOMImpl_PartitionDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[] = {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType =
|
||||
new Standard_Type ("GEOMImpl_PartitionDriver", sizeof(GEOMImpl_PartitionDriver),
|
||||
1, (Standard_Address)_Ancestors, (Standard_Address)NULL);
|
||||
GEOMImpl_IPartition aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "PARTITION";
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_PartitionDriver) Handle(GEOMImpl_PartitionDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_PartitionDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PartitionDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_PartitionDriver)((Handle(GEOMImpl_PartitionDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case PARTITION_PARTITION:
|
||||
case PARTITION_NO_SELF_INTERSECTIONS:
|
||||
AddParam( theParams, "Objects", aCI.GetShapes() );
|
||||
AddParam( theParams, "Tool objects", aCI.GetTools() );
|
||||
{
|
||||
Handle(TColStd_HSequenceOfTransient) objSeq = aCI.GetKeepIns();
|
||||
if ( !objSeq.IsNull() && objSeq->Length() > 0 )
|
||||
AddParam( theParams, "Objects to keep inside", objSeq );
|
||||
objSeq = aCI.GetRemoveIns();
|
||||
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);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PartitionDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_PartitionDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PartitionDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -2502,42 +2502,75 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PipeDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipeDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_PipeDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipeDriver",
|
||||
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;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipeDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_PipeDriver)((Handle(GEOMImpl_PipeDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case PIPE_BASE_PATH:
|
||||
{
|
||||
theOperationName = "PIPE";
|
||||
GEOMImpl_IPipe aCI( function );
|
||||
AddParam( theParams, "Base Object", aCI.GetBase() );
|
||||
AddParam( theParams, "Path Object", aCI.GetPath() );
|
||||
break;
|
||||
}
|
||||
|
||||
return _anOtherObject;
|
||||
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 true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeDriver,GEOM_BaseDriver);
|
||||
|
@ -47,69 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -127,24 +64,15 @@ class Handle(GEOMImpl_PipeDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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 virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
@ -161,15 +89,14 @@ public:
|
||||
const Standard_Boolean theWithContact,
|
||||
const Standard_Boolean theWithCorrect);
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeDriver_Type_();
|
||||
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)); }
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PipeDriver )
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -202,42 +202,41 @@ Standard_Integer GEOMImpl_PipePathDriver::Execute (TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PipePathDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipePathDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_PipePathDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipePathDriver",
|
||||
sizeof(GEOMImpl_PipePathDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IPipePath aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
theOperationName = "PIPE_PATH";
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipePathDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipePathDriver,GEOM_BaseDriver);
|
||||
|
@ -47,69 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -127,24 +64,15 @@ class Handle(GEOMImpl_PipePathDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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 virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
@ -154,14 +82,13 @@ public:
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_PipePathDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipePathDriver_Type_();
|
||||
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)); }
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PipePathDriver )
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -616,41 +616,61 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) con
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PipeTShapeDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipeTShapeDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_PipeTShapeDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipeTShapeDriver",
|
||||
sizeof(GEOMImpl_PipeTShapeDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
return _aType;
|
||||
}
|
||||
GEOMImpl_IPipeTShape aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_PipeTShapeDriver) Handle(GEOMImpl_PipeTShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_PipeTShapeDriver) _anOtherObject;
|
||||
theOperationName = "PIPETSHAPE";
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipeTShapeDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_PipeTShapeDriver)((Handle(GEOMImpl_PipeTShapeDriver)&)AnObject);
|
||||
}
|
||||
switch ( 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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
|
||||
|
@ -36,73 +36,15 @@
|
||||
class Handle_Standard_Type;
|
||||
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:
|
||||
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 virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
@ -114,17 +56,13 @@ public:
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeTShapeDriver_Type_();
|
||||
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));
|
||||
}
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PipeTShapeDriver )
|
||||
|
||||
private:
|
||||
|
||||
/*!
|
||||
@ -187,9 +125,9 @@ private:
|
||||
// along OX and OZ
|
||||
//=======================================================================
|
||||
void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
|
||||
TopAbs_ShapeEnum theShapeType,
|
||||
TopAbs_ShapeEnum theShapeType,
|
||||
double r, double r2,
|
||||
Handle(TopTools_HSequenceOfShape)& commonShapes) const;
|
||||
Handle(TopTools_HSequenceOfShape)& commonShapes) const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -247,45 +247,62 @@ Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PlaneDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IPlane aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "PLANE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PlaneDriver",
|
||||
sizeof(GEOMImpl_PlaneDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case PLANE_PNT_VEC:
|
||||
AddParam( theParams, "Point", aCI.GetPoint() );
|
||||
AddParam( theParams, "Vector", aCI.GetVector() );
|
||||
AddParam( theParams, "Size of plane", aCI.GetSize() );
|
||||
break;
|
||||
case PLANE_THREE_PNT:
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PlaneDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PlaneDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PlaneDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_PlaneDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PlaneDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -153,16 +153,16 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
|
||||
TopoDS_Iterator It(aRefShape, Standard_False, Standard_False);
|
||||
TopoDS_Vertex aVertex;
|
||||
if ( It.More() ) {
|
||||
TopoDS_Shape aShape = It.Value();
|
||||
if ( !aShape.IsNull() )
|
||||
aVertex = TopoDS::Vertex( aShape );
|
||||
TopoDS_Shape aShape = It.Value();
|
||||
if ( !aShape.IsNull() )
|
||||
aVertex = TopoDS::Vertex( aShape );
|
||||
}
|
||||
if ( !aVertex.IsNull() ) {
|
||||
aPnt = BRep_Tool::Pnt( aVertex );
|
||||
aPnt = BRep_Tool::Pnt( aVertex );
|
||||
}
|
||||
else {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Curve creation aborted : null curve");
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Curve creation aborted : null curve");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -234,8 +234,8 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
|
||||
gp_Pnt P2 = EdgeCurve->Value(par2);
|
||||
|
||||
if (aRefPnt.SquareDistance(P2) < aRefPnt.SquareDistance(P1)) {
|
||||
ReOrientedCurve = EdgeCurve->Reversed();
|
||||
UFirst = EdgeCurve->ReversedParameter(ULast);
|
||||
ReOrientedCurve = EdgeCurve->Reversed();
|
||||
UFirst = EdgeCurve->ReversedParameter(ULast);
|
||||
}
|
||||
|
||||
// Get the point by length
|
||||
@ -249,16 +249,16 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
|
||||
TopoDS_Iterator It(aRefEdge, Standard_False, Standard_False);
|
||||
TopoDS_Vertex aVertex;
|
||||
if ( It.More() ) {
|
||||
TopoDS_Shape aShape = It.Value();
|
||||
if ( !aShape.IsNull() )
|
||||
aVertex = TopoDS::Vertex( aShape );
|
||||
TopoDS_Shape aShape = It.Value();
|
||||
if ( !aShape.IsNull() )
|
||||
aVertex = TopoDS::Vertex( aShape );
|
||||
}
|
||||
if ( !aVertex.IsNull() ) {
|
||||
aPnt = BRep_Tool::Pnt( aVertex );
|
||||
aPnt = BRep_Tool::Pnt( aVertex );
|
||||
}
|
||||
else {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Curve creation aborted : null curve");
|
||||
Standard_TypeMismatch::Raise
|
||||
("Point On Curve creation aborted : null curve");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -360,46 +360,75 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PointDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PointDriver_Type_()
|
||||
bool GEOMImpl_PointDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IPoint aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "POINT";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PointDriver",
|
||||
sizeof(GEOMImpl_PointDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case POINT_XYZ:
|
||||
AddParam( theParams, "X", aCI.GetX() );
|
||||
AddParam( theParams, "Y", aCI.GetY() );
|
||||
AddParam( theParams, "Z", aCI.GetZ() );
|
||||
break;
|
||||
case POINT_XYZ_REF:
|
||||
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 _anOtherObject ;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PointDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PointDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PointDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_PointDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PointDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -20,25 +20,24 @@
|
||||
// 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_IPolyline.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include "GEOMImpl_ICurveParametric.hxx"
|
||||
#include "GEOMImpl_IPolyline.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <BRepBuilderAPI_MakePolygon.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@ -82,9 +81,9 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
|
||||
Handle(TColStd_HArray1OfReal) aCoordsArray = aCI.GetCoordinates();
|
||||
int anArrayLength = aCoordsArray->Length();
|
||||
for (int i = 0, j = 1; i <= (anArrayLength-3); i += 3) {
|
||||
gp_Pnt aPnt = gp_Pnt(aCoordsArray->Value(i+1), aCoordsArray->Value(i+2), aCoordsArray->Value(i+3));
|
||||
points.SetValue(j,aPnt);
|
||||
j++;
|
||||
gp_Pnt aPnt = gp_Pnt(aCoordsArray->Value(i+1), aCoordsArray->Value(i+2), aCoordsArray->Value(i+3));
|
||||
points.SetValue(j,aPnt);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,39 +93,39 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
|
||||
for (; ind <= aLen; ind++)
|
||||
{
|
||||
if(useCoords) {
|
||||
aMakePoly.Add(BRepBuilderAPI_MakeVertex(points.Value(ind)));
|
||||
aMakePoly.Add(BRepBuilderAPI_MakeVertex(points.Value(ind)));
|
||||
} else {
|
||||
Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind);
|
||||
TopoDS_Shape aShapePnt = aRefPoint->GetValue();
|
||||
if (aShapePnt.ShapeType() != TopAbs_VERTEX) {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Polyline creation aborted : arguments are not a vertexes");
|
||||
return 0;
|
||||
}
|
||||
if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
|
||||
aMakePoly.Add(TopoDS::Vertex(aShapePnt));
|
||||
//if (!aMakePoly.Added()) return 0;
|
||||
}
|
||||
Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind);
|
||||
TopoDS_Shape aShapePnt = aRefPoint->GetValue();
|
||||
if (aShapePnt.ShapeType() != TopAbs_VERTEX) {
|
||||
Standard_TypeMismatch::Raise
|
||||
("Polyline creation aborted : arguments are not a vertexes");
|
||||
return 0;
|
||||
}
|
||||
if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
|
||||
aMakePoly.Add(TopoDS::Vertex(aShapePnt));
|
||||
//if (!aMakePoly.Added()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Compare first and last point coordinates and close polyline if it's the same.
|
||||
if ( aLen > 2 ) {
|
||||
TopoDS_Vertex aV1;
|
||||
if( useCoords ) {
|
||||
aV1 = BRepBuilderAPI_MakeVertex(points.Value(1));
|
||||
aV1 = BRepBuilderAPI_MakeVertex(points.Value(1));
|
||||
} else {
|
||||
Handle(GEOM_Function) aFPoint = aCI.GetPoint(1);
|
||||
TopoDS_Shape aFirstPnt = aFPoint->GetValue();
|
||||
aV1 = TopoDS::Vertex(aFirstPnt);
|
||||
Handle(GEOM_Function) aFPoint = aCI.GetPoint(1);
|
||||
TopoDS_Shape aFirstPnt = aFPoint->GetValue();
|
||||
aV1 = TopoDS::Vertex(aFirstPnt);
|
||||
}
|
||||
|
||||
TopoDS_Vertex aV2;
|
||||
if( useCoords ) {
|
||||
aV2 = BRepBuilderAPI_MakeVertex(points.Value(aLen));
|
||||
aV2 = BRepBuilderAPI_MakeVertex(points.Value(aLen));
|
||||
} else {
|
||||
Handle(GEOM_Function) aLPoint = aCI.GetPoint(aLen);
|
||||
TopoDS_Shape aLastPnt = aLPoint->GetValue();
|
||||
aV2 = TopoDS::Vertex(aLastPnt);
|
||||
Handle(GEOM_Function) aLPoint = aCI.GetPoint(aLen);
|
||||
TopoDS_Shape aLastPnt = aLPoint->GetValue();
|
||||
aV2 = TopoDS::Vertex(aLastPnt);
|
||||
}
|
||||
|
||||
if ( (!aV1.IsNull() && !aV2.IsNull() && aV1.IsSame(aV2)) ||
|
||||
@ -150,45 +149,69 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PolylineDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_()
|
||||
bool GEOMImpl_PolylineDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IPolyline aCI( function );
|
||||
GEOMImpl_ICurveParametric aIP( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PolylineDriver",
|
||||
sizeof(GEOMImpl_PolylineDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "CURVE";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_PolylineDriver) Handle(GEOMImpl_PolylineDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_PolylineDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PolylineDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_PolylineDriver)((Handle(GEOMImpl_PolylineDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case POLYLINE_POINTS:
|
||||
AddParam( theParams, "Type", "Polyline");
|
||||
if ( aIP.HasData() )
|
||||
{
|
||||
AddParam( theParams, "X(t) equation", aIP.GetExprX() );
|
||||
AddParam( theParams, "Y(t) equation", aIP.GetExprY() );
|
||||
AddParam( theParams, "Z(t) equation", aIP.GetExprZ() );
|
||||
AddParam( theParams, "Min t", aIP.GetParamMin() );
|
||||
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);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PolylineDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_PolylineDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PolylineDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -219,45 +219,48 @@ Standard_Integer GEOMImpl_PositionDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PositionDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PositionDriver_Type_()
|
||||
bool GEOMImpl_PositionDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IPosition aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "MODIFY_LOCATION";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PositionDriver",
|
||||
sizeof(GEOMImpl_PositionDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case POSITION_SHAPE:
|
||||
case POSITION_SHAPE_COPY:
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Start LCS", aCI.GetStartLCS() );
|
||||
AddParam( theParams, "End LCS", aCI.GetEndLCS() );
|
||||
break;
|
||||
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 _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PositionDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PositionDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_PositionDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_PositionDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PositionDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -495,44 +495,63 @@ TopoDS_Shape GEOMImpl_PrismDriver::MakeDraftPrism ( const TopoDS_Shape& theInitS
|
||||
return aShape;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PrismDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PrismDriver_Type_()
|
||||
bool GEOMImpl_PrismDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IPrism aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PrismDriver",
|
||||
sizeof(GEOMImpl_PrismDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "EXTRUSION";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PrismDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PrismDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -126,24 +64,15 @@ class Handle(GEOMImpl_PrismDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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,
|
||||
const TopoDS_Shape& theSupport);
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PrismDriver_Type_();
|
||||
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)); }
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PrismDriver )
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -220,46 +220,35 @@ Standard_Integer GEOMImpl_ProjectionDriver::Execute(TFunction_Logbook& log) cons
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ProjectionDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ProjectionDriver_Type_()
|
||||
bool GEOMImpl_ProjectionDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IMirror aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ProjectionDriver",
|
||||
sizeof(GEOMImpl_ProjectionDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "PROJECTION";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case PROJECTION_COPY:
|
||||
AddParam( theParams, "Source object", aCI.GetOriginal() );
|
||||
AddParam( theParams, "Target face", aCI.GetPlane() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ProjectionDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ProjectionDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ProjectionDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ProjectionDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -138,45 +138,38 @@ Standard_Integer GEOMImpl_RevolutionDriver::Execute(TFunction_Logbook& log) cons
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_RevolutionDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_()
|
||||
bool GEOMImpl_RevolutionDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IRevolution aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RevolutionDriver",
|
||||
sizeof(GEOMImpl_RevolutionDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "REVOLUTION";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case REVOLUTION_BASE_AXIS_ANGLE:
|
||||
case REVOLUTION_BASE_AXIS_ANGLE_2WAYS:
|
||||
AddParam( theParams, "Object", aCI.GetBase() );
|
||||
AddParam( theParams, "Axis", aCI.GetAxis() );
|
||||
AddParam( theParams, "Angle", aCI.GetAngle() );
|
||||
AddParam( theParams, "Both Directions", aType == REVOLUTION_BASE_AXIS_ANGLE_2WAYS );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RevolutionDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_RevolutionDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_RevolutionDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_RevolutionDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -316,43 +316,66 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_RotateDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
|
||||
bool GEOMImpl_RotateDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver",
|
||||
sizeof(GEOMImpl_RotateDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
GEOMImpl_IRotate aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_RotateDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_RotateDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_RotateDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_RotateDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_RotateDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -196,45 +196,45 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ScaleDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_()
|
||||
bool GEOMImpl_ScaleDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_IScale aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ScaleDriver",
|
||||
sizeof(GEOMImpl_ScaleDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "SCALE";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case SCALE_SHAPE:
|
||||
case SCALE_SHAPE_COPY:
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Central Point", aCI.GetPoint(), "origin" );
|
||||
AddParam( theParams, "Scale Factor", aCI.GetFactor() );
|
||||
break;
|
||||
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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ScaleDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ScaleDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_ScaleDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ScaleDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ScaleDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -93,7 +93,7 @@
|
||||
//modified by NIZNHY-PKV Wed Dec 28 13:48:20 2011f
|
||||
//static
|
||||
// void KeepEdgesOrder(const Handle(TopTools_HSequenceOfShape)& aEdges,
|
||||
// const Handle(TopTools_HSequenceOfShape)& aWires);
|
||||
// const Handle(TopTools_HSequenceOfShape)& aWires);
|
||||
//modified by NIZNHY-PKV Wed Dec 28 13:48:23 2011t
|
||||
|
||||
//=======================================================================
|
||||
@ -974,48 +974,88 @@ TopoDS_Edge GEOMImpl_ShapeDriver::MakeEdgeFromWire(const TopoDS_Shape& aWire,
|
||||
return ResEdge;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ShapeDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IShapes aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ShapeDriver",
|
||||
sizeof(GEOMImpl_ShapeDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_ShapeDriver) Handle(GEOMImpl_ShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_ShapeDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ShapeDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_ShapeDriver)((Handle(GEOMImpl_ShapeDriver)&)AnObject);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case WIRE_EDGES:
|
||||
theOperationName = "WIRE";
|
||||
AddParam( theParams, "Wires/edges", aCI.GetShapes() );
|
||||
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
|
||||
break;
|
||||
case FACE_WIRE:
|
||||
theOperationName = "FACE";
|
||||
AddParam( theParams, "Wire/edge", aCI.GetBase() );
|
||||
AddParam( theParams, "Is planar wanted", aCI.GetIsPlanar() );
|
||||
break;
|
||||
case FACE_WIRES:
|
||||
theOperationName = "FACE";
|
||||
AddParam( theParams, "Wires/edges", aCI.GetShapes() );
|
||||
AddParam( theParams, "Is planar wanted", aCI.GetIsPlanar() );
|
||||
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";
|
||||
{
|
||||
GEOMImpl_IVector aCI( function );
|
||||
AddParam( theParams, "Edge", aCI.GetPoint1() );
|
||||
AddParam( theParams, "Start point", aCI.GetPoint2() );
|
||||
AddParam( theParams, "Length", aCI.GetParameter() );
|
||||
}
|
||||
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
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
@ -1031,7 +1071,7 @@ const Handle(GEOMImpl_ShapeDriver) Handle(GEOMImpl_ShapeDriver)::DownCast(const
|
||||
//=======================================================================
|
||||
/*
|
||||
void KeepEdgesOrder(const Handle(TopTools_HSequenceOfShape)& aEdges,
|
||||
const Handle(TopTools_HSequenceOfShape)& aWires)
|
||||
const Handle(TopTools_HSequenceOfShape)& aWires)
|
||||
{
|
||||
Standard_Integer aNbWires, aNbEdges;
|
||||
//
|
||||
@ -1070,7 +1110,7 @@ void KeepEdgesOrder(const Handle(TopTools_HSequenceOfShape)& aEdges,
|
||||
for (j=1; j<=aNbEdges; ++j) {
|
||||
const TopoDS_Shape& aE=aEdges->Value(j);
|
||||
if (aMEx.Contains(aE)) {
|
||||
aBB.Add(aWy, aE);
|
||||
aBB.Add(aWy, aE);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -127,24 +65,15 @@ class Handle(GEOMImpl_ShapeDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
(const Handle(TColStd_HSequenceOfTransient)& theEdgesFuncs,
|
||||
const Standard_Real theTolerance);
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_();
|
||||
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)); }
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ShapeDriver )
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -131,45 +131,50 @@ Standard_Integer GEOMImpl_SketcherDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_SketcherDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_()
|
||||
bool GEOMImpl_SketcherDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ISketcher aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "SKETCH";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SketcherDriver",
|
||||
sizeof(GEOMImpl_SketcherDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case SKETCHER_NINE_DOUBLS:
|
||||
AddParam( theParams, "Command", aCI.GetCommand() );
|
||||
AddParam( theParams, "Origin")
|
||||
<< aCI.GetWorkingPlane(1) << " "
|
||||
<< aCI.GetWorkingPlane(2) << " "
|
||||
<< aCI.GetWorkingPlane(3);
|
||||
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 _anOtherObject ;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SketcherDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SketcherDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SketcherDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_SketcherDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_SketcherDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -193,41 +193,38 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_SmoothingSurfaceDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_SmoothingSurfaceDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
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);
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SmoothingSurfaceDriver",
|
||||
sizeof(GEOMImpl_SmoothingSurfaceDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
return _aType;
|
||||
}
|
||||
GEOMImpl_ISmoothingSurface aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_SmoothingSurfaceDriver) Handle(GEOMImpl_SmoothingSurfaceDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_SmoothingSurfaceDriver) _anOtherObject;
|
||||
theOperationName = "SMOOTHINGSURFACE";
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_SmoothingSurfaceDriver)((Handle(GEOMImpl_SmoothingSurfaceDriver)&)AnObject);
|
||||
}
|
||||
switch ( 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 _anOtherObject;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||
|
@ -37,73 +37,15 @@
|
||||
class Handle_Standard_Type;
|
||||
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:
|
||||
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 virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
@ -115,17 +57,13 @@ public:
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_();
|
||||
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));
|
||||
}
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver )
|
||||
|
||||
private:
|
||||
TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const;
|
||||
};
|
||||
|
@ -102,45 +102,38 @@ Standard_Integer GEOMImpl_SphereDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_SphereDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SphereDriver_Type_()
|
||||
bool GEOMImpl_SphereDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_ISphere aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SphereDriver",
|
||||
sizeof(GEOMImpl_SphereDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "SPHERE";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case SPHERE_R:
|
||||
AddParam( theParams, "Radius", aCI.GetR() );
|
||||
break;
|
||||
case SPHERE_PNT_R:
|
||||
AddParam( theParams, "Center", aCI.GetPoint() );
|
||||
AddParam( theParams, "Radius", aCI.GetR() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SphereDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SphereDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SphereDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_SphereDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_SphereDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -20,13 +20,14 @@
|
||||
// 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_Types.hxx>
|
||||
#include "GEOMImpl_ISpline.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
#include "GEOMImpl_ICurveParametric.hxx"
|
||||
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOMUtils.hxx>
|
||||
#include "GEOM_Function.hxx"
|
||||
#include "GEOMUtils.hxx"
|
||||
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
@ -40,7 +41,6 @@
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
//#include <GeomAPI_PointsToBSpline.hxx>
|
||||
#include <GeomAPI_Interpolate.hxx>
|
||||
|
||||
#include <gp.hxx>
|
||||
@ -50,8 +50,6 @@
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include <Standard_NullObject.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@ -112,9 +110,9 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
|
||||
if (useCoords) {
|
||||
int anArrayLength = aCoordsArray->Length();
|
||||
for (int i = 0, j = 1; i <= (anArrayLength-3); i += 3) {
|
||||
gp_Pnt aPnt = gp_Pnt(aCoordsArray->Value(i+1), aCoordsArray->Value(i+2), aCoordsArray->Value(i+3));
|
||||
points.SetValue(j, aPnt);
|
||||
j++;
|
||||
gp_Pnt aPnt = gp_Pnt(aCoordsArray->Value(i+1), aCoordsArray->Value(i+2), aCoordsArray->Value(i+3));
|
||||
points.SetValue(j, aPnt);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,22 +121,22 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
|
||||
if (aType == SPLINE_BEZIER && aCI.GetIsClosed()) {
|
||||
TopoDS_Vertex aV1;
|
||||
if (useCoords) {
|
||||
aV1 = BRepBuilderAPI_MakeVertex(points.Value(1));
|
||||
aV1 = BRepBuilderAPI_MakeVertex(points.Value(1));
|
||||
}
|
||||
else {
|
||||
Handle(GEOM_Function) aFPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(1));
|
||||
TopoDS_Shape aFirstPnt = aFPoint->GetValue();
|
||||
aV1 = TopoDS::Vertex(aFirstPnt);
|
||||
Handle(GEOM_Function) aFPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(1));
|
||||
TopoDS_Shape aFirstPnt = aFPoint->GetValue();
|
||||
aV1 = TopoDS::Vertex(aFirstPnt);
|
||||
}
|
||||
|
||||
TopoDS_Vertex aV2;
|
||||
if (useCoords) {
|
||||
aV2 = BRepBuilderAPI_MakeVertex(points.Value(aLen));
|
||||
aV2 = BRepBuilderAPI_MakeVertex(points.Value(aLen));
|
||||
}
|
||||
else {
|
||||
Handle(GEOM_Function) aLPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(aLen));
|
||||
TopoDS_Shape aLastPnt = aLPoint->GetValue();
|
||||
aV2 = TopoDS::Vertex(aLastPnt);
|
||||
Handle(GEOM_Function) aLPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(aLen));
|
||||
TopoDS_Shape aLastPnt = aLPoint->GetValue();
|
||||
aV2 = TopoDS::Vertex(aLastPnt);
|
||||
}
|
||||
|
||||
if (!aV1.IsNull() && !aV2.IsNull() && !aV1.IsSame(aV2)) {
|
||||
@ -154,7 +152,7 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
|
||||
for (ind = 1; ind <= aLen; ind++) {
|
||||
gp_Pnt aP;
|
||||
if (useCoords) {
|
||||
aP = points.Value(ind);
|
||||
aP = points.Value(ind);
|
||||
if (!isSeveral && ind > 1) {
|
||||
if (aP.Distance(aPrevP) > Precision::Confusion()) {
|
||||
isSeveral = Standard_True;
|
||||
@ -164,18 +162,18 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
|
||||
aPrevP = aP;
|
||||
}
|
||||
else {
|
||||
Handle(GEOM_Function) aRefPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(ind));
|
||||
TopoDS_Shape aShapePnt = aRefPoint->GetValue();
|
||||
if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
|
||||
aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt));
|
||||
if (!isSeveral && ind > 1) {
|
||||
if (aP.Distance(aPrevP) > Precision::Confusion()) {
|
||||
isSeveral = Standard_True;
|
||||
}
|
||||
}
|
||||
CurvePoints.SetValue(ind, aP);
|
||||
aPrevP = aP;
|
||||
}
|
||||
Handle(GEOM_Function) aRefPoint = Handle(GEOM_Function)::DownCast(aPoints->Value(ind));
|
||||
TopoDS_Shape aShapePnt = aRefPoint->GetValue();
|
||||
if (aShapePnt.ShapeType() == TopAbs_VERTEX) {
|
||||
aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt));
|
||||
if (!isSeveral && ind > 1) {
|
||||
if (aP.Distance(aPrevP) > Precision::Confusion()) {
|
||||
isSeveral = Standard_True;
|
||||
}
|
||||
}
|
||||
CurvePoints.SetValue(ind, aP);
|
||||
aPrevP = aP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,45 +266,72 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_SplineDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_SplineDriver_Type_()
|
||||
bool GEOMImpl_SplineDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ISpline aCI( function );
|
||||
GEOMImpl_ICurveParametric aPI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "CURVE";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SplineDriver",
|
||||
sizeof(GEOMImpl_SplineDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
switch ( aType ) {
|
||||
case SPLINE_BEZIER:
|
||||
case SPLINE_INTERPOLATION:
|
||||
case SPLINE_INTERPOL_TANGENTS:
|
||||
|
||||
return _aType;
|
||||
}
|
||||
AddParam( theParams, "Type", ( aType == SPLINE_BEZIER ? "Bezier" : "Interpolation"));
|
||||
|
||||
//=======================================================================
|
||||
//function : DownCast
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(GEOMImpl_SplineDriver) Handle(GEOMImpl_SplineDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||
{
|
||||
Handle(GEOMImpl_SplineDriver) _anOtherObject;
|
||||
|
||||
if (!AnObject.IsNull()) {
|
||||
if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SplineDriver))) {
|
||||
_anOtherObject = Handle(GEOMImpl_SplineDriver)((Handle(GEOMImpl_SplineDriver)&)AnObject);
|
||||
}
|
||||
if ( aPI.HasData() )
|
||||
{
|
||||
AddParam( theParams, "X(t) equation", aPI.GetExprX() );
|
||||
AddParam( theParams, "Y(t) equation", aPI.GetExprY() );
|
||||
AddParam( theParams, "Z(t) equation", aPI.GetExprZ() );
|
||||
AddParam( theParams, "Min t", aPI.GetParamMin() );
|
||||
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);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_SplineDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_SplineDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_SplineDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -154,45 +154,38 @@ Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(TFunction_Logbook& log) co
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_ThruSectionsDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_ThruSectionsDriver_Type_()
|
||||
bool GEOMImpl_ThruSectionsDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IThruSections aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "MakeThruSections";
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ThruSectionsDriver",
|
||||
sizeof(GEOMImpl_ThruSectionsDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case THRUSECTIONS_RULED:
|
||||
case THRUSECTIONS_SMOOTHED:
|
||||
AddParam( theParams, "Sections", aCI.GetSections() );
|
||||
AddParam( theParams, "Is solid", aCI.GetSolidMode() );
|
||||
AddParam( theParams, "Precision", aCI.GetPrecision() );
|
||||
AddParam( theParams, "Is ruled", aType == THRUSECTIONS_RULED );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ThruSectionsDriver,GEOM_BaseDriver);
|
||||
|
@ -50,69 +50,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -126,23 +63,14 @@ class Handle(GEOMImpl_ThruSectionsDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_ThruSectionsDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_ThruSectionsDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -120,45 +120,41 @@ Standard_Integer GEOMImpl_TorusDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_TorusDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_TorusDriver_Type_()
|
||||
bool GEOMImpl_TorusDriver::
|
||||
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);
|
||||
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);
|
||||
|
||||
GEOMImpl_ITorus aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TorusDriver",
|
||||
sizeof(GEOMImpl_TorusDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
theOperationName = "TORUS";
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case TORUS_RR:
|
||||
AddParam( theParams, "Radius 1", aCI.GetRMajor() );
|
||||
AddParam( theParams, "Radius 2", aCI.GetRMinor() );
|
||||
break;
|
||||
case TORUS_PNT_VEC_RR:
|
||||
AddParam( theParams, "Base Point", aCI.GetCenter() );
|
||||
AddParam( theParams, "Vector", aCI.GetVector() );
|
||||
AddParam( theParams, "Radius 1", aCI.GetRMajor() );
|
||||
AddParam( theParams, "Radius 2", aCI.GetRMinor() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return _anOtherObject ;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_TorusDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TorusDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_TorusDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_TorusDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_TorusDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -277,44 +277,73 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_TranslateDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
|
||||
bool GEOMImpl_TranslateDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_ITranslate aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver",
|
||||
sizeof(GEOMImpl_TranslateDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case TRANSLATE_TWO_POINTS:
|
||||
case TRANSLATE_TWO_POINTS_COPY:
|
||||
theOperationName = "TRANSLATION";
|
||||
AddParam( theParams, "Object", aCI.GetOriginal() );
|
||||
AddParam( theParams, "Point 1", aCI.GetPoint1() );
|
||||
AddParam( theParams, "Point 2", aCI.GetPoint2() );
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_TranslateDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_TranslateDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_TranslateDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_TranslateDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_TranslateDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -20,28 +20,27 @@
|
||||
// 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_Types.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include "GEOMImpl_IVector.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
#include "GEOM_Function.hxx"
|
||||
#include "GEOM_Object.hxx"
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@ -156,46 +155,55 @@ Standard_Integer GEOMImpl_VectorDriver::Execute(TFunction_Logbook& log) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_VectorDriver_Type_
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_EXPORT Handle_Standard_Type& GEOMImpl_VectorDriver_Type_()
|
||||
bool GEOMImpl_VectorDriver::
|
||||
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);
|
||||
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);
|
||||
GEOMImpl_IVector aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_VectorDriver",
|
||||
sizeof(GEOMImpl_VectorDriver),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
switch ( aType ) {
|
||||
case VECTOR_DX_DY_DZ:
|
||||
theOperationName = "VECTOR";
|
||||
AddParam( theParams, "Dx", aCI.GetDX() );
|
||||
AddParam( theParams, "Dy", aCI.GetDY() );
|
||||
AddParam( theParams, "Dz", aCI.GetDZ() );
|
||||
break;
|
||||
case VECTOR_TWO_PNT: {
|
||||
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 _anOtherObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_VectorDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_VectorDriver,GEOM_BaseDriver);
|
||||
|
@ -47,68 +47,6 @@
|
||||
#include <Standard_GUID.hxx>
|
||||
#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
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
@ -122,23 +60,14 @@ class Handle(GEOMImpl_VectorDriver) : public Handle(TFunction_Driver) {
|
||||
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:
|
||||
|
||||
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
|
||||
//
|
||||
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 ~GEOMImpl_VectorDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
|
||||
// Type management
|
||||
//
|
||||
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)); }
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_VectorDriver )
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user