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

MeshHole.png

MeshPit.png

MeshSplit.png

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.