[Discussion] Drafting 2d annotations for architecture

A forum dedicated to the Draft, Arch and BIM workbenches development.
onekk
Posts: 379
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby onekk » Thu May 14, 2020 7:37 am

Ok the quick glance is more focused now.

There is some components:

- Document.xml that contain what seems to be the treeview
- GuiDocument.xml that seem to contain the View Part of the file
- a Bunch fo brp files that seem to adhere to https://www.opencascade.com/doc/occt-6. ... ormat.html that is quite obvious the internal 3D representation in the "native " format oof the CAD engine
- some other DiffuseColor... that I suspect contains the color used by the View part
- Edges file, that seems compressed

I suspect that it will be not very difficult to extend the format using maybe a DXF file for the TechDraw Part, and some glue to relate the two files.

Simply for not "reinventing the wheel" everytime a function is needed.

On the other side FreeCAD is already a "collage" of different pieces of Software, OCCT, Coin3D, VTK, QT5 and Python mainly, finding a library that is more taylored to support the needed function, like the Path workbench has done for the CAM part, (from my point of view in a ugly and overcomplicated manner)
will be a more viable solution than trying to mimic these function.

XML file is goog ad easy parseable, but maybe making it too big will result in a bottleneck.

if the TreeView is kept in the Document.xml and the other functions, in a similar manner in what is done with the OCCT brp files maybe it will be an improvement.

If I'm in need to modify the 3D part, i use only the 3D infors, if this 3D part is derived from a 2D part, there will be a mechanism that tell the 2D part that the 3D representation is modified, but for this i don't know the workflow.

Having seen what the BIM workbench is trying to achieve, what is the workflow, i draw the 2D design of the floor and then from the information on the 2D object i derive the 3D part, but to have this the document has to contain all the infos, and from what i see it is more the inverse, from a 3D solid i could derive the 2D draft, using the projection.

This is a clear place where more discussion will be useful and for the "file part" a broad talk with main developers, is needed.

Regards

Carlo D.
carlopav
Posts: 1380
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [Discussion] Drafting 2d annotations for architecture

Postby carlopav » Thu May 14, 2020 4:54 pm

realthunder wrote:
Thu May 14, 2020 12:20 am
I think we shall aim at being able to handle 10K+ objects per session.
Definitely... :twisted:
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.
This can be feasible for sure... Sketch object is derived from Part::Part2DObject as most of Draft Objects are. Draft Annotations instead are not, but probably it could be possible to follow a similar pattern... Would it be possible (or easily feasible) to have also complex objects like dimensions (made of many edges) inside this kind of" DraftSketch"?
onekk wrote:
Thu May 14, 2020 7:37 am
Simply for not "reinventing the wheel" everytime a function is needed.
If I'm in need to modify the 3D part, i use only the 3D infors, if this 3D part is derived from a 2D part, there will be a mechanism that tell the 2D part that the 3D representation is modified, but for this i don't know the workflow.
Having seen what the BIM workbench is trying to achieve, what is the workflow, i draw the 2D design of the floor and then from the information on the 2D object i derive the 3D part, but to have this the document has to contain all the infos, and from what i see it is more the inverse, from a 3D solid i could derive the 2D draft, using the projection.
This is a clear place where more discussion will be useful and for the "file part" a broad talk with main developers, is needed.
Thx for the imput Carlo, I learned a lot on how FCStd works, to embed a DXF or a SVG to contain annotations is something I have not considered before...
The ideal workflow (to me) would be to be able to work at the same time with 3d model and 2d annotations. Imagine a section view where:
- a clipping plane cuts the view and the 3d objects are displayed enough precisely to not have the necessity to perform boolean operations to display cut faces (I can sacrifice a bit of the appealing view for better performance, until I have to export or print);
- you have 2 active arch containers, one for objects and one for annotations;
- from within the section view, every arch object is created in the active arch object container (a floor BuildingPart for example), while every draft annotation is created inside the active draft annotation container (the section object for example or the complex object we are talking about)...

Now, would it be better to invest in embedding and visualizing a DXF/SVG into the 3dview; to go for a complex object like a Sketch; any other ideas that we can lay out? :)
follow my experiments on BIM modelling for architecture design
onekk
Posts: 379
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby onekk » Fri May 15, 2020 7:08 am

