Search found 354 matches

Go to advanced search

by galou_breizh
Sat May 02, 2020 9:10 am
Forum: Python scripting and macros
Topic: Scanning OutList of App::Part.
Replies: 5
Views: 379

Re: Scanning OutList of App::Part.

Maybe this: def get_all_subobjects(o): """Recursively get all subobjects Subobjects of objects having a Shape attribute are not included otherwise each single feature of the object would be copied. The result is that bodies, compounds, and the result of boolean operations will be conv...
by galou_breizh
Sat May 02, 2020 6:09 am
Forum: Open discussion
Topic: Place for parameters for macros
Replies: 1
Views: 197

Place for parameters for macros

Some macros start to use parameters to save some information. My question is where should these parameters be? Candidates for macro 'MyMacro': - 'User parameter:BaseApp/Preferences/Mod/MyMacro' - 'User parameter:BaseApp/Preferences/Mod/Macros/MyMacro' - 'User parameter:BaseApp/Preferences/Macros/MyM...
by galou_breizh
Fri Mar 20, 2020 3:22 pm
Forum: Open discussion
Topic: NASA RASSOR Challenge
Replies: 3
Views: 994

Re: NASA RASSOR Challenge

Maybe someone could pin it here and on the "Open Discussion" forum?
by galou_breizh
Fri Mar 20, 2020 11:58 am
Forum: Open discussion
Topic: NASA RASSOR Challenge
Replies: 3
Views: 994

NASA RASSOR Challenge

I guess that most of you are stuck at home so this may be a good opportunity to earn money or just spend the spare time while staying at home (for those that do not heavily code for FreeCAD). The NASA has just launched a prized CAD-design challenge: NASA Regolith Advanced Surface Systems Operations ...
by galou_breizh
Thu Mar 19, 2020 9:17 pm
Forum: Python scripting and macros
Topic: [Macro] Get an ASCII representation of the model tree
Replies: 34
Views: 1975

Re: [Macro] Get an ASCII representation of the model tree

I was just thinking about the macro name. What about "TreeToText" rather than "Tree2Ascii". I find "To" nicer than "2" within text and "Text" because this can be Unicode-Art rather than Ascii-Art.

Gaël
by galou_breizh
Wed Mar 18, 2020 12:33 pm
Forum: Python scripting and macros
Topic: [Macro] Get an ASCII representation of the model tree
Replies: 34
Views: 1975

Re: [Macro] Get an ASCII representation of the model tree

I prefer the classical PEP-8 style. The most important in my opinion are good variable names, i.e. style corresponding to the function (class, function, variable, global vs. local, hidden, ...) and an expressive name. I'll have a look when I find the time.
by galou_breizh
Tue Mar 17, 2020 1:24 pm
Forum: Python scripting and macros
Topic: [Macro] Get an ASCII representation of the model tree
Replies: 34
Views: 1975

Re: [Macro] Get an ASCII representation of the model tree

I'm not sure whether macros should authorized themselves to store parameters... But I can trust you on this point ;) Why not? This is for user-friendliness. Parameter will be saved each time the genLine is modified, that's probably stressing the filesystem. I don't think so. The filesystem is able ...
by galou_breizh
Tue Mar 17, 2020 10:50 am
Forum: Python scripting and macros
Topic: curved slot macro, fully constrained & parametric
Replies: 14
Views: 971

Re: curved slot macro, fully constrained & parametric

You could put one macro in the ParametricObjectCreation folder and the other one in ObjectCreation.
by galou_breizh
Tue Mar 17, 2020 10:41 am
Forum: Python scripting and macros
Topic: [Macro] Get an ASCII representation of the model tree
Replies: 34
Views: 1975

Re: [Macro] Get an ASCII representation of the model tree

I implemented saving the pattern and the style. There is no need to click on 'Generate' anymore. Please double-check.
FCTree2AsciiUI.FCMacro
(5.05 KiB) Downloaded 38 times

Go to advanced search