#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <TopAbs.hxx>
aCI.SetIsPlanar(isPlanarWanted);
//Compute the Face value
+ Standard_Boolean isWarning = Standard_False;
try {
#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
- return NULL;
+ // to provide warning
+ if (!aFunction->GetValue().IsNull()) {
+ isWarning = Standard_True;
+ } else {
+ return NULL;
+ }
}
//Make a Python command
GEOM::TPythonDump(aFunction) << aFace << " = geompy.MakeFace("
<< theWire << ", " << (int)isPlanarWanted << ")";
- SetErrorCode(OK);
+ // to provide warning
+ if (!isWarning) SetErrorCode(OK);
return aFace;
}
aCI.SetIsPlanar(isPlanarWanted);
//Compute the shape
+ Standard_Boolean isWarning = Standard_False;
try {
#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
- return NULL;
+ // to provide warning
+ if (!aFunction->GetValue().IsNull()) {
+ isWarning = Standard_True;
+ } else {
+ return NULL;
+ }
}
//Make a Python command
}
pd << "], " << (int)isPlanarWanted << ")";
- SetErrorCode(OK);
+ // to provide warning
+ if (!isWarning) SetErrorCode(OK);
return aShape;
}
if (aGen) {
GEOMImpl_IHealingOperations* anIHealingOperations =
aGen->GetIHealingOperations(GetDocID());
- aReversed = anIHealingOperations->ChangeOrientation(theShape);
+ aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
SetErrorCode(anIHealingOperations->GetErrorCode());
}
if ( isFound && iType == TopAbs_FACE )
{
// check normals at pOnWhat and pOnWhere
- const double angleTol = PI/180.;
+ const double angleTol = M_PI/180.;
gp_Vec normToWhat = GetNormal( TopoDS::Face(Exp_aWhat.Current()), aWhatDistance);
gp_Vec normToWhere = GetNormal( TopoDS::Face(Exp_aWhere.Current()), aWhereDistance);
if ( normToWhat * normToWhere < 0 )