carlopav wrote:
Thu May 14, 2020 4:54 pm
The ideal workflow (to me) would be to be able to work at the same time with 3d model and 2d annotations. Imagine a section view where:
- a clipping plane cuts the view and the 3d objects are displayed enough precisely to not have the necessity to perform boolean operations to display cut faces (I can sacrifice a bit of the appealing view for better performance, until I have to export or print);
- you have 2 active arch containers, one for objects and one for annotations;
- from within the section view, every arch object is created in the active arch object container (a floor BuildingPart for example), while every draft annotation is created inside the active draft annotation container (the section object for example or the complex object we are talking about)...

Now, would it be better to invest in embedding and visualizing a DXF/SVG into the 3dview; to go for a complex object like a Sketch; any other ideas that we can lay out? :)
SVG is not a "precise" format, is a vector image format, so it not contain proper "dimension" information.

I speak DXF, but may be another quick parseable format may be out of here, or maybe a proprietary format could be put together, working with two windows, i think it will be a great workflow, but i don't know the usual workflow in architecture, i could think, of a 3d view of a building and when selecting a floor you have in another window the 2d plan of this floor, maybe this could be achieved to put a reference on each 3d object to the 2d drawing in which it is contained.

But if you start from a 2D drawing and then from there you construct the 3D view, maybe the inverse will be better, but this could be.

Doing some brainstorming, may be a good start, but for not reinventing the wheel.

some information on CAD standards https://en.wikipedia.org/wiki/CAD_standards

Maybe? https://en.wikipedia.org/wiki/ISO_13567 this could be useful

DXF maybe some information could be http://www.dougseidler.com/autocad-layer-names.html

for my "limited" point of view, if there is some library or parser that exist and is opensource and reusable, maybe it will be better to stick with such library.

The "second best" would be using a standard and reimplementing it with a limited subset of thing striclty needed to do the work.

If we could use the approach of multiple files, think a building:

Code: Select all

document.xml >> containt the usual 3d view with reference for the follr plans
content.xml >> contains some glue and maybe general informations
ann_style.csv >> styles 
floor_plan_1.dxf
floor_plan_2.dxf
....
Now i don't know:

- how easy is to manage the dxf part, maybe librecad libraries could be leveraged as they are opensource
- how much horsepower it use to render the dxf file

so maybe another format could be put together to hold simple informations, i suspect that many of the machinery is already in FreeCAD, so maybe a "fast
parser" could be put together.

http://www.ifcopenshell.org/

maybe using directly IFC would be an option?

The goal is not to "translate" the DXF or wathever format you decide to use but use it natively.

This work could be a good reading.

https://www.ibm.com/developerworks/libr ... index.html

maybe https://github.com/codelibs/libdxfrw

my two cents

Regards

Carlo D.
User avatar
regis
Posts: 716
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby regis » Fri May 15, 2020 11:12 am

onekk wrote:
Fri May 15, 2020 7:08 am
The goal is not to "translate" the DXF or wathever format you decide to use but use it natively.
I think you are doing some good brainstorming already. It should be great to see a first demonstration attempt and recollect some feedback. Perhaps working with dxf and svg in the start and move along with both so that we can harness both powers. I see the ability to use inkscape svg capabilities as a very potent enchancer of freecad, and i also see dxf which is a standard and proven as a good place to manage lots of text notes required in documenets. I can't wait to see the first samples of this adventure.
onekk
Posts: 379
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby onekk » Fri May 15, 2020 1:02 pm

Sadly for now I couldn't code yet, my actual Linux installation is not permitting me to do some serious work on sources.

Using a 4G connection, I'm short on Gb as my children are attending school remotely, so for now I'm seriously limited in bandwidth.

Plus one of the main blocking factor is that no one of the main contributor of FreeCAD has "endorsed" this approach, or even told me if it is feasible.

For implementing this approach a deep knowledge of the "internals" of FreeCAD is needed, at least in a starting phase, not to break compatiblity with old file nor to make an unmanageable approach that will modify most part of the codebase.

Another consideration, is that I'm not used to do Architectura Drawing.

More experienced people maybe could tell that is a wrong approach.

But I'have some knowledge of programming, and maybe a little experience on doing things, (I have developed some plugins for a CAM program CamBam, but they are developed in C#).

