Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

MeshUnwrapper object freeze bug

$
0
0

Hi @Jussi_Aaltonen,

using below snippet on a mesh object in the document leaves the object in a partially unselectable, invalid state. The mesh object can not be selected by clicking on it, however, it can be selected with a window selection.

import Rhino
import rhinoscriptsyntax as rs

def DoSomething():
    
    mesh_id = rs.GetObject("Select Mesh to unwrap", 32, True, False)
    if not mesh_id: return
    
    mesh_obj = rs.coercerhinoobject(mesh_id, True, True)
    unwrapper = Rhino.Geometry.MeshUnwrapper(mesh_obj.Geometry)
    rc = unwrapper.Unwrap(Rhino.Geometry.MeshUnwrapMethod.LSCM)
    
DoSomething()

If you select the mesh, eg. using _SelMesh and the run _RebuildMesh the mesh object gets invisible (is not displayed anymore), but it still gets selected with _SelMesh. Running _SelBadObjects finds the mesh. Running _Check yields this:

Unable to create face normals on mesh.
This will cause problems if the ultimate goal is boolean operations.

I’ve tried to use _RebuildMeshNormals but the command returns that it failed. I can repeat above with any mesh object using Rhino version 7.21.22182.9001, 2022-07-01

_
c.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4125

Trending Articles