From b46442f48f6368874afad330fcf521de0f1a14f7 Mon Sep 17 00:00:00 2001 From: Matt Ferraro Date: Fri, 17 May 2024 23:30:43 -0400 Subject: [PATCH] add tiny truck-only test to main.rs --- packages/cadmium/src/main.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/cadmium/src/main.rs b/packages/cadmium/src/main.rs index 6ffc69a9..7b90132e 100644 --- a/packages/cadmium/src/main.rs +++ b/packages/cadmium/src/main.rs @@ -20,7 +20,21 @@ use truck_shapeops::{and, or, ShapeOpsCurve, ShapeOpsSurface}; use truck_topology::{Shell, Solid}; fn main() { - stacked_cubes(); + truck_test(); + // stacked_cubes(); +} + +fn truck_test() { + let point_a = vertex(Point3::new(0.0, 0.0, 0.0)); + let line_a = tsweep(&point_a, Vector3::new(1.0, 0.0, 0.0)); + let square_a = tsweep(&line_a, Vector3::new(0.0, 1.0, 0.0)); + let cube_a = tsweep(&square_a, Vector3::new(0.0, 0.0, 1.0)); + + let result = serde_json::to_string(&cube_a); + match result { + Ok(json) => println!("{}", json), + Err(e) => println!("Error: {}", e), + } } fn stacked_cubes() {