Drawings
The Drawing tab turns the part, or the assembly, into a dimensioned sheet. The sheet is computed from the model, so it follows every change; the dimensions and notes you add are kept with it.
The sheet
- Drawing scope chooses what is drawn: the base part, one placed part, or the assembly.
- Sheet size is A4 landscape or A3 landscape. Scale is Auto or a fixed scale. Projection is Third angle or First angle.
- The orthographic views are Front, Top, and Right; pictorial views include Isometric, Dimetric (ISO 5456-3, 1 : 1 : 0.5), and Trimetric (25° / 30°), all drawn as exact hidden-line projections, plus magnified detail views. Hidden lines, Tangent edges and Centre lines toggle what they show.
- Orthographic dimensions, ordinate and baseline sets, datums, datum targets, standalone frames, broken views, detail views, and annotation leaders apply to orthographic views (and to sections and details where supported), not to pictorial views.
- Dimension styles include standard linear, radial and angular callouts as well as baseline and ordinate chains, and PDF export writes crisp vector text alongside SVG and DXF sheets.
- The title block carries the drawing's title and revision. Next revision steps it (A, B, …). When the model has changed since that revision, Revision out of date says so.
- Beside your REV, the title block's SRC line names the document revision the sheet was drawn from, in every export of the sheet. See Revisions and sources.
Changing the drawing scope is refused with DRAWING_SCOPE_REFERENCES while the sheet has manual dimensions, datums, datum targets, control frames or notes with leaders. Keep the scope, or remove those references explicitly first. A permitted scope change clears automatic dimensions; it does not transfer their references to the new part.
Without an explicit scope, sheets with balloons or a BOM table use assembly scope. Other sheets use the base part. A part sheet normally draws made bodies only. Assembly scope keeps bought elements, and enabling balloons on a part sheet keeps those elements visible so the balloon can point to them.
First angle and third angle
Projection changes where the orthographic views are placed. In Third angle, the top view is above the front view and the right view is to its right. In First angle, the top view is below the front view and the right view is to its left. The front and top views keep the same horizontal mapping; the front and right views keep the same vertical mapping.
For an unbroken box measuring 40 mm along X, 20 mm along Y and 10 mm along Z, use the default front view looking from −Y. At a fixed scale of 1:2, the projected outlines have these sizes:
| View | Model width × height | Size on the sheet at 1:2 |
|---|---|---|
| Front | 40 × 10 mm | 20 × 5 mm |
| Top | 40 × 20 mm | 20 × 10 mm |
| Right | 20 × 10 mm | 10 × 5 mm |
These sizes are the same in both projection arrangements. They exclude labels, dimensions and the gaps between views. A different front orientation changes which model axes form the view's width and depth.
Open the diagram at full size.
The diagram is a calculated layout schematic, not a captured drawing or a print-size reference. Its rectangles show the relative outline sizes; the app also reserves space for annotations when laying out the sheet.
Drawing standard
Standard (next to Projection) is Not set, ISO or ASME. Not set keeps the default drawing style. ISO and ASME each apply one preset; changing it is one undo step and the sheet is drawn again. The same preset reaches every export: the SVG, PDF and DXF sheets and the 3D annotations. In chat, set_drawing takes standard as iso, asme or none.
| Not set | ISO | ASME | |
|---|---|---|---|
| Lettering height | 3.5 mm | 3.5 mm (ISO 3098) | 3 mm, 0.12 in (ASME Y14.2) |
| Arrowhead | filled, 3 mm long, 1.2 mm across | filled 15°: 3 mm long, 0.8 mm across (ISO 129-1) | filled 3:1: 3 mm long, 1 mm across (ASME Y14.2) |
| Dimension text | aligned with the line, above it | aligned with the line, above it (ISO 129-1) | horizontal, in a break of the dimension line (ASME Y14.5 unidirectional) |
| Zeros (millimetres) | leading zero, trailing zeros dropped | 0.5, 12, 1.25 (ISO 129-1) | 0.5, 12, 1.25 (ASME Y14.5 metric) |
| Projection symbol | the sheet's own small symbol | truncated cone, ends h and 2h across, 2h long, end view circles h and 2h, centre line; h = 3.5 mm (ISO 5456-2) | the same, h = 3 mm |
| Datum feature triangle | filled | filled (ISO 5459) | filled (ASME Y14.5) |
| Datum line target | phantom line | two crosses joined by a thin continuous line (ISO 5459) | phantom line (ASME Y14.5) |
| Concentricity, symmetry | no advice | allowed | a FRAME_RULE warning: Y14.5-2018 dropped them, use position or profile |
Under ASME the text is placed in a break of the dimension line, the break being the text's width and a millimetre either side. When the text does not fit between the arrowheads, it is set horizontally beside the line instead. The inch rule is under Units.
The ASME preset also uses 3 mm for ordinary view, section and detail labels, stacked tolerance deviations, table and BOM text, and weld text. Their spacing and layout use the same text height. Small title-block labels and glyphs inside symbols retain their own sizes; this preset does not certify a complete drawing against ASME.
The ASME advice on concentricity and symmetry is a warning in Drawing issues, never a refusal: the frame can still be authored and an old one opens unchanged. In AutoCAD 2000 and R12 DXF, the ASME dimension style also records 3 mm text, centered placement and horizontal orientation. Each dimension's own drawing keeps its text height, arrowheads and placement. Plain and ISO dimension-style defaults stay unchanged. These style fields guide an external reader's defaults; they do not guarantee the same layout after that reader regenerates a dimension. DXF sheet coordinates stay in mm, including inch and dual display. The printed labels carry those display units; editable dimension-unit regeneration is a separate limitation.
Units: inch and dual dimensions
The part and every dimension value stay in millimetres; Units only changes how the sheet prints lengths. Units (next to Standard) is mm or inch; Dual units adds the other unit after each dimension in square brackets, primary first (ASME Y14.5 §1.6.4, Y14.2): 2.500 [63.5] on an inch drawing, 63.5 [2.500] on a mm one. Details (closed) holds mm decimals and inch decimals, each 0 to 6; empty keeps the default (mm as before, inch 3). Each change is one undo step, the sheet and its previews are drawn again, and the title block's UNITS cell reads mm, inch, mm [inch] or inch [mm]. In chat, set_drawing takes units (mm or inch), dual (true or false) and precision ({mm?, inch?}; {} resets); a value outside those is refused.
- Inch numbers are the mm value divided by 25.4, with no leading zero and trailing zeros kept to the precision (ASME Y14.5 §1.6.2): 25.4 mm is
1.000, 12.7 is.500, 0.127 is.005, 100 is3.937. ISO has no inch rule of its own, so the ISO and the unset drawings use this one too. - Millimetres follow the standard's rule as before (trailing zeros dropped); with an mm decimals value the number has exactly that many places (
12.0). A tolerance in plain mm prints as entered, up to 4 places (±0.005,±0.125). - Numeric tolerance limits stay ordered and inside the authored zone. The dimension is rounded to nearest at the chosen decimals, and each deviation is then rounded inward from the true limit (the upper one down, the lower one up), so every printed limit lies inside the true zone. The decimals start at the drawing's (inch 3, or mm decimals; plain mm 2 or the decimals the tolerance was entered with) and rise, inch up to 5 and mm up to 4 (or an explicitly higher precision), until no nonzero deviation prints as zero and the zone keeps at least 80% of its width; the dimension gains zeros to the same decimals (ASME Y14.5 §1.6.2). Rounding can make a symmetric tolerance unequal, and then it prints as two deviations. 0.05 mm on 64 is
2.5197 ±.0019, 0.005 mm is2.51969 +.00019/-.00020, +0.009/-0.004 mm on 8 is.31496 +.00035/-.00015, ±0.05 mm at 0 mm decimals is64.00 ±0.05, and 10.004 ±0.005 in plain mm is10.004 ±0.005. If even the most decimals cannot do it, an ordered numeric interval still prints at the most and Drawing issues showsUNIT_PRECISIONnaming the dimension. If no numeric interval can be represented, the sheet prints tolerance not printable and reportsUNIT_PRECISION; it does not print inverted limits or collapse a positive-width zone to a point. An exact zero-width zone remains numeric when its endpoint is representable, including a deviation that compensates for rounding the nominal. The authored tolerance is unchanged. A fit class (h7,H7/g6) stays as written; its size and deviations print at common decimals by the same rule. An unrepresentable fit member shows limits not printable while other members remain numeric. An explicit tolerance and a fit on the same dimension share the displayed nominal precision. Exact decimal limits use the resolved model number: a small floating-point residue in a measured size can contract a printed limit by one final decimal step to keep it inside the authored zone. - Dual prints the dimension and its tolerance in both units:
2.5197 ±.0019 [64 ±0.05]. Deviations that stack beside the value print on the line instead (.3150 +.0039/-.0019 [8 +0.1/-0.05]). A hole callout prints whole in both units. An angle never converts and never gets brackets. - A short linear label can use an outside position when its original region overlaps drawing marks. Nearby views, annotations, tables and the sheet/title regions are checked before choosing a position. Stacked deviations, basic boxes and attached control frames move with the label. Existing safe labels stay in place; the original dimension line, arrowheads, value, tolerance and authored placement stay unchanged. A label placed beyond an endpoint gets a connector to its dimension; a blocked connector makes that candidate unavailable. If no safe position is found, the original placement stays and Drawing issues reports
TEXT_OVER_LINESorOFF_SHEETas applicable. Existing inline text gaps and radius, diameter, pitch-circle and angle labels keep their placement rules. - What converts: linear, radius, diameter and pitch circle values, tolerances, fit deviations, hole callouts (diameter, depth, counterbore, countersink), geometric tolerance frame values (a frame is not a dimension, so the decimals setting does not apply: in mm as entered; in inch a zone width rounds down and a projected zone height rounds up, each at 3 to 5 places keeping 80% of the value, and an unequal amount, which moves the zone, rounds to nearest within 5%;
UNIT_PRECISIONwhen 5 places are not enough), weld symbol sizes and the weld list's size column, datum target sizes, the bearing-ring width in element callouts, and the mm columns of a table made from the part (bend, cut list, spring, gland and weld tables; mass and counts stay). An element size line (a sentence of lengths) keeps its mm header, and a table with a section column adds the noteSection sizes are in mm. Frames, datum targets and tables print the primary unit only, even when Dual units is on. - What stays in millimetres: a thread designation (
M6×1), notes and a table you typed yourself, the element size lines and section names, the drawing check's messages, and the size fields in the editors (they take model millimetres). - Exports follow the sheet: the SVG and PDF text, the DXF dimension text (
2.520 ±.002 [64 ±0.05]) and the 3D annotations (textin the primary unit,altin the other, thevaluestill in mm).
Title blocks and revision history
- Title block chooses Basic or Extended. Basic keeps the original layout. Extended adds Organization, Drawing number, Drawn by, Checked by, Material and Finish under Title block fields. These are entered text, not values taken from the part's material or process. The templates make no standards claim.
- The extended block needs more sheet space. Long values are reduced in size and then shortened with an ellipsis to fit their cell; the full text stays in the document. Switching back to Basic keeps the fields for later use.
- Revision history stores records you enter. Set the drawing's revision, enter Date, Change and optionally By, then click Record revision. This also turns on Revision table. Each revision label can appear once, with at most 50 records. Remove deletes one record; clearing the table checkbox hides the table and keeps its records.
- The table shows revision, date, description and author in the order entered. It uses the same placement and issue checks as other drawing tables. The fields and table are included in the sheet's SVG, DXF and PDF exports.
- Changing the active revision or clicking Next revision does not add a history record. A record does not change the active revision or establish approval. Checked by is also entered text, not a recorded approval action.
- The agent sets
titleBlockandrevisionsthroughdrawing.set(set_drawing). The title block has atemplateofbasicorextended, plus optionalorganization,number,drawnBy,checkedBy,materialandfinish. It replaces the previous title block. Each revision record hasrevision,date(YYYY-MM-DD),descriptionand optionalby. The list replaces the history;[]clears it, and omission keeps it. To show it, include a table withfrom: 'revisions'. Invalid fields, dates, duplicate labels and multiline text are refused withDRAWING_OPTIONS. - A record can also carry
eco, an engineering change order number (1–20 characters, single-line). The revision table gains an ECO column only when at least one record has one; without any, the table is as it was.
For authored revision history, supply a dense list with no empty slots. One invalid record refuses the update; it does not silently remove that record or clear the history. Revision labels allow 1–6 characters, descriptions 1–120 and authors 1–60. Optional title-block fields allow 1–120 characters. Omit an optional field if unused; an explicit empty or whitespace-only value is refused. Text must be single-line. Leading and trailing spaces count toward the length limit and are retained. Dates must be real calendar dates in YYYY-MM-DD form. Saved-file readers filter invalid or duplicate records. An authored update must pass the stricter checks above.
Sections
Add section places a cut through the part: section A–A, B–B and on, each with its cutting line in the view where the plane is edge-on, and the cut faces hatched.
- A principal section is square to the front, top or right view.
- An aligned section follows an off-axis feature, for example a keyway in a tilted bore. Its plane is square to the feature's axis, and its cutting line is drawn inclined.
- Export section DXF writes one section on its own.
When setting sections through the agent, a changed or removed section with dimensions, geometric control frames, or child detail views gives DRAWING_SECTION_REFERENCES. Remove those references explicitly before changing the section definition. In the 3D modelling viewport, persisted Section views (sectionViews) support up to 32 named views with 1 to 6 finite planes (plane, planes, box, or cutout modes) as display-only views that do not modify evaluated solid revision or model geometry. On drawing sheets, sections allow up to 20 ordered offset steps (steps) and explicit removed-section scale up to 1000:1.
Half and offset sections
Each principal section's Kind includes Full, Half and Offset (stepped). Half and offset sections are put together from exact plain sections, so each part is what a plain section or the uncut view shows there.
- Half. The section on one side of a centreline and the uncut view on the other. Set the centreline's direction, where it lies and which side is cut; by default it runs up the middle of the view, cut to the right. The cutting line stays whole, and a centreline is drawn through the view, 3 mm past it.
- Offset (stepped). The cut steps to other depths along the way, to pass through features that don't lie on one plane. Each step has where it starts and its depth; Add step adds one, and the steps run across or up the view. Each band is the plain section at its depth, and nothing is drawn where two bands meet. The cutting line steps with it, square across at each step, thick at its ends and bends.
- The agent. It gives a section
halforsteps(withalong) inset_drawing'ssections. Not both on one section, not on an aligned section, and steps must increase; otherwise the change is refused. - Turning the drawing. Choosing another front view is refused with
SECTION_KINDwhile a half or offset section is on it. - Not yet: a half section's cutting line drawn over the cut half only, steps not square to the view's axis, and turning such sections with the drawing.
Removed and revolved sections
Choose Removed or Revolved in the section's Kind control to show only the cut face, with its outline and hatch. Geometry behind the cutting plane is left out.
- Removed. The cut face is placed apart from the views, in free room on the sheet. Its cutting line stays on the view that shows the plane edge-on. The section's scale control uses The sheet’s scale by default, or a scale you choose. Its name includes the scale when it differs from the sheet's.
- Moving a removed section. With Select (V), drag inside its box, away from a dimension. Its centre is saved at the new sheet position. Moving or rescaling it keeps the same cut, and its dimensions read model sizes.
- Revolved. The cut face is turned a quarter turn about the cutting plane's trace and drawn on the view, centred on that trace. A front section is drawn on the top view; a top or right section is drawn on the front view. It uses that view's scale and has a centreline, with no separate section name or cutting line.
- Which sections. A removed section can be principal or aligned. A revolved section must be principal. Neither can also be half or offset, and a section cannot be both removed and revolved.
- The agent. In
set_drawing'ssections,removedholds optionalatandscalefields. Itsatis the section centre,[x, y]in sheet mm; without it, placement is automatic. Its scale is absolute: 2 means 2:1, regardless of the sheet's scale. Without it, the sheet's scale is used. A section's outeratstill sets the cutting depth in model mm. For a revolved section, setrevolvedto true instead. Invalid combinations are refused withDRAWING_OPTIONS. - Issues.
SECTION_NO_ROOMmeans a removed section has no free room. Use a larger sheet, a smaller section scale, or place it by hand.SECTION_NO_VIEWmeans a revolved section has no view to receive it, so it is not drawn; use a removed section to show the same cut face. These issues have no automatic fix. - Turning the drawing. Choosing another front view is refused with
SECTION_KINDwhile a removed or revolved section is present. Change it to Full first.
Detail views
A detail view enlarges a small region of a view or a section: the parent's exact projection, clipped to a circle or rectangle and drawn at its own scale. Nothing is approximated except a section's hatch boundary.

