Commit Graph

31036 Commits

Author SHA1 Message Date
Kacper Donat
81c772938e Mesh: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
6d99872b0f Assembly: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
76013ab7e0 Points: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
019a25ad75 Surface: Add missing SurfaceExport in Surface classes 2025-04-26 14:23:25 +02:00
Kacper Donat
caa841c960 Part: Add missing PartExports in Part Features 2025-04-26 14:23:25 +02:00
Kacper Donat
01241245a1 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
5f8eac49f3 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
8487ec7e1d 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
39afedb077 [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
fc90443b98 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
c567ed60cf Assembly: BOM, handle enumerations as well 2025-04-25 01:53:11 +02:00
Furgo
cfe797e8f8 Assembly: BOM, use getUserString to simplify code 2025-04-24 14:20:35 +02:00
Furgo
59ea0d6e84 Assembly: BOM, use freecad_cast 2025-04-24 14:20:35 +02:00
Furgo
04af6c5b37 Assembly: BOM, support superset property type only 2025-04-24 14:20:35 +02:00
Furgo
d4925e7a04 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
3b295f9d43 Assembly: BOM, internationalize strings 2025-04-24 14:20:35 +02:00
Furgo
47b7ae9813 Assembly: BOM properties, update help message 2025-04-24 14:20:35 +02:00
Furgo
57c5b1f987 Assembly: BOM custom columns can now return property values 2025-04-24 14:20:35 +02:00
Roy-043
262f8d49fe Draft: Change 'Chain Mode' GUI text to sentence case 2025-04-24 10:10:18 +02:00
Furgo
bf19a8917f 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
d4dcda1693 Draft: adjust formatting of params.py (#20946) 2025-04-23 19:16:40 +02:00
Roy-043
ed4dfba2a7 Draft: adjust formatting of params.py 2025-04-23 17:03:07 +02:00
tetektoza
5243c4a664 TechDraw: Use static_cast when casting scene's child to TextField 2025-04-23 16:32:31 +02:00
tetektoza
b4214fdde6 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
efbfa34aa1 Merge pull request #20778 from FlachyJoe/LockedProperty2
Prevent user to remove core properties
2025-04-23 00:23:37 +02:00
Pieter Hijma
8fb9cbfa3e [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
50bf1cf120 [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
a7331cbb43 TemplatePyMod: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
3de57e50c2 Points: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
d6dd100266 PartDesign: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
1ae550f6f4 Part: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
286483ff7d OpenSCAD: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
8a733f450b Measure: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
6555bdc83c Fem: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
19c125e898 Draft: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
4a61a49456 BIM: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Florian Foinant-Willig
b41b294292 Assembly: prevent user to remove core properties 2025-04-22 23:52:17 +02:00
3x380V
54549a4a96 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
774ec2cc93 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
9aad08a646 Sketcher: Remove not-needed print statements 2025-04-21 15:08:33 -05:00
Chris Hennes
4428ba3bf2 Start: Apply reviewer suggestion
Co-authored-by: Pieter Hijma <pieterhijma@users.noreply.github.com>
2025-04-21 21:21:52 +02:00
Chris Hennes
42cd4d76f2 Start: Refactor f3d to use worker threads 2025-04-21 21:21:52 +02:00
Adrian Insaurralde Avalos
da35868b96 Start: refactor f3d previews, use caching and configurable f3d path 2025-04-21 21:21:52 +02:00
MaxiV
c8411bdbba Start: Switch to using QProcess, not std::system 2025-04-21 21:21:52 +02:00
MaxiV
a2055d7b90 Start: add f3d previews 2025-04-21 21:21:52 +02:00
Frank Martinez
23190abeb2 [Core] Fix Color transparency misinterpretation 2025-04-21 11:12:37 -05:00
Chris Hennes
813dc84c65 Merge pull request #20609 from marioalexis84/fem-ccx_refactor
Fem: SolverCalculiX refactor - Add option to import results as pipeline - Fixes #20541
2025-04-21 11:01:23 -05:00
Chris Hennes
318e0a6c45 Merge pull request #20835 from oursland/python-binding-generator-const
python: Make const methods declared const in C++.
2025-04-21 10:58:21 -05:00
Lothaire Sicot
766ee41b55 Sketcher: Prevent bad constraint names (#20717)
* Sketcher: Prevent bad constraint names

Ensures the constraint names only contains alphanumericals and
underscores so that they can always be used in expressions.
That way, there cannot be any unicode character or quotes that
would need to be escaped.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/19767

* Add helper function to check constraint names

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

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

---------

Co-authored-by: Lothaire Sicot <lothaire.sicot@telecom-paris.fr>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-21 17:53:37 +02:00
Florian Foinant-Willig
065a8a2226 Core: Part::PartFeature should be Part::Feature 2025-04-21 10:51:15 -05:00