mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 15:20:33 +05:00
Mantis issue 0021432: EDF GEOM: Faces with huge tolerance can be built in GEOM
This commit is contained in:
parent
696a8cf635
commit
2d0d426c67
@ -18,12 +18,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
// File : BuildGUI_FaceDlg.cxx
|
// File : BuildGUI_FaceDlg.cxx
|
||||||
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
//
|
|
||||||
#include "BuildGUI_FaceDlg.h"
|
#include "BuildGUI_FaceDlg.h"
|
||||||
|
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
@ -33,11 +32,14 @@
|
|||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
#include <GEOMBase.h>
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include <SUIT_ResourceMgr.h>
|
|
||||||
#include <SUIT_Session.h>
|
|
||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <LightApp_SelectionMgr.h>
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_MessageBox.h>
|
||||||
|
#include <SUIT_OverrideCursor.h>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : BuildGUI_FaceDlg()
|
// class : BuildGUI_FaceDlg()
|
||||||
// purpose : Constructs a BuildGUI_FaceDlg which is a child of 'parent', with the
|
// purpose : Constructs a BuildGUI_FaceDlg which is a child of 'parent', with the
|
||||||
@ -247,9 +249,17 @@ bool BuildGUI_FaceDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var anObj = anOper->MakeFaceWires( objlist.in(), GroupWire->CheckButton1->isChecked() );
|
GEOM::GEOM_Object_var anObj = anOper->MakeFaceWires( objlist.in(), GroupWire->CheckButton1->isChecked() );
|
||||||
|
|
||||||
if ( !anObj->_is_nil() )
|
if (!anObj->_is_nil()) {
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back(anObj._retn());
|
||||||
|
|
||||||
|
if (!anOper->IsDone() && QString(anOper->GetErrorCode()) == "MAKE_FACE_TOLERANCE_TOO_BIG") {
|
||||||
|
SUIT_OverrideCursor wc;
|
||||||
|
wc.suspend();
|
||||||
|
QString msgw = QObject::tr(anOper->GetErrorCode());
|
||||||
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"), msgw, tr("BUT_OK"));
|
||||||
|
anOper->SetErrorCode("PAL_NO_ERROR");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,6 +605,10 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
<source>GEOM_FACE_OPT</source>
|
<source>GEOM_FACE_OPT</source>
|
||||||
<translation>Try to create a planar face</translation>
|
<translation>Try to create a planar face</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MAKE_FACE_TOLERANCE_TOO_BIG</source>
|
||||||
|
<translation>Tolerance of resulting face is too big</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_FACE_OR_LCS</source>
|
<source>GEOM_FACE_OR_LCS</source>
|
||||||
<translation>Face or LCS</translation>
|
<translation>Face or LCS</translation>
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
@ -79,6 +78,8 @@
|
|||||||
#define NBEDGES 12
|
#define NBEDGES 12
|
||||||
#define NBVERTS 8
|
#define NBVERTS 8
|
||||||
|
|
||||||
|
#define PLANAR_FACE_MAX_TOLERANCE 1e-06
|
||||||
|
|
||||||
static Standard_Integer mod4 (Standard_Integer nb)
|
static Standard_Integer mod4 (Standard_Integer nb)
|
||||||
{
|
{
|
||||||
if (nb <= 0) return nb + 4;
|
if (nb <= 0) return nb + 4;
|
||||||
@ -1197,10 +1198,12 @@ Standard_Integer GEOMImpl_Block6Explorer::FindFace
|
|||||||
//function : MakeFace
|
//function : MakeFace
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
TCollection_AsciiString GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
||||||
const Standard_Boolean isPlanarWanted,
|
const Standard_Boolean isPlanarWanted,
|
||||||
TopoDS_Shape& theResult)
|
TopoDS_Shape& theResult)
|
||||||
{
|
{
|
||||||
|
TCollection_AsciiString aWarning;
|
||||||
|
|
||||||
// Workaround for Mantis issue 0020956
|
// Workaround for Mantis issue 0020956
|
||||||
if (isPlanarWanted) {
|
if (isPlanarWanted) {
|
||||||
// Count the number of points in the wire.
|
// Count the number of points in the wire.
|
||||||
@ -1247,14 +1250,14 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
BRepBuilderAPI_MakeFace MK (plane, theWire, isPlanarWanted);
|
BRepBuilderAPI_MakeFace MK (plane, theWire, isPlanarWanted);
|
||||||
if (MK.IsDone()) {
|
if (MK.IsDone()) {
|
||||||
theResult = MK.Shape();
|
theResult = MK.Shape();
|
||||||
return;
|
return aWarning;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
|
BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
|
||||||
if (MK.IsDone()) {
|
if (MK.IsDone()) {
|
||||||
theResult = MK.Shape();
|
theResult = MK.Shape();
|
||||||
return;
|
return aWarning;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1263,7 +1266,7 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
|
BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted);
|
||||||
if (MK.IsDone()) {
|
if (MK.IsDone()) {
|
||||||
theResult = MK.Shape();
|
theResult = MK.Shape();
|
||||||
return;
|
return aWarning;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1346,7 +1349,7 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
|
|
||||||
if (!aFS.Found()) {
|
if (!aFS.Found()) {
|
||||||
aFS.Init(theWire, aToleranceReached, isPlanarWanted);
|
aFS.Init(theWire, aToleranceReached, isPlanarWanted);
|
||||||
if (!aFS.Found()) return;
|
if (!aFS.Found()) return aWarning;
|
||||||
aToleranceReached = aFS.ToleranceReached();
|
aToleranceReached = aFS.ToleranceReached();
|
||||||
aTol = aFS.Tolerance();
|
aTol = aFS.Tolerance();
|
||||||
}
|
}
|
||||||
@ -1354,7 +1357,7 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
|
|
||||||
// Copy the wire, bacause it can be updated with very-very big tolerance here
|
// Copy the wire, bacause it can be updated with very-very big tolerance here
|
||||||
BRepBuilderAPI_Copy aMC (theWire);
|
BRepBuilderAPI_Copy aMC (theWire);
|
||||||
if (!aMC.IsDone()) return;
|
if (!aMC.IsDone()) return aWarning;
|
||||||
TopoDS_Wire aWire = TopoDS::Wire(aMC.Shape());
|
TopoDS_Wire aWire = TopoDS::Wire(aMC.Shape());
|
||||||
// Update tolerances to <aTol>
|
// Update tolerances to <aTol>
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
@ -1371,7 +1374,9 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
BRepBuilderAPI_MakeFace MK1 (aWire, isPlanarWanted);
|
BRepBuilderAPI_MakeFace MK1 (aWire, isPlanarWanted);
|
||||||
if (MK1.IsDone()) {
|
if (MK1.IsDone()) {
|
||||||
theResult = MK1.Shape();
|
theResult = MK1.Shape();
|
||||||
return;
|
if (aTol > PLANAR_FACE_MAX_TOLERANCE)
|
||||||
|
aWarning = "MAKE_FACE_TOLERANCE_TOO_BIG";
|
||||||
|
return aWarning;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // After migration on OCCT version, containing PKV's fix. See bug 8293
|
#else // After migration on OCCT version, containing PKV's fix. See bug 8293
|
||||||
@ -1379,8 +1384,10 @@ void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire,
|
|||||||
aBMF.Init(theWire, isPlanarWanted, Standard_True);
|
aBMF.Init(theWire, isPlanarWanted, Standard_True);
|
||||||
if (aBMF.Error() == BRepLib_FaceDone) {
|
if (aBMF.Error() == BRepLib_FaceDone) {
|
||||||
theResult = aBMF.Shape();
|
theResult = aBMF.Shape();
|
||||||
return;
|
return aWarning;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return aWarning;
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,10 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : GEOMImpl_Block6Explorer.hxx
|
// File : GEOMImpl_Block6Explorer.hxx
|
||||||
// Module : GEOMImpl
|
// Module : GEOMImpl
|
||||||
//
|
|
||||||
#ifndef GEOMImpl_Block6Explorer_HeaderFile
|
#ifndef GEOMImpl_Block6Explorer_HeaderFile
|
||||||
#define GEOMImpl_Block6Explorer_HeaderFile
|
#define GEOMImpl_Block6Explorer_HeaderFile
|
||||||
|
|
||||||
@ -30,6 +29,7 @@
|
|||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
#include <TopTools_Array1OfShape.hxx>
|
#include <TopTools_Array1OfShape.hxx>
|
||||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
#include <gp_Trsf.hxx>
|
#include <gp_Trsf.hxx>
|
||||||
|
|
||||||
// Class GEOMImpl_Block6Explorer gives easy and fast access to a certain sub-elements of hexahedral solid
|
// Class GEOMImpl_Block6Explorer gives easy and fast access to a certain sub-elements of hexahedral solid
|
||||||
@ -214,9 +214,9 @@ class GEOMImpl_Block6Explorer
|
|||||||
const Standard_Boolean findAll = Standard_False);
|
const Standard_Boolean findAll = Standard_False);
|
||||||
// returns number of found faces
|
// returns number of found faces
|
||||||
|
|
||||||
static void MakeFace (const TopoDS_Wire& theWire,
|
static TCollection_AsciiString MakeFace (const TopoDS_Wire& theWire,
|
||||||
const Standard_Boolean isPlanarWanted,
|
const Standard_Boolean isPlanarWanted,
|
||||||
TopoDS_Shape& theResult);
|
TopoDS_Shape& theResult);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ---------- PRIVATE FIELDS ----------
|
// ---------- PRIVATE FIELDS ----------
|
||||||
|
@ -83,7 +83,6 @@
|
|||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
|
||||||
#include <TopAbs.hxx>
|
#include <TopAbs.hxx>
|
||||||
@ -458,6 +457,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
|
|||||||
aCI.SetIsPlanar(isPlanarWanted);
|
aCI.SetIsPlanar(isPlanarWanted);
|
||||||
|
|
||||||
//Compute the Face value
|
//Compute the Face value
|
||||||
|
Standard_Boolean isWarning = Standard_False;
|
||||||
try {
|
try {
|
||||||
#if OCC_VERSION_LARGE > 0x06010000
|
#if OCC_VERSION_LARGE > 0x06010000
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
@ -470,14 +470,20 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
|
|||||||
catch (Standard_Failure) {
|
catch (Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
SetErrorCode(aFail->GetMessageString());
|
SetErrorCode(aFail->GetMessageString());
|
||||||
return NULL;
|
// to provide warning
|
||||||
|
if (!aFunction->GetValue().IsNull()) {
|
||||||
|
isWarning = Standard_True;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Make a Python command
|
//Make a Python command
|
||||||
GEOM::TPythonDump(aFunction) << aFace << " = geompy.MakeFace("
|
GEOM::TPythonDump(aFunction) << aFace << " = geompy.MakeFace("
|
||||||
<< theWire << ", " << (int)isPlanarWanted << ")";
|
<< theWire << ", " << (int)isPlanarWanted << ")";
|
||||||
|
|
||||||
SetErrorCode(OK);
|
// to provide warning
|
||||||
|
if (!isWarning) SetErrorCode(OK);
|
||||||
return aFace;
|
return aFace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,6 +528,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
|
|||||||
aCI.SetIsPlanar(isPlanarWanted);
|
aCI.SetIsPlanar(isPlanarWanted);
|
||||||
|
|
||||||
//Compute the shape
|
//Compute the shape
|
||||||
|
Standard_Boolean isWarning = Standard_False;
|
||||||
try {
|
try {
|
||||||
#if OCC_VERSION_LARGE > 0x06010000
|
#if OCC_VERSION_LARGE > 0x06010000
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
@ -534,7 +541,12 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
|
|||||||
catch (Standard_Failure) {
|
catch (Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
SetErrorCode(aFail->GetMessageString());
|
SetErrorCode(aFail->GetMessageString());
|
||||||
return NULL;
|
// to provide warning
|
||||||
|
if (!aFunction->GetValue().IsNull()) {
|
||||||
|
isWarning = Standard_True;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Make a Python command
|
//Make a Python command
|
||||||
@ -551,7 +563,8 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
|
|||||||
}
|
}
|
||||||
pd << "], " << (int)isPlanarWanted << ")";
|
pd << "], " << (int)isPlanarWanted << ")";
|
||||||
|
|
||||||
SetErrorCode(OK);
|
// to provide warning
|
||||||
|
if (!isWarning) SetErrorCode(OK);
|
||||||
return aShape;
|
return aShape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +121,8 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
Standard_Integer aType = aFunction->GetType();
|
Standard_Integer aType = aFunction->GetType();
|
||||||
|
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
|
TCollection_AsciiString aWarning;
|
||||||
|
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
|
|
||||||
if (aType == WIRE_EDGES) {
|
if (aType == WIRE_EDGES) {
|
||||||
@ -214,7 +216,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
Standard_NullObject::Raise
|
Standard_NullObject::Raise
|
||||||
("Shape for face construction is neither a wire nor a closed edge");
|
("Shape for face construction is neither a wire nor a closed edge");
|
||||||
}
|
}
|
||||||
GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), aShape);
|
aWarning = GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), aShape);
|
||||||
if (aShape.IsNull()) {
|
if (aShape.IsNull()) {
|
||||||
Standard_ConstructionError::Raise("Face construction failed");
|
Standard_ConstructionError::Raise("Face construction failed");
|
||||||
}
|
}
|
||||||
@ -270,7 +272,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
// 4.a. Basic face
|
// 4.a. Basic face
|
||||||
TopoDS_Shape aFFace;
|
TopoDS_Shape aFFace;
|
||||||
TopoDS_Wire aW1 = TopoDS::Wire(aSeqClosedWires->Value(1));
|
TopoDS_Wire aW1 = TopoDS::Wire(aSeqClosedWires->Value(1));
|
||||||
GEOMImpl_Block6Explorer::MakeFace(aW1, aCI.GetIsPlanar(), aFFace);
|
aWarning = GEOMImpl_Block6Explorer::MakeFace(aW1, aCI.GetIsPlanar(), aFFace);
|
||||||
if (aFFace.IsNull()) {
|
if (aFFace.IsNull()) {
|
||||||
Standard_ConstructionError::Raise("Face construction failed");
|
Standard_ConstructionError::Raise("Face construction failed");
|
||||||
}
|
}
|
||||||
@ -914,6 +916,9 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
|
|||||||
|
|
||||||
log.SetTouched(Label());
|
log.SetTouched(Label());
|
||||||
|
|
||||||
|
if (!aWarning.IsEmpty())
|
||||||
|
Standard_Failure::Raise(aWarning.ToCString());
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFace
|
|||||||
|
|
||||||
//Create the Face
|
//Create the Face
|
||||||
Handle(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
|
Handle(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted);
|
||||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
//if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
// enable warning status
|
||||||
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
@ -236,7 +238,9 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires
|
|||||||
// Make Face
|
// Make Face
|
||||||
Handle(GEOM_Object) anObject =
|
Handle(GEOM_Object) anObject =
|
||||||
GetOperations()->MakeFaceWires(aShapes, isPlanarWanted);
|
GetOperations()->MakeFaceWires(aShapes, isPlanarWanted);
|
||||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
//if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||||
|
// enable warning status
|
||||||
|
if (anObject.IsNull())
|
||||||
return aGEOMObject._retn();
|
return aGEOMObject._retn();
|
||||||
|
|
||||||
return GetObject(anObject);
|
return GetObject(anObject);
|
||||||
|
@ -1731,7 +1731,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
def MakeFace(self,theWire, isPlanarWanted):
|
def MakeFace(self,theWire, isPlanarWanted):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
|
anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
|
||||||
RaiseIfFailed("MakeFace", self.ShapesOp)
|
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
||||||
|
print "WARNING: Tolerance of resulting face is too big."
|
||||||
|
else:
|
||||||
|
RaiseIfFailed("MakeFace", self.ShapesOp)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Create a face on the given wires set.
|
## Create a face on the given wires set.
|
||||||
@ -1744,7 +1747,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
def MakeFaceWires(self,theWires, isPlanarWanted):
|
def MakeFaceWires(self,theWires, isPlanarWanted):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
|
anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
|
||||||
RaiseIfFailed("MakeFaceWires", self.ShapesOp)
|
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
||||||
|
print "WARNING: Tolerance of resulting face is too big."
|
||||||
|
else:
|
||||||
|
RaiseIfFailed("MakeFaceWires", self.ShapesOp)
|
||||||
return anObj
|
return anObj
|
||||||
|
|
||||||
## Shortcut to MakeFaceWires()
|
## Shortcut to MakeFaceWires()
|
||||||
|
Loading…
Reference in New Issue
Block a user