Bounty? TechDraw dimension support for Arch Section Plane

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

Hi, I am an architectural user and I'd love to see Arch Section Planes supported in TechDraw with the ability to add parametric dimensions. It is the only thing stopping me using 0.17 (at the moment I rely on the drawing dimensioning wb in 0.16).

I'd be happy to place a bounty on this as I am aware it is quite a complicated issue to do with using Qt instead of SVG for the graphics. Would a bounty change anything?

If so then there needs to be an issue created so that I can paste the issue url here https://www.bountysource.com/. I could not find an issue for this listed at the moment https://github.com/WandererFan/FreeCAD- ... +is%3Aopen

I know that Yorik has a patreon page and there is a bounty source 'salt' thing to contribute monthly payments to freecad in general - but I'd like to show support for something very specific if helpful.

Cheers
Ben

OS: Ubuntu 16.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.11528 (Git)
Build type: None
Branch: master
Hash: d31be3117de386b4f6cd3444e0b330db56dc6ba2
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by yorik »

I would like to have that feature too and would be glad to do it, but I have no clear idea of how to attack the problem...

Basically the Arch WB, at the moment, calculates itself the 2D representation to be placed on the TechDraw sheet. However, to be able to place dimensions, TechDraw must be able to "relate" the projected edges to the original shape.

What the section plane basically does, is:

1) make a list of shapes seen by the section plane
2) if the section plane is cutting that object, subtract a volume that is "behind" the section plane from each of these shapes
3) keep track of the outlines (section lines) obtained during operation 2)
4) make a compound out of the resulting shapes
5) Project that compound, either using OpenCasCade's HLR tools (hidden line removal) or using Arch's projection module which is able to preserve face colors
6) Project the outlines obtained in 3) on top of it

We could, maybe, still do 1) to 4) inside Arch, and provide the resulting shape to one of the TechDraw tools such as the multisolid view. But that won't solve everything either (the cut lines won't be included, etc).

Maybe a better approach would be to extend the dimensioning tools so they can work on symbols too... Wandererfan might have better ideas?
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by wandererfan »

yorik wrote: Tue Jul 11, 2017 2:16 pm 1) make a list of shapes seen by the section plane
2) if the section plane is cutting that object, subtract a volume that is "behind" the section plane from each of these shapes
3) keep track of the outlines (section lines) obtained during operation 2)
4) make a compound out of the resulting shapes
5) Project that compound, either using OpenCasCade's HLR tools (hidden line removal) or using Arch's projection module which is able to preserve face colors
6) Project the outlines obtained in 3) on top of it
Unless there is some secret way to select an individual Svg path inside an Svg symbol I don't see how the user would tell the program what he wants to dimension.

If the result is a TopoShape, TechDraw can dimension it. So if we make a Compound of 5&6 (and store it in ArchSectionPlane.Shape?) we can dimension the result. Any way to have a getResultAsShape() added to ArchSectionPlane? If Arch has already done the projection/HLR part we could skip that in TechDraw?

But TechDraw only knows about Edges & Vertices, so this solution doesn't get the fancy shading, text or symbols onto the Page though. You'd have to use the TechDraw annotation/colour/hatch functions for that.

Not sure a bounty is going to help unless it encourages another coder to jump in.
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

Hi Yorik,
Thanks for the response.
yorik wrote: Tue Jul 11, 2017 2:16 pm We could, maybe, still do 1) to 4) inside Arch, and provide the resulting shape to one of the TechDraw tools
Yes, I experimented with a workaround along those lines.
1. Create shape2Dview from section plane set to projection mode solid
2. Create shape2Dview from section plane set to projection mode Cutfaces
3. Create a 'View of a Part' for each shape2Dview
4. Adjust the X and Y coordinates of the views to match
5. Adjust the line width of the views as desired
-
FreeCAD_026.png
FreeCAD_026.png (159.76 KiB) Viewed 2998 times
-
This works fine provided that the Shape2Dviews occupy the same bounding box. If they have different bounding boxes then inputting the same coordinates of the tech draw views does not align them, because the coordinates only control the position of the centre of the bounding box relative to the page, not relative to world space.

If the bounding box positioning issue could be resolved then there would be something functional for architectural users.

As a hack it is possible to create two objects far away to normalise the bounding box coordinates, example attached. I haven't managed to break this approach yet, but is still a bit clumsy.

I'm no programmer but it seems like FreeCAD is 95% of the way there for this feature, what are your thoughts?
Attachments
arch-section-techdraw-test.fcstd
(60.89 KiB) Downloaded 63 times
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

Hey wandererfan,
Thx for reply
wandererfan wrote: Wed Jul 12, 2017 4:14 pm Not sure a bounty is going to help unless it encourages another coder to jump in.
Just thought I'd ask!
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by wandererfan »

clarkitect wrote: Wed Jul 12, 2017 5:00 pm
Is this more or less what you're trying to do?
arch-section-techdraw-test_WF.png
arch-section-techdraw-test_WF.png (58.42 KiB) Viewed 2988 times
Attachments
arch-section-techdraw-test_WF.fcstd
(90.43 KiB) Downloaded 59 times
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

Yes basically that's it. So how have you done that? Or did I miss something obvious?
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

I will look at the attachment in a couple of hours when I have access to my laptop
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by wandererfan »

clarkitect wrote: Wed Jul 12, 2017 6:13 pm
You only need this first part if you want >1 objects in the result.
Part Workbench
Select "Cut" and "Extrude002" in Tree
Part>Compound>MakeCompound

TechDraw Workbench
Select "Compound" in Tree
Make View of "Compound"Image
Change projection direction to (0,-1,0) (Front)
Select "View"
Make ViewSection of "View"Image
Select down direction in dialog, press OK.

Add Dimensions as required.
clarkitect
Posts: 39
Joined: Sat Sep 19, 2015 1:57 pm

Re: Bounty? TechDraw dimension support for Arch Section Plane

Post by clarkitect »

Hi wandererfan
Ok yes I see. So by making everything into a compound then you can use the section view tool for a single part. The problem with this approach is that if you add any new geometry, then you need to delete the compound and make a new one, which breaks the references to the techdraw views. That's not really workable on architectural projects, because lots of changes and additions are made over the lifetime of a project. The good thing about the arch section plane is it works on groups, so you can just drag and drop any new objects into the group which is seen by the section plane and the drawings update. Good work-flow for construction documentation is a seriously tough nut to crack...
Cheers
Ben
Post Reply