Search found 312 matches

Go to advanced search

by galou_breizh
Fri Mar 20, 2020 3:22 pm
Forum: Open discussion
Topic: NASA RASSOR Challenge
Replies: 2
Views: 239

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: 2
Views: 239

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: 30
Views: 858

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: 30
Views: 858

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: 30
Views: 858

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: 475

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: 30
Views: 858

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 8 times
by galou_breizh
Mon Mar 16, 2020 5:02 pm
Forum: Python scripting and macros
Topic: [Macro] Get an ASCII representation of the model tree
Replies: 30
Views: 858

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

Nice macro. Works perfectly. I'd have a stylistic suggestion retn = retn + baseline + " ├ " + obj.Label + " {"+ "".join(filter(str.isalpha, obj.Name)) + "}\n" if cnt == len(objs): baselinechi = baseline + " " else: baselinechi = baseline + " │ " Or at least, please add variables for the box drawing ...
by galou_breizh
Mon Mar 16, 2020 4:35 pm
Forum: Python scripting and macros
Topic: curved slot macro, fully constrained & parametric
Replies: 14
Views: 475

Re: curved slot macro, fully constrained & parametric

I also have a remark. Can you explain the 'Q,R,S' in the definition of cols?

Do you also know that you could use string.ascii_uppercase to define cols and that you can iterate over a string?

Go to advanced search