Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
railgnam committed Aug 2, 2024
1 parent d1fd1cb commit df28af2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
9 changes: 5 additions & 4 deletions bdm_voxel_builder/agent_algorithms/algo_10_a_slicer_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ class Algo10a_VoxelSlicer(AgentAlgorithm):

# IMPORTED GEOMETRY ----- PLACEHOLDER
add_simple_design = True
add_complex_design = True
add_complex_design = False
box_template_1 = [8, 25, 6, 25, 1, 4]
box_template_2 = [20,35,6,10,4,8]
ground_stair_1 = [0, 50, 20, 50, 0, 2]
ground_stair_2 = [20, 50, 0, 30, 0, 3]
ground_level_Z = 0
Expand Down Expand Up @@ -168,11 +169,11 @@ def initialization(self, **kwargs):
# imported design TEMP
if self.add_simple_design:
design.add_values_in_zone_xxyyzz(self.box_template_1, 1)
elif self.add_complex_design:
if self.add_complex_design:
ground.add_values_in_zone_xxyyzz(self.ground_stair_1, 1)
ground.add_values_in_zone_xxyyzz(self.ground_stair_2, 1)

design.add_values_in_zone_xxyyzz(self.box_template_1, 1)
design.add_values_in_zone_xxyyzz(self.box_template_2, 1)
design.add_values_in_zone_xxyyzz(self.ground_stair_1, 0)
design.add_values_in_zone_xxyyzz(self.ground_stair_2, 0)
print(f"design array at init{design.array.shape}")
Expand Down Expand Up @@ -446,7 +447,7 @@ def agent_action(self, agent, state: Environment):

built = self.print_build(agent, state)

print(f'built: {built}')
# print(f'built: {built}')
if (built is True) and self.reset_after_build:
self.reset_agent(agent)

Expand Down
4 changes: 4 additions & 0 deletions bdm_voxel_builder/empty_compas_viewer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from compas_viewer import Viewer

viewer = Viewer()
viewer.show()
4 changes: 2 additions & 2 deletions data/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

# SHORT RUN test compasview
grid_size = 30
iterations = 2000
iterations = 4000
agent_count = 1
interval = iterations / 10
name = f"slicer_test_i{iterations}a{agent_count}"
name = f"slicer_test_simple_i{iterations}a{agent_count}"

config = Config(
iterations=iterations,
Expand Down

Large diffs are not rendered by default.

Git LFS file not shown

Large diffs are not rendered by default.

Git LFS file not shown

0 comments on commit df28af2

Please sign in to comment.