[SOLVED and PR Merged] Ticket #4400 - Arch wall created from wire, fails.

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
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

[SOLVED and PR Merged] Ticket #4400 - Arch wall created from wire, fails.

Post by hhassey »

System:
OS: Debian GNU/Linux 10 (buster) (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21823 (Git)
Build type: Release
Branch: master
Hash: 25a4cf67d53bb270f6ab7c8c5f9ef5601c194e76
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Steps to Reproduce:
Create a wire with the shown geometry, select wire press arch wall. The wall will be created missing two sides and with some cutoffs.
Screenshot from 2020-07-01 13-30-59.png
Screenshot from 2020-07-01 13-30-59.png (320.65 KiB) Viewed 1803 times
Attachments
Fail_Example.FCStd
(11.81 KiB) Downloaded 42 times
Last edited by hhassey on Mon Jul 20, 2020 4:18 pm, edited 3 times in total.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch wall created from wire, fails.

Post by vocx »

There were some changes to Arch Wall recently to improve the use of walls with Sketches, git commit 81dd47b0393.

However, I'm afraid the changes were only tested with Sketches and not with regular Draft Wires. Try reverting the changes and see if that fixes the problem.

The Wall works well if the Wires are converted to Sketches with Draft_Draft2Sketch.
Last edited by vocx on Mon Jul 06, 2020 7:09 am, 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.
paullee
Veteran
Posts: 5122
Joined: Wed May 04, 2016 3:58 pm

Re: Arch wall created from wire, fails.

Post by paullee »

Not sure where exactly is the problem atm, please file in Mantis tracker and assign to me, thanks.

In the meantime, like @vocx suggests, convert to Sketch to make it works.
paullee
Veteran
Posts: 5122
Joined: Wed May 04, 2016 3:58 pm

Re: Arch wall created from wire, fails.

Post by paullee »

hhassey wrote: Wed Jul 01, 2020 8:36 pm Create a wire with the shown geometry, select wire press arch wall. The wall will be created missing two sides and with some cutoffs.
Mind to test below fix ?

Seem Part.SortEdges return edges/vertexes in expected order but direction reversed for DWire as input ?

Replace below ArchWall.py in the Arch module.
ArchWall.py
(77.53 KiB) Downloaded 36 times

Code: Select all

                        self.basewires = obj.Base.Shape.Wires

                        # Found case that after sorting below, direction of 
                        # edges sorted are not as 'expected' thus resulted in
                        # bug - e.g. a Dwire with edges/vertexes in clockwise 
                        # order, 1st vertex is Forward as expected.  After 
                        # sorting below, edges sorted still in clockwise order 
                        # - no problem, vertexes still in clocwise order - no 
                        # problem, but 1st vertex of each edge become Reverse 
                        # rather than Forward.
                        # See FC discussion - 
                        # https://forum.freecadweb.org/viewtopic.php?f=23&t=48275&p=413745#p413745

                        #self.basewires = []
                        #for cluster in Part.getSortedClusters(obj.Base.Shape.Edges):
                        #    for c in Part.sortEdges(cluster):
                        #        self.basewires.append(Part.Wire(c))

Screenshot from 2020-07-04 07-26-14.png
Screenshot from 2020-07-04 07-26-14.png (250.32 KiB) Viewed 1687 times
Screenshot from 2020-07-04 07-27-23.png
Screenshot from 2020-07-04 07-27-23.png (249.04 KiB) Viewed 1687 times
Attachments
Fail_Example_ finding bug.FCStd
(34.86 KiB) Downloaded 37 times
mikeprice99
Posts: 100
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: Arch wall created from wire, fails.

Post by mikeprice99 »

FWIW - tested as per instructions. I was able to reproduce the error.
After updating to the new ArchWall.py script, error was fixed.

Good job!

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21832 (Git)
Build type: Release
Branch: master
Hash: 31b1ad874fb4750b6f6f25b494246f6ac7e61cde
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
paullee
Veteran
Posts: 5122
Joined: Wed May 04, 2016 3:58 pm

Re: Arch wall created from wire, fails.

Post by paullee »

mikeprice99 wrote: Sat Jul 04, 2020 7:48 am FWIW - tested as per instructions. I was able to reproduce the error.
After updating to the new ArchWall.py script, error was fixed.
Thanks for testing !

Would you mind to create a bug report ?

I do not use DWire in my models so there are not enough tests. Hope more peoples use DWire as Base of Wall can test before I create a PR :)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch wall created from wire, fails.

Post by vocx »

paullee wrote: Sat Jul 04, 2020 9:14 am ...
I do not use DWire in my models so there are not enough tests...
Then start doing it. You are breaking the previous code because you don't test enough. Stop doing that. The Arch workbench is based on the Draft Workbench, so you need to check that Draft workbench features work before you make changes. Stop being so self-centered, and realize there is more things that you need to consider before making big changes to the code.
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
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Arch wall created from wire, fails.

Post by hhassey »

I have reported the issue on Mantis as issue #4400

I did not know how to assign it to @Paullee.

Thanks for the hard work! FreeCAD is Amazing!
Last edited by Kunda1 on Mon Jul 06, 2020 11:15 am, edited 1 time in total.
Reason: added [bug] bbcode
paullee
Veteran
Posts: 5122
Joined: Wed May 04, 2016 3:58 pm

Re: Arch wall created from wire, fails.

Post by paullee »

hhassey wrote: Mon Jul 06, 2020 5:44 am I have reported the issue on Mantis as issue #4400

I did not know how to assign it to @Paullee.

Thanks for the hard work! FreeCAD is Amazing!
Thanks, I find I can't assign it to myself either ... ? :)

@Kunda any idea ?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4400 - Arch wall created from wire, fails.

Post by Kunda1 »

Done :wink:
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
Post Reply