Arch Fence

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
furti
Posts: 322
Joined: Mon Nov 27, 2017 5:27 pm

Arch Fence

Postby furti » Sun May 05, 2019 12:18 pm

I'm currently working on a Fence Tool for the Arch workbench.
I need a quick way to preview some different types of fences.

The Draft Workbench already has the PathArray that can repeat a object on a given Path and align it correctly. But it was a bit cumbersome to use it for Fence Building. So I decided to create a new Fence Tool.
Under the hood it uses the logic of the PathArray. To make this possible I extracted the logic into a new "Draft.calculatePlacementsOnPath" function. This returns a list of FreeCAD.Placement objects one can use to place Objects accordingly. So the PathArray functionality is now easy to use from Python modules or macros.

Now to the Tool itself.

One has to create a single section of the fence
Section.png
Section.png (70.11 KiB) Viewed 804 times
A single Fencepost
Post.png
Post.png (16.53 KiB) Viewed 804 times
And the Path the fence should follow
Path.png
Path.png (15.77 KiB) Viewed 804 times
Select the objects in the given Order and start the Fence tool. And it will create a full Fence out of this.
fence.png
fence.png (36.91 KiB) Viewed 804 times
I have to check if it is possible to trim sections on the fly to fit into smaller gaps like here in the Corner. Then I can make a first pull request for it.
corner_too_long.png
corner_too_long.png (13.09 KiB) Viewed 804 times
I think in the future the tool might be Extended to work like the window tool. Simply create a Sketch of one section and one fencepost and define some properties like "Glass Panel" and Colors and the tool will build a full fence out of this Information.

Hope this might be of use for some of you :)
User avatar
furti
Posts: 322
Joined: Mon Nov 27, 2017 5:27 pm

Re: Arch Fence

Postby furti » Sun May 05, 2019 12:21 pm

@yorik
Right now I do not set the IfcType of the Fence object. Do you know if there is a dedicated IfcType for a fence?
carlopav
Posts: 290
Joined: Mon Dec 31, 2018 1:49 pm

Re: Arch Fence

Postby carlopav » Sun May 05, 2019 3:45 pm

furti wrote:
Sun May 05, 2019 12:21 pm
That's interesting Furti! I'm sorry, i couldnt resist to try to model it with existing tools :roll: :
Cattura.JPG
Cattura.JPG (54.58 KiB) Viewed 753 times
I used the wall object to make the upper and the lower profile, and two path arrays of structures to make the fenceposts.

In the workflow there were three things that make it the process coumbersome:
EDIT (- the path array have some problems to correctly rotate the fenceposts (at least in my model), if set aligned the object is not just rotated, but completly aligned to the base wire;) my fault, it's possible, just have to deal with placements and rotations :) sorry for the noise;
- it's not possible to set the distance between objects but just the total number of them;
- it's not possible to set if the fencepost is repeated every base object segment start/end or to set a general rule;

Anyway, i found your attempt very promising, and maybe it could help to improve the Draft path array tool too!
PS, since it seems your tool use other arch tools improving their usability, wouldn't it better fit the BIM workbench general pourpouses?

thx!
Attachments
Fence.FCStd
(110.28 KiB) Downloaded 15 times
User avatar
furti
Posts: 322
Joined: Mon Nov 27, 2017 5:27 pm

Re: Arch Fence

Postby furti » Sun May 05, 2019 6:03 pm

carlopav wrote:
Sun May 05, 2019 3:45 pm
there were three things that make it the process coumbersome
Yes this where the reasons why I created this tool :D plus the repeating steps when you want to model multiple fences.
carlopav wrote:
Sun May 05, 2019 3:45 pm
it's not possible to set if the fencepost is repeated every base object segment start/end or to set a general rule
This is not possible with the current implementation of the fence tool either. But I already thought about it. I think this might be fairly easy to implement in the future. Just another Parameter to the draft patharray function i hope :lol:
carlopav wrote:
Sun May 05, 2019 3:45 pm
since it seems your tool use other arch tools
Currently it does not depend on other arch tools. It only depends on the Draft functionality.
carlopav
Posts: 290
Joined: Mon Dec 31, 2018 1:49 pm

Re: Arch Fence

Postby carlopav » Sun May 05, 2019 7:13 pm

furti wrote:
Sun May 05, 2019 6:03 pm
This is not possible with the current implementation of the fence tool either. But I already thought about it. I think this might be fairly easy to implement in the future. Just another Parameter to the draft patharray function i hope :lol:
Cool!
User avatar
bitacovir
Posts: 710
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Arch Fence

Postby bitacovir » Sun May 05, 2019 9:30 pm

furti wrote:
Sun May 05, 2019 12:18 pm
Hope this might be of use for some of you
Any tool that facilitates or simplifies a process is welcome.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project
User avatar
furti
Posts: 322
Joined: Mon Nov 27, 2017 5:27 pm

Re: Arch Fence

Postby furti » Tue May 07, 2019 5:49 pm

I created a pull request for the Fence tool now https://github.com/FreeCAD/FreeCAD/pull/2151
I will create a page in the wiki for it when I have some time to do so.

The tool is not 100% perfect for now, but I think one can do some nice stuff with it already.

For example this path
path_extended.png
path_extended.png (11.35 KiB) Viewed 607 times
creates this fence
fence_arc.png
fence_arc.png (21.17 KiB) Viewed 607 times
carlopav
Posts: 290
Joined: Mon Dec 31, 2018 1:49 pm

Re: Arch Fence

Postby carlopav » Tue May 07, 2019 5:50 pm

Nice!
User avatar
Kunda1
Posts: 5759
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Fence

Postby Kunda1 » Wed May 08, 2019 12:25 am

make sure this gets in to the 0.19 Release notes as well :)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
yorik
Site Admin
Posts: 11547
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Fence

Postby yorik » Wed May 08, 2019 12:31 am

Just merged it.
This is cool! You know what it could be awesome for too? Curtain walls.
I've playing with that in revit recently, and it's quite a nice feature. You draw it like a wall, but in fact it's a window. It has a glass panel, and a top and bottom frame, and vertical mullions. Just like your fence, but with a glass panel inside...