mirror of
https://github.com/johndoe6345789/bamboogenerator.git
synced 2026-04-24 21:34:56 +00:00
15 lines
512 B
Python
15 lines
512 B
Python
import pytest
|
|
from parametric_cad import Box, combine, generate_scaffolding
|
|
|
|
|
|
def test_scaffolding_generation():
|
|
base = Box(2.0, 2.0, 1.0)
|
|
overhang = Box(1.0, 1.0, 0.5).at(1.5, 0.5, 1.0)
|
|
mesh = combine([base, overhang])
|
|
scaff = generate_scaffolding(mesh)
|
|
assert isinstance(scaff, type(mesh))
|
|
# Should extend from model base upwards
|
|
assert scaff.bounds[0, 2] == pytest.approx(mesh.bounds[0, 2])
|
|
assert scaff.bounds[1, 2] <= mesh.bounds[1, 2]
|
|
assert scaff.vertices.shape[0] > 0
|