- Adding one. Choose Circle or Rect crop shape, then use Detail view (E): click the centre of what to enlarge on a front, top, right, or section view, then click to set its circle radius or rectangle corner. It takes the next free letter from B; A stays reserved for the front section.
- What is drawn. On the parent, a thin boundary circle or rectangle and the detail's letter. The detail itself shows the parent's hidden lines and a section's hatch inside its boundary, named as
DETAIL B (5:1). - Its scale. Auto is the smallest standard scale at least twice the sheet's. Past 10:1 it is twice the sheet's. The DETAILS card lists each detail with its scale (which you can set up to
1000:1), a button to open the numerical Edit crop editor in model mm (disabled while annotations or another sheet reference the detail), and a button to remove it. - Its place. It's laid out in the first free room from the frame's top right. Drag it anywhere in its square or use Auto-place to return to automatic placement.
- Dimensions and frames. They work in a detail as in a view. Their values come from the model, so a detail's dimension reads the true size, not the enlarged one.
- Issues.
DETAIL_PARENT_MISSING, when its view or section isn't on the sheet, andDETAIL_EMPTY, when its crop holds nothing. Both are fixed by removing the detail with its annotations (or moving an annotated empty detail boundary).DETAIL_NO_ROOMhas no automatic fix. - The agent. It sets them with
set_drawing'sdetails, each{ id, view, center, radius, shape?, width?, height?, scale?, at? }. A list replaces the details, and[]clears them. A detail's parent, crop geometry (center,radius,shape,width,height) can't change while it has dimensions or frames. - On another sheet. A detail can be drawn on a different sheet than its parent (see Drawing sets below).
- Not yet: jagged or freehand detail boundaries, centre and thread marks inside a detail, and a detail of a pictorial view (
iso,dimetric,trimetric).
Broken views
A long part, such as a shaft or a bar, can be drawn with a band of its length left out, so the views fit the sheet at a larger scale.

