Rhino Doesn't Mess with Meshes so well...What does? Yelp!

Do we have any Mesh Maniacs out there? I spent a bunch of time and money on Rhino and Rhino training to help with my jewelry production process. I am working to imprint my logo on a mesh in Rhino (25k faces) but I wasn’t having much luck so I called Rhino support. Support at McNeel told me this morning that “Rhino isn’t really a tool for meshes. We are a surface modeling program.” I told them that I begged to differ and that Rhino has an entire submenu labeled “MESH” and that I had been able to perform some Booleans but not others. Support replied “Yeah they kind of suck.”

What program will best allow me to take the scans/meshes of my work (STL files) and allow me to imprint designs on them, add new elements, and generally allow me to create what I want? I have purchased ZBrush but haven’t really gotten into it. Any and all recommendations are appreciated!

Ignacio

My work on Instagram:
https://www.instagram.com/happybuddha.guru/

Moved to Rhino for Windows category.

I will take a look at this for you. I have developed a more reliable mesh tool for Rhino that will trim, make a hole or pit and split a mesh. I can try taking a shape for your logo and making a pit in your mesh. Then you can see what you think. On elliptical right now but after I finish and have lunch then I could work on this. I need a .3dm file with your mesh or a .obj file of it. You could post a link to it here or send it via PM.

Regards,
Terry

1 Like

Ignaciolopez65,

Using my python script, it took 7.6 sec to embedded your logo into a 250K face mesh that I made.

Here is a rendered perspective view. The depth can be adjusted.


Here is a wireframe perspective view. The fine grid of the 500x500 mesh causes the Moire patterns.

The edges may look a little jagged but this is due to the lighting. The actual mesh edges are quite smooth as shown here:
LogoMeshEdges

These were created from simple line curves I drew by outlining your logo.


My Python scripts projects these closed curves down onto the mesh and then makes a pit with an adjustable depth inside each of the closed curves. The mesh surface does not need to be flat.

The script can be run from a GUI. Here I show the GUI setup to imprint your logo into the mesh.

Do you want to try this script on your mesh? Or do you want to send me a link to your mesh, or something similar but not as valuable, so I can make sure it works properly first?

Regards,
Terry.

4 Likes

Just learn using it - Zbrush is likely the most versatile mesh editors in the market. In this particular case you could align everything the way you need inside Rhino, export an obj, do the booleans in Zbrush and re-import.

3 Likes

You did that in Rhino? I would definitely like to try your script! How do we make that happen?

ignaciolopez65,

I am currently working on some issues in the script in order to ensure that the mesh is valid after making the pit. I can have it ready for you to try later today. Just let me know if it is OK to use quad faces in your mesh.

Regards,
Terry.

Thanks Hifred! The ZBrush interface is daunting. It looks and feels like an alien space control center. I have started training but was more focused on Rhino.

ignaciolopez65,

I fixed the issue with the imprinted mesh being disjoint (the bottom of the logo was not connected to the top) but there is still an issue with faces with directions different from the mesh as a whole. I will now try fixing this.

Ok I used Rhino’s Repair Mesh tool and it fixed the face directions and now reports the mesh as good. I will see if there is a way to do this inside the script and get back to you.

Ok I found a way to fix the mesh face directions inside the script.

I can send you the script as soon as you let me know about whether using quad faces is ok.

Regards,
Terry.

Ignaciolopez65,

Does your mesh contain quad faces? Or is made of all triangular faces?

Regards,
Terry.

Terry I honestly don’t know. Right now my computer is tied up calculating on a MeshToNurbs command. It looks like its only trianglular faces but I can’t be certain until Rhino quits grinding.

OK. Eventually I have to add back the support for triangular-only meshes so the script will soon be ready to handle which ever case you have.

Regards,
Terry.

Just note that we are rewriting mesh intersect and split functions for Rhino 7 and that some of that is already available in the latest Rhino 7 WIP.

3 Likes

