Forgot password?

Create an account!

Forum

« back

RhinoScript – Using "FillMeshHoles" and "selid" in a RhinoScript

Messages

Please log in to write a message.

  • 7. Maximvs86 (Jan 28, 2016 14.58):

    You have to first select all objects and then give the fillmeshholes command.

    Rhino.Command("_selAll _FillMeshHoles _Enter")
  • 6. PomeroyB (Sep 19, 2013 19.49):

    No, I haven't, but like I said, the issue is not that "nonWaterTightMesh" object isn't there.

    For example, if I put in the following code:

    Rhino.Command("_FillMeshHoles _selAll _Enter")

    The code still does not work. Instead of automatically selecting all, as I've put into the code, Rhino pauses the script and waits for my user input (Clicking the object with the mouse). This is the behavior that I am having trouble with, and I'm not sure why... it seems like it's just ignoring the _selAll command.

  • 5. pulgarata (Sep 19, 2013 17.08):

    did you try with "rhino.LastObject" in the place of "rhino.LastCreatedObjects"?

  • 4. PomeroyB (Sep 19, 2013 05.52):

    Well, yes, I didn't want to post an entire program when it was just one line of code that was giving me trouble...

    My code, trimmed down, is basically:

    dim strFile
    dim importedFile

    strFile = "C:/user/path/to/file.stl)"

    call rhino.Command("_import " & strFile)
    importedFile = rhino.LastMCreatedObjects()

    Rhino.Command("_FillMeshHoles _selid " & importedFile & " _Enter")

    The problem is not (I believe) that our mesh variable is empty, since we are able to perform unions and intersections with the object. The trouble (Again, I believe) is _selId and _selAll not working with _FillMeshHoles...

  • 3. pulgarata (Sep 17, 2013 13.41):

    Hi Brandom, It seems that "nonWaterTightMesh" is empty. Did you check that?

  • 2. PomeroyB (Sep 17, 2013 01.05):

    (P.S.) I forgot my end parens on the Rhino.Command I wrote below, but it's there in the code, I swear! ;)

  • 1. PomeroyB (Sep 17, 2013 01.04):

    Hey all,

    I'm using Rhinoscript to automatically process some meshes. I can import and do operations on my meshes just fine, but I run into trouble when I try to export.

    Because the Meshes will be used in 3D printing, they need to be watertight. I can do this on the Rhino command line by typing "fillMeshHoles" and selecting my mesh, but I'd like that to be automated as well.

    The code that I'm trying to use is:

    Rhino.Command("_FillMeshHoles _selid " & nonWaterTightMesh & " _Enter"

    Rhino is willing to run the _FillMeshHoles, but then prompts me to select the mesh with mouse, instead of using the _selid command.

    I've also tried this with _selAll, and the same thing occurs. Rhino ignores that syntax and asks for user input.

    Obviously I'm doing something wrong. Any one have any ideas?

    Thanks!

    Brandon Pomeroy

Recommend

Why are these buttons gray?