This commit is contained in:
Andrej730
2024-03-21 14:17:02 +05:00
parent ece9e5c834
commit 1b1eccb0c1
4 changed files with 83 additions and 40 deletions
@@ -28,6 +28,7 @@ import ifcopenshell.util.placement
import ifcopenshell.util.geolocation
import ifcopenshell.util.classification
import ifcopenshell.util.schema
import ifcopenshell.util.shape
from decimal import Decimal
from typing import Optional, Any, Union
@@ -373,8 +374,7 @@ def set_element_value(
coord_i = "xyz".index(key)
prev_value = matrix[coord_i][3]
new_value = float(value) if value else 0.0
TOLERANCE = 1.0e-5
if new_value + TOLERANCE > prev_value > new_value - TOLERANCE:
if ifcopenshell.util.shape.is_x(new_value, prev_value):
return
matrix[coord_i][3] = new_value