Repository navigation
Report the approximate scene geometry in the export warnings - #46
Merged
Merged
Conversation
The geometry warnings printed part names taken from the model to standard
error as stored. A name with a line break or an escape sequence broke the
one-line format, could forge a warning line and reached the terminal, and
a name shared by many parts did not identify the part.
- Name a part by its source id (GUID, or part:{id}) in the messages.
- Drop the ProxyBox finding: every mesh is a proxy box, so the number of
them is ElementsWithGeometry, and no record per part is needed.
- Say that default dimensions are used when none are read from the profile
name. Dimensions read from a name are an estimate, not a check of the
profile.
- Print the proxy box warning for the IFC export too.
- Correct the CHANGELOG and docs: the HTML viewer is not written to
standard output.
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.
Fixes #43.
TdbIO.Scenenow reports what it did with the geometry of every part, andtdbio exportsurfaces it.What changed
TdbGeometryDiagnostic(Kind,ElementId,SourceId,Profile,Message) with kindsProxyBox,FallbackDimensionsandNoGeometry;TdbSceneResult.GeometryDiagnosticsholds one record per part with a proxybox, per part whose profile was not recognized (the proxy box falls back to the default dimensions of
150 mm x 150 mm) and per part with no usable geometry (no start or end point, or a degenerate axis).
TdbSceneResult.PartCountis new.tdbio export model.db1 viewer.htmlandtdbio export model.db1 model.scene.json --scene-jsonprint the findingson standard error: a summary line per kind and up to 20 per-part detail lines per kind (the rest are counted in the
summary; the full list stays in the API). Standard output keeps only the scene JSON or the HTML file. Exit code and
JSON output are unchanged.
docs/cli.md(new "Scene and HTML geometry warnings" section, plus theexportrow in thecommand table),
docs/public-api.md(new "Scene adapter" section), the README and the CHANGELOG.Verification
dotnet test: TdbIO.Tests 493 passed / 38 skipped (private inputs), TdbIO.Scene.Tests 12 passed, on net8.0 andnet10.0. New cases cover a recognized profile (proxy box, no fallback), an unrecognized profile (fallback
dimensions), a degenerate axis, missing endpoints, the warning formatting and the 20-part detail cap; the two
end-to-end CLI export tests now assert the warnings on stderr and that the JSON stays free of them.
dotnet packofTdbIO.Scenepasses the package validation against 0.1.0 (public API additions only).dotnet build src/TdbIO.Scene -p:BuildNativeCoreOnly=truepasses.15988 of 15988 parts use rectangular proxy boxes, 3446 unrecognized profiles summarizedwith 20 detail lines and a tail, 23 stderr lines total, 0 warnings in the scene JSON.