Luce packages
LuceLuce BaseLuciaOS

dymokomi/luced-3d

Source of release 0.11.8

0.11.8 / src / tool_bridge_fillet.luc

## Bridge Fillet (Alias's): a fillet bridging two side sets of faces across
## a center set it touches and consumes (blend_ops.luc).
## A node keeps its picks as words (curves by name, edges by their face and
## where they were clicked); an Edit CAD step takes what is picked, in the
## order picked, and waits for more (edit_cad_build.luc).
from tool_record import Tool, ToolEntry, Pick
from edit_types import face_level, patch_level
import pick_kinds
import blend_ops
import edit_cad_build
import cad_cook

pub func entry() -> ToolEntry:
    return ToolEntry(blend_ops.bridge_verb, blend_ops.bridge_verb, "bridge-fillet", "Surfaces", [cad_cook.context], [cad_cook.edit_kind], made)

func made() -> Tool:
    return entry().tool("Modify", "Surface Blends", "A fillet bridging two side sets across a center set it consumes", picks(), blend_ops.rows(blend_ops.bridge_verb), edit_cad_build.cook,
                        numbers = blend_ops.starting(blend_ops.bridge_verb), waits = waits)

func picks() -> list[Pick]:
    return [Pick("First faces", [face_level, patch_level], kind = pick_kinds.words, slot = blend_ops.first_text, step = blend_ops.first_text, doc = "The first side set: the faces the ball rolls on one side, kept by their names."),
            Pick("Second faces", [face_level, patch_level], kind = pick_kinds.words, slot = blend_ops.second_text, step = blend_ops.second_text, doc = "The second side set."),
            Pick("Center faces", [face_level, patch_level], kind = pick_kinds.words, slot = blend_ops.profiles_text, step = blend_ops.profiles_text, doc = "The center set the bridge also touches, and consumes.")]

func waits(values: list[float], texts: list[str], wired: bool) -> str:
    return blend_ops.waits_for(blend_ops.bridge_verb, texts)