I've done some work on Python, and contributed to some project, but not in this "in deep" manner.

Doing this, I've developed a little knowledge about some 3D and some mathematics.

But as history teach a different point of view could be a turning point, so I'm trying to give my "not technical" thinking.

Regards

Carlo D.
User avatar
yorik
Site Admin
Posts: 11950
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby yorik » Fri May 15, 2020 1:19 pm

My 2 cents here (sorry for being late to the party, as usual :) )

- The Draft annotation tools should indeed behave like autocad. I really don't see much difference in their current form. The only thing that really hinders things is our number one issue, efficiency with a vast many objects. Beside that, just a little bit of polish, styles handling, better edit, etc. and we should be there, IMHO. And maybe, like I started doing with some tools in BIM, several different shortcuts to start the dim tool in aligned, vertical, horizontal, diameter modes... small things that would "cut" the difficulty for users while keeping the tool as powerful as we can.

- Really having many objects in a document is a problem. We can solve things partially by separating things in several files, but who ever worked with different sub-files in revit knows the nightmare that it can also be. So it's not an absolute solution either (although we can do MANY crazy things that revit can't, mostly with App Links). At some point indeed, if you have several annotated views in one file, you have many many objects.

- I remember Werner saying once that the main problem with those many different doc objects was all the Qt signalling going on. And indeed without the GUI handling hundreds of objects simultaneously goes in a snap. And the coin 3D view itself can easily display millions of facets at a time... This is a pretty obscure area for me, but maybe optimization is possible there...

- Having massive, all-in-one objects is a possibility, but seems it wouldn't be so practical and always be a workaround, but I might be wrong. Look at the sketch object, it is not that bad.... Maybe we could have something similar? A general annotation object that could contain several annotations in a same plane? With a list of, not geometries, but annotations? We could even design that in C++ to make it fast from the start.

- TechDraw is indeed not well suited for annotating Arch/BIM documents. There are just too many zillions of points. But TechDraw is a great sheet handling module anyway. For me the approach I started with the Arch section is still valid. We must feed TechDraw with a "prepared" view. TechDraw would just handle the placing of that view on the sheet, plus little else. The problem currently with arch views is that there is an unnecessary translation to SVG (and even so the performance is not that bad). But we might be able to feed view data in a better form.
onekk
Posts: 379
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby onekk » Fri May 15, 2020 2:48 pm

yorik wrote:
Fri May 15, 2020 1:19 pm
My 2 cents here (sorry for being late to the party, as usual :) )

- The Draft annotation tools should indeed behave like autocad. I really don't see much difference in their current form. The only thing that really hinders things is our number one issue, efficiency with a vast many objects. Beside that, just a little bit of polish, styles handling, better edit, etc. and we should be there, IMHO. And maybe, like I started doing with some tools in BIM, several different shortcuts to start the dim tool in aligned, vertical, horizontal, diameter modes... small things that would "cut" the difficulty for users while keeping the tool as powerful as we can.

yorik wrote:
Fri May 15, 2020 1:19 pm
- Really having many objects in a document is a problem. We can solve things partially by separating things in several files, but who ever worked with different sub-files in revit knows the nightmare that it can also be. So it's not an absolute solution either (although we can do MANY crazy things that revit can't, mostly with App Links). At some point indeed, if you have several annotated views in one file, you have many many objects.
The proposal to split the files, was done for permitting some link between floor plans and 3d representation of a building, or what I've caught from the discussion, placing a DXF (or maybe sketch or draft file) separate one for each floor plan and recalling it only if needed, the exact mechanism has to be focused, would be difficult.

I try to explain it better, if the FreeCAD file is intended as a container, you open the building 3d view, and see only maybe an icon, no file is loaded yet, when you click on that icon and only when you click the "Floorplan" is opened.

No horsepower is needed, think it like an html link.
yorik wrote:
Fri May 15, 2020 1:19 pm
- I remember Werner saying once that the main problem with those many different doc objects was all the Qt signalling going on. And indeed without the GUI handling hundreds of objects simultaneously goes in a snap. And the coin 3D view itself can easily display millions of facets at a time... This is a pretty obscure area for me, but maybe optimization is possible there...

