Search found 44 matches

by mangtronix
Wed Nov 01, 2017 4:51 pm
Forum: Python scripting and macros
Topic: Save image for printing
Replies: 45
Views: 13310

Re: Save image for printing

Not that I'm aware of but anyone can feel free to add it, or if someone points me in the right direction I could do it.
by mangtronix
Wed Dec 07, 2016 3:07 pm
Forum: Python scripting and macros
Topic: Save image for printing
Replies: 45
Views: 13310

Re: Save image for printing

If you're on OSX (and possibly Linux) printing the image is a simple as this:

Code: Select all

def printFile(filePath):
    from subprocess import call
    call(["lp",filePath])
by mangtronix
Tue Nov 29, 2016 4:00 pm
Forum: Python scripting and macros
Topic: Multi-processor geometry computation
Replies: 2
Views: 1151

Re: Multi-processor geometry computation

Huh not a bad idea! I could just load my model into each instance and only "render" a subset of my connectors in each instance. I'll try that and see how much speedup I get. It'd be nice to have something more automated / general purpose. How about having multiple instances of FreeCAD runn...
by mangtronix
Tue Nov 29, 2016 3:30 pm
Forum: Python scripting and macros
Topic: Multi-processor geometry computation
Replies: 2
Views: 1151

Multi-processor geometry computation

Hi all, I'm working on a project where I use code to create a large number of small connectors for 3D printing. It takes about 30 seconds to compute the geometry for each connector (in a FeaturePython part). I want to split up the geometry processing to multiple processor cores. Any recommendations ...
by mangtronix
Mon Nov 07, 2016 2:13 pm
Forum: Python scripting and macros
Topic: Save image for printing
Replies: 45
Views: 13310

Re: Save image for printing

Yeah, the chair looks great! I updated the macro to fix the filename encoding bug, thanks!
by mangtronix
Fri Nov 04, 2016 6:59 pm
Forum: Python scripting and macros
Topic: Save image for printing
Replies: 45
Views: 13310

Re: Save image for printing

I updated the macro to request an image with a white background. On my Mac I still get a transparent png, so if that doesn't work you can change the file name in the macro to .bmp to get a white background (but much larger file). Interesting about the Cyrillic, I can think how to fix it, or you coul...
by mangtronix
Fri Nov 04, 2016 4:43 pm
Forum: Python scripting and macros
Topic: Save image for printing
Replies: 45
Views: 13310

Save image for printing

Here's a little macro I made to save an image of the current view suitable for printing. You get a 300dpi PNG in landscape format in your project directory. Any comments appreciated. import os def exportViewToPNG(): '''Exports the current view to a PNG suitable for printing on A4 or Letter. The file...
by mangtronix
Thu Apr 07, 2016 2:34 pm
Forum: Open discussion
Topic: (SOLVED) Scrolling Combo View->Model to currently selected object?
Replies: 7
Views: 2114

Re: (SOLVED) Scrolling Combo View->Model to currently selected object?

Thanks for the tips. I updated my instructions.
by mangtronix
Wed Apr 06, 2016 12:22 pm
Forum: Announcements & Features
Topic: FreeCAD-VR: Oculus Rift
Replies: 37
Views: 40703

Re: FreeCAD-VR: Oculus Rift

Do you think it's possible to use this code for side-by-side stereo, like on a 3D projector? I wonder if it's as simple as turning off the distortion? I have a projector that does side-by-side stereo and it would be great to see my models in 3D on the big screen :)
by mangtronix
Tue Apr 05, 2016 11:33 am
Forum: Open discussion
Topic: (SOLVED) Scrolling Combo View->Model to currently selected object?
Replies: 7
Views: 2114

(SOLVED) Re: Scrolling Combo View->Model to currently selected object?

Ok, here's what I did. Macro->Macros->Create Macro code: Gui.SendMsgToActiveView("ViewSelection") Gui.runCommand("Std_TreeSelection") Save as "zoom_selection.FCMacro" UPDATE: The macro has to be part of the current toolbar or the Global toolbar (and then restart) for th...