Hello SOLIDWORKS and 3DEXPERIENCE Works Power Users! Welcome to the 32nd SOLIDWORKS Power-User Challenge; the first challenge hosted on the Platform.
The credit for the inspiration for this challenge goes to R.Q. who asked this question on the API section of this forum.
For this challenge you can use any of these tools and combinations of them:
- SOLIDWORKS
- 3DEXPERIENCE Applications
- Macros
Requirements:
1. Create a hemisphere. You should be able to control its diameter.
2. Place equidistant points on the hemisphere (as close to the "equidistant" ideal as possible). Ideally, you should be able to modify the spacing and the distribution of points parametrically. If it is not possible to modify them parametrically, you should aim for a method that would reduce manual work during revisions.
Multiple Power User Certificates can be won for:
- Best solution using SOLIDWORKS (no macros)
- Best solution using SOLIDWORKS (with macros)
- Best solution using 3DEXPERIENCE Apps (no SOLIDWORKS)
- Best solution using 3DEXPERIENCE Apps and SOLIDWORKS
- The Most Original Solution
- People's Choice Solution (the solution that gets most "likes").
To enter the contest, please do the following before 11:59 am EDT on September 30th, 2021:
- Upload a finished model in this thread
- Add a step-by-step description of what you did (we encourage the use of screenshots and/or videos).
Do not hesitate to brainstorm with the other participants. In the end, if we put our minds together, we should get as close as possible to the best possible solution.
Update: Thanks to @EA for pointing out that this is known as the Thomson Problem: https://sites.google.com/site/adilmmughal/thethomsonproblem2
swpuc
Example (SW2019 and SW2021 sample files attached): https://youtu.be/Di6Y_leojAc
UPDATE: Exciting news! This time, our challenge is sponsored by Blue Byte Systems, Inc., a leader in SOLIDWORKS and PDM API customization (visit them at bluebyte.biz and cadoverflow.com). These prizes will be awarded to the best three solutions:
- 1 https://3dconnexion.com/us/product/cadmouse-compact/
- 2 Amazon gift card for US\\\$50 or equivalent
- 3 Amazon gift card for US\\\$25 or equivalent
Blue Byte Systems is a team of API experts. They have over 15 years of combined SOLIDWORKS, PDM Professional implementation and customization experience. They even offer free 20 minute consultations, which could be booked at https://calendly.com/bluebyte.
Final Update: It is time to announce the winners:
While we received only 3 submissions, it was very interesting to see that each of them used a different software as the environment:
@DP used SOLIDWORKS Core Functionality
@EA used SOLIDWORKS API
@AB used xGenerative Design on the 3DEXPERIENCE Platform.
All contestants provided detailed descriptions of what they did (Andrew even recorded a video). For me, it is fascinating to see how creative the SOLIDWORKS Power User are!
It is time to announce the Awards for SWPUC32:
Best solution using SOLIDWORKS (no macros) : Danute Petrova-Nikolova
Best solution using SOLIDWORKS (with macros): Eddy Alleman
Best solution using 3DEXPERIENCE Apps (no SOLIDWORKS): Andrew Barnes
The Most Original Solution: Eddy Aleman
People's Choice Solution (the solution that gets most "likes"): Eddy Alleman and Andrew Barnes
Note: I counted unique likes per user on their posts where solutions were presented.
Congratulations to our winners and many thanks to all who participated in the SWPUC brainstorming.
Power User Certificates in PDF format are attached.

