Arch/Bim Wall Bug?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 81
- Joined: Wed Feb 03, 2021 8:07 am
Re: Arch/Bim Wall Bug?
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/Australia (en_AU)
When you offset a wall(s) that has multiple directions, the left ctr right alignment becomes arduous & the risk of constraint breaking in-turn losing parametric function is increased. 'Ask me how I know this'.
Continuing with the ctr alignment using the Grid in sketch 01, and walls (Ctr Align) in Sketch 02. I approached using this method to indeed overcome TPN. And keep the this version of the drawing to 19.3 alone no backwards compatibility issues insured.
All was going seemingly ok until I got to my 1 & only void. see video
https://youtu.be/bOHDnWDMDXY
As I have said previously the definition of a bug is doing something an alternative way when it could be done simpler or the right way!
(I don't say that with python knowledge I have no idea the amount of code past -I am certainly not trying to be disrespectful. But I do say that with knowledge of CAD and how many God dam packages are out there & truly wish for FC to set & be the primary standard)
File included extra strange Bug
https://drive.google.com/file/d/1MdUoCY ... sp=sharing
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/Australia (en_AU)
When you offset a wall(s) that has multiple directions, the left ctr right alignment becomes arduous & the risk of constraint breaking in-turn losing parametric function is increased. 'Ask me how I know this'.
Continuing with the ctr alignment using the Grid in sketch 01, and walls (Ctr Align) in Sketch 02. I approached using this method to indeed overcome TPN. And keep the this version of the drawing to 19.3 alone no backwards compatibility issues insured.
All was going seemingly ok until I got to my 1 & only void. see video
https://youtu.be/bOHDnWDMDXY
As I have said previously the definition of a bug is doing something an alternative way when it could be done simpler or the right way!
(I don't say that with python knowledge I have no idea the amount of code past -I am certainly not trying to be disrespectful. But I do say that with knowledge of CAD and how many God dam packages are out there & truly wish for FC to set & be the primary standard)
File included extra strange Bug
https://drive.google.com/file/d/1MdUoCY ... sp=sharing
Re: Arch/Bim Wall Bug?
This is definitely a bugOutsourced wrote: ↑Fri Mar 18, 2022 4:41 am All was going seemingly ok until I got to my 1 & only void. see video
https://youtu.be/bOHDnWDMDXY
As I have said previously the definition of a bug is doing something an alternative way when it could be done simpler or the right way!
(I don't say that with python knowledge I have no idea the amount of code past -I am certainly not trying to be disrespectful. But I do say that with knowledge of CAD and how many God dam packages are out there & truly wish for FC to set & be the primary standard)
File included extra strange Bug
https://drive.google.com/file/d/1MdUoCY ... sp=sharing
And it seems it all happens with there is a 'self-intersecting wire' - when I setback the segment of wall by 55mm, everything seems fine.
Hope there is someone or when there is a gap this bug can be fixed
Re: Arch/Bim Wall Bug?
A fix that can work is to calculate the base face of a multi-segment wall per segment and then merge those faces. The solution seems to work for the examples presented here.
In the attached ZIP:
ArchWall.py (...\Mod\Arch\ArchWall.py)
faces.py (...\Mod\Draft\draftgeoutils\faces.py)
The bind function in faces.py was updated.
- Attachments
-
- ArchWall.zip
- (20.47 KiB) Downloaded 38 times
Re: Arch/Bim Wall Bug?
Great ! Indeed, seems in earlier version something similar was made but it fails in some version later. Recently I drop into cases I find faces has opposite normal do not merge. But I do not have time to have further investigation if the latter was the problem.Roy_043 wrote: ↑Sat Mar 19, 2022 9:50 am A fix that can work is to calculate the base face of a multi-segment wall per segment and then merge those faces. The solution seems to work for the examples presented here.
In the attached ZIP:
ArchWall.py (...\Mod\Arch\ArchWall.py)
faces.py (...\Mod\Draft\draftgeoutils\faces.py)
The bind function in faces.py was updated.
Would study your fix and learn more
Re: Arch/Bim Wall Bug?
That is clever to zip those edges and create face for each pair of them
Can you enlighten why after all the faces have been fused needs 'concatenate' ? I can't figure this out, thanks
Code: Select all
for (edge1, edge2) in zip(w1.Edges, w2.Edges):
face = create_face(edge1, edge2)
if face is None:
return None
face_list.append(face)
return concatenate(face_list[0].fuse(face_list[1:]))
Re: Arch/Bim Wall Bug?
Would remove splitter work ?
Re: Arch/Bim Wall Bug?
concatenate is used in upgrade.py, and that is why I selected it, but removeSplitter also works here. See the attached, improved, faces.py file. For single segment closed wall traces using fix is still required. But I think that that should happen in the bind function.
- Attachments
-
- faces.py
- (9.38 KiB) Downloaded 36 times
Re: Arch/Bim Wall Bug?
Thanks taking time checking this problem and provide solutions, not having time to actually tested the actual result though
Thanks.
I have checked the codes and still no understand what you are referring to, can you slightly elaborate.
Thanks.
Re: Arch/Bim Wall Bug?
In my previous proposal (see the ZIP file) I had this line commented out in ArchWall.py:
But the handling of closed wires in the bind function in the accompanying faces.py file remained unchanged. And for closed wires fix was therefore still required. See below.
In the new version of the bind function, closed wires can also optionally be handled per segment. Only if per_segment=False, or if they have a single segment, is the old code used.
This line:
face = Part.Face([w1, w2])
Always produces a faulty face (actually it produces a shape).
And this is required:
face.fix(0.1, 0, 1)
IMO fix should be called in the bind function, not in ArchWall.py.
Code: Select all
sh.fix(0.1,0,1) # fixes self-intersecting wires
In the new version of the bind function, closed wires can also optionally be handled per segment. Only if per_segment=False, or if they have a single segment, is the old code used.
This line:
face = Part.Face([w1, w2])
Always produces a faulty face (actually it produces a shape).
And this is required:
face.fix(0.1, 0, 1)
IMO fix should be called in the bind function, not in ArchWall.py.