Better algorithm for creating pitched roof (probably)?
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:
Re: Better algorithm for creating pitched roof (probably)?
maybe we can use polygonal_surface_reconstruction in CGAL, but i am not a fan of c++:
https://doc.cgal.org/latest/Polygonal_s ... index.html
https://doc.cgal.org/latest/Polygonal_s ... index.html
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
I added an edges_height parameter for each edge of base roof:
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
There is a library in python named Pyskeleton that can produce (?) nonuniform angle roof:
It works with python2 and have some bugs. I changed the code to work with python3 and remove some of them, but it seems it didn't create the skeleton of the roof correctly:
below is the same polygon in FreeCAD with my WB:
Pyskeleton with different angle(speed), red edge that is half an other edges:
I think we can work on this library and correcting the problems. thanks
It works with python2 and have some bugs. I changed the code to work with python3 and remove some of them, but it seems it didn't create the skeleton of the roof correctly:
below is the same polygon in FreeCAD with my WB:
Pyskeleton with different angle(speed), red edge that is half an other edges:
I think we can work on this library and correcting the problems. thanks
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
Good job! keep working!
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
I implemented gable in roof. My goal is to user click on any edge of the sketch and then convert it to gable line, then I change the skeleton of the roof:
Before convert to Gable:
After convert to gable:
My question:
How can I save the edges that user select? I searched and found the object has "App::PropertyVectorList" but for edges I can't find appropriate property. I wanted to set it in a property, because the user can modify the base shape and the geometry of the sketch maybe change.
Before convert to Gable:
After convert to gable:
My question:
How can I save the edges that user select? I searched and found the object has "App::PropertyVectorList" but for edges I can't find appropriate property. I wanted to set it in a property, because the user can modify the base shape and the geometry of the sketch maybe change.
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
Until that time, I set it in "App::PropertyIntegerList" property with 0 and 1, 1 denote that the edge is Gable:
- ebrahim raeyat
- Posts: 625
- Joined: Sun Sep 09, 2018 7:00 pm
- Location: Iran
- Contact:
Re: Better algorithm for creating pitched roof (probably)?
I added angles property to the roof object. Now edges with 90-degree angle takes as gable and negative angle denote for negative slope:
Re: Better algorithm for creating pitched roof (probably)?
An aside, just wanted to make you aware of https://github.com/prochitecture/bpypolyskelebrahim raeyat wrote: ping
Context: https://twitter.com/BlenderBIM/status/1 ... 2951173120
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
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
Re: Better algorithm for creating pitched roof (probably)?
It was already mentioned in the thread...Kunda1 wrote: ↑Tue Jan 12, 2021 12:30 pm
An aside, just wanted to make you aware of https://github.com/prochitecture/bpypolyskel
Context: https://twitter.com/BlenderBIM/status/1 ... 2951173120
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)
Canal Youtube Grupo Telegram de FreeCAD Español
My personal web site
My GitHub repository
Mini Airflow Tunnel Project