Commit Graph

31768 Commits

Author SHA1 Message Date
Kacper Donat
5658331bb0 Spreadsheet: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Kacper Donat
ed6e953c90 TechDraw: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Kacper Donat
585d277e49 Sketcher: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
9fba1b9fad Fem: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
2fb8b2d7f1 Part: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
a5071587de Spreadsheet: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
c5a137df89 Robot: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
c05ade50ae PartDesign: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
b999ce0336 TechDraw: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
4bd2cdeb2a Mesh: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
ff99df4c4d Assembly: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
0e2fd36551 Points: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
929f926846 Surface: Add missing SurfaceExport in Surface classes 2025-04-26 14:23:25 +02:00
Kacper Donat
cc50b2ede4 Part: Add missing PartExports in Part Features 2025-04-26 14:23:25 +02:00
Kacper Donat
6f262b1ee6 Merge pull request #20732 from furgo16/bom-properties
Assembly: enable BOM columns to be autopopulated with given properties
2025-04-25 23:22:49 +02:00
aprospero
f3fe554af7 importSVG - Path generation Overhaul (#20749)
* add precision Parameter for importSVG to preferences

* rewrite svgpath import

reorganize the existing svg interpretation code snippets by dividing the responsibilities for data provision and actual shape generation.
That bears the opportunity to optimize the resulting construction data regarding consistency and precision.

* create cuts from inner paths

organize paths in a tree structure where completely contained paths are children of their sorrounding paths

In a second step the even depth paths are cut with their respective (uneven depth) children.

* move svg path import logic into its own module

* Restructure how the import result is controlled by preferences.

* reintroduce alternative transform function

Using transformGeometry() on shapes results in degenerations like lines mutating to bsplines of 1st order. For non-orthogonal Transformations this can't be avoided. But for orthogonal transformations (the majority) we can apply those transformations without degeneration.

The necessary function including fallback to transformGeometry() is already in the code but was disabled due to a regression.

See: https://tracker.freecad.org/view.php?id=2062

Associated commits: f045df1e 2509e59b d4f3cb72

I reactivate the code since the degeneration of paths seems a bigger issue to me than misformed svg files producing incorrect measurements. Degenrated paths are often the culprit for later arising 3D-calculation errors.

* avoid path degeneration by keeping scale transformations uniform

* repair style application on shapes

the style should be based on the configured svgstyle mode in the svgimport preferences.

* improve logging of face generation.

* refactor: rename _precision_step to _tolerance

naming according to example set in draft utils.

* fix: indentation

* spelling
2025-04-25 16:44:03 +02:00
Roy-043
ff92a96170 BIM: Hidden objects used for variant Links should not be hosted
If a window is a variant Link there will be a hidden source object in the document. That hidden object shares properties with the visible Link object. The Hosts property may be one of them, yet the hidden object should never be hosted.

Forum topics:
https://forum.freecad.org/viewtopic.php?p=817743#p817743 (sample file)
https://forum.freecad.org/viewtopic.php?t=96115 (code discussion)

To test the code:
1. Open the mentioned sample file.
2. Change the Hosts property of  Window001 to Wall.
3. Recompute.
2025-04-25 15:07:35 +02:00
paul
33272a76c8 [BimWindow] Integrate Interactive Creation Tool with SketchArch Parametric Attachment Feature (#20872)
Improvement to User Interactive Experience:
- Now with the stock BIM Window Interactive Tool and SketchArch-addon, the required SketchArch parametric placement information of an Arch Object (Window currently) are automatically completed, no more manual input is required.

FreeCAD Forum Discussion:
- https://forum.freecad.org/viewtopic.php?p=822493#p822493

YouTube Demo:
- https://youtu.be/BNZFk03_eGE
2025-04-25 15:05:51 +02:00
Roy-043
061ae88878 BIM: Improve grid handling for some commands (#20658)
* BIM: Improve grid handling for some commands

The updated commands did not handle the 2 grid options ("always", "only during commands") correctly. The proposed code follows the example of BimWall.py and ArchStructure.py where this issue has already been addressed.

* Rebase
2025-04-25 14:59:33 +02:00
Furgo
8dfa7a9a63 Assembly: BOM, handle enumerations as well 2025-04-25 01:53:11 +02:00
Furgo
160916cba3 Assembly: BOM, use getUserString to simplify code 2025-04-24 14:20:35 +02:00
Furgo
323bcb019e Assembly: BOM, use freecad_cast 2025-04-24 14:20:35 +02:00
Furgo
ce4b0205a8 Assembly: BOM, support superset property type only 2025-04-24 14:20:35 +02:00
Furgo
242c724be2 Assembly: BOM, apply suggestion: do not copy baseName
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-04-24 14:20:35 +02:00
Furgo
ed518f5c44 Assembly: BOM, internationalize strings 2025-04-24 14:20:35 +02:00
Furgo
3871379ad2 Assembly: BOM properties, update help message 2025-04-24 14:20:35 +02:00
Furgo
c4c1b7a1a3 Assembly: BOM custom columns can now return property values 2025-04-24 14:20:35 +02:00
Roy-043
37fc925480 Draft: Change 'Chain Mode' GUI text to sentence case 2025-04-24 10:10:18 +02:00
Furgo
e25c43537a TechDraw: Add BIM view with the page's scale (#20934)
* TechDraw: Add BIM view with the page's scale

* Fix if one-liner syntax
2025-04-23 19:31:57 +02:00
Roy-043
84166128c4 Draft: adjust formatting of params.py (#20946) 2025-04-23 19:16:40 +02:00
Roy-043
a93703974b Draft: adjust formatting of params.py 2025-04-23 17:03:07 +02:00
tetektoza
354cef7463 TechDraw: Use static_cast when casting scene's child to TextField 2025-04-23 16:32:31 +02:00
tetektoza
bbcdb77003 TechDraw: Return text fields directly as childs of QGISVGTemplate
As the title says. I've noticed during reproducing of #18921, that
after in `PagePrinter::renderPage` we call `setTemplateMarkers`
twice, which results in deleting `childItems` allocated memory
(in `setTemplateMarkers`->`setMarkers`->`updateView`->`clearClickHandles`),
and then we are calling `setTemplateMarkers` (also in `PagePrinter::renderPage`) second time,
accessing `textFields` in `setMarkers` method, which still contain hanging pointers
from the previous deallocation. This results in segfaults as we iterate through `textFields`.

So, instead of keeping sychronization between childs of QGISVGTemplate
and textFields vector - this patch removes this variable at all and uses
childs directly to return text fields.
2025-04-23 16:32:31 +02:00
Kacper Donat
b24af528d5 Merge pull request #20778 from FlachyJoe/LockedProperty2
Prevent user to remove core properties
2025-04-23 00:23:37 +02:00
Lawrence Woestman
778102c890 CAM: Fix tool change output errors, with tests 2025-04-22 14:57:45 -07:00
Pieter Hijma
039cbbe1a5 [Core] Make enum FrameOption boolean
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-04-22 23:56:07 +02:00
Pieter Hijma
a1239688af [Core] Allow creating an editor with a frame
The default is to not have a frame as is custom before this change.
2025-04-22 23:56:07 +02:00
Florian Foinant-Willig
4726c2c0c3 TemplatePyMod: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
e5b6848fc6 Points: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
2729cfa0df PartDesign: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
b4c41d8c62 Part: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
c7c768995b OpenSCAD: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
d5ba39d0ca Measure: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
3064c7705f Fem: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
36b8e9a703 Draft: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
8a4c61ec5a BIM: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
d5e2fdf8fd Assembly: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
3x380V
ad244bf8d4 Fix SolverCalculiX object refactor (#20913)
Rename original SolverCalculix.ui to SolverCcxTools.ui to prevent
collision on case insensitive filesystems.

Fixes: 4f7a835e22 ("Fem: SolverCalculiX object refactor")
2025-04-22 16:53:58 -03:00
theo-vt
f2cc750250 PartDesign: Center holes on sketch points as well as circles and arcs (#20583)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-04-21 23:30:57 +02:00
Kacper Donat
75bc5eed1c Sketcher: Remove not-needed print statements 2025-04-21 15:08:33 -05:00