Read DXF for XCAF output
A DXF-to-XCAF workflow connects the DXF reader to the XCAF writer. Select the model items and output representation needed by the receiving application.
Read DXF entities through the DXF component and identify curves, embedded BRep bodies and mesh data. DXF import and export support mesh workflows as well as BRep, but the actual source entities determine which path is available.
Build and store an XCAF document
Use existing mesh data or tessellate imported BRep faces for a polygonal target. A curve-only drawing requires surface construction before a surface-mesh export; this is a modeling step that cannot be inferred from the DXF extension.
Place the imported geometry in an XCAF document and map the supported names, colors and structure to its labels. Use the native OCCT document storage appropriate to the selected XBF or XML delivery. Mesh data can remain mesh in the document; creating labels does not generate analytic CAD surfaces.
Check the XCAF result
Check drawing units, entity coverage and placements. Establish how layers, names and supported colors map to the receiving document instead of assuming that CAD drawing organization is identical to a scene hierarchy.
Reopen the document in the intended OCCT application and verify geometry, occurrence placements and mapped attributes. Keep application-specific additions distinct from source properties. XCAF storage is useful for continuing an OCCT workflow, but the recipient must support the chosen document format.
Discuss this conversion with the producing and receiving applications, representative files and required geometry and attributes. Compare the reader/writer catalog when a different representation is needed.