Yes I am aware of that work. But that rewrite does not yet include improvement to MeshSplitWithCurve which is what is used here. Soon I should have my code in good enough shape that you may want to take a look at it. It solves many difficult mesh splitting cases that you may not have seen. It also solves many failures of Curve.ProjectToMesh that are behind some of the mesh splitting failures. My hope is that your new code will do everything my code now does and more. I will put together some test cases with links to .3dm files that illustrate the mesh splitting failures of most concern to me for processing 3D models created from drone photos.

Regards,
Terry.

2 Likes

Terry I was able to convert Buddha with a MeshToNURBS finally after decimating the mesh in ZBrush. I still want to see how your code works though because I work in traditional clay methods and then scan.

Ignaciolopez65, @wim, @piac,

I have attached a copy of my Python script for trimming a mesh to a curve. It uses a DLL for computing volume and pictures for displaying at the top of the form. But for your application neither of these are needed and it should run without them. I also attached the .3dm file I used to get things working. I suggest you practice with this before trying to impress your logo on your mesh.

Bring up the .3dm file and then start the script. Its GUI will appear and you should setup the layers and the settings on the GUI to look like this before pushing the Make Pit button. To show the options on the GUI, press the Show Options button that is on the form when you first bring it up. The form has tool tips. Just hover your mouse over a field to see details about its operation.

Once you press the Make Pit button the result should appear in 10 sec or so and look like this in a Rendered Perspective View:

Here is the .3dm file:
Logo300x300.3dm (5.1 MB)

and here is the script:
TrimMeshToCurveFinish.py (312.0 KB)

Let me know if you can get it to run as shown here. I developed it on a Windows machine with Eto forms so it should work on a Mac but I have not tested it.

Be sure to check the Identical and Normals options or the mesh will not be clean. These options remove identical vertices so the mesh is not Disjoint and then compute and unify Normals so the mesh is reported as good in Rhino’s Mesh Repair tool.

To use this for your 3D mesh model, put the model on the Start Mesh layer and put the closed curves for your logo on the Ordinary layer before you bring up the script. Your model needs to be orientated so the logo is over the mesh in the Top view as in my example.

The script is about 6000 lines long (about 50% comments) and the documentation is mostly up to date but not perfectly. I still need to go thru each procedure and make sure the Parameters and Returns descriptions are correct after my latest changes. Also there are excessive print statement in some places for debugging that need to be removed. So the script is not completely finished but works for many cases and may be readily fixed for your cases that do not work if you send me a link to the .3dm file or a .obj file of your mesh. Currently it works with quad and triangular meshes but will generate some quads in both cases. I am adding an option and code to create a purely triangular mesh if the starting mesh is triangular.

If you would like the pictures that appear at the top of the GUI (one at a time according to operation being performed) here they are:

MeshTrim.png
MeshTrim
MeshHole.png
MeshHole
MeshPit.png
MeshPit
MeshSplit.png
MeshSplit
These 4 pictures need to be put in a folder and then the first line in the Python script needs to be changed to point to this folder. In my case this line is:
pic_path = r'D:/Photoscan/MichaelCrossWinds/LighterTrimHolePitSplit'

For those who want the DLL for computing the mesh volume quickly (like the volume of a pile in the 3D model of a construction site constructed from drone pictures) here is a link to it (a DLL cannot be loaded here):

It needs to be put in a folder and then the second line in the Python script needs to be changed to point to that folder. In my case this line is:
C:/Users\Terry/source/repos/Area_3D_2D_Faces/x64/Release

Regards,
Terry.

4 Likes

Dude thank you so much!! You are extremely generous with your time and knowledge. Gracias!!

1 Like

Ignaciolopez65,

Thank for the complement.

Please let me know if you get the script to work on the .3dm file I provided and on your 3D mesh model. The script is new and I need your feedback to help me improve it and fix problems.

Regards,
Terry.

The script also does an extruded version:

1 Like

You’re a very talented coder Terry!