Nautilus plugin

All the features are in the library (with limitations if licence is not Level 3) but the Grasshopper components just exist in a personal set of tools that I use for my specific designs (Nautilus Purple).
image
For example here holes are cutted on a 2D shape (using Fern Spores) then “ReRolled” on 3D.


2 Likes

Hello every one,
I would like to ask two questions, according to nautilus plugin. In my work, i want to create groups of cubes with uniformly distribution of points, which will be a voronoi’s centers. I occured two problems and i cant solve it.

  1. I want to create cubes with specific porosity (for example 30%). When i am doing it by ‘cubic distribution’ and set for example 500 points i get 62% porosity, but when i increase number of point even a little for example to 510 i get over 70% porosity (i cant set anything between). What is the problem? Can i solve it in some way?
    First example:
    points1
    Porosity:
    porosity

Second example:
points2
Porosity:
porosity2

  1. I want to create cubes with hexagonal distibution of points, and i have to set the box with dimension: 30x30x30 [mm]. When i pick hexagonal from ‘populate box uniformly’ Rhino crushes and i cant do anything (even when i was waiting 1 hour)? Do you know what the problem is?

Here is my .gh file:
Nautilus_problem.gh (14.9 KB)

Do you see any option of help? If yes i will be very grateful!

1 Like

In the version 0.9.3.0 I added
Planks in Region
This tool generate planks in region defined by planar curves. It works for region with or without holes. It outputs the polyline of the plank, the plane of the plank and the length of the plank (used for 1D nesting for example)


Image Thinner 1 and Image Thinner 2

Draw a 1 pixel wide skeleton of an image while retaining the shape and structure of the full image. It uses the Zhang-Suen Thinning Algorithm from second and third method of


Difference between Rhino Vectorize and Image Thinner

Smooth output using Smooth Polyline

I added a Mesh Map component that is similar to the @DanielPiker Kangaroo component but I added Height. So if you want to Map a 3d object From a Mesh To another
From


To

Cistercian Notation

Outputs curves representing an integer with Cistercian notation, if integer is bigger than 9999 integer will be divided by group of 4 integers


It could be used to number pieces with single font short character

Equal Area Cells generates equal area cells along a tween curve that is generated using the ribs (quasi parallel lines)


It is not always same area if others options are choosen


Explode Positions explodes positions of a list geometries. It is similar to ScalePositions command in Rhino.

Two others components are used to change objects in Rhino, especially the size of circles. I used it to adapt circles size depending on the kerf of laser cutter.
image

4 Likes

I improved the time of calculation of Reaction Diffusion and it is less slow to use reaction diffusion guided with bitmap (licence needed)





We Can Do It — Wikipédia!

3 Likes

Laurent, you’re amazing, the details are stunning.

You do amazing filters that photographers, publishers and offset printers would love to get their hands on! :wink:

I saw this science news article about patterns in diffusion and this might give some ideas!

Related wiki
Diffusiophoresis and diffusioosmosis - Wikipedia.

I just tested that because I saw this instagram and this tool. I didn’t test it but wanted to test my own tool.

Wow, that is beyond adaptive diffusion to pattern morphing! Not exactly GH material right? But why not! :wink:

https://lostminds.com/products/

Check out Patternodes.

Reminds me of the old MacOS screensaver FlowFazer and the Kai Powertools plugin on Photoshop!

Bring it on!

1 Like

Cool to see other nice Nodes tool. I’ll stay with Grasshopper, I don’t really need other thing for now.
Reaction Diffusion Extended allows to put variable of reaction diffusion coefficient on all points of the mesh. Like it was done by @Bathsheba here

This allows this kind of thing.
Linear variation depending on the brightness for
dA diffusion A
dB diffusion B
F (feed)
K (kill)



Adding some directionality on the dark colors

1 Like

Hi @laurent_delrieu

I’m truly fascinated by the Nautilus plugin and always find myself learning something new from your posts. Thank you for your exceptional work!

I’ve noticed that Nautilus includes several image-related components that require an image file path to run.

I’ve also been working on a plugin called JAVID, which handles bitmaps. There’s also the Bitmap+ plugin (@DavidMans). I think it would be great if Nautilus could take bitmap objects directly, so these plugins could work better with each other.

As a suggestion, perhaps you could include a simple component (like this) that accepts a file path and opens the bitmap .This would help Nautilus work on its own and also with other plugins.

4 Likes

