Repository navigation
Supporting profiles for lineaments and craters, with Craters/Lineaments export (#833) - #845
Merged
Merged
Conversation
Generates Sky-projected line annotations ("profiles") from an existing
polyline or ellipse, by hand (Properties -> Supporting Profiles) or
automatically when one is finished (toolbar: Lineament / Crater profiles).
- Polylines: perpendicular profiles by spacing or by count over the whole
line, with profiles at start/end optional; length centred on the line.
- Ellipses: N-S/NE-SW/E-W/NW-SE or major-axis profiles through the centre,
ending exactly on the drawn outline.
- All or nothing, one undo step; labels off; profiles keep a ProfileLink
(parent, index, direction, azimuth, station) under the new "profileOf"
key, so older releases still load the scene.
- Export: Craters (ellipses + profiles) and Lineaments (polylines +
profiles) presets write <file>.csv and <file>_profiles.csv joined by
parentKey; profile columns available in every preset; optional surface
properties in the profiles file; "lines only" type filter.
- Test harness: drawing scenes use PRo3D's 0.1 m near plane instead of the
AFC template's 10 m, which made annotation lines z-fight.
Docs: docs/SupportingProfiles.md (user guide), docs/dev/SupportingProfiles.md
(spec), export docs. Tests: Section22_SupportingProfiles (Expecto),
supporting-profiles.spec.ts (Playwright on Dimorphos).
- Import re-keys annotations; profile links now follow their parent's new key (ViewerApp.rekeyImported), so Craters/Lineaments exports still find the profiles of imported craters and lineaments. - Generating again for a parent replaces its earlier profiles in the same undo step instead of adding a second, indistinguishable set. - At most 1000 profiles per generation, so a typo in the spacing cannot freeze the update loop. - profileOf is read totally: a link from a later version or a damaged one drops to None instead of failing the scene load. - The profiles file is only written for per-annotation CSV, where the window shows its checkbox. - Auto-generation selects its parent explicitly. - Compass azimuths are stored exactly (0, not 1e-16) and near-north bearings snap to 0. - Tests for all of the above, plus a point clicked twice and a NaN azimuth round trip; docs updated.
…t the undo stack (#833) finishAndAppend/addPoint/finish return the annotation they added; DrawingApp.updateFinishing passes it on and update = updateFinishing >> fst. The toolbar auto profiles use it directly instead of reading the head of the undo stack, so undo/redo can never trigger them, and the pick and Finish paths no longer diff the annotation map to find the new leaf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #833.
Generates supporting profiles, Sky-projected line annotations, across lineaments (polylines) and through craters (ellipses), and exports them together with their parent. User guide:
docs/SupportingProfiles.md. Spec and design notes:docs/dev/SupportingProfiles.md.What users get
N-S,NE-SW,E-W,NW-SE(compass) or the major/minor axes, through the centre, ending exactly on the drawn outline.<file>.csvand<file>_profiles.csv, joined byparentKey, withprofileIndex,profileDirection,profileAzimuthandprofileStationon every profile row.Compatibility
ProfileLinkunder a new keyprofileOf, so older releases load the scene and see plain lines. The new reader is total: a link from a later version, or a damaged one, is dropped toNoneinstead of failing the load.parentKey,profileIndex,profileDirection,profileAzimuthandprofileStationaftersurfaceName, empty for hand-drawn lines. Point columns therefore move five places to the right. Scripts that read columns by name are unaffected; scripts that read by position need updating. Worth a line in the release notes.Also in here
drawingSceneused the AFC template's 10 m near plane. The annotation depth offset scales with distance/near, so draped lines and ellipse outlines z-fought with the terrain. It now uses PRo3D's default 0.1 m (ai/TESTING.mdupdated). The z-fighting itself (a depth offset that depends on the near plane) is left for a separate issue.annotation-profile-export.spec.tsintotests-ui/src/export.tsfor reuse.Review
An agent review before opening this PR found two real bugs, both fixed with tests:
Also addressed:
profileOfread;Testing
Section22_SupportingProfiles, 37 tests, covering:supporting-profiles.spec.ts, plusannotation-profile-exportandellipse-annotationfor the near-plane change):distancefrom 0, surface layers on every point.🤖 Generated with Claude Code