diff --git a/print_settings/multimaterial/multimaterial_settings_flush_options.md b/print_settings/multimaterial/multimaterial_settings_flush_options.md index 1a44c08..46b77c5 100644 --- a/print_settings/multimaterial/multimaterial_settings_flush_options.md +++ b/print_settings/multimaterial/multimaterial_settings_flush_options.md @@ -1,5 +1,7 @@ # Flush Options +[Variable](built_in_placeholders_variables): `flush_into_objects`. + ## Flush into objects' infill [Variable](built_in_placeholders_variables): `flush_into_infill`. diff --git a/print_settings/multimaterial/multimaterial_settings_ooze_prevention.md b/print_settings/multimaterial/multimaterial_settings_ooze_prevention.md index 8bbec3a..2b1f0bb 100644 --- a/print_settings/multimaterial/multimaterial_settings_ooze_prevention.md +++ b/print_settings/multimaterial/multimaterial_settings_ooze_prevention.md @@ -1,5 +1,7 @@ # Ooze prevention +[Mode](option_mode): `Advanced`. +[Variable](built_in_placeholders_variables): `ooze_prevention`. This option will drop the temperature of the inactive extruders to prevent oozing. ## Temperature variation diff --git a/print_settings/multimaterial/multimaterial_settings_prime_tower.md b/print_settings/multimaterial/multimaterial_settings_prime_tower.md index f015ad7..2109c5f 100644 --- a/print_settings/multimaterial/multimaterial_settings_prime_tower.md +++ b/print_settings/multimaterial/multimaterial_settings_prime_tower.md @@ -1,5 +1,8 @@ # Prime Tower +[Modes](option_mode): +`Simple` [Variables](built_in_placeholders_variables): `enable_prime_tower`, `prime_volume`. +`Advanced` [Variables](built_in_placeholders_variables): `prime_tower_skip_points`, `enable_tower_interface_features`, `enable_tower_interface_cooldown_during_tower`, `prime_tower_enable_framework`, `prime_tower_infill_gap`, `single_extruder_multi_material_priming`. The wiping tower can be used to clean up the residue on the nozzle and " "stabilize the chamber pressure inside the nozzle, in order to avoid " "appearance defects when printing objects. diff --git a/print_settings/others/others_settings_fuzzy_skin.md b/print_settings/others/others_settings_fuzzy_skin.md index 3a9b7d2..f543301 100644 --- a/print_settings/others/others_settings_fuzzy_skin.md +++ b/print_settings/others/others_settings_fuzzy_skin.md @@ -1,5 +1,7 @@ # Fuzzy Skin +[Mode](option_mode): `Simple`. +[Variable](built_in_placeholders_variables): `fuzzy_skin`. Fuzzy skin randomly perturbs the wall path to produce a deliberately rough, matte appearance on the model surface. These settings control where the effect is applied, how the noise is generated, and how aggressive the displacement or extrusion modulation is. diff --git a/print_settings/quality/quality_settings_layer_height.md b/print_settings/quality/quality_settings_layer_height.md index 430f017..6fb8d7f 100644 --- a/print_settings/quality/quality_settings_layer_height.md +++ b/print_settings/quality/quality_settings_layer_height.md @@ -1,5 +1,6 @@ # Layer Height +[Variables](built_in_placeholders_variables): `layer_height`, `initial_layer_print_height`. Layer height defines the vertical thickness of each printed layer, playing a crucial role in both print quality and printing speed. > [!NOTE] diff --git a/print_settings/quality/quality_settings_line_width.md b/print_settings/quality/quality_settings_line_width.md index 087716a..d0b2e3e 100644 --- a/print_settings/quality/quality_settings_line_width.md +++ b/print_settings/quality/quality_settings_line_width.md @@ -1,5 +1,7 @@ # Line Width +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `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`. These settings define how wide each extruded line of filament will be. Line width can be configured in two ways: diff --git a/print_settings/quality/quality_settings_wall_generator.md b/print_settings/quality/quality_settings_wall_generator.md index 3ca5377..ded4b9e 100644 --- a/print_settings/quality/quality_settings_wall_generator.md +++ b/print_settings/quality/quality_settings_wall_generator.md @@ -1,5 +1,7 @@ # Wall Generator +[Mode](option_mode): `Advanced`. +[Variable](built_in_placeholders_variables): `wall_generator`. The Wall Generator defines how the outer and inner walls (perimeters) of the model are printed. - [Classic](#classic) diff --git a/print_settings/quality/quality_settings_z_contouring.md b/print_settings/quality/quality_settings_z_contouring.md index ab81240..d69dad5 100644 --- a/print_settings/quality/quality_settings_z_contouring.md +++ b/print_settings/quality/quality_settings_z_contouring.md @@ -1,5 +1,7 @@ # Z Contouring +[Mode](option_mode): `Expert`. +[Variable](built_in_placeholders_variables): `zaa_enabled`. Z contouring, also called Z-layer anti-aliasing or ZAA, reduces visible stair-stepping on curved and sloped top surfaces by adjusting the Z height of individual extrusion points so the toolpath follows the original model surface more closely. ![z-contouring](https://github.com/OrcaSlicer/OrcaSlicer_WIKI/blob/main/images/z-contouring/z-contouring.jpg?raw=true) diff --git a/print_settings/speed/speed_settings_acceleration.md b/print_settings/speed/speed_settings_acceleration.md index d3ff531..6bc6df4 100644 --- a/print_settings/speed/speed_settings_acceleration.md +++ b/print_settings/speed/speed_settings_acceleration.md @@ -1,5 +1,7 @@ # Acceleration +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `accel_to_decel_enable`, `accel_to_decel_factor`. Acceleration in 3D printing is usually set on the printer's firmware settings. This setting will try to override the acceleration when [normal printing acceleration](#normal-printing) value is different than 0. Orca will limit the acceleration to not exceed the acceleration set in the Printer's Motion Ability settings. diff --git a/print_settings/speed/speed_settings_advanced.md b/print_settings/speed/speed_settings_advanced.md index 1e36e74..018e13b 100644 --- a/print_settings/speed/speed_settings_advanced.md +++ b/print_settings/speed/speed_settings_advanced.md @@ -1,5 +1,7 @@ # Speed Advanced - Extrusion Rate Smoothing +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `max_volumetric_extrusion_rate_slope`, `max_volumetric_extrusion_rate_slope_segment_length`, `extrusion_rate_smoothing_external_perimeter_only`. Extrusion Rate Smoothing (ERS) (pressure equalizer in PrusaSlicer) aims to **limit the rate of extrusion volume change to be below a user-set threshold (the ERS value)**. It aims to assist the printer firmware internal motion planners, pressure advance in achieving the desired nozzle flow and reducing deviations against the ideal flow. diff --git a/print_settings/speed/speed_settings_travel.md b/print_settings/speed/speed_settings_travel.md index a6366a6..67c37a9 100644 --- a/print_settings/speed/speed_settings_travel.md +++ b/print_settings/speed/speed_settings_travel.md @@ -1,5 +1,7 @@ # Travel +[Mode](option_mode): `Advanced`. +[Variable](built_in_placeholders_variables): `travel_speed`. ![travel-lines](https://github.com/OrcaSlicer/OrcaSlicer_WIKI/blob/main/images/speed/travel-lines.png?raw=true) Travel speed is the speed at which the print head moves when not extruding filament. diff --git a/print_settings/strength/strength_settings_infill_rotation_template_metalanguage.md b/print_settings/strength/strength_settings_infill_rotation_template_metalanguage.md index a8958a1..a2c36b8 100644 --- a/print_settings/strength/strength_settings_infill_rotation_template_metalanguage.md +++ b/print_settings/strength/strength_settings_infill_rotation_template_metalanguage.md @@ -1,5 +1,7 @@ # Infill rotation template metalanguage +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `sparse_infill_rotate_template`, `solid_infill_rotate_template`. This metalanguage provides a way to define the [direction and rotation](strength_settings_infill#direction-and-rotation) of [patterns](strength_settings_patterns) in 3D printing. - [Basic instructions](#basic-instructions) diff --git a/print_settings/strength/strength_settings_walls.md b/print_settings/strength/strength_settings_walls.md index ec31eb9..09e92b9 100644 --- a/print_settings/strength/strength_settings_walls.md +++ b/print_settings/strength/strength_settings_walls.md @@ -1,5 +1,6 @@ # Walls +[Variable](built_in_placeholders_variables): `wall_loops`. In 3D printing, "walls" refer to the outer layers of a printed object that provide its shape and structural integrity. Adjusting wall settings can significantly affect layer adhesion, strength, appearance and print time of your model. diff --git a/print_settings/support/support_settings_advanced.md b/print_settings/support/support_settings_advanced.md index 07e101c..574f934 100644 --- a/print_settings/support/support_settings_advanced.md +++ b/print_settings/support/support_settings_advanced.md @@ -1,5 +1,8 @@ # Support Advanced +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `support_interface_loop_pattern`, `max_bridge_length`. + - [Z distance](#z-distance) - [Support wall loops](#support-wall-loops) - [Base Pattern](#base-pattern) diff --git a/print_settings/support/support_settings_ironing.md b/print_settings/support/support_settings_ironing.md index caee460..f1f20c6 100644 --- a/print_settings/support/support_settings_ironing.md +++ b/print_settings/support/support_settings_ironing.md @@ -1,5 +1,7 @@ # Support Ironing +[Mode](option_mode): `Advanced`. +[Variable](built_in_placeholders_variables): `support_ironing`. Ironing is using small flow to print on same height of surface again to make flat surface more smooth. This setting controls which layer being ironed. ## Pattern diff --git a/print_settings/support/support_settings_raft.md b/print_settings/support/support_settings_raft.md index 4677895..8e0fa07 100644 --- a/print_settings/support/support_settings_raft.md +++ b/print_settings/support/support_settings_raft.md @@ -1,5 +1,7 @@ # Raft +[Mode](option_mode): `Advanced`. +[Variables](built_in_placeholders_variables): `raft_layers`, `raft_contact_distance`. Raft is a base layer that is printed under the object to improve adhesion and prevent warping. It consists of multiple layers of material that create a stable foundation for the print. ## Layers diff --git a/print_settings/support/support_settings_support.md b/print_settings/support/support_settings_support.md index 236c3b6..2cd6255 100644 --- a/print_settings/support/support_settings_support.md +++ b/print_settings/support/support_settings_support.md @@ -1,5 +1,7 @@ # Support +[Mode](option_mode): `Developer`. +[Variables](built_in_placeholders_variables): `enable_support`, `enforce_support_layers`. Support structures are used in 3D printing to provide stability to overhangs and complex geometries. - [Type](#type) diff --git a/print_settings/support/support_settings_tree.md b/print_settings/support/support_settings_tree.md index a16d88b..473cac7 100644 --- a/print_settings/support/support_settings_tree.md +++ b/print_settings/support/support_settings_tree.md @@ -1,5 +1,6 @@ # Tree Support +[Variables](built_in_placeholders_variables): `tree_support_auto_brim`, `tree_support_brim_width`. This section contains specific settings for tree support structures. ## Tip Diameter diff --git a/printer_settings/multimaterial/printer_multimaterial_wipe_tower.md b/printer_settings/multimaterial/printer_multimaterial_wipe_tower.md index bdf3f24..14d3b97 100644 --- a/printer_settings/multimaterial/printer_multimaterial_wipe_tower.md +++ b/printer_settings/multimaterial/printer_multimaterial_wipe_tower.md @@ -1,5 +1,7 @@ # Wipe Tower +[Mode](option_mode): `Advanced`. +[Variable](built_in_placeholders_variables): `wipe_tower_type`. The prime tower is a structure that is printed before the actual print to ensure that the nozzle is primed with the correct filament. It helps to prevent oozing and stringing during the print. The prime tower can be customized in various ways, such as its size, shape, and position. ## Purge in prime tower diff --git a/sync-tab-options-to-wiki.ps1 b/sync-tab-options-to-wiki.ps1 index af0609d..3c4c780 100644 --- a/sync-tab-options-to-wiki.ps1 +++ b/sync-tab-options-to-wiki.ps1 @@ -42,6 +42,38 @@ function Find-HeadingLineIndex { return -1 } +function Find-FirstHeadingLineIndex { + param([string[]]$Lines) + + for ($i = 0; $i -lt $Lines.Count; $i++) { + if ($Lines[$i] -match '^(#{1,6})\s+(.+?)\s*$') { + return $i + } + } + + return -1 +} + +function ConvertTo-DocFileKey { + param([string]$RefFile) + + if ([string]::IsNullOrWhiteSpace($RefFile)) { + return "" + } + + $normalizedRef = $RefFile.Trim() -replace '\\', '/' + $leaf = ($normalizedRef -split '/')[(-1)] + if ([string]::IsNullOrWhiteSpace($leaf)) { + return "" + } + + if ([System.IO.Path]::GetExtension($leaf).ToLowerInvariant() -eq '.md') { + return [System.IO.Path]::GetFileNameWithoutExtension($leaf) + } + + return $leaf +} + function Get-CppSourceContent { param( [string]$Source, @@ -420,6 +452,7 @@ foreach ($file in $mdFiles) { Set-SyncStage -Step 5 -Status "Building file and anchor entries" $entries = New-Object System.Collections.Generic.List[object] +$firstHeadingAnchorToken = '__first_heading__' foreach ($m in $parsedMatches) { $variable = $m.Variable $baseVariable = [regex]::Match($variable, '^[^\[]+').Value @@ -430,13 +463,25 @@ foreach ($m in $parsedMatches) { $ref = $m.Ref - if ($ref -notmatch '#') { - continue + $rawFileKey = $null + $anchor = $null + if ($ref -match '#') { + $parts = $ref -split '#', 2 + $rawFileKey = $parts[0].Trim() + $anchorPart = $parts[1].Trim().ToLowerInvariant() + if ([string]::IsNullOrWhiteSpace($anchorPart)) { + $anchor = $firstHeadingAnchorToken + } + else { + $anchor = $anchorPart + } + } + else { + $rawFileKey = $ref.Trim() + $anchor = $firstHeadingAnchorToken } - $parts = $ref -split '#', 2 - $fileKey = $parts[0].Trim() - $anchor = $parts[1].Trim().ToLowerInvariant() + $fileKey = ConvertTo-DocFileKey -RefFile $rawFileKey if ([string]::IsNullOrWhiteSpace($fileKey) -or [string]::IsNullOrWhiteSpace($anchor)) { continue @@ -452,7 +497,7 @@ foreach ($m in $parsedMatches) { } if ($entries.Count -eq 0) { - Write-Host "No entries with file#anchor format were found." -ForegroundColor Yellow + Write-Host "No entries with markdown file references were found." -ForegroundColor Yellow Complete-SyncProgress exit 0 } @@ -511,6 +556,13 @@ foreach ($group in $groupedByFile) { $lines = Get-Content -LiteralPath $targetPath $buffer = New-Object System.Collections.Generic.List[string] $buffer.AddRange([string[]]$lines) + $firstHeadingIndex = Find-FirstHeadingLineIndex -Lines $buffer.ToArray() + $firstHeadingAnchor = $null + if ($firstHeadingIndex -ge 0 -and $buffer[$firstHeadingIndex] -match '^(#{1,6})\s+(.+?)\s*$') { + $headingText = $Matches[2].Trim() + $headingText = $headingText -replace '\s+#+$', '' + $firstHeadingAnchor = ConvertTo-AnchorSlug -Heading $headingText + } $fileChanged = $false $groupedByAnchor = $group.Group | Group-Object -Property Anchor @@ -521,7 +573,7 @@ foreach ($group in $groupedByFile) { $anchorNumber++ Set-SyncDetail -Status "File $fileNumber/$($totalFileGroups): $fileKey | Anchor $anchorNumber/$($anchorCount): $($anchorGroup.Name)" -Current $fileNumber -Total $totalFileGroups $anchor = $anchorGroup.Name - $expectedAnchorsByPath[$targetPath][$anchor] = $true + $resolvedAnchor = $anchor $vars = New-Object System.Collections.Generic.List[string] $seenVars = @{} @@ -593,7 +645,22 @@ foreach ($group in $groupedByFile) { $canonicalLines.Add($insertVariableLine) } - $idx = Find-HeadingLineIndex -Lines $buffer.ToArray() -Anchor $anchor + $idx = -1 + if ($anchor -eq $firstHeadingAnchorToken) { + if ($firstHeadingIndex -lt 0 -or [string]::IsNullOrWhiteSpace($firstHeadingAnchor)) { + $sourceRef = $anchorGroup.Group[0].Ref + Write-Host "[WARN] First heading not found in $targetPath (from '$sourceRef')" -ForegroundColor Yellow + $missingHeadings++ + continue + } + + $idx = $firstHeadingIndex + $resolvedAnchor = $firstHeadingAnchor + } + else { + $idx = Find-HeadingLineIndex -Lines $buffer.ToArray() -Anchor $anchor + } + if ($idx -lt 0) { $sourceRef = $anchorGroup.Group[0].Ref Write-Host "[WARN] Heading anchor '$anchor' not found in $targetPath (from '$sourceRef')" -ForegroundColor Yellow @@ -601,6 +668,10 @@ foreach ($group in $groupedByFile) { continue } + if (-not [string]::IsNullOrWhiteSpace($resolvedAnchor)) { + $expectedAnchorsByPath[$targetPath][$resolvedAnchor] = $true + } + $nextHeading = -1 for ($j = $idx + 1; $j -lt $buffer.Count; $j++) { if ($buffer[$j] -match '^#{1,6}\s+') {