Skip to content

Feat/rvm converter console - #101

Open
olavgg wants to merge 3 commits into
mainfrom
feat/rvm-converter-console
Open

olavgg wants to merge 3 commits into
mainfrom
feat/rvm-converter-console

Conversation

@olavgg

@olavgg olavgg commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What this changes

How it was verified

Checklist

  • Pull requests this one depends on are named above and merged first, or there are none
  • Commits are signed off (git commit -s), per CONTRIBUTING.md
  • ./gradlew build passes
  • Behaviour visible outside this repo is reflected in the documentation, or does not need to be
    (see AGENTS.md for which of the two documentation sites it belongs in)

@olavgg
olavgg added this pull request to stack #102 September 15, 2026 10:29
@olavgg
olavgg force-pushed the feat/rvm-converter-console branch from fc1f9c2 to 9b61fae Compare September 15, 2026 10:43
@olavgg
olavgg force-pushed the feat/rvm-converter-console branch from 9b61fae to 36c62f5 Compare September 15, 2026 10:47
JosteinGj
JosteinGj previously approved these changes Sep 15, 2026
@olavgg
olavgg dismissed JosteinGj’s stale review September 15, 2026 18:56

The merge-base changed after approval.

@olavgg
olavgg force-pushed the feat/rvm-converter-console branch from 36c62f5 to 914c43c Compare September 15, 2026 18:56
@olavgg
olavgg requested a review from JosteinGj September 15, 2026 18:56
@olavgg
olavgg force-pushed the feat/rvm-converter-console branch 2 times, most recently from 9d3057e to 488ba59 Compare September 16, 2026 08:06
Base automatically changed from feat/model-viewer to main September 16, 2026 08:09
@olavgg
olavgg force-pushed the feat/rvm-converter-console branch from 488ba59 to a18a4f0 Compare September 16, 2026 08:19
@JosteinGj

Copy link
Copy Markdown
Contributor

I feel like this is becoming large enough that it perhaps warrants its own tab in the ui instead of being tacked onto the files UI? then we could have a browser filtered on the supported file formats and i think expanding it in the future will be easier if its not built as a modal on top of files

olavgg and others added 3 commits September 16, 2026 10:37
Nothing in examples/3d-models carried a texture, so no fixture showed whether
one reaches the screen. uv-cube is a 1 m cube with a checker whose red, green
and blue corner cells make a mirrored or upside-down texture obvious, in one
file per route a texture takes into the viewer: embedded in a GLB, named by a
.gltf beside its .bin, and named by an OBJ's material library.

pipe-valves.glb is what a textured plant model should look like: a 4 m pipe
in brushed steel with a yellow gate valve near each end, 17 named parts. The
steel is metallic, so it also exercises the environment-map lighting.

gear-pump goes: its pipe run and gears were not aligned, so it showed a model
that looked broken rather than one that tested anything.

The README's multi-file section described the viewer before it fetched a
model's companion files; it now records what is fetched and the limits.

make-textured.py writes every file deterministically, and the glTF files pass
the Khronos glTF validator with no errors, warnings or infos.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Olav Gjerde <olav@intellistream.ai>
… GLB

An .rvm file now gets "Convert and view in 3D" in the file dialog, shown only
when datahub.rvm-converter.url is set, so a deployment without the converter
shows no dead button. The dialog finds the attribute file beside the model by
base name (.att or .txt) and the browser calls the converter itself with the
user's token, the way the Analyze tab calls datahub-analysis, so the api's
dataset ACLs decide what may be converted.

The GLB it returns is shown at once and saved beside the RVM as <name>.glb in
the same dataset, so the model opens later with plain View in 3D and no
converter. The upload runs alongside the viewer instead of holding the model
back. It never overwrites: an existing <name>.glb is left alone. The external
id derives from the RVM's, since a name-derived one collides across folders,
and a 409 is retried once under a suffixed id because a deleted file keeps its
external id (inode.external_id_hash is unique across deleted rows), so the
first conflict may be the id rather than the path.

The converted view offers Download RVM and Download GLB. The GLB comes from
the copy already in the page, so it downloads even when the save was refused.

The service itself still stores nothing; its README says so and describes the
console side.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Olav Gjerde <olav@intellistream.ai>
The viewer now shows a model's size in its top-left corner and draws it
beside the model as dimension lines with extension lines and labelled values,
along the bottom edges facing the camera and up one end, following the camera
as it orbits. Clicking a part highlights it and measures that part instead.
Sizes are metric: millimetres while every side is under a metre, else metres.

The lines are drawn on a 2D canvas over the WebGL one, redrawn straight after
each viewer render, because the vendored library does not expose three.js. The
viewer steps back to 1.35 times the fitted radius on load so they fit.

Height is Y, which the library always shows as up. The whole model is boxed
along the viewer's axes; a part in the tightest box among its own frame, its
principal axes, and minimal cross-sections turned about the vertical, its long
axis and its most common face directions, so a pipe laid at an angle reads its
length and diameter. The viewer's axes win within 1%, so a faceted pipe along
an axis reads its nominal diameter rather than the width across its flats.
Orientations are searched on at most 50k vertices and measured on all of them.

Units come from the file. The library records millimetres only for STEP and
IGES, so the rest was measured with millimetre variants of the fixtures: the
COLLADA loader scales to metres, the AMF loader to millimetres, and the 3MF
loader ignores the declared unit, so the viewer reads it from the zip itself.
STL, OBJ, PLY and OFF store no unit; they are read as metres and say so.

cube.step claimed to be a 1 m cube but declared millimetres with 1 mm edges,
which the size readout exposed; make-step.py now writes 1000 mm edges.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Olav Gjerde <olav@intellistream.ai>
@olavgg
olavgg force-pushed the feat/rvm-converter-console branch from a18a4f0 to c1fcd34 Compare September 16, 2026 08:37
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