Semi-automatic parametrization

class qsketchmetric.semiautomatic.SemiAutomaticParameterization(input_dxf_path, default_value='c', output_dxf_path=None, accuracy=3)

Bases: object

Parameters:
  • input_dxf_path (Path) – Path to the DXF file to be parameterized.

  • default_value (str) – (Optional) Default expression describing the entities. Defaults to “c”.

  • output_dxf_path (Path | None) – (Optional) Path for the output parameterized DXF file. If not provided, the output file will be saved in the parametric directory, in the same directory as the input file. With the name input_file_name + _param.

  • accuracy (int) – (Optional) The precision used for calculations, represented by the number of decimal places. Defaults to 3.

The SemiAutomaticParameterize class is used to semi-automatic parameterize a DXF file. By semi-automatic, it means that the user has to manually customize the parameters of each entity after the automatic parameterization process. Process includes:

  • Adding MTEXT entity.

  • Adding VIRTUAL_LAYER layer.

  • Adding default expression to each entity.

  • Joining entities with virtual lines in to the one coherent graph.

parametrize()

The main method of the SemiAutomaticParameterize class. Parametrizes the DXF file and saves it to the output path.