-
-
Notifications
You must be signed in to change notification settings - Fork 54
Cannot manually override numeric format (INCH/METRIC) or number of digits (drill file) #241
Copy link
Copy link
Closed
Labels
drillParsing error when reading drill filesParsing error when reading drill files
Description
I'm writing because I happened to work with a drill file, whose format is not detected correctly. If I try to remove the autodetect from the tool (by deactivating the checkbox) and try to change the unit from INCH to METRIC, it ignores the command and returns INCH again. Analyzing the drill.c file, I realized that in reality my setting is overwritten. To fix this you need to:
In the function drill_parse_header_is_metric_comment, add the check of autod (like if (state->autod)), before the final return:
if (state->autod) {
state->header_number_format = state->number_format = FMT_USER;
state->decimals = digits_after;
state->autod = 0;
}
Same thing in drill_parse_header_is_inch, again before the final return, you need to add the same condition:
if (state->autod) {
state->unit = GERBV_UNIT_INCH;
}
In my opinion, this fix is necessary and should be applied.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
drillParsing error when reading drill filesParsing error when reading drill files