Woodworking - getDimensions

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
dprojects
Posts: 720
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Woodworking - getDimensions

Post by dprojects »

zohozer wrote: Sun Jan 16, 2022 10:30 pm A good source of inspiration would be the concepts presented in the JoinerCAD presentation videos:
Autodesk Fusion 360 with JoinerCAD extension is like another time dimension not accessible for FreeCAD right now ;-)

Autodesk is huge software designed for such things for many years and it costs really a lot, personally I can't afford it. However, I think if I would have professional woodworking service I would go to Autodesk Fusion 360 with JoinerCAD extension, becuase for me this looks good.

But my world looks a little different. To create furniture I design it at FreeCAD, use my macro to create report with dimensions, go to the cutting service store, give the report to the person who cut chipboards, get the chipboards to the car, go home or garage, add veneer for each edge with turistic iron, drill holes, and screw all the pieces up together. Such simple furniture costs about 150pln (about $38). So, for me buying or using Autodesk is like invent time travel to eat breakfast ;-)

However, However, However, returning from time travel to FreeCAD...


zohozer wrote: Sun Jan 16, 2022 10:26 pm I don't know how to use the "Constraints - totally custom report".
This is sad to me because it means the docs for "Constraints - totally custom report" is not explained well anough. This type of report view provide abbility to add any description for each edge. You can write there whatever You want, code, material, any other information. I think You should look into that, this may be helpful.

However, the support for CNC is very tempting for me so, for sure You may expect some work around this topic.


zohozer wrote: Sun Jan 16, 2022 10:26 pm The columns 1,2,3,4 should have a number like 2 for the tickness of the edgeband used and also the type of edgeband used (PL55 PVC) if that edge needs to be edgebanded. So maybe something like this: 2_PL55 PVC
In our time dimension, I mean FreeCAD, You can't add custom description (custom text) for object. You can do it in python, add custom property to existing object, but there is no GUI for that at FreeCAD during designing furniture.

Also You can't add custom text to the edge except "constrain name".

However, Yestarday I saw You can set color to the face (edge surface). You can't do it by clicking the 3D model, but You can do it by clicking the object and choosing Color... there is GUI for shape, face and color. So custom edgband looks realistic. I need to look into that more deeply, how to convert the face color into correct dimensions column at report.

For sure You may expect some improvements around edgeband. I guess this should be possible to make it detailed by adding color to the edge face. Also You may expect new CNC report view with more columns.

However, this is not purpose of this macro to copy Autodesk, so developers from Autodesk can sleep safe and happy.

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Woodworking - getDimensions

Post by onekk »

Some research:

From what is included in AppImage Bundle, I suppose that what is included in an AppImage is the minimal requirements to run FreeCAD.

There is ezodf that will produce ODT (Writer) files, or even ODS (Spreadsheet) files, here below an example of producing a ODT file, simple enough.

Code: Select all

from ezodf import newdoc, Paragraph, Heading, Span

odt = newdoc(doctype='odt', filename='text.odt')
odt.body += Heading("Chapter 1")
odt.body += Paragraph("This is a paragraph. \n The quick brown fox jump over the lazy dog")
odt.save()

Only some class are imported in the example, I think that with appropriate research even complex documents could be produced in a rather easy way.

There is a way to use matplotlib to produce PDF files, and in effect I have had mixed results.

Another way would be to use even docutils to produce Latex or HTML files, but at least for Latex a big overhead would be a "latex typesetting system" that is rather heavy around 1GB to produce simple documents.

