[Discussion] Drafting 2d annotations for architecture

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
regis
Posts: 743
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Post by regis »

onekk wrote: Wed May 13, 2020 5:21 pm Having many object in a document could be dangerous, maybe a new format is needed for complex objects.

Some other piece of software have found a solution, maybe not elegant, but easily implementable.

The document is simply a compressed directory, expanded at opening, put in a temporary directory, modified there and recompressed at saving.

In this way there could be a "traditional" FCstd file that contains all the 3D work and several other files containing the "special features" like drawings and other.

Simply use another extension, to tell FreeCAD that this document use "the complex format".

LibreOffice for example use a similar approach you could modify the document name changing the od... suffix with zip and unzip into a directory.

In this manner you could insert many objects, even some databases, images and so on and it appear a sigle document.

Cheap and dirty, end even "serviceable" in case of problems, you could add whatever you want, even backward compatible, if the new features reside in a separate file the standard FCstd file will ever be readable if no newer feature are introduced.

Just a thinking.

Regards

Carlo D.
This sounds like a good idea, it also sounds like the BIM workbench which is sperate from everything else, i'll leave the code experts to comment on this approach but it sounds interesting.
DDM
Posts: 88
Joined: Tue Feb 05, 2019 9:06 am

Re: [Discussion] Drafting 2d annotations for architecture

Post by DDM »

I agree with @Vox...
I tried to create drawings of a model in external files using App Link.

Here the thread....

https://forum.freecadweb.org/viewtopic.php?f=35&t=41973

The examples were very simple, and @Wandererfan solved some problems about external file...

I didn't try large model model yet...

Some commercial softwares create external files to lighten the 3D model...

App Link also works with the Shape2DView function...
The user can create the 2D views in the model and insert annotations, dimensions in the external file...
User avatar
regis
Posts: 743
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Post by regis »

paullee wrote: Wed May 13, 2020 5:48 pm
regis wrote: Wed May 13, 2020 4:58 pm
Good account of FreeCAD capabilities and shortcoming :)

Have you joined the OSArch.org ? There workflows possibilities should be discussed.

I intend to have another deeper look at libreCAD, Inkscape to do documentation with FreeCAD. It seems you find this workflow not very efficient right?

Hopefully with more capable hands like @Carlopav to help @Yorik's development, there will be much faster development and improvement in several critical aspects peoples identify and debug.
As for now i'm a side observer of the discussion as I see it's mainly highly experienced programmers engaging in and i don't want to look like a poor ignorant that I am when it comes to programming stuffs. However moult did me a very basic tutorial demonstration and did find it very interesting aswell, and very promissing.
According to me, we should take what is good about librecad and implement in Freecad, and really look at a combination of Freecad and Inkscape for documentation because what Freecad lacks, Inkscape has it all, and what Inkscape lacks freecad has some of it, so it's a good blend. Currently I see inscape more as the place to prepare templates, nice presentation templates, things that can be reused many times once they are done once. So documentation must happen in freecad because it reduces the amount of times someone was make a change in the model, then export, then re-document in inskcape, that will very quickly become inneficient and unproductive, the more we can make freecad less dependent on inkscape the better we shall be, but the more we can provide a initial template setup in inkscape for freecad then i think this is best, for example we can make Hatches in inskape so easily and then import them in freecad, this process doesn't need to involve going back and forth, once it's done in inkscape it's done, and for presentation, if you imagine big presentation boards can be prepared in inkscape with their colors and effects and then saved, and pull it in freecad and just drop the plan ontop of it.
Ah also the naming of sheets, like the names, sheet numbers, revisions, etc etc, that must be carefully observed because we need a working template that addresses it all at once and is flexible to many changes at onces, currently the techdraw way of doing it and rellying in inkscape doesn't appear as efficient and most often a newby can't modify and create his own so easily. I i don't want to use the preset templates and need to create my own, i'll quickly realize that i'm stranded, so that defies the mindset behind open source in terms of flexibility in customization.
So that's my 2 cent opinion on that.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [Discussion] Drafting 2d annotations for architecture

Post by carlopav »

I'm sorry I started this conversation with probably too little knowledge about this topic, and most of all with absolutely no idea aboutn the direction to go to solve it... so thanks everyone for the ideas, it's nice to see i'm in good company :)
regis wrote: Wed May 13, 2020 5:54 pm :lol: :lol: :lol: :lol: I like your galvinising speech, that's the spirit of a leader
:oops: sorry for giving this impression, never aimed to this in my life and i will not start now! :roll:
(saw Moult work and i find it really interesting, but before arriving to IFC export of annotations I believe we have to concentrate in FC first)
by the way, as @paullee suggested, would be nice to see you around in https://community.osarch.org/
onekk wrote: Wed May 13, 2020 5:21 pm Having many object in a document could be dangerous, maybe a new format is needed for complex objects.
Some other piece of software have found a solution, maybe not elegant, but easily implementable.
The document is simply a compressed directory, expanded at opening, put in a temporary directory, modified there and recompressed at saving.
In this way there could be a "traditional" FCstd file that contains all the 3D work and several other files containing the "special features" like drawings and other.
Simply use another extension, to tell FreeCAD that this document use "the complex format".
Thx Carlo, This is a really interesting input. I really lack in understanding how this could work indeed. I guess FCStd format is already a kind of compressed folder, but I'm not sure about that... So you mean we could "include" a "DXF or wathever draft" inside FCStd and be able to display it. This is somehow similar to the idea of having a big object that could contain all the annotations of an architectural section for example?
vocx wrote: Wed May 13, 2020 6:26 pm The problems that you mention seem to be about scalability, but they seem to be similar to what mechanical engineers face with big assemblies. And this is the reason App Link was developed; it is supposed to help with this problem of many objects and reusable components.
How much have you tried App Link? I feel the natural way of approaching this is to really start breaking down a single project into subfiles, all tied together by App Links. Essentially, you can have many objects in one document, but link to them in another document.
DDM wrote: Wed May 13, 2020 6:56 pm The examples were very simple, and @Wandererfan solved some problems about external file...
I didn't try large model model yet...
Some commercial softwares create external files to lighten the 3D model...
App Link also works with the Shape2DView function...
The user can create the 2D views in the model and insert annotations, dimensions in the external file...
I've been thinking about that quite a lot in the last year. I my experience the object limit is easily reachable within one single architectural draft (at least in my experience). Imagine a floor plan of a small residential building, where you want to draft the sewage system or the garden, or a site plan, or an interior plan where you have custom furniture... I start to have this problems if i draft just one single flat sometimes...

Hi Marco, thx for the link, i hadn't see it before.
Well... yes, I was thinking to more complex designs, expecially with many annotations. Definitely this tecnique can be used to lighten the model a lot as @vocx pointed out. And it's what i usually use when i'm dealing with complex buildings: one floor per file. The issue pointed out here was just: if we have to economize the objects in FC because they can't be infinite, why a super stupid 2d line should consume one object slot?
follow my experiments on BIM modelling for architecture design
User avatar
regis
Posts: 743
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Post by regis »

carlopav wrote: Wed May 13, 2020 9:25 pm sorry for giving this impression, never aimed to this in my life and i will not start now!
Nothing wrong brother Carlo, we are all of light hearted spirits so we can indulge on some harmless tease.
carlopav wrote: Wed May 13, 2020 9:25 pm by the way, as @paullee suggested, would be nice to see you around in https://community.osarch.org/
I will join. Just my brain is also all over the place aswell so sometimes hard for me to be consistent with what i follow. But i'll check it out.
I'm currently reviewing your progress on this post car I think you have some interesting developments going on here
https://forum.freecadweb.org/viewtopic. ... 5&start=70
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Discussion] Drafting 2d annotations for architecture

Post by realthunder »

carlopav wrote: Wed May 13, 2020 1:23 pm @realthunder, do you think it could be feasible to have a huge document object containing single simple coin entities or group of them (like dimensions and polylines)? Be able to select them individually and give everyone of them a proper visual style (color and linestyle)?
It would be a bit like having a 2d LibreCAD sheet into FreeCAD 3d View... (or imagine importing a huge drafting 2d sheet and be able to show as a single object, but divided with layers :?: )
I think we shall aim at being able to handle 10K+ objects per session. However, for the drafting use case you described here, I think it is best to not expose geometries as individual objects. Why not follow the Sketcher WB approach, once double click the object, you can then expose individual edges for further editing.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Post by onekk »

I don't know the format of Fcstd file. I have asked but no one has answered me.

But if you create a libreoffice, openoffice file, you will see that if you change the extension in zip you could open it with an archive tools or simply unzip it and you will find a directory tree with many file:
libreoffice.png
libreoffice.png (75.5 KiB) Viewed 1527 times
I suscpect that most of the machinery is already in FreeCAD, maybe chosing a compression alghorithm more efficient than zip will be better, but it is not very crucial.

