how to draw a pair of glasses

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!
Post Reply
User avatar
jpg87
Posts: 808
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

how to draw a pair of glasses

Post by jpg87 »

Hello,
I challenged myself to draw this pair of glasses proposed in the French forum (Postby kryscosne » Thu Jan 26, 2017 3:22 pm) :
lunettes.jpg
lunettes.jpg (26.01 KiB) Viewed 3547 times
I followed the advice of NormandC to obtain profile corresponding to the curvature and curve of the glass (steps 1 and 2) :
lunettes_etapes01-04.jpg
lunettes_etapes01-04.jpg (61.82 KiB) Viewed 3547 times
I then drew an outline for the section of the frame. Until then, everything seems correct (steps 3 and 4).
I tried several options for scanning (contour closed or not, different types of calculation, ...), then from an open outline which seemed to me the best solution, I created a slot a bit more wide to clean the ends of the shape (step 5).
lunettes_etapes05-08.jpg
lunettes_etapes05-08.jpg (68.16 KiB) Viewed 3547 times
I then created the two tabs for the glass pinch screw (steps 6 and 7).
Then when I wanted to create the side branch support of the mount, that's what I get (step 8).
I tried to make different body parts, but impossible to merge them!

PS: Can not attach file: more than 30 MB !!!!

My configuration :
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10885 (Git)
Build type: Release
Branch: master
Hash: ad112ca8ab7fa0b9524dfa682f6b82048345c0ef
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
My website : http://help-freecad-jpg87.fr updated 2023/11/06
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: how to draw a pair of glasses

Post by chrisb »

Can you share it on a publicly available fileshare service like dropbox?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: how to draw a pair of glasses

Post by NormandC »

Hello,
jpg87 wrote:I challenged myself to draw this pair of glasses proposed in the French forum (Postby kryscosne » Thu Jan 26, 2017 3:22 pm) :
Forum link: https://forum.freecadweb.org/viewtopic.php?f=12&t=20243
jpg87 wrote:I followed the advice of NormandC to obtain profile corresponding to the curvature and curve of the glass (steps 1 and 2) :
Unfortunately, this method of creating a sweep path from a Part Section of two surfaces creates a B-spline curve with an excessive number of knots. Therefore it takes a lot of time to generate this sweep. I once read a post by DeepSOIC that this was fixed in OCC 7+, but I've tested in latest master with OCC 7.1.0 and it still takes a long time to generate the sweep (4 minutes now and still counting).
User avatar
Chris_G
Veteran
Posts: 2572
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: how to draw a pair of glasses

Post by Chris_G »

Hi,
Unfortunately, this method of creating a sweep path from a Part Section of two surfaces creates a B-spline curve with an excessive number of knots.
I made 2 tools that would help in that kind of situations in my Workbench : CurvesWb (it is also available in the addon manager) :
CurvesWB.jpeg
CurvesWB.jpeg (16.33 KiB) Viewed 3489 times
- discretize edge : exposes the full python "discretize" function as a parametric object
- approximate points : exposes the full "approximate" function as a parametric object
I don't encourage anybody to use my workbench (full of buggy, half-finished tools) but these 2 tools are, I think, pretty stable and could help in that kind of situation.
User avatar
jpg87
Posts: 808
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: how to draw a pair of glasses

Post by jpg87 »

Hi,
Thank you for your answers.
Here is a link where you can retrieve my file if you want :
https://www.dropbox.com/s/22rtecm60sk3h ... FCStd?dl=0

Attention: It has not been purified; It contains various sketches and worktops that may no longer be used after my many tests and trials.

I will test the tools of Chris_G and above all try to better understand the mathematical properties of the B-spline curves.
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
Chris_G
Veteran
Posts: 2572
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: how to draw a pair of glasses

Post by Chris_G »

Hi,
The section curve (from "contour" and "galbe") is not very good : degree 1 and 6935 control points !
I don't know if this is the origin of your problems later in your modeling process, but this is not a very good sweep path anyway.
DeepSOIC's Section macro should create a better result.
I've not been able to run the macro (no result ... I don't know why).
You'll be able to get a far better curve with the 2 tools of my workbench I talked above.
Below is a curve I got that way : degree 5, 51 control points and C2 continuity.
Chris
better-section.fcstd
(9.8 KiB) Downloaded 44 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: how to draw a pair of glasses

Post by microelly2 »

There is a low complex example of a glass
http://freecadbuch.de/doku.php?id=blog: ... gen_teil_2
I will have a look atyour data to see how to create the surface templates from that.
User avatar
jpg87
Posts: 808
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: how to draw a pair of glasses

Post by jpg87 »

Hello,
Sorry for this delay in my response, I ran out of time.
Thanks to Chris_G :
I did not succeed in using the curve you sent me, so I rebuilt everything with simpler b-splines, and I managed to get what I was hoping for. I also took advantage of it to work in more appropriate plans :
lunettes_nouvel_essai_jpg87.jpg
lunettes_nouvel_essai_jpg87.jpg (31.61 KiB) Viewed 3279 times
https://www.dropbox.com/s/or1yd7vfq7bk2 ... fcstd?dl=0

Thanks also to microelly2 :
I consulted the link and I am impressed by the examples I found there.
For the moment I'm fighting with the German> French translators.

Regards,
jpg87
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: how to draw a pair of glasses

Post by microelly2 »

jpg87 wrote: For the moment I'm fighting with the German> French translators.
Let me know which page(s) you read, then I can translate it to English.
User avatar
jpg87
Posts: 808
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: how to draw a pair of glasses

Post by jpg87 »

Hello,
I try to translate in French some articles of the forum that interest me by writing Libre Office documents to consult them again if I need later, and if the result seems correct, to share them on the French forum .

I have some difficulties to translate the few sentences that are not in English on the page
http://freecadbuch.de/doku.php?id=Animation%20Wokbench
Moreover, a few words would be useful to me concerning the use of the tools "Abroller", "Connector", …

I have not yet had time to consult the page
http://freecadbuch.de/doku.php?id=animation:videos
on which I will probably find answers.
I have not yet sufficiently integrated the FreeCad state of mind, but I treat myself !

Thanks again.
jpg87
My website : http://help-freecad-jpg87.fr updated 2023/11/06
Post Reply