Skip to content

[framework] render: merge tessellation points (kill false facet edges in previews) - #111

Merged
HaozheZhang6 merged 2 commits into
mainfrom
framework/render-merge-points
Jul 30, 2026
Merged

[framework] render: merge tessellation points (kill false facet edges in previews)#111
HaozheZhang6 merged 2 commits into
mainfrom
framework/render-merge-points

Conversation

@BenchCAD

Copy link
Copy Markdown
Collaborator

Fixes the "faceted/rough" look of preview renders (maintainer report on #79).

Root cause: Shape.tessellate duplicates vertices along BRep face borders,
so vtkFeatureEdges saw every face boundary as an open edge and drew it — a
ruled loft rendered with a line at every station even where the dihedral angle
is ~1°, and any multi-face surface looked scribbled.

Fix: run vtkCleanPolyData (point merging) on the tessellated mesh before
the normals/edge filters in render_iso. Only true >35° feature edges and real
boundaries draw now. Before/after on stop_bar_tailpiece: station seam lines
vanish; genuine edges (slot rims, bore rims, tab steps) stay crisp.

Preview-quality only — geometry, validate gates, and hashes untouched (the mesh
used for geometry hashing in validate is unchanged; this filter lives in the
render path).

…ges draw

cq tessellate duplicates vertices along BRep face borders, so vtkFeatureEdges
treated every face boundary as an open edge and drew it — lofted/multi-face
parts rendered 'faceted' with a line at every station even when the dihedral
angle was near zero. Run vtkCleanPolyData (point merging) before the normals/
edge filters: only genuine >35 deg edges and real boundaries render. Purely a
preview-quality change; geometry and validation untouched.

Signed-off-by: BenchCAD <benchcad@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

bench2 validate

set_screw_shaft_collar

  ✓ family.json: keys + base_plane valid
  ✓ pieces: build(6 params) + PARAM_SPEC + check present
  ✓ PARAM_SPEC: 6 params, all entries complete
  ✓ easy: 4/4 seeds sample+check+build+execute clean
  ✓ medium: 4/4 seeds sample+check+build+execute clean
  ✓ hard: 4/4 seeds sample+check+build+execute clean
  ✓ coverage: bore_d reaches all 15 declared values (standard table fully covered)
  ✓ difficulty separation: difficulties produce distinct programs
  ✓ geometry novelty: 7/12 unique shapes (42% duplicate)
  ✓ solids: every instance non-degenerate, 1 solid(s) each
PASS — designs/set_screw_shaft_collar

slotted_din_rail

  ✓ family.json: keys + base_plane valid
  ✓ pieces: build(10 params) + PARAM_SPEC + check present
  ✓ PARAM_SPEC: 11 params, all entries complete
  ✓ easy: 4/4 seeds sample+check+build+execute clean
  ✓ medium: 4/4 seeds sample+check+build+execute clean
  ✓ hard: 4/4 seeds sample+check+build+execute clean
  ✓ difficulty separation: difficulties produce distinct programs
  ✓ geometry novelty: 6/12 unique shapes (50% duplicate)
  ✓ solids: every instance non-degenerate, 1 solid(s) each
PASS — designs/slotted_din_rail

speaker_pole_mount_socket

  ✓ family.json: keys + base_plane valid
  ✓ pieces: build(8 params) + PARAM_SPEC + check present
  ✓ PARAM_SPEC: 8 params, all entries complete
  ✓ easy: 4/4 seeds sample+check+build+execute clean
  ✓ medium: 4/4 seeds sample+check+build+execute clean
  ✓ hard: 4/4 seeds sample+check+build+execute clean
  ✓ coverage: bore_d reaches all 2 declared values (standard table fully covered)
  ✓ coverage: flange_od reaches all 2 declared values (standard table fully covered)
  ✓ coverage: flange_t reaches all 2 declared values (standard table fully covered)
  ✓ coverage: depth reaches all 6 declared values (standard table fully covered)
  ✓ difficulty separation: difficulties produce distinct programs
  ✓ geometry novelty: 9/12 unique shapes (25% duplicate)
  ✓ solids: every instance non-degenerate, 1 solid(s) each
PASS — designs/speaker_pole_mount_socket

Previews: the previews artifact on this run.

@HaozheZhang6
HaozheZhang6 merged commit afd4a11 into main Jul 30, 2026
4 checks passed
@HaozheZhang6
HaozheZhang6 deleted the framework/render-merge-points branch July 30, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants