Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Golden angle pattern (Sunflower)

in General
do we have a way to do the following?
need a start and stop diameter. so pattern is contained between an inner diameter and an outer.
need to tally count. so it will say "3224 holes" for example.
0
Comments
You can do this using a variable feature pattern, like this:
https://cad.onshape.com/documents/8422aa2e7039d247dc2fc15a/w/4400db5b78ea4eb20bc8cf00/e/349ff2f4222393bdab9…
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
i can import from another cad that can do sunflower.
but 4247 entities is too much
DXF/DWG imports have very small size allowances making only small imports possible. A limitation of Onshape as it is now.
You don't want to model it in Onshape using patterns?
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
My Speaker Pattern feature does fibonacci patterns like this. It doesn't do the starts/stops, but could be modified to do so. It's one of my earliest custom features so the code is kind of embarrassing, but could be a great start. To make it really efficient for that many holes I'd aim to convert it to being a face pattern, not a feature or body pattern.
Independent Onshape Consultant | Industrial Designer
@EvanReese Thanks. of course I know zip about programing. Except how to cut and paste.
So i took your "embarrassing" code and dropped it into Grok 3.
Below is what it sent back:
FeatureScript 1188;
import(path : "onshape/std/geometry.fs", version : "1188.0");
// Icon import (kept for UI consistency)
icon::import(path : "e8e9c163f08fa68c8a76741c", version : "79a131bdedd16200dcbcb8dd");
// Default bounds for sunflower pattern
export const SUNFLOWER_PATTERN_BOUNDS = {
(meter) : [-500, 0.001, 500],
(centimeter) : 0.2,
(millimeter) : 2,
(inch) : 0.1,
(foot) : 0.1,
(yard) : 0.025
} as LengthBoundSpec;
export const SUNFLOWER_COUNT_BOUNDS = {
(unitless) : [1, 25, 1e5]
} as IntegerBoundSpec;
// UI Definition for Sunflower Pattern
annotation { "Feature Type Name" : "Sunflower Pattern", "Icon" : icon::BLOB_DATA }
export const SunflowerPattern = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
annotation { "Name" : "Center Point", "Filter" : EntityType.VERTEX && SketchObject.YES || BodyType.MATE_CONNECTOR, "MaxNumberOfPicks" : 1 }
definition.center is Query;
I asked it to:
I need you to read and understand the following program called FeatureScript 1188 do the following:Remove anything that is not related to the Fibonacci pattern. I only want to make a Sunflower pattern. Make the program lean, as there might be some sloppiness. Fix any other errors you see.
Then
I need to have the ability to set an inside diameter and an outside diameter as the limits of the sunflower pattern. Then I need to be able to set the count of how many of those patterns fall within those inside and outside limits. so can you add those features in?
Then
a few more requests and pow!
Dope! Wont be long before we have a "Siri" or "Cortana" assistant that can just help us out on the fly like that instead of having to go to a chat window.
Eventually.. they will start strictly implementing the 3 laws. rip.
Please remain in doors, this is for your own protection
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
let's goooo!
Independent Onshape Consultant | Industrial Designer
@MichaelPascoe It gets even better…Wait till is connected to my brain and I start to dream..
@digitalcarbon is that the final script?
Could you share for posterity?
@Ste_Wilson How do I share?
I suppose you all could just do the same with your version of Grok 3. (I have SuperGrok)
Prompts:
************************
I need you to read and understand the following program called FeatureScript 1188 do the following: Remove anything that is not related to the Fibonacci pattern. I only want to make a Sunflower pattern. Make the program lean, as there might be some sloppiness. Fix any other errors you see.
************************
I need to have the ability to set an inside diameter and an outside diameter as the limits of the sunflower pattern. Then I need to be able to set the count of how many of those patterns fall within those inside and outside limits. So can you add those features in?
***********************
Also, this program is for generating a sunflower pattern so can you take out any reference to "speakers" and just use an appropriate name?
***********************
I got the following error "Nonconforming feature function 'SunflowerPattern': precondition analysis failed" "23:14 Speaker Pattern" can you fix it?
***********************
Those are the prompts I used to get the final clean code. Start with @EvanReese Speaker Pattern doc, use his code but add in the prompts I listed above. See what you get.
SuperGrok 3 - Supercharging an average individual. 2025.03.24