Skip to content

Commit

Permalink
fix(writer): Catch a potential edge case I thought of
Browse files Browse the repository at this point in the history
Probably not going to happen in the Rhino/Revit plugins but I want to use this here as a reference in the future so I'm using best practices.
  • Loading branch information
chriswmackey authored and Chris Mackey committed Jun 14, 2024
1 parent c2659e7 commit 7a40e63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion honeybee_idaice/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@ def model_to_idm(
prepare_model(model, adj_dist)

# determine the number of places to which all of the vertices will be rounded
dec_count = (int(math.log10(model.tolerance)) * -1) + 1
try:
dec_count = (int(math.log10(model.tolerance)) * -1) + 1
except ValueError: # someone used a tolerance of zero
dec_count = 0

# make sure names don't have subfolder or extension
original_name = name or model.display_name
Expand Down

0 comments on commit 7a40e63

Please sign in to comment.