def test_noGlobalStack(self, build_volume: BuildVolume): build_volume.setWidth(10) build_volume.setHeight(10) build_volume.setDepth(10) # Fake the the "engine is created callback" build_volume._onEngineCreated() build_volume.rebuild() assert build_volume.getMeshData() is None
def test_updateBoundingBox(self, build_volume: BuildVolume): build_volume.setWidth(10) build_volume.setHeight(10) build_volume.setDepth(10) mocked_global_stack = MagicMock() build_volume._global_container_stack = mocked_global_stack build_volume.getEdgeDisallowedSize = MagicMock(return_value = 0) build_volume.updateNodeBoundaryCheck = MagicMock() # Fake the the "engine is created callback" build_volume._onEngineCreated() build_volume.rebuild() bounding_box = build_volume.getBoundingBox() assert bounding_box.minimum == Vector(-5.0, -1.0, -5.0) assert bounding_box.maximum == Vector(5.0, 10.0, 5.0)