[BUG] Cannot make blocks on a sketch based wall

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
steelman
Posts: 48
Joined: Wed Jul 05, 2017 9:25 am

[BUG] Cannot make blocks on a sketch based wall

Post by steelman »

Hi,

I fixed making blocks on a sketch based wall. Please take a look at patch #1 and #2.

The problem occurs because execute() expects self.basewires to contain a list of Wire, while fro sketch based walls getExtrusionData() sets self.basewires to a list of list of Edge.

EDIT:
There is #3 which to me seems the right solution.
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: [BUG] Cannot make blocks on a sketch based wall

Post by paullee »

steelman wrote: Mon Apr 19, 2021 11:10 am I fixed making blocks on a sketch based wall. Please take a look at patch #1 and #2.

The problem occurs because execute() expects self.basewires to contain a list of Wire, while fro sketch based walls getExtrusionData() sets self.basewires to a list of list of Edge.

EDIT:
There is #3 which to me seems the right solution.
Probably I had created this regression :oops:

I have a glance and probably # 1 with below may solve the problem. Other will create further regressions to create Wall based on (Complex) Sketch :)

Code: Select all

                            if isinstance(self.basewires[0],Part.Wire):
                                ...
                            elif isinstance(self.basewires[0],Part.Edge):
                                ...
Would have another look later :D
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [BUG] Cannot make blocks on a sketch based wall

Post by Roy_043 »

Hmm, I probably misunderstand, but I do not have an issue with the "Make Blocks" property of a sketch based wall.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24587 (Git)
Build type: Release
Branch: master
Hash: 1f62d4666102d8efd4d8f3ba58a1037456a3bcfb
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Dutch/Netherlands (nl_NL)
Attachments
sketch-based-wall-blocks.FCStd
(70.02 KiB) Downloaded 23 times
steelman
Posts: 48
Joined: Wed Jul 05, 2017 9:25 am

Re: [BUG] Cannot make blocks on a sketch based wall

Post by steelman »

Roy_043 wrote: Tue Apr 20, 2021 10:01 amHmm, I probably misunderstand, but I do not have an issue with the "Make Blocks" property of a sketch based wall.
I believe the problem occurs when the sketch is a closed loop. Have you tried that case?
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [BUG] Cannot make blocks on a sketch based wall

Post by Roy_043 »

Right, any sketch with more than one edge, even an open loop, will result in this bug.
Note that solution #3 does not work for open loops. I have not tested the other solutions

Also the problem is perhaps a bit more complex. See the attachments (created after implementing solution #3).
Attachments
sketch-based-wall-blocks-2.png
sketch-based-wall-blocks-2.png (11.96 KiB) Viewed 643 times
sketch-based-wall-blocks-2.FCStd
(106.92 KiB) Downloaded 20 times
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: [BUG] Cannot make blocks on a sketch based wall

Post by paullee »

Roy_043 wrote: Tue Apr 20, 2021 2:10 pm Right, any sketch with more than one edge, even an open loop, will result in this bug.
Note that solution #3 does not work for open loops. I have not tested the other solutions

Also the problem is perhaps a bit more complex. See the attachments (created after implementing solution #3).
You mean the corner piece is not correct? I thought it used to be like that?

EDIT
p.s.

I can create horizontal joint, but not vertical joint.

Test _ Arch Wall_ Make Block_ 04.FCStd
(34.77 KiB) Downloaded 20 times
Screenshot from 2021-04-21 02-18-08.png
Screenshot from 2021-04-21 02-18-08.png (275.4 KiB) Viewed 597 times
OS: Fedora 31 (Workstation Edition) (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23756 (Git)
Build type: Release
Branch: master
Hash: 9c6e9184930a52b165a0b7274e3a45d1006bfe67
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [BUG] Cannot make blocks on a sketch based wall

Post by Roy_043 »

"Make Blocks" was introduced in V0.18. And both that version and V0.19 have this bug. But there may have been a V0.19 pre version where it did not occur.

Edit: Note that this bug does not occur if the base of the wall is a Draft_Wire or a Draft_Rectangle.
Post Reply