Handle(GEOM_Object) Te3;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
Handle(GEOM_Object) Vector_Z = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
Vector_Z->GetLastFunction()->SetDescription("");
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
// Add thickness reduction elements
// at the three extremities: Left, Right and Incident
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (isTRL || isTRR || isTRI) {
TopoDS_Shape aResShape =
MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
// Add thickness reduction elements
// at the three extremities: Left, Right and Incident
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (isTRL || isTRR || isTRI) {
TopoDS_Shape aResShape =
MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
// Add thickness reduction elements
// at the three extremities: Left, Right and Incident
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (isTRL || isTRR || isTRI) {
TopoDS_Shape aResShape =
MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
//Compute the resulting value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("TShape driver failed");
return NULL;
// Add thickness reduction elements
// at the three extremities: Left, Right and Incident
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (isTRL || isTRR || isTRI) {
TopoDS_Shape aResShape =
MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
#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_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;
mySimulationShape1->UnsetColor();
}
if ( !S2.IsNull() ) {
-#if OCC_VERSION_LARGE <= 0x06060000
- ic->Erase( mySimulationShape2, Standard_True, Standard_False );
-#else
ic->Erase( mySimulationShape2, Standard_True );
-#endif
ic->ClearPrs( mySimulationShape2 );
mySimulationShape2 = new AIS_Shape( TopoDS_Shape() );
if ( vw->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
OCCViewer_Viewer* v3d = ( (OCCViewer_ViewManager*)( vw->getViewManager() ) )->getOCCViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
-#if OCC_VERSION_LARGE <= 0x06060000
- ic->Erase( mySimulationShape1, Standard_True, Standard_False );
- ic->Erase( mySimulationShape2, Standard_True, Standard_False );
-#else
ic->Erase( mySimulationShape1, Standard_True );
ic->Erase( mySimulationShape2, Standard_True );
-#endif
ic->ClearPrs( mySimulationShape1 );
ic->ClearPrs( mySimulationShape2 );
ic->UpdateCurrentViewer();
#include <gce_MakePln.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
-#if OCC_VERSION_LARGE > 0x06050300
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Text.hxx>
#include <Graphic3d_HorizontalTextAlignment.hxx>
#include <Graphic3d_AspectText3d.hxx>
#include <Font_FontAspect.hxx>
-#endif // OCC_VERSION_LARGE > 0x06050300
// This include must be *AFTER* SOCC_ViewModel.h because
// of the constant ROTATE which is a #define in
bool& myLock;
};
-#if OCC_VERSION_LARGE > 0x06050300
DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
class AIS_Text:public AIS_InteractiveObject
asp->Aspect()->SetTextFontAspect(aFontAspect);
Prs3d_Text::Draw(aPresentation, asp, aText, aPosition);
};
-#endif // OCC_VERSION_LARGE > 0x06050300
bool isSame (double d1, double d2)
{
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
myAnglePrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
myLengthPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
-#if OCC_VERSION_LARGE > 0x06050300
myTextPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
-#endif // OCC_VERSION_LARGE > 0x06050300
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
gp_Pnt P,
bool store )
{
-#if OCC_VERSION_LARGE > 0x06050300
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
Handle(AIS_Text) anIO = new AIS_Text(TCollection_ExtendedString(theText.c_str()), P);
GEOMBase_Helper::displayPreview(aSPrs, true, true);
}
}
-#endif // OCC_VERSION_LARGE > 0x06050300
+
}
//================================================================
return ChangeFind(K);
}
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const TCollection_AsciiString& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const TCollection_AsciiString& K);
-#endif
+Standard_EXPORT Standard_Address Find1 (const TCollection_AsciiString& K) const;
+Standard_EXPORT Standard_Address ChangeFind1 (const TCollection_AsciiString& K);
private:
// Methods PRIVATE
aSSI.SetIndices(theIndices);
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
GEOM_Solver aSolver (GEOM_Engine::GetEngine());
if (!aSolver.ComputeFunction(aFunction)) {
MESSAGE("GEOM_Engine::AddSubShape Error: Can't build a sub shape");
#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,
-#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);
}
}
-#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;
-#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";
#include <Basics_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>
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;
if (!isResult) {
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
GEOM_Solver aSolver(GEOM_Engine::GetEngine());
if (!aSolver.ComputeFunction(this)) {
MESSAGE("GEOM_Object::GetValue Error : Can't build a sub-shape");
#include <Basics_OCCTVersion.hxx>
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
#include <Precision.hxx>
-#endif
#include <gp_Pnt.hxx>
//
// Argument 1
if (!myIsAnalytic) {
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aMF.Init(mySurface, Standard_True, Precision::Confusion());
-#else
- aMF.Init(mySurface, Standard_True);
-#endif
aFErr=aMF.Error();
if (aFErr!=BRepLib_FaceDone) {
}
else if (aNbPB==1) {
const Handle(BOPDS_PaveBlock)& aPB=aLPB.First();
-#if OCC_VERSION_LARGE > 0x06060000 // Porting to OCCT higher 6.6.0 version
if (pDS->IsCommonBlock(aPB)) {
-#else
- if (aPB->IsCommonBlock()) {
-#endif
aState=TopAbs_ON;
}
else{
AIS_ListOfInteractive displayed;
ic->DisplayedObjects( displayed );
-#if OCC_VERSION_LARGE <= 0x06060000
- ic->ObjectsInCollector( displayed );
-#endif
AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && shape.IsNull() ) {
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
#include <GEOMImpl_Types.hxx>
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_HArray1OfByte.hxx>
-#else
-#include <Graphic3d_HArray1OfBytes.hxx>
-#endif
// If the next macro is defined, autocolor feature works for all sub-shapes;
// if it is undefined, autocolor feature works for groups only
// Hard-coded value of shape deflection coefficient for VTK viewer
const double VTK_MIN_DEFLECTION = 0.001;
-#if OCC_VERSION_LARGE > 0x06070000
// Pixmap caching support
namespace
{
}
}
}
-#endif
//================================================================
// Function : getActiveStudy
myToActivate = true;
// This parameter is used for activisation/deactivisation of objects to be displayed
- #if OCC_VERSION_LARGE > 0x06050100 // Functionnality available only in OCCT 6.5.2
// Activate parallel vizualisation only for testing purpose
// and if the corresponding env variable is set to 1
char* parallel_visu = getenv("PARALLEL_VISU");
MESSAGE("Parallel visualisation on");
BRepMesh_IncrementalMesh::SetParallelDefault(Standard_True);
}
- #endif
myViewFrame = 0;
aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
}
-#if OCC_VERSION_LARGE > 0x06070000
Handle(Image_PixMap) aPixmap;
if ( !aImagePath.isEmpty() )
aPixmap = cacheTextureFor( aImagePath, AISShape );
else {
AISShape->SetTextureMapOff();
}
-#else
- if ( !aImagePath.isEmpty() ) {
- AISShape->SetTextureFileName( TCollection_AsciiString( aImagePath.toUtf8().constData() ) );
- AISShape->SetTextureMapOn();
- AISShape->DisableTextureModulate();
- }
-#endif
// set line width
AISShape->SetWidth( HasWidth() ?
// custom marker string contains "IdOfTexture"
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( study, textureId, aWidth, aHeight );
if ( !aTexture.IsNull() ) {
-#if OCC_VERSION_LARGE > 0x06060000 // Porting to OCCT higher 6.6.0 version
Handle(Prs3d_PointAspect) aTextureAspect =
new Prs3d_PointAspect( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
aWidth, aHeight,
aTexture );
-#else
- int TextureId = 0;
- Handle(Prs3d_PointAspect) aTextureAspect =
- new Prs3d_PointAspect( HasColor() ?
- // predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
- (Quantity_NameOfColor)GetColor() :
- // color from properties
- SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
- ++TextureId,
- aWidth, aHeight,
- aTexture );
-#endif
AISShape->Attributes()->SetPointAspect( aTextureAspect );
}
}
UpdateColorScale(false,false);
}
-#if OCC_VERSION_LARGE > 0x06070000
void GEOM_Displayer::BeforeErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
LightApp_Displayer::BeforeErase( v, p );
releaseTextures( p );
}
-#endif
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
{
virtual void Update( SALOME_VTKPrs* );
virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCPrs* );
virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCPrs* );
-#if OCC_VERSION_LARGE > 0x06070000
virtual void BeforeErase ( SALOME_View*, const SALOME_OCCPrs* );
-#endif
virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* );
/* This methos is used for activisation/deactivisation of objects to be displayed*/
#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>
createMenu( GEOMOp::OpRevolution, genId, -1 );
createMenu( GEOMOp::OpFilling, genId, -1 );
createMenu( GEOMOp::OpPipe, genId, -1 );
-#if OCC_VERSION_LARGE > 0x06050300
createMenu( GEOMOp::OpPipePath, genId, -1 );
-#endif
//int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 );
//createMenu( GEOMOp::OpSmoothingSurface, advId, -1 );
createTool( GEOMOp::OpRevolution, genTbId );
createTool( GEOMOp::OpFilling, genTbId );
createTool( GEOMOp::OpPipe, genTbId );
-#if OCC_VERSION_LARGE > 0x06050300
createTool( GEOMOp::OpPipePath, genTbId );
-#endif
int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
createTool( GEOMOp::OpTranslate, transTbId );
mgr->setRule( action( GEOMOp::OpGroupEdit ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // -----------
-#if OCC_VERSION_LARGE > 0x06050200
//QString bringRule = clientOCCorOB + " and ($component={'GEOM'}) and (selcount>0) and isOCC=true and topLevel=false";
QString bringRule = clientOCCorOB + " and ($component={'GEOM'}) and isFolder=false and (selcount>0) and isOCC=true";
mgr->insert( action(GEOMOp::OpBringToFront ), -1, -1 ); // bring to front
mgr->setRule(action(GEOMOp::OpBringToFront), "topLevel=true", QtxPopupMgr::ToggleRule );
mgr->insert( action(GEOMOp::OpClsBringToFront ), -1, -1 ); // clear bring to front
mgr->setRule( action(GEOMOp::OpClsBringToFront ), clientOCC + " and autoBringToFront = false", QtxPopupMgr::VisibleRule );
-#endif
mgr->insert( separator(), -1, -1 ); // -----------
dispmodeId = mgr->insert( tr( "MEN_DISPLAY_MODE" ), -1, -1 ); // display mode menu
mgr->insert( action( GEOMOp::OpWireframe ), dispmodeId, -1 ); // wireframe
return "";
}
-#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;
-#endif
if (theStudy) {
TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
theWidth = aWidth;
theHeight = aHeight;
-#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] );
// 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;
-#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;
Standard_Real u1,u2,v1,v2;
SurfaceTrimmee->Bounds(u1,u2,v1,v2);
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2, Precision::Confusion());
-#else
- TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2);
-#endif
if (tirant.IsNull()) {
StdFail_NotDone::Raise("Failed to build secant face");
// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN
// the following block, when enabled, leads to extra vertices generation by partition algorithm
// in some cases, for example when fillet is made on a PipeTShape
-//#if OCC_VERSION_LARGE > 0x06050200
#if 0
// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END
BRep_Builder BB;
App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree());
if (GBS.IsNull()) return 0;
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aShape = BRepBuilderAPI_MakeFace(GBS, Precision::Confusion());
-#else
- aShape = BRepBuilderAPI_MakeFace(GBS);
-#endif
}
else {
// implemented by skl 20.03.2008 for bug 16568
}
GeomAPI_PointsToBSplineSurface PTB (Points, mindeg, maxdeg, GeomAbs_C2, tol3d);
Handle(Geom_BSplineSurface) BS = PTB.Surface();
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
BRepBuilderAPI_MakeFace BB (BS, Precision::Confusion());
-#else
- BRepBuilderAPI_MakeFace BB (BS);
-#endif
TopoDS_Face NewF = BB.Face();
Handle(ShapeFix_Face) sff = new ShapeFix_Face (NewF);
sff->Perform();
aGA.Detect();
//modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
-#if OCC_VERSION_LARGE > 0x06050200
Standard_Integer iWrnDetect = aGA.WarningStatus();
if (iWrnDetect == 2) {
Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
}
-#endif
//modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
Standard_Integer iErr = aGA.ErrorStatus();
aGA.Detect();
//modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
-#if OCC_VERSION_LARGE > 0x06050200
Standard_Integer iWrnDetect = aGA.WarningStatus();
if (iWrnDetect == 2) {
/*
*/
Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
}
-#endif
//modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
Standard_Integer iErr = aGA.ErrorStatus();
//Compute the box value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
//Compute the Box value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
//Compute the Face
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Face driver failed");
return NULL;
//Compute the Face
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Face driver failed");
return NULL;
//Compute the Disk value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Disk value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Disk
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
//Compute the Cone value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
//Compute the Cone value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
//Compute the Sphere value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
//Compute the Sphere value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
//Compute the Torus value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
//Compute the Torus value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Draft Prism Feature value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe driver failed");
return NULL;
//Compute the Revolution value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Revolution driver failed");
return NULL;
//Compute the Revolution value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Revolution driver failed");
return NULL;
//Compute the Solid value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Filling driver failed");
return NULL;
//Compute the ThruSections value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("ThruSections driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with defferent section driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with shell sections driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with shell sections without path driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe driver failed");
return NULL;
//Compute the offset
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
// Compute the Path value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("PipePath driver failed");
return NULL;
// Compute the Path value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("PipePath driver failed");
return NULL;
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a face");
return NULL;
//Compute the Block value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a block");
return NULL;
//Compute the Block value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a block");
return NULL;
//Compute the Blocks Compound value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to compute a blocks compound");
return NULL;
//Compute the Edge value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopTools_IndexedDataMapOfShapeListOfShape MVE;
GEOMImpl_Block6Explorer::MapShapesAndAncestors
(aBlockOrComp, TopAbs_VERTEX, TopAbs_EDGE, MVE);
//Compute the Edge value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
TopoDS_Shape aShape = GEOMUtils::GetEdgeNearPoint(aBlockOrComp, aVert);
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
TopTools_IndexedDataMapOfShapeListOfShape MVF;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
TopTools_IndexedDataMapOfShapeListOfShape MEF;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
GEOMImpl_Block6Explorer aBlockTool;
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
//Compute the Face value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
TopoDS_Edge anEdge = TopoDS::Edge(anArg);
// Compute the result
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
TopTools_MapOfShape mapShape;
//Check
isCompOfBlocks = Standard_True;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopTools_MapOfShape mapShape;
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
for (; exp.More(); exp.Next()) {
//Compute the fixed shape
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to remove extra edges of the given shape");
return NULL;
//Compute the fixed shape
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to remove extra edges of the given shape");
return NULL;
//Compute the fixed shape
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to improve the given blocks compound");
return NULL;
// Explode
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
for (; exp.More(); exp.Next()) {
if (mapShape.Add(exp.Current())) {
//Compute the Block value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
//Compute the Block value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
// 1. Explode compound on solids
TopTools_MapOfShape mapShape;
Standard_Integer nbSolids = 0;
//Get the Blocks
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopTools_MapOfShape mapShape;
Standard_Integer nbSolids = 0;
TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID);
//Compute the transformation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to make multi-transformation");
return NULL;
//Compute the transformation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Block driver failed to make multi-transformation");
return NULL;
//Compute the Boolean value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
//Compute the Boolean value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
//Compute the Boolean value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
//Compute the Boolean value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
//Compute the Boolean value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Boolean driver failed");
return NULL;
//Compute the Partition
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Partition driver failed");
return NULL;
//Compute the Partition value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Partition driver failed");
return NULL;
//Compute the Circle value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Circle driver failed");
return NULL;
//Compute the Circle value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Circle driver failed");
return NULL;
//Compute the Circle value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Circle driver failed");
return NULL;
//Compute the Ellipse value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Ellipse driver failed");
return NULL;
//Compute the Arc value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Arc driver failed");
return NULL;
//Compute the Arc value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
- SetErrorCode("Arc driver failed");
- return NULL;
+ SetErrorCode("Arc driver failed");
+ return NULL;
}
}
catch (Standard_Failure) {
//Compute the Arc value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Arc driver failed");
return NULL;
//Compute the Polyline value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Polyline driver failed");
return NULL;
//Compute the Spline value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Spline driver failed");
return NULL;
//Compute the Spline value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Spline driver failed");
return NULL;
//Compute the Spline value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Spline driver failed");
return NULL;
//Compute the Curve value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Curve driver failed !!!");
return NULL;
//Compute the Sketcher value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sketcher driver failed");
return NULL;
//Compute the Sketcher value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sketcher driver failed");
return NULL;
//Compute the 3D Sketcher value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("3D Sketcher driver failed");
return NULL;
//Compute the Sketcher value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("3D Sketcher driver failed");
return NULL;
//Compute the isoline curve
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Shape Healing algorithm failed");
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the result
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the result
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction))
{
SetErrorCode("Healing driver failed");
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
// Compute the new wire
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
// get free boundary shapes
-#if OCC_VERSION_LARGE > 0x06030008
ShapeAnalysis_FreeBounds anAnalizer(aShape, Standard_False,
Standard_True, Standard_True);
-#else
- ShapeAnalysis_FreeBounds anAnalizer(aShape);
-#endif
TopoDS_Compound aClosed = anAnalizer.GetClosedWires();
TopoDS_Compound anOpen = anAnalizer.GetOpenWires();
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
// Compute the result
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
// Compute
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Healing driver failed");
return NULL;
#include <BRepTools.hxx>
#include <gp_Pnt.hxx>
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_HArray1OfByte.hxx>
#include <TColStd_HArray1OfReal.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_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Copy driver failed");
return NULL;
//Perform the Export
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Not enough space on disk, or you haven't permissions to write this directory");
return;
Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Import driver failed");
return NULL;
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;
-#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;
}
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)
+ 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;
class GEOMImpl_IGroupOperations;
class GEOMImpl_IFieldOperations;
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
class Handle_TColStd_HArray1OfByte;
-#else
-class Handle_TDataStd_HArray1OfByte;
-#endif
namespace XAO {
class Geometry;
Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile);
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
-#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);
+ int& theWidth, int& theHeight);
Standard_EXPORT std::list<int> GetAllTextures();
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("2D Fillet driver failed");
return NULL;
//Compute the Fillet value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("1D Fillet driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Chamfer value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Chamfer driver failed");
return NULL;
//Compute the Archimede value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Archimede driver failed");
return NULL;
}
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
gp_Ax3 anAx3 = GEOMUtils::GetPosition(aShape);
//Compute the CentreOfMass value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Measure driver failed to compute centre of mass");
return NULL;
//Compute
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vertex by index driver failed.");
return NULL;
//Compute the Normale value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Measure driver failed to compute normake of face");
return NULL;
//Compute the parameters
GProp_GProps LProps, SProps;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
BRepGProp::LinearProperties(aShape, LProps);
theLength = LProps.Mass();
GProp_GProps System;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (aShape.ShapeType() == TopAbs_VERTEX ||
aShape.ShapeType() == TopAbs_EDGE ||
aShape.ShapeType() == TopAbs_WIRE) {
Bnd_Box B;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
BRepBuilderAPI_Copy aCopyTool (aShape);
if (!aCopyTool.IsDone()) {
SetErrorCode("GetBoundingBox Error: Bad shape detected");
//Compute the BoundingBox value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Measure driver failed to compute a bounding box");
return NULL;
FaceMax = EdgeMax = VertMax = -RealLast();
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
for (TopExp_Explorer ExF (aShape, TopAbs_FACE); ExF.More(); ExF.Next()) {
TopoDS_Face Face = TopoDS::Face(ExF.Current());
T = BRep_Tool::Tolerance(Face);
//Compute the parameters
bool isValid = false;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
BRepCheck_Analyzer ana (aShape, theIsCheckGeom);
if (ana.IsValid()) {
isValid = true;
Astr = Astr + " Number of sub-shapes : \n";
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
int iType, nbTypes [TopAbs_SHAPE];
for (iType = 0; iType < TopAbs_SHAPE; ++iType)
nbTypes[iType] = 0;
//Compute the parameters
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
gp_Pnt aPnt1, aPnt2;
// Compute the extremities
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
// skl 30.06.2008
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
}
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
theX = aPnt.X();
theY = aPnt.Y();
}
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Edge E1 = TopoDS::Edge(aLine1);
TopoDS_Edge E2 = TopoDS::Edge(aLine2);
}
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Edge aE1 = TopoDS::Edge(aVec1);
TopoDS_Edge aE2 = TopoDS::Edge(aVec2);
//Compute curvature
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
GeomLProp_CLProps Prop = GeomLProp_CLProps
(aCurve, aP, 2, Precision::Confusion());
aRes = fabs(Prop.Curvature());
//Compute curvature
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
GeomAPI_ProjectPointOnCurve PPCurve(aPoint, aCurve, aFP, aLP);
if(PPCurve.NbPoints()>0) {
GeomLProp_CLProps Prop = GeomLProp_CLProps
if (aSurf.IsNull()) return aRes;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
GeomLProp_SLProps Prop = GeomLProp_SLProps
(aSurf, theUParam, theVParam, 2, Precision::Confusion());
if(Prop.IsCurvatureDefined()) {
//Compute the Edge value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Edge value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Edge value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
//Compute the shape
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
//Compute the Face value
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to compute a face");
return NULL;
//Compute the shape
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
//Compute the shape
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed");
return NULL;
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to glue faces");
return NULL;
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to glue faces");
return NULL;
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to glue edges");
return NULL;
//Compute the sub-shape value
Standard_Boolean isWarning = Standard_False;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to glue edges");
return NULL;
*/
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
int iType, nbTypes [TopAbs_SHAPE];
for (iType = 0; iType < TopAbs_SHAPE; ++iType)
nbTypes[iType] = 0;
//Compute the sub-shape value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Shape driver failed to reverse shape");
return NULL;
// Compute tolerance
Standard_Real T, VertMax = -RealLast();
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
for (TopExp_Explorer ExV (theShape, TopAbs_VERTEX); ExV.More(); ExV.Next()) {
TopoDS_Vertex Vertex = TopoDS::Vertex(ExV.Current());
T = BRep_Tool::Tolerance(Vertex);
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Translation driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the mirror
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Mirror driver failed");
return NULL;
//Compute the offset
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
//Compute the offset
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
//Compute the Projection
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Projection driver failed");
return NULL;
//Compute the Projection
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Projection driver failed");
return aResult;
//Compute the scale
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Scale driver failed");
return NULL;
//Compute the scale
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Scale driver failed");
return NULL;
//Compute the scale
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Scale driver failed");
return NULL;
//Compute the Position
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Position driver failed");
return NULL;
//Compute the position
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Position driver failed");
return NULL;
//Compute the position
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Position driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
//Compute the translation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Rotate driver failed");
return NULL;
// Compute the transformation
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Driver failed");
return NULL;
#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepOffsetAPI_MakePipeShell.hxx>
-#if OCC_VERSION_LARGE > 0x06050300
#include <BRepOffsetAPI_MiddlePath.hxx>
-#endif
#include <TopAbs.hxx>
#include <TopExp.hxx>
if (aShape.IsNull() || aBase1.IsNull() || aBase2.IsNull())
Standard_NullObject::Raise("RestorePath aborted : null argument");
-#if OCC_VERSION_LARGE > 0x06050300
BRepOffsetAPI_MiddlePath aMPB (aShape, aBase1, aBase2);
aMPB.Build();
if (aMPB.IsDone()) {
aRes = aMPB.Shape();
}
-#else
- Standard_NullObject::Raise("RestorePath is not implemented in used OCCT version");
-#endif
}
else if (aType == PIPE_PATH_TWO_SEQS) {
GEOMImpl_IPipePath aPI (aFunction);
if (aShape.IsNull() || aBase1.IsNull() || aBase2.IsNull())
Standard_NullObject::Raise("RestorePath aborted : null argument");
-#if OCC_VERSION_LARGE > 0x06050300
BRepOffsetAPI_MiddlePath aMPB (aShape, aBase1, aBase2);
aMPB.Build();
if (aMPB.IsDone()) {
aRes = aMPB.Shape();
}
-#else
- Standard_NullObject::Raise("RestorePath is not implemented in used OCCT version");
-#endif
}
else {
}
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line");
GC_MakePlane aMakePlane (aP1, aP2, aP3);
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize,
Precision::Confusion()).Shape();
-#else
- aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape();
-#endif
} else if (aType == PLANE_FACE) {
Handle(GEOM_Function) aRef = aPI.GetFace();
TopoDS_Shape aRefShape = aRef->GetValue();
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_HArray1OfByte.hxx>
-#else
-#include <Graphic3d_HArray1OfBytes.hxx>
-#endif
// QT Includes
#include <QAction>
if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
int 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 );
#include <TColStd_HSequenceOfAsciiString.hxx>
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
#include <TColStd_HArray1OfByte.hxx>
-#else
-#include <TDataStd_HArray1OfByte.hxx>
-#endif
//=============================================================================
/*!
{
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 ) {
-#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;
-#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;
if (anAngle > Precision::Angular()) {
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TopoDS_Shape S1, S2;
if (GEOMBase::GetShape(myObj , S1, TopAbs_EDGE) &&
GEOMBase::GetShape(myObj2, S2, TopAbs_EDGE)) {
Interface_Static::SetIVal("read.step.nonmanifold", 1);
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
if (status == IFSelect_RetDone) {
TColStd_SequenceOfAsciiString anUnitLengthNames;
const Handle(TColStd_HArray1OfInteger)& theOrders,
const Handle(TColStd_HArray1OfInteger)& theSenses)
{
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
BRepBuilderAPI_MakeFace aMakeFace (theSurf, Precision::Confusion());
-#else
- BRepBuilderAPI_MakeFace aMakeFace (theSurf);
-#endif
TopoDS_Face aFace = aMakeFace.Face();
aFace.EmptyCopy();