mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
If feet is negative, inches should also be negative (subtractive)
This commit is contained in:
@@ -166,6 +166,11 @@ def parse_distance_string(input_string: str, use_project_unit: bool = True) -> t
|
|||||||
break
|
break
|
||||||
if inches is None:
|
if inches is None:
|
||||||
inches = 0
|
inches = 0
|
||||||
|
|
||||||
|
# If feet is negative, inches should also be negative (subtractive)
|
||||||
|
if feet < 0:
|
||||||
|
inches = -inches
|
||||||
|
|
||||||
# Convert to meters
|
# Convert to meters
|
||||||
total_meters = (feet * 0.3048) + (inches * 0.0254)
|
total_meters = (feet * 0.3048) + (inches * 0.0254)
|
||||||
return total_meters
|
return total_meters
|
||||||
|
|||||||
Reference in New Issue
Block a user