This script is used for generating voronoi sketches in Autodesk Fusion 360. Once created, these sketches may then be used for creating or modifying models.
Note that JavaScript development (editing/debugging) is no longer supported within Fusion 360. But existing JavaScript add-ins, such as Voronoi can still be installed and run.
More information here:
Please follow the instructions here:
Note, you can still add scripts implemented in JavaScript.
- Run the "Voronoi" script from the Script Manager
- The settings dialog will be shown. Adjust to your preferences:
- Sketch Selection: Select a sketch to insert Voronoi or none to create a sketch.
- Edge Style: Straight or Curved edges
- Number of Cells (2-256) : Number of cells created in the sketch
- Number of Lloyd's relax iterations:
- Pattern width : Width of the area filled with cells
- Pattern height : Height of the area filled with cells
- % to scale cells (10-100) : Percentage to scale down each of the cells
- Click OK to generate the sketch
Note that a large number (> 128) of cells may take a while to generate (sometimes several minutes).
Once the voronoi sketch is created I will usually project the geometry onto a surface and then modify from there. Note that projecting onto a curved surface will not work at this time. In this case I'll use push/pull on the voronoi geometry to modify existing models. The image above was created using this method and a 128 cell voronoi pattern.
Please view the following screencast to see Voronoi in use: Using the Voronoi v2 add-in for Fusion 360
Examples posted on my Fusion 360 project gallery.
- One cell may not be filled after generation. Adjusting a control point then forces it to fill.
- It's not possible to adjust the spline's knots and strengths therefore the curves don't conform as close as they should. The "% Scale Cell" value is a workaround for this. Scaling down the cells reduces the possible overlap of the cells.
This code makes use of the Raymond Hill's well done Javascript-Voronoi code: https://github.com/gorhill/Javascript-Voronoi
Github user LeonFedotov kindly submitted the changes to support Lloyd's relaxation algorithm. More information about the algorithm on Wikipedia.