Commit Graph

337 Commits

Author SHA1 Message Date
Yorik van Havre
1a07336c3d Merge pull request #20406 from marcuspollio/bim-cleanup-imports
BIM: cleanup imports
2025-04-07 17:43:36 +02:00
xtemp09
d7fe28af7b Make some context menu actions translatable (#20401)
* Make some context menu actions translatable

* [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-04-07 08:43:04 -05:00
Luz Paz
97e172334b Fix typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,localy,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,rin,ro,rougly,sectionin,seperator,serie,shs,sinc,siz,som,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
2025-03-31 23:00:32 +02:00
Tomas Polak
dac7408ee2 BIM adjust BIM_Classification tooltip 2025-03-30 20:54:50 +02:00
marcuspollio
53feedf8ec Merge remote-tracking branch 'upstream/main' into bim-cleanup-imports 2025-03-30 12:44:55 +02:00
Roy-043
b3c4cec346 BIM: Remove calls to obsolete Draft.getParam
See #20198.
2025-03-26 13:09:17 +01:00
Yorik van Havre
3583ca806d 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
d8ceec8fba BIM: Fixed material dialog's merge duplicates button - fixes #20124 2025-03-25 20:02:11 -05:00
Furgo
ab32b70734 BIM: add missing import 2025-03-25 09:46:54 +01:00
Furgo
f3e3cfd941 BIM: also install test files 2025-03-25 09:46:54 +01:00
Furgo
a0344650a5 BIM: move more functions to their own modules, standardize logging 2025-03-25 09:46:54 +01:00
Furgo
5c8290b853 BIM: move tests to own module, separate App/Gui tests, add TestArchBase 2025-03-25 09:46:54 +01:00
Furgo
a623516bd6 BIM: move Arch wall tests to their own module 2025-03-25 09:46:54 +01:00
marcuspollio
61b4506e40 BIM: cleanup imports at module root 2025-03-23 23:32:16 +01:00
marcuspollio
77d2d34f96 BIM: cleanup imports in utils 2025-03-23 23:31:38 +01:00
marcuspollio
c327bc4fe0 BIM: cleanup imports in nativeifc 2025-03-23 23:30:55 +01:00
marcuspollio
c146d58b57 BIM: cleanup imports in importers 2025-03-23 23:30:31 +01:00
marcuspollio
5ecbd20d63 BIM: cleanup imports in bimcommands 2025-03-23 23:29:43 +01:00
Yorik van Havre
a2aa994897 BIM: Fixed project manager's save/restore - fixes #20288 2025-03-22 11:51:01 -05:00
Roy-043
a8a48793ad BIM: Generate curtain wall panels in spanned grid openings
Fixes #20235.
2025-03-20 15:04:53 +01:00
Tomas Polak
ae40f02626 BIM_ProjectManager typo fix 2025-03-20 12:25:09 +01:00
Roy-043
78a76ca627 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
74b622cb08 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
de4f61b07e 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
0bfe803f3a 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
b06c8b3522 [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
e8c4d7ea2f 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
f4276ae8f1 BIM: include selected objects when creating a level 2025-03-17 18:12:36 +01:00
Chris Hennes
aaa9c8bf42 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
a4de381e2f Merge pull request #20141 from semhustej/change_IfcElements_window_size
Change IfcElements window width
2025-03-16 23:58:40 -05:00
Chris Hennes
ef24ad9e1b 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
708bb9708e BIM: Fixed space text display - fixes #20126 2025-03-15 14:35:17 +01:00
Luz Paz
6564a7b107 Fix various typos 2025-03-14 12:37:12 -04:00
Tomas Polak
545bd14f70 Change IfcElements window width 2025-03-12 11:12:55 +01:00
Yorik van Havre
91c06e1160 BIM: Fixed classification dialog's Cancel button - fixes #19857 2025-03-12 10:42:14 +01:00
Syres916
791256bc48 [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
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