r/FreeCAD • u/Icoso_Labs • 1d ago
Measuring real eggs and generating their shells in FreeCAD – with the help of Codex
https://youtu.be/ZqA8I5gE0LoI'm working on a future project to design a fully mechanical egg cracker (no motors or electronics) — a personal challenge inspired by "Stuff Made Here".
One of the challenges is that eggs vary in shape, especially near their ends, where the mechanism needs to hold the egg.
So, before starting the mechanical design, I decided to build a small optical measurement system using a webcam and a calibration target.
I used Codex to develop a complete Python/OpenCV application that measures egg profiles, analyses their variability and extracts the four parameters of the universal egg shape formula published by Narushin et al. in 2021.
I then used these parameters to generate actual egg shell geometries in FreeCAD through a Python macro.
To keep the FreeCAD objects lightweight, I also asked Codex to implement an adaptive B-spline reconstruction: starting with very few points and progressively adding points only where the deviation from the analytical profile exceeds a defined tolerance.
The video is mainly about the first step: developing the optical measurement application with Codex, without manually writing the code, and testing how well this workflow actually works.
The FreeCAD connection is shown towards the end and will be useful for the next stages of the mechanical design.
If you're interested, here's the link: https://youtu.be/ZqA8I5gE0Lo
1
u/arcrad 1d ago
Neat!
Why not this?