Repository navigation
Open
Labels
in progresssomeone is working on it (see comments)needs-triageno priority yet; a maintainer sorts it with /triage
Milestone
Description
Part of the Drawings plan in #860 (package W17, after W17a's view definitions, #4816). Shaded views are part of the first ship.
What's missing
A drawing view is planned as lines only: visible edges (W06, W07) and, as an option, hidden lines. There's no way to show the part shaded, as it looks in the model, which pictorial and assembly sheets need. The PDF writer's package (W22, #4890) leaves raster shading to a separate job, and no package holds it yet.
Proposed
- A display style per view:
visible,visible_hidden,shadedandshaded_visible(shaded, with the visible edges drawn over it), as the parity study on [RFC] Drawings: community requirements and phased development #860 proposes (§4.22). A child view follows its parent unless it's set. - One vocabulary with the model: the shading takes the model's own visual styles (the viewport's Shaded and Shaded with edges, Viewport: pick the visual style from a menu, and add Translucent (#4628) #5219), and Proposal: display style, section views and material display as their own saved settings #5307's saved view style if that lands, rather than a second set of looks.
- A shaded view is a picture of the model, rendered for the view's direction and scale at a stated resolution on paper (300 dpi by default, a drawing setting with a per-view override), with a transparent background and under the view's vector lines. The headless renderer already makes such pictures with the viewport's own pipelines (Headless pictures draw on the GPU, with the viewport's pipelines (CPU rasterizer as last tier) #1555), with the CPU rasteriser where there's no GPU.
- Every output gets it through the paper scene's picture item (planned on Drawing W10, W21, W22: the paper scene, and export to SVG, DXF, PNG and PDF #4890): the canvas, SVG and PDF embed it, PNG draws it at the export's dpi, and DXF writes it beside the file and links it.
- Rendering runs off the UI thread and is kept until the source design or the view changes. A pending or failed render shows as such, never as an empty view.
Tests (planned)
- A shaded view at 300 dpi of a 100 mm frame is 1181 px wide (the study's case), and in
shaded_visibleits vector lines sit exactly where the line-only style puts them. - The same view renders the same pixels twice; an edit to the source design renders it again; a render cancelled part way leaves the last result, marked stale.
- A view too large for its resolution is refused with the limit, never cut or shrunk.
Depends on
W17a (#4816) for the view's frame, the paper scene's picture item (#4890), and W06 for the lines of shaded_visible.
Metadata
Metadata
Assignees
Labels
in progresssomeone is working on it (see comments)needs-triageno priority yet; a maintainer sorts it with /triage
Activity
github-actions commentedon Oct 23, 2026
Claimed by @CamWight through #5626. The claim lapses after 14 days without pushes.
CamWight commentedon Oct 24, 2026
The plan for shaded views, after the research and the decisions on it (2026-10-24). Anyone starting near views, exports or the renderer: this is what we're following.
How a shaded view is made
renderdraws it: the product renderer (job::image::ImageTask) reshaped into prepare, tile and sink stages, with an orthographic projection taken from W17a's view frame. The same affine map places the lines and the pixels, so they register exactly. It works the same in the app, the CLI, MCP, scripts, tests and the browser. A GPU executor can come later, only against a tolerance test with the CPU result.Five display styles per view
visible,visible_hidden,shaded,shaded_visibleandshaded_visible_hidden. The three shaded styles share one picture, so switching between them re-renders nothing. The names will come from one shared visual-style vocabulary with the viewport (#5219) and saved view styles (#5307), rather than a second list.Reference parts get their own display
Components whose bill-of-materials type is
reference(#3874) get two settings of their own on each view, in the dialog that opens when the view is double-clicked:visible, in the drawing standard's reference line style);They are also never sectioned, and they are left out of mass and of the view's default extents (a margin grows the boundary to fit them). The renderer handles "on" with a lines-only reference style by using the reference bodies for depth only, so it costs no second render.
First carrier and slices
W07's
drawing.view(#5866) carriesdisplay_style,dpiand the two reference settings first; the saved view record (W12) follows. The slices:main, sharedrenderwork), with a role per body (painted or depth only);main);shadedviews fromdrawing.viewin the CLI, MCP and scripts;shaded_visibleandshaded_visible_hiddenneed W06's exact lines; sections, detail crops and per-component styles come later.Open points, with what I'd recommend: with the hide setting off, the model still hides reference lines behind it (one way), rather than them showing through it; and "not shown" stays out of the reference style, since hiding components in a view is its own feature.
CamWight commentedon Oct 24, 2026
Two open points from the plan above are now settled:
CamWight commentedon Oct 24, 2026
Two changes to the plan above, from today's decisions on drawing views:
selun3 commentedon Oct 24, 2026
@CamWight, our shading reviewer can take a small independent acceptance child against S1/S3: picture/vector registration, outward pixel rounding and alpha composition. Would that be useful under your existing W17b claim, and which API/revision should the tests bind to once the tile renderer and picture item are available?
We propose original asymmetric fiducials at nonzero sheet origins, exact W17a frames and two scales; fractional/negative pixel bounds at 300/1200/2400 dpi; and small transparent scenes compared across bands and two backgrounds. This follows the latest sheet-only DPI decision and would add no separate renderer, style vocabulary or exporter.
Before runnable tests, please confirm the intended pixel-centre/grid-origin convention and the picture's alpha/color representation at the paper boundary. We are preparing the case matrix privately while those interfaces are agreed. Reference-part occlusion and the PBR drawing-light policy remain separate follow-ups with you.
CamWight commentedon Oct 24, 2026
@0xlillith, yes please. That's a useful child under W17b, and the cases you list are the right ones. The conventions come from our research for the picture item and go into S1 and S3 as written:
<image>and a PDF image's unit square map to.geom::paper, shared by the PNG writer and the picture provider.render, onmain) and S3's picture item in the paper scene, once their PRs are up. I'll link them here when they open.Agreed that reference-part occlusion and the drawing light stay separate follow-ups.
selun3 commentedon Oct 24, 2026
We have updated the A–C acceptance preparation to this contract. The local picture grid gives 1182 pixels for 100 mm at 300 dpi even when the frame origin is fractional; the PNG expectation uses the sheet's top-left grid and re-rendering, not moving or resampling that cached picture.
An independent analytic oracle now covers frame transforms, fractional origins, outward rounding (including the 1e-9 pixel boundary), sample centres and straight-sRGB/linear-light alpha composition. Its 26 arithmetic checks pass in two independent runs. These are original expected-value fixtures: zero SolidCraft renderer tests have run, and they do not establish band equivalence, cancellation or export behavior. Rounded RGB8 examples are diagnostic, not a proposed cross-writer tolerance.
We'll bind the applicable cases to your actual S1/S3 APIs when those PRs are available, without introducing a second renderer or a stand-in provider.
CamWight commentedon Oct 25, 2026
The plan for S1, the tile renderer (draft #6483, on
main), is set. The code starts now. Here's what it is, so anyone working nearby can follow it.One renderer, not a second one for drawings.
render.image's CPU renderer (job::image::ImageTask) becomes three steps: prepare, render a tile, then write the rows to a sink.ImageTaskkeeps its public face, andrender.imagegives the same pixels as before. A pinned hash of the rendered rows for fixed scenes proves it, in the slice's first commit.What's new beside
ImageRequest(which doesn't change):PictureRequest { projection, window, supersample, roles, background }.Projection::Ortho(OrthoFrame): ageom::Planebasis whose normal points toward the viewer, a scale (paper mm per model mm) and a shift, so paper = basis.to_local(p) × scale + shift. A W17a view frame (Drawing W17a: view definitions as data (direction, first- or third-angle projection, scale) #4816) converts into it field by field.One(pixel centres) orTwo(i + ¼, i + ¾, today's).Painted(the default) orDepthOnly, for reference parts that hide the model without being drawn.background: Nonegives a transparent picture with straight alpha.The pixel grid, as one rule:
geom::pixel_gridonmain.drawingswill call the same function.Limits:
RenderLimits;Tests:
@0xlillith, the names above are what your acceptance cases can bind to:
PictureRequest,Projection::Orthoandgeom::pixel_grid. I'll post the commit here once it's on #6483.Out of S1: per-tile bins and the speed-up (S2), the picture item (S3), the drawing light, and 4× supersampling.
180 remaining items
Drawings: the sheet page's shaded pictures, drawn a few bands a frame…
Render: one light per picture (tangency-labs#5624, W17b S2)
Drawings: a closed drawing keeps its view and dimension entries whole…
Drawings: a body's look for its picture names every field of the rend…
Drawings: the sheet page's pixel-test limit per view is data, as the …
Drawings: a view drawn again after a reopen shows its new lines, not …
Drawings: the sheet page's provider takes its work in one order, for …
progress: claim kept alive (tangency-labs#5624)
Drawings: a closed drawing keeps its view and dimension entries whole…
Drawings: a body's look for its picture names every field of the rend…
Drawings: the sheet page's pixel-test limit per view is data, as the …
Drawings: a view drawn again after a reopen shows its new lines, not …
Drawings: the sheet page's provider takes its work in one order, for …
Drawings: the work-order test checks fills and sketches too (tangency…
drawing scene: internal cleanups from the architecture review (tangen…