You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exporter: validate all input before writing so a failed export never damages an existing file #9
Since the new viewer (#8), HtmlViewerExporter.Save validates indices and geometry references before it opens the target file. Some invalid input is still only detected while the page is being written, after FileMode.Create has truncated an existing file:
Non-finite numbers (NaN or infinity in vertices, viewpoints, grid lines, clash distances, costs, texture scale) are rejected by Utf8JsonWriter in the middle of the stream. The previous page is replaced by a partial one, although the CHANGELOG says a failed export leaves an existing file as it was. Example: an OBJ with v NaN 0 0 or v 1e400 0 0.
Duplicate ViewerElement.Id: instances map to the first element, but the properties block keeps the last one, so the properties panel can show another element's data.
A mesh with GeometryId and non-empty Indices, Normals or UVs is accepted and those arrays are silently ignored (only Vertices is rejected).
TextureIndex is not range-checked; the viewer throws when switching to Textures mode.
Expected: all of these are rejected up front with InvalidDataException and a clear message, and Save writes to a temporary file in the same folder and moves it into place only on success.
Activity