making regions - blossommerz/locus-hub GitHub Wiki
Home > Making regions
< Previous: Tick and strike | Next: Boolean commands >
CLI
Making regions
The window has one Region tool that behaves three ways depending on what is selected. From the command line they are three commands, because a script has no selection to read.
[!IMPORTANT] Under construction. The CLI is being built, and this page describes work in progress. What it is called, what it can do, and how it behaves are all still moving. Nothing here is a promise about the finished feature.
Which one you want
model region-from-edgeswhen the boundary is already drawn and you want to fill it.model region-from-pointswhen you have the corners but no boundary yet.model region-autowhen curves cross each other and you want every enclosed face at once.
From edges
Give it the edges that make up the boundary.
model region-from-edges \
--members "sideAB","sideBC","sideCA" \
--name "triangle"
The loop has to close: no gaps, no loose ends, and at least two edges. Those two failures are reported separately rather than both coming back as one complaint, so a loop that is open is told apart from a list that is too short.
From points
Give it three or more points, in the order the boundary runs.
model region-from-points \
--members "cornerA","cornerB","cornerC" \
--name "triangle"
This form also makes the boundary segments, so you do not have to draw them first.
It makes its own edges every time. If a segment already runs between two of the points, this command does not reuse it, it builds a new one. That is deliberate: two regions sharing the same corners stay independent of each other, which is what you want when you are laying tiles against each other rather than welding them into one shape.
Every enclosed face at once
Give it the curves that cross, and it finds the faces they enclose.
model region-auto \
--members "gridH","gridV"
This is the one command that makes many objects from one call, so it answers
with a list of what it made, and names the inputs it skipped. An input that
encloses nothing is not an error; it is just reported. It takes no --name,
since there is no single object to name.
A lone circle is not one of these
None of the three covers a single circle or ellipse on its own. In the window that case gets a fill in place instead, which is a window feature with no command behind it. There is nothing to type for it, so a script that needs a filled circle has to build the boundary another way.
Related
- Regions & booleans: regions made and combined by hand, in the modeling window.
- CLI commands: the commands, what each takes, and what it does.
- Tangent circles: a construction worked all the way through.
< Previous: Tick and strike | Next: Boolean commands >