Commit Graph

326 Commits

Author SHA1 Message Date
Yorik van Havre
daf8a4f736 Update src/Mod/BIM/bimcommands/BimMaterial.py
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-03-25 20:02:11 -05:00
Yorik van Havre
47d6ad847a BIM: Fixed material dialog's merge duplicates button - fixes #20124 2025-03-25 20:02:11 -05:00
Furgo
5b882756a7 BIM: add missing import 2025-03-25 09:46:54 +01:00
Furgo
ddc7035fbc BIM: also install test files 2025-03-25 09:46:54 +01:00
Furgo
518e2a8346 BIM: move more functions to their own modules, standardize logging 2025-03-25 09:46:54 +01:00
Furgo
aa1a5c135b BIM: move tests to own module, separate App/Gui tests, add TestArchBase 2025-03-25 09:46:54 +01:00
Furgo
40e0c60338 BIM: move Arch wall tests to their own module 2025-03-25 09:46:54 +01:00
Yorik van Havre
c1614001a0 BIM: Fixed project manager's save/restore - fixes #20288 2025-03-22 11:51:01 -05:00
Roy-043
95aa28cc30 BIM: Generate curtain wall panels in spanned grid openings
Fixes #20235.
2025-03-20 15:04:53 +01:00
Tomas Polak
ea247c1540 BIM_ProjectManager typo fix 2025-03-20 12:25:09 +01:00
Roy-043
fc4aa06f96 BIM: HumanFigure.brep: fix typo in create_qrc.py
Fixes #20289

