Repository navigation
fix: add AEC_MODI and AEC_SYMB_SECTION as ProxyEntity in readUnlisted… - #1148
WallanceLee wants to merge 2 commits into
Conversation
|
@DomCR Could you review this PR and let me know if you need some modification? |
|
Hi @WallanceLee, Could you provide a file that contains those entities? Your solution may work for these entities but given that they are part of AEC, maybe there is a more generic and better solution to include the different objects that haven't been implemented like the Thanks! |
…Type AEC custom objects (TDbSymbModi, TDbSymbSection) from BIM applications like Revit/Tianzheng are stored in DWG with proxy graphics for fallback display in AutoCAD. ACadSharp previously read these as UnknownEntity, causing their proxy graphics to be lost. Route them through readProxyEntity() so the proxy geometry data is preserved in ProxyGeometries for downstream exporters.
Replace the hardcoded AEC_MODI and AEC_SYMB_SECTION cases with a generic fallback that routes every unlisted AEC class through the proxy readers, based on the class naming: dxf name AEC* (covers AEC_/AECS_/AECB_), application name Aec* or cpp class name Aec*/TDb* (covers the Tianzheng/Revit TDb family). - objects stored in proxy format (e.g. saved without their application) are read as ProxyEntity or ProxyObject keeping the proxy graphics and the class definition, see DomCR#1148 - objects stored in their native format fall back to the unknown object readers, the proxy attempt runs on a copy of the readers so the object stream is not corrupted on failure - extend the DxfClass notification suppression to ProxyObject Implements the review comment of PR DomCR#1148 requesting a generic solution for the AEC objects that are not implemented yet instead of hardcoding AEC_MODI/AEC_SYMB_SECTION.
24ebd06 to
0289d75
Compare
|
@DomCR @domeitzinger Hi, I have rewritten all with more general method. Could you give me some suggestions? |
|
Any news? |
|
Hi @WallanceLee, I don't think this is a good approach for the AEC and TArch entities or objects are not written as proxies, they have it's own structure. As an example you can check the Related issue: Also, the current implementation stores the Proxy Graphics when reading the different entities so it should not be a difference if they have stored graphics. |
|
If you want to procede with this branch, you can try to explore the data from each individual component and compare it to the entity in the file, and create their own reading method. Let me know how you want to continue or if I can help you in any way. |
|
I'd suggest closing this one, though of course that is your call — thanks for digging into it, and the AEC class-name survey in the second commit was useful. I went through the reader path and the premise does not hold: the proxy graphics are already preserved for every entity, including the ones this PR targets.
What routing through You were also right that these objects have their own structure. A proxy entity has its own object type in the file ( The part of this worth keeping is the opposite direction, and I have sent it as #1274: the retained data of a proxy was never read at all. and that section is the only place where the original object payload survives once it has been saved as a proxy. It has no length of its own — it runs from the end of the proxy fields up to the start of the handle section — and the reader already computes that offset while splitting the object stream, so it just needed to be kept and used. With it read, Happy to keep working on this branch instead if you would rather go that way — just say so, and thanks again for the investigation. |
AEC custom objects (TDbSymbModi, TDbSymbSection) from BIM applications like Revit/Tianzheng are stored in DWG with proxy graphics for fallback display in AutoCAD. ACadSharp previously read these as UnknownEntity, causing their proxy graphics to be lost. Route them through readProxyEntity() so the proxy geometry data is preserved in ProxyGeometries for downstream exporters.
Description
I don't have a further knownledge about the case branches, and following is from my test data and notification handler.
Tasks done in this PR
Related Issues / Pull Requests
Notes for reviewer