Open furgo16 opened 3 days ago
@kpemartin @Roy-043 FYI
This seems to be asking for the Legacy importer to back-implement behaviour of the C++ importer, which leaves the compound objects within the layers since there can be several such compound objects (if, say, the colours are different), and there can be non-compoundable objects (like dimensions).
I do not believe that the legacy importer checks attributes and always merges all the shapes of the layer into a single compound, so it is a bit more justified to just place this compound at top level instead of in the layer. I'm not sure what it does if there are also dimensions or annotations in the layer.
so it is a bit more justified to just place this compound at top level instead of in the layer.
Thanks for the detailed analysis. I'm not familiar with the implementation details, but from the user perspective, I would think the expectation would be to have the blocks under the layers.
The workaround is to move the blocks manually under the layers after the import, but I feel a more optimal experience would be for this to happen automatically like in the C++ importer.
I'm not sure what it does if there are also dimensions or annotations in the layer.
I can test this soon and report back.
I added a text line and a dimension to the sample file with QCAD. I then imported it with the legacy importer and settings in the screensheet at the bottom
Result:
Is there an existing issue for this?
Problem description
Steps to reproduce:
Use legacy python importer
,Use layers
, CreatePart shapes
andGroup layers into blocks
.Also note the naming of the blocks: the block that should be under the
0
layer is named_
. I believe this is because there is already an object with the "0" label (the layer), so when the importer creates the child block with the same "0" label, FreeCAD renames it. The renaming logic seems to be to replace the first digit of the label by an underscore, if the label starts with a digit. A workaround is to prepend a letter to the label. Looking at the output of #16550, it seems that the legacy importer works around this by prependingblock
to the created block, but for some reason that is not happening here.Full version info
Subproject(s) affected?
File formats
Anything else?
No response
Code of Conduct