1
$\begingroup$

TL;DR: Two different faces created using bmesh.ops.create_circle have the same edges... sort of?

# create 2 circles
circ1 = bops.create_circle(bm,
                           cap_ends=True,
                           segments=segments,
                           radius=1)
circ2 = bops.create_circle(bm,
                           cap_ends=True,
                           segments=segments,
                           radius=2)

# get their respective faces
end1 = circ1["verts"][0].link_faces[0]
end2 = circ2["verts"][0].link_faces[0]

# debug
print(end1.edges) # <BMElemSeq object at 0x12ec08600>
print(end2.edges) # <BMElemSeq object at 0x12ec08600>
print(end1.edges[0]) # <BMEdge(0x7ff3cc8963f0), index=6, verts=(0x7ff3d03a91a0/23, 0x7ff3d03a8f38/12)>
print(end2.edges[0]) # <BMEdge(0x7ff3cc8961c0), index=2, verts=(0x7ff3d03a8cd0/1, 0x7ff3d03a8d08/2)>

end1.edges and end2.edges are reportedly at the same address, but end1.edges[0] and end2.edges[0] point to different places. What's going on here?

$\endgroup$
1
  • $\begingroup$ This is most likely a C address. Try id(end1.edges) and id(end2.edges) which should be different. $\endgroup$ – lemon Nov 14 '20 at 9:42

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.