Hi,
I’m currently working on a script to help me create FEA Meshes with Rhino and some plugins.
But i keep getting those annoying messages:
Is there a way to click automated on no?
I allready tried “-” and “_enter”
Thank you in advance
Hi,
I’m currently working on a script to help me create FEA Meshes with Rhino and some plugins.
But i keep getting those annoying messages:
Is there a way to click automated on no?
I allready tried “-” and “_enter”
Thank you in advance
Hi @David_Seidel1,
probably no if you are just running Rhino’s _ToNurbs
command from a script. The dialog will come up as soon as your mesh has more than 20000 faces. To prevent that, you might use below method:
Rhino.Geometry.Brep.CreateFromMesh
Example script:
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
def DoSomething():
mesh_id = rs.GetObject("Mesh", rs.filter.mesh, True, False)
if not mesh_id: return
mesh = rs.coercemesh(mesh_id, True)
brep = Rhino.Geometry.Brep.CreateFromMesh(mesh, True)
if not brep: return
scriptcontext.doc.Objects.AddBrep(brep)
scriptcontext.doc.Views.Redraw()
DoSomething()
be aware that the warning message serves a purpose. To suppress it does not prevent that Rhino runs out of memory. Please note this excellent article:
https://wiki.mcneel.com/rhino/meshtonurb
_
c.
Thats awesome, thank you.
Another question: Is there a way to simulate the Button Push? I tried pynput but it told my that i have no xserver.
I convert my model in several chunks of 30000 nurbs. and delete them after every conversion. Should not be that of a problem.
Nethertheless i dont unterstand why i have to do this as engineer and no smart developer of meshing software implemented this approach.
If you replace the call to the _ToNurbs
command with above example in your script you should not need to simulate any Button Push. There is no easy method to simulate it with standart libraries i know of despite AutoIt
_
c.
Thank you. I understand your tip and implemented it allready.
Another plugin also produces these kind of messages. I found no way yet to talk to the plugin other then command line. So i have to find a way for the second “problem”.
I will try autoit as well. Thank you very much.