My bad. Because of this typo the brep file was not included in Arch_rc.py.
2025-03-20 12:07:19 +01:00
Tomas Polak
895fe5ea1c BIM_Classification dialgue - change tooltips and text to better represent their functions (#20274)
* Change Ifc Classification dialgue tooltips and text

* Update src/Mod/BIM/bimcommands/BimClassification.py

Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>

---------

Co-authored-by: Tomas Polak <semhustej@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>
2025-03-20 12:06:20 +01:00
Furgo
bf55cdaecd BIM: move add/removeSpace boundaries implementation to Arch module (#20222)
* BIM: move add/removeSpaceBoundaries definitions to the Arch module

* BIM: make add/removeSpaceBoundaries implementation consistent

* BIM: update and expand docstrings
2025-03-20 11:47:03 +01:00
Furgo
a3fd9423ec BIM: add unit test for addSpaceBoundaries (#20146)
* BIM: add unit test for addSpaceBoundaries

* BIM: remove test dependency on FreeCADGui
2025-03-20 11:44:56 +01:00
Paul Lee
356d89f1bb [ArchStairs] ArchSketch Support and Refactoring Phase 1
FC Forum Discussion:-
https://forum.freecad.org/viewtopic.php?p=814274#p814274

ArchSketch Support, PropertySet, and Refactoring to enable more complex Stairs shape.
2025-03-20 10:24:03 +01:00
Furgo
47cec43aae BIM: allow boundaries to be defined from a single object (e.g. wall) (#20158)
* BIM: Add test for space from single wall boundaries

* BIM: Arch_Space, enable creation of spaces from single objects with
boundaries

* BIM: update and expand docstring
2025-03-19 10:45:26 +01:00
Furgo
c47507bad0 BIM: include selected objects when creating a level 2025-03-17 18:12:36 +01:00
Chris Hennes
9765a6cb69 Merge pull request #20140 from yorikvanhavre/bim-classification-fix
BIM: Fixed classification dialog's Cancel button
2025-03-17 00:01:47 -05:00
Chris Hennes
c6012c514a Merge pull request #20141 from semhustej/change_IfcElements_window_size
Change IfcElements window width
2025-03-16 23:58:40 -05:00
Chris Hennes
1ad5bc1284 Merge pull request #20207 from yorikvanhavre/bim-space-text
BIM: Fixed space text display
2025-03-16 23:57:19 -05:00
Yorik van Havre
d3aaa4cfa6 BIM: Fixed space text display - fixes #20126 2025-03-15 14:35:17 +01:00
Luz Paz
17102251e5 Fix various typos 2025-03-14 12:37:12 -04:00
Tomas Polak
5c3dbe7ed0 Change IfcElements window width 2025-03-12 11:12:55 +01:00
Yorik van Havre
c9e95bdce8 BIM: Fixed classification dialog's Cancel button - fixes #19857 2025-03-12 10:42:14 +01:00
Syres916
f4468f21f2 [BIM] Material dialog - fix the minimum width of four buttons in new group box 2025-03-12 06:05:08 +00:00
Yorik van Havre
a3d862839f Merge pull request #20109 from Syres916/IFCPropertiesWindow_Fix
[BIM] Correct styling of DeleteIFCProperties button and add GroupBox for the two lower comboboxes and the button
2025-03-11 12:48:45 +00:00
Syres916
ef0252f935 [BIM} Correct styling of DeleteIFCProperties window and add GroupBox 2025-03-10 13:49:57 +00:00
Furgo
fb3c4d90c9 BIM: Arch imports ArchSpace methods 2025-03-10 14:42:49 +01:00
Furgo
fc35a58346 BIM: make ifcopenshell version upgrade more robust (#19823)
* BIM: make ifcopenshell version detection and comparison more robust

* Add reference to FreeCAD bug

* Use create_pip_call for compatibility with different platforms/packages

* Demote workaround logging category for quieter output

* Correct ifcopenshell's actual version in the workaround as well

* Allow upgrading packages

* Provide more verbose output if there is an error with the pip call

* Really print the exception message

* Fix catch-all exception syntax

* Remove ifcopenshell version workaround

Weekly build 40444 containing the fix (https://github.com/FreeCAD/FreeCAD/pull/19861) has been released at https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds
2025-03-04 11:37:22 +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
paul
fcbbe9535f [BimShape2DView] Bug-Fix : Shape2DCut Not Working (#19316)
* [BimShape2DView]  Bug-Fix : Shape2DCut Not Working

GitHub Issue - https://github.com/FreeCAD/FreeCAD/issues/18947

* Update src/Mod/BIM/bimcommands/BimShape2DView.py

Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>

---------

Co-authored-by: Yorik van Havre <yorik.vanhavre@gmail.com>
2025-02-28 10:08:56 +01:00
mosfet80
9164f82740 Clean ifc_tools.py (#19395)
* Clean ifc_tools.py

Removed dead code

Auto stash before rebase of "patch-47" onto "main"

* Update ifc_tools.py

revert wrong remove
2025-02-28 10:07:53 +01:00
Gaël Écorchard
71dc06cf90 Fix error on missing attribute IfcProject.Declares (#19398)
* [BIM] Use relative imports

Also fix other issues with imports.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Avoid two bare except

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Replace not ... in with ... not in

Also fix whitespace between functions.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Fix error with missing IFC2X3.IfcProject.Declares

Fix `entity instance of type 'IFC2X3.IfcProject' has no attribute 'Declares'`.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

---------

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
2025-02-27 13:58:13 +01:00
Roy-043
9d700d9826 BIM: fix ArchAxis index errors
Fixes #19577

Apparently the ViewObject can be updated before the Shape of the objects has been changed. To catch this the number of edges is checked in the `onChanged` method of the ViewObject.

There was an additional index error if the Limit property was not zero.
2025-02-27 11:15:26 +01:00
Roy-043
5087c1949f Draft: improve upgrade and downgrade
Fixes #16333.
Follow-up of #19487.

* The functions have been made nesting-aware. New objects are put in the same container (Group, Part) as the original objects. As a consequence for some operations the original objects must be in the same container as well.
* New objects receive the visual properties of the original objects. This is not always perfect. For example when upgrading to multiple wires there is currently no check to see which edge came from which orginal object. The fact that the `format_object` function is called from the Draft `make*` functions is problematic here. If construction mode is active `make_wire` puts new objects in the construction group and we don't always want that. This has been solved with a workaround (see 'cludge' in the code).
* The 'de-parametrize' downgrade option has also been enabled for features of PartDesign Bodies that have the `Profile` property.
* Before deleting objects there is a check to see if they are in use elsewhere (`InList` check). Base objects of arrays are not deleted if they are visible. If a PartDesign Body, or an object inside a Body is selected, the whole Body is deleted.
* The force options did not work for functions that take a single object.
* The `getShapeFromMesh` function in ArchCommands.py could return a solid that was not closed. A check for that has been added.
2025-02-19 18:06:12 +01:00
Yorik van Havre
463c7f72a1 BIM: Do not change important pref options without user's consent - fixes #19163 2025-02-19 12:27:32 -03:00
Furgo
e7763236bc Fix one last instance of NativeIFC 2025-02-18 13:22:23 +01:00
Furgo
6d48d6fe39 Use correct case 2025-02-18 13:22:23 +01:00
Furgo
aad16b2391 Improve legibility of NativeIFC in preferences 2025-02-18 13:22:23 +01:00
JULIEN MASNADA
065c5cff22 [BIM] SH3DImporter: miscellaneous improvments (#19335)
* Fix duplicated groups

* Fixed windows spaning several floors

* Fixing doorOrWindow positioning. Allowing to DEBUG_GEOMETRY

* Fixed default color for floor and ground

* Fixed some windows positioning issue

* Fixed invalid modification of wall array. Changed default window type to allow opening

* fixed some import failures. Added some new windows

* Fixed some more edge cases

* Use doc transaction. Fixed import of room based on self-intersecting polygon.

* Added default furniture color. Fixed wall reference face to fix slab creation

* Replace Debug setting by DebugGeometry

* Fixed corner cases when importing Door & Furniitures

* Fix emissive color and shininess

* Remove external package dependency

* Fixed furniture placement and transformation

* Make sure lights are properly imported

* Fixed duplicated camera and ground when merging
2025-02-18 11:45:40 +01:00
paul
56b180f3b1 [ArchSketchObject / Window] Links of Window to support Individual Hosts (#19378)
* [ArchSketchObject / Window]  Links of Window to support Individual Hosts

Currently, Links of Window's Hosts property (and in generall all properties other than e.g. Placement) is shared with its Linked Window object, i.e. all Windows Links instances can only has a common Host(s) which is not flexible for the purpose of Links.

AND, at the same time, Links in linked document suffer from the 'scope' of the original Linked Window, which is in the external Document.

This commit adds feature to support:
  1/ each Links instance of Windows has their own individual setting of Hosts, and
  2/ it see the 'scope' of the Links in its document (rather than the Linked Window in the external document)

FreeCAD Forum:
- https://forum.freecad.org/viewtopic.php?p=808569#p808569

FreeCAD GitHub:
- https://github.com/FreeCAD/FreeCAD/issues/19361

* [ArchSketchObject]  Fix indentation
2025-02-14 13:46:44 +01:00
Furgo
3623f8baf5 BIM: fix ability to cancel file dialog on BIM_TDPage command (#19518)
* BIM: use tuple return value from QFileDialog.getOpenFileName

Fixes: https://github.com/FreeCAD/FreeCAD/issues/19466

* BIM: remove filename assignment from tuple
2025-02-13 17:45:27 +01:00
Syres916
d044d3da84 [BIM] fix name 'self' is not defined error 2025-02-12 14:23:31 +01:00
Syres916
d92bb8611e [BIM] Fix translate error 2025-02-12 14:23:31 +01:00
Furgo
dc422e1f35 BIM: fix error on double-clicking on non-IFC objects 2025-02-10 14:32:20 +01:00
Roy-043
340f446654 BIM: Panel does not require a Base
https://forum.freecad.org/viewtopic.php?t=94657
2025-02-10 14:28:26 +01:00
Roy-043
4fb0425375 BIM: ifc_viewproviders.py make context menus translatable 2025-02-10 14:28:26 +01:00
Yorik van Havre
e38ead30e9 Bim project manager upgrade (#17909)
* BIM: NativeIFC 2D support - basic import/export + linework annotations

* BIM: NativeIFC 2D support - texts

* BIM: NativeIFC 2D support - dimensions

* BIM: NativeIFC 2D support - optimized export of FreeCAD dimensions

* BIM: NativeIFC 2D support - section planes

* BIM: NativeIFC 2D support - misc fixes cf comment #2383181661

* BIM: NativeIFC 2D support - axes

* BIM: Project manager upgrade

* BIM: Fixed rebase leftover
2025-02-10 10:40:46 +01:00
Roy-043
235f8de27f Rebase... 2025-02-07 14:43:17 +01:00
Chris Hennes
b051185ae0 Merge pull request #19433 from tritao/gui-general-code-cleanups
Gui: General code cleanups
2025-02-06 11:33:44 -06:00