Commit Graph

91 Commits

Author SHA1 Message Date
tetektoza
2c82bfa150 BIM: Add an option to preload IFC types during document opening (#21450)
* BIM: Add an option to preload IFC types during document opening

Currently, IFC types are only possible to be loaded if user double
clicks an IFC object, and this has be done for optimization reasons.

But user can also want to preload IFC types, so this patch adds an
option to the dialog and Properties dialog to do just that.

* BIM: Remove cyclic import

---------

Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2025-07-07 16:06:43 +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
2c6663d766 BIM: fix filtering out level issue (#22059)
* Update ifc_status.py

* Update ifc_tools.py
2025-06-23 14:14:51 +02:00
Roy-043
b11ebe6e40 BIM: fix index error in ifc_viewproviders.py
Fixes #21912
2025-06-23 14:10:26 +02:00
tetektoza
e8ae780ae5 BIM: Allow user to skip dialog during type conversion
As the title says - this adds a new option to the dialog to `never ask
again` as well user can customize both settings through preferences.
2025-06-17 09:35:38 +02:00
tetektoza
0817510181 BIM: Fix IFC type assignment not being saved to file
As the title says, this is simple fix - basically right now anytime user
changed Link property to point to proper IFC type, we weren't writing to
the IFC file buffer to finally write it to the file if user would save
it.

So this patch makes sure we write to this buffer by calling appropriate
function, and making ifc object have proper pointer to IFC type.
2025-06-17 09:33:57 +02:00
Roy-043
e4adfc63d7 Draft/BIM: change BezCurve, BSpline and Wire to Part::FeaturePython
Fixes: #7387.

See comment: https://github.com/FreeCAD/FreeCAD/issues/7387#issuecomment-2915599566

PR to change the base object of BezCurve, BSpline and Wire to `Part::FeaturePython`. This will only affect new objects. So code will have to also keep handling the old object type (`Part::Part2DObjectPython`).

The modification of BimPreflight.py needs to be verified. The steps in the old code lacked logic IMO. But I may have misunderstood.
2025-06-02 17:27:20 +02:00
tetektoza
8eaaaaff50 BIM: Parse Classification in IFC correctly for conversion/type assign 2025-05-26 10:24:34 +02:00
Furgo
88d9be2e10 BIM: allow deleting locked IFC properties when needed 2025-05-23 10:18:36 +02:00
Florian Foinant-Willig
4a61a49456 BIM: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
marcuspollio
44d3d677eb BIM: cleanup encoding 2025-04-21 10:10:26 -05:00
Sameer Mishra
2768ce7933 BIM: Fix 'Convert to type' dialogue unhandled placeholder #20676 (#20705)
Handle %1 placeholder that was appearing in text strings
in the 'Convert to type' dialogue. This was affecting multiple
language files in the translation system.

This change improves the readability and correctness of the displayed text
in the application interface.

The dialog now dynamically shows the correct type (e.g., 'WallType', 'BeamType')
in the user's interface language.

---------

Co-authored-by: _sameer <sameer.mishra@infra.market>
2025-04-15 12:58:28 -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
0798d1ca9e BIM: cleanup imports in nativeifc 2025-03-23 23:30:55 +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
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
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
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
Furgo
2567c22300 BIM: fix unassigned variable reference 2025-02-05 09:40:41 +01:00
tritao
3dd184d9da BIM: Improve checking of IfcOpenShell imports in ifc_tools.py . 2025-02-05 09:23:08 +01:00
Yorik van Havre
ead1c43de9 BIM: Make sure we have a default context when exporting to IFC 2025-01-19 14:32:03 -05:00
Tobias Frost
7a5a3d1ffc 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
Yorik van Havre
b5e2e8c007 BIM: Added classifications support to nativeifc (#18444)
* BIM: Added classifications support to nativeifc

* BIM: Fixed lint warnings
2025-01-07 10:35:37 +01:00
Yorik van Havre
6edd0daa1e BIM: Quantities support for nativeIFC objects (#18689)
* BIM: Quantities support for nativeIFC objects

* BIM: Added nativeIFC support for schedules
2025-01-06 11:55:50 -05:00
Yorik van Havre
2a726471ce BIM: Fixed nativeIFC license - issue #18622 2025-01-06 14:36:34 +01:00
luzpaz
0758630103 Fix various typos 2024-12-22 08:47:13 -05:00
Yorik van Havre
a7c550da98 BIM: Several fixes to nativeIFC lock/unlock system - fixes #17862 2024-12-20 10:15:39 +01:00
Yorik van Havre
9efa615fb4 BIM: Fixed shape loading - fixes #18391 2024-12-13 12:22:04 -05:00
Yorik van Havre
2cc8c3e4c5 BIM: Fixes appearance defects coming from recent transparency and #18298 2024-12-12 09:43:02 +01:00
Yorik van Havre
7f456d854f BIM: Fixed whitespace 2024-12-11 10:24:43 +01:00
Yorik van Havre
1d6e60f558 BIM: NativeIFC 2D support - axes 2024-12-11 10:24:43 +01:00
Yorik van Havre
a8b4fb485e BIM: NativeIFC 2D support - small fixes 2024-12-11 10:24:43 +01:00
Yorik van Havre
a62ce903d3 BIM: NativeIFC 2D support - better context detetcion 2024-12-11 10:24:43 +01:00
Yorik van Havre
8577d1bb46 BIM: NativeIFC 2D support - misc fixes cf comment #2383181661 2024-12-11 10:24:43 +01:00
Yorik van Havre
af84424a77 BIM: NativeIFC 2D support - section planes 2024-12-11 10:24:43 +01:00
Yorik van Havre
8406eae6c1 BIM: NativeIFC 2D support - optimized export of FreeCAD dimensions 2024-12-11 10:24:43 +01:00
Yorik van Havre
9c53a024c0 BIM: NativeIFC 2D support - dimensions 2024-12-11 10:24:43 +01:00
Yorik van Havre
4fba4abe5f BIM: Workaround for objects needing recompute 2024-12-11 10:24:43 +01:00
Yorik van Havre
a2793dc903 BIM: NativeIFC 2D support - handling orphan elements and drawing groups 2024-12-11 10:24:43 +01:00
Yorik van Havre
bf4a988301 BIM: NativeIFC 2D support - texts 2024-12-11 10:24:43 +01:00
Yorik van Havre
9c9d451ac6 BIM: NativeIFC 2D support - basic import/export + linework annotations 2024-12-11 10:24:43 +01:00
Yorik van Havre
2e7e01febe BIM: Updated NativeIFC unit tests (#18266)
* BIM: Updates NativeIFC self tests
2024-12-09 11:22:06 -06:00
Yorik van Havre
29ea971777 BIM: Fixed copy-paste bug in nativeifc psets - Fixes #18293 2024-12-09 17:26:55 +01:00
wmayer
0607c555d6 Arch/Draft: Fix transparency vs. alpha issues
Fix #18295
2024-12-09 11:50:14 +01:00