- Having massive, all-in-one objects is a possibility, but seems it wouldn't be so practical and always be a workaround, but I might be wrong. Look at the sketch object, it is not that bad.... Maybe we could have something similar? A general annotation object that could contain several annotations in a same plane? With a list of, not geometries, but annotations? We could even design that in C++ to make it fast from the start.
The above approach will not load the object tree, think all the objects on a "floor" are in a proper "group" eventually the common building block, like perimetral wall and maybe elvator towers and so on don't belong to a "floor" (sorry but I'm not a builder, but I've seen some TV series on buildings :-D)
yorik wrote:
Fri May 15, 2020 1:19 pm
- TechDraw is indeed not well suited for annotating Arch/BIM documents. There are just too many zillions of points. But TechDraw is a great sheet handling module anyway. For me the approach I started with the Arch section is still valid. We must feed TechDraw with a "prepared" view. TechDraw would just handle the placing of that view on the sheet, plus little else. The problem currently with arch views is that there is an unnecessary translation to SVG (and even so the performance is not that bad). But we might be able to feed view data in a better form.
An automated way to derive the "floorplan" it can be thought, now i don't know how it is the workflow of a proper architectural view (or bulding view).

Do you start with a "floorplan" and then do the 3d work or the inverse you model the building and then make the 2D "floorplan"

Or maybe I have not caught "carlopav" suggestions.

Regards

Carlo D.
carlopav
Posts: 1380
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [Discussion] Drafting 2d annotations for architecture

Postby carlopav » Sat May 16, 2020 7:53 am

yorik wrote:
Fri May 15, 2020 1:19 pm
- The Draft annotation tools should indeed behave like autocad. I really don't see much difference in their current form. The only thing that really hinders things is our number one issue, efficiency with a vast many objects. Beside that, just a little bit of polish, styles handling, better edit, etc. and we should be there, IMHO. And maybe, like I started doing with some tools in BIM, several different shortcuts to start the dim tool in aligned, vertical, horizontal, diameter modes... small things that would "cut" the difficulty for users while keeping the tool as powerful as we can.

- Really having many objects in a document is a problem. We can solve things partially by separating things in several files, but who ever worked with different sub-files in revit knows the nightmare that it can also be. So it's not an absolute solution either (although we can do MANY crazy things that revit can't, mostly with App Links). At some point indeed, if you have several annotated views in one file, you have many many objects.

- I remember Werner saying once that the main problem with those many different doc objects was all the Qt signalling going on. And indeed without the GUI handling hundreds of objects simultaneously goes in a snap. And the coin 3D view itself can easily display millions of facets at a time... This is a pretty obscure area for me, but maybe optimization is possible there...

- Having massive, all-in-one objects is a possibility, but seems it wouldn't be so practical and always be a workaround, but I might be wrong. Look at the sketch object, it is not that bad.... Maybe we could have something similar? A general annotation object that could contain several annotations in a same plane? With a list of, not geometries, but annotations? We could even design that in C++ to make it fast from the start.

- TechDraw is indeed not well suited for annotating Arch/BIM documents. There are just too many zillions of points. But TechDraw is a great sheet handling module anyway. For me the approach I started with the Arch section is still valid. We must feed TechDraw with a "prepared" view. TechDraw would just handle the placing of that view on the sheet, plus little else. The problem currently with arch views is that there is an unnecessary translation to SVG (and even so the performance is not that bad). But we might be able to feed view data in a better form.
Well, as you know, I 100% agree with all the above considerations. Thanks for resuming them so effectively yorik!

onekk wrote:
Fri May 15, 2020 2:48 pm
An automated way to derive the "floorplan" it can be thought, now i don't know how it is the workflow of a proper architectural view (or bulding view).
Well, it's not exactly to derive 2d from 3d, or 3d from 2s. I'd like to be able to work simultaneously on the 2d and on the 3d. That is, placing a wall and a dimension ad another wall, without having to take care of anything except having an active Building container and an active Annotation container. And doing it in the 3d view. The Arch SectionPlane approach is definitely what I envision as the good way to go.
The point is, as yorik pointed out, just how to deal with many objects. Grouping them into a big annotation sketch, waiting for someone to solve the problem in the FC core and keep them standalone as they are now, embedding a dxf in the 3d view and being able to edit it smoothly as you suggest...


