Skip to content

Commit

Permalink
fix(model): Ensure Mesh3D and Face3D in ContextShade interpret correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Nov 7, 2024
1 parent bcc3107 commit abba295
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dragonfly_uwg/properties/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,11 @@ def _autocalcualted_tree_coverage(self, ground_area):
veg_shds, mesh_area = [], 0
for shd in self.host.context_shades:
if shd.properties.uwg.is_vegetation:
if isinstance(shd.geometry, Face3D):
veg_shds.extend(shd.geometry)
else:
mesh_area += shd.geometry.area
for shd_geo in shd.geometry:
if isinstance(shd_geo, Face3D):
veg_shds.append(shd_geo)
else:
mesh_area += shd_geo.area
tree_area = self.compute_horizontal_area(veg_shds) + mesh_area
if ground_area <= 0:
return 0
Expand Down

0 comments on commit abba295

Please sign in to comment.