SmithsOfUrth
-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Events
3D Prints
Posts posted by SmithsOfUrth
-
-
Hey guys!
I'm working on a plugin (for Cura 3.6+) to enable manual supports, and one of the features I want to add is to show some kind of "preview" of what area the support is going to be taking.
Right now, I'm creating a cube and adding it to a X,Y position using this code:
active_camera = self._controller.getScene().getActiveCamera() picking_pass = PickingPass(active_camera.getViewportWidth(), active_camera.getViewportHeight()) picking_pass.render() picked_position = picking_pass.getPickedPosition(event.x, event.y)
After that, the script creates a cube kinda manually (I'm basing myself on the SupportEraser plugin) with a value entered by the user. Thus, the cube has the same width, height and depth.
What I want to do is to make it as big in the Z axis as necessary so that it touches the build plate , and the user can see what it'd look like once it's processed.
Is there a way to scale it enough?Thanks!
[Plugin] Scaling cube from point down to Z=0
in UltiMaker Cura
Posted
Thanks for answering, nallath.
I ended up doing this to create a cube that touches the buildplate:
where "distance_to_buildplate" is the position in the Y axis of the cube when you click on the model, which is the same thing as the distance from the cube the ground.