Search found 782 matches

Go to advanced search

by uwestoehr
Mon Dec 09, 2019 1:30 am
Forum: Python scripting and macros
Topic: [solved] how to obtain the global decimals for a script
Replies: 11
Views: 169

Re: how to obtain the global decimals for a script

we essentially follow PEP8. I read there: https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces Nevertheless I changed my scripts now. However, my point is my lazyness because what annoys me is that the editor in FC does not add spaces automatically. Take e.g. this code: while angle < 360: # if ...
by uwestoehr
Mon Dec 09, 2019 12:18 am
Forum: Python scripting and macros
Topic: [solved] how to obtain the global decimals for a script
Replies: 11
Views: 169

Re: how to obtain the global decimals for a script

Don't use tabs to indent. Use 4 spaces. This agrees with Python conventions and the unofficial but de-facto FreeCAD style. I wrote the script within FreeCAD. This editor does not automatically add spaces and after a dozen times with indenting errors I used tabs. I am no Pythionist and therefore don...
by uwestoehr
Sun Dec 08, 2019 10:36 pm
Forum: Assembly
Topic: Another approach to assembly solver (A2plus)
Replies: 1659
Views: 74236

Re: Another approach to assembly solver (A2plus)

uwestoehr wrote:
Tue Dec 03, 2019 11:24 pm
I have now improved the documentation: https://www.freecadweb.org/wiki/A2plus_ ... #Animation
The animation has now a progress bar and a button to stop the animation.
I provided now also an interactive example: https://www.freecadweb.org/wiki/A2plus_ ... ve_Example
by uwestoehr
Sun Dec 08, 2019 10:34 pm
Forum: Assembly
Topic: Assembly Challenge: hypnotic geometric thing
Replies: 12
Views: 1206

Re: Assembly Challenge: hypnotic geometric thing

kbwbe wrote:
Thu Feb 28, 2019 10:38 pm
and now without sketcher but with A2plus...
Here is an interactive solution: https://www.freecadweb.org/wiki/A2plus_ ... ve_Example
by uwestoehr
Sun Dec 08, 2019 10:32 pm
Forum: Python scripting and macros
Topic: [solved] how to obtain the global decimals for a script
Replies: 11
Views: 169

Re: how to obtain the global decimals for a script

Just for reference, when FreeCAD starts it defines a couple of aliases which are accessible from the Python console . I see and changed it now. It did not work for me because I modified a WB script (part of the latest a2plus release). May I ask 2 further things? 1. How to stop a script? In https://...
by uwestoehr
Sun Dec 08, 2019 12:58 am
Forum: Python scripting and macros
Topic: [solved] how to obtain the global decimals for a script
Replies: 11
Views: 169

Re: how to obtain the global decimals for a script

sgrogan wrote:
Sat Dec 07, 2019 5:40 pm

Code: Select all

parms = App.ParamGet("User parameter:BaseApp/Preferences/Units")
parms.GetInt('Decimals')
Many thanks! I only had to replace "App" by "FreeCAD".
To help others, I document this at the Wiki: https://www.freecadweb.org/wiki/Quantity#Precision
by uwestoehr
Sun Dec 08, 2019 12:07 am
Forum: TechDraw
Topic: Creating ProjGroup for an assembly crashes FC
Replies: 11
Views: 223

Re: Creating ProjGroup for an assembly crashes FC

The error is deep within OCC. Even with a soft fail, the output isn't going to be useful. Many thanks for your help. So there is nothing we can do. Meanwhile I succeeded my task using FC 0.18.4. As I wrote with it I get no crash. Therefore I made another test and tried to compile FC 0.18. This fail...
by uwestoehr
Sat Dec 07, 2019 5:24 pm
Forum: Python scripting and macros
Topic: [solved] how to obtain the global decimals for a script
Replies: 11
Views: 169

[solved] how to obtain the global decimals for a script

For a script I want to get the number of decimals the user set in the FC preferences for the units.
I cannot find a method to get this info. Does anybody have a hint for me or is this at the moment not possible?
by uwestoehr
Sat Dec 07, 2019 5:21 pm
Forum: TechDraw
Topic: Creating ProjGroup for an assembly crashes FC
Replies: 11
Views: 223

Re: Creating ProjGroup for an assembly crashes FC

wandererfan wrote:
Sat Dec 07, 2019 3:15 pm
Are you using macros?
No. I just start FC then load the test file. Previously I installed the addon A2plus to FC. Maybe A2plus calls a macro.
by uwestoehr
Sat Dec 07, 2019 2:45 pm
Forum: TechDraw
Topic: Creating ProjGroup for an assembly crashes FC
Replies: 11
Views: 223

Re: Creating ProjGroup for an assembly crashes FC

wandererfan wrote:
Sat Dec 07, 2019 2:43 pm
I can not duplicate crashes with freecad-daily:

I am sure this only happens on Windows.
wandererfan wrote:
Sat Dec 07, 2019 2:43 pm
But there is a problem with Y coordinate of Top/Bottom views for certain values of Scale.
I think because of todays' commit where you deleted the handling of X and Y, see my private message

Go to advanced search