Any way to export cropped image of draft workbench view?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Codeblocks
Posts: 4
Joined: Wed Jan 26, 2022 6:30 pm

Any way to export cropped image of draft workbench view?

Post by Codeblocks »

I was hoping to use the draft workbench in freecad to do floor plans for a game, I want to export a borderless texture to use when mapping for my game, I made a quick example draft and I was wondering if there is any way to make FreeCAD export a 'cropped' view, like maybe if I was able to select 4 points and have it export an image of the area inside the points.

Image of what I get from 'save image' (scaled down so it doesn't take up so much room on the page):
what_i_get.jpg
what_i_get.jpg (25.9 KiB) Viewed 958 times
Image of what I'm hoping to get:
what_i_want.png
what_i_want.png (5.65 KiB) Viewed 958 times
I realize I can just approximate this with the snip tool or similar but if it's possible to have the program export it to the perfect size I would definitely prefer that. Thanks in advance for any information, tips, or advice.
Last edited by Codeblocks on Wed Jan 26, 2022 7:32 pm, edited 2 times in total.
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Any way to export cropped image of draft workbench view?

Post by Shalmeneser »

No image ?
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Any way to export cropped image of draft workbench view?

Post by GeneFC »

Codeblocks wrote: Wed Jan 26, 2022 6:36 pm
Image of what I get from 'save image':
Image

Image of what I'm hoping to get:
Image
You need to "attach" the images. The forum software does not go rambling around the web to find them. If it did, the post would be useless as soon as the images were removed from the origin.

Use the "Attachments" tab below the message edit window.

Gene
Codeblocks
Posts: 4
Joined: Wed Jan 26, 2022 6:30 pm

Re: Any way to export cropped image of draft workbench view?

Post by Codeblocks »

Thanks, first post on the forums... really new to FreeCAD. I posted the images now.

I just had the idea to use it for floor plans for a game I'm working on because I like the drafting in it, I don't even know that what I'm trying to do here is within the scope of FreeCAD but I figured may as well ask. There's other work arounds so it's not critical for me, just wondering if it's possible to export a sort of 'cropped' image.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Any way to export cropped image of draft workbench view?

Post by TheMarkster »

Press Windows key + Shift + S, draw a box around what you want to save. Run Snip macro to take the clipboard contents as a png. You are on windows, right?
Codeblocks
Posts: 4
Joined: Wed Jan 26, 2022 6:30 pm

Re: Any way to export cropped image of draft workbench view?

Post by Codeblocks »

TheMarkster wrote: Wed Jan 26, 2022 8:27 pm Press Windows key + Shift + S, draw a box around what you want to save. Run Snip macro to take the clipboard contents as a png. You are on windows, right?
Yeah, thanks for the reply. That's what I've been doing, it works okay... I've been just snipping and putting it into GIMP then using magic select to crop out the extra padding, works pretty much perfect when I do that. Was just hoping there was a way to precisely do it within FreeCAD (for example maybe by selecting 4 points of a rectangle on the grid), I understand that's not really the job of a CAD program though. The snip way works.

I switched over to the Sketcher work bench, it seems more appropriate for this use-case, the constraints make it really easy to resize rooms in the template.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Any way to export cropped image of draft workbench view?

Post by TheMarkster »

You can set background color from gradient to a single color, like white, then use gimp to convert the white to alpha.
Codeblocks
Posts: 4
Joined: Wed Jan 26, 2022 6:30 pm

Re: Any way to export cropped image of draft workbench view?

Post by Codeblocks »

Appreciate the suggestions from everyone, I just use the Sketcher workspace to do the floor plans so I can use the powerful constraints, then I snip the drawing after exiting the sketch editor. Next I copy that into GIMP, select the walls color with magic selection tool and "Image --> Crop to Selection", the result is a perfectly tight fitting floor plan image.

This has got me really good results (good enough for a game), the scales are nearly perfect when I build out my levels now, and when I decide a room has to be sized differently it's easy to change due to the constraints in Sketcher. Thanks everyone for the help.
Post Reply