scdatatools.forge.utils module

scdatatools.forge.utils.geometry_for_record(record, data_root=None, base=False)[source]

Return the primary Geometry associated with the given record.

Parameters:
  • record – Record to resolve the geometry

  • basebool whether or not to return the base geometry, or a dict of all tagged version of the geometry

  • data_root (Union[P4KFile, Path, None]) – If provided, resolve to the actual file or P4KInfo of the geometry within the data_root which can be a P4K or Path

scdatatools.forge.utils.read_and_seek(dcb, data_type, buffer=None)[source]

Reads a ctypes Structure from a buffer, then seeks the buffer to after the read data.

Parameters:
  • dcb – The DataCoreBinary related to this object. This will be assigned to the dcb attribute on the newly read ctypes.Structure

  • data_type – A ctypes object.

  • buffer – The