Repository navigation
Conversation
…d trip) and no longer reported as not saved
…lyface mesh instead of loose 3D faces; DWG keeps them
…t and twist) and Mat4::plane (its 2D map on a plane)
…pt but ignored when drawing)
…objects draw through their plane's 2D map, 3D lines, faces and meshes are projected, blocks carry their z
…e canvas draws the projected list, with points, grid and axes on the XY plane
…e view, goes back to plan and turns the view with its compass ring
…yface meshes and solids filled, lit and drawn back to front, with or without their edges
…t and twist (groups 16, 17, 51); layouts draw 3D viewports
…arity, with what is still missing
…ned Orbit and Visual Styles covered
…centre is relative to the target)
|
+1 |
|
Field test of this branch on a real topographic drawing (a DWG in UTM coordinates: survey points, contour polylines at their elevation, a 278-face TIN, utility lines with complex linetypes):
(Written by Claude Code, an AI agent, on behalf of @aldozar.) |
Exporting the current view of a 3D model space (`run --export --view current`, or the default after `vpoint`) drew the plan through the 3D view's window, which is in view coordinates, so the image came out empty. PNG, SVG and PDF exports now draw model space in the current view's projection and visual style (`cadcraft_io::View3d`, `write_view`), as the screen does. A `plot` of `plotArea: display` in a 3D view passes the view to the plotter the same way. `--view extents` and `--window` still draw the plan. Reported by @aldozar on storytold#1005. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the field test! Fixed in 64b7c74: PNG, SVG and PDF exports of the current view ( |
# Conflicts: # apps/cadcraft-cli/src/main.rs # crates/render/src/lib.rs # crates/ui-egui/src/i18n/cs.tsv # crates/ui-egui/src/i18n/es.tsv # crates/ui-egui/src/i18n/fr.tsv # crates/ui-egui/src/i18n/it.tsv # crates/ui-egui/src/i18n/pt_br.tsv # crates/ui-egui/src/i18n/ru.tsv # crates/ui-egui/src/i18n/sv.tsv # crates/ui-egui/src/i18n/uk.tsv # crates/ui-egui/src/i18n/zh.tsv # docs/file-format-parity.md # docs/gaps.md # docs/parity-checklist.md
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. WalkthroughWalkthroughWalkthroughWalkthroughWalkthroughWalkthroughWalkthroughWalkthroughWalkthrough📝 WalkthroughAdds model-space 3D views, orbit controls, shaded visual styles, view-aware image exports, and polyface mesh support. The changes cover view persistence, rendering, export framing, mesh editing, and DXF/DWG round trips. Changes: Model-Space Views and Polyface Meshes
Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ViewCube
participant Session
participant Canvas
participant Renderer
ViewCube->>Session: update view direction or rotation
Session->>Canvas: expose current projection and visual style
Canvas->>Renderer: build projected display list
|
…itching; drop broken polyface faces - A drawing saved in a 3D view writes its *Active VPORT framed on what the view draws, objects off the XY plane included, instead of the footprint projected at z = 0. - Restoring a 3D named view while model space is tiled is refused before the tab or the selection change. - Polyface face records that name missing vertices (or fewer than three) are dropped on read, so they are not written back. Reported by CodeRabbit on storytold#1005. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # apps/cadcraft-cli/src/main.rs # crates/io/src/dxf_read.rs # crates/io/tests/it/dwg_roundtrip_losses.rs # crates/io/tests/pdf_layers.rs # docs/file-format-parity.md # docs/gaps.md # docs/parity-checklist.md # docs/target-app-parity.md
|
Any fixes for the conflict yet? 2 workflows awaiting approval successful checks |
|
Three open PRs implement the same 3D-view surface against
Files touched by all three: What I could verify locally (only #1005 was checked out and built):
Separately on solids: #2259 (mesh kernel + RENDER/STL/3MF, currently CONFLICTING), #1784 (BOX/CYLINDER/EXTRUDE as groups of 3DFACE) and #1801 (WEDGE/CONE/PYRAMID/SPHERE/TORUS). #1784 and #1801 are by the same author and share the 3DFACE representation, so they compose; #2259 is a different representation (a mesh kernel) and is a design decision to make before any of them merge, not a rebase. None of this is a criticism of any individual PR — it's just that there are three concurrent implementations of the same feature and the cheapest outcome is to pick one and close/retarget the others before more work goes in. |
main split the large modules (dxf_read, dxf_write, modify, canvas, render, the engine session) into module directories and moved the CLI to clap: the 3D views' changes are ported to the new files, and the clippy limits main tightened are met (the VIEW record and the polyface mesh writer are their own functions).
|
@a4jp-com Conflicts resolved: the branch is merged with current main (0.14), with the 3D work ported to main's new module layout and the CLI's move to clap; |
…eview issues Scope reduced so the feature is small and solid: - Removed VSCURRENT and the Shaded / Shaded with Edges visual styles (render, PDF layers, UI, translations). - Layout viewports and tiled model viewports are drawn in plan; a viewport's 3D view (groups 16, 17) is still kept in DXF/DWG. - Render: one projection path (3D objects projected point by point, flat objects drawn through their plane), helices and rays/xlines projected, 2D solids/traces at their elevation, block z scale kept. - Engine: VisualStyle and View3d types removed; one DocState::to_view for picks in a 3D view; VPOINT/PLAN/3DORBIT share one refusal message; saving and exporting use the drawing as the view frames it. - UI: ViewCube drag, orbit and zoom about the cursor go through the same view mapping; the plane grid skips edge-on and huge views. - Docs: F24/M11/3D rows updated, one dated revision row per doc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I reworked this PR to make it smaller and easier to review (7758459):
@aldozar your field test used
|
…d-3d # Conflicts: # crates/ui-egui/src/canvas.rs # docs/file-format-parity.md # docs/gaps.md
SCALE now scales a polyface mesh's vertex heights like other objects (test scale_scales_a_polyface_meshs_vertex_heights); the selection window's crossing outline is clipped like main's dashed rectangle, as a parallelogram in a 3D view; main's new tests get the 3D fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md: PRs don't edit the parity docs; the affected rows are named in the PR description instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: 3D views, with VPOINT, PLAN, 3DORBIT, the ViewCube orbit and polyface meshes. The README and the CLI documentation now say that the current view of a 3D model space (vpoint, 3dorbit, …) is drawn as the screen shows it, in its visual style, while the other framings draw the plan, and that the default framing does too when the steps changed the view. Making the command line renderer honour the current 3D view is a coherent rule that the text states. A change of this size (a view system, a ViewCube, and polyface mesh support) is several features, and polyface meshes are a different entity type that should be its own PR with its own reader and writer tests. 3D view commands change a set of system variables (view direction, target, lens length) that must be saved with the drawing, and the ViewCube is user interface art that needs provenance if it is an image. AutoCAD's ViewCube is a trademarked Autodesk interface element; the PR should show that the widget is an original design. I read documentation hunks only. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. Two of these are already covered:
Polyface meshes: fair point, they're now in #2600 with their reader and writer tests. |
* Polyface meshes stay one object through DXF and DWG A polyface mesh (POLYLINE flag 64) was read as loose 3D faces. It is now read, drawn, exploded into its 3D faces and written back as a POLYLINE. Hidden edges aren't drawn. A mesh too large for the 16-bit groups 71-74 is saved as 3D faces. Split from #1005. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A polyface face ends at its first zero index A face record with a gap ([1, 2, 0, 3]) has two corners and is dropped, not read as a triangle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Polyface meshes: write only faces that name their vertices; ID gives their Z The writer drops the faces the reader would drop, so no record names a missing vertex, and the 16-bit check only needs the counts. ID and DIST give a mesh the Z of its nearest visible edge, as they do for 3D faces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
|
Tested this PR (head e96f911) headless with a real topographic survey DWG: about 1,460 objects, including a 278-face TIN (3DFACE), contour polylines with elevations around 1,880 m, and survey points.
Not tested: the ViewCube and 3DORBIT dragging in the GUI. The PR currently conflicts with main. (Written by Claude Code, an AI agent, on behalf of @aldozar.) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for testing it on a real survey. I merged main, so the conflicts are gone, and 3D views now draw polyface meshes too, now that #2600 is in. |
|
If smaller PRs are easier to review, I can split this one (about 1,300 lines of code and 500 of tests) into three, opened one after another:
Happy to keep it as one if that's simpler. |
Kept small on purpose: shaded visual styles (VSCURRENT) are not in this PR, and layout viewports and tiled model viewports are drawn in plan, centred on their target as on main (their 3D view is kept in the file). These can follow as separate PRs.
Not done yet: UCS, solids, surfaces. Picking and snaps off the XY plane are approximate. Full list in gaps.md F24.
Closes #7
Refs #612
Rows to update:
gaps.mdF24 and U12,roadmap.mdM11,target-app-parity.md3D,file-format-parity.mdVIEWPORT/VPORT/VIEW;parity-checklist.mdviacargo xtask parity.