In theory as Latex is a very powerful language (And I'm using it very often) the quality of produced text will gave some professional output, as the code could be processed to became a professional PDF document, but as said the disk space occupied is big so having to load an entire typesetting program to produce labels, will be a "no go".

For Bar Codes, there is around even some TTF files to produce barcode, so it is not a big thing, only a matter to have the appropriate fonts.

There are around other PDF libraries for Python, so maybe having in the system one of them will be a more compact and viable solution.

you have to put them in the user Mod directory to make them found by FreeCAD internal interpreter, but is not a big hassle.

Sadly I'm expecting that something is already present in FreeCAD as there is somewhere a PDF export.

But this little research is not exhaustive so maybe making a new Post asking for "How to obtain PDF output in Python" in this forum would lead to different answers.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Woodworking - getDimensions

Post by Kunda1 »

zohozer wrote: Sat Jan 15, 2022 9:36 pm
dprojects wrote: Mon Jan 10, 2022 4:54 pm
Just as an aside, Scribus (FLOSS DTP) has barcode generating logic. I'm not sure if there are better solutions out there, but hey..it's a start ;)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
dprojects
Posts: 720
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Woodworking - getDimensions

Post by dprojects »

onekk wrote: Mon Jan 17, 2022 5:32 pm There is ezodf that will produce ODT (Writer) files, or even ODS (Spreadsheet) files, here below an example of producing a ODT file, simple enough.

Code: Select all

from ezodf import newdoc, Paragraph, Heading, Span

odt = newdoc(doctype='odt', filename='text.odt')
odt.body += Heading("Chapter 1")
odt.body += Paragraph("This is a paragraph. \n The quick brown fox jump over the lazy dog")
odt.save()

This Open Document issue will be helpful for this sheet2export project:
https://forum.freecadweb.org/viewtopic.php?f=22&t=64985

onekk wrote: Mon Jan 17, 2022 5:32 pm In theory as Latex is a very powerful language (And I'm using it very often)
"In theory" is my favorite part of the comment ;-) I remember Latex from the university with mathematics and computer science 20 years ago, my master thesis with mathematics with Latex, this is unbelievable somebody is willing to use Latex or Vi these days ;-)

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Woodworking - getDimensions

Post by onekk »

dprojects wrote: Mon Jan 17, 2022 6:56 pm
"In theory" is my favorite part of the comment ;-) I remember Latex from the university with mathematics and computer science 20 years ago, my master thesis with mathematics with Latex, this is unbelievable somebody is willing to use Latex or Vi these days ;-)

It's the only reliable way to do serious thing when typesetting something, you could do everything, even figures, with Latex and some packages, in my signature, you will find some examples of "Scripting guides" all done with latex, with glossaries, figures and some other things.

Obviously it is not for the "faint of heart", but if you do some serious mathematics and some other things, you have no "cheap" alternatives a part of some professional typesetting things, some of the use Latex behind the shades, there is even some web services that permit to compose things directly on the web and having a pdf file in return, but i prefer to do locally.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 53917
Joined: Tue Mar 17, 2015 9:14 am

Re: Woodworking - getDimensions

Post by chrisb »

dprojects wrote: Mon Jan 17, 2022 6:56 pm I remember Latex from the university with mathematics and computer science 20 years ago, my master thesis with mathematics with Latex, this is unbelievable somebody is willing to use Latex or Vi these days ;-)
:)
It almost seems as if you don’t remember it very well. Did you ever try to search for a document where you only know a part of a formula? Ever tried to compare more than two versions of a file? Ever tried to search for document contents in a database? TeX is not suitable for everything and of course not for everyone, but it still is widely used.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
dprojects
Posts: 720
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Woodworking - getDimensions

Post by dprojects »

zohozer wrote: Sun Jan 16, 2022 10:26 pm The columns 1,2,3,4 should have a number like 2 for the tickness of the edgeband used and also the type of edgeband used (PL55 PVC) if that edge needs to be edgebanded. So maybe something like this: 2_PL55 PVC
The main problem with CNC logic is that top/bottom and right/left can be replaced with chipboard rotation. Right can be left and left can be right. The same for top and bottom. So, it also implicates problem with numbering like 1,2,3,4.

However, I solved this problem with 6 columns and edge/surface recognition mechanism. The 6 columns represents face numbers from 3D model and the macro recognize (in fact calculate) if the face is edge or surface and add exact description to it and exact dimension as well. You can also add custom veneer description. By default it is "PL55 PVC" but for my furniture I used black. This looks like this:

