Body

class Body(GraphicEntity)

Introduced in DXF version R13 (AC1012), dxftype is BODY.

A 3D object created by an ACIS based geometry kernel provided by the Spatial Corp. Create Body objects in layouts and blocks by factory function add_body(). ezdxf will never interpret ACIS source code, don’t ask me for this feature.

Body.get_acis_data()

Get the ACIS source code as a list of strings.

Body.set_acis_data(test_lines)

Set the ACIS source code as a list of strings without line endings.

Body.edit_data()

Context manager for ACIS text lines, returns ModelerGeometryData:

with body_entity.edit_data as data:
    # data.text_lines is a standard Python list
    # remove, append and modify ACIS source code
    data.text_lines = ['line 1', 'line 2', 'line 3']  # replaces the whole ACIS content (with invalid data)

ModelerGeometryData

ModelerGeometryData:
ModelerGeometryData.text_lines

ACIS date as list of strings. (read/write)

ModelerGeometryData.__str__()

Return concatenated text_lines as one string, lines are separated by \n.