Commit Graph

466 Commits

Author SHA1 Message Date
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
Chris Hennes
6a242f5b4c Merge pull request #22083 from galou/improve_dae
Improve dae
2025-06-30 10:54:08 -05:00
Syres916
4f167b828b [BIM][Draft] QCheckBox fix regressions introduced by PR #21939 (#22199)
* [BIM][Draft] QCheckBox fix regressions introduced by PR #21939

* [BIM] Remove unwanted index values - CodeQL feedback
2025-06-27 11:25:36 +02:00
Gaël Écorchard
3611a4328b BIM: satisfy github-advanced-security
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
2025-06-25 07:40:09 +02:00
Gaël Écorchard
346c7581d4 BIM: fix geometry under node tags
I took the file
[link_3.dae](514790a553/kuka_kr210_support/meshes/kr210l150/visual/link_3.dae)
as test.
Before this commit, no geometry is loaded because the childer of `node`
are `Node` instances not geometry.
To access all the geometries, `col.scene.objects("geometry")` is used,
cf. https://pycollada.readthedocs.io/en/latest/structure.html.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
2025-06-24 12:14:52 +02:00
Gaël Écorchard
9a039860a3 BIM: remove unused variable DEBUG 2025-06-24 12:14:52 +02:00
Gaël Écorchard
d09196a173 BIM: improve style of importDAE.py 2025-06-24 12:14:52 +02:00
Gaël Écorchard
281d112bea BIM: Use labels in DAE export
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
2025-06-24 12:14:51 +02:00
Roy-043
3ab2c0a02c Update ArchComponent.py 2025-06-23 14:26:05 +02:00
Roy-043
b9b600ae42 Update BimTDPage.py 2025-06-23 14:24:03 +02:00
Roy-043
eb4e1552a9 Update ArchSchedule.py 2025-06-23 14:23:09 +02:00
Roy-043
7142763892 Update ArchAxis.py 2025-06-23 14:21:02 +02: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
b0f6375c5f Update BimProjectManager.py 2025-06-23 14:13:19 +02:00
Roy-043
3eacde0ba2 Update ArchMaterial.py 2025-06-23 14:12:12 +02:00
Roy-043
b11ebe6e40 BIM: fix index error in ifc_viewproviders.py
Fixes #21912
2025-06-23 14:10:26 +02:00
Roy-043
826f4789b5 BIM: fix ArchProfile update issues
Fixes 21001
Fixes 21187
2025-06-23 14:09:36 +02:00
Roy-043
580ec6451e BIM: fix display of help menu items after WB reactivation (improved)
Fixes #22044

