Commit Graph

301 Commits

Author SHA1 Message Date
Yorik van Havre
b1a82114a8 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
134d94785f [BIM} Correct styling of DeleteIFCProperties window and add GroupBox 2025-03-10 13:49:57 +00:00
Furgo
e0389c308d BIM: Arch imports ArchSpace methods 2025-03-10 14:42:49 +01:00
Furgo
616eadd238 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
534c32975b [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
3f9ad28acf [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
bf1c057467 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
ea08ac2888 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
000de1c8f3 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
af96e50eea 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
98c26abc64 BIM: Do not change important pref options without user's consent - fixes #19163 2025-02-19 12:27:32 -03:00
Furgo
e045b59dbb Fix one last instance of NativeIFC 2025-02-18 13:22:23 +01:00
Furgo
0ea1bba8f8 Use correct case 2025-02-18 13:22:23 +01:00
Furgo
45f3f8de64 Improve legibility of NativeIFC in preferences 2025-02-18 13:22:23 +01:00
JULIEN MASNADA
056c83711a [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
5582cc87d4 [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
f81c15ee4e 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
96b3f830d4 [BIM] fix name 'self' is not defined error 2025-02-12 14:23:31 +01:00
Syres916
087928d1de [BIM] Fix translate error 2025-02-12 14:23:31 +01:00
Furgo
7135525346 BIM: fix error on double-clicking on non-IFC objects 2025-02-10 14:32:20 +01:00
Roy-043
c423a3a892 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
2b62e91460 BIM: ifc_viewproviders.py make context menus translatable 2025-02-10 14:28:26 +01:00
Yorik van Havre
7829cab969 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
46eb356d76 Rebase... 2025-02-07 14:43:17 +01:00
Chris Hennes
d4d74a4464 Merge pull request #19433 from tritao/gui-general-code-cleanups
Gui: General code cleanups
2025-02-06 11:33:44 -06:00
tritao
4260bd6fa4 Gui: Minor cleanups. 2025-02-05 22:13:07 +00:00
Furgo
b8071caa90 BIM: add support for array elements in BIM Schedule (#19219)
* BIM: add support for array elements in BIM Schedule

* BIM: reintroduce Arch.pruneIncluded

* BIM: support expanded arrays in BIM schedule

* BIM: support elements belonging to multiple arrays
2025-02-05 10:16:47 +01:00
Furgo
931db3dd59 BIM: fix unassigned variable reference 2025-02-05 09:40:41 +01:00
tritao
929a6a46fc BIM: Improve checking of IfcOpenShell imports in ifc_tools.py . 2025-02-05 09:23:08 +01:00
james
6a2e956481 fix non compressed read 2025-02-04 15:57:26 +01:00
james
80a55a8997 Add option to hide shape also hidden on double click 2025-02-04 15:57:26 +01:00
james
c0e8b1c505 upgrade threejs and encoding fix 2025-02-04 15:57:26 +01:00
Furgo
99db16c6c0 BIM: Connect "only visible" checkbox signal to corresponding slot (#19201)
* BIM: Classification dialog => connect only visible checkbox to signal, save its state

* BIM: rename classification dialog, do not use default name

* BIM: add icons to classification dropdown box
2025-02-04 14:52:26 +01:00
luzpaz
2acc5ffbea Remove superflous whitespace + trailing newlines 2025-01-29 07:59:05 -06:00
luzpaz
d982743b70 Fix typos
Found via codespell
2025-01-29 08:31:01 +01:00
marcuspollio
d72124f86a TechDraw: rename user-facing strings Arch to BIM 2025-01-27 17:58:45 +01:00
Paul Lee
27732fdf50 [ArchWall] Fix Regression Single-edge Wall w/ Multi-Material
Forum Discussion
- https://forum.freecad.org/viewtopic.php?t=93610&start=10#p806296

Github Issues
- https://github.com/FreeCAD/FreeCAD/issues/19147#issuecomment-2607946858
2025-01-27 14:29:04 +01:00
Julien Masnada
33816bd82b Improve decoration of walls, floors and ceilings. Improve creation of floor's slab 2025-01-27 14:25:51 +01:00
Roy-043
322b354fe8 Added is not None checks
Also added two local variables in BimLayers.py.
2025-01-22 10:41:11 +01:00
Roy-043
713db4bc5e Draft and BIM: Layer manager minor code improvements
The code should not add the LinePrintColor property. That should be done elsewhere.
2025-01-22 10:41:11 +01:00
JULIEN MASNADA
fd34f14fc3 SH3DImporter: Miscellaneous improvements (#19178)
* Fixed documentation and confusing variable name

* Prepare for joined wall fix

* Fixed invalid Part::Sweep on certain joined walls

* Calculate the Length in case of a curved segment

* Adding Arch::Space for each room, and group furnitures in these spaces

* Fixed baseboard import

* Add baseboard to Space and wall to Space.Boundaries

* Fixed space attribution when importing furniture as Arch::Equipment

* Adding site properties

* Allow creation of reference ground mesh

* Make sure get_space takes level into account

* Added sh3dCreateGroundMesh preferences

* Sensible ordering for import preferences

* Move furniture at least up to the floor upper facewq

* Avoid gap between floors. Adjusted wall height and furniture placement

* Preparing to allow model_rotation attribute in furniture

* Fixed tipo in model_rotation

* Make space upper face does exists

* Use Facebinder to paint walls. do not offset by floor thickness.

* Use Draft.make_facebinder()

* Workaround for issue #19172. Refreshing the list of Faces and removing the extra '?' character
2025-01-22 10:08:46 +01:00
Roy-043
7241f01c36 BIM: Fix BIM Schedule
Fixes #18934.
2025-01-22 10:07:35 +01:00
Yorik van Havre
518c3b4926 BIM: Make sure we have a default context when exporting to IFC 2025-01-19 14:32:03 -05:00
Roy-043
225241e673 Clean up
The recompute and the `try` structure are no longer required.
2025-01-16 11:53:55 +01:00
Roy-043
88a6eecdbb BIM: ArchWall use moveGeometry to move sketch point
The movePoint function is no longer available in V1.1.
2025-01-16 11:53:55 +01:00
Yorik van Havre
42f3af4d6a BIM: Fixed late global declaration - fixes #19049 2025-01-14 13:32:23 +01:00
tritao
e1d4743a5b 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
Yorik van Havre
0213b4fc6c Translations (#18923)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-13 21:30:30 -06:00
Tobias Frost
460da406f8 spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
Roy-043
a66a4a518c BIM: improve roof getSubVolume function
Fixes #19013.

* Check direction of plane axis with a tolerance.
* Check the produced solids. Notably check for a min. volume. Required for solids created from non-planar faces.
* Apply placement to created compound.
2025-01-13 10:07:13 +01:00