Skip to content
AI-Ready Docs
/llms.txt/llms-mcp.txt

Names that survive edits ​

A part is a list of features. Later features point at faces and edges of earlier results: a fillet names the edges it rounds, a face fillet, a draft or a thread names faces, a face split names the face it divides. After every edit (a radius, a position, a boss added earlier in the list) the whole list is evaluated again and every B-rep is built anew. So a reference cannot be an id or a place in a list. It is a name worked out from the features each time, the same way.

This page shows how those names are made and how a reference is resolved. The short rules are on Modeling API → Names. Use Play/Pause, the arrows or a step's number to go through each figure.

The rules at a glance ​

WhatNameExampleMade in
A face of a feature<id>.<role>: top, bottom, side<i> (i: the authored segment), hole<h>.side<i>p.top, c0.side0features/prismatic-solid.ts (prismaticFromProfile)
A wall of a tagged sketch segment<id>.side[<tag>]ce.side[w]document/side-names.ts (sideName)
Several faces of one name#1, #2, … by a point inside eachp.top#1nameFaces, the Booleans' stitch
An edgeits two faces' names, sorted, joined by |c0.side0#1|p.top#1every builder
Several edges of one name#1, #2, … by a middle pointc0.side0#1|c0.side0#2#1nameEdges
A fillet's or chamfer's surface<id>.facef.faceblend/edge-finish.ts
Copies@k (pattern copy k), @m (kept mirror)p.top@1part/part-model.ts

1. Faces and edges from features ​

A feature names the faces it makes from its own id and each face's role. An extrude's walls take the index of the sketch segment they come from; a loop drawn clockwise is reversed first, and the index still counts the segments as drawn. An edge has no role of its own: it is named by the two faces it joins.

Names, feature by feature
p.side2p.side1p.side3p.side0p.topp: 6 faces and 12 edges
1. A feature names its faces

An extrude p of a rectangle makes six faces. Each is named from the feature's id and the face's role: p.top, p.bottom (underneath), and one wall per sketch segment, p.side0 … p.side3 in the sketch's order. No name depends on where a face sits in the B-rep's list.

face = ⟨feature id⟩.⟨role⟩,   role ∈ { top, bottom, sidei }   (i: the authored segment)
Plate 40 × 20 × 6 mm, bosses of radius 4 at (10, 10) and (30, 10), a groove at x = 18–22: every name, count and key is the built kernel's for this part. Seen from above; p.bottom and the groove's own faces (g.side1, g.side3, g.bottom) are not drawn. The inside points are worked out in the page by the kernel's method and agree with its own to 10⁻¹¹ mm.

2. Numbering a repeated name ​

A name can belong to several faces: a circle's wall is two half faces, a cut splits a top in two. Each Boolean first drops the #k from its inputs' names (baseName), so pieces are always numbered afresh from the feature's name, never #1#2. Faces of one name are then sorted by a key, a point of each face, by x, then y, then z:

BuilderKey of a faceComparison
Upright (prismatic) solidsa wall: its segment's middle at half height; a cap: a point inside its regionexact
Planar polyhedrathe mean of its outer loop's verticesexact
Analytic Boolean (planes, cylinders, NURBS)a point inside its region, mapped onto its surfacea coordinate within 100 t counts as equal

The point inside a region (regionInteriorPoint) is found on lines across it at ½, 0.382, 0.618, 0.236, 0.764, … of its height: the middle of each inside interval is a candidate, and the candidate farthest from the boundary wins.

Edges of one name, such as the two seams between a cylinder's halves, are numbered by nameEdges the same way. The point is the mean of the curve's first, middle and last control points, and the comparison is exact.

3. The rounding trap ​

The analytic Boolean reads its inputs back from the last result, so a key is computed again at every step. Two keys that are equal in exact arithmetic can then differ by an ulp or two, and an exact comparison ends up ordering them by rounding (D282).

