Official Codebase of 3DCodeVerse
Python
object and shader texts state each rule once: cosmetic fillets, fillet ratio, GLSL time/state, URDF clearance
gaoypeng868ea3d51995
diff --git a/harness/codeverse3d/prompts/cadquery/system.md b/harness/codeverse3d/prompts/cadquery/system.mdindex 53dc14ca..4b289b09 100644--- a/harness/codeverse3d/prompts/cadquery/system.md+++ b/harness/codeverse3d/prompts/cadquery/system.md@@ -26,14 +26,13 @@ What the gates and the lint name, measured over 26 recorded runs of this exact t* **`fillet`/`chamfer` failing in OCC** (52 findings) — "OCC fails when radius >= wallthickness or edges conflict". This is the CadQuery-specific killer. Keep every fillet- radius **strictly below the thinnest wall it touches** (a third of it is a safe rule),- select edges narrowly rather than filleting everything, and apply fillets **last**, after+ radius **strictly below the thinnest wall it touches**, select edges narrowly rather than filleting everything, and apply fillets **last**, afterthe solid is otherwise final. A fillet that throws takes its whole feature with it.* **Interpenetration** (214 findings) — parts are allowed to overlap by **≤ 2 mm**. In aB-rep workflow the right fix is usually to `union` the parts that are genuinely onesolid and to position the rest by computing the mating face, not by nudging.-* **Parts that are not in the plan** (60 findings) — "GLB part 'X' is not in the plan".- Every exported solid must be a part the plan names. An intermediate workplane solid you+* **Parts that are not in the plan** (60 findings, reported as INFO) — "GLB part 'X' is not+ in the plan". Not a gate failure, but the judge sees the stray solid. Every exported solid must be a part the plan names. An intermediate workplane solid youforgot to consume, or a construction body left in the assembly, shows up here.* **Bbox deviates from the plan** (51) and **stray islands** (44) — you built a differentsize than you planned, or an operation left a fragment. Both are measured, not judged.diff --git a/harness/codeverse3d/prompts/glsl_shader/cookbook.md b/harness/codeverse3d/prompts/glsl_shader/cookbook.mdindex 47de0974..f0289bd5 100644--- a/harness/codeverse3d/prompts/glsl_shader/cookbook.md+++ b/harness/codeverse3d/prompts/glsl_shader/cookbook.md@@ -284,7 +284,7 @@ fragColor = vec4(col, 1.0);* Aspect: divide by `u_resolution.y`, never by `u_resolution.xy` for shapes (ellipses otherwise).* `smoothstep(a, b, x)` needs a < b; AA width ≈ `1.5 / u_resolution.y`.* Brightness: accumulations (glow, bokeh sums) blow out → tonemap (`c/(1+c)` or ACES) before gamma; do not gamma twice.-* Motion: use u_time directly (`sin(u_time)`, `fract(u_time*0.2)`); do NOT use u_frame alone (frames are sampled at+* Motion: use u_time directly (`sin(u_time)`, `u_time*0.2` as a noise offset); do NOT use u_frame alone (frames are sampled atarbitrary times) and never seed per-frame randomness with u_frame (flicker).* `precision` qualifiers, `#version`, `#extension`, `#include`, `uniform` / `out` declarations: leave them out.* gl_FragCoord origin is bottom-left; y up. (The harness flips rows when writing PNGs, so what you compute is what you see.)diff --git a/harness/codeverse3d/prompts/glsl_shader/system.md b/harness/codeverse3d/prompts/glsl_shader/system.mdindex 055d8219..ffc2ada6 100644--- a/harness/codeverse3d/prompts/glsl_shader/system.md+++ b/harness/codeverse3d/prompts/glsl_shader/system.md@@ -1,6 +1,7 @@You are a GLSL fragment-shader artist writing a raw Shadertoy-style body for a headless-harness. You own every pixel of one image pass. There is no state between pixels and no-state between frames: every frame is a pure function of the pixel and of absolute `u_time`.+harness. You own every pixel of one image pass. There is no state between pixels, and none+between frames unless you opt into the feedback buffer (`u_prev` / `buffer_a.frag`, see the+contract): otherwise every frame is a pure function of the pixel and of absolute `u_time`.The harness owns the `#version` header, the uniform block and `recipes.glsl` — neverredeclare them.diff --git a/harness/codeverse3d/prompts/system/harness_contract.md b/harness/codeverse3d/prompts/system/harness_contract.mdindex e8de20dd..942b0f77 100644--- a/harness/codeverse3d/prompts/system/harness_contract.md+++ b/harness/codeverse3d/prompts/system/harness_contract.md@@ -66,7 +66,9 @@ is not evidence; a render is.* Never special-case a check to make it pass (e.g. hide parts, shrink a part to 0,add invisible geometry to satisfy a bbox, bridge islands with rods).* Never print fake success, swallow exceptions, or `try/except: pass` around geometry- that fails — a loud error is cheaper than a silent wrong model.+ that fails — a loud error is cheaper than a silent wrong model. The one exception is a+ purely cosmetic fillet/chamfer that falls back to the unrounded solid (CadQuery's+ `safe_fillet`).* Do not edit `plan.json`, `spec.json` or anything under `artifacts/`.## 6. Efficient codediff --git a/harness/codeverse3d/prompts/tracks/generate_articulated.j2 b/harness/codeverse3d/prompts/tracks/generate_articulated.j2index 6440edbb..22c3aad2 100644--- a/harness/codeverse3d/prompts/tracks/generate_articulated.j2+++ b/harness/codeverse3d/prompts/tracks/generate_articulated.j2@@ -49,7 +49,7 @@ Joints (the URDF must realise EXACTLY these; pivots are WORLD points at rest):write them out explicitly as comments in the URDF before the joint.- Use the axis vectors from the table verbatim; limits = lower/upper from the table; `effort`/`velocity` any positive numbers.-- Keep ≥ 0.003 m clearance along each joint's motion direction between the child link and the+- Keep 1–3 mm of clearance along each joint's motion direction between the child link and thelinks it moves past (drawer vs cabinet walls, door vs frame); fixed neighbours overlap ≥ 0.002 m.- Hinged lids/doors pivot at their EDGE (the hinge line), drawers slide along the cabinet depth.