Skip to content

Commit

Permalink
Dimension feature
Browse files Browse the repository at this point in the history
  • Loading branch information
zecruel authored Jan 21, 2022
1 parent 30152fc commit 40dc9e7
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 27 deletions.
25 changes: 25 additions & 0 deletions src/dxf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,31 @@ int dxf_read (dxf_drawing *drawing, char *buf, long fsize, int *prog){
}
}

drawing->dimscale = 1.0;
drawing->dimlfac = 1.0;
drawing->dimpost[0] = '<'; drawing->dimpost[1] = '>'; drawing->dimpost[2] = 0;

if(dxf_find_head_var(drawing->head, "$DIMSCALE", &start, &end)){
part = dxf_find_attr_i2(start, end, 40, 0);
if (part != NULL){
drawing->dimscale = part->value.d_data;
}
}

if(dxf_find_head_var(drawing->head, "$DIMLFAC", &start, &end)){
part = dxf_find_attr_i2(start, end, 40, 0);
if (part != NULL){
drawing->dimlfac = part->value.d_data;
}
}

if(dxf_find_head_var(drawing->head, "$DIMPOST", &start, &end)){
part = dxf_find_attr_i2(start, end, 1, 0);
if (part != NULL){
strncpy (drawing->dimpost, part->value.s_data, DXF_MAX_CHARS);
}
}

//return drawing;
state = INIT;
*prog = 100;
Expand Down
4 changes: 4 additions & 0 deletions src/dxf.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ struct Dxf_drawing{

int version;

double dimlfac;
double dimscale;
char dimpost [DXF_MAX_CHARS + 1];

};
typedef struct Dxf_drawing dxf_drawing;

Expand Down
42 changes: 29 additions & 13 deletions src/dxf_dim.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "dxf_dim.h"