One ulp decides the order
c0.side0c0.side0c0.top-3-2-10+1+2+3x (mm): both at 10upperlowerupper (10, 11, 11) · lower (10, 5, 11), to the eye
exact: #1 is the lower half · within 100 t: #1 is the lower half
1. Two halves, one name

The boss c0, joined to a plate whose edge was rounded, goes through the analytic Boolean. Its wall is two faces of one name, c0.side0. The stitch numbers them by a point inside each: the upper half's lies at (10, 11, 11), the lower half's at (10, 5, 11). Points are ordered by x, then y, then z.

order(a, b): the first coordinate i where ai ≠ bi decides
The keys are the kernel's, logged from the analytic Boolean's stitch for the boss-row test's part (only the first boss's halves are drawn). The number line is to scale in ulps; the margin of 100 t is not (it is about 5.6 × 10¹⁰ ulps wide). D282 records that on the build before the fix the lower half was c0.side0#1 after b0, #2 after b1 and #1 again after b2; the keys shown here are today's build's.

t here is the analytic Boolean's tolerance, 10 × max(10⁻⁷ mm, 10⁻¹¹ × s), where s is the largest coordinate of the two inputs (at least 1). It is 10⁻⁶ mm for any part within 10 m.

4. Pieces apart keep their names ​

After a Boolean, kept pieces on one plane (or one cylinder) facing one way may be joined into one face. Before D281 they were all joined, and all took one name. Now only pieces that meet are joined.

A cylinder's face needs a seam, so pieces that go all the way round cannot become one face. Since D287 they are cut at two seams half a turn apart and become two faces, the way an extruded circle's wall is two faces. Each half takes the name of the first piece lying in it. Restoring a corner left a pipe's wall in eight pieces; now it is two, under the pipe's own name.

Pieces apart keep their names
p.top (z = 6): another planer.facegroup: c0.top, c1.top, c2.top, c3.top (z = 11)
1. Pieces on one plane

After the fourth boss, c3, the Boolean has kept four pieces on the plane z = 11, all facing up: the tops of c0 … c3. Pieces whose planes agree (same facing normal, same offset within the tolerance t) form one group; so do pieces of one cylinder.

same plane: na·nb > 1 − 10⁻¹²  and  |na·(ob − oa)| ≤ t
Seen from above; names are the built kernel's for these parts. The box padding is drawn some 10⁶ times wider than it is (10 t = 10⁻⁵ mm). Which piece is "first" follows the Boolean's order of pieces; the joined top's name in the last step is as observed for each order of the operands.

5. Through fillets and rounds ​

A fillet or chamfer is made as a tool body subtracted from the part. The tool's rounding surface is named <id>.face, and its other faces <id>.tool; in the result below none of them is left. Every other face keeps its name, and so its edges keep theirs. A radius change alters the fillet's size but no names. For a rod lying along a plate, rounded with f where it meets the top, the kernel gives the same lists at r = 1, 2, 3 and 7.5:

Faces (9)ce.bottom ce.side0 ce.top f.face pe.bottom pe.side0 pe.side2 pe.top#1 pe.top#2
Some of the 21 edgesce.side0|f.face, f.face|pe.top#2, ce.side0|pe.top#1, pe.side2|pe.top#2

Position names (side<i>) change when a sketch segment is inserted or removed: every later index moves. A sketch can give its segments tags instead (sideTags: letters, digits, _ or -, 1 to 32 of them, unique in the sketch). The walls are then <id>.side[<tag>], and an inserted segment takes a new tag while the others keep theirs. A corner rounded on extrude1.side[e2]|extrude1.side[e3] stays the same corner after a point is added to another side.

6. Resolving a reference ​

References are checked when the feature that uses them is evaluated. A reference that finds nothing is refused with a typed error (its code); none is moved to a nearby face or edge.

