Connect two face and fill empty espace
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Connect two face and fill empty espace
Hello everyone, I wonder how I can connect two or more faces at one point and then fill in the remaining space. I think of this process:
Extend all faces enough to meet each other. Then calculate the common part of all the faces. Then add the common part anyway and create a new face from the old face and the common part. Is there an easier way?
Extend all faces enough to meet each other. Then calculate the common part of all the faces. Then add the common part anyway and create a new face from the old face and the common part. Is there an easier way?
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Connect two face and fill empty espace
I did it with my idea:
but I am wonder if there is an easier solution.
although it has bug in some cases, in below picture, there are 3 rectangle that I extended those and then obtain the common part and add it to main shape of foundation. one solution is to cut each rectangle with common shape, But I want to know if there is an another solution.
but I am wonder if there is an easier solution.
although it has bug in some cases, in below picture, there are 3 rectangle that I extended those and then obtain the common part and add it to main shape of foundation. one solution is to cut each rectangle with common shape, But I want to know if there is an another solution.
- ragohix769
- Posts: 568
- Joined: Sat Jul 18, 2020 7:04 am
- Location: Rome - Italy
Re: Connect two face and fill empty espace
Great idea.
I think the main thing is working in 2D in the process to obtain faces in holes between edges/objects making some 2d offset and then boolean intersection to create new faces. The problem is, as I see too in your example, some offset can create problems, and this process cannot be automated easily.
I think the main thing is working in 2D in the process to obtain faces in holes between edges/objects making some 2d offset and then boolean intersection to create new faces. The problem is, as I see too in your example, some offset can create problems, and this process cannot be automated easily.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same
Re: Connect two face and fill empty espace
Can you elaborate the algorithm please ?
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Connect two face and fill empty espace
step 1 - I have some rectangle that meet each other in one point (it is not matter here)
step 2- I extend each rectangle with significant length (for example 3 meter or higher)
step 3- I obtain common part of face and add it to the original rectangles (in step 1)
but there is situation that this algorithm did not work:
one solution is in step 3, I obtain common part and other part that in original faces and then add common part and new faces for each rectangle, but i want to know is there an easier solution? thanks.
Re: Connect two face and fill empty espace
Not a direct answer to problem :
ArchWall build wall base on wire. It use DraftGeomUtils.offsetWire to offset each segment of wire, and connect each offset segment to form the baseplate, similar to effect you are looking for.
Check getExtrusionData(self,obj) in https://github.com/FreeCAD/FreeCAD/blob ... rchWall.py
ArchWall build wall base on wire. It use DraftGeomUtils.offsetWire to offset each segment of wire, and connect each offset segment to form the baseplate, similar to effect you are looking for.
Check getExtrusionData(self,obj) in https://github.com/FreeCAD/FreeCAD/blob ... rchWall.py
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Connect two face and fill empty espace
Thanks paullee. I also checked the wall Gui, but i can't find the tools that connect two walls. In BIM WB, I saw the corner join that gives only two walls and still in my situation, did not work.
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Re: Connect two face and fill empty espace
I mean you can check the algorithm in ArchWall particularly the DraftGeomUtils.offsetWire.
In fact, just make a sketch of your 'beam' layout and click ArchWall, just adjust the Height and Width to imitate the beam layout.
In fact, just make a sketch of your 'beam' layout and click ArchWall, just adjust the Height and Width to imitate the beam layout.
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Connect two face and fill empty espace
Thanks paul lee. In my case, If I align the walls to left (or right), the problem occurs, but thanks to you. I will study the code and examine my another idea and then will tell you.
Re: Connect two face and fill empty espace
You are welcome. In fact, I want to make a remark in last post but it turn out disappeared - ' it works in most cases but sometime it does not work as ideal". That's some cases I want to attack when there is more time later, or someone more capable can resolve it ? Good luck
p.s. The test you did somehow tell you how the ArchWall underlying algorithm works, and fails
p.s. The test you did somehow tell you how the ArchWall underlying algorithm works, and fails