mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
Add georeferencing integration tests
This commit is contained in:
@@ -20,6 +20,7 @@ import os
|
||||
import bpy
|
||||
import traceback
|
||||
import webbrowser
|
||||
import numpy as np
|
||||
import ifcopenshell
|
||||
import blenderbim.tool as tool
|
||||
import blenderbim.bim
|
||||
@@ -671,6 +672,16 @@ def prop_is_roughly_value(prop, value):
|
||||
assert False, f"Value is {actual_value}"
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" has a cartesian point offset of "{offset}"'))
|
||||
def the_object_name_has_a_cartesian_point_offset_of_offset(name, offset):
|
||||
offset = replace_variables(offset)
|
||||
obj = the_object_name_exists(name)
|
||||
assert obj.BIMObjectProperties.blender_offset_type == "CARTESIAN_POINT"
|
||||
obj_offset = np.array(tuple(map(float, obj.BIMObjectProperties.cartesian_point_offset.split(","))))
|
||||
offset = np.array(tuple(map(float, offset.split(","))))
|
||||
assert np.allclose(obj_offset, offset)
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name}" has the material "{material}"'))
|
||||
def the_object_name_has_the_material_material(name, material):
|
||||
assert material in [ms.material.name for ms in the_object_name_exists(name).material_slots]
|
||||
|
||||
Reference in New Issue
Block a user