Skip to content

Commit

Permalink
Custom GCode editor: updated labels and tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmatena committed Sep 13, 2023
1 parent c669293 commit 7efdbec
Showing 1 changed file with 102 additions and 97 deletions.
199 changes: 102 additions & 97 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5020,8 +5020,8 @@ ReadOnlySlicingStatesConfigDef::ReadOnlySlicingStatesConfigDef()
ConfigOptionDef* def;

def = this->add("zhop", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Current z-hop");
def->tooltip = L("Contains z-hop present at the beginning of the custom G-code block.");
}

ReadWriteSlicingStatesConfigDef::ReadWriteSlicingStatesConfigDef()
Expand All @@ -5030,19 +5030,21 @@ ReadWriteSlicingStatesConfigDef::ReadWriteSlicingStatesConfigDef()

def = this->add("position", coFloats);
def->label = L("Position");
def->tooltip = L("");
def->tooltip = L("Position of the extruder at the beginning of the custom G-code block. If the custom G-code travels somewhere else, "
"it should write to this variable so PrusaSlicer knows where it travels from when it gets control back.");

def = this->add("e_retracted", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Retraction");
def->tooltip = L("Retraction state at the beginning of the custom G-code block. If the custom G-code moves the extruder axis, "
"it should write to this variable so PrusaSlicer deretracts correctly when it gets control back.");

def = this->add("e_restart_extra", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Extra deretraction");
def->tooltip = L("Currently planned extra extruder priming after deretraction.");

def = this->add("e_position", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Absolute E position");
def->tooltip = L("Current position of the extruder axis. Only used with absolute extruder addressing.");
}

OtherSlicingStatesConfigDef::OtherSlicingStatesConfigDef()
Expand All @@ -5051,171 +5053,173 @@ OtherSlicingStatesConfigDef::OtherSlicingStatesConfigDef()

def = this->add("current_extruder", coInt);
def->label = L("Current extruder");
def->tooltip = L("");
def->tooltip = L("Zero-based index of currently used extruder.");

def = this->add("current_object_idx", coInt);
def->label = L("Current object index");
def->tooltip = L("");
def->tooltip = L("Specific for sequential printing. Zero-based index of currently printed object.");

def = this->add("has_single_extruder_multi_material_priming", coBool);
def->label = L("Has single extruder MM priming");
def->tooltip = L("");
def->tooltip = L("Are the extra multi-material priming regions used in this print?");

def = this->add("has_wipe_tower", coBool);
def->label = L("Has wipe tower");
def->tooltip = L("");
def->tooltip = L("Whether or not wipe tower is being generated in the print.");

def = this->add("initial_extruder", coInt);
def->label = L("Initial extruder");
def->tooltip = L("");
def->tooltip = L("Zero-based index of the first extruder used in the print. Same as initial_tool.");

def = this->add("initial_filament_type", coStrings);
def->label = L("");
def->tooltip = L("");
def = this->add("initial_filament_type", coString);
def->label = L("Initial filament type");
def->tooltip = L("String containing filament type of the first used extruder.");

def = this->add("initial_tool", coInt);
def->label = L("Initial tool");
def->tooltip = L("");
def->tooltip = L("Zero-based index of the first extruder used in the print. Same as initial_extruder.");

def = this->add("is_extruder_used", coBools);
def->label = L("");
def->tooltip = L("");
def->label = L("Is extruder used?");
def->tooltip = L("Vector of bools stating whether a given extruder is used in the print.");
}

PrintStatisticsConfigDef::PrintStatisticsConfigDef()
{
ConfigOptionDef* def;

def = this->add("extruded_volume", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Volume per extruder");
def->tooltip = L("Total filament volume extruded per extruder during the entire print.");

def = this->add("normal_print_time", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Print time (normal mode)");
def->tooltip = L("Estimated print time when printed in normal mode (i.e. not in silent mode). Same as print_time.");

def = this->add("num_printing_extruders", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Number of printing extruders");
def->tooltip = L("Number of extruders used during the print.");

def = this->add("print_time", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Print time (normal mode)");
def->tooltip = L("Estimated print time when printed in normal mode (i.e. not in silent mode). Same as normal_print_time.");

def = this->add("printing_filament_types", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Used filament types");
def->tooltip = L("Comma-separated list of all filament types used during the print.");

def = this->add("silent_print_time", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Print time (silent mode)");
def->tooltip = L("Estimated print time when printed in silent mode.");

def = this->add("total_cost", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Total cost");
def->tooltip = L("Total cost of all material used in the print. Calculated from filament_cost value in Filament Settings.");

def = this->add("total_weight", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Total weight");
def->tooltip = L("Total weight of the print. Calculated from filament_density value in Filament Settings.");

def = this->add("total_wipe_tower_cost", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Total wipe tower cost");
def->tooltip = L("Total cost of the material wasted on the wipe tower. Calculated from filament_cost value in Filament Settings.");

def = this->add("total_wipe_tower_filament", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Wipe tower volume");
def->tooltip = L("Total filament volume extruded on the wipe tower.");

def = this->add("used_filament", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Used filament");
def->tooltip = L("Total length of filament used in the print.");

def = this->add("total_toolchanges", coInt);
def->label = L("Total toolchanges");
def->tooltip = L("");
def->tooltip = L("Number of toolchanges during the print.");

def = this->add("extruded_volume_total", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Total volume");
def->tooltip = L("Total volume of filament used during the entire print.");

def = this->add("extruded_weight", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Weight per extruder");
def->tooltip = L("Weight per extruder extruded during the entire print. Calculated from filament_density value in Filament Settings.");

def = this->add("extruded_weight_total", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Total weight");
def->tooltip = L("Total weight of the print. Calculated from filament_density value in Filament Settings.");

def = this->add("total_layer_count", coInt);
def->label = L("Total layer count");
def->tooltip = L("");
def->tooltip = L("Number of layers in the entire print.");
}

ObjectsInfoConfigDef::ObjectsInfoConfigDef()
{
ConfigOptionDef* def;

def = this->add("num_objects", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Number of objects");
def->tooltip = L("Total number of objects in the print.");

def = this->add("num_instances", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Number of instances");
def->tooltip = L("Total number of object instances in the print, summed over all objects.");

def = this->add("scale", coStrings);
def->label = L("");
def->tooltip = L("");

def = this->add("input_filename", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Scale per object");
def->tooltip = L("Contains a string with the information about what scaling was applied to the individual objects. "
"Indexing of the objects is zero-based (first object has index 0).\n"
"Example: 'x:100% y:50% z:100'.");

def = this->add("input_filename_base", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Input filename without extension");
def->tooltip = L("Source filename of the first object, without extension.");
}

DimensionsConfigDef::DimensionsConfigDef()
{
ConfigOptionDef* def;

const std::string point_tooltip = L("The vector has two elements: x and y coordinate of the point. Values in mm.");
const std::string bb_size_tooltip = L("The vector has two elements: x and y dimension of the bounding box. Values in mm.");

def = this->add("first_layer_print_convex_hull", coPoints);
def->label = L("");
def->tooltip = L("");
def->label = L("First layer convex hull");
def->tooltip = L("Vector of points of the first layer convex hull. Each element has the following format:"
"'[x, y]' (x and y are floating-point numbers in mm).");

def = this->add("first_layer_print_min", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Bottom-left corner of first layer bounding box");
def->tooltip = point_tooltip;

def = this->add("first_layer_print_max", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Top-right corner of first layer bounding box");
def->tooltip = point_tooltip;

def = this->add("first_layer_print_size", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Size of the first layer bounding box");
def->tooltip = bb_size_tooltip;

def = this->add("print_bed_min", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Bottom-left corner of print bed bounding box");
def->tooltip = point_tooltip;

def = this->add("print_bed_max", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Top-right corner of print bed bounding box");
def->tooltip = point_tooltip;

def = this->add("print_bed_size", coFloats);
def->label = L("");
def->tooltip = L("");
def->label = L("Size of the print bed bounding box");
def->tooltip = bb_size_tooltip;
}

TimestampsConfigDef::TimestampsConfigDef()
{
ConfigOptionDef* def;

def = this->add("timestamp", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Timestamp");
def->tooltip = L("String containing current time in yyyyMMdd-hhmmss format.");

def = this->add("year", coInt);
def->label = L("Year");
Expand Down Expand Up @@ -5247,24 +5251,25 @@ OtherPresetsConfigDef::OtherPresetsConfigDef()
ConfigOptionDef* def;

def = this->add("num_extruders", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Number of extruders");
def->tooltip = L("Total number of extruders, regardless of whether they are used in the current print.");

def = this->add("print_preset", coString);
def->label = L("");
def->tooltip = L("");
def->label = L("Print preset name");
def->tooltip = L("Name of the print preset used for slicing.");

def = this->add("filament_preset", coString);
def->label = L("");
def->tooltip = L("");
def->tooltip = L("Names of the filament presets used for slicing. The variable is a vector "
"containing one name for each extruder.");

def = this->add("printer_preset", coString);
def->label = L("");
def->tooltip = L("");
def->tooltip = L("Name of the printer preset used for slicing.");

def = this->add("physical_printer_preset", coString);
def->label = L("");
def->tooltip = L("");
def->tooltip = L("Name of the physical print preset used for slicing.");
}


Expand All @@ -5287,32 +5292,32 @@ CustomGcodeSpecificConfigDef::CustomGcodeSpecificConfigDef()
ConfigOptionDef* def;

def = this->add("layer_num", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Layer number");
def->tooltip = L("Index of the current layer. One-based (i.e. first layer is number 1).");

def = this->add("layer_z", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Layer z");
def->tooltip = L("Height of the current layer above the print bed, measured to the top of the layer.");

def = this->add("max_layer_z", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Maximal layer z");
def->tooltip = L("Height of the last layer above the print bed.");

def = this->add("filament_extruder_id", coInt);
def->label = L("");
def->tooltip = L("");

def = this->add("previous_extruder", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Previous extruder");
def->tooltip = L("Index of the extruder that is being unloaded. The index is zero based (first extruder has index 0).");

def = this->add("next_extruder", coInt);
def->label = L("");
def->tooltip = L("");
def->label = L("Next extruder");
def->tooltip = L("Index of the extruder that is being loaded. The index is zero based (first extruder has index 0).");

def = this->add("toolchange_z", coFloat);
def->label = L("");
def->tooltip = L("");
def->label = L("Toolchange z");
def->tooltip = L("Height above the print bed when the toolchange takes place. Usually the same as layer_z, but can be different.");
}

const CustomGcodeSpecificConfigDef custom_gcode_specific_config_def;
Expand Down

0 comments on commit 7efdbec

Please sign in to comment.