Search found 1479 matches

by Chris_G
Sat Oct 31, 2020 9:46 pm
Forum: Python scripting and macros
Topic: Mimic FPS info on FullScreen
Replies: 4
Views: 129

Re: Mimic FPS info on FullScreen

Here is a possible solution, using SuperImposition of coin3d : from pivy import coin textSep = coin.SoSeparator() cam = coin.SoOrthographicCamera() cam.aspectRatio = 1 cam.viewportMapping = coin.SoCamera.LEAVE_ALONE trans = coin.SoTranslation() trans.translation = (-0.98, 0.90, 0) myFont = coin.SoFo...
by Chris_G
Sat Oct 31, 2020 10:57 am
Forum: Python scripting and macros
Topic: Can macro read or write variables into Python Console
Replies: 11
Views: 328

Re: Can macro read or write variables into Python Console

Here is a (ugly) workaround to use in the macro :

Code: Select all

print (python_console_var)
string = "python_console_var = 'b_value'"
exec(string)  # in macro environment
FreeCADGui.doCommand(string)  # in python console environment
print (python_console_var)
by Chris_G
Wed Oct 28, 2020 5:19 pm
Forum: Python scripting and macros
Topic: Scripting Project Information
Replies: 2
Views: 133

Re: Scripting Project Information

You can get most of this info in the App.ActiveDocument object :

Code: Select all

App.ActiveDocument.License
App.ActiveDocument.LicenseURL
App.ActiveDocument.Uid
App.ActiveDocument.CreatedBy
App.Version()
...
by Chris_G
Sat Oct 24, 2020 5:20 pm
Forum: Python scripting and macros
Topic: Can macro read or write variables into Python Console
Replies: 11
Views: 328

Re: Can macro read or write variables into Python Console

OK, Thanks.
I didn't remember this setting.
by Chris_G
Sat Oct 24, 2020 4:35 pm
Forum: Python scripting and macros
Topic: Can macro read or write variables into Python Console
Replies: 11
Views: 328

Re: Can macro read or write variables into Python Console

In the other way, you can do this in your macro :

Code: Select all

FreeCADGui.doCommand("my_var = 123456")
And you'll see that the string is executed in python console
by Chris_G
Sat Oct 24, 2020 4:32 pm
Forum: Python scripting and macros
Topic: Can macro read or write variables into Python Console
Replies: 11
Views: 328

Re: Can macro read or write variables into Python Console

Just tested.
I can create a variable in python console :

Code: Select all

python_console_var = "a value"
And I can access it in a macro :

Code: Select all

# Macro code
print(python_console_var)
by Chris_G
Sat Oct 24, 2020 1:13 pm
Forum: Path/CAM
Topic: 3D surfacing algorithm
Replies: 1
Views: 269

3D surfacing algorithm

Hello CAM enthusiasts, Remembering an old topic , I imagined a possible way to generate a 3D surfacing toolpath for ball-end tools. The workflow is : - generate a 3d offset (value = tool radius) of the input shape - translate down the offset of the same amount (tool radius) - vertically project a fl...
by Chris_G
Fri Oct 23, 2020 2:21 pm
Forum: Help on using FreeCAD
Topic: [Bug] Zooming with scroll wheel doesn't work
Replies: 42
Views: 1686

Re: [Bug] Zooming with scroll wheel doesn't work

I confirm that this fixes the mouse wheel bug. Thanks. However that breaks keyboard event callbacks. This simple example prints the pressed keys in report view. from pivy import coin def cb(*args): print(chr(args[1].getEvent().getKey())) eventcb = coin.SoEventCallback() kb_cb = eventcb.addEventCallb...
by Chris_G
Fri Oct 23, 2020 5:15 am
Forum: Open discussion
Topic: [Bug 4311] Crash on a loft command with incorrect input.
Replies: 9
Views: 489

Re: [Bug 4311] Crash on a loft command with incorrect input.

Crash confirmed on latest master build. OS: Manjaro Linux (KDE//usr/share/xsessions/plasma) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.22831 (Git) Build type: Release Branch: master Hash: fc89f4eb0c2c6295a1bc02a5cd3db0a22547fc22 Python version: 3.8.5 Qt version: 5.15.1 Coin v...
by Chris_G
Wed Oct 21, 2020 4:11 pm
Forum: Open discussion
Topic: BUG : SurfaceWB - Incorrect surface dimensions
Replies: 16
Views: 360

Re: BUG : SurfaceWB - Incorrect surface dimensions

I have observed than Part - Split Apart always increases tolerance. Looks like many problems with surfaces / edges is because tolerance get bigger after each operation. I'll try to check / set tolerance to small value before operations and see how it will affect. In Curves WB, I have added the Max ...