mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-03 02:30:33 +05:00
Mantis issues 0021432 and 0021404: MakeFace[Wires] should generate exception on attempt to build a planar face, if it is impossible.
This commit is contained in:
parent
772bb150e4
commit
4d4cef4054
@ -81,6 +81,7 @@ from salome_notebook import *
|
|||||||
|
|
||||||
import GEOM
|
import GEOM
|
||||||
import math
|
import math
|
||||||
|
import os
|
||||||
|
|
||||||
## Enumeration ShapeType as a dictionary. \n
|
## Enumeration ShapeType as a dictionary. \n
|
||||||
## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
|
## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
|
||||||
@ -2901,10 +2902,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
|
anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
|
||||||
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
||||||
#print "WARNING: Tolerance of resulting face is too big."
|
if os.getenv("GEOM_MAKEFACE_ALLOW_NONPLANAR") is not None:
|
||||||
print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
|
print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
|
||||||
else:
|
else:
|
||||||
RaiseIfFailed("MakeFace", self.ShapesOp)
|
RaiseIfFailed("MakeFace", self.ShapesOp)
|
||||||
|
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.
|
||||||
@ -2929,7 +2932,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
|
anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
|
||||||
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
if anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
|
||||||
print "WARNING: Tolerance of resulting face is too big."
|
if os.getenv("GEOM_MAKEFACE_ALLOW_NONPLANAR") is not None:
|
||||||
|
print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
|
||||||
|
else:
|
||||||
|
RaiseIfFailed("MakeFace", self.ShapesOp)
|
||||||
else:
|
else:
|
||||||
RaiseIfFailed("MakeFaceWires", self.ShapesOp)
|
RaiseIfFailed("MakeFaceWires", self.ShapesOp)
|
||||||
return anObj
|
return anObj
|
||||||
|
Loading…
Reference in New Issue
Block a user