Skip to content
Discussion options

You must be logged in to vote

hi, I think it can be due to a precision issue as the vertices of the mesh exactly overlap with the cutting plane.

you can try to tilt a little bit the tank tank.rotate_y(1) and see if the problem persists..
also check out this simplified version which might be faster:

from vedo import *

def func(widget, event):
    z = widget.value

    # not needed, but shows how to slice
    # tankslice = tank.slice(normal=[0, 0, 1], origin=[0, 0, z]).rename("slice")
    # tankslice.lighting("off").c("blue4").alpha(0.5)

    xmin, xmax, ymin, ymax, zmin, zmax = tank.bounds()
    box_bounds = [xmin - 10, xmax + 10, ymin - 10, ymax + 10, z, zmax + 10]
    ctank = tank.clone(deep=False).cut_with_box(box_…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@OwenDavid
Comment options

@OwenDavid
Comment options

@marcomusy
Comment options

Answer selected by marcomusy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants