Repository navigation
Conversation
…nd depth map `meshy relief create|get|list|wait|stream|delete` calls /openapi/v1/relief (20 credits, paid plan). Create takes every documented parameter: --variant, --depth-only, --size-mm, --carving-mode, --carving-depth-mm, --remove-base, --removal-threshold, --base-thickness-mm, --bend-mode, --bend-axis, --bend-angle, --mesh-resolution, --target-formats and --color-mapping. Ranges, the base-thickness rule and settings the API would not use are checked before the request, for --data too. The 16-bit depth map is an asset of its own (`depth_map`, depth_map.png): -o saves it with the models, a depth-only task saves it alone, and it is never converted to another image format. --model-format naming a format the task does not have now lists the formats it has.
This branch has not been deployed
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.
What
Adds
meshy relief: one photo becomes a bas-relief 3D model and a 16-bit grayscale depth map, for 3D printing, laser engraving and CNC carving (Relief API, 20 credits per task, paid plan).meshy relief create|get|list|wait|stream|deleteon/openapi/v1/relief, built with the same resource command factory as the other endpoints (--data,-o,--async,--save-json,--operation-idincluded).--image-url,--variant,--depth-only(should_generate_model: false),--size-mm,--carving-mode,--carving-depth-mm,--remove-base <bool>,--removal-threshold,--base-thickness-mm,--bend-mode,--bend-axis,--bend-angle,--mesh-resolution,--target-formats <csv>,--color-mapping <bool>. Nothing is pinned: a flag left out is left out of the request.--dataincluded) is checked before the request: the documented ranges, an integer mesh resolution, the base-thickness rule, target formats without repeats, and settings the API would not use (D-076):--removal-thresholdwithout--remove-base true, bend axis / angle without a bend, model settings with--depth-only. Two requests the API runs but that likely miss the intent are sent with a warning: color mapping on STL / 3MF only (color_not_in_formats), and a zero carving depth with the base removed (empty_model).depth_map,depth_map.png):-osaves it with the models, a depth-only task saves it alone, and it is never transcoded (that would drop it from 16 bits to 8). The task view gainsdepth_map_url.--model-formatnaming a format the task does not have now lists the formats it has. The 402 hint also names the free plan.Tests
pnpm typecheck && pnpm test: 728 tests, 727 pass, 1 skipped (as on main). Newtests/relief.test.tscovers the registry entry, flag → body mapping (the API reference's advanced example, depth-only, remove-base, bend,--data), refusals with no request sent, warnings, get / list / delete routes,-odownloads of a colored task (OBJ + MTL + texture, 3MF, depth map, preview), streaming a depth-only task, andmeshy download --asset depth_map.