ReferenceHow it is matchedRefusal
A feature: id, or id/k for part kan earlier feature's resultREFERENCE: no earlier feature …, … is not a part, … is a sketch, not a solid
Finishing one partthe target must be one partREFERENCE: … one part at a time (name it as id/k)
Edges of a fillet or chamferthe exact nameSELECTION: no edge named …; edges: … (the first 12)
Edges of sheet-metal flanges and corner reliefsthe exact name, else the two faces' base namesSELECTION: … names 2 edges: … when that matches more than one
Faces of a face fillet or threadthe name, or a base name meaning all its #k piecesREFERENCE: no face … on the target
Faces of a draft, a full round, a hole's start facethe name, or the first face of that base nameREFERENCE: no face … on the target
The face of a split-facean id, a name, or a base name meaning exactly one faceREFERENCE: [NO_FACE], [AMBIGUOUS] p.top names 2 faces (p.top#1, p.top#2): name one

A split face's pieces are <face>#1, #2, …, the pieces with the pull first for an isocline split, then by position. The pieces can also be named in the feature (names); a name already used by another face is refused (NAMES). The split keeps every other face's name exactly as it was (D149).

Where it is in the code ​

FileResponsibility
packages/barocss-cad/src/features/prismatic-solid.tsprismaticFromProfile (roles, holes, regions, caps); nameFaces and byPosition; nameEdges
packages/barocss-cad/src/document/side-names.tssideName, SIDE_TAG: positional and tagged wall names
packages/barocss-cad/src/brep/curved-arrangement.tshalves (an arc over π + 10⁻¹² is split in two); regionInteriorPoint
packages/barocss-cad/src/brep/analytic-boolean.tsstitchWith (face names by keyOrder, edge names); keyOrder; mergePieces and clustersOf (D281); splitFace (D149)
packages/barocss-cad/src/brep/polyhedral-boolean.tsbaseName; face names by loop centre; edge names
packages/barocss-cad/src/blend/edge-finish.tsthe tool's <id>.face and <id>.tool
packages/barocss-cad/src/part/part-model.tsreferences (ref, solids), edgeNamed, face lookups, @k and @m copies
packages/barocss-cad/src/part/part-finish.tsfillet and chamfer features: their edge list and target checks, and finishEdges

How it is checked ​

  • packages/barocss-cad/test/boolean-boss-row.test.mjs: eight bosses on a rounded plate. Each adds 6 edges and 4 vertices, and c0.side0#1 is the same half after every Boolean. It fails on the build before D282.
  • packages/barocss-cad/test/r10-1.test.mjs ("R10.1 names"): the fillet face is f.face, and every face and edge name is the same at radii 1, 2, 3 and 7.5. A tagged rod keeps ce.side[w] through the fillet.
  • packages/barocss-cad/test/api-stability.test.mjs: a vertex inserted upstream with the side tags kept rounds the same edge. An edit that takes the named edges away is refused, typed, and never moved to another edge.
  • packages/barocss-cad/test/d149-split-face.test.mjs: split pieces b.top#1, b.top#2 or the given names, every other face's name kept, and the refusals mapped to the document's codes.
  • packages/barocss-cad/test/part-model.test.mjs: names through the part model's features.

Limits ​

  • A name is as stable as the topology. An edit that adds a split renames the pieces (p.top becomes p.top#1 and p.top#2), and with them their edges: a fillet on c0.side0#1|p.top, written before a groove was cut across the top, is refused afterwards (no edge named c0.side0#1|p.top).
  • #k follows position, not history. When pieces move past each other along x, their numbers swap.
  • Only the analytic Boolean orders with a margin. The prismatic and polyhedral builders and nameEdges compare exactly. Their keys are computed from the authored geometry each time rather than read back from the last result.
  • When coplanar pieces that meet are joined, the face takes the name of the first piece lying in it, in the Boolean's order of pieces. The kernel gives k.top for a plate's top and a block's top joined in r ∪ k, and p.top in k ∪ r.