Previous PR (#21874) did not work properly if the BIM WB was the start up WB. A scenario that I forgot to test.
2025-06-23 14:08:26 +02:00
Paul Lee
fea582dc10 [ArchCurtainWall] Fix Vert-Horiz Mullion Mix-up & Support Swap (Variables name)
(Variables name improvement only)
2025-06-23 14:03:40 +02:00
Paul Lee
147e97d407 [ArchCurtainWall] Fix Vert-Horiz Mullion Mix-up & Support Swap
Fix #21845
Curtain wall vertical/horizontal mullion mix-up
- https://github.com/FreeCAD/FreeCAD/issues/21845

Support/Feature #21866
Swap Horizontal Vertical does not work #21866
https://github.com/FreeCAD/FreeCAD/issues/21866
2025-06-23 14:03:40 +02:00
Paul Lee
9b3b15ebfe [ArchRoof] Improve subVolume generation
Fix #21633 : Holes in roof are causing troubles

FreeCAD Forum : Sketch based Arch_Roof and wall substraction
- https://forum.freecad.org/viewtopic.php?t=84389

Improved algorithm:
1. Extrusion of bottom faces in +Z.
2. The roof itself.
3. Extrusion of the top faces in +Z.

TODO:
Find better way to test and maybe to split suface point up and down and extrude separately
2025-06-23 14:00:41 +02:00
Syres916
f674589fbe [BIM] Fix Runtime Error when creating Wall (#21862)
* [BIM] Fix Runtime Error when creating Wall

* [BIM] Fix continueMode functionality for Wall, Panel and Structure
2025-06-23 13:59:13 +02:00
Syres916
cd5d0980b4 [BIM][Draft][CAM] preparation for deprecation of QCheckBox… (#21939)
* [BIM][Draft]{CAM] preparation for deprecation of QCheckBox stateChanged -> checkStateChanged
2025-06-18 11:24:21 +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
tetektoza
864ea5176b BIM: Fix Arch_SectionPlane having incorrect display style upon init
Regressed from previous behavior - there was Arch's refactor and the
base element that `SectionPlane` was inheriting from was
`App::FeaturePython`, not `Part::FeaturePython`. This changes a lot, since
`Part::FeaturePython` has predefined color (black in this case), which
later on - during property set of `SectionPlane` in properties caused
skipping of preferred setup of color.
2025-06-16 18:15:53 +02:00
Chris Hennes
46888b83b2 Merge pull request #21921 from furgo16/add-prefcheckablegroupbox
Gui, Draft, BIM: Add PrefCheckableGroupBox, use it in IFC exporter preferences page
2025-06-16 11:06:30 -05:00
Roy-043
e68a40cdb0 BIM: fix display of help menu items after reactivation
Fixes #21873.
2025-06-16 17:54:43 +02:00
Furgo
b88cbac4f5 BIM: fix ArchPipe's view provider initialization 2025-06-16 17:37:28 +02:00
Furgo
195afca33f BIM: Use PrefCheckableGroupBox in IFC exporter preferences page 2025-06-11 02:44:52 +02:00
Syres916
fec8d924fe [BIM] Fix Attribute Error when user moves and then deletes the BimViewArea dock widget (#21830)
* [BIM] Fix attribute error when user deletes the BimViewArea dock widget

* [BIM] Fix Attribute Error for both Qt5 and Qt6

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-06-09 17:36:04 +00:00
Ralf Habacker
e14c45d9a0 BIM: Add top level group when importing obj file into active document
When importing an obj file into an existing document,
the imported objects are now stored below a new group
object in order to improve the structure and avoid
flooding the top level with imported objects.

Fixup for #21349
2025-06-09 17:36:45 +02:00
Roy-043
c567b75fa9 BIM: Roof add tolerance to parallel check (#21814)
Fixes #21796.
2025-06-06 11:39:57 +02:00
Furgo
de37c5157a BIM: Arch, docstring and linter fixes (#21763)
- Fix docstring markup, improve types
- Fix max length to 100 chars on comments
- Wrap all code to 100 chars max
- Add deprecation notice
2025-06-05 14:02:25 +02:00
paul
f6bba5d58e [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property (#21726)
* [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property

1.  Bug found in https://github.com/FreeCAD/FreeCAD/pull/21005 (Allow changing Sill parameter)

self.baseSill
self.basePos :
- need to be restored as 'initial' settings in onDocumentRestored() as corresponding codes in onChanged() does upon object creation

2.  ArchWindow with SketchArch add-on to support above 'Allow changing Sill paramemeter' feature
- Update to ArchWindow following groundworks in https://github.com/FreeCAD/FreeCAD/pull/21568/

* [ArchWindow] Bug-fix Changing Sill _&_ SketchArch Support Sill Property (rev)
2025-06-05 14:01:06 +02:00
Roy-043
cfdb99fb60 BIM: improve unit handling in Arch_Roof task panel (#21773)
* BIM: improve unit handling in Arch_Roof task panel

Fixes #21137.
Improvement for #21175.

units are now kept when a cell receives the focus.

Additionally:
* The first and last column have been made read-only.
* Some columns have been widened.
* The text in the task panel has been reordered to match the order of the columns.

* _RoofTaskPanel_Delegate class only if Gui is up

* typo
2025-06-04 21:25:33 -05:00
Furgo
94a4639bc3 BIM: ignore FreeCAD groups for IFC export, controlled by a user preference (#21583)
* Add .db extension to git ignore list

* BIM: new feature - add ignore groups option on IFC exports

* BIM: create generic get_architectural_contents function
2025-06-03 11:19:07 +02:00
paul
93b53af0d1 [BimWindow] ArchWindow/MakeWindow Normal Default Auto & SketchArch Support Sill Property (#21568)
https://github.com/FreeCAD/FreeCAD/pull/21261
Historically, the normal of a Window object was deduced by the orientation of the Base Sketch and hardcoded in the Normal property.
Now with the new AutoNormalReversed property/flag (above PR), set True as default, the auto Normal previously in opposite direction to is now consistent with that previously hardcoded.
With the normal set to 'auto', window object would not suffer weird shape if the Base Sketch is rotated by some reason.
The Normal property is set to  'auto' (0,0,0) default following the above PR.

https://github.com/FreeCAD/FreeCAD/pull/21005
BIM: Allow changing Sill parameter in Properties for Window #21005
Ground work is added to support Window augmented by SketchArch Parametric Placement feature (PR to ArchWindow.py to be submitted separately)
2025-06-03 11:15:18 +02:00
Furgo
670a85de97 BIM: fix ArchRebar default name (#21681)
* BIM: ArchRebar, only import GUI modules if the GUI is up

* BIM: ArchRebar, add tests

* BIM: Arch.makeRebar, fix rebar default name

* BIM: Arch.makeRebar, add type hints

* BIM: Arch.makeRebar, add code comments

* BIM: Arch.makeRebar, expand docstring
2025-06-02 18:31:50 +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
Furgo
56e68922cb BIM: clarify window frame depth (#21486)
* BIM: improve tooltip for window Frame property

* BIM: rename window editor's Thickness label to Frame depth

In order to match the window's Frame property, to which
this value is added to.
- Improve tooltip
- Rename the 'default' label to be more specific

* BIM: improve window editor's Offset property tooltip

- Rename 'default' label for clarity
2025-06-02 17:24:21 +02:00
Chris Hennes
8805528e39 Merge pull request #21712 from yorikvanhavre/translations
Translations
2025-06-02 09:31:21 -05:00
Yorik van Havre
94144ecd99 Translations: Merged crowdin translations 2025-06-02 11:48:26 +02:00
Roy-043
3fc219a824 BIM: Terrain should not also be in Group of Site
Addresses one of the issues mentioned in #21667.

* If the Terrain is dropped on the Site it is added to the Group (as before) but the Terrain property is then also set to None.
* If one of the objects in Group is selected as the Terrain it is removed from the Group.
2025-06-02 11:45:34 +02:00
luzpaz
09f91baa2b BIM: fix typo in Arch.py (#21696) 2025-06-01 18:36:10 +02:00
tetektoza
8ec6605fc4 BIM: Add support for deactivation active object to BIM Views Tree (#21570)
* BIM: Use checkbox in model tree for Activation/Deactivation of WP

* BIM: Set active object after deactivating current object if it exists

Currently we can get into a scenario where user can activate two working
planes, one after another. For example, Level, and  then Level001. If
they activate both, and then deactivate Level001, working plane switches
back to Level. But, we didn't set the object as the active one, so user
didn't have clear information that they can deactivate it, only the
working plane was switching it.

So this patch sets the object as the active one, if it exists.

* BIM: Add support for deactivation active object to BIM Views Tree

As the title says - it adds the checkbox that's similarly done in Part
workbench, so user can select/deselect the item and if they had previous
active object, it will also fall back to the previous object.

Also, moved out part of the common logic from ArchBuildingPart and
BimViews to utils.

* BIM: Handle correct context on activating WP for NativeIFC/BIM

* BIM: Remove redundant logic from BIM Views upon double click

As all of the logic is being handled now in `activate` function in
BimViews, this logic is redundant

* BIM: Rename button for taskbar and BIM Views from Activate to Active
2025-05-28 11:27:11 +02:00
tetektoza
8eaaaaff50 BIM: Parse Classification in IFC correctly for conversion/type assign 2025-05-26 10:24:34 +02:00
Furgo
5386ca838a BIM: add first iteration of unit tests 2025-05-26 10:23:24 +02:00
Furgo
edc4d04a41 BIM: refactor to reduce code duplication and improved readability 2025-05-26 10:23:24 +02:00
Furgo
df2e055183 BIM: remove command now removes windows from walls
Fixes: #21551
2025-05-26 09:53:21 +02:00