@Mahdiyar thanks for the interests and suggestions. I have now changed a bit the way inputs and outputs work. For the input of 3 component they accept as image

  1. A path
  2. An image
  3. A mesh (if mesh is similar in topology to a Mesh Plane

So the fun thing for example is take a Twisted Torus and apply Reaction Diffusion Extended Reaction Belousov or Noise on Mesh then send the colored mesh to a tool that transform a FilePath, an Image or a Mesh to an Image, a Mesh, The rectangle cell and Width and Height Object to Image then apply color on face then we have a tileable Image.
One problem of mesh colored is that color is on vertex. It is better to represent an image with color on face, a face is a pixel. But the color on vertex is more simple and useful for other stuffs.


  public static bool ObjectToImage(IGH_Goo goo, out Image img, out string errorMessage)
        {
            bool output = false;
            img = null;
            errorMessage = "Nothing";
      
            if (goo.CastTo<System.Drawing.Image>(out img))
            {           
                output = true;
            }
            else
            {
                Mesh mesh = null;
                if (goo.CastTo<Mesh>(out mesh))
                {
                    if (mesh.VertexColors.Count == mesh.Vertices.Count)
                    {
                                      int min = Math.Min(Math.Min(mesh.Faces[0].A, mesh.Faces[0].B), Math.Min(mesh.Faces[0].C, mesh.Faces[0].D));
                        int width = Math.Max(Math.Max(mesh.Faces[0].A, mesh.Faces[0].B), Math.Max(mesh.Faces[0].C, mesh.Faces[0].D)) - 1;

                        if ((mesh.Vertices.Count % width == 0) && min ==0)
                        {                            
                            int height = mesh.Vertices.Count / width;

                            Bitmap bitmap = new System.Drawing.Bitmap(width, height);
                            for (int i = 0; i < width; i++)
                            {
                                for (int j = 0; j < height; j++)
                                {
                                    bitmap.SetPixel(i, j, mesh.VertexColors[j * width + i]);
                                }
                            }
                            img = bitmap;
                            output = true;
                        }
                        else
                        {
                            errorMessage = "Mesh not representing an image";
                        }
                    }
                    else
                    {
                        errorMessage = "No Color in the mesh vertices";
                    }
                }
                else
                {
                    string path;
                    if (goo.CastTo<string>(out path))
                    {
                        //https://github.com/dalefugier/Vectorize/blob/main/VectorizeGh/VectorizeGhComponent.cs
                        //string path = null;

                        // Validate path string
                        if (!string.IsNullOrEmpty(path)) path = path.Trim();

                        if (string.IsNullOrEmpty(path))
                        {
                            errorMessage = "Not a good image path";
                            return false;
                        }

                        // Validate path
                        if (!File.Exists(path))
                        {
                            errorMessage = "The specified file cannot be found.";
                            //  AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "The specified file cannot be found.");
                            return false;
                        }


                        try
                        {
                            // Creates a bitmap from the specified file.
                            img = System.Drawing.Image.FromFile(path) as System.Drawing.Bitmap;
                            if (null == img)
                            {
                                errorMessage = "The specified file cannot be identifed as a supported type.";
                                return false;
                            }

                            // Verify bitmap size
                            if (0 == img.Width || 0 == img.Height)
                            {
                                errorMessage = "Error reading the specified file.";
                                return false;
                            }
                            output = true;
                        }
                        catch (System.Exception ex)
                        {
                            errorMessage = ex.Message;
                            return false;
                        }

                    }
                }
            }
            return output;
        }
1 Like

Thank you for taking the time to consider my request. I really like how you approach this.

It is a bit tricky to work with bitmaps. Grasshopper SDK offers a GH_MemoryBitmap class that can help a lot. I’ve used this class to create meshes from bitmaps quickly.

This is how you can create a bitmap from a mesh in Javid:


Nautilus.gh (14.7 KB)

1 Like

And the new way !


There is just an inversion in Width and Height that I will not correct as it works like that from Image preview from Grasshopper

By the way Thanks for the tip, for sure Grasshopper SDK has lot and lot useful tools, and many converters. I looked a bit to what you proposed but at the end it seemed more simple to output an Image, most of the tools accept it like that. Compatibility is better.
Your outputs doesn’t work with Quick Preview from Shape Diver but works with the other previewer (Wizard, Bitmap).

Just a little remark on “Rectangular” Mesh
Image pixels are beginning on Top Left and going to the Right and going down


Mesh Plane are beginning on Bottom Left and going to the Right and going up

1 Like

Hello @Mahdiyar
version 0.9.4 is out on Package Manager for the moment.
I changed some of the inputs that were Path by inputs allowing Paths, Image, or rectangular Mesh (color on vertex or on faces).


Object to Image


Open a Bitmap, from Javid here

“Read” a colored mesh

Image Thinner now accepts Mesh and Bitmap

I added Region To Roof Transform a planar region to a roof.


Following some discussion from there

and the initial discussion

Region To Mesh


Following this discussion

4 Likes

Version 0.9.6.1 is out
Polygonal Spiral


Polyline Spiral


Rubber Band

See there

TSP on Mesh On closed non intersecting curve passing through most of the mesh vertices by using the edges



See there

Change in the logic of orientation of the planks Plank from Region, now by default planks follows the flows (gravity)

Region to RoofNow the roof have merged coplanar faces

Some options added on Pack Objects on Grid
Rectangle around object(s), number of rows and columns

4 Likes

Version 0.9.7 brings


See there for Dubin’s Path

See there for TSP, surely not the best word but the real could be “closed non intersecting path using edges and going through most of the points”

5 Likes

Happy New year everyone. Nautilus v1.0.0 is out.




Some new components
Curve to Lines and Arcs
Curve Region to Roof
See there

A little component to output fonts avalaible
Font Filter Component
image

By default I try to output just single line fonts. If you use other Single line font send me the names

10 Likes

Happy New Year to you @laurent_delrieu
Glad to see V 1.0
So many idea comes to mind with new features you added.


Happy New 2024 to great community.

1 Like

Hey Laurent,
thanks for your tools. The “Curve To Lines and Arcs” converts some “S”-letters from single line fonts to closed shapes. Can you have a look? File attached.
nautilus_curve_to_lines_and_arcs_problem.gh (13.2 KB)

Thanks for the report, as a workaround you can set Heal to false, or RhMethod to true