Edit the part at marks
apply_marksApply remove, smooth, and add edits to a finished STL at Refine-page marks, writing an edited mesh and report to a new folder without rerunning finite-element analysis.
Instructions
Edit the finished part at the marks of the Refine page, in a NEW folder: facts and options, no verdict.
The run folder and final.stl stay as they are. No FE run is made: the stiffness and stress of the edited part are not known. Order: remove, then smooth, then add. A step that gives a part that is not closed, or that splits it, is rolled back, and the reply says why. The fixed, load and keep-out regions are frozen: an edit within frozen_keep_mm of them is clipped, and the clip is a fact.
Reply keys: resource topopt://replies/apply_marks (the meaning of each key).
marks: the path of marks.json (the Refine page exports it: version 1, mm, the frame of final.stl), its JSON text, or the marks object. radius_mm, amount_mm (the neck offset of add), strength (smooth) and mirror are used; a value that the page does not record is the pipeline value, named in defaults_used. A mark may carry smooth_mode or remove_mode (cleanup_list writes them); the order is per_mark, the mark, then the call option.
run_dir: the run the marks belong to. Default: the last run of this server. Needs run.json, labels.bin and result/final.stl.
out_dir: the new folder. Default: -marks beside the run folder. It gets edited.stl and apply_marks.json (the full report). Refused: a run folder or a folder inside one, a folder that holds an input file of the run, a symbolic link, a folder with files that is not an earlier apply_marks folder.
allow_stale: apply the marks when source_sha256 of the marks file is not the hash of final.stl. Default: the reply states the fact (marks_match_final_stl false) and nothing changes.
options: radius_scale (1.0), pitch_mm (node spacing of the crop box; default voxel size / 4, between 0.2 and 0.5), max_crop_voxels (8 million, a guard: above it the reply gives the facts and the options, e.g. pitch_mm).
overwrite: write again into an earlier apply_marks folder.
detail: the full report in the reply. Default: a short reply; apply_marks.json has the full report.
yaml_path: the YAML of the run when run.json names a file that is not there; used for the exact frozen-region check.
CONTRACTS.md section 29. Each mark is one local edit of result/final.stl on a signed distance field in a crop box around the mark, with the method of the pipeline stage s7_cleanup: remove = a cut that protects the parent (then the parent check), add = a closing with a ball (a neck offset when the closing adds little), smooth = an isotropic fairing for a point and a web fairing for a stroke (smooth_mode tube rebuilds a whole strut: it does not use radius_mm, and the reply gives its planned volume and reach). The new surface is spliced into the mesh in a zone around the edit; the triangles outside the zones stay bit for bit.
More keys of options: max_total_voxels, frozen_keep_mm (3), frozen_full_mm (6), close_mm (3), neck_min_mm3, parent_tol_mm (0.2), parent_check ("report" or "enforce"), smooth_mode ("auto", "tube", "iso", "fair"), remove_mode ("cut" or "shave"), mirror_plane ({axis, at_mm}; else the plane of the mark or of run.json, else y = 0), skip ([mark ids]), per_mark ({id: {radius_mm, amount_mm, strength, mirror, smooth_mode, remove_mode, skip}}), check_frozen_exact, loose_body_mm3, max_odd_rays.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| marks | Yes | ||
| detail | No | ||
| options | No | ||
| out_dir | No | ||
| run_dir | No | ||
| overwrite | No | ||
| yaml_path | No | ||
| allow_stale | No |