Commit Graph

27 Commits

Author SHA1 Message Date
Zbyněk Winkler
4d7f03bf63 Copy subvolume before changing its Placement
Placement property of a cached object was modified each time
component is recalculated.

Fixes #22162.
2025-07-07 15:35:26 +02:00
Roy-043
e6e1d6c54e BIM: fix visibility handling of objects hosted by additions 2025-07-07 14:46:29 +02:00
Roy-043
d8889c3ca4 BIM: fix setting of self.Type
Fixes #21364.

`self.Type` should be set in `__init__` and `loads`, and not in `onDocumentRestored`.

Additionally:
fixed mistake in `loads` in ifc_objects.py.
2025-06-30 11:05:41 -05:00
Roy-043
3ab2c0a02c Update ArchComponent.py 2025-06-23 14:26:05 +02:00
Furgo
1107f5f364 BIM: support curved vertical edges for area calculation 2025-05-23 10:14:40 +02:00
Furgo
7fa289cae4 BIM: refactor component area calculation into a helper class 2025-05-23 10:14:40 +02:00
Furgo
cc70fee4d7 BIM: correct planar check to avoid vertical/horizontal misclassification 2025-05-23 10:14:40 +02:00
Roy-043
8487ec7e1d BIM: Hidden objects used for variant Links should not be hosted
If a window is a variant Link there will be a hidden source object in the document. That hidden object shares properties with the visible Link object. The Hosts property may be one of them, yet the hidden object should never be hosted.

Forum topics:
https://forum.freecad.org/viewtopic.php?p=817743#p817743 (sample file)
https://forum.freecad.org/viewtopic.php?t=96115 (code discussion)

To test the code:
1. Open the mentioned sample file.
2. Change the Hosts property of  Window001 to Wall.
3. Recompute.
2025-04-25 15:07:35 +02:00
Florian Foinant-Willig
4a61a49456 BIM: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Roy-043
681d056073 BIM: HorizontalArea prop did not detect islands
Forum topic:
https://forum.freecad.org/viewtopic.php?t=95973

This was fixed by using `Part::FaceMakerCheese`.
2025-04-14 11:00:40 -05:00
marcuspollio
74e5f7c500 Merge branch 'main' into bim-cleanup-license 2025-04-11 15:13:45 +02:00
marcuspollio
637c21c18f BIM: use FreeCAD Dev Handbook license block 2025-04-05 17:55:51 +02:00
marcuspollio
fcd0be749c BIM: add FreeCAD notice in license 2025-04-04 18:15:43 +02:00
marcuspollio
d57339ee19 BIM: cleanup license and add SPDX 2025-04-04 17:46:58 +02:00
marcuspollio
ba67de4c05 BIM: cleanup imports at module root 2025-03-23 23:32:16 +01:00
paul
1f695e36f8 [ArchWindow] Improve SubVolume() HoleDepth deduction algorithm (#19774)
* [ArchWindow] Improve SubVolume() HoleDepth deduction algorithm

https://github.com/FreeCAD/FreeCAD/issues/19559
https://forum.freecad.org/viewtopic.php?t=92360
https://forum.freecad.org/viewtopic.php?p=812844#p812844

Current HoldeDepth deduction algorithm is too 'agressive' and may punch holes in adjacent wall segment.

With improved algorithm, ArchComponent pass the Window's host information to ArchWindow getSubVolume() to deduce HoleDepth taking into account of Wall's Width /getWidths for Wall Base is ArchSkech

TODO: For future development - More robust approach
With ArchSketch, on which wall segment an ArchObject is attached to is declared by user and saved.
The extrusion of each wall segment could be done per segment, and punch hole in the exact wall segment before fusing them all. No need to care about each wall segement thickness.

* [ArchWindow] Typo Lint reported

* [ArchWindow] Fix getSubFace(self) raise NotImplementedError

Github comment - https://github.com/FreeCAD/FreeCAD/pull/19774#discussion_r1972052310
2025-03-03 17:38:22 +01:00
tritao
13cc6a8d22 BIM: Only import TechDraw when its actually needed.
Allows FreeCAD BIM module to load without TechDraw module compiled.
2025-01-14 11:14:16 +01:00
luzpaz
7782fd6827 Trim lines ending with superfluous whitespace 2024-12-22 08:50:37 -05:00
Roy-043
e9e2df05a2 BIM: Improve onChanged Placement code
* Switched Component code to new Comp=True version of code.
* Made the Placement code in both files identical. This also solves that Rotating a BuildingPart was not propagated to children.
2024-12-09 09:30:08 +01:00
Yorik van Havre
8ba34888fd BIM: ensure the Base has the correct type (#17264)
* BIM: ensure the Base has the correct type - fixes #16409

* BIM: refactor according to chenne's comment
2024-12-02 10:44:11 -06:00
Chris Mayo
7f0d69a3bd BIM: Replace use of ArchWorkbench in ArchSelectionObserver 2024-11-25 18:00:52 +01:00
Yorik van Havre
73f3cd9f95 BIM: Only dusplay context menu items when in BIM WB - fixes #17043 2024-11-22 11:48:03 -05:00
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
Lukas Schattenhofer
8a07f71c28 BIM: ArchComponent Only counts planar surfaces as vertical areas 2024-06-20 14:03:23 +02:00
DeniseBryson
73c6415878 ArchSpace - Correct computed dimensions (floor area and perimeter length) (#14211)
* Arch: Improved ArchComponent.computeAreas function

All non vertical faces get projected now. Changed Part.Wire to DraftGeomUtils.findWires

* Arch: Removed Area property and add AreaCalculationType to Space object

The horizontal area and its perimeter are now calculated in two different ways. Eiter at the centre of mass or as a projection on the XY-plane. The results are filled in the filed horizontal area and perimeter in the Component section.

* BIM: Added property Area for Spaces again
2024-06-10 11:22:51 -05:00
Yorik van Havre
c520c49210 BIM: Renamed duplicate DialogIfcProperties - fixes #14090 (#14091) 2024-05-17 17:40:50 +02:00
Yorik van Havre
76e901861d BIM: Renamed Arch to BIM 2024-05-16 17:23:10 +02:00