Reader_DXF#

class zeroheliumkit.src.importing.Reader_DXF(filename: str)[source]#

Bases: object

Helper class to import .dxf file into zhk dictionary.

Parameters:
  • filename (str) – The name of the DXF file.

  • geometries (dict) – A dictionary containing the extracted geometries from the DXF file.

  • dxf (ezdxf.DXFDocument) – The DXF document object.

NOTE: currently Arcs are not supported, and points will be ignored

Methods

convert_dxf2shapely(dxfentity_list)

Converts dxf entity into a Shapely MultiPolygon.

extract_geometries()

import2zhk()

Attributes

filename

geometries

dxf

extract_geometries()[source]#

” Extract geometries from the DXF file and group them by layer. Converts the DXF entities into Shapely MultiPolygon objects.

convert_dxf2shapely(dxfentity_list) MultiPolygon[source]#

Converts dxf entity into a Shapely MultiPolygon.

Parameters:

dxfentity_list (_type_) – dxf entity list

Returns:

converted geometries

Return type:

MultiPolygon