From 9c20aa1b70128d3f4309880d79afe79cc759b01d Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 21 Mar 2024 19:30:59 +0100 Subject: [PATCH] blueprint for signed distance field demo --- examples/python/signed_distance_fields/main.py | 16 +++++++++++++++- src/mesh-to-sdf | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) create mode 160000 src/mesh-to-sdf diff --git a/examples/python/signed_distance_fields/main.py b/examples/python/signed_distance_fields/main.py index 9a78cbabfc805..e2669fcfd6084 100755 --- a/examples/python/signed_distance_fields/main.py +++ b/examples/python/signed_distance_fields/main.py @@ -37,6 +37,7 @@ import numpy as np import numpy.typing as npt import rerun as rr # pip install rerun-sdk +import rerun.blueprint as rrb import trimesh from download_dataset import AVAILABLE_MESHES, ensure_mesh_downloaded from trimesh import Trimesh @@ -194,7 +195,20 @@ def main() -> None: rr.script_add_args(parser) args = parser.parse_args() - rr.script_setup(args, "rerun_example_signed_distance_fields") + rr.script_setup( + args, + "rerun_example_signed_distance_fields", + blueprint=rrb.Horizontal( + rrb.Vertical( + rrb.Horizontal( + rrb.Spatial3DView(name="Input Mesh", origin="/world/mesh"), + rrb.TensorView(name="SDF", origin="/tensor"), + ), + rrb.TextLogView(name="Execution Log"), + ), + rrb.Spatial3DView(name="Distance Field Samples", origin="/world/sdf"), + ), + ) mesh_path = args.mesh_path if mesh_path is None: diff --git a/src/mesh-to-sdf b/src/mesh-to-sdf new file mode 160000 index 0000000000000..c9f26e6399f7f --- /dev/null +++ b/src/mesh-to-sdf @@ -0,0 +1 @@ +Subproject commit c9f26e6399f7fd8deb40c7fba02c7e74aca6c657