Pe443
September 25, 2026, 9:02am
1
Hi,
is there any possibility to only smooth special faces of a mesh where other faces are “flat”?
I create a mesh using ExtrudePolygon with round edges. When I now use forceSharedVertices() to smooth the edges of teh box, all edges are “smooth” and it looks terrible:
Is it possible that only faces with a special “angle” can be smooth?
Thx
This PR will let you do it:
master ← Popov72:fix/extrude-polygon-smoothing-threshold
opened 03:46PM - 25 Sep 26 UTC
> 🤖 *This PR was created by the create-pr skill.*
## Summary
- Expose the … existing `smoothingThreshold` option through `ExtrudePolygon`.
- Preserve an explicit zero threshold and use normalized adjacent normals consistently.
- Add focused unit coverage for selective smoothing and scale independence.
## Motivation
`ExtrudePolygon` users could not selectively smooth rounded side segments without calling `forceSharedVertices()`, which also smooths intended sharp corners. The underlying polygon builder already supported threshold-based smoothing, but the option was missing from the `ExtrudePolygon` type and one side of the normal comparison depended on edge length.
Related forum discussion: https://forum.babylonjs.com/t/autosmooth-edges/64158
Playground: https://playground.babylonjs.com/#TJLZLN#0
## Validation
- `npx prettier --check` on the changed files
- `npm run lint:changed`
- `npx tsc -b packages/dev/core/tsconfig.build.json`
- Local Playground browser verification of smoothed rounded segments and preserved 90-degree corners
- Unit coverage added; the unit test suite was not run locally
When the PR is merged, this PG will render:
instead of:
(look at the rounded corner of the blue box)
Pe443
September 28, 2026, 5:30am
3
Wow !!! Thanks for the quick fix