Repository navigation
Expose glTF tessellation options - #1462
Draft
Joe-Spencer wants to merge 1 commit into
Draft
Joe-Spencer wants to merge 1 commit into
Joe-Spencer wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1462 +/- ##
=======================================
Coverage ? 38.78%
=======================================
Files ? 33
Lines ? 1828
Branches ? 0
=======================================
Hits ? 709
Misses ? 1119
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alteous
reviewed
Oct 23, 2026
Comment on lines
+102
to
+116
| pub struct TessellationOptions { | ||
| /// Detail level of the generated triangles. Defaults to high. | ||
| #[builder(default)] | ||
| pub level_of_detail: TessellationLevelOfDetail, | ||
|
|
||
| /// Enable accurate tessellation for analysis. Defaults to true. | ||
| /// Disable to use visualization tessellation with a smaller footprint. | ||
| #[builder(default = true)] | ||
| pub accurate: bool, | ||
|
|
||
| /// Account for surface curvature during accurate tessellation. Defaults to true. | ||
| /// Only applies when accurate tessellation is enabled. | ||
| #[builder(default = true)] | ||
| pub accurate_surface_curvatures: bool, | ||
| } |
Contributor
There was a problem hiding this comment.
I'm happy with the internal API but this one needs more work.
I suggest we split out tessellation options from glTF so they can be shared across other formats.
The accurate_surface_curvatures parameter is too concerned with the implementation, it should be removed entirely.
I suggest we replace the accurate parameter with something more intentional:
pub mod tessellation {
/// Level of detail
pub struct Lod {
...
}
// I can't think of a better name right now...
pub enum Kind {
// Low accuracy, non-watertight.
Visual,
// High accuracy, watertight.
Analysis,
}
pub struct Options {
pub lod: Lod,
pub kind: Kind,
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow glTF export requests to choose tessellation detail, accurate tessellation, and surface-curvature handling. The new optional
tessellationobject supports five detail presets and a visualization helper. Omitted settings retain the existing request serialization and behavior; partial objects default to High detail with both accuracy flags enabled.Includes OpenAPI, TypeScript, Python, arbitrary-data, and builder support. Runtime integration is tracked in https://github.com/KittyCAD/format/pull/929.
Validation: all 33 modeling-command library tests and both Python binding-name regression tests pass with all features. OpenAPI generation and validation, the Python/TypeScript/arbitrary feature check, formatting, and diff checks pass.