SQL Reporting Workbench for FreeCAD

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
chrisb
Posts: 22420
Joined: Tue Mar 17, 2015 9:14 am

Re: SQL Reporting Workbench for FreeCAD

Postby chrisb » Mon Feb 25, 2019 12:12 am

wandererfan wrote:
Fri Feb 22, 2019 9:44 pm
Reports go onto TechDraw pages easily!
Very interesting application.
User avatar
roerich_64
Posts: 913
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: SQL Reporting Workbench for FreeCAD

Postby roerich_64 » Thu Mar 14, 2019 10:24 am

chrisb wrote:
Mon Feb 25, 2019 12:12 am
Very interesting application.
Realy!

I will give the Reporting WB a try at the house_B ;)
Haus_B.jpg
Haus_B.jpg (122.23 KiB) Viewed 1038 times
But it needs a little time to do that ;)

BR
Walter
romabalti1900
Posts: 2
Joined: Fri Jan 05, 2018 6:20 pm

Re: SQL Reporting Workbench for FreeCAD

Postby romabalti1900 » Wed Apr 17, 2019 12:18 pm

VERY COOL Workbench !
HolgerL
Posts: 4
Joined: Thu Nov 28, 2019 3:30 pm

Re: SQL Reporting Workbench for FreeCAD

Postby HolgerL » Thu Dec 05, 2019 2:51 pm

Hi furti,

thank you very much for your great tool!
You solved my problem with gernerating a BOM including size of all components.
Great work!

Holger
User avatar
Kunda1
Posts: 7062
Joined: Thu Jan 05, 2017 9:03 pm

Re: SQL Reporting Workbench for FreeCAD

Postby Kunda1 » Thu Dec 05, 2019 3:14 pm

HolgerL wrote:
Thu Dec 05, 2019 2:51 pm
You solved my problem with gernerating a BOM including size of all components.
Can you post your own success story with this WB in this forum for other to see ?
How did you generate the BOM ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
HolgerL
Posts: 4
Joined: Thu Nov 28, 2019 3:30 pm

Re: SQL Reporting Workbench for FreeCAD

Postby HolgerL » Fri Dec 06, 2019 8:01 am

Hi,

yes sure I can do that. But it is pretty simple and straight forward.

I have build the complete construction of the planning for a camper into freecad. So this is an assemby of "boxes", which are all the plates of the planned furniture. Then I looked for a solution to collect all these pieces with their length, width and heights to calculate the total amount of wood I need and so get the total weight of the interior construction.

So I found this reporting workbench and put the reporting statement:

Code: Select all

SELECT  Label, Length, Width, Height
FROM document
WHERE Length IS NOT NULL
This gives a result table like:

Code: Select all

=Label	Length	Width	Height
Boden	=3600mm	=2040mm	=52mm
Seite links	=3600mm	=40mm	=2192mm
Seite rechts	=3600mm	=40mm	=2192mm
Seite hinten	=40mm	=2040mm	=1960mm
Seite vorne	=40mm	=2040mm	=1500mm
Seite Alkoven Top	=40mm	=2040mm	=670mm
Sitz_Wand001	=16mm	=650mm	=634mm
Sitz_Wand002	=16mm	=650mm	=634mm
Bodenplatte Sitz	=800mm	=660mm	=16mm
Sitz_Wand_L	=800mm	=16mm	=634mm
Sitz_Wand_R	=800mm	=16mm	=634mm
Sitz_Trennwand	=16mm	=1960mm	=634mm
This I then took to Excel and made some calculations.
- removed the mm and make the fields number
- filtered Length,Width,Height for 16mm entries, because these are the furniture plates. (40mm are the sidewalls..) and gave them a 4. filter attribute
- for all these furniture entries I simply calculated the volume and devided by 16 to get the total plate area. done

Sure this could be some more automated, but since this is more a singel event caculation it is ok for me to get the result.
stanicke
Posts: 6
Joined: Sun Dec 01, 2019 8:58 pm

Re: SQL Reporting Workbench for FreeCAD

Postby stanicke » Wed Dec 25, 2019 8:56 pm

Hello, I needed an export to a .xlsx file, so I implemented it, can be useful to somebody :). See https://github.com/furti/FreeCAD-Reporting/pull/26

One idea for improvement: the xlsx file is able to handle units as a cell format, but I am not sure how to get proper units from FreeCad :(
Joyas
Posts: 491
Joined: Sat Jul 12, 2014 8:39 pm

Re: SQL Reporting Workbench for FreeCAD

Postby Joyas » Thu Dec 26, 2019 2:57 am

This workbench is interesting.
What happens if accidentally I write "DELETE FROM document" without specifying anything (WHERE)?
Does it clean the entire FreeCAD document?
:P
I prefer JavaScript, I don't like Python indentation.
chrisb
Posts: 22420
Joined: Tue Mar 17, 2015 9:14 am

Re: SQL Reporting Workbench for FreeCAD

Postby chrisb » Thu Dec 26, 2019 9:02 am

There are several possibilities to find out:
- You can read the documentation and find out that it is not implemented: https://github.com/furti/FreeCAD-Reporting
- You can look at the source code: https://github.com/furti/FreeCAD-Reporting
- You can even try it, of course on a copy if the document is important..
stanicke
Posts: 6
Joined: Sun Dec 01, 2019 8:58 pm

Re: SQL Reporting Workbench for FreeCAD

Postby stanicke » Thu Dec 26, 2019 12:22 pm

Ok, I also added proper cell formatting, so cell values can be now used directly for further computations in Excel (see https://github.com/furti/FreeCAD-Reporting/pull/26)