from typing import Union


class WriteNst:
    def __init__(self):
        super().__init__()
        self.commands = []

    def info_section(
            self,
            version: str = '7',
            count: Union[str, int] = 0,
            rohteile_anzahl: Union[str, int] = 1,
            nest_teil_anzahl: Union[str, int] = 0,
            wzg_name: str = '7507D_196',
            wzg_config_name: str = '',
            teil_im_teil: Union[int, str] = 1,
            fill_mode_o_parts: Union[int, str] = 0,
            samepart_dist: Union[int, str] = 0,
            combine_boards: Union[int, str] = 0,
            use_multi_nest: Union[int, str] = 1,
            fix_part_rotation: Union[int, str] = 0,
            fill_mode_last_part: Union[int, str] = 0,
            anschnitte_ignore: Union[int, str] = 0,
            anschnitteignore_lead_in_out: Union[int, str] = 0,
            nestxy: Union[int, str] = 0,
            schnittspalt: Union[int, str] = 14,
            schnittspalt_zugabe: Union[int, str] = 0,
            time_nest: Union[int, str] = 10,
            time_nest_more: Union[int, str] = 3,
            time_compact: Union[int, str] = 3,
            compact: Union[int, str] = 1,
            threads_count: Union[int, str] = 3,
            max_nested_raw_parts: Union[int, str] = 1,
            kom_mode: Union[int, str] = 1,
            kleine_teil_nicht_am_rand: Union[int, str] = 1,
            kleine_teil_rand_abstand: Union[int, str] = 13,
            tolerance: Union[int, float, str] = 0.01,
            rest_contour_offset: Union[int, str] = 0,
            rest_contour_offset_on: Union[int, str] = 0

    ):
        """
        INFO SECTION OF THE .nst FILE
        INCLUDES:
        Version of the file, machine name, machine configuration, count of nest parts, raw boards... etc.
        It includes basic information about the .nst file
        AND it includes the configuration of the nest process.
        """
        info_section = \
            f"""[Info]
Version={version}
TeileAnzahl={count}
RohteileAnzahl={rohteile_anzahl}
NestTeilAnzahl={nest_teil_anzahl}
WZGName={wzg_name}
WZGConfigName={wzg_config_name}
TeilImTeil={teil_im_teil}
FillModeOtherParts={fill_mode_o_parts}
SamePartDist={samepart_dist}
CombineBoards={combine_boards}
UseMultiNest={use_multi_nest}
FixPartRotation={fix_part_rotation}
FillModeLastPart={fill_mode_last_part}
AnschnitteIgnorieren={anschnitte_ignore}
AnschnitteIgnorierenLeadInOutCountour={anschnitteignore_lead_in_out}
NestXY={nestxy}
Schnittspalt={schnittspalt}
SchnittspaltZugabe={schnittspalt_zugabe}
TimeNest={time_nest}
TimeNestMore={time_nest_more}
TimeCompact={time_compact}
Compact={compact}
ThreadsCount={threads_count}
MaxNestedRawParts={max_nested_raw_parts}
KomMode={kom_mode}
KleineTeileNichtAmRand={kleine_teil_nicht_am_rand}
KleinTeilRandAbstand={kleine_teil_rand_abstand}
Tolerance={tolerance}
RestContour_Offset={rest_contour_offset}
RestContour_OffsetOn={rest_contour_offset_on}
"""

        self.commands.append(info_section)

    def rohteil_data(self,
                     rohteil_no: Union[int, str] = 1,
                     path: str = '',
                     platten_anzahl: Union[int, str] = 1,
                     order_text: str = '',
                     raw_board_name: str = '',
                     rest_id: Union[int, str] = '',
                     length: Union[int, str, float] = 2800,
                     width: Union[int, str, float] = 2070,
                     thickness: Union[int, str, float] = 18,
                     randabstand: Union[int, str] = 15,
                     border_dist_left: Union[int, str] = 0,
                     border_dist_right: Union[int, str] = 0,
                     border_dist_top: Union[int, str] = 0,
                     border_dist_bottom: Union[int, str] = 0,
                     orientierung: Union[int, str] = 2,
                     wenden_um_achse: Union[int, str] = 0,
                     texture: Union[int, str] = 0,
                     used: Union[int, str] = 1,
                     compact_kind: Union[int, str] = 0) -> None:
        """
        Raw board data - Used to enter available boards for processing
        Includes the name of the material, how much of that material is on hand... etc.
        """
        rohteil_data = f"""[Rohteil{rohteil_no}]
Dateiname={path}
PlattenAnzahl={platten_anzahl}
Lagerbez='{order_text}'
Werkstoff='{raw_board_name}'
RestID='{rest_id}'
Breite={length}
Hoehe={width}
Dicke={thickness}
Randabstand={randabstand}
BorderDistLeft={border_dist_left}
BorderDistRight={border_dist_right}
BorderDistTop={border_dist_top}
BorderDistBottom={border_dist_bottom}
Orientierung={orientierung}
WendenUmAchse={wenden_um_achse}
Walzrichtung={texture}
Used={used}
CompactKind={compact_kind}
"""
        self.commands.append(rohteil_data)

    def piece_info(self,
                   piece_number: Union[int, str] = 1,
                   part_path: str = '',
                   anzahl: Union[int, str] = 1,
                   fuell_anzahl: Union[int, str] = 5,
                   ist_anzahl: Union[int, str] = 0,
                   schritt_winkel: Union[int, str] = 90,
                   prioritaet: Union[int, str] = 0,
                   texture: Union[int, str] = 0,
                   spiegel_bar: Union[int, str] = 0,
                   ober_unter_seite: Union[int, str] = 0,
                   hop_name: str = '',
                   material: str = '',
                   fx_s: str = '_',
                   fy_s: str = '_',
                   fz_s: str = '_',
                   use_it: Union[int, str] = 1,
                   dicke: Union[int, str] = '',
                   act_part_index: Union[int, str] = 0,
                   hv__hhdata_art_no: Union[int, str] = 1,
                   hv__hhdata_info: str = '',
                   hv__hhdata_type: Union[int, str] = '',
                   hv__hhdata_label_pos_x: Union[int, str] = -1,
                   hv__hhdata_label_pos_y: Union[int, str] = -1,
                   hv__hhdata_order_id: Union[int, str] = '',
                   hv__hhdata_order_text1: Union[int, str] = '',
                   hv__hhdata_order_text2: Union[int, str] = '',
                   hv__hhdata_free_text1: Union[int, str] = '',
                   hv__hhdata_free_text2: Union[int, str] = '',
                   hv__hhdata_free_text3: Union[int, str] = '',
                   hv__hhdata_free_text4: Union[int, str] = '',
                   hv__hhdata_free_text5: Union[int, str] = '',
                   hv__hhdata_free_text6: Union[int, str] = '',
                   hv__hhdata_free_text7: Union[int, str] = '',
                   hv__hhdata_free_text8: Union[int, str] = '',
                   hv__hhdata_free_text9: Union[int, str] = '',
                   hv__hhdata_free_text10: Union[int, str] = '',
                   hv__hhdata_edge_pic_front_left: Union[int, str] = '',
                   hv__hhdata_edge_pic_front_right: Union[int, str] = '',
                   hv__hhdata_edge_pic_back_left: Union[int, str] = '',
                   hv__hhdata_edge_pic_back_right: Union[int, str] = '',
                   hv__hhdata_inlay_inside: Union[int, str] = '',
                   hv__hhdata_inlay_outside: Union[int, str] = '',
                   hv__hhdata_edge_dim_right: Union[int, str] = '',
                   hv__hhdata_edge_typ_right: Union[int, str] = '',
                   hv__hhdata_edge_prg_right: Union[int, str] = '',
                   hv__hhdata_edge_mat_right: Union[int, str] = '',
                   hv__hhdata_edge_saum_right: Union[int, str] = '',
                   hv__hhdata_edge_add_right: Union[int, str] = '',
                   hv__hhdata_edge_dim_left: Union[int, str] = '',
                   hv__hhdata_edge_typ_left: Union[int, str] = '',
                   hv__hhdata_edge_prg_left: Union[int, str] = '',
                   hv__hhdata_edge_mat_left: Union[int, str] = '',
                   hv__hhdata_edge_saum_left: Union[int, str] = '',
                   hv__hhdata_edge_add_left: Union[int, str] = '',
                   hv__hhdata_edge_dim_back: Union[int, str] = '',
                   hv__hhdata_edge_typ_back: Union[int, str] = '',
                   hv__hhdata_edge_prg_back: Union[int, str] = '',
                   hv__hhdata_edge_mat_back: Union[int, str] = '',
                   hv__hhdata_edge_saum_back: Union[int, str] = '',
                   hv__hhdata_edge_add_back: Union[int, str] = '',
                   hv__hhdata_edge_dim_front: Union[int, str] = '',
                   hv__hhdata_edge_typ_front: Union[int, str] = '',
                   hv__hhdata_edge_prg_front: Union[int, str] = '',
                   hv__hhdata_edge_mat_front: Union[int, str] = '',
                   hv__hhdata_edge_saum_front: Union[int, str] = '',
                   hv__hhdata_edge_add_front: Union[int, str] = '',
                   hv__hhdata_work_mode: Union[int, str] = '',
                   hv__hhdata_version: Union[int, str] = '',
                   hv__hhdata_label_id: Union[int, str] = '',
                   hv__hhdata_commission: Union[int, str] = '',
                   hv__hhdata_corpus: Union[int, str] = '',
                   hv__hhdata_bit_pattern: Union[int, str] = '',
                   hv__hhdata_assigned_machine: Union[int, str] = '',
                   hv__hhdata_object: Union[int, str] = '',
                   hv__hhdata_object_length: Union[int, str] = '',
                   hv__hhdata_object_width: Union[int, str] = '',
                   hv__hhdata_object_depth: Union[int, str] = '',
                   hv__hhdata_hop_image1: Union[int, str] = '',
                   hv__hhdata_hop_image2: Union[int, str] = '',
                   hv__hhdata_hop_image3: Union[int, str] = '',
                   hv__hhdata_id: Union[int, str] = '',
                   hv__hhdata_inlay: Union[int, str] = '',
                   hv__hhdata_optimization_status: Union[int, str] = '',
                   hv__hhdata_count: Union[int, str] = '',
                   hv_dx: Union[int, str] = '',
                   hv_dy: Union[int, str] = '',
                   hv_tool_id: Union[int, str] = '',
                   hv_special_tool_id: Union[int, str] = 0,
                   hv_distance: Union[int, str, float] = '',
                   _hhdata_order_id: Union[int, str] = '',
                   _hhdata_order_text1: str = '',
                   _hhdata_order_text2: str = '',
                   _hhdata_art_no: Union[int, str] = '',
                   _hhdata_info: str = '',
                   _hhdata_type: str = '',
                   _hhdata_storage_id: Union[int, str] = '',
                   _hhdata_material: Union[int, str] = '',
                   _hhdata_label_pos_x: Union[int, str] = -1,
                   _hhdata_label_pos_y: Union[int, str] = -1,
                   _hhdata_free_text1: str = '',
                   _hhdata_free_text2: str = '',
                   _hhdata_free_text3: str = '',
                   _hhdata_free_text4: str = '',
                   _hhdata_free_text5: str = '',
                   _hhdata_free_text6: str = '',
                   _hhdata_free_text7: str = '',
                   _hhdata_free_text8: str = '',
                   _hhdata_free_text9: str = '',
                   _hhdata_free_text10: str = '',
                   _hhdata_hori_drill_count: Union[int, str] = '',
                   _hhdata_edge_pic_front_left: Union[int, str] = '',
                   _hhdata_edge_pic_front_right: Union[int, str] = '',
                   _hhdata_edge_pic_back_left: Union[int, str] = '',
                   _hhdata_edge_pic_back_right: Union[int, str] = '',
                   _hhdata_inlay_inside: Union[int, str] = '',
                   _hhdata_inlay_outside: Union[int, str] = '',
                   _hhdata_edge_dim_right: Union[int, str] = '',
                   _hhdata_edge_typ_right: Union[int, str] = '',
                   _hhdata_edge_prg_right: Union[int, str] = '',
                   _hhdata_edge_mat_right: Union[int, str] = '',
                   _hhdata_edge_saum_right: Union[int, str] = '',
                   _hhdata_edge_add_right: Union[int, str] = '',
                   _hhdata_edge_dim_left: Union[int, str] = '',
                   _hhdata_edge_typ_left: Union[int, str] = '',
                   _hhdata_edge_prg_left: Union[int, str] = '',
                   _hhdata_edge_mat_left: Union[int, str] = '',
                   _hhdata_edge_saum_left: Union[int, str] = '',
                   _hhdata_edge_add_left: Union[int, str] = '',
                   _hhdata_edge_dim_back: Union[int, str] = '',
                   _hhdata_edge_typ_back: Union[int, str] = '',
                   _hhdata_edge_prg_back: Union[int, str] = '',
                   _hhdata_edge_mat_back: Union[int, str] = '',
                   _hhdata_edge_saum_back: Union[int, str] = '',
                   _hhdata_edge_add_back: Union[int, str] = '',
                   _hhdata_edge_typ_front: Union[int, str] = '',
                   _hhdata_edge_prg_front: Union[int, str] = '',
                   _hhdata_edge_mat_front: Union[int, str] = '',
                   _hhdata_edge_saum_front: Union[int, str] = '',
                   _hhdata_edge_add_front: Union[int, str] = '',
                   _hhdata_label_id: Union[int, str] = '',
                   _hhdata_commission: Union[int, str] = '',
                   _hhdata_corpus: Union[int, str] = '',
                   _hhdata_bit_pattern: Union[int, str] = '',
                   _hhdata_assigned_machine: Union[int, str] = '',
                   _hhdata_object: Union[int, str] = '',
                   _hhdata_object_length: Union[int, str] = '',
                   _hhdata_object_width: Union[int, str] = '',
                   _hhdata_object_depth: Union[int, str] = '',
                   _hhdata_hop_image1: Union[int, str] = '',
                   _hhdata_hop_image2: Union[int, str] = '',
                   _hhdata_hop_image3: Union[int, str] = '',
                   _hhdata_name: Union[int, str] = '',
                   _hhdata_id: Union[int, str] = '',
                   _hhdata_inlay: Union[int, str] = '',
                   _hhdata_optimization_status: Union[int, str] = '',
                   _hhdata_count: Union[int, str] = '',
                   _hhdata_raw_lenght: Union[int, str] = '',
                   _hhdata_raw_width: Union[int, str] = '',
                   _hhdata_job_id: Union[int, str] = '',
                   nc_data_vars_count: Union[int, str] = '') -> None:
        piece = f"""[Teil{piece_number}]
Dateiname={part_path}
Anzahl={anzahl}
FuellAnzahl={fuell_anzahl}
IstAnzahl={ist_anzahl}
Schrittwinkel={schritt_winkel}
Prioritaet={prioritaet}
Walzrichtung={texture}
Spiegelbar={spiegel_bar}
OberUnterSeite={ober_unter_seite}
IDName={hop_name}
Material='{material}'
FX_S={fx_s}
FY_S={fy_s}
FZ_S={fz_s}
Useit={use_it}
Dicke={dicke}
ActPartIndex={act_part_index}
HV_DX={hv_dx}
HV_DY={hv_dy}
HV__hhdata_ArtNo='{hv__hhdata_art_no}'
HV__hhdata_Info='{hv__hhdata_info}'
HV__hhdata_Type='{hv__hhdata_type}'
HV__hhdata_LabelPosX={hv__hhdata_label_pos_x}
HV__hhdata_LabelPosY={hv__hhdata_label_pos_y}
HV__hhdata_OrderID='{hv__hhdata_order_id}'
HV__hhdata_OrderText1='{hv__hhdata_order_text1}'
HV__hhdata_OrderText2='{hv__hhdata_order_text2}'
HV__hhdata_FreeText1='{hv__hhdata_free_text1}'
HV__hhdata_FreeText2='{hv__hhdata_free_text2}'
HV__hhdata_FreeText3={hv__hhdata_free_text3}
HV__hhdata_FreeText4={hv__hhdata_free_text4}
HV__hhdata_FreeText5={hv__hhdata_free_text5}
HV__hhdata_FreeText6='{hv__hhdata_free_text6}'
HV__hhdata_FreeText7='{hv__hhdata_free_text7}'
HV__hhdata_FreeText8='{hv__hhdata_free_text8}'
HV__hhdata_FreeText9='{hv__hhdata_free_text9}'
HV__hhdata_FreeText10='{hv__hhdata_free_text10}'
HV__hhdata_EdgePicFrontLeft='{hv__hhdata_edge_pic_front_left}'
HV__hhdata_EdgePicFrontRight='{hv__hhdata_edge_pic_front_right}'
HV__hhdata_EdgePicBackLeft='{hv__hhdata_edge_pic_back_left}'
HV__hhdata_EdgePicBackRight='{hv__hhdata_edge_pic_back_right}'
HV__hhdata_InlayInside='{hv__hhdata_inlay_inside}'
HV__hhdata_InlayOutside='{hv__hhdata_inlay_outside}'
HV__hhdata_EdgeDimRight='{hv__hhdata_edge_dim_right}'
HV__hhdata_EdgeTypRight='{hv__hhdata_edge_typ_right}'
HV__hhdata_EdgePrgRight='{hv__hhdata_edge_prg_right}'
HV__hhdata_EdgeMatRight='{hv__hhdata_edge_mat_right}'
HV__hhdata_EdgeSaumRight='{hv__hhdata_edge_saum_right}'
HV__hhdata_EdgeAddRight='{hv__hhdata_edge_add_right}'
HV__hhdata_EdgeDimLeft='{hv__hhdata_edge_dim_left}'
HV__hhdata_EdgeTypLeft='{hv__hhdata_edge_typ_left}'
HV__hhdata_EdgePrgLeft='{hv__hhdata_edge_prg_left}'
HV__hhdata_EdgeMatLeft='{hv__hhdata_edge_mat_left}'
HV__hhdata_EdgeSaumLeft='{hv__hhdata_edge_saum_left}'
HV__hhdata_EdgeAddLeft='{hv__hhdata_edge_add_left}'
HV__hhdata_EdgeDimBack='{hv__hhdata_edge_dim_back}'
HV__hhdata_EdgeTypBack='{hv__hhdata_edge_typ_back}'
HV__hhdata_EdgePrgBack='{hv__hhdata_edge_prg_back}'
HV__hhdata_EdgeMatBack='{hv__hhdata_edge_mat_back}'
HV__hhdata_EdgeSaumBack='{hv__hhdata_edge_saum_back}'
HV__hhdata_EdgeAddBack='{hv__hhdata_edge_add_back}'
HV__hhdata_EdgeDimFront='{hv__hhdata_edge_dim_front}'
HV__hhdata_EdgeTypFront='{hv__hhdata_edge_typ_front}'
HV__hhdata_EdgePrgFront='{hv__hhdata_edge_prg_front}'
HV__hhdata_EdgeMatFront='{hv__hhdata_edge_mat_front}'
HV__hhdata_EdgeSaumFront='{hv__hhdata_edge_saum_front}'
HV__hhdata_EdgeAddFront='{hv__hhdata_edge_add_front}'
HV__hhdata_WorkMode='{hv__hhdata_work_mode}'
HV__hhdata_Version={hv__hhdata_version}
HV__hhdata_LabelID='{hv__hhdata_label_id}'
HV__hhdata_Commission='{hv__hhdata_commission}'
HV__hhdata_Corpus='{hv__hhdata_corpus}'
HV__hhdata_BitPattern='{hv__hhdata_bit_pattern}'
HV__hhdata_AssignedMachine='{hv__hhdata_assigned_machine}'
HV__hhdata_Object='{hv__hhdata_object}'
HV__hhdata_ObjectLength='{hv__hhdata_object_length}'
HV__hhdata_ObjectWidth='{hv__hhdata_object_width}'
HV__hhdata_ObjectDepth='{hv__hhdata_object_depth}'
HV__hhdata_HopImage1='{hv__hhdata_hop_image1}'
HV__hhdata_HopImage2='{hv__hhdata_hop_image2}'
HV__hhdata_HopImage3='{hv__hhdata_hop_image3}'
HV__hhdata_Id='{hv__hhdata_id}'
HV__hhdata_Inlay='{hv__hhdata_inlay}'
HV__hhdata_OptimizationStatus='{hv__hhdata_optimization_status}'
HV__hhdata_Count='{hv__hhdata_count}'
HV_ToolID={hv_tool_id}
HV_SpecialToolID={hv_special_tool_id}
HV_distance={hv_distance}
_hhdata_OrderID='{_hhdata_order_id}'
_hhdata_OrderText1='{_hhdata_order_text1}'
_hhdata_OrderText2='{_hhdata_order_text2}'
_hhdata_ArtNo='{_hhdata_art_no}'
_hhdata_Info='{_hhdata_info}'
_hhdata_Type='{_hhdata_type}'
_hhdata_StorageID={_hhdata_storage_id}
_hhdata_Material='{_hhdata_material}'
_hhdata_LabelPosX={_hhdata_label_pos_x}
_hhdata_LabelPosY={_hhdata_label_pos_y}
_hhdata_FreeText1='{_hhdata_free_text1}'
_hhdata_FreeText2='{_hhdata_free_text2}'
_hhdata_FreeText3={_hhdata_free_text3}
_hhdata_FreeText4='{_hhdata_free_text4}'
_hhdata_FreeText5={_hhdata_free_text5}
_hhdata_FreeText6='{_hhdata_free_text6}'
_hhdata_FreeText7='{_hhdata_free_text7}'
_hhdata_FreeText8='{_hhdata_free_text8}'
_hhdata_FreeText9='{_hhdata_free_text9}'
_hhdata_FreeText10='{_hhdata_free_text10}'
_hhdata_HoriDrillCount={_hhdata_hori_drill_count}
_hhdata_EdgePicFrontLeft='{_hhdata_edge_pic_front_left}'
_hhdata_EdgePicFrontRight='{_hhdata_edge_pic_front_right}'
_hhdata_EdgePicBackLeft='{_hhdata_edge_pic_back_left}'
_hhdata_EdgePicBackRight='{_hhdata_edge_pic_back_right}'
_hhdata_InlayInside='{_hhdata_inlay_inside}'
_hhdata_InlayOutside='{_hhdata_inlay_outside}'
_hhdata_EdgeDimRight='{_hhdata_edge_dim_right}'
_hhdata_EdgeTypRight='{_hhdata_edge_typ_right}'
_hhdata_EdgePrgRight='{_hhdata_edge_prg_right}'
_hhdata_EdgeMatRight='{_hhdata_edge_mat_right}'
_hhdata_EdgeSaumRight='{_hhdata_edge_saum_right}'
_hhdata_EdgeAddRight='{_hhdata_edge_add_right}'
_hhdata_EdgeDimLeft='{_hhdata_edge_dim_left}'
_hhdata_EdgeTypLeft='{_hhdata_edge_typ_left}'
_hhdata_EdgePrgLeft='{_hhdata_edge_prg_left}'
_hhdata_EdgeMatLeft='{_hhdata_edge_mat_left}'
_hhdata_EdgeSaumLeft='{_hhdata_edge_saum_left}'
_hhdata_EdgeAddLeft='{_hhdata_edge_add_left}'
_hhdata_EdgeDimBack='{_hhdata_edge_dim_back}'
_hhdata_EdgeTypBack='{_hhdata_edge_typ_back}'
_hhdata_EdgePrgBack='{_hhdata_edge_prg_back}'
_hhdata_EdgeMatBack='{_hhdata_edge_mat_back}'
_hhdata_EdgeSaumBack='{_hhdata_edge_saum_back}'
_hhdata_EdgeAddBack='{_hhdata_edge_add_back}'
_hhdata_EdgeTypFront='{_hhdata_edge_typ_front}'
_hhdata_EdgePrgFront='{_hhdata_edge_prg_front}'
_hhdata_EdgePrgFront='{_hhdata_edge_prg_front}'
_hhdata_EdgeMatFront='{_hhdata_edge_mat_front}'
_hhdata_EdgeSaumFront='{_hhdata_edge_saum_front}'
_hhdata_EdgeAddFront='{_hhdata_edge_add_front}'
_hhdata_LabelID='{_hhdata_label_id}'
_hhdata_Commission='{_hhdata_commission}'
_hhdata_Corpus='{_hhdata_corpus}'
_hhdata_BitPattern='{_hhdata_bit_pattern}'
_hhdata_AssignedMachine='{_hhdata_assigned_machine}'
_hhdata_Object='{_hhdata_object}'
_hhdata_ObjectLength='{_hhdata_object_length}'
_hhdata_ObjectWidth='{_hhdata_object_width}'
_hhdata_ObjectDepth='{_hhdata_object_depth}'
_hhdata_HopImage1='{_hhdata_hop_image1}'
_hhdata_HopImage2='{_hhdata_hop_image2}'
_hhdata_HopImage3='{_hhdata_hop_image3}'
_hhdata_Name={_hhdata_name}
_hhdata_Id='{_hhdata_id}'
_hhdata_Inlay='{_hhdata_inlay}'
_hhdata_OptimizationStatus='{_hhdata_optimization_status}'
_hhdata_Count='{_hhdata_count}'
_hhdata_RawLenght={_hhdata_raw_lenght}
_hhdata_RawWidth={_hhdata_raw_width}
_hhdata_JobID={_hhdata_job_id}
NCDataVarsCount={nc_data_vars_count}
"""
        self.commands.append(piece)

    def write_nst(self,
                  file_name: str = ''):
        with open(file_name, 'w') as wf:
            wf.write('\n'.join(self.commands))

    def return_nst(self) -> str: 
        return '\n'.join(self.commands)

