Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 23021) +++ trunk/src_plugins/export_openems/mesh.c (revision 23022) @@ -55,15 +55,18 @@ static void mesh2dlg(void) { int n; + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.pml, int_value, mesh.pml); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_obj, coord_value, PCB_MM_TO_COORD(0.15)); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_gap, coord_value, PCB_MM_TO_COORD(0.5)); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.min_space, coord_value, PCB_MM_TO_COORD(0.1)); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.smooth, int_value, 1); + PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.noimpl, int_value, 0); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.hor, int_value, 1); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.ver, int_value, 1); - PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.noimpl, int_value, 0); +TODO("enum lookup"); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.subslines, int_value, 3); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.def_subs_thick, coord_value, PCB_MM_TO_COORD(1.5)); +/* PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.def_copper_thick, coord_value, PCB_MM_TO_COORD(1.5));*/ PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_top, int_value, 1); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.air_bot, int_value, 1); PCB_DAD_SET_VALUE(ia.dlg_hid_ctx, ia.dens_air, coord_value, PCB_MM_TO_COORD(0.7)); @@ -87,9 +90,18 @@ mesh.dens_gap = ia.dlg[ia.dens_gap].default_val.coord_value; mesh.min_space = ia.dlg[ia.min_space].default_val.coord_value; mesh.smooth = ia.dlg[ia.smooth].default_val.int_value; - mesh.noimpl = ia.dlg[ia.noimpl].default_val.int_value;; + mesh.noimpl = ia.dlg[ia.noimpl].default_val.int_value; + mesh.hor = ia.dlg[ia.hor].default_val.int_value; + mesh.ver = ia.dlg[ia.ver].default_val.int_value; +TODO("enum lookup"); + mesh.subslines = ia.dlg[ia.subslines].default_val.int_value; mesh.def_subs_thick = ia.dlg[ia.def_subs_thick].default_val.coord_value; mesh.def_copper_thick = ia.dlg[ia.def_copper_thick].default_val.coord_value; + mesh.air_top = ia.dlg[ia.air_top].default_val.int_value; + mesh.air_bot = ia.dlg[ia.air_top].default_val.int_value; + mesh.dens_air = ia.dlg[ia.dens_air].default_val.coord_value; + mesh.smoothz = ia.dlg[ia.smoothz].default_val.int_value; + mesh.max_air = ia.dlg[ia.max_air].default_val.coord_value; for(n = 0; n < 6; n++) mesh.bnd[n] = bnds[ia.dlg[ia.bnd[n]].default_val.int_value]; } Index: trunk/src_plugins/export_openems/mesh.h =================================================================== --- trunk/src_plugins/export_openems/mesh.h (revision 23021) +++ trunk/src_plugins/export_openems/mesh.h (revision 23022) @@ -30,7 +30,15 @@ const char *bnd[6]; /* temporary: boundary conditions */ pcb_coord_t z_bottom_copper; /* z coordinate of the bottom copper layer, along the z-mesh (0 is the top copper) */ int pml; /* add pml cells around the exterior of the existing mesh of "perfectly matched" impedance */ - unsigned smooth:1; /* if set, avoid jumps in the meshing by gradually changing meshing distance */ + int subslines; /* number of mesh lines in substrate (z) */ + pcb_coord_t dens_air; /* mesh line density (spacing) in air */ + pcb_coord_t max_air; /* how far out to mesh in air */ + unsigned hor:1; /* enable adding horizontal mesh lines */ + unsigned ver:1; /* enable adding vertical mesh lines */ + unsigned smooth:1; /* if set, avoid jumps in the meshing by gradually changing meshing distance: x and y direction */ + unsigned smoothz:1; /* if set, avoid jumps in the meshing by gradually changing meshing distance: z direction */ + unsigned air_top:1; /* add mesh lines in air above the top of the board */ + unsigned air_bot:1; /* add mesh lines in air below the top of the board */ unsigned noimpl:1; /* when set, do not add extra implicit mesh lines, keep the explicit ones only */ } pcb_mesh_t;