My knowledge is not enough to point the most promising way to address our efforts...
Yorik, which way would you suggest to experiment?
taking into account that I agree with you that:
At some point indeed, if you have several annotated views in one file, you have many many objects.
follow my experiments on BIM modelling for architecture design
onekk
Posts: 379
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby onekk » Sat May 16, 2020 12:28 pm

The main problem is to see if it is possible to manage a dxf file (or whatever format is better) to manage "floorplan".

For the heavy number of annotations, I don'0t know, but observing the way the 3D object are handled in the actual FCstd file, the sapproach used fot hte OCTT object that are stored in the brp file, with the internal format of OCCT may be the correct way.

The xml file is containg the relation between parts (3D solids, 2D drawing, annotation and so on).

Yorik in another forum speaking of IFC format has said that SVG file could store annotations.

I see some ways:

1) using the same approach of the BRP files, and sotre the 2D drawing and maybe annotations data in external files.
This approach could be better as the core document could ignore when not needed the esternal "entities", but for each file used maybe is pproblem to have a "channel" open for reading and writing file, a possible workaround if this is feasible is to store the "document" in memory and save it when done.

This also involve in choosing a format, maybe if the internal sketch format is usabel, simply put the sketch infomration in an external file and doing in this format the 2D plans, and eventually export them in DXF when needed.

According toi this page https://www.opencascade.com/doc/occt-6. ... ormat.html the 2d curves are managed by the internal OCCT format so maybe no need to reinvent the wheel.

For the annotations, maybe an annotation file could be used, but i don't know the advantage of having the annotation in an external file, maybe if the annotation are more suited for the 2D part store the annotation in the "floorplan"

2) leave all in the unique xml file, but the dimensions will grow and some past experiences have teach that is not a good approach, many software are using the container approach (like in the FCstd actual format).

A big file maybe could be easily parsed, having only a stream to manage, but as the file is generally accessed in a serial way, much bigger file, much time to parse it.

Each approach have to be carefully chosen and discussed, as a wrong implementation may lead to "big failure".

The advantage of the 1st approach (different files for different scopes), is based on the consideration that generally you are not working at the same time on many files, the human mind is limited on doing concurrent multitasking, is more prone to "time sharing", and not many of us have two or three displays to work on, so the display space is limited.

Changing the file format of FreeCAD has to be discussed with the creators and for experimenting on this matter, they are willing to share the knowledge on working on the FCstd file, as it seem that yorik is not the person that has the deep knowledge on this argument, or at least this is what i have guessed from his post.

Regards

Carlo D.
User avatar
regis
Posts: 716
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: [Discussion] Drafting 2d annotations for architecture

Postby regis » Sat May 16, 2020 12:46 pm

onekk wrote:
Fri May 15, 2020 2:48 pm
Do you start with a "floorplan" and then do the 3d work or the inverse you model the building and then make the 2D "floorplan"
It depends on the task that the architect is trying to create, both ways are necessary, let me give you an example
If you are designing a brand new building you will create from scratch the 3D and then extract the 2D you need,
but if you are fixing up an existing building designed by another architect (probably remodeling or because the building is old and doesn't meet certain current code requirements) you will start from his 2D plans because you need that information to create your own base 3D model to work from.
So I would say both direction are necessary, that's why i was saying when thinking architecturally wise, the idea is to always embrace the solution that provides the wider array possibilities for the designer, because flexibility is the name of the game, if it is too constrained it looks very mechanical and will loose the the architectural mindset of design flexibility.

That is why alot of architects prefer sketchup right of the go, very simple, straight forward, no crazyness going on.
Another picture, there are serveral kinds of architects, there are those who come out of design/art schools and those who come out of technical polytechnic schools.
Here is how they differ:
Architects from polytechnical schools will tend to love revit more because it is highly technical and contraints, those are the guys who love to create construction documents.
Architects from design and art schools (such is the kind of school i came out of) are mainly artistic oriented, design oriented, so we would generally like softwares like blender because it is highly flexible, we will not so much appreciate revit, but if we had to compare BIM tools we would choose Archicad as it is more flexible than Revit in that sense. From an artist point of view, you inspiration can be derived from art, painting, sculpting, fashion, etc etc, so a software that is flexible and allows for the ease of expression is key here instead of getting caught up with the constraints first.
Freecad has the ability to serve both types of architects if it is thought out very well.