Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.
C#
An edge line around the preview pictures: red for a reflective wall, blue for a damping rim
Alexander Graef8bc6d366e0c0
diff --git a/CLAUDE.md b/CLAUDE.mdindex dedcd66..7e05391 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -160,6 +160,12 @@ FrameStore: native memory up to the budget, the rest in a temp file (%LOCALAPPDAgives way first, the box and **Auto** at the far end; turned on its side with the title); Auto fits once to the frameshown (the 99.5th percentile of |field| or √intensity at the palette's top, the user's choice of the variants), an8-bit preview computing that frame in 16-bit first; the context menu has Brightness and Auto brightness.+- **Edge line** (2026-10-25, the user's choice): a 1 px line around each preview picture in the colour of what a wave+ meets at the canvas edge: pure red for a reflective wall (the index's channel), pure blue for a damping rim outside+ the canvas (the absorbers' channel; `Scene.HasRim`; a rim wins over a wall), nothing for open edges or a damping band+ inside the canvas; the scene's colours, not the theme's; preview only. For it the picture's cell is sized to the+ picture (the overlays measure to the uniform fit and remeasure on a canvas change) while `PictureFrame` fills its+ cell, so the heading stays at the top.- **Play means "show me the simulation"**: it starts an automatic run when needed and holds at the newest frameuntil the run catches up. Live follows a running run until the user scrubs; it ends with a last follow to thefinal frame. A replaced project goes to frame 0; a discarded run keeps the position. In/out points are steps.diff --git a/WaveDudeNext.WPF/Controls/PictureFrame.cs b/WaveDudeNext.WPF/Controls/PictureFrame.csindex 4e5ba63..d4c92a1 100644--- a/WaveDudeNext.WPF/Controls/PictureFrame.cs+++ b/WaveDudeNext.WPF/Controls/PictureFrame.cs@@ -25,7 +25,9 @@ namespace WaveDudeNext.WPF.Controls;/// Lays out a label and a picture so the label takes as little of the picture's room as possible:/// above the picture when the available space is taller than the picture's aspect ratio (spare room/// is above and below anyway), or rotated by 90° on its left when the space is wider (spare room is-/// at the sides). The first child is the label, the second the picture (a <see cref="CanvasImage"/>, whose canvas+/// at the sides). The frame takes all the room it is given (2026-10-25: the picture's cell sizes itself to the+/// picture since its edge line, and the label stays at the top of the cell, the picture centred in the rest). The+/// first child is the label, the second the picture (a <see cref="CanvasImage"/>, whose canvas/// gives the aspect ratio, or an <see cref="Image"/> with <see cref="Stretch.Uniform"/>, whose <see cref="Image.Source"/>/// gives it, 16:9 when there is none; or a panel holding one under an overlay). UI thread, like every element./// </summary>@@ -91,9 +93,11 @@ public sealed class PictureFrame : Panel? new Size(Math.Max(0, availableSize.Width - label.DesiredSize.Width - gap), availableSize.Height): new Size(availableSize.Width, Math.Max(0, availableSize.Height - label.DesiredSize.Height - gap));picture.Measure(rest);- return side+ Size content = side? new Size(label.DesiredSize.Width + gap + picture.DesiredSize.Width, Math.Max(label.DesiredSize.Height, picture.DesiredSize.Height)): new Size(Math.Max(label.DesiredSize.Width, picture.DesiredSize.Width), label.DesiredSize.Height + gap + picture.DesiredSize.Height);+ return new Size(double.IsInfinity(availableSize.Width) ? content.Width : Math.Max(content.Width, availableSize.Width),+ double.IsInfinity(availableSize.Height) ? content.Height : Math.Max(content.Height, availableSize.Height));}/// <inheritdoc/>@@ -127,11 +131,13 @@ public sealed class PictureFrame : Panel/// <summary>/// Width over height of the picture: a <see cref="CanvasImage"/>'s canvas, else the source's, or 16:9 without one. The- /// picture is an <see cref="Image"/>, or a panel whose first <see cref="Image"/> child is it (an overlay on top).+ /// picture is an <see cref="Image"/>, or a panel whose first <see cref="Image"/> child is it (an overlay on top), either+ /// possibly inside a <see cref="Decorator"/> (the edge line's border)./// </summary>private static double AspectOf(UIElement picture){- Image? image = picture as Image ?? (picture as Panel)?.Children.OfType<Image>().FirstOrDefault();+ UIElement inner = picture is Decorator { Child: { } child } ? child : picture;+ Image? image = inner as Image ?? (inner as Panel)?.Children.OfType<Image>().FirstOrDefault();return image switch{CanvasImage canvas => canvas.Aspect,diff --git a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.csindex 91bc636..54ea218 100644--- a/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs+++ b/WaveDudeNext.WPF/Controls/ProbeGraphOverlay.cs@@ -71,11 +71,11 @@ public sealed class ProbeGraphOverlay : Panel/// <summary>Identifies the <see cref="CanvasWidth"/> property.</summary>public static readonly DependencyProperty CanvasWidthProperty = DependencyProperty.Register(- nameof(CanvasWidth), typeof(int), typeof(ProbeGraphOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsRender));+ nameof(CanvasWidth), typeof(int), typeof(ProbeGraphOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));/// <summary>Identifies the <see cref="CanvasHeight"/> property.</summary>public static readonly DependencyProperty CanvasHeightProperty = DependencyProperty.Register(- nameof(CanvasHeight), typeof(int), typeof(ProbeGraphOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsRender));+ nameof(CanvasHeight), typeof(int), typeof(ProbeGraphOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));/// <summary>Identifies the <see cref="SelectedItem"/> property.</summary>public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register(@@ -317,14 +317,22 @@ public sealed class ProbeGraphOverlay : Panelreturn new Rect(Math.Round(originX + box.X * scale), Math.Round(originY + box.Y * scale), Math.Max(1, Math.Round(box.Width * scale)), Math.Max(1, Math.Round(box.Height * scale)));}- /// <inheritdoc/>+ /// <summary>+ /// The picture's size, the canvas fitted uniformly into the room (as <see cref="CanvasImage"/> fits it), so the cell+ /// holding the picture and its overlays is sized to the picture and its edge line hugs it (2026-10-25); nothing without a bound.+ /// </summary>protected override Size MeasureOverride(Size availableSize){foreach (UIElement child in Children){child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));}- return new Size(double.IsInfinity(availableSize.Width) ? 0 : availableSize.Width, double.IsInfinity(availableSize.Height) ? 0 : availableSize.Height);+ if (double.IsInfinity(availableSize.Width) || double.IsInfinity(availableSize.Height))+ {+ return default;+ }+ double scale = Math.Min(availableSize.Width / Math.Max(1, CanvasWidth), availableSize.Height / Math.Max(1, CanvasHeight));+ return new Size(Math.Max(1, CanvasWidth) * scale, Math.Max(1, CanvasHeight) * scale);}/// <inheritdoc/>diff --git a/WaveDudeNext.WPF/Controls/SceneOverlay.cs b/WaveDudeNext.WPF/Controls/SceneOverlay.csindex a4bb934..c71c199 100644--- a/WaveDudeNext.WPF/Controls/SceneOverlay.cs+++ b/WaveDudeNext.WPF/Controls/SceneOverlay.cs@@ -58,11 +58,11 @@ public sealed class SceneOverlay : Panel/// <summary>Identifies the <see cref="CanvasWidth"/> property.</summary>public static readonly DependencyProperty CanvasWidthProperty = DependencyProperty.Register(- nameof(CanvasWidth), typeof(int), typeof(SceneOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsRender));+ nameof(CanvasWidth), typeof(int), typeof(SceneOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));/// <summary>Identifies the <see cref="CanvasHeight"/> property.</summary>public static readonly DependencyProperty CanvasHeightProperty = DependencyProperty.Register(- nameof(CanvasHeight), typeof(int), typeof(SceneOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsRender));+ nameof(CanvasHeight), typeof(int), typeof(SceneOverlay), new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));/// <summary>Identifies the <see cref="SelectedItem"/> property.</summary>public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register(@@ -797,14 +797,22 @@ public sealed class SceneOverlay : Panel}}- /// <inheritdoc/>+ /// <summary>+ /// The picture's size, the canvas fitted uniformly into the room (as <see cref="CanvasImage"/> fits it), so the cell+ /// holding the picture and its overlays is sized to the picture and its edge line hugs it (2026-10-25); nothing without a bound.+ /// </summary>protected override Size MeasureOverride(Size availableSize){foreach (UIElement child in Children){child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));}- return new Size(double.IsInfinity(availableSize.Width) ? 0 : availableSize.Width, double.IsInfinity(availableSize.Height) ? 0 : availableSize.Height);+ if (double.IsInfinity(availableSize.Width) || double.IsInfinity(availableSize.Height))+ {+ return default;+ }+ double scale = Math.Min(availableSize.Width / Math.Max(1, CanvasWidth), availableSize.Height / Math.Max(1, CanvasHeight));+ return new Size(Math.Max(1, CanvasWidth) * scale, Math.Max(1, CanvasHeight) * scale);}/// <inheritdoc/>diff --git a/WaveDudeNext.WPF/Converters/TreeIdConverter.cs b/WaveDudeNext.WPF/Converters/TreeIdConverter.csindex 0f3ddd9..6f7a941 100644--- a/WaveDudeNext.WPF/Converters/TreeIdConverter.cs+++ b/WaveDudeNext.WPF/Converters/TreeIdConverter.cs@@ -18,7 +18,6 @@using System.Globalization;using System.Windows.Data;using WaveDudeNext.Model;-using WaveDudeNext.Rendering;namespace WaveDudeNext.WPF.Converters;@@ -31,10 +30,7 @@ public sealed class TreeIdConverter : IValueConverter{public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) => "Tree:" + value switch{- Source source => source.Name,- OpticalPart part => part.Name,- Probe probe => probe.Name,- ColorScheme scheme => scheme.Name,+ INamed named => named.Name,NamedCollection folder => folder.Key,null => "",_ => value.GetType().Name,diff --git a/WaveDudeNext.WPF/Panes/PreviewPane.xaml b/WaveDudeNext.WPF/Panes/PreviewPane.xamlindex c78afc9..2c7b784 100644--- a/WaveDudeNext.WPF/Panes/PreviewPane.xaml+++ b/WaveDudeNext.WPF/Panes/PreviewPane.xaml@@ -572,46 +572,66 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orAutomationProperties.AutomationId="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0}AutoBrightness}" /></StackPanel></controls:HeaderStrip>- <!-- the picture with the source/probe handles over it; both fill the same rectangle -->- <Grid>- <!-- sized by the canvas, never by its bitmap; its size on screen is where a 16-bit frame is rendered (OnPictureSizeChanged) -->- <controls:CanvasImage Source="{TemplateBinding Content}" AutomationProperties.AutomationId="{TemplateBinding Tag}" SizeChanged="OnPictureSizeChanged"- CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" />- <!-- the scene outline, a translucent layer of the same pixel size, so it lands exactly on the frame -->- <Image Source="{Binding Path=(local:PreviewPane.OverlayImage), RelativeSource={RelativeSource TemplatedParent}}"- Stretch="Uniform" IsHitTestVisible="False" />- <!-- the handles: sources, emitter dots, probe points and lines. Styled here, not implicitly: WPF applies- implicit styles inside a template only to Controls, and the overlay is a Panel -->- <controls:SceneOverlay SourceStyle="{StaticResource SourceMarker}" PartStyle="{StaticResource PartMarker}" GripStyle="{StaticResource PartGripMarker}" PointStyle="{StaticResource PartPointMarker}" HandleStyle="{StaticResource FiberHandleMarker}" ProbeStyle="{StaticResource ProbeMarker}" AngleStyle="{StaticResource AngleMarker}"- LineBrush="White" LabelBrush="White" AccentBrush="{DynamicResource Accent}"- Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- Layer="{Binding Path=(local:PreviewPane.Layer), RelativeSource={RelativeSource TemplatedParent}}"- SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Mode=TwoWay}"- SelectedItems="{Binding SelectedItems, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" />- <!-- the probes' graph boxes, over the handles: no handle or emitter dot is ever drawn on a graph (the user's- rule, 2026-10-18; until then the boxes lay under the handles, to keep a handle over a box grabbable, and- a handle under a box is reached by Tab or the tree instead); which probes depends on the cell's layer- (the attached PreviewPane.Layer) -->- <controls:ProbeGraphOverlay BoxStyle="{StaticResource ProbeBoxThumb}" CornerStyle="{StaticResource ProbeBoxCornerThumb}"- AccentBrush="{DynamicResource Accent}"- Layer="{Binding Path=(local:PreviewPane.Layer), RelativeSource={RelativeSource TemplatedParent}}"- Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- Run="{Binding Run, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- Scratch="{Binding GraphScratch, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- Frame="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"- SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Mode=TwoWay}" />- <!-- a frame for this position is being computed (longer than a moment): the stale picture dims and a spinner- turns, so the wait reads as work in progress and not as a preview that does not update (2026-10-14) -->- <Grid IsHitTestVisible="False" Visibility="{Binding IsBusyOverlayVisible, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Converter={StaticResource BoolToVisibility}}">- <Rectangle Fill="Black" Opacity="0.45" />- <Path Style="{StaticResource Spinner}" />+ <!-- the edge line (2026-10-25, the user's choice): 1 px around the picture, which the border is sized to (centred,+ so the cell's spare room stays outside it), in the colour of what a wave meets at the canvas edge: red for a+ reflective wall, the index's channel, blue for a damping rim outside the canvas, the absorbers' channel (a rim+ wins, the wave meets it first); nothing for open edges and for a damping band inside the canvas, which shows+ itself. The pure channel colours, not the theme's (the user's choice). Preview only, never in an export -->+ <Border BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True">+ <Border.Style>+ <Style TargetType="{x:Type Border}">+ <Setter Property="BorderBrush" Value="Transparent" />+ <Style.Triggers>+ <DataTrigger Binding="{Binding Project.Scene.Edges, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" Value="Reflective">+ <Setter Property="BorderBrush" Value="#FFFF0000" />+ </DataTrigger>+ <DataTrigger Binding="{Binding Project.Scene.HasRim, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" Value="True">+ <Setter Property="BorderBrush" Value="#FF0000FF" />+ </DataTrigger>+ </Style.Triggers>+ </Style>+ </Border.Style>+ <!-- the picture with the source/probe handles over it; both fill the same rectangle -->+ <Grid>+ <!-- sized by the canvas, never by its bitmap; its size on screen is where a 16-bit frame is rendered (OnPictureSizeChanged) -->+ <controls:CanvasImage Source="{TemplateBinding Content}" AutomationProperties.AutomationId="{TemplateBinding Tag}" SizeChanged="OnPictureSizeChanged"+ CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" />+ <!-- the scene outline, a translucent layer of the same pixel size, so it lands exactly on the frame -->+ <Image Source="{Binding Path=(local:PreviewPane.OverlayImage), RelativeSource={RelativeSource TemplatedParent}}"+ Stretch="Uniform" IsHitTestVisible="False" />+ <!-- the handles: sources, emitter dots, probe points and lines. Styled here, not implicitly: WPF applies+ implicit styles inside a template only to Controls, and the overlay is a Panel -->+ <controls:SceneOverlay SourceStyle="{StaticResource SourceMarker}" PartStyle="{StaticResource PartMarker}" GripStyle="{StaticResource PartGripMarker}" PointStyle="{StaticResource PartPointMarker}" HandleStyle="{StaticResource FiberHandleMarker}" ProbeStyle="{StaticResource ProbeMarker}" AngleStyle="{StaticResource AngleMarker}"+ LineBrush="White" LabelBrush="White" AccentBrush="{DynamicResource Accent}"+ Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ Layer="{Binding Path=(local:PreviewPane.Layer), RelativeSource={RelativeSource TemplatedParent}}"+ SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Mode=TwoWay}"+ SelectedItems="{Binding SelectedItems, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}" />+ <!-- the probes' graph boxes, over the handles: no handle or emitter dot is ever drawn on a graph (the user's+ rule, 2026-10-18; until then the boxes lay under the handles, to keep a handle over a box grabbable, and+ a handle under a box is reached by Tab or the tree instead); which probes depends on the cell's layer+ (the attached PreviewPane.Layer) -->+ <controls:ProbeGraphOverlay BoxStyle="{StaticResource ProbeBoxThumb}" CornerStyle="{StaticResource ProbeBoxCornerThumb}"+ AccentBrush="{DynamicResource Accent}"+ Layer="{Binding Path=(local:PreviewPane.Layer), RelativeSource={RelativeSource TemplatedParent}}"+ Project="{Binding Project, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ Run="{Binding Run, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ Scratch="{Binding GraphScratch, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ Frame="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ CanvasWidth="{Binding CanvasWidth, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ CanvasHeight="{Binding CanvasHeight, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}}"+ SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Mode=TwoWay}" />+ <!-- a frame for this position is being computed (longer than a moment): the stale picture dims and a spinner+ turns, so the wait reads as work in progress and not as a preview that does not update (2026-10-14) -->+ <Grid IsHitTestVisible="False" Visibility="{Binding IsBusyOverlayVisible, RelativeSource={RelativeSource AncestorType={x:Type local:PreviewPane}}, Converter={StaticResource BoolToVisibility}}">+ <Rectangle Fill="Black" Opacity="0.45" />+ <Path Style="{StaticResource Spinner}" />+ </Grid></Grid>- </Grid>+ </Border></controls:PictureFrame></ControlTemplate></Setter.Value>diff --git a/WaveDudeNext.WPF/Views/SceneView.xaml b/WaveDudeNext.WPF/Views/SceneView.xamlindex 8adffa0..a4a056a 100644--- a/WaveDudeNext.WPF/Views/SceneView.xaml+++ b/WaveDudeNext.WPF/Views/SceneView.xaml@@ -81,7 +81,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orSelectedItem="{Binding Edges}" ToolTip="{meta:Hint model:Scene.Edges}" AutomationProperties.AutomationId="SceneEdges" /><TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:Scene.DampingEdge}" />- <controls:NumberBox Text="{Binding DampingEdge}" Minimum="-8192" Maximum="8192" ToolTip="{meta:Hint model:Scene.DampingEdge}" />+ <controls:NumberBox Text="{Binding DampingEdge}" Minimum="-8192" Maximum="8192" ToolTip="{meta:Hint model:Scene.DampingEdge}" AutomationProperties.AutomationId="SceneDampingEdge" /><TextBlock Style="{StaticResource FormLabel}" Text="{meta:Label model:Scene.RefractiveIndex}" /><controls:NumberBox Text="{Binding RefractiveIndex}" Minimum="1" Maximum="2.55" Increment="0.01" ToolTip="{meta:Hint model:Scene.RefractiveIndex}" />diff --git a/WaveDudeNext/Model/Scene.cs b/WaveDudeNext/Model/Scene.csindex ea96363..d7343a4 100644--- a/WaveDudeNext/Model/Scene.cs+++ b/WaveDudeNext/Model/Scene.cs@@ -221,10 +221,18 @@ public sealed class Scene : ObservableObjectset{_dampingEdgeRead = true;- SetProperty(ref _dampingEdge, value);+ if (SetProperty(ref _dampingEdge, value))+ {+ OnPropertyChanged(nameof(HasRim));+ }}}+ /// <summary>Whether a damping rim lies outside the canvas (a negative <see cref="DampingEdge"/>, <see cref="Runs.RunSpec.Rim"/> cells), which the preview frames in blue (2026-10-25).</summary>+ [XmlIgnore]+ [Browsable(false)]+ public bool HasRim => _dampingEdge < 0;+/// <summary>/// Whether <see cref="DampingEdge"/> has been set since construction: right after a file is read, whether the file/// carried the attribute. A version-2 file left it out for 0, its default then, which <see cref="Project.Load(System.IO.Stream)"/>