three-slicer 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/README.md +9 -4
- package/THIRD-PARTY-NOTICES.md +7 -2
- package/components/dist/SettingsPanel.js +12 -176
- package/data/config-schema-lean.json +1 -0
- package/data/ui-tree-keys.json +1 -0
- package/engine/src/client.js +12 -2
- package/engine/src/data.js +6 -0
- package/engine/src/settings.js +12 -627
- package/engine/src/slicer.worker.js +6 -1
- package/engine/src/slicer_core.js +0 -0
- package/engine/src/slicer_core.mt.js +0 -0
- package/engine/src/toggle_eval.js +9 -77
- package/package.json +20 -10
- package/types/client.d.ts +5 -2
- package/types/components.d.ts +3 -29
- package/types/settings.d.ts +3 -0
- package/types/toggle.d.ts +2 -22
- package/types/viewer-gcode.d.ts +2 -29
- package/types/viewer-loaders.d.ts +1 -33
- package/types/viewer-toolpath.d.ts +3 -113
- package/types/viewer.d.ts +6 -174
- package/types/worker.d.ts +2 -1
- package/viewer/dist/Viewport.js +9 -5489
- package/viewer/dist/gcode_reexport.js +1 -0
- package/viewer/dist/loaders_reexport.js +1 -0
- package/viewer/dist/toolpath_reexport.js +1 -0
- package/components/README.md +0 -44
- package/components/styles.css +0 -84
- package/engine/src/kernel_setting_keys.js +0 -132
- package/engine/src/preset_file.js +0 -99
- package/viewer/README.md +0 -375
- package/viewer/dist/gcode_parse.js +0 -190
- package/viewer/dist/make_worker.js +0 -31
- package/viewer/dist/model_loaders.js +0 -184
- package/viewer/dist/parse_3mf-C2X_W442.js +0 -300
- package/viewer/dist/parse_3mf.worker.js +0 -10
- package/viewer/dist/sl1_encode.worker.js +0 -10
- package/viewer/dist/sl1_write-UHmQ_itC.js +0 -170
- package/viewer/dist/sla_reconstruct-CXkYhux2.js +0 -176
- package/viewer/dist/sla_reconstruct.worker.js +0 -24
- package/viewer/dist/sla_slice.worker.js +0 -74
- package/viewer/dist/toolpath_gpu-4foc4FaU.js +0 -482
- package/viewer/dist/toolpath_gpu.js +0 -13
- package/viewer/styles.css +0 -353
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"TabPrint::build":["layer_height","initial_layer_print_height","line_width","initial_layer_line_width","outer_wall_line_width","inner_wall_line_width","top_surface_line_width","sparse_infill_line_width","internal_solid_infill_line_width","support_line_width","bridge_line_width","seam_position","staggered_inner_seams","seam_gap","seam_slope_type","seam_slope_conditional","scarf_angle_threshold","scarf_overhang_threshold","scarf_joint_speed","seam_slope_start_height","seam_slope_entire_loop","seam_slope_min_length","seam_slope_steps","scarf_joint_flow_ratio","seam_slope_inner_walls","role_based_wipe_speed","wipe_speed","wipe_on_loops","wipe_before_external_loop","slice_closing_radius","resolution","enable_arc_fitting","xy_hole_compensation","xy_contour_compensation","elefant_foot_compensation","elefant_foot_layers_density","elefant_foot_compensation_layers","precise_outer_wall","precise_z_height","hole_to_polyhole","hole_to_polyhole_threshold","hole_to_polyhole_twisted","hole_to_polyhole_max_edges","ironing_type","ironing_pattern","ironing_flow","ironing_spacing","ironing_inset","ironing_angle","ironing_angle_fixed","zaa_enabled","zaa_minimize_perimeter_height","zaa_min_z","zaa_dont_alternate_fill_direction","wall_generator","wall_transition_angle","wall_transition_filter_deviation","wall_transition_length","wall_distribution_count","initial_layer_min_bead_width","min_bead_width","min_feature_size","min_length_factor","wall_maximum_resolution","wall_maximum_deviation","wall_sequence","is_infill_first","wall_direction","print_flow_ratio","top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","set_other_flow_ratios","first_layer_flow_ratio","outer_wall_flow_ratio","inner_wall_flow_ratio","overhang_flow_ratio","sparse_infill_flow_ratio","internal_solid_infill_flow_ratio","gap_fill_flow_ratio","support_flow_ratio","support_interface_flow_ratio","only_one_wall_first_layer","only_one_wall_top","min_width_top_surface","reduce_crossing_wall","max_travel_detour_distance","small_area_infill_flow_compensation","bridge_flow","internal_bridge_flow","bridge_density","internal_bridge_density","thick_bridges","thick_internal_bridges","enable_extra_bridge_layer","dont_filter_internal_bridges","counterbore_hole_bridging","detect_overhang_wall","make_overhang_printable","make_overhang_printable_angle","make_overhang_printable_hole_size","extra_perimeters_on_overhangs","overhang_reverse","overhang_reverse_internal_only","overhang_reverse_threshold","wall_loops","alternate_extra_wall","detect_thin_wall","top_shell_layers","top_shell_thickness","top_surface_density","top_surface_pattern","top_surface_fill_order","top_layer_direction","top_surface_expansion","top_surface_expansion_margin","top_surface_expansion_direction","bottom_shell_layers","bottom_shell_thickness","bottom_surface_density","bottom_surface_pattern","bottom_surface_fill_order","bottom_layer_direction","center_of_surface_pattern","top_bottom_infill_wall_overlap","sparse_infill_density","fill_multiline","sparse_infill_pattern","gyroid_optimized","infill_direction","sparse_infill_rotate_template","skin_infill_density","skeleton_infill_density","infill_lock_depth","skin_infill_depth","skin_infill_line_width","skeleton_infill_line_width","symmetric_infill_y_axis","infill_shift_step","lateral_lattice_angle_1","lateral_lattice_angle_2","infill_overhang_angle","lightning_overhang_angle","lightning_prune_angle","lightning_straightening_angle","infill_anchor_max","infill_anchor","internal_solid_infill_pattern","solid_infill_direction","solid_infill_rotate_template","gap_fill_target","filter_out_gap_fill","separated_infills","infill_wall_overlap","align_infill_direction_to_model","extra_solid_infills","bridge_angle","internal_bridge_angle","relative_bridge_angle","minimum_sparse_infill_area","infill_combination","infill_combination_max_layer_height","detect_narrow_internal_solid_infill","ensure_vertical_shell_thickness","initial_layer_speed","initial_layer_infill_speed","initial_layer_travel_speed","slow_down_layers","outer_wall_speed","inner_wall_speed","small_perimeter_speed","small_perimeter_threshold","sparse_infill_speed","internal_solid_infill_speed","top_surface_speed","gap_infill_speed","ironing_speed","support_speed","support_interface_speed","small_support_perimeter_speed","small_support_perimeter_threshold","enable_overhang_speed","slowdown_for_curled_perimeters","<custom-widget line:2887>","<custom-widget line:2892>","travel_speed","default_acceleration","outer_wall_acceleration","inner_wall_acceleration","bridge_acceleration","sparse_infill_acceleration","internal_solid_infill_acceleration","initial_layer_acceleration","initial_layer_travel_acceleration","top_surface_acceleration","travel_acceleration","accel_to_decel_enable","accel_to_decel_factor","default_junction_deviation","default_jerk","outer_wall_jerk","inner_wall_jerk","infill_jerk","top_surface_jerk","initial_layer_jerk","initial_layer_travel_jerk","travel_jerk","max_volumetric_extrusion_rate_slope","max_volumetric_extrusion_rate_slope_segment_length","extrusion_rate_smoothing_external_perimeter_only","enable_support","support_type","support_style","support_threshold_angle","support_threshold_overlap","raft_first_layer_density","raft_first_layer_expansion","support_on_build_plate_only","support_critical_regions_only","support_remove_small_overhang","raft_layers","raft_contact_distance","support_filament","support_interface_filament","support_interface_not_for_body","support_ironing","support_ironing_pattern","support_ironing_flow","support_ironing_spacing","support_top_z_distance","support_bottom_z_distance","tree_support_wall_count","support_base_pattern","support_base_pattern_spacing","support_angle","support_interface_top_layers","support_interface_bottom_layers","support_interface_pattern","support_interface_spacing","support_bottom_interface_spacing","support_expansion","support_object_xy_distance","support_object_first_layer_gap","bridge_no_support","max_bridge_length","independent_support_layer_height","tree_support_tip_diameter","tree_support_branch_distance","tree_support_branch_distance_organic","tree_support_top_rate","tree_support_branch_diameter","tree_support_branch_diameter_organic","tree_support_branch_diameter_angle","tree_support_branch_angle","tree_support_branch_angle_organic","tree_support_angle_slow","tree_support_auto_brim","tree_support_brim_width","enable_prime_tower","prime_tower_skip_points","enable_tower_interface_features","enable_tower_interface_cooldown_during_tower","prime_tower_enable_framework","prime_tower_width","prime_volume","prime_tower_brim_width","prime_tower_infill_gap","wipe_tower_rotation_angle","wipe_tower_bridging","wipe_tower_extra_spacing","wipe_tower_extra_flow","wipe_tower_max_purge_speed","wipe_tower_wall_type","wipe_tower_cone_angle","wipe_tower_extra_rib_length","wipe_tower_rib_width","wipe_tower_fillet_wall","wipe_tower_no_sparse_layers","single_extruder_multi_material_priming","outer_wall_filament_id","inner_wall_filament_id","sparse_infill_filament_id","internal_solid_filament_id","top_surface_filament_id","bottom_surface_filament_id","wipe_tower_filament","ooze_prevention","standby_temperature_delta","preheat_time","preheat_steps","flush_into_infill","flush_into_objects","flush_into_support","interlocking_beam","toolchange_ordering","interface_shells","mmu_segmented_region_max_width","mmu_segmented_region_interlocking_depth","interlocking_beam_width","interlocking_orientation","interlocking_beam_layer_count","interlocking_depth","interlocking_boundary_avoidance","skirt_loops","skirt_type","min_skirt_length","skirt_distance","skirt_start_angle","skirt_speed","skirt_height","draft_shield","single_loop_draft_shield","brim_type","brim_width","brim_object_gap","brim_flow_ratio","brim_use_efc_outline","combine_brims","brim_ears_max_angle","brim_ears_detection_length","slicing_mode","print_sequence","print_order","spiral_mode","spiral_mode_smooth","spiral_mode_max_xy_smoothing","spiral_starting_flow_ratio","spiral_finishing_flow_ratio","timelapse_type","enable_wrapping_detection","fuzzy_skin","fuzzy_skin_mode","fuzzy_skin_noise_type","fuzzy_skin_point_distance","fuzzy_skin_thickness","fuzzy_skin_scale","fuzzy_skin_octaves","fuzzy_skin_persistence","fuzzy_skin_ripples_per_layer","fuzzy_skin_ripple_offset","fuzzy_skin_layers_between_ripple_offset","fuzzy_skin_first_layer","reduce_infill_retraction","gcode_add_line_number","gcode_comments","gcode_label_objects","exclude_object","print_plugin_config_overrides"],"TabPrintModel::build":[],"TabPrintPlate::build":[],"TabFilament::add_filament_overrides_page":["filament_retraction_length","filament_z_hop","filament_z_hop_types","filament_retract_lift_above","filament_retract_lift_below","filament_retract_lift_enforce","filament_retraction_speed","filament_deretraction_speed","filament_retract_restart_extra","filament_retraction_minimum_travel","filament_retract_when_changing_layer","filament_wipe","filament_wipe_distance","filament_retract_before_wipe","filament_retract_after_wipe","filament_long_retractions_when_cut","filament_retraction_distances_when_cut","filament_ironing_flow","filament_ironing_spacing","filament_ironing_inset","filament_ironing_speed"],"TabFilament::build":["filament_type","filament_vendor","filament_soluble","filament_is_support","filament_change_length","required_nozzle_HRC","default_filament_colour","filament_diameter","filament_adhesiveness_category","filament_density","filament_shrink","filament_shrinkage_compensation_z","filament_cost","temperature_vitrification","idle_temperature","<custom-widget line:4302>","pellet_flow_coefficient","filament_flow_ratio","enable_pressure_advance","pressure_advance","adaptive_pressure_advance","adaptive_pressure_advance_overhangs","adaptive_pressure_advance_bridges","activate_chamber_temp_control","<custom-widget line:4353>","<custom-widget line:4374>","<custom-widget line:4382>","<custom-widget line:4389>","<custom-widget line:4396>","<custom-widget line:4403>","<custom-widget line:4410>","<custom-widget line:4417>","filament_adaptive_volumetric_speed","filament_max_volumetric_speed","close_fan_the_first_x_layers","initial_layer_fan_speed","full_fan_speed_layer","<custom-widget line:4477>","<custom-widget line:4482>","reduce_fan_stop_start_freq","slow_down_for_layer_cooling","dont_slow_down_outer_wall","slow_down_min_speed","enable_overhang_bridge_fan","overhang_fan_threshold","overhang_fan_speed","internal_bridge_fan_speed","support_material_interface_fan_speed","ironing_fan_speed","additional_cooling_fan_speed","activate_air_filtration","<custom-widget line:4506>","<custom-widget line:4513>","filament_plugin_config_overrides","filament_minimal_purge_on_wipe_tower","filament_tower_interface_pre_extrusion_dist","filament_tower_interface_pre_extrusion_length","filament_tower_ironing_area","filament_tower_interface_purge_volume","filament_tower_interface_print_temp","long_retractions_when_ec","retraction_distances_when_ec","filament_loading_speed_start","filament_loading_speed","filament_unloading_speed_start","filament_unloading_speed","filament_toolchange_delay","filament_cooling_moves","filament_cooling_initial_speed","filament_cooling_final_speed","filament_stamping_loading_speed","filament_stamping_distance","filament_multitool_ramming","filament_multitool_ramming_volume","filament_multitool_ramming_flow"],"TabPrinter::build_fff":["parallel_printheads_count","printable_height","support_multi_bed_types","best_object_pos","z_offset","preferred_orientation","printer_structure","gcode_flavor","pellet_modded_printer","bbl_use_printhost","use_3mf","scan_first_layer","enable_power_loss_recovery","disable_m73","use_relative_e_distances","use_firmware_retraction","time_cost","printer_plugin_config_overrides","<custom-widget line:5072>","fan_kickstart","part_cooling_fan_min_pwm","extruder_clearance_radius","extruder_clearance_height_to_rod","extruder_clearance_height_to_lid","bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance","adaptive_bed_mesh_margin","nozzle_type","nozzle_hrc","auxiliary_fan","fan_direction","support_chamber_temp_control","support_air_filtration","cooling_filter_enabled"],"TabPrinter::build_kinematics_page":["emit_machine_limits_to_gcode","resonance_avoidance","<custom-widget line:5386>","input_shaping_emit","input_shaping_type","<custom-widget line:5395>","<custom-widget line:5402>","machine_max_speed_x","machine_max_speed_y","machine_max_speed_z","machine_max_speed_e","machine_max_acceleration_x","machine_max_acceleration_y","machine_max_acceleration_z","machine_max_acceleration_e","machine_max_acceleration_extruding","machine_max_acceleration_retracting","machine_max_acceleration_travel","machine_max_junction_deviation","machine_max_jerk_x","machine_max_jerk_y","machine_max_jerk_z","machine_max_jerk_e"],"TabPrinter::build_unregular_pages":["single_extruder_multi_material","manual_filament_change","bed_temperature_formula","wipe_tower_type","purge_in_prime_tower","enable_filament_ramming","tool_change_on_wipe_tower","cooling_tube_retraction","cooling_tube_length","parking_pos_retraction","extra_loading_move","high_current_on_filament_swap","machine_load_filament_time","machine_unload_filament_time","machine_tool_change_time","nozzle_diameter","nozzle_volume","extruder_printable_height","min_layer_height","max_layer_height","extruder_offset","retraction_length","retract_restart_extra","retraction_speed","deretraction_speed","retraction_minimum_travel","retract_when_changing_layer","wipe","wipe_distance","retract_before_wipe","retract_after_wipe","retract_lift_enforce","z_hop_types","z_hop","travel_slope","retract_lift_above","retract_lift_below","retract_length_toolchange","retract_restart_extra_toolchange","long_retractions_when_cut","retraction_distances_when_cut"],"TabPrinter::build_sla":["max_print_height","display_width","display_height","<custom-widget line:3032>","display_orientation","display_mirror_x","display_mirror_y","<custom-widget line:3044>","<custom-widget line:3053>","absolute_correction","elefant_foot_compensation","elefant_foot_min_width","gamma_correction","min_exposure_time","max_exposure_time","min_initial_exposure_time","max_initial_exposure_time","sla_archive_format","sla_output_precision"],"TabSLAMaterial::build":["material_colour","bottle_cost","bottle_volume","bottle_weight","material_density","initial_layer_height","exposure_time","initial_exposure_time","<custom-widget line:5492>","zcorrection_layers","<custom-widget line:5502>","material_print_speed","area_fill","<custom-widget line:5560>","<custom-widget line:5590>"],"TabSLAPrint::build":["layer_height","faded_layers","supports_enable","support_tree_type","support_enforcers_only","support_points_density_relative","support_head_front_diameter","support_head_penetration","support_head_width","support_pillar_diameter","support_small_pillar_diameter_percent","support_max_bridges_on_pillar","support_pillar_connection_mode","support_buildplate_only","support_pillar_widening_factor","support_max_weight_on_model","support_base_diameter","support_base_height","support_base_safety_distance","support_object_elevation","<custom-widget line:5890>","support_critical_angle","support_max_bridge_length","support_max_pillar_link_distance","pad_enable","pad_wall_thickness","pad_wall_height","pad_brim_size","pad_max_merge_distance","pad_wall_slope","pad_around_object","pad_around_object_everywhere","pad_object_gap","pad_object_connector_stride","pad_object_connector_width","pad_object_connector_penetration","hollowing_enable","hollowing_min_thickness","hollowing_quality","hollowing_closing_distance","slice_closing_radius","slicing_mode"]}
|
package/engine/src/client.js
CHANGED
|
@@ -39,6 +39,15 @@ const slaTransferables = (job) => job.objects.flatMap(object => [object, ...(obj
|
|
|
39
39
|
// plain-asset rule instead and was copied verbatim, still importing an unhashed `./slicer_core.js` that dist
|
|
40
40
|
// did not contain — a 404 on the first message, visible only in a production build. Same reason the viewer
|
|
41
41
|
// keeps make_worker.js out of its own bundle. Do not factor this expression out.
|
|
42
|
+
/**
|
|
43
|
+
* The WASM kernel's worker, as a factory. This is the one thing a slicing viewer needs that the permissive
|
|
44
|
+
* package cannot ship: `three-slicer-viewer`'s `useSlicer` takes it as `deps.makeWorker`, and
|
|
45
|
+
* `three-slicer/viewer` binds it. Written as the full literal expression for the same reason as below.
|
|
46
|
+
*/
|
|
47
|
+
export function makeSlicerWorker() {
|
|
48
|
+
return new Worker(new URL('./slicer.worker.js', import.meta.url), { type: 'module' })
|
|
49
|
+
}
|
|
50
|
+
|
|
42
51
|
export function createSlicerClient(worker = new Worker(new URL('./slicer.worker.js', import.meta.url), { type: 'module' })) {
|
|
43
52
|
const pending = [] // FIFO of {expect, resolve, reject, onProgress, onLayer, chunks, layers}
|
|
44
53
|
let cancelFlag = null // Uint32Array over the worker's SharedArrayBuffer — mt kernel only
|
|
@@ -87,8 +96,9 @@ export function createSlicerClient(worker = new Worker(new URL('./slicer.worker.
|
|
|
87
96
|
return {
|
|
88
97
|
worker,
|
|
89
98
|
|
|
90
|
-
/** Load the kernel ahead of the first slice, so the first one is not also a 4MB download.
|
|
91
|
-
|
|
99
|
+
/** Load the kernel ahead of the first slice, so the first one is not also a 4MB download. Says which variant
|
|
100
|
+
* loaded — mt (threads) or st — because the two are a measured 9.8x apart and a host may want to say so. */
|
|
101
|
+
warmup: () => send({ cmd: 'warmup' }).then(reply => ({ kernel: reply?.kernel ?? null })),
|
|
92
102
|
|
|
93
103
|
/**
|
|
94
104
|
* Slice. `params` may be an object — it is stringified here, which the raw protocol does not do for you.
|
package/engine/src/data.js
CHANGED
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
// "inconsistent import attributes". Only this file holds the JSON; everything else imports this module
|
|
8
8
|
// as external -> no JSON import survives in the bundle, so the mismatch cannot arise.
|
|
9
9
|
export { default as schema } from 'three-slicer/data/config-schema.json' with { type: 'json' }
|
|
10
|
+
// The reduced pair: `type`/`default`/`enum_values`/bounds only, and the ui tree's option keys without
|
|
11
|
+
// its page and group names. Everything they drop is upstream's authored text (packages/PROVENANCE.md
|
|
12
|
+
// section 5) and nothing that only needs to KNOW a key reads it — 402KB -> 87KB and 34KB -> 15KB.
|
|
13
|
+
// A settings form still needs the full artifacts; a consumer that just derives params does not.
|
|
14
|
+
export { default as leanSchema } from 'three-slicer/data/config-schema-lean.json' with { type: 'json' }
|
|
15
|
+
export { default as uiTreeKeys } from 'three-slicer/data/ui-tree-keys.json' with { type: 'json' }
|
|
10
16
|
export { default as uiTree } from 'three-slicer/data/ui-tree.json' with { type: 'json' }
|
|
11
17
|
export { default as toggleRules } from 'three-slicer/data/toggle-rules.json' with { type: 'json' }
|
|
12
18
|
export { default as invalidationMap } from 'three-slicer/data/invalidation-map.json' with { type: 'json' }
|