// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifdef WNT
#pragma warning( disable:4786 )
#include "GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx"
#include "GEOM_PythonDump.hxx"
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <Basics_Utils.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <TFunction_Driver.hxx>
#include <TFunction_DriverTable.hxx>
-#include <TDataStd_HArray1OfByte.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDF_ChildIterator.hxx>
#include <TColStd_MapOfTransient.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#include <TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx>
+#else
+#include <TDataStd_HArray1OfByte.hxx>
#include <Interface_DataMapIteratorOfDataMapOfIntegerTransient.hxx>
+#endif
+
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
#include <set>
RemoveObject(*objit);
//Close all documents not closed
- for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
+#else
+ Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
+#endif
+ for (; anItr.More(); anItr.Next())
Close(anItr.Key());
_mapIDDocument.Clear();
//=============================================================================
int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
{
- if(theDocument.IsNull()) return -1;
- for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
- if(anItr.Value() == theDocument) return anItr.Key();
+ if (theDocument.IsNull()) return -1;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
+#else
+ Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
+#endif
+ for (; anItr.More(); anItr.Next())
+ if (anItr.Value() == theDocument) return anItr.Key();
return -1;
-
}
//=============================================================================
aSSI.SetIndices(theIndices);
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
GEOM_Solver aSolver (GEOM_Engine::GetEngine());
#define TEXTURE_LABEL_DATA 5
int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ const Handle(TColStd_HArray1OfByte)& theTexture,
+#else
const Handle(TDataStd_HArray1OfByte)& theTexture,
+#endif
const TCollection_AsciiString& theFileName)
{
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
return aTextureID;
}
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
+#else
Handle(TDataStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
- int& theWidth, int& theHeight,
- TCollection_AsciiString& theFileName)
+#endif
+ int& theWidth, int& theHeight,
+ TCollection_AsciiString& theFileName)
{
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) anArray;
+#else
Handle(TDataStd_HArray1OfByte) anArray;
+#endif
theWidth = theHeight = 0;
Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
}
}
-static TCollection_AsciiString pack_data(const Handle(TDataStd_HArray1OfByte)& aData )
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+static TCollection_AsciiString pack_data (const Handle(TColStd_HArray1OfByte)& aData)
+#else
+static TCollection_AsciiString pack_data (const Handle(TDataStd_HArray1OfByte)& aData)
+#endif
{
TCollection_AsciiString stream;
if (!aData.IsNull()) {
if (*it <= 0) continue;
Standard_Integer aWidth, aHeight;
TCollection_AsciiString aFileName;
- Handle(TDataStd_HArray1OfByte) aTexture = engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture =
+#else
+ Handle(TDataStd_HArray1OfByte) aTexture =
+#endif
+ engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
TCollection_AsciiString aCommand = "\n\t";
aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOM_Engine_HXX_
#define _GEOM_Engine_HXX_
#include "GEOM_Object.hxx"
#include "GEOM_DataMapOfAsciiStringTransient.hxx"
-#include <Interface_DataMapOfIntegerTransient.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_DataMapOfIntegerTransient.hxx>
+#else
+#include <Interface_DataMapOfIntegerTransient.hxx>
+#endif
+
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#include <TDocStd_Document.hxx>
#include <TColStd_HArray1OfInteger.hxx>
bool _unpublished;
};
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+class Handle_TColStd_HArray1OfByte;
+#else
class Handle_TDataStd_HArray1OfByte;
+#endif
struct TVariable{
TCollection_AsciiString myVariable;
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ const Handle(TColStd_HArray1OfByte)& theTexture,
+#else
const Handle(TDataStd_HArray1OfByte)& theTexture,
+#endif
const TCollection_AsciiString& theFileName = "");
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
+#else
Standard_EXPORT Handle(TDataStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
- int& theWidth, int& theHeight,
- TCollection_AsciiString& theFileName);
+#endif
+ int& theWidth, int& theHeight,
+ TCollection_AsciiString& theFileName);
Standard_EXPORT std::list<int> getAllTextures(int theDocID);
private:
Handle(GEOM_Application) _OCAFApp;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ TColStd_DataMapOfIntegerTransient _mapIDDocument;
+#else
Interface_DataMapOfIntegerTransient _mapIDDocument;
+#endif
int _UndoLimit;
GEOM_DataMapOfAsciiStringTransient _objects;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <TDF.hxx>
if (!isResult) {
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x060100
OCC_CATCH_SIGNALS;
#endif
GEOM_Solver aSolver(GEOM_Engine::GetEngine());
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# File : Makefile.in
# Author : Damien COQUERET (OCC)
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
# $Header:
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# Libraries targets
$(CAS_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
+ $(GUI_CXXFLAGS) \
-I$(top_builddir)/idl
libGEOMbasic_la_LDFLAGS = \
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: BlockFix_UnionFaces.cxx
// Created: Tue Dec 7 17:15:42 2004
// Author: Pavel DURANDIN
-//
+
#include <BlockFix_UnionFaces.ixx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <ShapeAnalysis_WireOrder.hxx>
#include <ShapeAnalysis_Edge.hxx>
#include <ShapeFix_Wire.hxx>
#include <ShapeFix_Edge.hxx>
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <IntPatch_ImpImpIntersection.hxx>
+#else
#include <IntPatch_TheIIIntOfIntersection.hxx>
+#endif
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ IntPatch_ImpImpIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
+#else
IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
+#endif
if (!anIIInt.IsDone() || anIIInt.IsEmpty())
return false;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
#endif
+
class Standard_NoSuchObject;
class TopoDS_Shape;
class GEOMAlgo_ShapeSet;
class GEOMAlgo_DataMapOfShapeShapeSet;
class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet : public TCollection_BasicMapIterator {
-
+class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet : public TCollection_BasicMapIterator
+{
public:
+ void* operator new(size_t,void* anAddress)
+ {
+ return anAddress;
+ }
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
+ }
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ }
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeShapeSet& aMap) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Key() const;
-
-
-Standard_EXPORT const GEOMAlgo_ShapeSet& Value() const;
-
-
+ Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet();
+ Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
+ (const GEOMAlgo_DataMapOfShapeShapeSet& aMap);
+ Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeShapeSet& aMap);
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
+ Standard_EXPORT const TopoDS_Shape& Key() const;
+ Standard_EXPORT const GEOMAlgo_ShapeSet& Value() const;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class TopoDS_Shape;
class TopTools_OrientedShapeMapHasher;
class GEOMAlgo_DataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
-
-
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape : public TCollection_MapNode {
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape(const TopoDS_Shape& K,const TopoDS_Shape& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
+ (const TopoDS_Shape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n);
TopoDS_Shape& Key() const;
-
TopoDS_Shape& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey;
-TopoDS_Shape myValue;
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
+private:
+ TopoDS_Shape myKey;
+ TopoDS_Shape myValue;
};
#define TheKey TopoDS_Shape
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::~GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape() {}
-
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
+
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape",
return _aType;
}
-
// DownCast method
// allow safe downcasting
//
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
+
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::DynamicType() const
{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) ;
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape);
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape() {}
+
+#endif
+
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopoDS_Shape
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMapNode.gxx>
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class GEOMAlgo_PassKey;
class GEOMAlgo_PassKeyMapHasher;
class GEOMAlgo_DataMapOfPassKeyInteger;
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-
-
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : public TCollection_MapNode {
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const Standard_Integer& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
+ (const GEOMAlgo_PassKey& K, const Standard_Integer& I, const TCollection_MapNodePtr& n);
GEOMAlgo_PassKey& Key() const;
-
Standard_Integer& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-GEOMAlgo_PassKey myKey;
-Standard_Integer myValue;
-
-
+ GEOMAlgo_PassKey myKey;
+ Standard_Integer myValue;
};
#define TheKey GEOMAlgo_PassKey
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
-
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
+
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
{
{
return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ;
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
+
+#endif
+
#define TheKey GEOMAlgo_PassKey
#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
#define TheItem Standard_Integer
#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
#include <TCollection_DataMapNode.gxx>
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class GEOMAlgo_PassKeyShape;
class TopoDS_Shape;
class GEOMAlgo_PassKeyShapeMapHasher;
class GEOMAlgo_DataMapOfPassKeyShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-
-
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape : public TCollection_MapNode {
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape(const GEOMAlgo_PassKeyShape& K,const TopoDS_Shape& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
+ (const GEOMAlgo_PassKeyShape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n);
GEOMAlgo_PassKeyShape& Key() const;
-
TopoDS_Shape& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-GEOMAlgo_PassKeyShape myKey;
-TopoDS_Shape myValue;
-
-
+ GEOMAlgo_PassKeyShape myKey;
+ TopoDS_Shape myValue;
};
#define TheKey GEOMAlgo_PassKeyShape
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape() {}
-
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
+
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape",
return _aType;
}
-
// DownCast method
// allow safe downcasting
//
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
+
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::DynamicType() const
{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) ;
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape);
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape() {}
+
+#endif
+
#define TheKey GEOMAlgo_PassKeyShape
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopoDS_Shape
#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
#include <TCollection_DataMapNode.gxx>
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class TopTools_ListOfShape;
class TColStd_MapRealHasher;
class GEOMAlgo_DataMapOfRealListOfShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
-
-
-class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape : public TCollection_MapNode {
-
+class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape : public TCollection_MapNode
+{
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape(const Standard_Real& K,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
+ (const Standard_Real& K,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n);
Standard_Real& Key() const;
-
TopTools_ListOfShape& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myKey;
-TopTools_ListOfShape myValue;
-
-
+ Standard_Real myKey;
+ TopTools_ListOfShape myValue;
};
#define TheKey Standard_Real
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::~GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape() {}
-
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
+
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape",
return _aType;
}
-
// DownCast method
// allow safe downcasting
//
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
+
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::DynamicType() const
{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) ;
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape);
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape() {}
+
+#endif
+
#define TheKey Standard_Real
#define TheKey_hxx <Standard_Real.hxx>
#define TheItem TopTools_ListOfShape
#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfRealListOfShape.hxx>
#include <TCollection_DataMapNode.gxx>
-
#ifndef _TCollection_MapNodePtr_HeaderFile\r
#include <TCollection_MapNodePtr.hxx>\r
#endif\r
+\r
class TopoDS_Shape;\r
class TopTools_MapOfShape;\r
class TopTools_ShapeMapHasher;\r
class GEOMAlgo_DataMapOfShapeMapOfShape;\r
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;\r
\r
-\r
-\r
class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape : public TCollection_MapNode {\r
\r
public:\r
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
+ (const TopoDS_Shape& K, const TopTools_MapOfShape& I, const TCollection_MapNodePtr& n);\r
\r
- \r
- GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape(const TopoDS_Shape& K,const TopTools_MapOfShape& I,const TCollection_MapNodePtr& n);\r
- \r
- TopoDS_Shape& Key() const;\r
- \r
- TopTools_MapOfShape& Value() const;\r
-\r
-\r
-\r
+ TopoDS_Shape& Key() const;\r
+ TopTools_MapOfShape& Value() const;\r
\r
DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
\r
-protected:\r
-\r
-\r
-\r
-\r
-private: \r
-\r
-\r
-TopoDS_Shape myKey;\r
-TopTools_MapOfShape myValue;\r
-\r
-\r
+private:\r
+ TopoDS_Shape myKey;\r
+ TopTools_MapOfShape myValue;\r
};\r
\r
#define TheKey TopoDS_Shape\r
#undef TCollection_DataMap\r
#undef TCollection_DataMap_hxx\r
\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
#endif\r
\r
#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
\r
+#include <CASCatch_OCCTVersion.hxx>\r
+\r
#ifndef _Standard_TypeMismatch_HeaderFile\r
#include <Standard_TypeMismatch.hxx>\r
#endif\r
#endif\r
\r
\r
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1\r
+\r
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
+ STANDARD_TYPE(TCollection_MapNode),\r
+ STANDARD_TYPE(MMgt_TShared),\r
+ STANDARD_TYPE(Standard_Transient),\r
+\r
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
\r
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape,Standard_Transient)\r
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
+\r
+#else\r
\r
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
{\r
-\r
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);\r
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);\r
- \r
\r
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};\r
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape",\r
return _aType;\r
}\r
\r
-\r
// DownCast method\r
// allow safe downcasting\r
//\r
}\r
}\r
\r
- return _anOtherObject ;\r
+ return _anOtherObject;\r
}\r
+\r
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape::DynamicType() const \r
{ \r
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) ; \r
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape); \r
}\r
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape::IsKind(const Handle(Standard_Type)& AType) const \r
-//{ \r
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) == AType || TCollection_MapNode::IsKind(AType)); \r
-//}\r
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape() {}\r
+\r
+#endif\r
+\r
#define TheKey TopoDS_Shape\r
#define TheKey_hxx <TopoDS_Shape.hxx>\r
#define TheItem TopTools_MapOfShape\r
#ifndef _TCollection_MapNodePtr_HeaderFile\r
#include <TCollection_MapNodePtr.hxx>\r
#endif\r
+\r
class TopoDS_Shape;\r
class gp_Pnt;\r
class TopTools_ShapeMapHasher;\r
class GEOMAlgo_DataMapOfShapePnt;\r
class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;\r
\r
-\r
-\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt : public TCollection_MapNode {\r
-\r
+class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt : public TCollection_MapNode\r
+{\r
public:\r
+ GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
+ (const TopoDS_Shape& K, const gp_Pnt& I, const TCollection_MapNodePtr& n);\r
\r
- \r
- GEOMAlgo_DataMapNodeOfDataMapOfShapePnt(const TopoDS_Shape& K,const gp_Pnt& I,const TCollection_MapNodePtr& n);\r
- \r
- TopoDS_Shape& Key() const;\r
- \r
- gp_Pnt& Value() const;\r
-\r
-\r
-\r
+ TopoDS_Shape& Key() const;\r
+ gp_Pnt& Value() const;\r
\r
DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
\r
-protected:\r
-\r
-\r
-\r
-\r
private: \r
-\r
-\r
-TopoDS_Shape myKey;\r
-gp_Pnt myValue;\r
-\r
-\r
+ TopoDS_Shape myKey;\r
+ gp_Pnt myValue;\r
};\r
\r
#define TheKey TopoDS_Shape\r
#undef TCollection_DataMap\r
#undef TCollection_DataMap_hxx\r
\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
#endif\r
\r
#include <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
\r
+#include <CASCatch_OCCTVersion.hxx>\r
+\r
#ifndef _Standard_TypeMismatch_HeaderFile\r
#include <Standard_TypeMismatch.hxx>\r
#endif\r
#endif\r
\r
\r
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1\r
+\r
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
+ STANDARD_TYPE(TCollection_MapNode),\r
+ STANDARD_TYPE(MMgt_TShared),\r
+ STANDARD_TYPE(Standard_Transient),\r
+\r
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
\r
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt,Standard_Transient)\r
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
+\r
+#else\r
\r
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
{\r
-\r
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);\r
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);\r
- \r
\r
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};\r
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapePnt",\r
return _aType;\r
}\r
\r
-\r
// DownCast method\r
// allow safe downcasting\r
//\r
}\r
}\r
\r
- return _anOtherObject ;\r
+ return _anOtherObject;\r
}\r
+\r
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt::DynamicType() const \r
{ \r
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) ; \r
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt); \r
}\r
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfShapePnt::IsKind(const Handle(Standard_Type)& AType) const \r
-//{ \r
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) == AType || TCollection_MapNode::IsKind(AType)); \r
-//}\r
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt() {}\r
+\r
+#endif\r
+\r
#define TheKey TopoDS_Shape\r
#define TheKey_hxx <TopoDS_Shape.hxx>\r
#define TheItem gp_Pnt\r
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class TopoDS_Shape;
class TopTools_ShapeMapHasher;
class GEOMAlgo_DataMapOfShapeReal;
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-
-
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal : public TCollection_MapNode {
-
+class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal : public TCollection_MapNode
+{
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfShapeReal(const TopoDS_Shape& K,const Standard_Real& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
+ (const TopoDS_Shape& K, const Standard_Real& I, const TCollection_MapNodePtr& n);
TopoDS_Shape& Key() const;
-
Standard_Real& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfShapeReal();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey;
-Standard_Real myValue;
-
-
+ TopoDS_Shape myKey;
+ Standard_Real myValue;
};
#define TheKey TopoDS_Shape
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::~GEOMAlgo_DataMapNodeOfDataMapOfShapeReal() {}
-
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
+
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal",
return _aType;
}
-
// DownCast method
// allow safe downcasting
//
return _anOtherObject ;
}
+
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::DynamicType() const
{
return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) ;
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal() {}
+
+#endif
+
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem Standard_Real
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
#endif
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
+
class TopoDS_Shape;
class GEOMAlgo_ShapeSet;
class TopTools_ShapeMapHasher;
class GEOMAlgo_DataMapOfShapeShapeSet;
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
-
-
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet : public TCollection_MapNode {
-
+class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet : public TCollection_MapNode
+{
public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet(const TopoDS_Shape& K,const GEOMAlgo_ShapeSet& I,const TCollection_MapNodePtr& n);
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
+ (const TopoDS_Shape& K, const GEOMAlgo_ShapeSet& I, const TCollection_MapNodePtr& n);
TopoDS_Shape& Key() const;
-
GEOMAlgo_ShapeSet& Value() const;
-//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet();
-
-
-
-
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey;
-GEOMAlgo_ShapeSet myValue;
-
-
+ TopoDS_Shape myKey;
+ GEOMAlgo_ShapeSet myValue;
};
#define TheKey TopoDS_Shape
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
#endif
-//GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::~GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet() {}
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+
+IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
+ STANDARD_TYPE(TCollection_MapNode),
+ STANDARD_TYPE(MMgt_TShared),
+ STANDARD_TYPE(Standard_Transient),
+
+IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
+IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
+IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,Standard_Transient)
+IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
+
+#else
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet",
return _aType;
}
-
// DownCast method
// allow safe downcasting
//
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
+
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::DynamicType() const
{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) ;
+ return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet);
}
-//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet() {}
+
+#endif
+
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem GEOMAlgo_ShapeSet
#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
#include <TCollection_DataMapNode.gxx>
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMap.gxx>
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
#define _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TopoDS_Shape;
class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
-
class GEOMAlgo_DataMapOfShapeShapeSet : public TCollection_BasicMap {
public:
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
- // Methods PUBLIC
- //
-
-Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const Standard_Integer NbBuckets = 1);
+ Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const Standard_Integer NbBuckets = 1);
-Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet& Assign(const GEOMAlgo_DataMapOfShapeShapeSet& Other) ;
+ Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet& Assign(const GEOMAlgo_DataMapOfShapeShapeSet& Other) ;
GEOMAlgo_DataMapOfShapeShapeSet& operator =(const GEOMAlgo_DataMapOfShapeShapeSet& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfShapeShapeSet()
-{
- Clear();
-}
+ {
+ return Assign(Other);
+ }
+ Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+ Standard_EXPORT void Clear() ;
+ ~GEOMAlgo_DataMapOfShapeShapeSet()
+ {
+ Clear();
+ }
-Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const GEOMAlgo_ShapeSet& I) ;
+ Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const GEOMAlgo_ShapeSet& I) ;
+ Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
-Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
+ Standard_EXPORT const GEOMAlgo_ShapeSet& Find(const TopoDS_Shape& K) const;
+ const GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K) const
+ {
+ return Find(K);
+ }
-Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-
-
-Standard_EXPORT const GEOMAlgo_ShapeSet& Find(const TopoDS_Shape& K) const;
- const GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K) const
-{
- return Find(K);
-}
-
-
-
-Standard_EXPORT GEOMAlgo_ShapeSet& ChangeFind(const TopoDS_Shape& K) ;
+ Standard_EXPORT GEOMAlgo_ShapeSet& ChangeFind(const TopoDS_Shape& K) ;
GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K)
-{
- return ChangeFind(K);
-}
-
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+ {
+ return ChangeFind(K);
+ }
private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& Other);
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& Other);
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)(const GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)(const GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)(const GEOMAlgo_DataMapNodeOfDataMapOfShapeReal* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfShapeReal* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfShapeReal* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfShapeReal *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
+#ifndef _Standard_DefineHandle_HeaderFile
+#include <Standard_DefineHandle.hxx>
+#endif
#ifndef _Handle_TCollection_MapNode_HeaderFile
#include <Handle_TCollection_MapNode.hxx>
#endif
class Standard_Transient;
-class Handle_Standard_Type;
+class Handle(Standard_Type);
class Handle(TCollection_MapNode);
class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet);
-
-class Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)(const GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
- GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet* operator->() const
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet *)ControlAccess();
- }
+DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,TCollection_MapNode)
-// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) DownCast(const Handle(Standard_Transient)& AnObject);
-};
#endif
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
+
# GEOM GEOMAlgo : tools for Glue Faces algorithm
# File : Makefile.am
# Author : Julia DOROVSKIKH
libGEOMAlgo_la_CPPFLAGS = \
$(CAS_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
-I$(srcdir)/../NMTDS \
-I$(srcdir)/../NMTTools
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
// File : GEOM_Displayer.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#include "GEOM_Displayer.h"
#include "GeometryGUI.h"
#include <SUIT_ViewManager.h>
#include <SUIT_ResourceMgr.h>
+#include <CASCatch_OCCTVersion.hxx>
#include <SalomeApp_Study.h>
#include <SalomeApp_Application.h>
#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
#include <GEOMImpl_Types.hxx>
-#include <Graphic3d_HArray1OfBytes.hxx>
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
+#include <Graphic3d_HArray1OfBytes.hxx>
+#endif
//================================================================
// Function : getActiveStudy
static inline int getViewManagerId( SALOME_View* theViewFrame) {
SUIT_ViewModel* aModel = dynamic_cast<SUIT_ViewModel*>(theViewFrame);
SUIT_ViewManager* aViewMgr = 0;
- if(aModel != 0)
+ if (aModel != 0)
aViewMgr = aModel->getViewManager();
return ((aViewMgr == 0) ? -1 :aViewMgr->getGlobalId());
}
int stype = getMinMaxShapeType( sub_shape, ismin );
if ( stype == TopAbs_SHAPE ) continue;
if ( ismin && stype > ret )
- ret = stype;
+ ret = stype;
else if ( !ismin && ( ret < TopAbs_SOLID || stype < ret ) )
- ret = stype;
+ ret = stype;
}
}
//================================================================
// Function : getComplexFilter
-// Purpose : Get compound filter corresponding to the type of
+// Purpose : Get compound filter corresponding to the type of
// object from GEOMImpl_Types.h
//================================================================
SUIT_SelectionFilter* GEOM_Displayer::getComplexFilter( const QList<int>* aSubShapes)
{
GEOM_CompoundFilter* aFilter;
-
+
if(aSubShapes != NULL ) {
aFilter = new GEOM_CompoundFilter(getStudy());
QList<int> aTopAbsTypes;
}
aFilter->addSubTypes(aTopAbsTypes);
}
-
+
return aFilter;
}
int aMgrId = getViewManagerId(vf);
SalomeApp_Study* aStudy = getStudy();
aStudy->setObjectProperty(aMgrId, theIO->getEntry(), VISIBILITY_PROP, 1 );
-
+
setVisibilityState(theIO->getEntry(), Qtx::ShownState);
delete prs; // delete presentation because displayer is its owner
if ( updateViewer )
vf->Repaint();
delete prs; // delete presentation because displayer is its owner
-
+
int aMgrId = getViewManagerId(vf);
SalomeApp_Study* aStudy = getStudy();
aStudy->setObjectProperty(aMgrId, theIO->getEntry(), VISIBILITY_PROP, 0 );
SOCC_Prs* occPrs = dynamic_cast<SOCC_Prs*>( prs );
if ( !occPrs )
return;
-
+
if ( myType == GEOM_MARKER && !myShape.IsNull() && myShape.ShapeType() == TopAbs_FACE )
{
TopoDS_Face aFace = TopoDS::Face( myShape );
{
SalomeApp_Study* aStudy = getStudy();
if(!aStudy)
- return;
+ return;
if ( !myShape.IsNull() ) {
- bool onlyVertex = (myShape.ShapeType() == TopAbs_VERTEX || isCompoundOfVertices( myShape ));
-
- QString anEntry;
- int aMgrId = -1;
- if(!myIO.IsNull()) {
- aMgrId = getViewManagerId(myViewFrame);
- anEntry = myIO->getEntry();
- }
- bool useStudy = !anEntry.isEmpty() && aMgrId != -1;
- bool useObjColor = false;
- bool useObjMarker = false;
-
- PropMap aPropMap;
- PropMap aDefPropMap;
-
- if(useStudy){
- aPropMap = aStudy->getObjectPropMap(aMgrId,anEntry);
- aDefPropMap = getDefaultPropertyMap(SOCC_Viewer::Type());
- MergePropertyMaps(aPropMap, aDefPropMap);
- }
+ bool onlyVertex = (myShape.ShapeType() == TopAbs_VERTEX || isCompoundOfVertices( myShape ));
+
+ QString anEntry;
+ int aMgrId = -1;
+ if(!myIO.IsNull()) {
+ aMgrId = getViewManagerId(myViewFrame);
+ anEntry = myIO->getEntry();
+ }
+ bool useStudy = !anEntry.isEmpty() && aMgrId != -1;
+ bool useObjColor = false;
+ bool useObjMarker = false;
+
+ PropMap aPropMap;
+ PropMap aDefPropMap;
+
+ if(useStudy){
+ aPropMap = aStudy->getObjectPropMap(aMgrId,anEntry);
+ aDefPropMap = getDefaultPropertyMap(SOCC_Viewer::Type());
+ MergePropertyMaps(aPropMap, aDefPropMap);
+ }
//Handle(GEOM_AISShape) AISShape = new GEOM_AISShape( myShape, "" );
Handle(GEOM_AISShape) AISShape;
AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
// Setup shape properties here ..., e.g. display mode, color, transparency, etc
- if(useStudy) {
- AISShape->SetDisplayMode( aPropMap.value(DISPLAY_MODE_PROP).toInt() );
- AISShape->SetDisplayVectors(aPropMap.value(VECTOR_MODE_PROP).toInt());
-
- //Color property
- if(aPropMap.contains(COLOR_PROP)) {
- Quantity_Color quant_col = SalomeApp_Tools::color( aPropMap.value(COLOR_PROP).value<QColor>());
- AISShape->SetShadingColor( quant_col );
- } else
- useObjColor = true;
- }else {
- AISShape->SetDisplayMode( myDisplayMode );
- AISShape->SetShadingColor( myShadingColor );
- }
-
-
+ if(useStudy) {
+ AISShape->SetDisplayMode( aPropMap.value(DISPLAY_MODE_PROP).toInt() );
+ AISShape->SetDisplayVectors(aPropMap.value(VECTOR_MODE_PROP).toInt());
+
+ //Color property
+ if(aPropMap.contains(COLOR_PROP)) {
+ Quantity_Color quant_col = SalomeApp_Tools::color( aPropMap.value(COLOR_PROP).value<QColor>());
+ AISShape->SetShadingColor( quant_col );
+ } else
+ useObjColor = true;
+ }else {
+ AISShape->SetDisplayMode( myDisplayMode );
+ AISShape->SetShadingColor( myShadingColor );
+ }
// Set color and number for iso lines
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QColor col = aResMgr->colorValue( "Geometry", "isos_color",
QColor(int(0.5*255), int(0.5*255), int(0.5*255)) );
Quantity_Color aColor = SalomeApp_Tools::color( col );
-
- //get the ISOS number, set transparency if need
+
+ //get the ISOS number, set transparency if need
int anUIsoNumber, aVIsoNumber;
- if(useStudy) {
- QString anIsos = aPropMap.value(ISOS_PROP).toString();
- QStringList uv = anIsos.split(DIGIT_SEPARATOR);
- anUIsoNumber = uv[0].toInt();
- aVIsoNumber = uv[1].toInt();
- //AISShape->SetTransparency(aPropMap.value(TRANSPARENCY_PROP).toDouble());
- } else {
- anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
- aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
- }
+ if(useStudy) {
+ QString anIsos = aPropMap.value(ISOS_PROP).toString();
+ QStringList uv = anIsos.split(DIGIT_SEPARATOR);
+ anUIsoNumber = uv[0].toInt();
+ aVIsoNumber = uv[1].toInt();
+ //AISShape->SetTransparency(aPropMap.value(TRANSPARENCY_PROP).toDouble());
+ } else {
+ anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
+ aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
+ }
Handle(Prs3d_IsoAspect) anAspect = AISShape->Attributes()->UIsoAspect();
anAspect->SetNumber( anUIsoNumber );
AISShape->SetColor( (Quantity_NameOfColor)GetColor() );
if ( onlyVertex )
{
- if(aPropMap.contains(MARKER_TYPE_PROP)) {
- QStringList aList = aPropMap.value(MARKER_TYPE_PROP).toString().split(DIGIT_SEPARATOR);
- if(aList.size() == 2) { //Standard marker string contains "TypeOfMarker:ScaleOfMarker"
- Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
- int aTypeOfMarker = aList[0].toInt();
- double aScaleOfMarker = aList[1].toDouble();
- anAspect->SetScale( aScaleOfMarker );
- anAspect->SetTypeOfMarker((Aspect_TypeOfMarker) (aTypeOfMarker-1) );
- anAspect->SetColor( (Quantity_NameOfColor)GetColor() );
- AISShape->Attributes()->SetPointAspect( anAspect );
- } else { //Custom marker string contains "IdOfTexsture"
- int textureId = aList[0].toInt();
- Standard_Integer aWidth, aHeight;
- Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( aStudy, textureId, aWidth, aHeight );
- if ( !aTexture.IsNull() ) {
- static int TextureId = 0;
- Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect((Quantity_NameOfColor)GetColor(),
- ++TextureId,
- aWidth, aHeight,
- aTexture );
- AISShape->Attributes()->SetPointAspect( aTextureAspect );
-
- } else {
- useObjMarker = true;
- }
- }
- } else {
- useObjMarker = true;
- }
- }
+ if(aPropMap.contains(MARKER_TYPE_PROP)) {
+ QStringList aList = aPropMap.value(MARKER_TYPE_PROP).toString().split(DIGIT_SEPARATOR);
+ if(aList.size() == 2) { //Standard marker string contains "TypeOfMarker:ScaleOfMarker"
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ int aTypeOfMarker = aList[0].toInt();
+ double aScaleOfMarker = aList[1].toDouble();
+ anAspect->SetScale( aScaleOfMarker );
+ anAspect->SetTypeOfMarker((Aspect_TypeOfMarker) (aTypeOfMarker-1));
+ anAspect->SetColor((Quantity_NameOfColor)GetColor());
+ AISShape->Attributes()->SetPointAspect(anAspect);
+ } else { //Custom marker string contains "IdOfTexsture"
+ int textureId = aList[0].toInt();
+ Standard_Integer aWidth, aHeight;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture =
+#else
+ Handle(Graphic3d_HArray1OfBytes) aTexture =
+#endif
+ GeometryGUI::getTexture(aStudy, textureId, aWidth, aHeight);
+ if (!aTexture.IsNull()) {
+ static int TextureId = 0;
+ Handle(Prs3d_PointAspect) aTextureAspect =
+ new Prs3d_PointAspect ((Quantity_NameOfColor)GetColor(),
+ ++TextureId,
+ aWidth, aHeight,
+ aTexture);
+ AISShape->Attributes()->SetPointAspect(aTextureAspect);
+ } else {
+ useObjMarker = true;
+ }
+ }
+ } else {
+ useObjMarker = true;
+ }
+ }
}
else
{
col = aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) );
aColor = SalomeApp_Tools::color( col );
- if(aPropMap.contains(MARKER_TYPE_PROP)) {
- QStringList aList = aPropMap.value(MARKER_TYPE_PROP).toString().split(DIGIT_SEPARATOR);
- if(aList.size() == 2) { //Standard marker string contains "TypeOfMarker:ScaleOfMarker"
- int aTypeOfMarker = aList[0].toInt();
- double aScaleOfMarker = aList[1].toDouble();
- Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
- anAspect->SetScale( aScaleOfMarker );
- anAspect->SetTypeOfMarker((Aspect_TypeOfMarker) (aTypeOfMarker-1) );
- anAspect->SetColor( aColor );
- AISShape->Attributes()->SetPointAspect( anAspect );
- } else { //Custom marker string contains "IdOfTexsture"
- int textureId = aList[0].toInt();
- Standard_Integer aWidth, aHeight;
- Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( aStudy, textureId, aWidth, aHeight );
- if ( !aTexture.IsNull() ) {
- static int TextureId = 0;
- Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect(aColor,
- ++TextureId,
- aWidth, aHeight,
- aTexture );
- AISShape->Attributes()->SetPointAspect( aTextureAspect );
-
- } else {
- useObjMarker = true;
- }
- }
- } else {
- useObjMarker = true;
- }
- }
- else
- {
+ if(aPropMap.contains(MARKER_TYPE_PROP)) {
+ QStringList aList = aPropMap.value(MARKER_TYPE_PROP).toString().split(DIGIT_SEPARATOR);
+ if(aList.size() == 2) { //Standard marker string contains "TypeOfMarker:ScaleOfMarker"
+ int aTypeOfMarker = aList[0].toInt();
+ double aScaleOfMarker = aList[1].toDouble();
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ anAspect->SetScale( aScaleOfMarker );
+ anAspect->SetTypeOfMarker((Aspect_TypeOfMarker) (aTypeOfMarker-1) );
+ anAspect->SetColor( aColor );
+ AISShape->Attributes()->SetPointAspect( anAspect );
+ } else { //Custom marker string contains "IdOfTexsture"
+ int textureId = aList[0].toInt();
+ Standard_Integer aWidth, aHeight;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture =
+#else
+ Handle(Graphic3d_HArray1OfBytes) aTexture =
+#endif
+ GeometryGUI::getTexture(aStudy, textureId, aWidth, aHeight);
+ if (!aTexture.IsNull()) {
+ static int TextureId = 0;
+ Handle(Prs3d_PointAspect) aTextureAspect =
+ new Prs3d_PointAspect (aColor, ++TextureId, aWidth, aHeight, aTexture);
+ AISShape->Attributes()->SetPointAspect( aTextureAspect );
+ } else {
+ useObjMarker = true;
+ }
+ }
+ } else {
+ useObjMarker = true;
+ }
+ }
+ else {
// Set line aspect
col = aResMgr->colorValue( "Geometry", "wireframe_color", QColor( 255, 255, 0 ) );
aColor = SalomeApp_Tools::color( col );
-
+
Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect();
anAspect->SetColor( aColor );
AISShape->Attributes()->SetLineAspect( anAspect );
-
+
// Set unfree boundaries aspect
anAspect = AISShape->Attributes()->UnFreeBoundaryAspect();
anAspect->SetColor( aColor );
AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
-
+
// Set free boundaries aspect
col = aResMgr->colorValue( "Geometry", "free_bound_color", QColor( 0, 255, 0 ) );
aColor = SalomeApp_Tools::color( col );
-
+
anAspect = AISShape->Attributes()->FreeBoundaryAspect();
anAspect->SetColor( aColor );
AISShape->Attributes()->SetFreeBoundaryAspect( anAspect );
-
+
// Set wire aspect
col = aResMgr->colorValue( "Geometry", "line_color", QColor( 255, 0, 0 ) );
aColor = SalomeApp_Tools::color( col );
-
+
anAspect = AISShape->Attributes()->WireAspect();
anAspect->SetColor( aColor );
AISShape->Attributes()->SetWireAspect( anAspect );
-
+
// bug [SALOME platform 0019868]
// Set deviation angle. Default one is 12 degrees (Prs3d_Drawer.cxx:18)
//AISShape->SetOwnDeviationAngle( 10*PI/180 );
// IMP 0020626
double aDC = 0;
- if(useStudy) {
- aDC = aPropMap.value(DEFLECTION_COEFF_PROP).toDouble();
- }
- else {
- aDC = aResMgr->doubleValue("Geometry", "deflection_coeff", 0.001);
- }
+ if(useStudy) {
+ aDC = aPropMap.value(DEFLECTION_COEFF_PROP).toDouble();
+ }
+ else {
+ aDC = aResMgr->doubleValue("Geometry", "deflection_coeff", 0.001);
+ }
aDC = std::max( aDC, DEFLECTION_MIN ); // to avoid to small values of the coefficient
AISShape->SetOwnDeviationCoefficient(aDC);
AISShape->SetOwner( anObj );
}
- Handle( SALOME_InteractiveObject ) anIO = AISShape->getIO();
- if ( !anIO.IsNull() ) {
- _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIO->getEntry() ) );
- if ( SO ) {
- // get CORBA reference to data object
- CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
- if ( !CORBA::is_nil( object ) ) {
- // downcast to GEOM object
- GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object );
- bool hasColor = false;
- SALOMEDS::Color aSColor = getColor(aGeomObject,hasColor);
- if( hasColor && useObjColor) {
- Quantity_Color aQuanColor( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
- AISShape->SetColor( aQuanColor );
- AISShape->SetShadingColor( aQuanColor );
- if ( onlyVertex ) {
- Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
- anAspect->SetColor( aQuanColor );
- anAspect->SetScale( myScaleOfMarker );
- anAspect->SetTypeOfMarker( myTypeOfMarker );
- AISShape->Attributes()->SetPointAspect( anAspect );
- }
- } else if(!hasColor) {
- //In case if color wasn't defined in the property map of the object
- //and GEOM_Object color also wasn't defined get default color from Resource Mgr.
- QColor col = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
- Quantity_Color aQuanColor = SalomeApp_Tools::color( col );
- AISShape->SetShadingColor( aQuanColor );
- aStudy->setObjectProperty( aMgrId, anIO->getEntry(), COLOR_PROP, col );
- }
-
- // ... marker type
- if(useObjMarker) {
- GEOM::marker_type aType = aGeomObject->GetMarkerType();
- GEOM::marker_size aSize = aGeomObject->GetMarkerSize();
- if ( aType > GEOM::MT_NONE && aType < GEOM::MT_USER && aSize > GEOM::MS_NONE && aSize <= GEOM::MS_70 ) {
- Aspect_TypeOfMarker aMType = (Aspect_TypeOfMarker)( (int)aType-1 );
- double aMSize = ((int)aSize+1)*0.5;
- Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
- anAspect->SetScale( aMSize );
- anAspect->SetTypeOfMarker( aMType );
- Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
- if ( hasColor )
- aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
- anAspect->SetColor( aQuanColor );
- AISShape->Attributes()->SetPointAspect( anAspect );
- }
- else if ( aType == GEOM::MT_USER ) {
- int aTextureId = aGeomObject->GetMarkerTexture();
- Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
- if ( hasColor ) aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
- Standard_Integer aWidth, aHeight;
- Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight );
- if ( !aTexture.IsNull() ) {
- static int TextureId = 0;
- Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect(aQuanColor,
- ++TextureId,
- aWidth, aHeight,
- aTexture );
- AISShape->Attributes()->SetPointAspect( aTextureAspect );
- }
- } else { //Use marker from the preferences
- Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
- anAspect->SetScale( myScaleOfMarker );
- anAspect->SetTypeOfMarker( myTypeOfMarker );
- Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
- if ( hasColor )
- aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
- anAspect->SetColor( aQuanColor );
- AISShape->Attributes()->SetPointAspect( anAspect );
- }
- }
- }
- }
- }
+ Handle( SALOME_InteractiveObject ) anIO = AISShape->getIO();
+ if ( !anIO.IsNull() ) {
+ _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIO->getEntry() ) );
+ if ( SO ) {
+ // get CORBA reference to data object
+ CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
+ if ( !CORBA::is_nil( object ) ) {
+ // downcast to GEOM object
+ GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object );
+ bool hasColor = false;
+ SALOMEDS::Color aSColor = getColor(aGeomObject,hasColor);
+ if( hasColor && useObjColor) {
+ Quantity_Color aQuanColor( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
+ AISShape->SetColor( aQuanColor );
+ AISShape->SetShadingColor( aQuanColor );
+ if ( onlyVertex ) {
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ anAspect->SetColor( aQuanColor );
+ anAspect->SetScale( myScaleOfMarker );
+ anAspect->SetTypeOfMarker( myTypeOfMarker );
+ AISShape->Attributes()->SetPointAspect( anAspect );
+ }
+ } else if(!hasColor) {
+ //In case if color wasn't defined in the property map of the object
+ //and GEOM_Object color also wasn't defined get default color from Resource Mgr.
+ QColor col = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
+ Quantity_Color aQuanColor = SalomeApp_Tools::color( col );
+ AISShape->SetShadingColor( aQuanColor );
+ aStudy->setObjectProperty( aMgrId, anIO->getEntry(), COLOR_PROP, col );
+ }
+
+ // ... marker type
+ if(useObjMarker) {
+ GEOM::marker_type aType = aGeomObject->GetMarkerType();
+ GEOM::marker_size aSize = aGeomObject->GetMarkerSize();
+ if ( aType > GEOM::MT_NONE && aType < GEOM::MT_USER && aSize > GEOM::MS_NONE && aSize <= GEOM::MS_70 ) {
+ Aspect_TypeOfMarker aMType = (Aspect_TypeOfMarker)( (int)aType-1 );
+ double aMSize = ((int)aSize+1)*0.5;
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ anAspect->SetScale( aMSize );
+ anAspect->SetTypeOfMarker( aMType );
+ Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
+ if ( hasColor )
+ aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
+ anAspect->SetColor( aQuanColor );
+ AISShape->Attributes()->SetPointAspect( anAspect );
+ }
+ else if ( aType == GEOM::MT_USER ) {
+ int aTextureId = aGeomObject->GetMarkerTexture();
+ Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
+ if ( hasColor ) aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
+ Standard_Integer aWidth, aHeight;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture =
+#else
+ Handle(Graphic3d_HArray1OfBytes) aTexture =
+#endif
+ GeometryGUI::getTexture(getStudy(), aTextureId, aWidth, aHeight);
+ if (!aTexture.IsNull()) {
+ static int TextureId = 0;
+ Handle(Prs3d_PointAspect) aTextureAspect =
+ new Prs3d_PointAspect(aQuanColor, ++TextureId, aWidth, aHeight, aTexture );
+ AISShape->Attributes()->SetPointAspect( aTextureAspect );
+ }
+ } else { //Use marker from the preferences
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ anAspect->SetScale( myScaleOfMarker );
+ anAspect->SetTypeOfMarker( myTypeOfMarker );
+ Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
+ if ( hasColor )
+ aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
+ anAspect->SetColor( aQuanColor );
+ AISShape->Attributes()->SetPointAspect( anAspect );
+ }
+ }
+ }
+ }
+ }
// AISShape->SetName(???); ??? necessary to set name ???
occPrs->AddObject( AISShape );
if ( !vtkPrs || myShape.IsNull() || !aStudy)
return;
-
+
bool useStudy = false;
PropMap aPropMap;
if ( myType == GEOM_MARKER && myShape.ShapeType() == TopAbs_FACE ) {
//myToActivate = false; // ouv: commented to make the trihedron pickable (see IPAL18657)
GEOM_VTKTrihedron* aTrh = GEOM_VTKTrihedron::New();
-
+
if ( HasColor() ) {
Quantity_Color aColor( (Quantity_NameOfColor)GetColor() );
aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() );
gp_Ax2 anAx2 = aPlane->Pln().Position().Ax2();
aTrh->SetPlacement( new Geom_Axis2Placement( anAx2 ) );
-
+
// if ( SVTK_Viewer* vf = dynamic_cast<SVTK_Viewer*>( GetActiveView() ) )
// aTrh->SetSize( 0.5 * vf->GetTrihedronSize() );
}
useStudy = !anEntry.isEmpty() && aMgrId != -1;
-
+
theActors = vtkActorCollection::New();
GEOM_Actor* aGeomActor = GEOM_Actor::New();
aGeomActor->SetShape(myShape,aDefPropMap.value(DEFLECTION_COEFF_PROP).toDouble(),myType == GEOM_VECTOR);
theActors->AddItem(aGeomActor);
aGeomActor->Delete();
-
+
if(useStudy) {
aPropMap = aStudy->getObjectPropMap(aMgrId,anEntry);
MergePropertyMaps(aPropMap, aDefPropMap);
}
theActors->InitTraversal();
-
+
vtkActor* anActor = (vtkActor*)theActors->GetNextActor();
-
+
vtkProperty* aProp = 0;
-
+
if ( HasColor() || HasWidth() )
{
aProp = vtkProperty::New();
GActor->SetProperty( aProp );
GActor->SetPreviewProperty( aProp );
}
-
+
GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( anActor );
if ( aGeomGActor != 0 )
{
- if ( aProp ) {
- aGeomGActor->SetShadingProperty( aProp );
- aGeomGActor->SetWireframeProperty( aProp );
- }
- int aIsos[2]= { 1, 1 };
- if(useStudy) {
- QString anIsos = aPropMap.value(ISOS_PROP).toString();
- QStringList uv = anIsos.split(DIGIT_SEPARATOR);
- aIsos[0] = uv[0].toInt(); aIsos[1] = uv[1].toInt();
- aGeomGActor->SetNbIsos(aIsos);
- aGeomGActor->SetOpacity(1.0 - aPropMap.value(TRANSPARENCY_PROP).toDouble());
- aGeomGActor->SetVectorMode(aPropMap.value(VECTOR_MODE_PROP).toInt());
- aGeomGActor->setDisplayMode(aPropMap.value(DISPLAY_MODE_PROP).toInt());
- aGeomGActor->SetDeflection(aPropMap.value(DEFLECTION_COEFF_PROP).toDouble());
-
- vtkFloatingPointType aColor[3] = {1.,0.,0.};
- if(aPropMap.contains(COLOR_PROP)) {
- QColor c = aPropMap.value(COLOR_PROP).value<QColor>();
- aColor[0] = c.red()/255.; aColor[1] = c.green()/255.; aColor[2] = c.blue()/255.;
- } else { //Get Color from geom object
- Handle( SALOME_InteractiveObject ) anIO = aGeomGActor->getIO();
- if ( !anIO.IsNull() ) {
- _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIO->getEntry() ) );
- if ( SO ) {
- // get CORBA reference to data object
- CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
- if ( !CORBA::is_nil( object ) ) {
- // downcast to GEOM object
- GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object );
- bool hasColor = false;
- SALOMEDS::Color aSColor = getColor(aGeomObject,hasColor);
- if(hasColor) {
- aColor[0] = aSColor.R; aColor[1] = aSColor.G; aColor[2] = aSColor.B;
- } else {
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- if(aResMgr) {
- QColor c = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
- aColor[0] = c.red()/255.; aColor[1] = c.green()/255.; aColor[2] = c.blue()/255.;
- aStudy->setObjectProperty( aMgrId, anIO->getEntry(), COLOR_PROP, c );
- }
- }
- }
- }
- }
- }
- aGeomGActor->SetColor(aColor[0],aColor[1],aColor[2]);
- }
+ if ( aProp ) {
+ aGeomGActor->SetShadingProperty( aProp );
+ aGeomGActor->SetWireframeProperty( aProp );
+ }
+ int aIsos[2]= { 1, 1 };
+ if(useStudy) {
+ QString anIsos = aPropMap.value(ISOS_PROP).toString();
+ QStringList uv = anIsos.split(DIGIT_SEPARATOR);
+ aIsos[0] = uv[0].toInt(); aIsos[1] = uv[1].toInt();
+ aGeomGActor->SetNbIsos(aIsos);
+ aGeomGActor->SetOpacity(1.0 - aPropMap.value(TRANSPARENCY_PROP).toDouble());
+ aGeomGActor->SetVectorMode(aPropMap.value(VECTOR_MODE_PROP).toInt());
+ aGeomGActor->setDisplayMode(aPropMap.value(DISPLAY_MODE_PROP).toInt());
+ aGeomGActor->SetDeflection(aPropMap.value(DEFLECTION_COEFF_PROP).toDouble());
+
+ vtkFloatingPointType aColor[3] = {1.,0.,0.};
+ if(aPropMap.contains(COLOR_PROP)) {
+ QColor c = aPropMap.value(COLOR_PROP).value<QColor>();
+ aColor[0] = c.red()/255.; aColor[1] = c.green()/255.; aColor[2] = c.blue()/255.;
+ } else { //Get Color from geom object
+ Handle( SALOME_InteractiveObject ) anIO = aGeomGActor->getIO();
+ if ( !anIO.IsNull() ) {
+ _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIO->getEntry() ) );
+ if ( SO ) {
+ // get CORBA reference to data object
+ CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
+ if ( !CORBA::is_nil( object ) ) {
+ // downcast to GEOM object
+ GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object );
+ bool hasColor = false;
+ SALOMEDS::Color aSColor = getColor(aGeomObject,hasColor);
+ if(hasColor) {
+ aColor[0] = aSColor.R; aColor[1] = aSColor.G; aColor[2] = aSColor.B;
+ } else {
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ if(aResMgr) {
+ QColor c = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
+ aColor[0] = c.red()/255.; aColor[1] = c.green()/255.; aColor[2] = c.blue()/255.;
+ aStudy->setObjectProperty( aMgrId, anIO->getEntry(), COLOR_PROP, c );
+ }
+ }
+ }
+ }
+ }
+ }
+ aGeomGActor->SetColor(aColor[0],aColor[1],aColor[2]);
+ }
}
if ( myToActivate )
if ( theModes.Extent() == 1 )
{
int aMode = TColStd_MapIteratorOfMapOfInteger( theModes ).Key();
-
+
if ( aMode == GEOM_COMPOUNDFILTER )
aFilter = getComplexFilter( theSubShapes );
- else
+ else
aFilter = getFilter( aMode );
}
else if ( theModes.Extent() > 1 )
int aMode = anIter.Key();
if ( aMode == GEOM_COMPOUNDFILTER )
aFilter = getComplexFilter( theSubShapes );
- else
+ else
aFilter = getFilter( aMode );
if ( aFilter )
AIS_ListIteratorOfListOfInteractive it( objects );
for ( ; it.More(); it.Next() ) {
Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() );
- if ( sh.IsNull() ) continue;
- Handle(SALOME_InteractiveObject) IO = sh->getIO();
- if ( IO.IsNull() ) continue;
- PropMap aPropMap = aStudy->getObjectPropMap( aMgrId, IO->getEntry() );
- if ( aPropMap.contains( TRANSPARENCY_PROP ) ) {
- double transparency = aPropMap.value(TRANSPARENCY_PROP).toDouble();
- ic->SetTransparency( sh, transparency, true );
- }
+ if ( sh.IsNull() ) continue;
+ Handle(SALOME_InteractiveObject) IO = sh->getIO();
+ if ( IO.IsNull() ) continue;
+ PropMap aPropMap = aStudy->getObjectPropMap( aMgrId, IO->getEntry() );
+ if ( aPropMap.contains( TRANSPARENCY_PROP ) ) {
+ double transparency = aPropMap.value(TRANSPARENCY_PROP).toDouble();
+ ic->SetTransparency( sh, transparency, true );
+ }
}
}
}
void GEOM_Displayer::UnsetColor()
{
myColor = -1;
-
+
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
myShadingColor = SalomeApp_Tools::color( col );
PropMap GEOM_Displayer::getDefaultPropertyMap(const QString& viewer_type) {
PropMap aDefaultMap;
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- //1. Visibility
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ //1. Visibility
aDefaultMap.insert(VISIBILITY_PROP , 1);
//2. Nb Isos
//5. Vector Mode
aDefaultMap.insert( VECTOR_MODE_PROP , 0);
-
+
//6. Color
QColor col = aResMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
aDefaultMap.insert( COLOR_PROP , col);
-
+
//7. Deflection Coeff
double aDC;
if ( app && !theGeomObject->_is_nil()) {
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-
+
if ( study ) {
aSColor = theGeomObject->GetColor();
hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0;
if( !hasColor && theGeomObject->GetType() == GEOM_GROUP ) { // auto color for group
- GEOM::GEOM_Gen_var theGeomGen = GeometryGUI::GetGeomGen();
- GEOM::GEOM_IGroupOperations_var anOperations = theGeomGen->GetIGroupOperations( study->id() );
- GEOM::GEOM_Object_var aMainObject = anOperations->GetMainShape( theGeomObject );
- if ( !aMainObject->_is_nil() && aMainObject->GetAutoColor() )
- {
- QList<SALOMEDS::Color> aReservedColors;
-
- SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( app );
- CORBA::String_var IOR = app->orb()->object_to_string( aMainObject );
- if ( strcmp(IOR.in(), "") != 0 )
- {
- _PTR(Study) aStudy = study->studyDS();
- _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( std::string(IOR) ) );
- _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) );
- for( ; it->More(); it->Next() )
- {
- _PTR(SObject) aChildSObject( it->Value() );
- GEOM::GEOM_Object_var aChildObject =
- GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject));
- if( CORBA::is_nil( aChildObject ) )
- continue;
-
- if( aChildObject->GetType() != GEOM_GROUP )
- continue;
-
- SALOMEDS::Color aReservedColor = aChildObject->GetColor();
- aReservedColors.append( aReservedColor );
- }
- }
-
- aSColor = getUniqueColor( aReservedColors );
- hasColor = true;
- }
+ GEOM::GEOM_Gen_var theGeomGen = GeometryGUI::GetGeomGen();
+ GEOM::GEOM_IGroupOperations_var anOperations = theGeomGen->GetIGroupOperations( study->id() );
+ GEOM::GEOM_Object_var aMainObject = anOperations->GetMainShape( theGeomObject );
+ if ( !aMainObject->_is_nil() && aMainObject->GetAutoColor() )
+ {
+ QList<SALOMEDS::Color> aReservedColors;
+
+ SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( app );
+ CORBA::String_var IOR = app->orb()->object_to_string( aMainObject );
+ if ( strcmp(IOR.in(), "") != 0 )
+ {
+ _PTR(Study) aStudy = study->studyDS();
+ _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( std::string(IOR) ) );
+ _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) );
+ for( ; it->More(); it->Next() )
+ {
+ _PTR(SObject) aChildSObject( it->Value() );
+ GEOM::GEOM_Object_var aChildObject =
+ GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject));
+ if( CORBA::is_nil( aChildObject ) )
+ continue;
+
+ if( aChildObject->GetType() != GEOM_GROUP )
+ continue;
+
+ SALOMEDS::Color aReservedColor = aChildObject->GetColor();
+ aReservedColors.append( aReservedColor );
+ }
+ }
+
+ aSColor = getUniqueColor( aReservedColors );
+ hasColor = true;
+ }
}
}
}
void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
- const bool eraseOnlyChildren) {
+ const bool eraseOnlyChildren) {
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app )
return;
return;
LightApp_DataObject* parent = appStudy->findObjectByEntry(theIO->getEntry());
-
+
if( !parent)
return;
foreach ( vman, vmans ) {
SUIT_ViewModel* vmod = vman->getViewModel();
view = dynamic_cast<SALOME_View*> ( vmod );
- if ( view )
+ if ( view )
views.append( view );
}
-
+
if( views.count() == 0 )
return;
-
+
//Erase childrens w/o update views
DataObjectList listObj = parent->children( true );
SUIT_DataObject* obj;
LightApp_DataObject* l_obj = dynamic_cast<LightApp_DataObject*>(obj);
if(l_obj)
foreach ( view, views ) {
- Handle(SALOME_InteractiveObject) anIO =
- new SALOME_InteractiveObject(qPrintable(l_obj->entry()), "GEOM", "");
+ Handle(SALOME_InteractiveObject) anIO =
+ new SALOME_InteractiveObject(qPrintable(l_obj->entry()), "GEOM", "");
Erase(anIO, false, false, view);
}
}
-
+
//Erase parent with view update or repaint views
foreach ( view, views ) {
if(!eraseOnlyChildren)
#include <SALOMEDSClient_ClientFactory.hxx>
#include <SALOMEDSClient_IParameters.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
// External includes
#include <QMenu>
#include <QTime>
#include <Aspect_TypeOfMarker.hxx>
#include <OSD_SharedLibrary.hxx>
#include <NCollection_DataMap.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
#include <Graphic3d_HArray1OfBytes.hxx>
+#endif
#include <utilities.h>
return "";
}
-Handle(Graphic3d_HArray1OfBytes) GeometryGUI::getTexture( SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight )
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture
+#else
+Handle(Graphic3d_HArray1OfBytes) GeometryGUI::getTexture
+#endif
+ (SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight)
{
theWidth = theHeight = 0;
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture;
+#else
Handle(Graphic3d_HArray1OfBytes) aTexture;
- if ( theStudy ) {
+#endif
+
+ if (theStudy) {
TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
aTexture = aTextureMap[ theId ];
if ( aTexture.IsNull() ) {
if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
theWidth = aWidth;
theHeight = aHeight;
- aTexture = new Graphic3d_HArray1OfBytes( 1, aStream->length() );
- for ( int i = 0; i < aStream->length(); i++ )
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ aTexture = new TColStd_HArray1OfByte (1, aStream->length());
+#else
+ aTexture = new Graphic3d_HArray1OfBytes (1, aStream->length());
+#endif
+
+ for (int i = 0; i < aStream->length(); i++)
aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
aTextureMap[ theId ] = aTexture;
}
int operationsGroup = addPreference( tr( "PREF_GROUP_OPERATIONS" ), tabId );
setPreferenceProperty( operationsGroup, "columns", 2 );
-
+
addPreference( tr( "GEOM_PREVIEW" ), operationsGroup,
LightApp_Preferences::Bool, "Geometry", "geom_preview" );
-
}
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
for (int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++) {
const ObjMap anObjects = appStudy->getObjectMap(aMgrId);
ObjMap::ConstIterator o_it = anObjects.begin();
- for( ;o_it != anObjects.end(); o_it++ ) {
+ for (; o_it != anObjects.end(); o_it++) {
const PropMap aProps = o_it.value();
//Check that object exists in the study
occParam += QString::number(aMgrId).toLatin1().data();
occParam += NAME_SEPARATOR;
- if(aProps.contains(VISIBILITY_PROP)) {
- param = occParam + VISIBILITY_PROP;
- ip->setParameter(entry, param, aProps.value(VISIBILITY_PROP).toInt() == 1 ? "On" : "Off");
- }
-
- if(aProps.contains(DISPLAY_MODE_PROP)) {
- param = occParam + DISPLAY_MODE_PROP;
- ip->setParameter(entry, param, QString::number(aProps.value(DISPLAY_MODE_PROP).toInt()).toLatin1().data());
- }
-
- if(aProps.contains(COLOR_PROP)) {
- QColor c = aProps.value(COLOR_PROP).value<QColor>();
- QString colorStr = QString::number(c.red()/255.);
- colorStr += DIGIT_SEPARATOR; colorStr += QString::number(c.green()/255.);
- colorStr += DIGIT_SEPARATOR; colorStr += QString::number(c.blue()/255.);
- param = occParam + COLOR_PROP;
- ip->setParameter(entry, param, colorStr.toLatin1().data());
- }
+ if(aProps.contains(VISIBILITY_PROP)) {
+ param = occParam + VISIBILITY_PROP;
+ ip->setParameter(entry, param, aProps.value(VISIBILITY_PROP).toInt() == 1 ? "On" : "Off");
+ }
+
+ if(aProps.contains(DISPLAY_MODE_PROP)) {
+ param = occParam + DISPLAY_MODE_PROP;
+ ip->setParameter(entry, param, QString::number(aProps.value(DISPLAY_MODE_PROP).toInt()).toLatin1().data());
+ }
+
+ if(aProps.contains(COLOR_PROP)) {
+ QColor c = aProps.value(COLOR_PROP).value<QColor>();
+ QString colorStr = QString::number(c.red()/255.);
+ colorStr += DIGIT_SEPARATOR; colorStr += QString::number(c.green()/255.);
+ colorStr += DIGIT_SEPARATOR; colorStr += QString::number(c.blue()/255.);
+ param = occParam + COLOR_PROP;
+ ip->setParameter(entry, param, colorStr.toLatin1().data());
+ }
if(vType == SVTK_Viewer::Type()) {
- if(aProps.contains(OPACITY_PROP)) {
- param = occParam + OPACITY_PROP;
- ip->setParameter(entry, param, QString::number(1. - aProps.value(TRANSPARENCY_PROP).toDouble()).toLatin1().data());
- }
+ if(aProps.contains(OPACITY_PROP)) {
+ param = occParam + OPACITY_PROP;
+ ip->setParameter(entry, param, QString::number(1. - aProps.value(TRANSPARENCY_PROP).toDouble()).toLatin1().data());
+ }
} else if (vType == SOCC_Viewer::Type()) {
- if(aProps.contains(TRANSPARENCY_PROP)) {
- param = occParam + TRANSPARENCY_PROP;
- ip->setParameter(entry, param, QString::number(aProps.value(TRANSPARENCY_PROP).toDouble()).toLatin1().data());
- }
+ if(aProps.contains(TRANSPARENCY_PROP)) {
+ param = occParam + TRANSPARENCY_PROP;
+ ip->setParameter(entry, param, QString::number(aProps.value(TRANSPARENCY_PROP).toDouble()).toLatin1().data());
+ }
+ }
+
+ if(aProps.contains(ISOS_PROP)) {
+ param = occParam + ISOS_PROP;
+ ip->setParameter(entry, param, aProps.value(ISOS_PROP).toString().toLatin1().data());
+ }
+
+ if(aProps.contains(VECTOR_MODE_PROP)) {
+ param = occParam + VECTOR_MODE_PROP;
+ ip->setParameter(entry, param, QString::number(aProps.value(VECTOR_MODE_PROP).toInt()).toLatin1().data());
+ }
+
+ if(aProps.contains(DEFLECTION_COEFF_PROP)) {
+ param = occParam + DEFLECTION_COEFF_PROP;
+ ip->setParameter(entry, param, QString::number(aProps.value(DEFLECTION_COEFF_PROP).toDouble()).toLatin1().data());
}
- if(aProps.contains(ISOS_PROP)) {
- param = occParam + ISOS_PROP;
- ip->setParameter(entry, param, aProps.value(ISOS_PROP).toString().toLatin1().data());
- }
-
- if(aProps.contains(VECTOR_MODE_PROP)) {
- param = occParam + VECTOR_MODE_PROP;
- ip->setParameter(entry, param, QString::number(aProps.value(VECTOR_MODE_PROP).toInt()).toLatin1().data());
- }
-
- if(aProps.contains(DEFLECTION_COEFF_PROP)) {
- param = occParam + DEFLECTION_COEFF_PROP;
- ip->setParameter(entry, param, QString::number(aProps.value(DEFLECTION_COEFF_PROP).toDouble()).toLatin1().data());
- }
-
//Marker type of the vertex - ONLY for the "Vertex" and "Compound of the Vertex"
if(aProps.contains(MARKER_TYPE_PROP)) {
param = occParam + MARKER_TYPE_PROP;
ip->setParameter(entry, param, aProps.value(MARKER_TYPE_PROP).toString().toLatin1().data());
- }
+ }
} // object iterator
} // for (views)
} // for (viewManagers)
QList<SUIT_ViewManager*> lst = getApp()->viewManagers();
- for (int index = 0 ; index < aListOfMap.count(); index++) {
+ for (int index = 0; index < aListOfMap.count(); index++) {
appStudy->setObjectPropMap(index, entry, aListOfMap[index]);
\brief Return \c true if rename operation finished successfully, \c false otherwise.
*/
bool GeometryGUI::renameObject( const QString& entry, const QString& name) {
-
+
bool appRes = SalomeApp_Module::renameObject(entry,name);
if( !appRes )
return false;
-
+
bool result = false;
-
+
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
- SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
+ SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
if(!appStudy)
return result;
if ( obj ) {
if ( obj->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) aName (anAttr);
-
+
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
if (!CORBA::is_nil(anObj)) {
- aName->SetValue( name.toLatin1().data() ); // rename the SObject
- anObj->SetName( name.toLatin1().data() ); // Rename the corresponding GEOM_Object
- result = true;
+ aName->SetValue( name.toLatin1().data() ); // rename the SObject
+ anObj->SetName( name.toLatin1().data() ); // Rename the corresponding GEOM_Object
+ result = true;
}
}
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
// File : GeometryGUI.h
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#ifndef GEOMETRYGUI_H
#define GEOMETRYGUI_H
#include "GEOM_GEOMGUI.hxx"
+#include <CASCatch_OCCTVersion.hxx>
+
#include <SalomeApp_Module.h>
#include <GEOM_Client.hxx>
// OCCT Includes
#include <gp_Ax3.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
#include <Graphic3d_HArray1OfBytes.hxx>
+#endif
// IDL headers
#include "SALOMEconfig.h"
virtual void initialize( CAM_Application* );
virtual QString engineIOR() const;
- static Handle(Graphic3d_HArray1OfBytes) getTexture( SalomeApp_Study*, int, int&, int& );
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ static Handle(TColStd_HArray1OfByte) getTexture (SalomeApp_Study*, int, int&, int&);
+#else
+ static Handle(Graphic3d_HArray1OfBytes) getTexture (SalomeApp_Study*, int, int&, int&);
+#endif
static bool InitGeomGen();
private:
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
+#else
typedef QMap<long, Handle(Graphic3d_HArray1OfBytes)> TextureMap;
+#endif
+
typedef QMap<long, TextureMap> StudyTextureMap;
typedef QMap<QString, GEOMGUI*> GUIMap;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <GEOMImpl_I3DPrimOperations.hxx>
#include "utilities.h"
//Compute the box value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Box value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Face
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Face
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Disk value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Disk value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Disk
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Cylinder value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Cylinder value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Cone value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Cone value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Sphere value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Sphere value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Torus value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Torus value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Prism value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Pipe value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Revolution value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Revolution value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Solid value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the ThruSections value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Pipe value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Pipe value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Pipe value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Pipe value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
#include <Standard_Stream.hxx>
+
#include "GEOMImpl_Types.hxx"
#include "GEOMImpl_IAdvancedOperations.hxx"
#include "GEOMImpl_IBasicOperations.hxx"
#include "GEOMImpl_Gen.hxx"
+#include <CASCatch_OCCTVersion.hxx>
+
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
}
Handle(GEOM_Object) edge_e1, edge_e2;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
edge_e2 = myBasicOperations->MakeLineTwoPnt(ve2, vi2);
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the resulting value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_IBasicOperations.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
//Compute the point value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the point value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the point value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the point value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the vector value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Vector value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Vector value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Line value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Line value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Line value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the marker value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the marker value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the marker value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Plane value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode(OK);
return aPlane;
}
-
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifdef WNT
#pragma warning( disable:4786 )
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#include <BlockFix_CheckTool.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Block value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Block value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Blocks Compound value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Edge value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopTools_IndexedDataMapOfShapeListOfShape MVE;
//Compute the Edge value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
// Compute the result
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
//Check
isCompOfBlocks = Standard_True;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopTools_MapOfShape mapShape;
//Compute the fixed shape
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the fixed shape
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Explode
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
//Compute the Block value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape aShape;
//Compute the Block value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
// 1. Explode compound on solids
//Get the Blocks
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopTools_MapOfShape mapShape;
//Compute the transformation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the transformation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_PartitionDriver.hxx>
#include <GEOMImpl_IPartition.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <TDF_Tool.hxx>
#include "utilities.h"
//Compute the Boolean value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Partition
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Partition value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifdef WNT
// E.A. : On windows with python 2.6, there is a conflict
#include <Standard_Stream.hxx>
#include <GEOMImpl_ICurvesOperations.hxx>
-
-#include <TColStd_HArray1OfReal.hxx>
+#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
-#include <GEOMImpl_Types.hxx>
-
#include <GEOMImpl_PolylineDriver.hxx>
#include <GEOMImpl_CircleDriver.hxx>
#include <GEOMImpl_SplineDriver.hxx>
#include <GEOMImpl_ISketcher.hxx>
#include <GEOMImpl_I3DSketcher.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <TDF_Tool.hxx>
+#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//Compute the Circle value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Circle value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Circle value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Ellipse value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Add a new Circle Arc function
Handle(GEOM_Function) aFunction =
- anArc->AddFunction(GEOMImpl_ArcDriver::GetID(), CIRC_ARC_THREE_PNT);
+ anArc->AddFunction(GEOMImpl_ArcDriver::GetID(), CIRC_ARC_THREE_PNT);
if (aFunction.IsNull()) return NULL;
-
+
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_ArcDriver::GetID()) return NULL;
GEOMImpl_IArc aCI (aFunction);
Handle(GEOM_Function) aRefPnt1 = thePnt1->GetLastFunction();
Handle(GEOM_Function) aRefPnt2 = thePnt2->GetLastFunction();
Handle(GEOM_Function) aRefPnt3 = thePnt3->GetLastFunction();
-
if (aRefPnt1.IsNull() || aRefPnt2.IsNull() || aRefPnt3.IsNull()) return NULL;
aCI.SetPoint1(aRefPnt1);
aCI.SetPoint2(aRefPnt2);
aCI.SetPoint3(aRefPnt3);
-
+
//Compute the Arc value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Arc value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
anArc->AddFunction(GEOMImpl_ArcDriver::GetID(), ELLIPSE_ARC_CENTER_TWO_PNT);
if (aFunction.IsNull()) return NULL;
-
+
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_ArcDriver::GetID()) return NULL;
GEOMImpl_IArc aCI (aFunction);
Handle(GEOM_Function) aRefPnt1 = thePnt1->GetLastFunction();
Handle(GEOM_Function) aRefPnt2 = thePnt2->GetLastFunction();
Handle(GEOM_Function) aRefPnt3 = thePnt3->GetLastFunction();
-
if (aRefPnt1.IsNull() || aRefPnt2.IsNull() || aRefPnt3.IsNull()) return NULL;
aCI.SetPoint1(aRefPnt1);
aCI.SetPoint2(aRefPnt2);
aCI.SetPoint3(aRefPnt3);
-
+
//Compute the Arc value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Polyline value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Spline value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Spline value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
* MakeCurveParametric
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric(const char* thexExpr, const char* theyExpr, const char* thezExpr,
- double theParamMin, double theParamMax, double theParamStep,
- CurveType theCurveType) {
+Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
+ (const char* thexExpr, const char* theyExpr, const char* thezExpr,
+ double theParamMin, double theParamMax, double theParamStep,
+ CurveType theCurveType)
+{
TCollection_AsciiString aPyScript;
aPyScript +="from math import * \n";
aPyScript +="def X(t): \n";
- aPyScript +=" return ";
+ aPyScript +=" return ";
aPyScript += thexExpr;
- aPyScript += "\n";
+ aPyScript += "\n";
aPyScript +="def Y(t): \n";
aPyScript +=" return ";
aPyScript += theyExpr;
aPyScript += "\n";
-
+
aPyScript +="def Z(t): \n";
aPyScript +=" return ";
aPyScript += thezExpr;
aPyScript += "\n";
-
+
aPyScript +="def coordCalculator(tmin, tmax, tstep): \n";
aPyScript +=" coords = [] \n";
aPyScript +=" while tmin <= tmax : \n";
aPyScript +=" coords.append([X(tmin), Y(tmin), Z(tmin)]) \n";
aPyScript +=" tmin = tmin + tstep \n";
aPyScript +=" return coords \n";
-
+
SetErrorCode(KO);
if(theParamMin >= theParamMax) {
SetErrorCode("Value of the step must be positive !!!");
return NULL;
}
-
+
/* Initialize the Python interpreter */
if (! Py_IsInitialized()) {
SetErrorCode("Python interpreter is not initialized !!! ");
return NULL;
- }
+ }
PyGILState_STATE gstate;
gstate = PyGILState_Ensure();
-
+
PyObject* main_mod = PyImport_AddModule("__main__");
PyObject* main_dict = PyModule_GetDict(main_mod);
PyObject * func = NULL;
func = PyObject_GetAttrString(main_mod, "coordCalculator");
-
+
if (func == NULL){
SetErrorCode("Can't get function from python module !!!");
PyGILState_Release(gstate);
return NULL;
}
-
+
PyObject* coords = PyObject_CallFunction(func,(char*)"(d, d, d)", theParamMin, theParamMax, theParamStep );
PyObject* new_stderr = NULL;
if(PyList_Size( coords ) <= 0) {
SetErrorCode("Empty list of the points, please check input parameters !!!");
return NULL;
- }
+ }
int k=1;
for ( Py_ssize_t i = 0; i< PyList_Size( coords ); ++i ) {
PyObject* coord = PyList_GetItem( coords, i );
if (coord != NULL) {
for ( Py_ssize_t j = 0; j < PyList_Size(coord); ++j) {
- PyObject* item = PyList_GetItem(coord, j);
- aCoordsArray->SetValue(k, PyFloat_AsDouble(item));
- k++;
+ PyObject* item = PyList_GetItem(coord, j);
+ aCoordsArray->SetValue(k, PyFloat_AsDouble(item));
+ k++;
}
}
}
Py_DECREF(coords);
-
-
PyGILState_Release(gstate);
- Handle(GEOM_Object) aCurve;
+ Handle(GEOM_Object) aCurve;
Handle(GEOM_Function) aFunction;
TCollection_AsciiString aCurveType;
-
+
switch(theCurveType) {
case Polyline: {
//Add a new Polyline object
aCurve = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
-
+
//Add a new Polyline function for creation a polyline relatively to points set
aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
if (aFunction.IsNull()) return NULL;
-
+
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_PolylineDriver::GetID()) return NULL;
aFunction =
aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
if (aFunction.IsNull()) return NULL;
-
+
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_SplineDriver::GetID()) return NULL;
-
+
GEOMImpl_ISpline aCI (aFunction);
aCI.SetLength(PyList_Size( coords ));
//Add a new Spline function for creation a bezier curve relatively to points set
aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
if (aFunction.IsNull()) return NULL;
-
+
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_SplineDriver::GetID()) return NULL;
//Compute the Curve value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode(aFail->GetMessageString());
return NULL;
}
-
+
//Make a Python command
GEOM::TPythonDump pd (aFunction);
pd << aCurve << " = geompy.MakeCurveParametric(";
pd << "\"" << thexExpr << "\", ";
pd << "\"" << theyExpr << "\", ";
pd << "\"" << thezExpr << "\", ";
-
+
pd << theParamMin <<", ";
pd << theParamMax <<", ";
pd << theParamStep <<", ";
pd << aCurveType.ToCString() <<")";
-
+
SetErrorCode(OK);
return aCurve;
}
//Compute the Sketcher value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
aCoordsArray->SetValue(ind, *it);
aCI.SetCoordinates(aCoordsArray);
-
+
//Compute the Sketcher value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Sketcher value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode(OK);
return aSketcher;
}
-
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifdef WNT
#pragma warning( disable:4786 )
#include <GEOMImpl_IHealing.hxx>
#include <GEOMImpl_CopyDriver.hxx>
-#include <ShHealOper_ShapeProcess.hxx>
+#include <CASCatch_OCCTVersion.hxx>
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
+#include <ShHealOper_ShapeProcess.hxx>
+
#include <ShapeAnalysis_FreeBounds.hxx>
#include <TopoDS_Compound.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-#ifdef OCC_VERSION_SERVICEPACK
-#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
-#else
-#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
-#endif
-
-
//=============================================================================
/*!
* constructor:
*/
//=============================================================================
-
GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
{
* destructor
*/
//=============================================================================
-
GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations()
{
MESSAGE("GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations");
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction))
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Compute
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_IInsertOperations.hxx>
+#include <GEOMImpl_CopyDriver.hxx>
+#include <GEOMImpl_ExportDriver.hxx>
+#include <GEOMImpl_ImportDriver.hxx>
+#include <GEOMImpl_ICopy.hxx>
+#include <GEOMImpl_IImportExport.hxx>
+#include <GEOMImpl_Types.hxx>
+
+#include <GEOM_Function.hxx>
+#include <GEOM_PythonDump.hxx>
+
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
#include <TFunction_Logbook.hxx>
#include <TDF_Tool.hxx>
-#include <GEOM_Function.hxx>
-#include <GEOM_PythonDump.hxx>
-
-#include <GEOMImpl_CopyDriver.hxx>
-#include <GEOMImpl_ExportDriver.hxx>
-#include <GEOMImpl_ImportDriver.hxx>
-
-#include <GEOMImpl_ICopy.hxx>
-#include <GEOMImpl_IImportExport.hxx>
-
-#include <GEOMImpl_Types.hxx>
-
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
#include <TDataStd_HArray1OfByte.hxx>
+#endif
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//Compute the Copy value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Perform the Export
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Perform the Import
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
if (theTextureFile.IsEmpty()) return 0;
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture;
+#else
Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
FILE* fp = fopen(theTextureFile.ToCString(), "r");
if (!fp) return 0;
if (bytedata.empty() || bytedata.size() != lines.size()*lenbytes)
return 0;
- aTexture = new TDataStd_HArray1OfByte(1, lines.size()*lenbytes);
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ aTexture = new TColStd_HArray1OfByte (1, lines.size()*lenbytes);
+#else
+ aTexture = new TDataStd_HArray1OfByte (1, lines.size()*lenbytes);
+#endif
+
std::list<unsigned char>::iterator bdit;
int i;
for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
}
int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ const Handle(TColStd_HArray1OfByte)& theTexture)
+#else
const Handle(TDataStd_HArray1OfByte)& theTexture)
+#endif
{
SetErrorCode(KO);
int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
return aTextureId;
}
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theTextureId,
+#else
Handle(TDataStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theTextureId,
+#endif
int& theWidth, int& theHeight)
{
SetErrorCode(KO);
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture;
+#else
Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
+
theWidth = theHeight = 0;
TCollection_AsciiString aFileName;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMImpl_IInsertOperations_HXX_
#define _GEOMImpl_IInsertOperations_HXX_
-#include "Utils_SALOME_Exception.hxx"
#include "GEOM_IOperations.hxx"
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
+
+#include <CASCatch_OCCTVersion.hxx>
+
+#include "Utils_SALOME_Exception.hxx"
+
#include <TDocStd_Document.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TCollection_HAsciiString.hxx>
#include <Resource_Manager.hxx>
+
#include <list>
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+class Handle_TColStd_HArray1OfByte;
+#else
class Handle_TDataStd_HArray1OfByte;
+#endif
class GEOMImpl_IInsertOperations : public GEOM_IOperations {
public:
Handle(TCollection_HAsciiString)& theLibName);
Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile);
-
- Standard_EXPORT int AddTexture(int theWidth, int theHeight,
+
+ Standard_EXPORT int AddTexture(int theWidth, int theHeight,
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ const Handle(TColStd_HArray1OfByte)& theTexture);
+#else
const Handle(TDataStd_HArray1OfByte)& theTexture);
+#endif
- Standard_EXPORT Handle(TDataStd_HArray1OfByte) GetTexture(int theTextureId,
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Standard_EXPORT Handle(TColStd_HArray1OfByte) GetTexture(int theTextureId,
+#else
+ Standard_EXPORT Handle(TDataStd_HArray1OfByte) GetTexture(int theTextureId,
+#endif
int& theWidth, int& theHeight);
Standard_EXPORT std::list<int> GetAllTextures();
-
+
private:
Standard_Boolean InitResMgr ();
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
-#include <GEOM_Function.hxx>
-#include <GEOM_PythonDump.hxx>
-
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_FilletDriver.hxx>
#include <GEOMImpl_Gen.hxx>
#include <GEOMImpl_IShapesOperations.hxx>
+#include <GEOM_Function.hxx>
+#include <GEOM_PythonDump.hxx>
+
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Fillet value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Chamfer value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Archimede value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOM_Function.hxx>
#include <GEOM_PythonDump.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
//Compute the CentreOfMass value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Normale value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the parameters
GProp_GProps LProps, SProps;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
BRepGProp::LinearProperties(aShape, LProps);
GProp_GProps System;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (aShape.ShapeType() == TopAbs_VERTEX ||
Bnd_Box B;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
BRepBndLib::Add(aShape, B);
FaceMax = EdgeMax = VertMax = -RealLast();
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
for (TopExp_Explorer ExF (aShape, TopAbs_FACE); ExF.More(); ExF.Next()) {
//Compute the parameters
bool isValid = false;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
BRepCheck_Analyzer ana (aShape, theIsCheckGeom);
Astr = Astr + " Number of sub-shapes : \n";
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
int iType, nbTypes [TopAbs_SHAPE];
//Compute the parameters
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Edge E1 = TopoDS::Edge(aLine1);
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Edge aE1 = TopoDS::Edge(aVec1);
//Compute curvature
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
GeomLProp_CLProps Prop = GeomLProp_CLProps
//Compute curvature
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
GeomAPI_ProjectPointOnCurve PPCurve(aPoint, aCurve, aFP, aLP);
if (aSurf.IsNull()) return aRes;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
GeomLProp_SLProps Prop = GeomLProp_SLProps
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File : GEOMImpl_IShapesOperations.cxx
// Created :
#include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
#include "GEOMAlgo_ListOfCoupleOfShapes.hxx"
+#include <CASCatch_OCCTVersion.hxx>
+
#include "utilities.h"
#include "OpUtil.hxx"
#include "Utils_ExceptHandlers.hxx"
//Compute the Edge value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Edge value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Edge value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the shape
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Face value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the shape
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the shape
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
*/
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
int iType, nbTypes [TopAbs_SHAPE];
//Compute the sub-shape value
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
// Compute tolerance
Standard_Real T, VertMax = -RealLast();
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
for (TopExp_Explorer ExV (theShape, TopAbs_VERTEX); ExV.More(); ExV.Next()) {
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_ITransformOperations.hxx>
-#include "utilities.h"
-#include <OpUtil.hxx>
-#include <Utils_ExceptHandlers.hxx>
-
-#include <GEOM_Function.hxx>
-#include <GEOM_PythonDump.hxx>
-
#include <GEOMImpl_TranslateDriver.hxx>
#include <GEOMImpl_MirrorDriver.hxx>
#include <GEOMImpl_ProjectionDriver.hxx>
#include <GEOMImpl_Types.hxx>
+#include <GEOM_Function.hxx>
+#include <GEOM_PythonDump.hxx>
+
+#include <CASCatch_OCCTVersion.hxx>
+
+#include "utilities.h"
+#include <OpUtil.hxx>
+#include <Utils_ExceptHandlers.hxx>
+
#include <TFunction_DriverTable.hxx>
#include <TFunction_Driver.hxx>
#include <TFunction_Logbook.hxx>
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the mirror
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the offset
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the offset
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Projection
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the scale
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the scale
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the scale
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the Position
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the position
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath
- (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePath,
+ (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePath,
double theDistance, bool theCopy, bool theReverse)
{
SetErrorCode(KO);
//Compute the position
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePoints (Handle(GEOM_Object) theObject,
- Handle(GEOM_Object) theCentPoint,
+ Handle(GEOM_Object) theCentPoint,
Handle(GEOM_Object) thePoint1,
Handle(GEOM_Object) thePoint2)
{
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
* RotateThreePointsCopy
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle(GEOM_Object) theObject,
- Handle(GEOM_Object) theCentPoint,
+Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle(GEOM_Object) theObject,
+ Handle(GEOM_Object) theCentPoint,
Handle(GEOM_Object) thePoint1,
Handle(GEOM_Object) thePoint2)
{
//Compute the translation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_ITransformOperations::TransformLikeOtherCopy
- (Handle(GEOM_Object) theObject,
+ (Handle(GEOM_Object) theObject,
Handle(GEOM_Object) theSample)
{
SetErrorCode(KO);
// Compute the transformation
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# GEOM GEOM : implementaion of GEOM_Gen.idl
# File : Makefile.in
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
# $Header:
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# Libraries targets
$(CORBA_INCLUDES) \
$(CAS_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
$(PYTHON_INCLUDES) \
-I$(srcdir)/../ShHealOper \
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
// File : GEOMToolsGUI_1.cxx
// Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
-//
+
#include <PyConsole_Console.h>
#include "GEOMToolsGUI.h"
#include <GEOMBase.h>
#include <GEOM_Actor.h>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <SALOME_ListIO.hxx>
#include <SALOME_ListIteratorOfListIO.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
#include <Graphic3d_HArray1OfBytes.hxx>
+#endif
// QT Includes
#include <QColorDialog>
void GEOMToolsGUI::OnCheckGeometry()
{
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication());
PyConsole_Console* pyConsole = app->pythonConsole();
- if(pyConsole)
+ if (pyConsole)
pyConsole->exec("from GEOM_usinggeom import *");
}
void GEOMToolsGUI::OnAutoColor()
{
SALOME_ListIO selected;
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- if( !app )
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication());
+ if (!app)
return;
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if( !aSelMgr || !appStudy )
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+ if (!aSelMgr || !appStudy)
return;
- aSelMgr->selectedObjects( selected );
- if( selected.IsEmpty() )
+ aSelMgr->selectedObjects(selected);
+ if (selected.IsEmpty())
return;
Handle(SALOME_InteractiveObject) anIObject = selected.First();
_PTR(Study) aStudy = appStudy->studyDS();
- _PTR(SObject) aMainSObject( aStudy->FindObjectID( anIObject->getEntry() ) );
+ _PTR(SObject) aMainSObject(aStudy->FindObjectID(anIObject->getEntry()));
GEOM::GEOM_Object_var aMainObject = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aMainSObject));
- if( CORBA::is_nil( aMainObject ) )
+ if (CORBA::is_nil(aMainObject))
return;
aMainObject->SetAutoColor( true );
else {
Standard_Integer aWidth, aHeight;
aCurPointAspect->GetTextureSize( aWidth, aHeight );
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
+#else
Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#endif
+
aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aQuanColor, 1, aWidth, aHeight, aTexture ) );
}
ic->SetLocalAttributes( io, aCurDrawer );
SUIT_ViewWindow* window = app->desktop()->activeWindow();
bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
- int mgrId = window->getViewManager()->getGlobalId();
+ int mgrId = window->getViewManager()->getGlobalId();
if ( isVTK ) {
SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
if ( !vtkVW )
SUIT_OverrideCursor();
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
aView->SetColor( It.Value(), c );
- appStudy->setObjectProperty(mgrId,It.Value()->getEntry(),COLOR_PROP, c);
- }
+ appStudy->setObjectProperty(mgrId,It.Value()->getEntry(),COLOR_PROP, c);
+ }
GeometryGUI::Modified();
}
} // if ( isVTK )
if ( io->IsKind( STANDARD_TYPE(AIS_Shape) ) ) {
TopoDS_Shape theShape = Handle(AIS_Shape)::DownCast( io )->Shape();
- bool onlyVertex = (theShape.ShapeType() == TopAbs_VERTEX || GEOM_Displayer::isCompoundOfVertices( theShape ));
+ bool onlyVertex = (theShape.ShapeType() == TopAbs_VERTEX || GEOM_Displayer::isCompoundOfVertices( theShape ));
if (onlyVertex) {
// Set color for a point
else {
Standard_Integer aWidth, aHeight;
aCurPointAspect->GetTextureSize( aWidth, aHeight );
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
+#else
Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#endif
+
aCurDrawer->SetPointAspect(new Prs3d_PointAspect(aColor, 1, aWidth, aHeight, aTexture));
}
ic->SetLocalAttributes(io, aCurDrawer, Standard_False);
if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) )
Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aColor );
- appStudy->setObjectProperty(mgrId,It.Value()->getEntry(), COLOR_PROP, c);
+ appStudy->setObjectProperty(mgrId,It.Value()->getEntry(), COLOR_PROP, c);
io->Redisplay( Standard_True );
newNbUIso = NbIsosDlg->getU();
newNbVIso = NbIsosDlg->getV();
} else //Cancel case
- return;
+ return;
}
else if ( actionType == INCR || actionType == DECR ) {
int delta = 1;
for(; ic->MoreCurrent(); ic->NextCurrent()) {
CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-
-
-
+
Handle(AIS_Drawer) CurDrawer = CurObject->Attributes();
CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , newNbUIso) );
ic->SetLocalAttributes(CurObject, CurDrawer);
ic->Redisplay(CurObject);
- QString anIsos("%1%2%3");anIsos = anIsos.arg(newNbUIso);anIsos = anIsos.arg(DIGIT_SEPARATOR);anIsos = anIsos.arg(newNbVIso);
- int aMgrId = window->getViewManager()->getGlobalId();
- aStudy->setObjectProperty(aMgrId ,CurObject->getIO()->getEntry(), "Isos", anIsos);
+ QString anIsos("%1%2%3");anIsos = anIsos.arg(newNbUIso);anIsos = anIsos.arg(DIGIT_SEPARATOR);anIsos = anIsos.arg(newNbVIso);
+ int aMgrId = window->getViewManager()->getGlobalId();
+ aStudy->setObjectProperty(aMgrId ,CurObject->getIO()->getEntry(), "Isos", anIsos);
}
}
GeometryGUI::Modified();
newNbUIso = NbIsosDlg->getU();
newNbVIso = NbIsosDlg->getV();
} else
- return; //Cancel case
+ return; //Cancel case
}
else if ( actionType == INCR || actionType == DECR ) {
int delta = 1;
int aIsos[2]={newNbUIso,newNbVIso};
anActor->SetNbIsos(aIsos);
- QString anIsos("%1%2%3");anIsos = anIsos.arg(newNbUIso);anIsos = anIsos.arg(DIGIT_SEPARATOR);anIsos = anIsos.arg(newNbVIso);
- int aMgrId = window->getViewManager()->getGlobalId();
- aStudy->setObjectProperty(aMgrId ,anActor->getIO()->getEntry(), ISOS_PROP, anIsos);
+ QString anIsos("%1%2%3");anIsos = anIsos.arg(newNbUIso);anIsos = anIsos.arg(DIGIT_SEPARATOR);anIsos = anIsos.arg(newNbVIso);
+ int aMgrId = window->getViewManager()->getGlobalId();
+ aStudy->setObjectProperty(aMgrId ,anActor->getIO()->getEntry(), ISOS_PROP, anIsos);
}
anAct = aCollection->GetNextActor();
}
CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
ic->SetDeviationCoefficient(CurObject, aNewDC, Standard_True);
ic->Redisplay(CurObject);
- appStudy->setObjectProperty(mgrId,CurObject->getIO()->getEntry(), DEFLECTION_COEFF_PROP, aNewDC);
+ appStudy->setObjectProperty(mgrId,CurObject->getIO()->getEntry(), DEFLECTION_COEFF_PROP, aNewDC);
}
}
}
if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
// There are no casting to needed actor.
anActor->SetDeflection(aDC);
- appStudy->setObjectProperty(mgrId, anActor->getIO()->getEntry(), DEFLECTION_COEFF_PROP, aDC);
+ appStudy->setObjectProperty(mgrId, anActor->getIO()->getEntry(), DEFLECTION_COEFF_PROP, aDC);
}
anAct = aCollection->GetNextActor();
}
if ( obj ) {
_PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" );
aExp->SetExpandable( show );
- if(!show)
- disp->EraseWithChildren(IObject,true);
+ if(!show)
+ disp->EraseWithChildren(IObject,true);
} // if ( obj )
} // iterator
}
if ( obj ) {
_PTR(AttributeDrawable) aDrw = B->FindOrCreateAttribute( obj, "AttributeDrawable" );
aDrw->SetDrawable( false );
- disp->EraseWithChildren(IObject);
+ disp->EraseWithChildren(IObject);
} // if ( obj )
} // iterator
aSelMgr->clearSelected();
bool aLocked = ( _PTR(AttributeStudyProperties)( aStudy->GetProperties() ) )->IsLocked();
if ( aLocked ) {
SUIT_MessageBox::warning( app->desktop(),
- QObject::tr( "WRN_WARNING" ),
- QObject::tr( "WRN_STUDY_LOCKED" ) );
+ QObject::tr( "WRN_WARNING" ),
+ QObject::tr( "WRN_STUDY_LOCKED" ) );
return;
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File : GEOMToolsGUI_MarkerDlg.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
+
#include "GEOMToolsGUI_MarkerDlg.h"
#include <GeometryGUI.h>
#include <GEOM_Displayer.h>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <QtxComboBox.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
if (window && window->getViewManager()) {
int mgrId = window->getViewManager()->getGlobalId();
if ( selMgr ) {
- SALOME_ListIO selected;
- selMgr->selectedObjects( selected );
- if ( !selected.IsEmpty() ) {
- _PTR(Study) study = getStudy()->studyDS();
- for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) {
- _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) );
- GEOM::GEOM_Object_var anObject =
- GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) );
- if ( !anObject->_is_nil() ) {
- if ( myWGStack->currentIndex() == 0 ) {
- anObject->SetMarkerStd( getMarkerType(), getStandardMarkerScale() );
- QString aMarker = "%1%2%3";
- aMarker = aMarker.arg(getMarkerType());
- aMarker = aMarker.arg(DIGIT_SEPARATOR);
- aMarker = aMarker.arg(getStandardMarkerScale());
- getStudy()->setObjectProperty(mgrId ,it.Value()->getEntry(),MARKER_TYPE_PROP, aMarker);
- }
- else if ( getCustomMarkerID() > 0 ) {
- anObject->SetMarkerTexture( getCustomMarkerID() );
- getStudy()->setObjectProperty(mgrId ,it.Value()->getEntry(),MARKER_TYPE_PROP, QString::number(getCustomMarkerID()));
- }
- }
- }
- GEOM_Displayer displayer( getStudy() );
- displayer.Redisplay( selected, true );
- selMgr->setSelectedObjects( selected );
- }
+ SALOME_ListIO selected;
+ selMgr->selectedObjects( selected );
+ if ( !selected.IsEmpty() ) {
+ _PTR(Study) study = getStudy()->studyDS();
+ for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) {
+ _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) );
+ GEOM::GEOM_Object_var anObject =
+ GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) );
+ if ( !anObject->_is_nil() ) {
+ if ( myWGStack->currentIndex() == 0 ) {
+ anObject->SetMarkerStd( getMarkerType(), getStandardMarkerScale() );
+ QString aMarker = "%1%2%3";
+ aMarker = aMarker.arg(getMarkerType());
+ aMarker = aMarker.arg(DIGIT_SEPARATOR);
+ aMarker = aMarker.arg(getStandardMarkerScale());
+ getStudy()->setObjectProperty(mgrId ,it.Value()->getEntry(),MARKER_TYPE_PROP, aMarker);
+ }
+ else if ( getCustomMarkerID() > 0 ) {
+ anObject->SetMarkerTexture( getCustomMarkerID() );
+ getStudy()->setObjectProperty(mgrId ,it.Value()->getEntry(),MARKER_TYPE_PROP, QString::number(getCustomMarkerID()));
+ }
+ }
+ }
+ GEOM_Displayer displayer( getStudy() );
+ displayer.Redisplay( selected, true );
+ selMgr->setSelectedObjects( selected );
+ }
}
}
}
{
if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
int tWidth, tHeight;
- Handle(Graphic3d_HArray1OfBytes) texture = GeometryGUI::getTexture( getStudy(), id, tWidth, tHeight );
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
+#else
+ Handle(Graphic3d_HArray1OfBytes) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
+#endif
+
if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
QImage image( tWidth, tHeight, QImage::Format_Mono );
image.setColor( 0, qRgba( 0, 0, 0, 0 ) );
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifdef WNT
#pragma warning( disable:4786 )
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
+#include <CASCatch_OCCTVersion.hxx>
+
#include <TColStd_HSequenceOfAsciiString.hxx>
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+#include <TColStd_HArray1OfByte.hxx>
+#else
#include <TDataStd_HArray1OfByte.hxx>
+#endif
//=============================================================================
/*!
const SALOMEDS::TMPFile& theTexture)
{
GetOperations()->SetNotDone();
+
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTexture;
+#else
Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
+
if ( theTexture.length() > 0 ) {
- aTexture = new TDataStd_HArray1OfByte( 1, theTexture.length() );
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ aTexture = new TColStd_HArray1OfByte (1, theTexture.length());
+#else
+ aTexture = new TDataStd_HArray1OfByte (1, theTexture.length());
+#endif
+
for ( int i = 0; i < theTexture.length(); i++ )
aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
}
CORBA::Long& theHeight)
{
int aWidth, aHeight;
- Handle(TDataStd_HArray1OfByte) aTextureImpl = GetOperations()->GetTexture( theID, aWidth, aHeight );
+#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
+ Handle(TColStd_HArray1OfByte) aTextureImpl =
+#else
+ Handle(TDataStd_HArray1OfByte) aTextureImpl =
+#endif
+ GetOperations()->GetTexture(theID, aWidth, aHeight);
theWidth = aWidth;
theHeight = aHeight;
SALOMEDS::TMPFile_var aTexture;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOM_IInsertOperations_i_HeaderFile
#define _GEOM_IInsertOperations_i_HeaderFile
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# GEOM GEOM : implementaion of GEOM_Gen.idl
# File : Makefile.in
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
# $Header$
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# Libraries targets
$(CAS_CPPFLAGS) \
$(BOOST_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
-I$(srcdir)/../SKETCHER \
-I$(srcdir)/../ARCHIMEDE \
-I$(srcdir)/../GEOMImpl \
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# GEOM GEOM : implementaion of GEOM_Superv.idl
# File : Makefile.in
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
# $Header$
+
# Libraries targets
-#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
$(CAS_CPPFLAGS) \
$(QT_INCLUDES) \
$(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
-// File : MeasureGUI_AngleDlg.cxx
-// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-//
+// File : MeasureGUI_AngleDlg.cxx
+// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
+
#include "MeasureGUI_AngleDlg.h"
#include "MeasureGUI_Widgets.h"
#include <GEOMBase.h>
#include <GeometryGUI.h>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <SUIT_Session.h>
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
if (anAngle > Precision::Angular()) {
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
TopoDS_Shape S1, S2;
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# GEOM NMTTools : partition algorithm
# File : Makefile.in
libNMTTools_la_CPPFLAGS = \
$(CAS_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS) \
-I$(srcdir)/../NMTDS
libNMTTools_la_LDFLAGS = \
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File: NMTTools_PaveFiller_2.cxx
-// Created: Mon Dec 8 12:02:56 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
+// File: NMTTools_PaveFiller_2.cxx
+// Created: Mon Dec 8 12:02:56 2003
+// Author: Peter KURNEV
#include <Standard_Version.hxx>
#include <NMTTools_PaveFiller.ixx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <Precision.hxx>
#include <gp_Pnt.hxx>
const TopoDS_Vertex& aV);
// Contribution of Samtech www.samcef.com END
-// In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
-#ifdef OCC_VERSION_SERVICEPACK
-#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
-#else
-#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
-#endif
-
//=======================================================================
// function: PerformVE
// purpose:
Standard_Integer aWith, aNbVEs, aBlockLength, iSDV, nV1;
Standard_Real aT;
#if OCC_VERSION_LARGE > 0x06030008
+ // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
Standard_Boolean bToUpdateVertex;
Standard_Real aDist;
#endif
//
//modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f
#if OCC_VERSION_LARGE > 0x06030008
- aFlag=myContext.ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
+ // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
+ aFlag = myContext.ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
#else
- aFlag=myContext.ComputeVE (aV1, aE2, aT);
+ aFlag = myContext.ComputeVE (aV1, aE2, aT);
#endif
//modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t
//
//
//modified by NIZNHY-PKV Mon Dec 28 09:00:54 2009f
#if OCC_VERSION_LARGE > 0x06030008
+ // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
if (bToUpdateVertex) {
BRep_Builder aBB;
//
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# File : Makefile.in
# Author : Pavel TELKOV
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
-# $Header$
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
libSTEPImport_la_CPPFLAGS = \
$(CAS_CPPFLAGS) \
- $(KERNEL_CXXFLAGS)
+ $(KERNEL_CXXFLAGS) \
+ $(GUI_CXXFLAGS)
libSTEPImport_la_LDFLAGS = \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
// File: STEPImport.cxx
// Created: Wed May 19 14:41:10 2004
// Author: Pavel TELKOV
#include <Basics_Utils.hxx>
+#include <CASCatch_OCCTVersion.hxx>
+
#include <BRep_Builder.hxx>
#include <IFSelect_ReturnStatus.hxx>
BRep_Builder B;
B.MakeCompound(compound);
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#endif
IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());