Commit Graph

499 Commits

Author SHA1 Message Date
Ian 'z0r0' Abreu
0217c1ef97 updating docblock locations. 2025-09-02 08:28:47 -04:00
Ian 'z0r0' Abreu
8d56e3e529 reverting author metadata 2025-09-02 08:25:37 -04:00
Ian 'z0r0' Abreu
b24040ee52 Adding license documentation to interface class docblocks. 2025-09-01 21:50:59 -04:00
Ian 'z0r0' Abreu
6e75aef81c Finalizing Python interface bindings for Import, Measure, Mesh, Points. 2025-08-31 15:34:03 -04:00
Yorik van Havre
7766b215d4 Merge pull request #22251 from furgo16/dxf-new-import-ui-and-more
Redesign DXF import UI, add Part primitives and Draft object import modes
2025-07-28 17:49:25 +02:00
Ian 'z0r0' Abreu
ab225f5672 fixing unnecessary list import 2025-07-28 08:59:52 -05:00
PaddleStroke
da5e18f5d8 Import: Fix export crash when hidden object in Part. (#14567) 2025-07-18 11:20:04 -05:00
Furgo
8054042a9a Import: DXF, fix typo in individual shapes import mode 2025-07-14 10:18:04 +02:00
Furgo
808526e8b8 Import: DXF, deduplicate Part primitives creation
Create helpers that can be reused when importing entities as top-level
geometry and as part of blocks
2025-07-14 10:18:04 +02:00
Furgo
cb64caf283 Import: DXF, first working version of dimensions import 2025-07-14 10:18:04 +02:00
Furgo
5243501638 Import: DXF, make ellipses parametric 2025-07-14 10:18:04 +02:00
Furgo
fa4d8247bc Import: DXF, first working version of Draft objects import 2025-07-14 10:18:04 +02:00
Furgo
a7f8fd29bb Import: DXF, first working version for import as Part primitives 2025-07-14 10:18:04 +02:00
Furgo
071bdcc579 Import: DXF, add dedicated import dialog 2025-07-14 10:18:04 +02:00
Furgo
1b2246c5db Import: DXF importer, refactor preferences UI 2025-07-14 10:18:04 +02:00
Furgo
3b3d19c56b Import: improve DXF C++ importer support for BLOCK and INSERT entities (#22045)
* Import: DXF importer, block and inserts overhaul

Implement support for blocks as definitions and inserts
as instances.

A BLOCK definition becomes a hidden master object in a
_BlockDefinitions group (currently a Part::Compound).
An INSERT becomes a visible App::Link that points to
that master definition.

* Import: DXF parser/importer add debug print statements

* Import: DXF importer, various improvements

- Add more code comments
- Correctly increase object count
- Improve readability of anonymous block checks

* Import: DXF (all) report anonymous blocks separately

* Import: DXF importer (App + GUI) add nested inserts support

* Import: DXF importer (GUI) fix preserving colors for inserts

* Import: DXF importer, make primitives naming more specific

* Import: DXF parser/importer remove debug print statements

* Import: DXF parser, work around DXF color index 7

* Import: DXF importer GUI, temporary debug print to show layer color data

* Import: DXF importer, fix nested inserts hierarchy

* Import: DXF importer, prefix and suffix underscores to names

To work around mangling from FreeCAD's unique name generator.

* Import: DXF importer, implement flattening blocks on import

* Revert "Import: DXF importer GUI, temporary debug print to show layer color data"

This reverts commit b6ece395c9d2b8a1e0796d6f7b0d58842a2f3686.

* Import: DXF importer, fix imported text orientation

The DXF file provides the text rotation angle in degrees.
The used rotZ function expects the angle in radians,
thus the conversion needs to be made.

Fixes: #21548

* Import: DXF importer, honour the preference to not import layouts

* Import: DXF importer, move unreferenced blocks to separate group

This provides better classification, but it has a performance hit:
we import all blocks as before, we sort them and we reparent them
to the correct group. The reparentipart with Grou.setValues()
appears to be an expensive call. Probably because internally the
FreeCAD dependency graph is modified.

* Import: DXF importer, count compound children in the report

* Import: DXF importer, cleanup defined blocks group if empty
2025-07-12 13:38:13 +02:00
Furgo
4c0517d2ae Import: DXF parser, correctly pass line no. and handle 2025-06-25 07:41:03 +02:00
Furgo
7764ed5173 Import: DXF backend/frontend, report more unsupported features info
Now for unsupported features we report on line numbers and on the entity
handle, in case that unsupported feature is a DXF entity. To avoid
flooding the output, only a maximum of 5 instances are reported with
details. The rest simply add up to the global count and are ellipsized
in the report.

Report output is now in sentence case.
2025-06-25 07:41:03 +02:00
Furgo
f8b0ceaac5 Import: DXF parser, fix macOS linker issue 2025-06-25 07:41:03 +02:00
Furgo
a881d3633c Import: DXF parser, remove original unsupported features count and warning 2025-06-25 07:41:03 +02:00
Furgo
c10a945fad Import: DXF importer, add code comments to C++ to Python stats passing function 2025-06-25 07:41:03 +02:00
Furgo
89f6f9449c Import: DXF parser, add entities in paperspace count 2025-06-25 07:41:03 +02:00
Furgo
6392423b5b Import: DXF parser, add DXF block count 2025-06-25 07:41:03 +02:00
Furgo
434bf415b9 Import: DXF backend, frontent; add time measurement 2025-06-25 07:41:03 +02:00
Furgo
6fc5bea0dc Import: DXF parser, disable now redundant unsupported entities reporting 2025-06-25 07:41:03 +02:00
Furgo
bf0c8f24fa Import: DXF parser/imported improve unsupported features count
Classify unsupported features by type, and report on
the breakdown.
2025-06-25 07:41:03 +02:00
Furgo
ef0dd661a3 Import: DXF parser/importer, improve scale reporting
Report additional information about user scaling
value, scaling info source and resulting scale,
including units.
2025-06-25 07:41:03 +02:00
Furgo
321c5b692b Import: DXF importer, add Python bindings 2025-06-25 07:41:03 +02:00
Furgo
9775aafc32 Import: DXF importer, populate stats reporting structure 2025-06-25 07:41:03 +02:00
Furgo
63d8fe6c30 Import: DXF parser, add stats reporting structure 2025-06-25 07:41:03 +02:00
Furgo
f3a4b9de78 DXF: do not ignore the setting that controls importing paper layouts 2025-06-23 14:06:02 +02:00
Furgo
1e29a3273f Import: DXF, handle non-standard 8859_1 encoding (#21905)
* Import: improve DXF importer exception handling

* Import: DXF, pinpoint erroneous header section when reading

* Import: tackle 8859_1 non-standard encoding name
2025-06-16 18:02:56 +02:00
theo-vt
13e7952ccc PartDesign: Fix hole centered on point edge case (#21257)
* Light refactor of getTopoShape function

* Fix hole edge case

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

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

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Refactor simplifyCompound()

* Use Base::Flags<GetShapeOption>

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

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

* Shorten enum name and move it from class scope to namespace scope

* [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>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-05-29 22:37:54 +02:00
Chris Hennes
f2e78e53e9 UI: Remove qPixmapFromMimeSource pixmap function
This function dates back to Qt3, and was removed in Qt4. Modern Qt no
longer uses this ui file entry, and in some circumstances the uic
complains about its presence.
2025-05-15 00:56:30 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Benjamin Nauck
4bf7048534 Import: use contains() instead of count() where possible 2025-05-03 22:19:51 +02:00
Kacper Donat
b300c80b90 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Pieter Hijma
74ac46175d [Doc] Fix unassociated doc strings
Before this commit, these doc strings were unassociated, which means
that the can appear at random places.  They are now associated with
their namespace an class.
2025-04-11 00:47:54 +02:00
Kacper Donat
35a9673a75 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
Benjamin Nauck
1669427449 Import: Add #include <limits> where used 2025-03-31 23:51:31 +02:00
Kevin Martin
0986dadb2f Correct non-gui DXF C++ importer to not generate pending python exceptions (#20328)
* Add a test case for DXF import

* Test gui flag rather than look for import error to make gui decision

The new code is cleaner and faster and avoids any exception stuff

* Properly avoid trying to use Layer's View object in non-GUI

The code was trying to avoid this but had a Python None object rather than a null C++ pointer and so tried setting a property on None. This left an unhandled exception state which acted as a booby trap that caused the later failure of some unrelated code.

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

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

* De-lint, remove wong "unsupported" message
Hidden layers have been supported for a while but still generated an import note about this being unsupported.

* [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-03-31 11:20:37 -05:00
Benjamin Nauck
821327b4cd Import: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
mosfet80
3dd7a1cc52 Remove support to oldest occ <7.5 (#20084)
* remove support to oldest occ <7.5

The  os ubuntu 22.04 not supported use occ 7.5.1.
There is a lot of code implemented to support even older versions.
The patch removes support for versions lower than occ 7.5.0

* .

* move include library

#pieterhijma  change request :

* removed deprecated functions

get/setAngle functions has been removed with OCC 7.5
2025-03-21 13:06:47 +01:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Chris Hennes
5f623390fb Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
bofdahof
49cc124a68 Import: apply std::ranges 2025-03-16 17:16:42 -05:00
Andrea
cd5c46ba18 Remove unnecessary check (duplicated)
before including the library, it is uselessly checked if the variable __QtAll__ and __InventorAll__ have been defined. The same check is performed again once the library is included
2025-03-10 21:53:00 +01:00
Joao Matos
9bcdd2d44c Rename DocumentCreateFlags to DocumentInitFlags. 2025-03-07 20:54:16 +00:00
Joao Matos
1c2ac570f8 Convert DocumentCreateFlags instances to use designated initializer list. 2025-03-07 20:42:51 +00:00