In this way a document could contain almost everything.

Images, text file, even spreadsheet and database file, or even his own set of Macro, or even a whole workbench.

You could imagine even a scenery where you put into this file the machinery needed to manage a completely different approach.

incorporating annotations, as Yorick say about a csv file, will be more easier, the "FCnew" file will contain maybe three file:

- document.FCstd
- ann_styles.csv
- content.xml

Only a rough example, in content.xml will be the glue of whole document, maybe a description of the content of the file, some comments and so on.

For a more complex approach:

- document.FCstd
- ann_styles.csv
- content.xml
- document.dxf

To not reinvent the wheel maybe if the machinery is present, or a decent 2D cad library could be found, the entire Drawing workbench could be managed by a completely different library in DXF format, that is a somewhat solid standard.

Images, material texture and whatever you could imagine could be put in place, if not needed or not supported it will be simply ignored by the program that open it.

Simply in FreeCAD at the start we have to add a filter for the file name, a decompression code into a temporary directory and simply load the document.FCstd.

an ipotetical skeleton of the content.xml would be:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<freecad:document>
<version num=2020 />
<main>
./document.FCstd
</main>
<styles>
ann_styles.csv
</styles>
<drawings>
<page num=1>
page1.dxf
<\page>
<page num=2>
page2.dxf
<\page>
<drawings>
</freecad:document>

Obviously for each task and workbench maybe a different file will be created, so if you have to modify the 3D part you have only to load the 3D part and the drawings or the textures are not loaded.

Obviously it has to be discussed by the main developer as it is better to make some discussion on some aspects.

But the power of this approach I think could boost FreeCAD development, as when someone will add a new workbench simply anew file that contains the relevant information for this workbench is added.

Think of a document with a some 3D objects and all the technical drawings, maybe even a pdf file with the manual with the specifications and so on.

There were discussion on how to implement the IFC translation in FreeCAD, simply it will be not necessary, the IFC file is simply a part of the new container and only the translation part will occur.

Suppose that FreeCAD version 2020 will manage only 3 or 4 construct of the iIFC part, and maybe version 2023 will manage 10 cnostruct, the 3 years old file is preserving the original IFC file, so the 2023 version could manage and visualize, and maybe modify more information than 2020 version, but the carefully created "version 2020" "FCnew" file will be used without modification.

Only my two cents

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/
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Discussion] Drafting 2d annotations for architecture

Post by realthunder »

onekk wrote: Thu May 14, 2020 6:36 am I don't know the format of Fcstd file. I have asked but no one has answered me.

But if you create a libreoffice, openoffice file, you will see that if you change the extension in zip you could open it with an archive tools or simply unzip it and you will find a directory tree with many file:
FreeCAD is about the same. The FCStd file is just a zip archive, you can unzip it with any standard zipper. But you can't re-zip it with standard tools, because there is requirement on file ordering. There is script for doing that. On the other hand, you can try with my fork, which allows you to save to and restore directly from directory without compression. It is meant to allow use of external version control software. The content of the directory is self-explanatory.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Post by onekk »

realthunder wrote: Thu May 14, 2020 7:02 am
onekk wrote: Thu May 14, 2020 6:36 am I don't know the format of Fcstd file. I have asked but no one has answered me.

But if you create a libreoffice, openoffice file, you will see that if you change the extension in zip you could open it with an archive tools or simply unzip it and you will find a directory tree with many file:
FreeCAD is about the same. The FCStd file is just a zip archive, you can unzip it with any standard zipper. But you can't re-zip it with standard tools, because there is requirement on file ordering. There is script for doing that. On the other hand, you can try with my fork, which allows you to save to and restore directly from directory without compression. It is meant to allow use of external version control software. The content of the directory is self-explanatory.
OK all the machinery is in place, changes are more easy.

I gave a quick view at the file, and it seems that it is not a big problem to extend the format to include a more articulated directory tree, from what you know there is some documentation about the file format around?

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/
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Discussion] Drafting 2d annotations for architecture

Post by realthunder »

onekk wrote: Thu May 14, 2020 7:09 am I gave a quick view at the file, and it seems that it is not a big problem to extend the format to include a more articulated directory tree, from what you know there is some documentation about the file format around?
Not that I know of. Adding new content for C++ is pretty straightforward. Not sure about Python, though. Yorik must know about it.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Post Reply