I tried to add two faces to the same mesh containing nothing with obj.data.from_pydata([], [], faces) , obj.data.polygons[-1].vertices or bme.faces.new(verts).

They were all success when adding the first face, but blender all crashed when adding the second face.

I even tried different ways when adding the two faces, but blender still crashed.

However, It's work when adding the two faces to different meshes.

I have no idea why blender crashes in this situation and how I can fix it.

By the way, the reason why I need to do that is because I want to use bpy.ops.mesh.intersect(mode='SELECT_UNSELECT', use_separate=True, threshold=1e-06) to cut out the intersection of two faces.

The two faces can be in the same meshes or not, depending on what bpy.ops.mesh.intersect() needs

Please tell me if you have any good suggestion, and thank you in advance.

  • $\begingroup$ A face is defined by three or more vertices, only the index number of the vertex is known to the face. Without vertices it will be reading random data looking for the vertex locations, which would be the cause of the crash. You will need to position the vertices where you want the cut to happen so define the vertex positions and then use them to make the faces. $\endgroup$ – sambler Jul 14 '17 at 1:58
  • $\begingroup$ I had added 4 vertices and known the index and position of each of them before I added the second face. I followed this method to add the first face and it worked, while it didn't work when adding the second face. $\endgroup$ – rita33cool1 Jul 14 '17 at 5:23

Your Answer

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

Browse other questions tagged or ask your own question.