GPU Workplane World Curve Preview - barocss/barocss GitHub Wiki
Authored workplanes and selected world-Curve CPU previews
Issue #1159. Owner: Execute GPU. Stage: native COMPLETE; exact receipts below. Integration and other target stages remain separate. This advances SK-01/SK-08 under #531, #547 and #660.
Deliverable and existing capability check
Retain an authored arbitrary proper workplane document, select explicit generated world Curve IDs, edit one original local point or the plane, and rebuild selected uniform CPU previews. Save the authored document and reconstruct the same native world children and previews from that file. Selection and samples must not replace the authored local intent, frame, IDs or unselected native children.
Existing #583/#805/#861 cover the XY Sketch document, bounded interactive profile editing and explicit point/D1 queries on accepted XY-produced Curves. #861 is CLOSED after its own actual UI/GL receipt. It does not persist the new arbitrary workplane wrapper. Existing #1055 supplies selected uniform previews from complete Source0; #1144 composes complete native Curve source edits with that preview. Neither owns a workplane document or regenerates world children from retained local intent. All-state workplane, GPU world and GPU Sketch Issue searches found the existing broad parents and these leaves, without a matching workplane-to-preview composition leaf.
No new GPU API, syntax, schema, evaluator, parser or renderer is needed. Reuse CAD's actual workplane document and generated world Source0, then existing GPU preview functions. This is one bounded example composition. The future interactive arbitrary-plane Sketch editor remains a separate host deliverable; this CPU/file card does not complete that editor.
Actual provider receipts and missing gate
CAD #1148 is native complete at e9d03e79d8d2511c3bdee3437d0e6bba10363b44, parent a37f02e33fee4902c36fff7a78ed25a47dcd366c. Its receipt records the first affected build and one new source/API/authored-file/cold/owned/compiled flow: 11 cases, 69 refusals, getter calls 0, seven runtime and five type exports. GPU did not replay that producer flow.
At inspected shared Root ec20329ce0184530b1e955dc9d0296c890e0fc5e, that native child is not an ancestor. Native availability is distinct from shared code availability and the new consumer's acceptance. Before implementation, require exact shared #1148 adoption and compatible source/public emitted exports, then freeze a clean isolated parent and the final case/error counts. No Planner order approval is required. Active prepared #1149 keeps its independent #1147 adoption gate and selection.
Proposed contract, to freeze at the implementation claim
Authority, versions, units and identity
- The authored authority is
barocss-workplane-sketch, version 0, length unit mm. Retain its complete localbarocss-xy-sketchintent, plane and explicit world bindings. The local XY frame is LOCAL-mm; generated world Curves use World-XYZ/mm. There is no camera axis conversion, normalized parameter or display pose in this CPU flow. - Use
evaluateWorkplaneSketchDocument,updateWorkplaneSketchDocument,validateWorkplaneSketchDocument,serializeWorkplaneSketchDocumentandparseWorkplaneSketchDocument. The owned validator returns a WorkplaneSketchDocumentReport, not a whole result. - Select 1..4 unique explicit current
worldCurveIdvalues, in caller order, from the complete accepted native result. Empty documents accept only an empty selection and produce an empty preview list; do not invoke a GPU single-Curve preparer with an invented placeholder. Selection of a strict subset does not narrow, concatenate or rewrite the authored document or unselected child sources. - For each selected child, pass its complete
profile.affine.sourceand actual world ID toprepareSelectedUniformCurvePreview. Retain the complete returned Model and source. This is generated native world Source0 from authored intent, not independently authored Curve text and not the complete authored workplane file. Checkpreview.modelagainst that actual affine child Model and preserve original degree, poles, weights, knots and parameter domain. - Existing GPU DTO format
barocss-gpu-uniform-curve-preview, version 1, profilenative-selected-uniform-curve-v1, sourceVersion 0 is unchanged. Reconstruct withvalidateSelectedUniformCurvePreview. No new exported DTO, registry or revision protocol. - Document, plane, local profile, local point and world Curve identities stay separate. Keep all actual rectangle bindings, including pole 4/parameter 4 to the first corner. Retained world IDs remain stable across point and plane edits; profile lifecycle repair uses the existing explicit native bindings. Never silently allocate, truncate or reuse removed IDs.
Admission and work
CAD's actual fixed limits remain: eight profiles, 128 local authored points, eight local edits, 64 points per polyline, 127 observations per affine child, aggregate 1016 observations, 136 world point bindings, 4 MiB aggregate source and authored JSON 262144 UTF16 code units/UTF8 bytes. Proper frame admission uses the provider's fixed 1e-9 norm/dot/determinant residuals. Native Curve/world IDs are 48 characters and actual coordinates/knots have 10000 bounds. No normalization, cap relaxation or exact rigidity certificate.
Each GPU preview independently retains its existing source 65536 UTF16/UTF8, whole Model 1..4 objects, degree 1..5, 2..64 poles, at most 70 knots and sample count 2..129. The example selects at most four children, so at most 516 uniform samples are staged. This is an example selection budget, not an aggregate GPU renderer capacity claim. Each child source contains its own complete Model; native document capacity eight is not reduced to four and is not a promise to draw eight objects in one scene.
One candidate uses one native evaluate or update, one whole owned validation, one prepare and one owned preview validation per selected child. Provider-inherited work remains separate in its actual reports. All native and GPU admission must pass before accepted variables or files are replaced. Native C0/D1 refusal unions remain in child reports; these uniform previews use native D0 samples and do not manufacture tangents or a smoothness certificate.
Copies, files and errors
Native workplane result/report are independent mutable CPU copies; preview data are independently copied and frozen. Preserve native F64 and signed zero. Derived uniform points are samples, not new control coefficients, Float32 buffers or authored geometry.
Save the actual native authored codec output, separate complete owned result JSON with an example-only signed-zero number emitter, and each complete existing preview DTO. Any selection list is example data, not a public interchange schema. Cold parse the authored file, regenerate native children, validate saved owned/preview records and perform one further local edit from that original authored document. A selected generated child file cannot substitute for the authored document during Save/Open.
Use actual WorkplaneSketchDocumentError and UniformCurvePreviewError classes/codes at their native and GPU stages. Selection admission is example-only and reports a separate selection failure; no invented shared diagnostic type or recovery conversion. Frame/binding/native/owned/codec/selection/GPU-profile or late-preview failures retain previous accepted variables and file bytes. Filesystem crash atomicity is outside this acceptance.
Pinned future input files
Read-only inspection of the native #1148 saved files at /Users/user/.barocss-ai/v3/evidence-workplane-sketch-cad/demo-output found real generated degree-one world Curves. The 64-point child has 66 knots and a 5171-byte complete Source0; primary Line/Polyline/Rectangle children have 2/3/5 poles and 315/460/581-byte sources. These fit the inspected GPU source/profile caps. This is file/source admission inspection, not an executed new GPU preview flow.
| Native case | Original authored request SHA256 | Accepted authored file SHA256 |
|---|---|---|
| actual_oblique_line_polyline_rectangle | 8c7156826103e2bcadc7e3d056971ef9191f196b20e2a3619f454f0d2cf375ed |
56442e0df9339628a6907d4a66af1b9da6155609a9ade67cf448e95f72a8c0ac |
| authored_point_upsert_stable_world_ids | ebb3f7176cbcb3975dfa2a9543e1573657a2d2c5a3133ce27499ad8c8ba1cab9 |
9a06be62e4a748298d6a308e7fa30210bf1403a42c44fd1ea7d33b3a452970da |
| plane_orientation_update_zero_local_edits | fd9ba01ddb18d4bc02e8e4b3e09811699f2bd7f92dea8371d5f90aa4e91e33f6 |
6d25d6cc3a2b7666feba3c7c1550ba2bce835e96b82d7211090df3b1d2dc3f37 |
| actual_64_point_polyline_127_observations | 8d690e0b5e0ac94b229df1d6876af868046a06aa24f12e15696e88c678ba4b7a |
b0923c59e07b53b5b87014e53dcba5d816d6dd4135d4621da803345853bfddfc |
| empty_actual_children_sources_bindings | 3037826ff0d2b5eb3dea8110b3bc9b70175881cc5535c98edfd1c1b316da0789 |
547a06c8b62f56dc75d0bc0e081ef904f8ff29833a577eec5ccc8813b2860ad4 |
| actual_eight_profiles_aggregate_bound | ef556c1f82bbb4f3e9d05df9daa4064334c65d151e4ac09d307e06873084e590 |
d392c09d213258f46dab62bf1d159b04eb9311d3e4b82eefc37c1eb891acfb58 |
Use passed input paths and hashes; do not embed private repros into product files. The future flow does not rerun the producer demo or its full refusal suite.
Ownership and one future acceptance flow
Own only proposed new examples/gpu-scene/workplane-world-curve-preview-flow.mjs. No CAD/GPU package, shared manifest/root/lock/static/policy or inherited editor changes. No claim or product branch yet.
After exact shared provider adoption, freeze the actual clean parent and run:
pnpm --filter @barocss/gpu build:library
node examples/gpu-scene/workplane-world-curve-preview-flow.mjs --fixtures <native-input-directory> --output <new-owned-output-directory>
ONE new combined ordinary-source and explicit publishConfig compiled flow: reconstruct primary oblique Line/Polyline/Rectangle intent, select the explicit three world IDs, sample nine original parameters, independently apply the retained matrix to local native D0 samples and compare actual world observations. Inspect rectangle original domain/closing binding and retained C0 reports. Apply the pinned local-point and plane edits, retaining IDs and the whole original local/native/source authority; selected points change for the intended authored reason. Save/cold parse/rebuild and make one new local edit. Include the real 64-point child with 129 samples, four selected children from the whole eight-profile result, and genuine empty selection/output.
Refuse foreign/duplicate/stale/five-ID selection, invalid count 130, improper frame, missing native binding, tampered whole owned world/source data, tampered preview observations and accessor data with getter calls zero. For the late failure, retain the valid primary native result and three saved previews, change only the third saved preview's first observed X by +1, then stage validation in selected order. Two unchanged previews reconstruct first; the third must refuse actual GPU RECONSTRUCTION before any accepted variable or file replacement. This is a saved-derived-data failure, not a fabricated native-valid/GPU-profile mismatch. Compare actual source and compiled exports/results in this same flow and record exact input/output hashes, first failures and repairs.
Native completion, exact Integration adoption, new GPU consumer completion and publication have separate receipts. No GL/browser/pixels, UI drawing/editing, camera, picking, adaptive accuracy, constraints, region/Face/Solid, persistent topology, global error or release claim follows from this CPU/file card.
Preparation record
Local specification commit 1e714a493bb7f285d2a5bae6d51f68c6e940535c preceded Issue creation. The first two Wiki pushes encountered concurrent remote advancement and were rejected as non-fast-forward; normal fetch/merge preserved other lanes and all published history. Issue1159 was created before the eventual Wiki publication, so its initial phrase “published before this card” was corrected. No implementation claim or product code followed; the exact specification and readiness gates are available before any future code. This is a documentation publication-order correction, not a native build/flow failure.
New native angle-arc provider — scope separation
CAD1158 receipt6093882265 supplies actual native buildXYAngleArc/validateXYAngleArc at clean 4dde61ac74b0a76cea81b0297956438a14e4ccd6, parent e9d03e79d8d2511c3bdee3437d0e6bba10363b44. Read-only GPU inspection confirmed the seven request fields, report return, actual source files and native parameter semantics; the producer's first build/flow10cases45refusals/getters0 remains its own receipt, without replay. At inspected Root75d6469a, exact shared availability is still pending.
The builder requires explicit local XY/mm and radian start/signed sweep; positive sweep is counter-clockwise and negative is clockwise. Native rational parameter domain[0,spanCount] is not an angle or a linear interpolation of start/sweep. The recorded quarter-sample discrepancy about +/-0.0090006434rad is a real witness against that substitution. Existing GPU uniform previews sample original native parameters with D0; they must preserve this distinction, authored request and actual provider report. A closed full turn copies endpoint bits but remains periodic:false, with native interior C0 D1 refusals. Neither a closing display segment nor sampled circular appearance certifies periodic continuity or exact global circularity.
Existing GPU degree1..5/64-pole/70-knot preview admission can describe these quadratic at-most-nine-pole Curves; that static capability check does not establish a new executed GPU consumer. No new backend or angular sampler is justified by this notice. GPU1152 radians(x) is material compiler syntax; it does not change the CAD builder's request units or add native source expressions.
The current1148 workplane document accepts Line/Polyline/Rectangle intent only. Native1158 does not add an Arc profile to that document. Keep1159's frozen proposed cases and API unchanged. A later authored workplane Arc consumer requires an actual separately versioned native intent/binding/codec provider and a named target need; do not cast Arc as Polyline, bypass exact profile admission, invent world intent or create a duplicate card on receipt of a provider notice. GPU1149's Surface adoption gate also remains independent.
Exact shared provider and implementation freeze — #1159
Exact CAD1148 adopted ate27d8699caad720a50d30217ec6a16a87aadedab with four native child blobs equal. After1149 native completion/handoff, reuse the clean isolated source checkout /Users/user/.barocss-ai/v3/wt/gpu-source-curve-edit-preview, branchcodex/gpu-workplane-world-preview, immutable parent e27d8699caad720a50d30217ec6a16a87aadedab. Old1144/1149 branches and receipts remain preserved. Native1161 is also source-code available at2ffb259f, but this exact1159 parent and contract retain ORIGINALlinear1148; no mixed or Arc payload is added.
Own exactly ONE new examples/gpu-scene/workplane-world-curve-preview-flow.mjs. Existing public evaluate/update/validate/serialize/parseWorkplaneSketchDocument and prepare/validateSelectedUniformCurvePreview only. Native owned validator returns REPORT. Versions/copies/frame/units/IDs/budgets/staging remain as above; explicit generated child Source0 is never the authored file. Native proper frame1e-9 is numerical acceptance, not exactrigidity.
Freeze six pinned real request/authored files from the table above: primaryoblique3profiles, localpoint-upsert3, plane-only3, max64polyline1, trueempty0, whole8profiles with four selected. Use explicit current world IDs in callerorder (allprimary3, onlymax1, first4of8, empty[]). Samples9 exceptmax129. One additional cold authored local Line endpointX edit +.25 with stable IDs and other whole profiles retained =>7accepted per provider,14total. No automatic/angular/normalized sampling; actual original native parameters/weights/knots/worldsources and full unselected children are retained. Independent local native sample→retained matrix→actual world D0 numeric comparisons use observed1e-7mm tolerance, not a global certificate. Actual rectangle pole4/parameter4/firstcorner binding and all true C0 child reports remain unchanged.
Stage one actualnative eval/update plus whole owned REPORT, host selection1..4 current unique IDs (empty doconly[]), GPU prepare+ownedvalidation each selected complete affine.source. Example-only selector failures use RangeError with no new public diagnostic. Cold actualauthoredcodec parse/rebuild/re-edit is authority; save separate fullowned native result and existing previewDTOs using example-only -0JSON. Full accepted variables and authored/native/selection-preview file bytes change only after all stages pass. Native mutable independent copies/GPU frozen independentcopies; no revision/history/schema/pose/newFrame.
Freeze10refusals perprovider,20total: foreign and duplicated selector; stale world_poly_profile after real native remove plus full explicit binding repair; five selected IDs from realwhole8; count130 GPU BUDGET; improperframe nativeFRAME; missingnativebinding BINDING; alteredwhole worldsource OWNED; validprimarynative with third savedpreview pointX+1 causing actual GPU RECONSTRUCTION AFTER two unchanged previews reconstruct; GPUpreview source accessor INPUT/getters0. Late failure records successfulPrefix2 and preserves priorfiles/state. Real native/GPU error classes and stage-specificcodes remain; no fake native-valid/profile mismatch or lossyfile fallback. Filesystem crashatomicity excluded.
ONE affected GPUbuild after cleanexamplecommit plus ONE new ordinary-source/esbuild and explicit publishConfig emitted-public source/API/authoredfile/cold flow. The unchanged exact e27 CAD source/emitted closure was freshly built for1149; reuse those source-matched ignored artifacts and verify hashes/exportnames rather than replaying unchanged CAD build. Record all hashes/firstfailures/repairs/supportlimits. Sourcegraph excludesCAD/GPUdist; observed CAD424/GPU54 names must agree source-vs-emitted. No native1148producer/1149proof/GL/browser/editor/Arc/galleries/unit/performance/release campaign.
Native consumer complete and additive export compatibility repair — #1159
Native6094234689: clean e27d8699→ef7e7a5e, one new example; FIRST GPUbuild0/707.5KiB and ONE first new source/emitted/authoredfile/cold flow0:14accepted20refusals/getters0/observedCAD424+GPU54/actualGL:false. Exact unchanged CAD closure already built for1149 was reused by hashes. Scoped worker wrote only the example; root reviewed/committed/executed final gates.
Whole original linear authored proper-plane/localintent/nativeworld/source/IDs/-0 remain distinct from selected D0 previews. Six pinned native cases +fresh coldLine endpoint edit perprovider, whole8/fourselected,64poly129samples, trueempty noGPUcall and actualrectangleclosing/C0 passed. World observations agree with independently mapped original local samples within observed1e-7mm, not globalcertification. Late thirdsavedpreview genuinely refuses RECONSTRUCTION after prefix2; allaccepted files/state retained. Public REPORT independently mutable/GPUDTO1 copiedfrozen, exactauthoredcodec/coldrebuild/source-vs-emitted names agree. Result199e619c7e44e4f090f8c936fe772431a1f9c80e9c349bc786f98e91083685cd plus compiled/input/output closure hashes retained.
Compatibility repair6094250879 preserves original ef7 history and appends immutable suffix ef7e7a5e→a6a79149d6454cd3e20cf3ec51f2e877fd12c314. Static check against actualnew1158/1161 public additions found fixed424/54 cardinality admission would reject legitimate additive exports. Only those two example lines changed: count is observed dynamically; whole source/emitted key equality and semantic public/profile/DTO guards remain. Initial flow passed; no failed Root run is invented. Same focused repairedflow0/14accepted20refusals/getters0, unchanged packageartifacts/no buildreplay. Both immutable deltas delivered once to sole Integration, finalnativehead a6a79149. No GL/editor/mixed/Arc/publication acceptance.
Exact local example adoption — integration validation pending
GPU independently confirmed native child a6a79149d6454cd3e20cf3ec51f2e877fd12c314 at exact sole Integration merge 08fd74740f7a8eddbe7bbed547b0ce713f61cd32. ONE adopted example blob 91f3eace7897a21968a44f522ee22c8c7db48d70 equals the native final file. Actual merge parents were checked; no author tree/shared WIP changes or history rewrite. Stage merged; integration validation pending. Current source/emitted/runtime/file execution remains queued and needs fresh matching provider artifacts. Native/source/emitted receipts and first failures/repairs are preserved without replay; no current Root/GL/editor/publication pass is inferred.
Original ef7 and compatibility suffix a6 were adopted as ONE aggregate; the original was not separately replayed. Export names/required semantic public contracts stay checked, while cardinalities are observations. New1161 mixed format and1172 consumer remain separate from this preserved linear payload.