[Challenge] How to model an oloid?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Challenge] How to model an oloid?

Post by NormandC »

ulrich1a wrote: Congratulations!
Hey, I just reused your work. :D
ulrich1a wrote:We have to learn now version 0.17. The Part-Design Next has an Icon, that looks like the loft symbol. So combining both approaches in Part-Design Next, it could be parametric!
I've been testing PartDesignNext for some time. It's awesome. :) (and also quite buggy :D )

There's an additive loft as well as a subtractive loft. But the PDNext tools can only produce solids, so it cannot be used here to create the face.

Another problem is that the loft requires the series of equal-length edges going from one sketch vertices to the other sketch. After having posted, I realized that instead of breaking down the ruled surfaces to get the edges, I could have more simply drawn Draft Lines snapped on the sketches vertices. But if you were to change the radius in the spreadsheet, the Draft Lines would not update.

In 0.17's PartDesignNext, the "edge linked to external geometry" tool can now use external sketches. I guess we could create separate sketches for each straight edge. It would be a headache to create the proper datum planes though. :?
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Challenge] How to model an oloid?

Post by NormandC »

Plue wrote:The following code, which can be entered directly into FreeCAD, works:
Hello Plue,

I noticed it's your first post on the forum even though you registered a few days ago, so welcome to the forum. :)

This OpenSCAD generated shape might be sufficient if the oloid is to be 3D printed. It is a lot less work than what we've been doing! :D

I wonder, how to increase the precision/smoothness of the oloid? I mean adding more edges. I believe you would define the number of sides for the cylinders?
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Challenge] How to model an oloid?

Post by NormandC »

NormandC wrote:In 0.17's PartDesignNext, the "edge linked to external geometry" tool can now use external sketches. I guess we could create separate sketches for each straight edge. It would be a headache to create the proper datum planes though. :?
I started creating a new model using this method.

Creating the proper datum planes is tedious (because there are many), but easy. I just used the "Plane by 3 points" option, selecting one vertice on Sketch then the corresponding vertice on Sketch001. The third point selection can be any other point on either sketch.

Next, create a new sketch on the datum plane, use the external geometry tool to link the two vertices, and constrain a line to them. Repeat. All the lines are parametrically linked.

This version is based on Ulrich's original file with which only 7 lines can be created, making 1/8 of the oloid.

This model has a volume of

Code: Select all

>>> App.ActiveDocument.Shell_solid.Shape.Volume
659327.6309025304
This exceeds the theoretical value from the Wikipedia page. :( I think the loft needs to cover 1/4 of the shape like in my previous file. So we need to add more arcs to Sketch and Sketch001 to create 6 more lines for a total of 13.

Controlling it with a spreadsheet is awesome, Ulrich. :) Of course the Shell and Shell (Solid) don't update, but the Compound and Clone of Compound do. :geek:

I'll play with it some more tomorrow. Now I need to grab some sleep! :)

Thanks to everyone who posted here! This has been fun.

File created in:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6703 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 2ce5c8d2e3020d05005ed71f710e09e9aa561f40
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
Oloid3_FC017_normandc1.fcstd
Warning: this file has been created in the 0.17 development release.
(41.89 KiB) Downloaded 67 times
Plue
Posts: 4
Joined: Mon Sep 26, 2016 1:46 pm

Re: [Challenge] How to model an oloid?

Post by Plue »

NormandC wrote:
Plue wrote:The following code, which can be entered directly into FreeCAD, works:
Hello Plue,

I noticed it's your first post on the forum even though you registered a few days ago, so welcome to the forum. :)

This OpenSCAD generated shape might be sufficient if the oloid is to be 3D printed. It is a lot less work than what we've been doing! :D

I wonder, how to increase the precision/smoothness of the oloid? I mean adding more edges. I believe you would define the number of sides for the cylinders?
Thanks for the welcome. To increase the number of sides, change the $fn variable. It defines the number of sides directly. :)
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Challenge] How to model an oloid?

Post by NormandC »

Okay, I made a new oloid based on what I previously wrote: making a loft with 13 lines spanning a quarter of the total shape.

I was too lazy to edit Ulrich's sketches :oops: so I simply copied them, and rotated them so they aligned with the original sketches.

Next I continued my previous work of
  1. Create a datum plane from three points
  2. Map a sketch on the datum plane
  3. In the sketch, copy the external points touching the datum plane
  4. Constrain a Sketcher Line between the two points
  5. Exit, hide the datum plane
  6. Relabel the Sketch with a sequential number (LoftProfile001, 002, 003...)
  7. Repeat!
Here's what it looked like at this point.
FC_Oloid3_FC017_01.png
FC_Oloid3_FC017_01.png (8.87 KiB) Viewed 1625 times
Then I switched to the Part workbench and launched the Image Part Loft tool, and selected all the 13 sketches. Here's where renaming them came handy to avoid sorting them in the wrong order.

The loft produced this nice smooth surface:
FC_Oloid3_FC017_02.png
FC_Oloid3_FC017_02.png (14.32 KiB) Viewed 1625 times
Which I then only needed to mirror on the XY and XZ planes to get the full oloid.
FC_Oloid3_FC017_03.png
FC_Oloid3_FC017_03.png (28.29 KiB) Viewed 1625 times
With a circle radius of 60 mm, the volume of the oloid according to Wikipedia should be

Code: Select all

V = 3.0524184684r³ = 659322.3891744
To get the volume I made a shell then converted it to solid.

Code: Select all

>>> App.ActiveDocument.Shell_solid.Shape.Volume
659321.6576129806
This value is off by 0.0001%. Can we assume it's close enough? :P
Attachments
Oloid3_FC017_normandc2.fcstd
(52.35 KiB) Downloaded 101 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [Challenge] How to model an oloid?

Post by uwestoehr »

In case someone needs this, here is a fixed version (FC could not recompute some sketches) created using FreeCAD 0.19.1:
Attachments
Oloid3_FC019_normandc2.fcstd
(56.67 KiB) Downloaded 66 times
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: [Challenge] How to model an oloid?

Post by edwilliams16 »

I thought I might 3D print one of these, and I discovered this thread after I started modeling. I used a Lattice2 paraseries to create the straight line sections to loft through. A linear series in angle is poorly resolved near the 120 degree endpoint, so I switched the paraseries Values Source to Values Property and added some extra angles in that property by hand.
Volume accuracy is to within 1 part per million.
Screenshot 2023-02-08 at 6.26.00 PM.png
Screenshot 2023-02-08 at 6.26.00 PM.png (45.38 KiB) Viewed 522 times
Attachments
oloid_EW.FCStd
(95.97 KiB) Downloaded 29 times
Post Reply