Read the surface entity family as modeler geometry#1155
Open
ilCosmico wants to merge 2 commits into
Open
Conversation
ilCosmico
force-pushed
the
feature/surface-entities-read
branch
from
July 20, 2026 10:06
6b14f44 to
c0bfe0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds read support for the surface entities: SURFACE, PLANESURFACE, EXTRUDEDSURFACE, LOFTEDSURFACE, REVOLVEDSURFACE, SWEPTSURFACE and NURBSURFACE. Until now the DWG reader turned them into UnknownEntity and the DXF reader discarded them, so their ACIS payload was lost.
The new classes derive from ModelerGeometry, and that is most of the trick: the payload extraction already in place works unchanged. Pre-2013 files carry the payload in the entity itself, 2013+ files in the AcDs data section (DWG) or ACDSDATA (DXF), and both attach points are generic over ModelerGeometry.
In detail:
Surfacecarries the U/V isoline counts, one class per derived type, mapped by DXF name and subclass marker.readUnlistedTypeto a reader that consumes the AcDbModelerGeometry common data. The subclass tails (sweep, loft and revolve parameters) are not decoded yet; the object data is length delimited, so the unread tail is skipped safely.readEntitywith the modeler geometry template, so codes 1/3 accumulate the SAT text and the subclass codes resolve through the map of the subclass being read.samples/surfaces), one saved as 2010 with the payload embedded in the entity and one as 2013 with the payload in the AcDs section.The write side is out of scope here: today a Brep is always written as 3DSOLID, and the surface subclass fields are not decoded yet. Both are planned as a follow-up, the same read-first sequence used for the ACIS payload extraction.