You use surface flatten, which needs higher version of SWX. I only have standard version.
Th attached part is in 2021 version and not everyone might be able to open this file. So if there are chances, post a lower version file as well.
Hi everybody, hi @AV,
good to see that the SWPUC is back again!
This challenge reminds me on a part I've created back in 2012 when SWX had learned to flatten curved flanges of sheet metal parts. I've also used a fill pattern on the flattened state. But - as you can see - this wasn't a proper solution because of the stretched circles when unflattened.
Edit: I've found some more trials in my archive. Only one has a proper solution. After some research I found, that a golf ball has no regular (equidistant) pattern. And even the diameters are slightly different...
If there was a way to extract the node/tessellation data in the Flatten Surface Preview, or just figure out how they generate the preview, then it would open up so many options. Working with SW API tessellation functions only yields data with respect to the UV curves as far as I have found, which is not necessarily what we want. Imagine being able to specify the node distances, then plotting according to those intersections. Something like "minimum node distance," and something like a macro feature could perform the calculations and generate the 'equally' spaced nodes. This method would avoid distortions from re-wrapping a flattened surface onto the original, and just working directly off of the original surface.
This may be a stupid question but how are you defining "Equidistant"? Linear from point to point? arc distance with circle thru three or more points or arc distance with center of the circle at center of sphere?
Nice challenge.
And my solution: SOLIDWORKS (no macros)
Based on the sample I assume "Equidistant" between points in a row and between rows.
Both Diameter and desired distance can be controlled by "Global Variables".However, the distance is approx. while in both row distance and between the points in the row formulas are calculating closest possible for even distribution.
1. First I made a sketch for both Hemisphere Revolve and calculation purpose
2. Offset Hemisphere top surface
3. Draw a circle and trim surface to have 1 circular surface on the top.
4. Add the first point on the surface centre
5. Equation driven Circular pattern of the surface from the top toward hemisphere edge to form rows
6. Add a point on each surface
7. Add sketch on the top plane to calculate angle which will be used to calculate count of the surfaces in the row
8. Equation driven Circular pattern of the surface in the first row
9. Add points on surface centres
10. Add all from the row in a folder and name it Row1
11. Continue the procedure for all rows
Why rows are in folders: there are formulas that calculate row count and suppress extra rows
Making formulas for the points too was too time-consuming so I left this one out. So after changes in the sizes, some points may need to be suppressed and unsuppressed on other changes.
The model is assumed to be the one with maximum points, if more are needed should be added manually.
When placing point is best to use surface and face filter.
Here is my result to make the hemisphere with only SolidWorks, no API.
I'm strongly convinced that the approach we mentioned before by using a combination of hexagons and pentagons is the most ideal equidistant solution.
Source: wikipedia
So I went for it by modeling the above in SolidWorks to study it more in detail.
The goal is to make an assembly and use the coincident mates between the hexagon and pentagon parts.
When I want to update the whole sphere, I just have to make changes to the 2 parts. It will also help with putting points on the complete sphere, with less manual work.
I started by using the following 3 parts mated to each other (the basis is the pentagon).
Then I built further on by adding more polygons to reach the other pole
It's just a mather of using circular pattern to get the complete phere.
Now we want to divide the pentagons into triangles.
I open the resp. part files and add sketches and split lines to become the following:
I save them both in different configurations resp. 2 and 4 (which represent the nummer of divisions on the initial side line)
By using this in the root assembly, I can make 2 configuration with name 2 and 4 also. And it's easy to switch between them.
There was a lot of work using the different sketches and splitline because we could get errors mentioning points shared by multiple enitities when we wanted to do it all at once.
The advantage is that we have it all multiplied all over the sphere.
We could make other configurations with 3, 5, 6 … divisions, but this is manually not attractive to me. ;-)
Considerations I learned is that there are strict ratio's between the choosen radius (1000 mm in my case) of the sphere and the length of the polygon sides : 2,4780186. So If you know one, you can get the other easily using an equation. But that makes it is impossible to set a certain diameter and choose your own side length using this approach, but it is the best equidistant solution possible between 3 points.
The angles between 2 hexagons is always 138,19°
The angles between a hexagon and a pentagon is always 142,62°
Because SolidWorks has no radial projection I know of, we are forced to make workarounds with either sketch constructions or surface cutting. If any one knows better ways to divide the hexagons and pentagons on a sphere surface without using the above mentioned approaches, I'm all ears…
I abandoned this approach as being not simple enough.
Feel free to use the model if you want to try things out or study this "soccer ball".
I'm sure it will be much simpler to use the API…
See zip file in the following comment.
Not even a week into this challenge and we are already receiving solutions based on different methods! Keep them coming!
Also, do not hesitate to add your comments to each solutions. What can be improved?
Here is my first take at using the API for this:
I found an interesting website with several programming languages used to generate vertices for the soccer ball.
So I don't have to make it myself…
After some implementing and testing in SolidWorks: here are the results
image1: 1 recursion = soccer ball
I have added lines manually to show the pentagons. Remark that the side lengths of the polygons are not the same.
image2 : Another one with a flower in it. :-)
image3 : 5 recursions
number of positions : 10242
---Elapsed time: 0hour 1min 54sec 806msec---
image 4 : 6 recursions
number of positions : 40962
Elapsed time: 0hour 6min 48sec 668msec---
Distance between point is about 20 mm for a radius of 1000 m.
I think it is not practical to go even deeper…
By only doing a hemisphere we can make that about 3min and a half.
I will make something user friendly with this so everyone can play with it. This is fun! Stay tuned...
Eddy
I made the tool an addin with XCAD from Xarial (Thank you @AT !)
This will make it easier for everyone that wants to test it.
For installation instructions have a look at :
https://xcad.xarial.com/extensions/deployment/
Basically you use a command prompt/powershell and copy the following command to add it to the registry. (make sure Solidworks is closed)
> %windir%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "Full Path To Add-in dll"
Once installed you will see it in the Addin manager of SolidWorks:
Image1
And a TAB is created in the command manager with the name EQUIDIST:
Image2
When you activate that TAB you will see 2 buttons
Image3
The first button will open a Property Manager Page:
Image4
You can change the radius and the recursion level.
When you click OK a 3D Sketch with the requested points will be made.
Example showing points with radius 1 m, 5 m and 10 m
Image5
I added the part file the image was made from as an attachment too.
The other button reveals the tools that where used ;-)
It is very easy to draw fi. the normals from those points by just adding some code.
I tested using a fixed constraint for all the points, but that uses a lot of resources.
If you want it, you can do it manually, because the points can be dragged otherwise.
Have fun playing with it and let me know what you think of it.
Eddy
PS: if anyone wants to look into the code I will put it on github later on.
link to github code:
https://github.com/EddyAlleman/SWPUC32---Equidistant-Points-on-a-Hemisphere
Here is a video of my solution using xGenerative Design from the 3DEXPERIENCE role 3D Pattern Shape Creator. Let me know if you have any questions. Here is a link to download the 3DXML if you have access to this role, you can play around with the file. https://eu1-scpres.3dexperience.3ds.com?token=3ae34efefd2c4e25371d229f0408274527f877d9002067dcd59dac4bfb33abbf
This time, our challenge is sponsored by our friends over at Blue Byte Systems, Inc. Blue Byte Systems, a leader in SOLIDWORKS and PDM API customization is offering the top three solutions the following prizes:
- 1 https://3dconnexion.com/us/product/cadmouse-compact/
- 2 Amazon gift card for US$50 or equivalent
- 3 Amazon gift card for US$25 or equivalent
Background:
Blue Byte Systems is a team of API experts. We have over 15 years of combined SOLIDWORKS, PDM Professional implementation and customization experience. For a free 20 mins for consultation, please go to https://calendly.com/bluebyte
Visit us at bluebyte.biz and cadoverflow.com
Sweet prizes! Thank you, Blue Byte Systems!
I updated the description of the challenge to include these awards.
Thank you very much to all who participated in the SWPUC32.
Also let's thank our generous sponsor @AJ and his company Blue Byte Systems for offering material prizes to our winners. Since we have winners in multiple categories, Amen will make his own decisions for distributing the awards.
While we received only 3 submissions, it was very interesting to see that each of them used a different software as the environment:
@DP used SOLIDWORKS Core Functionality
@EA used SOLIDWORKS API
@AB used xGenerative Design on the 3DEXPERIENCE Platform.
All contestants provided detailed descriptions of what they did (Andrew even recorded a video). For me, it is fascinating to see how creative the SOLIDWORKS Power User are!
It is time to announce the Awards for SWPUC32:
Best solution using SOLIDWORKS (no macros) : Danute Petrova-Nikolova
Best solution using SOLIDWORKS (with macros): Eddy Alleman
Best solution using 3DEXPERIENCE Apps (no SOLIDWORKS): Andrew Barnes
The Most Original Solution: Eddy Aleman
People's Choice Solution (the solution that gets most "likes"): Eddy Alleman and Andrew Barnes
Note: I counted unique likes per user on their posts where solutions were presented.
Congratulations to our winners and many thanks to all who participated in the SWPUC brainstorming.
is there a link to the solutions?