Fix for bos #19108: t_shape_builder

This commit is contained in:
jfa 2020-05-21 13:23:04 +03:00
parent c6482451ab
commit dd7a8e88ba
2 changed files with 11 additions and 4 deletions

View File

@ -1352,6 +1352,13 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
if (!ana.IsValid()) { if (!ana.IsValid()) {
TopoDS_Shape aFace2; TopoDS_Shape aFace2;
ShHealOper_ShapeProcess aHealer; ShHealOper_ShapeProcess aHealer;
// bos #19108: T-Shape
// Default values for the next two parameters is 0.05,
// which is too large for some T-Shape cases
aHealer.SetParameter("FixFaceSize.Tolerance", 1e-05);
aHealer.SetParameter("DropSmallEdges.Tolerance3d", 1e-05);
aHealer.Perform(aFace1, aFace2); aHealer.Perform(aFace1, aFace2);
if (aHealer.isDone()) if (aHealer.isDone())
theResult = aFace2; theResult = aFace2;

View File

@ -65,7 +65,7 @@ def demidisk(r1, a1, roty=0, solid_thickness=0):
arc1 = geompy.MakeArc(v[1], v7, v[3]) arc1 = geompy.MakeArc(v[1], v7, v[3])
l[0] = geompy.MakeLineTwoPnt(v[1], v[3]) l[0] = geompy.MakeLineTwoPnt(v[1], v[3])
face1 = geompy.MakeFaceWires([arc1, l[0]], 1) face1 = geompy.MakeFaceWires([arc1, l[0]], 1)
part1 = geompy.MakePartition([face1], [l[2], l[4], l[5], l[6], l[7]], [], [], geompy.ShapeType["FACE"], 0, [], 0, True) part1 = geompy.MakePartition([face1], [l[2], l[4], l[5], l[6], l[7]], [], [], geompy.ShapeType["FACE"], 0, [], 0)
if with_solid: if with_solid:
# Add some faces corresponding to the solid layer outside # Add some faces corresponding to the solid layer outside
@ -191,7 +191,7 @@ def build_shape(r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
faces_coupe = faci[5:] faces_coupe = faci[5:]
if with_solid: if with_solid:
faces_coupe = faci[5:]+faces_jonction_ext[:3] faces_coupe = faci[5:]+faces_jonction_ext[:3]
base2 = geompy.MakePartition(faces_coupe, [], [], [], geompy.ShapeType["FACE"], 0, [], 0, True) base2 = geompy.MakePartition(faces_coupe, [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
extru2 = geompy.MakePrismVecH(base2, OZ, h2) extru2 = geompy.MakePrismVecH(base2, OZ, h2)
if progressBar is not None: if progressBar is not None:
@ -223,7 +223,7 @@ def build_shape(r1, r2, h1, h2, solid_thickness=0, progressBar=None ):
faces_coupe = faci[:5] faces_coupe = faci[:5]
if with_solid: if with_solid:
faces_coupe.extend(faces_jonction_ext[-7:]) faces_coupe.extend(faces_jonction_ext[-7:])
raccord = geompy.MakePartition([garder], faces_coupe + [arcextru], [], [], geompy.ShapeType["SOLID"], 0, [], 0, True) raccord = geompy.MakePartition([garder], faces_coupe + [arcextru], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
assemblage = geompy.MakeCompound([raccord, extru1, extru2]) assemblage = geompy.MakeCompound([raccord, extru1, extru2])
assemblage = geompy.MakeGlueFaces(assemblage, 1e-7) assemblage = geompy.MakeGlueFaces(assemblage, 1e-7)
@ -325,7 +325,7 @@ def jonction(r1, r2, h1, h2, a1):
plan = geompy.MakePlaneThreePnt(p0, p1, p2, 10000) plan = geompy.MakePlaneThreePnt(p0, p1, p2, 10000)
#geompy.addToStudy(plan, "plan%d"%i) #geompy.addToStudy(plan, "plan%d"%i)
section = geompy.MakeSection(plan, arcextru, True) section = geompy.MakeSection(plan, arcextru, True)
secpart = geompy.MakePartition([section], [sect45, sect90], [], [], geompy.ShapeType["EDGE"], 0, [], 0, True) secpart = geompy.MakePartition([section], [sect45, sect90], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
#geompy.addToStudy(secpart, "secpart%d"%i) #geompy.addToStudy(secpart, "secpart%d"%i)
lsec = geompy.ExtractShapes(secpart, geompy.ShapeType["EDGE"], True) lsec = geompy.ExtractShapes(secpart, geompy.ShapeType["EDGE"], True)