I need to find the intersection curve between two (open) meshes, and I can do that interactively with the knife tool. In search for a way to do it from a script, I came across the following highly relevant question: Using knife_tool from python api

There is one answer, which simply refers to the BMesh API. However, I find no immediate candidate for the knife_tool from bpy.ops.mesh in bmesh.ops.mesh. Is there a way to script mesh intersection cutting from bmesh, or at all?

The attached screendump illustrates a cut in the cylinder mesh from the intersecting sphere mesh. I obtain it interactively with the cylinder mesh edges selected, then by Ctrl+F and choosing "Intersect (Knife)".

enter image description here

  • $\begingroup$ some images are welcome please $\endgroup$
    – yhoyo
    Aug 20 '18 at 13:00
  • $\begingroup$ I can probably get by with bpy.ops.mesh.intersect. But if BMesh is the future, I would like to know how to do it with bmesh.ops.mesh. $\endgroup$ Aug 20 '18 at 14:20
  • $\begingroup$ @Leander, you are more than welcome to add to the question, or present you findings and perspectives! $\endgroup$ Jun 4 '19 at 9:11

Could be this?

# Select all vertices in Edit Mode

# Do intersect
  • $\begingroup$ Thanks, @cogitas3d. I eventually ended up doing just that. However, that is not a BMesh operation, and it does not end up producing a BMesh. I have to convert the result to a BMesh afterwards. $\endgroup$ May 21 '19 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.