Skip to content

Read the surface entity family as modeler geometry#1155

Open
ilCosmico wants to merge 2 commits into
DomCR:masterfrom
ilCosmico:feature/surface-entities-read
Open

Read the surface entity family as modeler geometry#1155
ilCosmico wants to merge 2 commits into
DomCR:masterfrom
ilCosmico:feature/surface-entities-read

Conversation

@ilCosmico

Copy link
Copy Markdown
Contributor

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:

  • Surface carries the U/V isoline counts, one class per derived type, mapped by DXF name and subclass marker.
  • DWG: the surface types are routed in readUnlistedType to 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.
  • DXF: the surface types go through readEntity with 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.
  • Tests: in-memory DXF cases for the seven types, plus two DWG samples with loose extruded sheets (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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant