@@ -338,12 +338,12 @@ def test_find_and_fix_extra_edges_in_components(modeler: Modeler):
338
338
def test_find_and_fix_inexact_edges (modeler : Modeler ):
339
339
"""Test to read geometry, find and fix inexact edges and validate they are fixed removed."""
340
340
design = modeler .open_file (FILES_DIR / "gear.scdocx" )
341
- assert len (design .bodies [0 ].edges ) == 993
341
+ assert len (design .bodies [0 ].edges ) == 310
342
342
inexact_edges = modeler .repair_tools .find_inexact_edges (design .bodies )
343
- assert len (inexact_edges ) == 272
343
+ assert len (inexact_edges ) == 73
344
344
for i in inexact_edges :
345
345
i .fix ()
346
- assert len (design .bodies [0 ].edges ) == 993
346
+ assert len (design .bodies [0 ].edges ) == 310
347
347
inexact_edges = modeler .repair_tools .find_inexact_edges (design .bodies )
348
348
assert len (inexact_edges ) == 0
349
349
@@ -382,15 +382,15 @@ def test_find_and_fix_short_edges_problem_areas(modeler: Modeler):
382
382
def test_find_and_fix_split_edges_problem_areas (modeler : Modeler ):
383
383
"""Test to read geometry, find and fix split edges and validate they are fixed removed."""
384
384
design = modeler .open_file (FILES_DIR / "bracket-with-split-edges.scdocx" )
385
- assert len (design .bodies [0 ].edges ) == 304
385
+ assert len (design .bodies [0 ].edges ) == 158
386
386
split_edges = modeler .repair_tools .find_split_edges (design .bodies , 2.61799 , 0.01 )
387
- assert len (split_edges ) == 166
387
+ assert len (split_edges ) == 86
388
388
for i in split_edges :
389
389
try : # Try/Except is a workaround. Having .alive would be better
390
390
i .fix ()
391
391
except Exception :
392
392
pass
393
- assert len (design .bodies [0 ].edges ) == 169
393
+ assert len (design .bodies [0 ].edges ) == 99
394
394
395
395
396
396
def test_find_and_stitch_and_missing_faces (modeler : Modeler ):
@@ -412,14 +412,14 @@ def test_find_and_stitch_and_missing_faces(modeler: Modeler):
412
412
413
413
def test_find_simplify (modeler : Modeler ):
414
414
"""Test to read geometry and find it's unsimplified face problem areas."""
415
- design = modeler .open_file (FILES_DIR / "SOBracket2 .scdocx" )
415
+ design = modeler .open_file (FILES_DIR / "SOBracket2_HalfModel .scdocx" )
416
416
problem_areas = modeler .repair_tools .find_simplify (design .bodies )
417
- assert len (problem_areas ) == 46
417
+ assert len (problem_areas ) == 23
418
418
419
419
420
420
def test_fix_simplify (modeler : Modeler ):
421
421
"""Test to read geometry and find and fix it's unsimplified face problem areas."""
422
- design = modeler .open_file (FILES_DIR / "SOBracket2 .scdocx" )
422
+ design = modeler .open_file (FILES_DIR / "SOBracket2_HalfModel .scdocx" )
423
423
problem_areas = modeler .repair_tools .find_simplify (design .bodies )
424
424
assert problem_areas [0 ].fix ().success is True
425
425
@@ -435,9 +435,9 @@ def test_find_and_fix_short_edges(modeler: Modeler):
435
435
def test_find_and_fix_split_edges (modeler : Modeler ):
436
436
"""Test to read geometry, find and fix split edges and validate they are fixed removed."""
437
437
design = modeler .open_file (FILES_DIR / "bracket-with-split-edges.scdocx" )
438
- assert len (design .bodies [0 ].edges ) == 304
438
+ assert len (design .bodies [0 ].edges ) == 158
439
439
modeler .repair_tools .find_and_fix_split_edges (design .bodies , 2.61799 , 0.01 )
440
- assert len (design .bodies [0 ].edges ) == 138
440
+ assert len (design .bodies [0 ].edges ) == 72
441
441
442
442
443
443
def test_find_and_fix_extra_edges (modeler : Modeler ):
@@ -493,11 +493,11 @@ def test_find_and_fix_short_edges_comprehensive(modeler: Modeler):
493
493
def test_find_and_fix_split_edges_comprehensive (modeler : Modeler ):
494
494
"""Test to read geometry, find and fix split edges and validate they are fixed removed."""
495
495
design = modeler .open_file (FILES_DIR / "bracket-with-split-edges.scdocx" )
496
- assert len (design .bodies [0 ].edges ) == 304
496
+ assert len (design .bodies [0 ].edges ) == 158
497
497
result = modeler .repair_tools .find_and_fix_split_edges (design .bodies , 2.61799 , 0.01 , True )
498
- assert len (design .bodies [0 ].edges ) == 169
499
- assert result .found == 135
500
- assert result .repaired == 135
498
+ assert len (design .bodies [0 ].edges ) == 99
499
+ assert result .found == 59
500
+ assert result .repaired == 59
501
501
502
502
503
503
def test_find_and_fix_extra_edges_comprehensive (modeler : Modeler ):
@@ -520,8 +520,8 @@ def test_find_and_fix_extra_edges_comprehensive(modeler: Modeler):
520
520
521
521
def test_find_and_fix_simplify (modeler : Modeler ):
522
522
"""Test to read geometry and find and fix spline faces"""
523
- design = modeler .open_file (FILES_DIR / "SOBracket2 .scdocx" )
523
+ design = modeler .open_file (FILES_DIR / "SOBracket2_HalfModel .scdocx" )
524
524
result = modeler .repair_tools .find_and_fix_simplify (design .bodies , True )
525
525
assert result
526
- assert result .found == 46
527
- assert result .repaired == 46 # There is a SC bug where success is always true
526
+ assert result .found == 23
527
+ assert result .repaired == 23 # There is a SC bug where success is always true
0 commit comments