Geodesic Dome with Struts

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Geodesic Dome with Struts

Post by ulrich1a »

I made an update to the Geodesic Dome macro. (See here for the old macro: viewtopic.php?f=3&t=9174&p=75439&hilit=geodesic#p75405) It makes now not only a full globe but also a half-sphere. It allows to generate a frame of struts for the dome. The dimensions are available in a bill of materials together with a strut drawing and a drawing of a flattened dome-segment.
The identical struts are collected in groups, so it is easily possible to put a color to all struts of the same type.

Ulrich
Attachments
Flattened_Frame_segment.png
Flattened_Frame_segment.png (115.82 KiB) Viewed 3968 times
Strut_drawing.png
Strut_drawing.png (58.55 KiB) Viewed 3968 times
Bill_of_Material.png
Bill_of_Material.png (70.54 KiB) Viewed 3968 times
Geodesic_Dome.png
Geodesic_Dome.png (66.6 KiB) Viewed 3968 times
geodesic_dome8.zip
zipped macro
(13.72 KiB) Downloaded 334 times
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Geodesic Dome with Struts

Post by cox »

Looking at this makes me want to cut lots of struts in accurate angles, and never stop :D
Need help? Feel free to ask, but please read the guidelines first
Shadowed
Posts: 4
Joined: Mon Oct 03, 2016 6:01 pm

Re: Geodesic Dome with Struts

Post by Shadowed »

Amazing, the result is simply amazing. 1500 code lines. You're great!
react
Posts: 12
Joined: Mon Aug 10, 2020 7:42 am

Re: Geodesic Dome with Struts

Post by react »

Does the macro work for anybody with 0.19? Doesnt work...what a pity!

OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: bf1e8e48389f5e9e25bd77b67fe98da4213e797c
Python version: 3.8.2
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: German/Germany (de_DE)
react
Posts: 12
Joined: Mon Aug 10, 2020 7:42 am

Re: Geodesic Dome with Struts

Post by react »

ok figured out to install the geodesic_dome8 from above...:-)
but then
this error message appears
00:03:58 <class 'SyntaxError'>: ('invalid syntax', ('/home/X/.FreeCAD/Macro/geodesic dome8.FCMacro', 168, 11, ' print "accepted! Dome radius: ", self.domeRadLE.property("text"), \\\n'))

any hints welcome, really would like to figure out this
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Geodesic Dome with Struts

Post by DeepSOIC »

react wrote: Sat Sep 05, 2020 10:01 pm this error message appears
00:03:58 <class 'SyntaxError'>: ('invalid syntax', ('/home/X/.FreeCAD/Macro/geodesic dome8.FCMacro', 168, 11, ' print "accepted! Dome radius: ", self.domeRadLE.property("text"), \\\n'))
Just comment out the print statements (put a # at the beginning of these lines).

This is the python-2 style of print statements. In python 3, print is a function, so the content to be printed should be surrounded by parentheses. You can fix it if you want. But print calls are just debug output usually, so commenting them out is a good idea too.
adfl
Posts: 1
Joined: Mon Dec 28, 2020 3:54 pm

Re: Geodesic Dome with Struts

Post by adfl »

Hello,
on my FreeCAD (test with 0.18 and 0.19, python2.7 and python3), it stop at line 1053 "if self.ny <> 3:" and says "invalid syntax".
Maybe "<>" ? I don't understand this operator :-(

Thanks for all!
User avatar
Chris_G
Veteran
Posts: 2601
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Geodesic Dome with Struts

Post by Chris_G »

Not sure, but it may mean "different" like :

Code: Select all

if not self.ny == 3:
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Geodesic Dome with Struts

Post by kisolre »

From here stackoverflow
The python documentation says that they are equivalent.

The comparison operators <> and != are alternate spellings of the same operator. != is the preferred spelling; <> is obsolescent.

The <> operator has been removed from Python 3.
BG3KG
Posts: 1
Joined: Tue Apr 13, 2021 2:28 am

Re: Geodesic Dome with Struts

Post by BG3KG »

137 self.retranslateUi(Dialog)


1572 d.ui.setupUi(d)


这两行有问题, 如果注释掉第137行,宏可以运行。但存在标签无法显示的情况。
Post Reply