@@ -459,7 +459,7 @@ def generate_polylines(xyz, r, num=1000):
459459 return polylines
460460
461461
462- def generate_tube (polyline , hsize = None , radius_based = False ):
462+ def generate_tube (polyline , hsize = None , radius_based = True ):
463463 """
464464 This function generates a tube from a given polyline representing a single vessel of a
465465 vascular object (tree or forest).
@@ -729,8 +729,10 @@ def build_watertight_solid(tree, cap_resolution=40):
729729 """
730730 xyz , r , _ , _ , branches , _ = get_interpolated_sv_data (tree .data )
731731 lines = generate_polylines (xyz , r )
732- tubes = generate_tubes_parallel (lines , radius_based = True )
733- model = union_tubes_balanced (tubes , lines , cap_resolution = cap_resolution )
732+ tubes = generate_tubes (lines )
733+ model = union_tubes (tubes , lines , cap_resolution = cap_resolution )
734+ #tubes = generate_tubes_parallel(lines, radius_based=True)
735+ #model = union_tubes_balanced(tubes, lines, cap_resolution=cap_resolution)
734736 # Remove poor quality elements and repair the mesh.
735737 cell_quality = model .compute_cell_quality (quality_measure = 'scaled_jacobian' )
736738 keep = cell_quality .cell_data ["CellQuality" ] > 0.1
0 commit comments