Image

Here is the docs for that: https://github.com/dprojects/getDimensi ... eport-type


zohozer wrote: Sun Jan 16, 2022 10:26 pm I don't know how to use the "Constraints - totally custom report".
I changed the docs little bit: https://github.com/dprojects/getDimensi ... eport-type
And here more about edgeband: https://github.com/dprojects/getDimensi ... s#edgeband

Let me know if this is more clear now.

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
zohozer
Posts: 119
Joined: Mon Jul 28, 2014 8:35 pm

Re: Woodworking - getDimensions

Post by zohozer »

dprojects wrote: Fri Jan 21, 2022 8:36 pm
The main problem with CNC logic is that top/bottom and right/left can be replaced with chipboard rotation. Right can be left and left can be right. The same for top and bottom. So, it also implicates problem with numbering like 1,2,3,4.
It is easy to define Top/Bottom/Left/Right because after the nesting by CNC, before to take off the pieces from the bed all pieces are labeled with a fixed orientation, so the label always will show the correct eges of the pieces that can be also interpreted correctly even if that piece of furniture it is handled to other operator in factory for edgebanding of future manipilation.

So Top is the part that have the label applied to, the front is the part that you can read the text of the label without the need to rotate the piece and automatically you have the Left/Right and Back/Bottom defided this way. For this reason the labeling it is important. The only way to screw this is to apply the label on the bottom side of the piece or to apply the label upside-down, that means you can't read normally the label.
zohozer
Posts: 119
Joined: Mon Jul 28, 2014 8:35 pm

Re: Woodworking - getDimensions

Post by zohozer »

dprojects wrote: Fri Jan 21, 2022 8:36 pm Let me know if this is more clear now.
I do apreciate your efforts and your workaround it is working for now, but I think it is better to have a propper IFC atribute embedded in the panel that can be further readed and interpreted by your script, the nesting module and any external application that can read and manipulate IFC classes.

In this regard I opened a separate topic regarding the subject, please see here:

Define Grain Direction for panels as IFC

My target it is to have a proper Furniture design&fabrication module in FreeCAD with all the features a dedicated professional software do have in this regard.
User avatar
dprojects
Posts: 720
Joined: Mon Mar 06, 2017 6:02 pm
Location: Poland
Contact:

Re: Woodworking - getDimensions

Post by dprojects »

zohozer wrote: Sat Jan 22, 2022 8:36 am all pieces are labeled
Yes, if they are labeled. I usually order chipboards and cutting them in the shop. They are never labeled. Probably because laminated chipboards are the finished product so they can't be because it would be visible. Only the raw wood can be labeled. The chipboards usually are laminated on each sides so it is no matter where is top or bottom, you never know that. The white laminated chipboards even don't have grain direction, they have plain white color, I like that ;-) The shop provide also edgeband but I do this job alone with small travel iron ;-) In the store I pay for square meter, usually the price depends on color or wood type, if this is plywood, MDF, HDF, OSB or laminated chipboard. So this is why the area is calculated, it is easy to calculate overall furniture cost than or even some groups.

The labeling simplifies the process with no doubt but FreeCAD allow only add color to the face. No description, no custom text. So, you can't do nothing more during design process.

However, I added the Demo005 https://github.com/dprojects/getDimensi ... 5_edgeband and it have white color and black edgeband exactly like my furniture in garage ;-) Maybe not impressive advanced design hehe ;-) but I really like it and because each shelf is set on the side walls instead of between them, you can load really heavy things. Also it is modular so you can rebuilt it or add new module on top.

The edgeband is calculated correctly and also the extended view (e - report type) shows every edge with black veneer correctly. There is no "surface", all faces with veneer are recognized as "edge" type.

Image

Thanks
Darek
github.com/dprojects

workbench for woodworking is available at: github.com/dprojects/Woodworking
Post Reply