FreeCAD: master aff5da53

Author Committer Branch Timestamp Parent
Roy-043 yorik master 2020-10-01 14:41:35 master 87a20153
Changeset Arch: ArchRoof bug fix

* Removed unnecessary use of FreeCAD.Vector. Renamed some functions and variables for clarity (in this description the new names are used). Reformatted the code. Moved imports to the top of the file. Updated the tooltips. Tweaked the title text "Parameters ...".
* Fixed the length of list properties bug.
* Flip direction did not work properly. The adopted solution is to reverse the edges the roof is based on.
* Added support for consecutive parallel edges.
* Added support for zero angle roof segments.
* The code now handles zero length runs without throwing an error.
* To handle triangular roofs with a zero length eave, "eave" (egde) has been turned into "eavePtLst" (list of points).
* The ridges of opposite parallel roof segments (if they do not use a relative profile) are recalculated if the sum of their runs is larger than the distance between their edges. The old version of the command would do this only if segments connected to gables and only properly if the corners between the edges of the segments and the gable were 90 degrees.
* Revised backGable and nextGable. They now call helperGable.
* Revised the 6 other back/next functions. They now call helperSloped. This also fixes several cases where cookie-cutter outlines (profilCurr["points"]) were wrong. In nextHigher, backHigher, nextLower and backLower a point was wrongly projected on the X-axis. In nextHigher the point on the higher ridge was wrongly included.
* Improved the cookie-cutter outlines for roof segments with lower overhangs and higher ridges in corners.
* Data from a relative profile is no longer used if it in turn references a relative profile.
* Changed the default idrel to -1 and changed calcMissingData to not process this value. This avoids confusion for users who are unaware of the relative profile feature.
* Introduced find_inters as a workaround for DraftGeomUtils.findIntersection. The latter finds intersections for parallel lines that share a point. Find_inters uses a modified version of getLineIntersections from DraftGeomUtils.findIntersection.
* Calling DraftVecUtils.removeDoubles later in the program flow as it does not compares the first and the last vector.
* Avoided the QTreeWidget scrolling to the top on every change, by not clearing it but updating existing items instead.
* Added self.tree.setRootIsDecorated(False). This gets rid of the 1st column's extra left margin. Removed item.setTextAlignment(0,QtCore.Qt.AlignLeft) as this did not work.
mod - src/Mod/Arch/ArchRoof.py Diff File