Arch Fence

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
engdham
Posts: 47
Joined: Sun Jul 15, 2018 2:08 am
Location: Rondonópolis - MT - Brazil
Contact:

Re: Arch Fence

Post by engdham »

I'd love to test it.

Is there any appimage or something like that with this tool enabled, or I'll have to build from source? (I have never done it :? )
User avatar
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: Arch Fence

Post by furti »

If you install a 0.19 development version the fence tool should be available.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Fence

Post by Kunda1 »

furti wrote: Thu Jul 25, 2019 3:52 pm
@furti heads-up:
https://lgtm.com/projects/g/FreeCAD/Fre ... c3c40525:1
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
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch Fence

Post by vocx »

Kunda1 wrote: Tue Dec 17, 2019 3:52 am @furti heads-up:
https://lgtm.com/projects/g/FreeCAD/Fre ... c3c40525:1

Code: Select all

        for i in range(8):
            parts.append(Part.makeBox(20, 20, 1000 - 60,
                                      FreeCAD.Vector((2000 / 9 * (i + 1)) - 10, 15, 30)))
LGTM wrote:Result of division may be truncated as its left and right arguments may both be integers.
This is a warning about Python 2, because in Python 2 the division operator truncates the decimal part if both quantities are integers. That is, 2000/9 = 222.

In Python 3 it works as expected, 2000/9 = 222.222.

To solve this for Python 2, at least one value must be a float, 2000.0/9

See pull request #2788.
Last edited by vocx on Tue Dec 17, 2019 11:54 pm, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Fence

Post by Kunda1 »

Thanks @vocx
You rock ;)
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
furti
Posts: 344
Joined: Mon Nov 27, 2017 5:27 pm

Re: Arch Fence

Post by furti »

vocx wrote: Tue Dec 17, 2019 7:59 pm See pull request #2788.
Thanks for the quick fix :) I added a comment to your pull request.

For me there are two questions:
1. As python 2 is end of life and this is not a security relevant thing, should such warnings still be fixes?
2. For this actzal warning it might be better to use "from __future__ import division" because there are more divisions in the code that might fail.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch Fence

Post by vocx »

furti wrote: Wed Dec 18, 2019 6:01 am ... should such warnings still be fixes?
2. For this actzal warning it might be better to use "from __future__ import division" because there are more divisions in the code that might fail.
I think adding from __future__ is ugly.

But your first point is valid: this isn't a problem in Python 3 only in Python 2. We shouldn't care any more about Python 2.

Kunda, is there a way you can set LGTM to check only Python 3 errors? This would be better.

My fix just has the intention to suppress the warning. And it's a quick fix that doesn't really impact the code, whether you use Python 2 or 3, so it's the simplest solution, I feel.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Fence

Post by Kunda1 »

vocx wrote: Wed Dec 18, 2019 4:53 pm Kunda, is there a way you can set LGTM to check only Python 3 errors? This would be better.
Did some cursory searching and wasn't successful. I'm asking for consensus and help in:
https://forum.freecadweb.org/viewtopic. ... 59#p354959
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
deramirezd
Posts: 1
Joined: Mon Mar 22, 2021 5:12 pm

Re: Arch Fence

Post by deramirezd »

Hi furti, could you please help me on understanding how how to use the fence tool? Maybe it is clear but I can't see it, I create a line and afterwards, when trying to select the fence toll, I get the message "Select the section, post and path in exactly that order to build a fence", does it mean, that I have to use the Path workbench and convert the line firstly? And if so, how? Sorry, I am quite new in the use of FreeCAD and probably the question is too simple, but I find no answer in any place how to do it. Thanks in advance!
jpolonia
Posts: 4
Joined: Tue Nov 29, 2022 3:05 pm

Re: Arch Fence

Post by jpolonia »

I am new using this program.

But I have tried to create the fence, but I can't find it.

Could you please explain the process to create one?

Thanks for your help.

JPoland.
Post Reply