Mesh.delete_face(fkey) raises KeyError when used on triangulated Rhinocommon meshes.
See original GitHub issueDescribe the bug
Mesh.delete_face(fkey)
raises KeyError
when used on triangulated Rhinocommon meshes.
Mesh.is_quadmesh()
returns True
for some reason, and return from Mesh.insert_vertex(fkey)
contains an extra face consisting of vertex keys [x, x, y]
instead of expected [x, y, z]
.
To Reproduce Steps to reproduce the behavior:
- Grasshopper
- Sample script
from compas_rhino.geometry import RhinoMesh
from compas_ghpython.artists import MeshArtist
mesh = RhinoMesh.from_geometry(mesh).to_compas()
assert mesh.is_quadmesh()
key = mesh.get_any_face()
mesh.delete_face(key)
artist = MeshArtist(mesh)
rhino_mesh = artist.draw_mesh()
4. See error
Runtime error (KeyNotFoundException): KeyError
Traceback:
line 737, in delete_face, "C:\Users\a\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\datastructures\mesh\core\halfedge.py"
line 10, in script
Desktop (please complete the following information):
- OS: Windows 10
- Rhino 6 SR4 2.7.8 (IronPython 2.7.8 (2.7.8.0) on .NET 4.0.30319.42000 (64-bit))
compas==0.15.5
installed using conda.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
MeshFaceList Methods - Rhino Developer Documentation
Merges two triangular mesh faces that share an edge into one quadrangular face. Removes a face from the mesh. Removes a face from...
Read more >Mesh Class - Rhino Developer Documentation
Represents a geometry type that is defined by vertices and faces. This is often called a face-vertex mesh.
Read more >MeshFaceList.DeleteFaces Method (IEnumerable(Int32))
Removes a collection of faces from the mesh without affecting the remaining geometry.
Read more >Mesh.CreatePatch Method - Rhino Developer Documentation
Construct a mesh patch from a variety of input geometry. Namespace: Rhino.Geometry Assembly: RhinoCommon (in RhinoCommon.dll). Since: 6.0. Syntax.
Read more >Add Mesh - Rhino Developer Documentation
Rhinoceros 3D: Demonstrates how to construct a mesh from a list of vertices and faces.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the fix has been pushed and is building. please check if it fixes your problem…
Fixed in 857a29e0