Zoom to fit rust side (#2195)
* zoom to fit Signed-off-by: Jess Frazelle <github@jessfraz.com> * zoom to fit Signed-off-by: Jess Frazelle <github@jessfraz.com> * docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -34,28 +34,13 @@ mod test_examples_my_func {
|
||||
.await
|
||||
.unwrap();
|
||||
ctx.run(program, None).await.unwrap();
|
||||
let (x, y) = crate::std::utils::get_camera_zoom_magnitude_per_unit_length(units);
|
||||
ctx.engine
|
||||
.send_modeling_cmd(
|
||||
uuid::Uuid::new_v4(),
|
||||
crate::executor::SourceRange::default(),
|
||||
kittycad::types::ModelingCmd::DefaultCameraLookAt {
|
||||
center: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
},
|
||||
up: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 1.0,
|
||||
},
|
||||
vantage: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: -x,
|
||||
z: y,
|
||||
},
|
||||
sequence: None,
|
||||
kittycad::types::ModelingCmd::ZoomToFit {
|
||||
object_ids: Some(Default::default()),
|
||||
padding: 0.1,
|
||||
},
|
||||
)
|
||||
.await
|
||||
@ -126,28 +111,13 @@ mod test_examples_my_func {
|
||||
.await
|
||||
.unwrap();
|
||||
ctx.run(program, None).await.unwrap();
|
||||
let (x, y) = crate::std::utils::get_camera_zoom_magnitude_per_unit_length(units);
|
||||
ctx.engine
|
||||
.send_modeling_cmd(
|
||||
uuid::Uuid::new_v4(),
|
||||
crate::executor::SourceRange::default(),
|
||||
kittycad::types::ModelingCmd::DefaultCameraLookAt {
|
||||
center: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
},
|
||||
up: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 1.0,
|
||||
},
|
||||
vantage: kittycad::types::Point3D {
|
||||
x: 0.0,
|
||||
y: -x,
|
||||
z: y,
|
||||
},
|
||||
sequence: None,
|
||||
kittycad::types::ModelingCmd::ZoomToFit {
|
||||
object_ids: Some(Default::default()),
|
||||
padding: 0.1,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
Reference in New Issue
Block a user