question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to cut a plane with a mesh?

See original GitHub issue

I have a mesh and plane. I am failed to cut the plane with the mesh.

The code I am testing is:

from vedo import *

c = Cylinder(pos=[0, 0, 0], r=10, height=10)

verts = [(-20, -20, 0), (20, -20, 0), (20, 20, 0), (-20, 20, 0)]
faces = [(0,1,2, 3)]

mesh = Mesh([verts, faces])

ret = mesh.clone().cutWithMesh(c)

show([(c, mesh), ret], N=2)

And the result is empty (right):

image

I expect the following result:

image

How can I implement this requirement? Any suggestion is appreciated~~~

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zhang-qiang-githubcommented, Dec 7, 2022

Thank your very much for the kindly reply. It is what I want.

image

I want to know what’s the meaning of 4 in subdivide(4, method=1). The function explanation shows: n: number of subdivisions. I find there are 16 squares in the yellow plane. How to understand the 4&16?

0reactions
marcomusycommented, Dec 7, 2022

No, it’s probably the visualization that clips in the range of the object - click on the renderer then press r

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Clipping a mesh with a Plane - Food4Rhino |
This is a tutorial on how to clip a mesh with a clipping plane. It covers the underlying datastructures and algorithms in detail....
Read more >
Bisect — Blender Manual
The Bisect tool is a quick way to cut a mesh in two along a custom plane. Use LMB click and drag to...
Read more >
Split a mesh with a plane - Blender Stack Exchange
Add a plane · Grab and move the plane to where I want the cut an existing mesh · Select the plane, then...
Read more >
Mesh Cutting - Coreform
The current scope of mesh cutting is limited to cutting hex meshed volumes with planes and extended surfaces. These cutting entities are also...
Read more >
Fusion 360 Help | Trim or split a mesh body with a plane
In the Design workspace, on the Mesh tab, select Modify > Plane Cut · In the canvas, select a mesh body. · Select...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found