list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double scale,
double an_scale, int an_format,
list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent,
int an_format,
int term_type,
int tol_type, double tol_up, double tol_low)
{
Expand All @@ -26,7 +26,8 @@ list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double sca
int precision = 6; /* 6 digit */

char user_txt[DXF_MAX_CHARS+1] = "<>";
char tmp_str[21] = "";
char tmp_str[DXF_MAX_CHARS+1] = "";
char result_str[DXF_MAX_CHARS+1] = "";

current = ent->obj.content->next;

Expand Down Expand Up @@ -95,7 +96,7 @@ list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double sca
break;

case 101:
strncpy(tmp_str, current->value.s_data, 20);
strncpy(tmp_str, current->value.s_data, DXF_MAX_CHARS);
str_upp(tmp_str);
char *tmp = trimwhitespace(tmp_str);
if (strcmp (tmp, "EMBEDDED OBJECT") == 0 ){
Expand Down Expand Up @@ -126,31 +127,46 @@ list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double sca
/* terminators */
dir = (measure > 0.0) ? 1.0 : -1.0;

obj = dxf_new_line (0.0, 0.0, 0.0, -scale*dir, scale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
obj = dxf_new_line (0.0, 0.0, 0.0, -drawing->dimscale*dir, drawing->dimscale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_rot (obj, rot);
dxf_edit_move (obj, base_pt[0], base_pt[1], base_pt[2]);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */

obj = dxf_new_line (0.0, 0.0, 0.0, -scale*dir, -scale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
obj = dxf_new_line (0.0, 0.0, 0.0, -drawing->dimscale*dir, -drawing->dimscale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_rot (obj, rot);
dxf_edit_move (obj, base_pt[0], base_pt[1], base_pt[2]);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */

obj = dxf_new_line (-measure, 0.0, 0.0, scale*dir-measure, scale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
obj = dxf_new_line (-measure, 0.0, 0.0, drawing->dimscale*dir-measure, drawing->dimscale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_rot (obj, rot);
dxf_edit_move (obj, base_pt[0], base_pt[1], base_pt[2]);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */

obj = dxf_new_line (-measure, 0.0, 0.0, scale*dir-measure, -scale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
obj = dxf_new_line (-measure, 0.0, 0.0, drawing->dimscale*dir-measure, -drawing->dimscale*0.25, 0.0, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_rot (obj, rot);
dxf_edit_move (obj, base_pt[0], base_pt[1], base_pt[2]);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */

/* anotation */
snprintf (tmp_str, 20, "%.*g", precision, fabs(measure) * an_scale);
obj = dxf_new_mtext (0.0, 0.0, 0.0, 1.0, (char*[]){tmp_str}, 1, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
char *subst = strstr(user_txt, "<>"); /* try to find string "<>" in user text to replace with measure */
if (subst) { /* proceed to replace */
int len_front = subst - user_txt;
strncpy(result_str, user_txt, len_front); /* prefix */
snprintf (tmp_str, DXF_MAX_CHARS, "%.*g", precision, fabs(measure) * drawing->dimlfac); /* measure */
strncat(result_str, tmp_str, DXF_MAX_CHARS - len_front); /* prefix + measure */
len_front = strlen(result_str);
subst += 2;
strncat(result_str, subst, DXF_MAX_CHARS - len_front); /* prefix + measure + sufix*/
}
else if (strlen(user_txt) == 0) { /* if user text is "", then mesaure will be the annotation */
snprintf (result_str, DXF_MAX_CHARS, "%.*g", precision, fabs(measure) * drawing->dimlfac);
}
else { /* no replace mark - use the entire user text */
strncpy(result_str, user_txt, DXF_MAX_CHARS);
}
obj = dxf_new_mtext (0.0, 0.0, 0.0, 1.0, (char*[]){result_str}, 1, 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_attr_change(obj, 71, &an_place);
dxf_edit_scale (obj, scale, scale, scale);
dxf_edit_scale (obj, drawing->dimscale, drawing->dimscale, drawing->dimscale);
dxf_edit_rot (obj, rot);
dxf_edit_move (obj, an_pt[0], an_pt[1], an_pt[2]);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */
Expand All @@ -159,12 +175,12 @@ list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double sca
dir = ((-sine*(base_pt[0] - pt1[0])+ cosine*(base_pt[1] - pt1[1])) > 0.0) ? 1.0 : -1.0;

obj = dxf_new_line (base_pt[0], base_pt[1], base_pt[2], pt1[0], pt1[1], pt1[2], 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_move (obj, -scale * sine * 0.5 * dir, scale * cosine * 0.5 * dir, 0.0);
dxf_edit_move (obj, -drawing->dimscale * sine * 0.5 * dir, drawing->dimscale * cosine * 0.5 * dir, 0.0);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */

obj = dxf_new_line (base_pt[0] - cosine * measure, base_pt[1] - sine * measure, base_pt[2],
pt0[0], pt0[1], pt0[2], 0, "0", "BYBLOCK", -2, 0, FRAME_LIFE);
dxf_edit_move (obj, -scale * sine * 0.5 * dir, scale * cosine * 0.5 * dir, 0.0);
dxf_edit_move (obj, -drawing->dimscale * sine * 0.5 * dir, drawing->dimscale * cosine * 0.5 * dir, 0.0);
list_push(list, list_new((void *)obj, FRAME_LIFE)); /* store entity in list */


Expand Down
3 changes: 1 addition & 2 deletions src/dxf_dim.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#include "dxf_edit.h"

/* functions */
list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, double scale,
double an_scale, int an_format,
list_node * dxf_dim_linear_make(dxf_drawing *drawing, dxf_node * ent, int an_format,
int term_type,
int tol_type, double tol_up, double tol_low);

Expand Down
1 change: 1 addition & 0 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,7 @@ int gui_start(gui_obj *gui){
gui->show_tstyles_mng = 0;
gui->show_blk_mng = 0;
gui->show_ltyp_mng = 0;
gui->show_dim_mng = 0;
gui->show_config = 0;

gui->curr_path[0] = 0;
Expand Down
1 change: 1 addition & 0 deletions src/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ struct Gui_obj {
int show_tstyles_mng;
int show_blk_mng;
int show_ltyp_mng;
int show_dim_mng;
int show_config;


Expand Down
108 changes: 99 additions & 9 deletions src/gui_dim.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ int gui_dim_info (gui_obj *gui){
if (gui->modal != DIMENSION) return 0;
static int fix_angle = 0;
static double angle_fixed = 0.0;
static double scale = 1.0;
static double an_scale = 1.0;
static double dist_fixed = 3.0;
static int fix_dist = 0;

Expand All @@ -37,9 +35,6 @@ int gui_dim_info (gui_obj *gui){
else nk_label(gui->ctx, "Enter distance", NK_TEXT_LEFT);
}

scale = nk_propertyd(gui->ctx, "Scale", 1e-9, scale, 1.0e9, SMART_STEP(scale), SMART_STEP(scale));
an_scale = nk_propertyd(gui->ctx, "an_scale", 1e-9, an_scale, 1.0e9, SMART_STEP(an_scale), SMART_STEP(an_scale));

nk_checkbox_label(gui->ctx, "Fixed angle", &fix_angle);
if (fix_angle)
angle_fixed = nk_propertyd(gui->ctx, "Angle", -180.0, angle_fixed, 180.0, 1.0, 1.0);
Expand Down Expand Up @@ -87,9 +82,10 @@ int gui_dim_info (gui_obj *gui){
dxf_attr_change(new_dim, 42, &length);
angle *= 180.0/M_PI;
dxf_attr_change(new_dim, 50, &angle);
dxf_attr_change(new_dim, 1, gui->drawing->dimpost);

/* distance of dimension from measure points */
double dist = 3.0 * scale;
double dist = 3.0 * gui->drawing->dimscale;
double dir = 1.0;
if(fix_dist) dist = dist_fixed; /* user entered distance */
else if (gui->step == 2){ /* or calcule from points */
Expand All @@ -105,13 +101,13 @@ int gui_dim_info (gui_obj *gui){
dxf_attr_change(new_dim, 20, &base_y);

/* calcule dimension annotation (text) placement point (outer from perpenticular direction)*/
base_x += -length/2.0 * cosine - sine * 1.0 * dir * scale;
base_y += -length/2.0 * sine + cosine * 1.0 * dir * scale;
base_x += -length/2.0 * cosine - sine * 1.0 * dir * gui->drawing->dimscale;
base_y += -length/2.0 * sine + cosine * 1.0 * dir * gui->drawing->dimscale;
dxf_attr_change(new_dim, 11, &base_x); /* update dimension entity parameters */
dxf_attr_change(new_dim, 21, &base_y);

/* create dimension block contents as a list of entities ("render" the dimension "picture") */
list_node *list = dxf_dim_linear_make(gui->drawing, new_dim, scale, an_scale, 2, 0, 0, 0.0, 0.0);
list_node *list = dxf_dim_linear_make(gui->drawing, new_dim, 2, 0, 0, 0.0, 0.0);

/* draw phantom */
gui->phanton = dxf_list_parse(gui->drawing, list, 0, FRAME_LIFE);
Expand Down Expand Up @@ -159,4 +155,98 @@ int gui_dim_info (gui_obj *gui){
}

return 1;
}

int gui_dim_mng (gui_obj *gui){
int show_config = 1;
int i = 0;
gui->next_win_x += gui->next_win_w + 3;
//gui->next_win_y += gui->next_win_h + 3;
gui->next_win_w = 200;
gui->next_win_h = 300;

//if (nk_popup_begin(gui->ctx, NK_POPUP_STATIC, "config", NK_WINDOW_CLOSABLE, nk_rect(310, 50, 200, 300))){
if (nk_begin(gui->ctx, "Dimension Config", nk_rect(gui->next_win_x, gui->next_win_y, gui->next_win_w, gui->next_win_h),
NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
NK_WINDOW_CLOSABLE|NK_WINDOW_TITLE)){
static char dimscale_str[64] = "1.0";
static char dimlfac_str[64] = "1.0";
nk_flags res;

/* edit global dim scale */
nk_layout_row_dynamic(gui->ctx, 20, 1);
nk_label(gui->ctx, "Global Scale Factor:", NK_TEXT_LEFT);
res = nk_edit_string_zero_terminated(gui->ctx, NK_EDIT_SIMPLE|NK_EDIT_SIG_ENTER|NK_EDIT_SELECTABLE|NK_EDIT_AUTO_SELECT, dimscale_str, 63, nk_filter_float);
if (!(res & NK_EDIT_ACTIVE)){
snprintf(dimscale_str, 63, "%.9g", gui->drawing->dimscale);
}
if ((res & NK_EDIT_DEACTIVATED) || (res & NK_EDIT_COMMITED)){ /* probably, user change parameter string */
nk_edit_unfocus(gui->ctx);
if (strlen(dimscale_str)) /* update parameter value */
gui->drawing->dimscale = atof(dimscale_str);
snprintf(dimscale_str, 63, "%.9g", gui->drawing->dimscale);
/* change in DXF main struct */
dxf_node *start = NULL, *end = NULL, *part = NULL;
if(dxf_find_head_var(gui->drawing->head, "$DIMSCALE", &start, &end)){
/* variable exists */
part = dxf_find_attr_i2(start, end, 40, 0);
if (part != NULL){
part->value.d_data = gui->drawing->dimscale;
}
}
else{
dxf_attr_append(gui->drawing->head, 9, "$DIMSCALE", DWG_LIFE);
dxf_attr_append(gui->drawing->head, 40, &gui->drawing->dimscale, DWG_LIFE);
}
}

/* edit measure dim scale */
nk_label(gui->ctx, "Measure Scale Factor:", NK_TEXT_LEFT);
res = nk_edit_string_zero_terminated(gui->ctx, NK_EDIT_SIMPLE|NK_EDIT_SIG_ENTER|NK_EDIT_SELECTABLE|NK_EDIT_AUTO_SELECT, dimlfac_str, 63, nk_filter_float);
if (!(res & NK_EDIT_ACTIVE)){
snprintf(dimlfac_str, 63, "%.9g", gui->drawing->dimlfac);
}
if ((res & NK_EDIT_DEACTIVATED) || (res & NK_EDIT_COMMITED)){ /* probably, user change parameter string */
nk_edit_unfocus(gui->ctx);
if (strlen(dimlfac_str)) /* update parameter value */
gui->drawing->dimlfac = atof(dimlfac_str);
snprintf(dimlfac_str, 63, "%.9g", gui->drawing->dimlfac);
/* change in DXF main struct */
dxf_node *start = NULL, *end = NULL, *part = NULL;
if(dxf_find_head_var(gui->drawing->head, "$DIMLFAC", &start, &end)){
/* variable exists */
part = dxf_find_attr_i2(start, end, 40, 0);
if (part != NULL){
part->value.d_data = gui->drawing->dimlfac;
}
}
else{
dxf_attr_append(gui->drawing->head, 9, "$DIMLFAC", DWG_LIFE);
dxf_attr_append(gui->drawing->head, 40, &gui->drawing->dimlfac, DWG_LIFE);
}
}

nk_label(gui->ctx, "Annotation text:", NK_TEXT_LEFT);
res = nk_edit_string_zero_terminated(gui->ctx, NK_EDIT_SIMPLE|NK_EDIT_SIG_ENTER|NK_EDIT_SELECTABLE|NK_EDIT_AUTO_SELECT, gui->drawing->dimpost, DXF_MAX_CHARS, nk_filter_default);
if ((res & NK_EDIT_DEACTIVATED) || (res & NK_EDIT_COMMITED)){ /* probably, user change parameter string */
nk_edit_unfocus(gui->ctx);
/* change in DXF main struct */
dxf_node *start = NULL, *end = NULL, *part = NULL;
if(dxf_find_head_var(gui->drawing->head, "$DIMPOST", &start, &end)){
/* variable exists */
part = dxf_find_attr_i2(start, end, 1, 0);
if (part != NULL){
strncpy(part->value.s_data, gui->drawing->dimpost, DXF_MAX_CHARS);
}
}
else{
dxf_attr_append(gui->drawing->head, 9, "$DIMPOST", DWG_LIFE);
dxf_attr_append(gui->drawing->head, 1, &gui->drawing->dimpost, DWG_LIFE);
}
}

} else show_config = 0;
nk_end(gui->ctx);

return show_config;
}
2 changes: 1 addition & 1 deletion src/gui_ltype.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ int ltyp_mng (gui_obj *gui){
}
}

/* edit glogal drawing line type scale */
/* edit global drawing line type scale */
nk_layout_row(gui->ctx, NK_STATIC, 20, 4, (float[]){140, 100, 160,100});
nk_label(gui->ctx, "Global Scale Factor:", NK_TEXT_RIGHT);
res = nk_edit_string_zero_terminated(gui->ctx, NK_EDIT_SIMPLE|NK_EDIT_SIG_ENTER|NK_EDIT_SELECTABLE|NK_EDIT_AUTO_SELECT, ltscale_str, 63, nk_filter_float);
Expand Down
4 changes: 2 additions & 2 deletions src/gui_toolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ int gui_main_win(gui_obj *gui){
//printf("Blocks\n");
gui->show_blk_mng = 1;
}
if (nk_button_image_styled(gui->ctx, &gui->b_icon, nk_image_ptr(gui->svg_bmp[SVG_TAGS]))){
printf("APPID\n");
if (nk_button_image_styled(gui->ctx, &gui->b_icon, nk_image_ptr(gui->svg_bmp[SVG_DIM_CONFIG]))){
gui->show_dim_mng = 1;
}
nk_group_end(gui->ctx);
}
Expand Down
2 changes: 2 additions & 0 deletions src/gui_use.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ int gui_dim_interactive(gui_obj *gui);

int gui_dim_info (gui_obj *gui);

int gui_dim_mng (gui_obj *gui);

#endif
11 changes: 11 additions & 0 deletions src/i_svg_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,17 @@ char * svg_data[] = {
"<path stroke-width=\"7.1\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M89.7 51.78 L69.39 63.49 \"/>"
"<path stroke-width=\"7.1\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M89.7 37.59 L89.7 86 \"/>"
"</svg>"},

[SVG_DIM_CONFIG] = (char[]){"<svg width=\"96.0000\" height=\"96.0000\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
"<path fill=\"#f9f9f9\" stroke=\"none\" d=\"M14.02 27.97 L9.293 26.03 L9.293 21.7 L14.02 19.76 L16.43 13.94 L14.46 9.223 L17.52 6.16 L22.24 8.131 L28.06 5.722 L30 0.9918 L34.33 0.9918 L36.28 5.722 L42.09 8.131 L46.81 6.16 L49.87 9.223 L47.9 13.94 L50.31 19.76 L55.04 21.7 L55.04 26.03 L50.31 27.97 L47.9 33.79 L49.87 38.51 L46.81 41.57 L42.09 39.6 L36.28 42.01 L34.33 46.74 L30 46.74 L28.06 42.01 L22.24 39.6 L17.52 41.57 L14.46 38.51 L16.43 33.79 L14.02 27.97 M24.86 23.87 L24.89 24.58 L25 25.29 L25.17 25.99 L25.41 26.66 L25.72 27.31 L26.09 27.93 L26.52 28.51 L27 29.04 L27.53 29.52 L28.11 29.95 L28.72 30.32 L29.37 30.62 L30.05 30.86 L30.74 31.04 L31.45 31.14 L32.17 31.18 L32.88 31.14 L33.59 31.04 L34.29 30.86 L34.97 30.62 L35.62 30.32 L36.23 29.95 L36.81 29.52 L37.34 29.04 L37.82 28.51 L38.25 27.93 L38.62 27.31 L38.92 26.66 L39.17 25.99 L39.34 25.29 L39.45 24.58 L39.48 23.87 L39.45 23.15 L39.34 22.44 L39.17 21.74 L38.92 21.07 L38.62 20.42 L38.25 19.8 L37.82 19.23 L37.34 18.7 L36.81 18.21 L36.23 17.79 L35.62 17.42 L34.97 17.11 L34.29 16.87 L33.59 16.69 L32.88 16.59 L32.17 16.55 L31.45 16.59 L30.74 16.69 L30.05 16.87 L29.37 17.11 L28.72 17.42 L28.11 17.79 L27.53 18.21 L27 18.7 L26.52 19.23 L26.09 19.8 L25.72 20.42 L25.41 21.07 L25.17 21.74 L25 22.44 L24.89 23.15 L24.86 23.87 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M0 61.58 L20.3 49.87 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M0 61.58 L20.3 73.28 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M0 47.39 L0 95.8 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M0 61.58 L83.39 61.58 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M83.39 61.58 L63.09 49.87 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M83.39 61.58 L63.09 73.28 \"/>"
"<path stroke-width=\"3.6\" stroke=\"#f9f9f9\" fill=\"none\" d=\"M83.39 47.39 L83.39 95.8 \"/>"
"</svg>"},

};

Expand Down
1 change: 1 addition & 0 deletions src/i_svg_media.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ enum svg_list {
SVG_MIRROR,
SVG_HATCH,
SVG_DIM_LINEAR,
SVG_DIM_CONFIG,
SVG_MEDIA_SIZE
};

Expand Down
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,10 @@ int main(int argc, char** argv){
gui->show_config = config_win (gui);
}

if (gui->show_dim_mng){
gui->show_dim_mng = gui_dim_mng (gui);
}

if (progr_win){
/* opening */
if (nk_begin(gui->ctx, "Progress", nk_rect(200, 200, 400, 40),
Expand Down

0 comments on commit 40dc9e7

Please sign in to comment.