- The BREAKS card. Add break leaves out the middle third of the part's longest axis, in whole millimetres. Each break then has its axis and its two ends, in model mm, which you can change, and a button to remove it. A change that would reverse a break or make two meet on one axis is refused.
- A break is along a model axis, not a view. It applies to every orthographic view whose horizontal or vertical axis it is, and to their principal sections, so the views stay in projection. A view looking along that axis, the isometric view and aligned sections aren't broken.
- What is drawn. The band is left out and closed to a 6 mm gap. A thin break line, with a small zig-zag, crosses the view at each side of the gap.
- Dimensions across a break. They read the true length, though drawn shorter. So does everything placed on the view: centre marks, datums, leaders and balloons.
- The layout. Each scale is worked out with the breaks, so Auto takes the larger scale a broken part allows.
- Issues.
BREAK_NO_VIEWwhen a break shortens no view on the sheet; its fix removes the break. - The agent. It sets them with
set_drawing'sbreaks, each{ axis, from, to }. A list replaces the breaks, and[]clears them. - Not yet: breaks in the isometric view, the curved break symbol for round bars, and a break inside a detail.
Dimensions and notes

| Key | Tool | How |
|---|---|---|
| V | Select | Click a dimension to select it, drag to move it; Delete removes it |
| D | Linear dimension | Click two points or one straight edge, then where the dimension goes |
| O | Diameter (Ø) | Click a circle, then where its diameter goes |
| R | Radius | Click a circle or an arc, then where its radius goes |
| A | Angle | Click two straight edges, then the side of their corner |
| N | Note | Click the paper for a note, or a view for a leader |
| T | Datum target | Point: click a straight edge endpoint. Line: click its two ends. Area: click its centre. Then place the target symbol |
Auto under Dimensions (Auto-dimension) lays out the views with room, picks a scale and sheet that read cleanly, then adds the overall sizes, steps, hole positions and callouts. It replaces its own earlier dimensions and keeps yours. A dimension goes where both its ends are visible: in a section when the section shows more than the view.
For authored drawing data, a dimension's place uses the view's model coordinates in mm. A note's at instead uses sheet mm, while its optional leader.at uses the view's model coordinates. Do not scale model coordinates to match the sheet: the drawing applies the view scale. A leader follows its view; a note's text position stays on the sheet.
Hole callouts from parameter values
For code that prepares drawing annotations, holeCallout from @barocss/cad-model/drawing/callout takes the document's model nodes, a current edge name, and an optional numeric parameter map. Pass doc.parameters when a hole radius or depth refers to a parameter. The same map resolves the radius and depth of a following counterbore. Omitting the map uses an empty map; it does not read parameters from the document automatically.
The result is annotation text or null, not a measured dimension or a drawing update. Lengths are in model mm, independent of sheet scale. The text uses diameter, THRU or depth, and available pattern, thread, counterbore, and countersink information. Resolved hole and counterbore radii and depths are rounded to three decimal places before formatting; the diameter is twice the rounded radius. A non-hole edge, an unresolved required parameter, or a required hole or counterbore length that is non-finite or non-positive before rounding gives null. Very small positive lengths can round to zero; the text is not a geometry-validity check.
import type { ModelNode } from '@barocss/cad-model/engine/doc';
import { holeCallout } from '@barocss/cad-model/drawing/callout';
// Supply the current document's nodes and doc.parameters, plus an edge name
// selected from that same model. No feature or geometry is created here.
export function currentHoleAnnotation(
nodes: readonly ModelNode[],
parameters: Readonly<Record<string, number>>,
edgeName: string,
): string | null {
const text = holeCallout(nodes, edgeName, parameters);
if (text === null) return null; // Leave this edge without a hole callout.
return text;
}Tolerances
Tolerancing is ± dimensions or Geometric (datums, position). Tolerance suggestions proposes the tolerances the part needs, such as hole positions and fits; Accept takes one and Accept all suggestions takes them all.
- A tolerance from your fit or fastener rows cites the row.
- One without a row is an estimate and says so.
Datum references and control frames
A datum stores one edge reference or one face reference. A face reference keeps the exact face name, including its assembly occurrence prefix. Its near point selects the nearest current boundary vertex of that face. A missing or ambiguous face stays unresolved; the drawing does not substitute another face or reuse the old point.
A datum target (ASME Y14.5 section 7.24) marks where a part touches its datum. Open Datum targets, choose a Kind, choose Add point target, Add line target or Add area target (or press T), pick in a base view, then click where the symbol goes. Each target has a datum letter (A to Z without I, O and Q) and a number from 1 to 99, unique per letter, such as A1. The symbol is a circle split by a horizontal line: the letter and number below, an area's size above.
- Point marks one endpoint of a straight B-rep edge with an X (supporting up to
200datum targets across the whole drawing, lettersA–ZexcludingI,O,Q, and numbers1–99). Click the endpoint; if endpoints overlap, choose the exact edge and endpoint in the list. Circle centres and curved edges are not supported. Use Apply target label to edit the letter or number (unique across all sheets), Move symbol to relocate the symbol, Moveable symbol under Details (point targets only; draws tangent lines facing away from the leader), or Reselect endpoint to confirm a new endpoint. A saved point target with no recorded endpoint, or a number above 99, says what to repair before other point fields can change. - Line is two distinct points clicked in a view (
front,top,right, oriso), drawn as a phantom (two-dot chain) line in that view with no X marks (following ASME; the X belongs to a point target); the leader ends on the line. With the ISO drawing standard set it is drawn as ISO 5459 does: two X marks joined by a thin continuous line. Edit a line target's letter/number with Apply target label or its symbol placement with Move symbol (its fixedfrom/toendpoints stay intact; remove and re-add to place new view coordinates). - Area is a circle (Ø) or a rectangle (Width, Height), in model mm, centred on a clicked point. It is drawn with a phantom outline and 45° hatching at the view's scale; the leader ends at a dot inside it. Its size is the upper half of the symbol (
Ø6or6×4). Edit the letter, number, and size (dorw/h) on the target's row and apply with Apply target label, or move the symbol with Move symbol.
A point target records the endpoint and the current edge signature. If the edge changes, is missing, or cannot be identified, the saved target stays unresolved; it does not move to another edge or use the old hint as its point. Show its view and choose Reselect endpoint to confirm a current endpoint. Move symbol changes only the symbol's position. A line or area target is placed by view points, so it does not follow the geometry; the issue list warns (DATUM_TARGET_OUTSIDE) when one lies partly outside the part as its view shows it. The drawing does not count targets per datum; whether a datum has enough targets is yours to judge. A frame that names a datum letter held only by targets is not reported as DATUM_UNDEFINED.
Each datum has an id and a letter. A geometric control frame has its own id and names its datums by letter. An attached frame refers to a dimension by dim; there can be at most one frame per dimension. A standalone frame instead has a view and a position in that view's model mm. In Standalone geometric controls, choose a visible view, select Add standalone frame, then click where the frame goes. Frame details edits its characteristic, tolerance and datums; the controls also let you move or remove it. If its view is hidden, the frame is kept at its saved position, is not drawn and cannot be moved, and VIEW_NEEDED says which view to show. Saved files and the SVG export keep the frame at its position in the view. Authored inputs require unique datum ids, datum letters and frame ids. These symbols and modifiers are annotations; they do not solve or verify the part's geometric tolerances.
A frame can also carry a spherical zone (sphere, drawn SØ, position only), a statistical tolerance (statistical, ST in a hexagon), an unequally disposed profile (unequal, the outward amount from 0 up to the value, drawn as a circled U and the amount) and around (all-around or all-over, a circle or double circle beside the frame; profile only). A profile frame can have a composite second segment like position, or a stacked frame: a second, independent frame of the same position or profile characteristic, drawn as a full frame with its own symbol directly below the first. A frame is composite or stacked, not both. In the frame editor the options that fit the chosen characteristic are shown; the rarer ones (statistical tolerance, the unequal amount) are under Details, and the problem with the frame is written under the controls.
New and edited frames must follow the rules that ASME Y14.5 and ISO 1101 share, and are refused in plain words when they do not:
- Form tolerances (straightness, flatness, circularity, cylindricity) take no datums. Maximum or least material is allowed on straightness and flatness only.
- Orientation (parallelism, perpendicularity, angularity), concentricity, symmetry and runout need at least one datum.
- Runout takes no material modifier on the tolerance or the datums; profile takes none on the tolerance; circularity and cylindricity take none.
- A diameter zone is for position, straightness, orientation and concentricity. Runout takes none.
- A projected zone is for position and orientation. A tangent plane is for orientation and profile, and is not combined with a diameter zone or a projected zone.
- A composite second segment names some of the first segment's datums in the same order and has a smaller tolerance.
Only rules that ASME Y14.5 and ISO 1101 share are enforced. What one standard drops, such as concentricity and symmetry in ASME Y14.5-2018, is advice under the drawing standard setting (see Drawing standard). A frame is refused only for a rule break it did not already have, so an old frame can be repaired one field at a time. Frame numbers show as authored, up to 4 decimals.
A saved drawing that breaks one of these still opens unchanged: FRAME_RULE lists each broken rule, with no automatic fix. DATUM_UNDEFINED also counts a point datum target set as defining its letter.
Drawing sets (several sheets)
A drawing is one sheet until you add more. Add sheet (the + after the sheet tabs along the bottom of the drawing) makes an empty Sheet 2, and a tab for each sheet switches the paper shown. Everything you do — dimensions, notes, Auto layout, issues — applies to the sheet shown, and each edit is one undo step.
- Which view is on which sheet. Under Sheets (a closed toggle in the panel) each view, removed section and detail has a Move … to sheet list. The first sheet holds every view that no other sheet lists. A section that is not removed is drawn in projection with its view, so it always stays on its view's sheet. A section or detail you move nowhere is on its parent's sheet. A view lives on exactly one sheet. Ticking Right view, Isometric view, Dimetric view, or Trimetric view while on a sheet moves that view to the sheet shown. Up to
12sheets are supported per drawing. - Annotations follow their view. A dimension, datum feature, datum target, frame or note with a leader is on the sheet of the view it belongs to. A note without a leader stays on the sheet it was made on (a deleted sheet's notes go back to sheet 1). In v1, tables (the revision table, BOM and other source tables) and the title block's fields are on sheet 1. Balloons and weld symbols are drawing-level settings, ticked from any sheet: balloons are drawn on the sheet of the first of the isometric, front, top or right view that is shown, each weld symbol on the sheet of the view a single sheet would show it in (the first of the front, top or right view that is shown and sees the joint; an isometric view carries none). A joint seen in no shown view is warned once, on sheet 1.
- Each sheet has its own title block, with SHEET reading
n OF Nand its size. Sheets after the first use the basic block (a continuation block): the title block's fields and the revision table are on sheet 1 only. Sheet 1 also carries a sheet index table (sheet, name, size) while there are two or more sheets. A sheet with no standard view readsAS NOTEDfor its scale. - Each sheet is laid out on its own: its own size, its own scale and its own room for dimensions. Auto lays out each sheet in turn. A sheet's scale and size are its own (the first sheet's are the drawing's
scaleandsheet). - A detail or removed section on another sheet than its view. Its circle (or cutting line) stays on the parent's sheet with the letter and
SEE SHEET 2; the detail or section is drawn on the other sheet withFROM SHEET 1under its name. Zone references are not used. - Export. Export PDF writes one file with a page for each sheet, each at its own size. Export SVG and Export DXF write the sheet shown (the file name ends
-sheet-2when the drawing has several sheets). - Issues. The issue list names the sheet it is for. What is missing — a hole's size or position, a step, an overall size, a view a hole shows round in — is judged on the whole drawing, so a dimension on one sheet counts for a view on another. So are datums and given-twice dimensions: a frame on one sheet may name a datum defined on another, and a repeated datum letter or dimension is reported once. Only placement checks (off the sheet, overlap) run sheet by sheet.
SHEET_SET(a warning) reports a sheet with no view on it, and what a file lists that the drawing does not have. - Delete sheet removes the sheet shown (not the first): its views go back to sheet 1, a detail or section to its parent's sheet, its notes to sheet 1. A sheet id that a note still names is not given to a new sheet.
- Open. A file that lists a section or detail the drawing no longer has, or a section that is not removed, keeps the entry and the first sheet's issue list says so; the entry has no effect.
- The agent.
drawing.set(set_drawing) takessheets, the sheets after the first:{ id, name?, size?: A4|A3, scale?, views: [...] }with view idsfront,top,right,iso,dimetric,trimetric,section:B(removed sections only) anddetail:C. The list replaces the sheets;[]returns to one sheet. A view listed twice, an id that is not a view, a section or detail the drawing does not have, and a section that is not removed are refused withDRAWING_OPTIONS, in words that name the sheet and the view. The tool's own description is only a short hint, so usedescribeon the tool for the shape above. - Not yet: tables and balloons on a later sheet, a sheet-1 entry in the list, reordering sheets, an all-sheets DXF, and a different title block on later sheets. Also
pdfTextMode(textdefault vsoutlines) selects between selectable Type 1 Helvetica PDF text (which prints unsupported glyphs as?) and outline strokes.
Issues
Drawing issues lists what the sheet is missing or gets wrong: a feature with no dimension, a dimension that was lost after a model change, a feature a section would show better. Each issue can carry a Fix. Fix all issues applies them all, and Issue count shows how many are left.
DATUM_LOST reports a datum with no current anchor in a visible view. DATUM_TWICE reports a repeated datum letter. FRAME_LOST reports a frame whose dimension is lost or missing, and DATUM_UNDEFINED reports a frame that names a datum with no datum feature or point target set. FRAME_RULE reports a frame that breaks a rule above, or (a warning) one the drawing standard no longer has. FRAME_VIEW_MISSING reports a standalone frame whose view is missing; its saved position is kept. TEXT_OVER_LINES reports annotation text, such as a dimension's, a table's or a standalone frame's, that lies over drawing lines. DATUM_TARGET_UNVERIFIED reports a point target that needs its endpoint selected again. UNIT_PRECISION (a warning, no fix) reports a tolerance or frame value too fine to print in the drawing's unit even at the most decimals. DATUM_UNDEFINED has no automatic fix: define the datum or edit the frame.
Tables and balloons
The sheet can carry the tables that the part's features need:
- BOM table, with Balloons linking each line to its parts;
- Weld list table and Weld symbols for weldments;
- Cut list table for frames;
- Bend table for sheet metal;
- Gland table, Spring data table and Element list table for those features.
A table column's unit is a header label, not a conversion: supply numbers in the unit you name. Numeric cells use up to two decimal places by default, dropping trailing zeros. digits accepts an integer from 0 to 6 and requests that many decimal places; very large numbers can still use exponent notation. A null cell shows an em dash. Table positions use sheet mm with Y increasing downward; corner selects which table corner sits on at. These positions do not use model coordinates or the model's scale.
Export
- Export SVG and Export PDF write the sheet as shown. With several sheets (Drawing sets above) the PDF has every sheet; the SVG and the DXF are of the sheet shown.
- Export DXF writes it as AutoCAD 2000 or R12, chosen in DXF version.
R12 converts unsupported curve forms to polylines with a chord tolerance of 0.001 mm on the sheet. This is a drawing-export setting, not a model or manufacturing tolerance.
If PDF export warns that some characters became ?, review the notes and title block before sending the file. The warning appears after the PDF download; it does not cancel it. Use Export SVG to keep those characters.
Check Drawing issues as well as the exported sheet. The issue list reports unresolved references separately from the marks drawn on the sheet; an exported file alone does not establish that every annotation is resolved.
Drawing files from code
Use the StudioPart facade to set up a drawing and get its files. This example makes a pin with an 8 mm diameter and a 30 mm length:
import { part } from '@barocss/cad-model/api';
const pin = part('pin')
.cylinder({ r: 4, h: 30 })
.material('steel')
.process('cnc-turning')
.drawingSettings({ title: 'pin', sheet: 'A4' })
.autoDimension();
const drawing = pin.drawing();
console.log(drawing.issues, drawing.pdfMissing);
// drawing.svg and drawing.dxf are text; drawing.pdf is a Uint8Array.drawingSettings and autoDimension return a new part. The default autoDimension() can choose the front view and change the sheet, scale and view layout to fit the dimensions. To keep the current sheet, scale and views, call autoDimension({ layout: false }). It adds dimensions to the current layout. Both options keep manually placed dimensions. Automatic component dimensioning is refused for assembly drawing scope with DRAWING_SCOPE_AUTO.
pin.drawing() is synchronous and returns the same fields as drawingOf(doc) from @barocss/cad-model/api/outputs:
| Field | Result |
|---|---|
sheet | The drawing report's sheet data |
issues | Issue records with code, severity, message and an optional fix |
svg | SVG file text |
dxf | AutoCAD 2000 (AC1015) DXF file text |
pdf | PDF file bytes as Uint8Array |
pdfMissing | Characters the PDF font cannot show; these print as ? |
The function does not download files or change the document. Check issues and pdfMissing before writing these files. It has no DXF-version argument; the Studio's R12 choice is separate. Drawing-input refusals throw BarocssError, preserving a reported bracketed code or using DRAWING when none is present. An issue in a returned report does not by itself mean the export was refused.