@@ -239,7 +239,7 @@ def combine_diag_elements(d1, d2):
239
239
return CTelement ((0 , 0 , 1 , 0 ))
240
240
241
241
242
- def build_c_table_from_solids (Box , SurfInfo , option , options ):
242
+ def build_c_table_from_solids (Box , SurfInfo , simplification_mode , options ):
243
243
244
244
if type (SurfInfo ) is dict :
245
245
surfaces = SurfInfo
@@ -260,7 +260,7 @@ def build_c_table_from_solids(Box, SurfInfo, option, options):
260
260
surfaces [s ].buildShape (Box .BoundBox )
261
261
262
262
CTable = ConstraintTable ()
263
- if option == "diag" :
263
+ if simplification_mode == "diag" :
264
264
CTable .diagonal = True
265
265
else :
266
266
CTable .diagonal = False
@@ -270,7 +270,7 @@ def build_c_table_from_solids(Box, SurfInfo, option, options):
270
270
# res,splitRegions = split_solid_fast(Box,Surfaces.get_surface(s1),True)
271
271
272
272
CTable .add_element (s1 , s1 , CTelement (res , s1 , s1 ))
273
- if option == "diag" :
273
+ if simplification_mode == "diag" :
274
274
continue
275
275
if splitRegions is None :
276
276
continue # loop, no region to be split by s2
@@ -309,7 +309,7 @@ def build_c_table_from_solids(Box, SurfInfo, option, options):
309
309
CTable .add_element (s1 , s2 , CTelement (val , s1 , s2 ))
310
310
311
311
# if some surfaces don't cross the box some elements in Constraint table are not filled
312
- if option != "diag" :
312
+ if simplification_mode != "diag" :
313
313
CTable .fill_missing_elements ()
314
314
return CTable
315
315
@@ -460,7 +460,7 @@ def point_inside(solid):
460
460
BBox = solid .optimalBoundingBox (False )
461
461
box = [BBox .XMin , BBox .XMax , BBox .YMin , BBox .YMax , BBox .ZMin , BBox .ZMax ]
462
462
463
- boxes , centers = cut_box (box )
463
+ boxes , centers = divide_box (box )
464
464
n = 0
465
465
466
466
while True :
@@ -472,7 +472,7 @@ def point_inside(solid):
472
472
subbox = []
473
473
centers = []
474
474
for b in boxes :
475
- btab , ctab = cut_box (b )
475
+ btab , ctab = divide_box (b )
476
476
subbox .extend (btab )
477
477
centers .extend (ctab )
478
478
boxes = subbox
@@ -515,7 +515,7 @@ def point_from_surface(solid):
515
515
516
516
517
517
# divide a box into 8 smaller boxes
518
- def cut_box (Box ):
518
+ def divide_box (Box ):
519
519
xmid = (Box [1 ] + Box [0 ]) * 0.5
520
520
ymid = (Box [3 ] + Box [2 ]) * 0.5
521
521
zmid = (Box [5 ] + Box [4 ]) * 0.5
0 commit comments