* 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
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.
* 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>
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.
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.
* 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>
* 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
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