knotflow Handbook Deutsch Lessons Modeller ↗ Source

Chapter 14

Messages and remedies

When knotflow cannot build something, it says why, and mostly also what helps. This appendix collects the messages at the limits of the language and those of the tools for shapes, walls, Boolean operations, rounded edges, constructions, patterns, organic forms and files, by area and alphabetically by the message's text. … stands for numbers and points the message fills in. How to read a message (its place in the model, the line, the hint) is shown in chapter 1. Messages of Boolean operations also name the point where it sticks and the two solids (chapter 7); warnings of the triangulation stand at the export whose solids they are about.

Computing and limits (chapter 3)

Message what is wrong remedy
a range of more than a million numbers [a .. b] would hold more than a million numbers. a coarser step; go through the numbers with a recursion instead of a list
… called itself more than 5000000 times in a row (endless loop?) A tail recursion does not stop: the case that ends is missing or never reached. check the ending case, e.g. fn count_up(0, acc) = acc before the general one
… must be at most …, got … A number saying how much to make is above its limit: 1 million things at once (points, sides, list elements), 200 000 for scatter, 10 million for other whole numbers. a smaller number
… must be ≥ 0, got … – a rounding error of a − b with a ≈ b? max(0, …) keeps it at 0 A number that must not be negative (sqrt, spacing of scatter, r of blur, tol of simplify) is negative by a hair, e.g. sqrt(a * a - b * b) or (rim - wall) / 2 with a and b equal but for the last digit. Numbers have about 16 digits, and a - b may leave −2e-16 where 0 was meant. Without the hint the number is clearly negative. max(0, …) round the difference; with the hint missing, check the formula. (fillet takes a radius as small as that as 0 by itself: the corner stays sharp.)
… × … pairs are too many (at most 10000000) product: the list of all pairs would be longer than lists may be. filter the lists first
the expression is nested too deeply (more than 1000 levels; a long chain like a + b + c + … is one level per operator – for many terms use sum([…]) or fold) One expression in the text is more than 1000 levels deep, usually a very long chain of operators. sum([…]) or fold; parts in a let
the expression is nested too deeply (more than 500 levels) More than 500 brackets inside each other. parts in a let
the list would have more than 10000000 elements A comprehension or ++ would give a list of more than ten million elements. count fewer or coarser; keep only what is needed
the model makes more than 10000000 function calls (an endless loop?) The whole run makes more than ten million function calls, e.g. a recursion that calls itself twice at every step. compute an intermediate result once in a let instead of several times; fewer parts
the model nests too deeply here (calls and expressions inside each other, more than 50000 levels; …) Calls and expressions are nested too deeply (in the browser from 1000 levels on), mostly a recursion that goes on computing with its result. put the call in tail position (chapter 3, recursion and limits) or use fold, iterate
the text would be longer than 10000000 characters ++ would give a text of more than ten million characters. shorter texts
the value is nested too deeply (lists, tuples or records inside each other, more than 500 levels) A value holds lists, tuples or records more than 500 levels inside each other, usually from a recursion that wraps its result at every step. build a flat list (++) instead of wrapping
too many nested calls (more than 1000 here; …) More than 1000 calls inside each other (in the browser 250) still waiting for their result, e.g. 1 + f(n - 1). pass the intermediate result as a parameter (acc) or use fold, iterate, history

Shapes and curves (chapter 5)

Message what is going on remedy
a curve has no area yet A curve was exported; it has no area. make a surface of it: extrude, revolve or tube
at most 100 000 curves chain: more than 100 000 pieces. fewer pieces, or interpolate through their points
curve 1 starts 1 mm away from where curve 0 ends chain: A piece does not start where the previous one ends. align end points, turn a piece running the wrong way round with reverse
blend: more than 10000000 parts (a group inside a group counts each time) The group given to blend holds a group several times, nested so often that its parts would be more than ten million ([g, g] twice in itself doubles each time). blend the group once and copy the result with instance
degree … is too high (at most 15) A curve of degree above 15, e.g. in nurbs. a lower degree
section 1 has degree 1, the first one 2 loft: sections of different degrees, e.g. a circle and a rectangle. build all sections the same way, e.g. with interpolate(…, closed: true)
the copies reach … mm from the origin – at most 1e9 mm (1000 km); look at the frames' origins and the lengths of their axes instance: a copy lies farther than 1000 km from the origin, usually through a wrong factor. check the frames: their origins and the lengths of their axes
the curve crosses itself near …: the extrusion would run through itself extrude: seen along the direction of the extrusion, the curve crosses itself (a figure eight, an outline from interpolate that swings over itself at a tight waist, a curve off the plane that crosses itself only seen from above); its walls would run through each other. move the points apart where it crosses, or more points at the waist; with interpolate, fewer points close together; → explanation
the export holds more than 10000000 shapes, volume/area: the copies hold more than 10000000 shapes A group holds itself several times, nested so often that the export (or the copies measured) would be more than ten million shapes; copies (instance) count as many times as they are placed, copies of copies as their product. fewer copies; copy a whole group with one instance instead of copying copies
the profile crosses itself near … The profile for revolve or sweep crosses itself, often because a wall is too thick at a tight bend; for sweep also a figure eight or an outline from interpolate that swings over itself. thinner wall, gentler bend, points apart where it crosses; → explanation
the profile reaches across the axis to …: the solid would run through itself revolve: the profile has points on both sides of the axis (x < 0 and x > 0); turned round, the part across the axis sweeps through the rest, and the volume would come out as the difference of the two sides. Touching the axis is fine. keep the profile at x ≥ 0, or cut it at x = 0 (for a solid of revolution only the wider side counts); → explanation
the profile encloses nothing: the sweep would have no volume sweep: the closed profile encloses no area, e.g. all its points on one line (a stretch there and back). draw the profile round an area; for a strip with no thickness, sweep an open curve
the profile reaches … mm from the path, further than the radius … mm of its bend near …: the surface folds and runs through itself there (warning) sweep, tube or pipe: on the inside of a bend the profile reaches further from the path than the bend's radius; the wall there runs back and through the rest of the tube. Shown it looks right, but it is no solid. a smaller profile, a wider bend, or turn the profile so that its narrow side lies in the bend; → explanation
the surface through the sections turns back on itself near …: the surface folds and runs through itself there (warning) loft (also sweeps.closed, which is one): a section lies back where the skin came from, or so far aside that the smooth skin through it swings out and back; the skin runs through itself or, past the last section and back, through the flat cap of an end; or the first or last section crosses itself seen along the skin leaving it, and the lid over it folds. Shown it looks right, but it is no solid. sections in the order the skin goes and not far aside, more sections in between; round a bend a smaller profile or a wider bend; an end section that does not cross itself seen from where the loft goes; → explanation
the shape reaches … mm from the origin – at most 1e9 mm (1000 km) A shape reaches farther than 1000 km from the origin, usually through a wrong factor. check the sizes and the unit (millimetres)
the surface comes to a point at …, like the tip of a cone offset_surface or shell at a tip where there is no offset. round the tip; let the profile meet the axis level
this surface is open around (a revolve of less than 360°, an extrusion of an open curve) (warning) The surface does not enclose a solid. turn revolve all the way round (a wedge with intersection); close an open curve, or give it a thickness with thicken before extrude
twist must be a whole number of turns: a half turn (Möbius) cannot close the loft sweeps.closed: a twist such as 0.5 – the profile would end turned against its start, the skin would cut through itself at the seam. a whole number of turns (0: none)

Walls and holes (chapter 6)

Message what is going on remedy
a combined shape: one of its parts is not a revolve, a straight extrusion, a loft through polygons or a smooth closed surface shell on a union with a part whose making shell does not know (a loft through curves with corners, a sweep). build the part from revolves, extrusions or angular lofts
a loft through smooth curves keeps its ends open … open: for a loft through smooth curves: its ends are open anyway. between to cut it off, a floor with union
a revolved ring grown by … mm reaches across its axis In shell after difference, the subtracted part grows by the wall; a ring (torus) that would grow across its axis does not work. thinner wall
hole 0: … must not be zero perforate: The hole has no direction (along is zero). a direction with some length, e.g. (1, 0, 0); radial_hole works it out
hole 0: … must not be parallel to … perforate: up says which way the outline's y points, and by default it is (0, 0, 1) – no use for a hole going straight up or down. give the hole an up across it: up: (1, 0, 0)
hole 0: the outline must be closed perforate: The hole's shape is an open curve. a closed curve: circle, polygon, polyline(…, closed: true)
hole 0: does not go through the surface perforate: From at along along the hole meets no wall. check at and along: from outside the solid, pointing through it
hole 0: hangs over the side of the solid perforate: Some lines of the outline meet the solid, others pass it by: that is a notch in its side, not a hole with a wall all round. move the hole in, or make it smaller; for a notch take the prism away with difference; → explanation
hole 0: crosses the seam of the surface in v perforate: The hole lies on the line where a closed profile starts (on a revolve of a circle: its outer side). start the profile somewhere else, e.g. turn the circle, or move the hole
hole 0: starts inside the material perforate: The hole starts inside the wall. set at outside, e.g. on the axis
holes 0 and 1 overlap perforate: Two holes overlap. further apart or smaller
holes 0 and 1 cross inside the material perforate: On the faces the two holes lie apart, but their walls run through each other inside, two bores across each other for instance. perforate gives each hole a wall of its own; the piece they share would be taken away twice. place the holes so that they do not meet, or use difference, which cuts walls against each other; → explanation
open: … is not the direction of an end of this shape open: names a direction no end faces; the message names the ones there are. take one of the directions named
open: the part at … is bored already, and its hole does not join the inside yet A neck that is already a pipe (a difference) stands on the part open: would open. Its hole ends on the shoulder, and opening the shoulder would leave the neck standing loose. keep the neck solid, it opens into the inside (the opening then has the radius neck − wall thickness); to keep the bore's size, bore through the wall after shell: difference(shell(union(body, neck), 1.5), cylinder((10, 0, 30), (10, 0, 60), 3))
the end at radius …, height … of the profile cannot be closed by a lid to the axis shell of a revolved profile: the flat lid would cross the shape (a brim, a rim turned down). leave the end open with open:, or build the wall with thicken
hole 0: runs over an edge of the solid perforate: The hole's outline lies partly on one face and partly on another (over a rim or a crease). move the hole or make it smaller, so that it goes in through one face and out through one face
hole 0: runs over a line where two of the combined solids meet perforate on a result of union or difference: one of the hole's loops crosses where two of the solids meet (a wall joining the floor). move the hole away from that line or make it smaller; through the joint itself only difference helps
hole 0: reaches the edge of the surface perforate: The hole's outline reaches the edge of the surface, or one of its lines runs exactly through a pole (a corner of the outline on the axis of a ball). Whether the hole goes round the pole cannot be told then. move the hole a little, so that the pole lies clearly inside or outside the outline
hole 0: goes through an end of the solid that is not flat (a loft through sections that do not lie in a plane): … perforate: The hole enters or leaves through the end of a loft whose section there does not lie in a plane and has no lid through its rim (as above: a narrow slit with lips at different heights). widen the slit or bring the lips to one height; make the section at the end flat; or cut the hole with difference
hole 0: does not pass cleanly through the wall perforate: One line of the hole does not pass cleanly through the wall: it grazes a face or hits a pole exactly. move or turn the hole a little
hole 0: goes round another part of the solid perforate: inside the hole's outline, between where it enters and where it leaves, there is more of the solid: a bubble, a hollow, a bore across it, a pin on a plate, a pocket in it, the other wall of a turned body, or, where the hole runs right round the side of a cone cut short, its flat top. The hole's lines run round it, and that part would be left floating in the hole. (Round a pole, say through a ball along its axis, a hole works.) move the hole or make it smaller; if both are to go, use difference, or cut the hole before adding the part
a hole of this solid has to be cut anew here, but the next wall behind it comes closer than the slant of the wall union, difference or intersection with a perforated solid: the other part touches the hole, so it is cut anew as a prism. The wall is slanted and the next wall behind it so near that no flat end of the prism fits between them. combine first, then perforate; or cut the hole with difference and a tool of a fitting shape
the curve needs too many pieces for its offset The offset of a curve would need more than 200 000 pieces: the curve is very long compared with its bends. a simpler curve, or the curve in several parts
the edges of a solid with holes (from perforate) cannot be rounded yet fillet_edges or chamfer_edges on a perforated solid. round first, then perforate: perforate(fillet_edges(…), holes)
the offset 3 mm falls apart near (15, 3) At this place the shape is narrower than two wall thicknesses (a neck, a notch); the offset would fall into two pieces. make it wider there or the wall thinner; → explanation
the offset 6 mm leaves nothing The outline is narrower than two wall thicknesses: nothing is left inside. thinner wall or larger shape; → explanation
the offset of this surface needs too fine a grid (it is very curved or very large) offset_surface or shell: the offset cannot be followed closely enough with the finest grid allowed. a smoother surface, or a smaller one in several parts
the offset still crosses itself near … after 16 tiny loops were cut out of it The offset has more tiny loops (folds smaller than its steps) than are cut out. a slightly different distance, or smooth the curve (fewer sharp bends)
the wall cannot be kept 2 mm thick: the loft's sides twist too much An angular loft twists too much for an even wall. more sections, or smooth ones (interpolate)
the wall leaves nothing inside: it is thicker than the solid shell with a wall thicker than half the shape. thinner wall; → explanation
the walls leave nothing inside: the shape is nowhere thicker than twice the wall A combined shape is at most two walls thick everywhere. thinner wall; → explanation

Combining solids (chapter 7)

Message what is going on remedy
a part … mm across is below the … mm that booleans, roundings and walls work with A solid is smaller than 1e-5 mm (10 nm), far from the origin also more (about 2e-6 of its distance from the origin, so 4 µm at x = 2000): Below that corners fall together and a result would be wrong without a word. build it larger or nearer the origin, and scale or move the finished part afterwards: that is exact; → explanation
a wall … mm thick is below the … mm that booleans, roundings and walls work with A wall is thinner than 1e-6 mm (1 nm): Its two sides would fall together. build it larger and scale the finished part down; → explanation
a rounding of … mm is below the … mm that booleans, roundings and walls work with A rounding or chamfer is smaller than 1e-6 mm (1 nm), at an inner edge smaller than 7e-6 mm (1e-5 mm where the ball rolls along an edge that is no circle), where the sides of its tool are short. build it larger and scale the finished part down; → explanation
a boolean scaled up could not be made anew at its new size: its cuts were scaled with it, off the surfaces: up to … mm off (warning) A finished boolean is scaled up (scale, also along one axis only). Its cuts were found to about 1e-4 mm at the size it was made; scaled, they are off by as many times more. So it is combined anew at its new size – and that failed here, so the old cuts were scaled along. The number says how far they may be off. combine the parts at their final size: scale the parts first, then combine them; a small number is harmless
a cut between two solids needed more points than the triangulation allows … (warning) Where two solids cross, the cut runs very close to an edge or a touch, and its chords would need more than 4096 points. move the parts so the cut keeps away from edges; a coarser tolerance
a cut between two solids is less exact than the tolerance (a finer one makes its triangles finer, not the cut): up to … mm off (warning) --tol is finer than the cuts between solids are computed: they are found to 1e-4 mm (for parts under 10 mm to a share of their size), and their points count as one up to 4e-4 mm apart, whatever the tolerance. A finer tolerance only adds triangles along them. The number says how exact they are. nothing for printing; a tolerance from the number up keeps the warning away; → explanation
a cut was lost from a face's triangles when they were made finer … (warning) When a face was triangulated again with more points, a piece of a cut no longer fitted; the face may be wrong on one side of it. change the tolerance a little; please report the model
a face got no triangles: the solid has a hole there (warning) A face could not be triangulated at all. please report the model
an edge near another one needed more points than the triangulation allows … (warning) Two edges or an edge and a cut run very close together over a long way. move the parts a little apart
lines on a face close to each other needed more points than the triangulation allows … (warning) Cuts and edges on a face come so close that their pieces would have to be shorter than the triangulation allows (4096 points per line, 32 rounds); their triangles may overlap there. move the parts a little apart; a slightly different tolerance
the intersection needs too many pieces intersect or a boolean operation: the intersection curve of two surfaces would need more than 100 000 pieces, e.g. because the surfaces run almost along each other for a long way. move or turn the parts a little so they clearly cut each other
the model exports only empty shapes difference took everything away or intersection found nothing. check sizes and positions
the shape runs through itself: the profile reaches … mm from the path, further than the radius … mm of its bend near … A boolean, shell, fillet_edges or chamfer_edges on a folded sweep/tube/pipe (see the warning in chapter 5); the result would come out open and twisted. a smaller profile or a wider bend, as the warning at the sweep says; → explanation
the shape runs through itself: the surface through the sections turns back on itself near … A boolean, shell, fillet_edges or chamfer_edges on a folded loft (see the warning); the result would come out open and twisted. as the warning at the loft says; → explanation
the surface is open at its sides solid or a boolean operation on an open surface, e.g. revolve(profile, 270). close the surface; build a wedge with intersection
the surfaces lie on each other: there is no curve where they cross intersect: the two surfaces lie on each other (for a stretch). Boolean operations say two of the solids share a face for this. move one surface a little
the surfaces meet in too many separate curves intersect or a boolean operation: more than 10 000 separate intersection curves. cut fewer, coarser parts at a time
the surfaces touch along a line: there is no curve where they cross intersect: the surfaces touch along a line without crossing, e.g. two cylinders of the same size side by side. Boolean operations allow such a touch. push the parts into each other or move them apart (chapter 7, rule 2)
the triangles of a face did not come within the tolerance of its surface: up to … mm off (warning) The triangles of a face that stay in the result are farther from it than the tolerance: the points they need lie too close to others, one round of refinement would need more than 200 000 of them, or the check of the finished mesh found triangles the refinement did not see. The number says how far. close to the tolerance usually harmless; otherwise a slightly different tolerance; → explanation
triangles of the result face opposite ways: a face is turned inside out, the volume is wrong (warning) The result's mesh is twisted: at an edge, two triangles face opposite ways. It looks closed, but its volume is wrong and it will not print properly. please report the model; try a slightly different tolerance; → explanation
the result has edges that belong to one triangle only: the surface has a hole there …, near … (warning) The mesh of a boolean is open: along these edges a triangle has no neighbour, so the result is not a closed solid (volume and printing are wrong). Often a piece thinner than the tolerance is left where several faces almost meet in one point; otherwise a cut that passes an edge or a rim very closely, e.g. a ball just before a cap's rim, or turned parts in many positions. near names the first open edge. compute finer (about a quarter of the tolerance); otherwise move the parts a little and please report the model; → explanation
two of the solids almost share a face (a hair's breadth apart): move one of them … Two faces lie almost on each other, e.g. a very small rounding next to a large earlier one on a solid turned at a slant, or a copy of a solid moved or tilted by a hair. Also comes when the result is turned into triangles, where these would leave a hole. move one a little (more than a thousandth of a millimetre) or exactly onto the other; round first, then turn; → explanation
two of the solids share a face (they lie on each other there): move one of them a little Two faces lie on each other, e.g. a flat ring of a turned part on a plate, or the fillets of two bosses overlap. push one a little way in (chapter 7, rule 2); → explanation
two of the solids touch where they cross (like two cylinders of equal radius at right angles) Cylinders of equal thickness crossing each other touch in two points, where their intersection curves cross. change a radius (chapter 7, rule 3); → explanation
an end of one of the solids is not flat where the other reaches it (a loft through sections that do not lie in a plane): … The end of a loft whose section there does not lie in a plane is closed by a curved lid through its rim. Where the rim comes close to itself and is at different heights on the two sides (a ring cut open by a narrow slit, one lip higher than the other), no lid follows it; if another solid reaches that end, this message comes. widen the slit or bring the lips to one height; make the section at the end flat; or keep the end outside the other solid; → explanation

What gives no message but shows in the summary of kf render (parts: 2, NOT a closed solid ✗) is explained in chapter 7 ("Rules that save trouble") and chapter 13.

Rounded edges (chapter 8)

The messages of chamfer_edges say chamfer instead of rounding; they then mean the chamfer's width d.

Message what is going on remedy
a rounding of … mm is too small for a shape of … mm Roundings below one thousandth of the size of the shape would be below what can be distinguished within it. round more, or leave it out
at: at most 1000 edges at once fillet_edges or chamfer_edges: the list at has more than 1000 points. round in several steps
edges meet at … The point points at a corner where several edges meet. point a little further into the edge meant
edges rounded together meet at an inner corner at … Two edges from the list meet at an inner corner, but cannot be mitred (different sections, a slanted wall). round the upright edge there first, then the rim is a run of edges; or round the edges one by one
no edge near …: the faces meet smoothly there Everything is round there already, e.g. because an earlier rounding continued around the corner as a run of edges. leave the point out
no edge near …: the nearest is … away fillet_edges: The point is too far from any edge. point closer to the edge (at most r, or 1 % of the shape's size, away)
r must be above 0 and below half of each side rounded_box: r is too large for the box. a smaller r
r: 2 radii for 4 corners (corners(c) lists them) fillet: The list does not have as many numbers as the curve has corners. one number per corner, in the order of corners(curve)
the edge at … is not an edge of the shape there There is no edge at the point: The line is inside, the faces pass over it, it is the rim of an earlier rounding, or a wedge is sharper than about 10°. round in a different order; round a sharp wedge in the outline with fillet beforehand; → explanation
the edge at … is only partly an edge of the shape Another part cuts off the edge, or rounded edges would meet in a ball corner (chapter 8, limits). for a box with all its edges rounded, rounded_box; otherwise change the order
the edge at … turns too sharply to follow with a … A curved edge bends so sharply at one point that even 4096 stations of the ball cannot follow it. make the rounding smaller
the edge ends at … against more of the shape, at a face that is not flat A straight edge ends at a curved wall. does not work; build the shape another way
the edge ends at … against more of the shape, not at a wall square to it The shape continues behind the end of the edge, not with a wall square to it; the tool would cut into it there. (At a wall square to it, the rounding simply stops.) build the shape so that the edge ends at a wall square to it or runs all the way around
the edge ends at … against more of the shape: the … would cut into that – a corner with a curved edge is not done yet The edge ends in a corner where a curved edge continues (the foot of a boss that hits a rounded edge). round the edges in a different order, or let the edge run all the way around
the edge ends at … on a face that is not flat An inner curved edge ends at a curved face. does not work; build the shape so that it ends at a flat face
the edge near … bends more tightly than a rounding of … mm A run of edges bends more tightly than the rounding and cannot be mitred: a tight arc at the end of an open run or without straight pieces next to it, or an edge that itself bends more tightly. (Tight arcs between straight pieces are mitred.) make the rounding smaller
the edges from … go on into each other all round to a sharp corner at … The run goes around all corners except for one sharp one and would meet itself there. round the edge at that corner first; then the run is closed
the faces at … meet almost smoothly The kink is so flat that hardly any rounding can be made. leave it out, or build the faces to go on into each other smoothly
the faces at … meet smoothly (or fold back on each other) The faces go on into each other without a kink, or fold back on each other: There is no edge. leave the point out or move it
the faces at the edge at … do not meet there An edge round the axis of a turned part: the profiles of the two faces do not meet near the point in the section through the axis, e.g. because they only touch tangentially there. put the point more exactly on the edge; otherwise please report the model
the faces at the edge at … meet at a sharp angle of about …° A sharp wedge (below about 28°): The ball would touch the faces further from the edge than they are followed (4 r and a thousandth of the size). with but one of up to about … fits: make the rounding at most that size; otherwise (no size of rounding fits, for a part at the origin below about 22.6°) round the corner of the outline with fillet and then extrude, or make the wedge blunter; → explanation
the rounding at … reaches the axis A rounding or chamfer around a thin boss or a hole would reach the axis. make it smaller
the rounding of … mm does not fit at the edge at …: the faces next to it are too short or too curved (also along the edge near …) The faces next to the edge do not reach as far as the radius, or they curve so that no circle touches both. make it smaller; → explanation
the rounding of … mm runs off a face next to the edge The radius is too large for one of the faces next to the edge. make it smaller
the rounding of 2 mm at the corner … does not fit between the corners next to it – at most about … fillet: The arc does not fit between the corners next to it. at most the radius the message names
the roundings at both ends of the side near … overlap: make them smaller fillet: Two arcs on one side together need more space than the side is long. smaller radii
the profile reaches … inside the section (x < 0), which has sharp corners: round them by more than that first around, rounded_extrude: The edge profile reaches inside, but the outline has sharp corners. round the corners by more than the profile reaches inside: fillet(outline, r)
the section has an inward corner near … around: A corner of the outline points inward and is not rounded; the profile would fold there. first fillet(outline, r), by at least as much as the profile reaches inside
the size must be above 0 fillet_edges/chamfer_edges with r or d ≤ 0. a positive number
the straight edge near … is too short to turn the corners at its ends mitred A straight piece between tight arcs is too short to be mitred at both ends. make the rounding smaller
two edges are about as near … Two edges are about equally far from the point. point closer to the edge meant

Constructing (chapter 9)

Message what is going on remedy
equations … say the same thing (… too many: over-determined, but they agree) (warning) One condition follows from others, e.g. the third angle of a triangle. leave out the equations named
start: … unknowns – solve takes at most 300 Too many unknowns. split the construction into parts solved one after another
the construction is not fully determined: … degrees of freedom left – … can still move (warning) A condition is missing; solve takes a solution near the start. add a condition for what can still move
the equations cannot all hold – the construction contradicts itself: equations … stay off by … The conditions contradict each other. Counting starts from 1, as in the list. check the equations named; often the start lies nearer the wrong one of two solutions
the equations give … numbers – solve takes at most 1000; split the construction into parts solved one after another solve: the equations give more than 1000 numbers. several solve one after another
the equations must be as many every time The function of the equations gives a different count of numbers depending on the values. as many equations whatever the values (no if around a condition)
volume: the copies may overlap near …: copies are a group whose parts may overlap – … (also area) volume/area of copies (instance): the boxes around two copies (or two pieces of a copied group) meet, so the copies may share room, and their sum would not be the measure. A ring of turned copies whose boxes meet is refused too, although the copies may not touch. measure the union: fold(realize(c), …, union); or place the copies so the boxes around them do not meet
area: the curve crosses itself near …: what it encloses is not one area area of a closed curve that crosses itself, e.g. a figure eight: its loops run round opposite ways, and it encloses no one area (the same check as for sweep). move the points apart where it crosses, or measure each loop as a curve of its own and add them up

Patterns and organic forms (chapters 10 and 12)

Message what is wrong remedy
… × … cells is too fine (at most 4 000 000) grid, also image: the field would have more than 4 million cells. a larger cell or a smaller rectangle
at most 200 000 instances, got … instance: more than 200 000 places. fewer places
r is too large for this grid – a coarser grid blurs as far, faster blur: every cell would look at too many others. a coarser grid
the voxel is too small for the size of the shape isosurface: the shape would need more than 4 million blocks of voxels. a larger voxel
too many voxels: choose a bigger voxel size isosurface: the parts together touch more than 4 million blocks of voxels. a larger voxel, or fewer parts

Files and output (chapters 11 and 13)

Message what is wrong remedy
"…" is larger than 64 MB read or read_bytes: the file is too large. a smaller file; only the columns needed
… is too large for the numbers svg or lettering: a contour has coordinates beyond 1e150. check the drawing and its unit
….kf is too large, or too many libraries are imported A library has 16 MB of text or more, or the imports together have used up the positions for libraries. split the library; import fewer
nested more than 500 levels deep json: objects and arrays more than 500 levels inside each other. The message says where. flatten the data
not an SVG drawing this reads: elements nested more than 500 deep svg: elements more than 500 levels inside each other. flatten the groups in the drawing program
size must be greater than 0 and at most 1e6 mm lettering: the size is 0, negative or above 1 km. a size in that range; for more, scale afterwards
the 3MF file does not fit into memory here – a coarser tolerance makes it smaller The triangles and the finished file together need more memory than there is; in the browser that is 4 GB at most. The file itself takes about 13 bytes per triangle. a coarser tolerance (--tol, in the modeller the tolerance field), or write the file with kf, which does not have this limit
the 3MF file would be larger than 4 GB A 3MF file is a ZIP archive without extensions and counts in 32 bits: neither the text of the model nor the packed file may pass 4 GB. The text gets that long from about 50 million triangles, in the browser and in kf alike. a coarser tolerance; keep equal parts once with instance
what the model exports is too small for the 32-bit coordinates of a file where it stands STL and 3MF store a coordinate as a 32-bit float: at 5000 mm those are about 0.5 µm apart. An edge shorter than that is one point in the file, and here that holds for all of the model. A part this small beside others is left out of the file without a word. build it larger or nearer the origin
closed in memory, but not in the file (after NOT a closed solid ✗ in kf render and evaluate, in the modeller as open edges in the status line and in its tooltip) Two parts of the surface touch in a point, a ball at the wall of a hole, say. Near the point they lie closer together than the 32-bit coordinates of STL and 3MF can tell apart (about 0.5 µm at 6 mm from the origin): there corners of both parts become one point, and some edges have four triangles. In memory the solid is closed; this cannot be mended without changing the shape (a limit). Most slicers print it all the same. move the parts a tenth of a millimetre apart or into each other (chapter 7, rule 2)
closed in memory, but parts of it lie in one another (after NOT a closed solid ✗, in the same places) Each part is closed in memory, but one lies in another, their surfaces almost in one place: just inside them the surface winds round twice. Where they come closer than the 32-bit coordinates of STL and 3MF, corners of both become one point and edges have more than two triangles. Unlike parts that touch in a point, the solid is wrong in memory already: two parts exported together that overlap, or a union, difference or intersection of two almost identical solids that kept both surfaces (a bug in knotflow). parts exported together: join them with union; if one Boolean made it, report the model – until then, move one of the solids a tenth of a millimetre or leave it out where it adds nothing
closed in memory, but a piece of it is turned inside out (after NOT a closed solid ✗, in the same places) The surface is closed in memory, but folds through itself, so that a piece of it is turned inside out: beside it the surface winds round the point backwards (winding number −1), its triangles face inwards there. Where the fold brings corners closer together than the 32-bit coordinates of STL and 3MF, they become one point and edges have more than two triangles. The volume is wrong (a loft from a circle to the same circle the other way round has almost none). Mostly the loft or sweep that made the surface has warned already (turns back on itself). let the sections run one way (the same sense of turning, leave out reverse) or put sections in between; without a warning, report the model
the model needs more memory than the browser gives it (it stopped at … MB, at most 4 GB are possible here) – a coarser tolerance needs less; kf on the command line has no such limit In the browser: the model's triangles do not fit into the memory WebAssembly gets, 4 GB at most; often it ends near 3 GB, because a block must be free in one piece. The page goes on afterwards. a coarser tolerance; compute the exact model with kf, which has no such limit
recursion too deep for the browser: its stack holds fewer nested calls than the command line's (in Chrome about 290 instead of 1000) – a tail call (the recursive call as the last thing a function does) needs no stack In the browser: the JavaScript engine's stack ends before the limit on nested calls is reached, for instance when a recursion runs through a comprehension. write the recursion as a tail call, or compute the model with kf
the modeller stopped unexpectedly (…) – a bug in knotflow, not in your model; the browser's console may say more In the browser: the modeller crashed. The model is not to blame; the page goes on with a fresh worker. report the model and the text from the browser's console
the PNG is too large image: the picture needs more memory than the reader allows. a smaller picture
the table would have more than 10 000 000 cells table: the product of the lengths of the axes is above the limit for lists. fewer axes or values

What lies behind a message

The tables say in brief what to do. If you do not understand what a message means in the first place, you will find a longer explanation of the geometric messages here: what happens in the model, a small model that raises the message, how to read its numbers, and what helps. The table row points here with “→ explanation”.

The messages of booleans all have the same form:

union: two of the solids share a face (…): move one of them a little – near (0, 0, 5):
the first argument (from (-20, -20, 1) to (20, 20, 5)) and the second argument (from …)

First comes the operation, then what is wrong and what helps. After near follows the point where it gets stuck (a red dot in the picture in the browser), then the two solids with their extent (the smallest box around them, from the corner with the smallest to the corner with the largest coordinates). If an argument is itself combined from several solids, it says solid 2 of 5 in the first argument. The extent helps to find the solid again in the model.

shell, fillet_edges and chamfer_edges make booleans of their own: the wall cuts the inside out of the solid, a rounding puts a tool against the edge. If one of these gets stuck, the same message comes with its point; instead of the arguments it names the two solids the function built for it, with their extents:

fillet_edges: two of the solids almost share a face (…) – near (46.496, -12.783, 4.947):
two solids the rounded or chamfered edge is built from (one from (32.461, -18.221, -32.467)
to (52.023, 7.974, 33.686), the other from …)

With shell it says two solids the wall is built from. These solids are not in the model; the point shows where to change your own model (move a face there a little, make the rounding or the wall a little smaller or larger).

two of the solids share a face

A knob with a shoulder, sunk into a plate: the top of the shoulder (green) lies exactly in the top of the plate.

What is wrong. A boolean looks for the curves in which the surfaces of two solids cross, and puts the result together from the pieces between those curves. Where two faces lie exactly on each other for a stretch, there is no curve there but a whole shared face: which piece is inside and which outside cannot be decided. knotflow recognises many such cases and builds them correctly (a cylinder standing exactly on a plate, a bore flush with the underside). Where it does not, it says so instead of handing over a solid with holes.

Often it is a flat shoulder of a turned part lying exactly on a flat face:

let plate = box(40, 40, 4) |> move(z: 3)
let knob  = revolve(polyline([(0, 0), (10, 0), (10, 5), (4, 5), (4, 14), (0, 14)], closed: true))
    |> rotate(17)
export union(plate, knob)

Reading the message. near (0, 0, 5) lies on the shoulder at height 5, the top of the plate. The first extent (z from 1 to 5) is the plate, the second (z from 0 to 14) the knob.

What helps. Move one of the parts a little, so that the faces cross instead of lying on each other (chapter 7, rule 2). Here it is enough to set the knob 0.5 mm lower: the top of the shoulder then lies inside the plate, and the plate cuts the knob's shaft:

let plate = box(40, 40, 4) |> move(z: 3)
let knob  = revolve(polyline([(0, 0), (10, 0), (10, 5), (4, 5), (4, 14), (0, 14)], closed: true))
    |> rotate(17) |> move(z: -0.5)
export union(plate, knob)

two of the solids almost share a face

A rod with a bore whose wall comes very close to the outside (0.4 mm in the picture, a ten-thousandth of a millimetre in the message).

What is wrong. As with share a face, except that the faces do not lie exactly on each other but a hair's breadth apart, a ten-thousandth of a millimetre or less. Then they do cross, but in a strip thinner than knotflow can still safely tell points apart: a piece that narrow would get triangles that do not fit together. In the printed part the strip could not be seen anyway.

A bore whose wall almost touches the outside of a rod:

let rod  = cylinder((0, 0, 0), (0, 0, 20), 10)
let bore = cylinder((0, 0, -1), (0, 0, 21), 4) |> move(x: 6.0001)
export difference(rod, bore)

Reading the message. near (10, 0, 0) is the place where the bore (radius 4, centre at x = 6.0001) reaches the outside of the rod (radius 10). The extents show it too: the bore reaches to x = 10, just like the rod.

What helps. Decide what is meant and make it clear: if the bore is to open the wall, push it out clearly (move(x: 6.5)); if a wall is to remain, move it in clearly (move(x: 5.5), leaving half a millimetre of wall). Or put it exactly onto the other face; then it is the share a face case, which knotflow often builds correctly. If the message comes with rounded edges (a very small rounding next to a large one), it helps to round first and combine afterwards, or to swap the order of the roundings.

let rod  = cylinder((0, 0, 0), (0, 0, 20), 10)
let bore = cylinder((0, 0, -1), (0, 0, 21), 4) |> move(x: 5.5)
export difference(rod, bore)

Only when it is turned into triangles. Sometimes the solids can be combined, and only the triangles at the chosen tolerance (kf render, the view in the browser, the STL file) show the trouble: where two faces lie closer than about 0.0004 mm and so flat to each other that this strip is wider than the tolerance, the triangles of the two faces do not fit together and leave a hole. Instead of an open mesh, the same message comes then, with the place of the first gap. A box and a copy of it, tilted by a thousandth of a degree, so that their tops and bottoms cross at a very flat angle:

let block = box(20, 20, 10)
let lid   = box(20, 20, 10) |> rotate(0.001, axis: (1, 0, 0)) |> move(x: 10)
export union(block, lid)

The same helps here: tilt it clearly (rotate(0.1, …)) or not at all. Two cylinders whose walls overlap by less than a thousandth of a millimetre, or a copy of a cylinder moved by a hair, are the same case.

two of the solids touch where they cross

Two pipes of equal thickness crossing: at the top and the bottom (ball) the two curves of intersection run through one point.

What is wrong. Two cylinders of the same radius whose axes cross at right angles do not intersect in two separate loops, as a thin pipe does on a thick one, but in two ellipses that cross at the top and the bottom. At these two points the surfaces only touch instead of crossing: four pieces of surface meet in one point there, and the result would not be a clean solid at that place (the edge would have four faces instead of two).

let pipe   = cylinder((-30, 0, 0), (30, 0, 0), 8)
let branch = cylinder((0, -30, 0), (0, 30, 0), 8)
export union(pipe, branch)

Reading the message. near (0, 0, -8) is one of the two points where the curves of intersection cross, at the very bottom of both pipes; the other one lies at (0, 0, 8).

What helps. Change one of the radii (chapter 7, rule 3), so that the thinner pipe joins the thicker one. A little is enough; for printing, a difference of 0.2 mm or more makes sense:

let pipe   = cylinder((-30, 0, 0), (30, 0, 0), 8)
let branch = cylinder((0, -30, 0), (0, 30, 0), 7.8)
export union(pipe, branch)

… is below the … mm that booleans, roundings and walls work with

What is wrong. knotflow computes with distances below which two points count as the same. That bound lies at 1e-5 mm (10 nm) for the size of a part and at 1e-6 mm (1 nm) for a wall or a rounding, more far from the origin (the numbers are relative to the distance, about 2e-6 of it). A part, a wall or a rounding below that would collapse: corners would become one, edges would vanish. So knotflow refuses it instead of building nonsense. Usually there is a units mistake behind it (metres instead of millimetres) or a model built very small and then scaled up.

export union(box(4e-6, 4e-6, 4e-6), box(1e-6, 1e-6, 8e-6)) |> scale(1e6)

Reading the message. The first number is the size of the part that is too small (here 6.9e-6 mm, the diagonal of the cube), the second the bound below which knotflow does not compute any more.

What helps. Build at the size the part is meant to have, and scale only the finished part down or up with scale:

export union(box(4, 4, 4), box(1, 1, 8)) |> scale(1e-3)

an end of one of the solids is not flat where the other reaches it

A loft through a ring cut open by a narrow slit, its lower section rising once round, from the side and a little from below; the thin rods show the height z = 0.5 at which the bottom of the box would cut the end.

What is wrong. A loft closes its ends with lids. If the first or last section lies in a plane, the lid is flat. If it goes up and down, the lid is curved: a surface through the section, as high above its plane at every point as the section is where it passes (a bevel gear's outline drawn on its back cone gets the cone). That needs the section to be at one height where it comes close to itself. Here the section is a ring cut open by a slit 0.3° wide, rising once round: one lip of the slit is a millimetre higher than the other, a few hundredths of a millimetre away. No lid follows that, and where another solid reaches the end, this message comes.

let gap = 0.3
fn ring(r, z) = [(r * cos(gap + (360 - 2 * gap) * k / 40), r * sin(gap + (360 - 2 * gap) * k / 40), z(k))
                 | k <- [0 .. 40]]
let bottom = polyline(ring(10, k => k / 40) ++ reverse(ring(5, k => k / 40)), closed: true)
let top    = polyline(ring(10, k => 10) ++ reverse(ring(5, k => 10)), closed: true)
export intersection(loft([bottom, top], degree: 1), box(40, 40, 10) |> move(z: 5.5))

Reading the message. near (5, 0.026, 0) is the lower lip of the slit on the inner ring, where the lid would miss the section most. The second extent (z from 0.5 to 10.5) is the box: its bottom at z = 0.5 cuts through the end.

What helps. Widen the slit so that the lid can rise from one lip to the other, here 20° instead of 0.3°:

let gap = 20
fn ring(r, z) = [(r * cos(gap + (360 - 2 * gap) * k / 40), r * sin(gap + (360 - 2 * gap) * k / 40), z(k))
                 | k <- [0 .. 40]]
let bottom = polyline(ring(10, k => k / 40) ++ reverse(ring(5, k => k / 40)), closed: true)
let top    = polyline(ring(10, k => 10) ++ reverse(ring(5, k => 10)), closed: true)
export intersection(loft([bottom, top], degree: 1), box(40, 40, 10) |> move(z: 5.5))

Or bring the lips to one height (the section going up and back down), make the section at the end flat, or leave the end outside the other solid: if the box begins only at z = 2 (move(z: 7)), it does not reach the end.

the triangles of a face did not come within the tolerance of its surface

What is wrong. For the file, curved faces are split into flat triangles. The tolerance (--tol, 0.01 mm on the command line, chapter 13) says how far a triangle may at most stray from the curved face; knotflow refines until that holds. Sometimes it cannot quite: the points needed would lie too close to others (say where a cut runs just past a rim), or a refinement would need more than 200 000 points. Then knotflow keeps the triangles it has and says how far off they are. The solid is closed and usable, only a little less exact at this place than asked for.

A ball with a cylinder taken away; the rim of its lid runs just past the ball:

let ball = sphere(3) |> rotate(40, axis: (0, 1, 0)) |> move(x: 2, y: 1.99, z: 2)
let pipe = cylinder((0, 2, 0), (0, 12, 0), 4) |> move(x: 2, z: 3)
export difference(ball, pipe)

With kf render model.kf --tol 0.02 it says up to 0.03206 mm off.

Reading the message. The number is the largest distance of a triangle from its face. Compare it with the tolerance: here it is a good twice the 0.02 mm asked for, but smaller than anything a printer resolves (a layer is usually 0.1 to 0.3 mm thick). The warning stands at the export whose solid it concerns.

What helps. If the number is close to the tolerance, nothing. Otherwise a slightly different tolerance: here the warning stays away with 0.015 mm or 0.01 mm. If it stays with several tolerances and the distance is large (a millimetre or more), move the parts a little so that nothing runs just past a rim, and please report the model.

a cut between two solids is less exact than the tolerance

What is wrong. Where two solids meet, knotflow computes their cut once, when the boolean is built: to 1e-4 mm (for parts under 10 mm to 1e-5 of their size), and points on it up to four times that apart count as the same point. That does not depend on the tolerance of the triangles (--tol), which comes only when saving. With a tolerance below that, the triangles along a cut get finer, but the cut itself does not get more exact; a vertex there may lie up to the number in the message away from where the exact cut is. Until this warning, that happened without a word.

A box with a hole, saved with 0.0002 mm:

export difference(box(12, 12, 6), cylinder((1, 1, -5), (1, 1, 10), 3))

With kf render model.kf --tol 0.0002 it says up to 0.0004 mm off (2×): two cuts (the hole's top and bottom rim), each exact to 0.0004 mm.

Reading the message. The number is how far points on the cuts may be from the exact ones; the count says how many cuts it concerns. The rest of the faces keeps to the tolerance.

What helps. For printing nothing: 0.0004 mm is far below what a printer resolves. Whoever wants the tolerance to hold everywhere takes one from the number up (here --tol 0.0004).

Open or twisted mesh: the result has edges that belong to one triangle only, triangles of the result face opposite ways

What is wrong. A solid is stored as a mesh of triangles. It is closed when every edge belongs to exactly two triangles and both triangles are turned the same way, with the outside facing out. Only then does the solid have an inside, a volume, and a slicer knows what to fill.

A boolean is meant either to deliver a closed solid or to say with a message why it cannot. Because in rare positions it still fails, knotflow checks the finished mesh and warns.

One cause lies in the tolerance: where several faces meet in one point to within a fraction of the tolerance (say a cone, its moved copy, a cylinder and a spherical shell), a piece of the result thinner than the tolerance is left there. The boolean itself works without a tolerance; only when the result is cut into triangles can it no longer be decided which side the few triangles of that piece belong to. With a finer tolerance it gets enough triangles, and the mesh is closed.

Everything else is a bug in knotflow, not in the model. That is why no model raising the warning stands here: every known one gets fixed. Usually it is a cut that grazes an edge or a rim very closely, or two faces that almost lie on each other without knotflow noticing.

Reading the message. The warning stands at the export whose solid it concerns; the number in brackets ((16×)) says at how many edges, near (0.343, 6.043, 3.204) the middle of the first open edge (in the browser a red dot in the view). The summary of kf render shows the same: edges: 284 – open 16, … flipped 0 → NOT a closed solid ✗ (open for missing neighbours, flipped for turned ones), in the browser the status line.

What helps. First compute finer, at about a quarter of the tolerance (kf render … --tol 0.005, in the modeller the tolerance field). If the mesh is closed then, it was a piece thinner than the tolerance; at the place named several faces almost meet in one point, and moving one part a little removes it. If it stays open, please report the model, with the tolerance it was made with (in the repository https://codefloe.com/Fliegendreck/knotflow). Until it is fixed, changing the position a little usually helps: move the parts a bit or push them into each other so that they cross clearly (chapter 7, rule 2), make nothing exactly the same size (rule 3), a slightly different tolerance or another order of the operations. Afterwards kf render shows closed solid ✓ again.

the offset … mm falls apart near …

An outline with a notch (orange) and its offset by 1.5 mm inwards (green): at the notch only a narrow web is left.

What is wrong. An offset moves every point of a curve inwards by the same distance (chapter 6); that makes the inside of a wall. Where the shape is narrower than two such distances, at a waist or next to a deep notch, the two moved sides meet and pass over each other. The offset would fall into two parts there: a pot would become two chambers. Because that is rarely meant, knotflow says so instead of doing it silently. The same message comes from shell and thicken, which build walls from an offset.

let outline = polyline([(0, 0), (30, 0), (30, 10), (17, 10), (15, 4), (13, 10), (0, 10)], closed: true)
export extrude(offset(outline, 3), 1)

Reading the message. near (12.172, 3) lies in the waist below the notch: between its tip (y = 4) and the bottom edge (y = 0) the shape is 4 mm wide, two offsets of 3 mm need 6 mm.

What helps. Make the wall thinner (here at most just under 2 mm) or the shape wider at that place, here the notch less deep (tip at y = 7 or higher):

let outline = polyline([(0, 0), (30, 0), (30, 10), (17, 10), (15, 4), (13, 10), (0, 10)], closed: true)
export extrude(offset(outline, 1.5), 1)

the offset … mm leaves nothing, the wall(s) leave(s) nothing inside

What is wrong. The limiting case of the previous one: the shape is everywhere narrower than two wall thicknesses, the offset inwards leaves nothing at all. With offset the message says leaves nothing, with shell the wall leaves nothing inside (one solid) or the walls leave nothing inside (a combined shape).

export offset(circle(5), 6) |> extrude(1)
export shell(sphere(5), 6)

Reading the message. The number is the wall thickness. A circle of radius 5 is 10 mm wide; a wall of 6 mm from each side would need 12 mm.

What helps. A thinner wall or a larger shape:

export offset(circle(5), 2) |> extrude(1)

hole …: hangs over the side of the solid

A hole of radius 3 at x = 9 in a block 20 mm wide (its side at x = 10): part of the outline (green) passes the block by.

What is wrong. perforate pushes the outline of a hole through the solid and builds a wall around it: the hole goes in through one face and out through one face, and everywhere in between there is material around it. If the outline sticks out over the side of the solid, that would not be a hole but a notch in the side: part of the outline would meet no material at all.

let block = box(20, 20, 20)
export perforate(block, [{shape: circle(3), at: (9, 0, 30), along: (0, 0, -1), up: (0, 1, 0)}])

Reading the message. hole 0 is the first hole of the list (counted from 0). near (6, 0, 10) is a point where the outline enters the top (z = 10); the circle reaches from x = 6 to x = 12, the side of the block lies at x = 10.

What helps. Move the hole inwards or make it smaller. If a notch is meant, take the prism away with difference:

let block = box(20, 20, 20)
export perforate(block, [{shape: circle(3), at: (6, 0, 30), along: (0, 0, -1), up: (0, 1, 0)}])
let block = box(20, 20, 20)
export difference(block, cylinder((9, 0, -11), (9, 0, 11), 3))

holes … and … cross inside the material

Two bores crossing, both at height z = 0; the block is cut open at that height.

What is wrong. perforate makes a wall of its own for every hole, a tube from where it enters to where it leaves. On the outer faces the two holes lie apart here, but inside their tubes run into each other: the piece where the bores cross would belong to both walls and be taken away twice. perforate is fast because it does not cut the walls of the holes with each other; that is why this case does not work.

export perforate(box(50, 50, 30), [
    {shape: circle(3), at: (0, -40, 0), along: (0, 1, 0)},
    {shape: circle(4), at: (-40, 0, 0), along: (1, 0, 0)}])

Reading the message. The numbers are the places in the list (from 0). near (-3, 4, 0) lies where the bores run into each other.

What helps. Place the holes so that they do not meet, here at different heights:

export perforate(box(50, 50, 30), [
    {shape: circle(3), at: (0, -40, 7), along: (0, 1, 0)},
    {shape: circle(4), at: (-40, 0, -7), along: (1, 0, 0)}])

If they are to cross, take the bores away with difference; that cuts their walls with each other, but is slower:

let block = box(50, 50, 30)
let bores = union(cylinder((0, -30, 0), (0, 30, 0), 3), cylinder((-30, 0, 0), (30, 0, 0), 4))
export difference(block, bores)

the faces at the edge at … meet at a sharp angle of about …°

A wedge of 20° seen from above, and the circle of the rounding (radius 2, green) where it touches both faces: 11.3 mm from the edge at its tip.

What is wrong. fillet_edges rolls a ball with the radius of the rounding along the edge until it touches both faces; the rounding is the piece of the ball between the points of contact (chapter 8). The sharper the wedge, the further the ball slides into it before it touches both sides: the distance of the points of contact from the edge is r / tan(angle / 2). At 20° that is 5.7 times the radius. knotflow follows the faces 4 r away from the edge and a thousandth of the part's size beyond; it does not let the rounding begin further out, else it would cut away too much of the wedge. Below about 28° 4 r alone is no longer enough; then only small roundings fit, for which the thousandth decides.

let h = 60 * tan(20 / 2)
let wedge = extrude(polyline([(0, 0), (60, h), (60, -h)], closed: true), 20)
export fillet_edges(wedge, (0, 0, 10), 2)

Reading the message. The angle is the one between the two faces, the number after it the distance at which the rounding would touch them (11.343 mm). After that it says which roundings still fit at this angle, and what helps:

What helps. If the small rounding is not enough, or none fits, the way is to round the corner in the outline already with fillet and then draw it up (chapter 8); there this bound does not exist:

let h = 60 * tan(20 / 2)
let wedge = extrude(fillet(polyline([(0, 0), (60, h), (60, -h)], closed: true), 2), 20)
export wedge

At an angle just below the bound, a slightly blunter wedge helps too.

the rounding of … mm does not fit at the edge at …

What is wrong. The rounding needs room on both faces next to the edge: it begins where the ball touches the faces, at a right-angled edge r away from the edge. If one of the faces is narrower, or curves so strongly that no circle of this radius touches both, the rounding does not fit. A thin pin of radius 1 has a top that reaches only 1 mm from the rim to the centre; a rounding of 1.5 mm would need more:

export fillet_edges(cylinder((0, 0, 0), (0, 0, 10), 1), (1, 0, 10), 1.5)

Reading the message. The first number is the radius, the point the edge where it does not fit. For a chain of edges it says along the edge near …: somewhere on the chain the room is too short.

What helps. Round smaller. Here anything below 1 mm, the radius of the pin, fits; for a round tip a half ball (sphere) with union is the simpler way:

export fillet_edges(cylinder((0, 0, 0), (0, 0, 10), 1), (1, 0, 10), 0.5)

the edge at … is not an edge of the shape there

A block whose top edge is rounded already; the small ball marks the point (0, 7, 5) where the rounding runs smoothly into the top: there is no edge there any more.

What is wrong. What gets rounded is an edge: a line where two faces meet with a crease. At the point there is none. Usually it is the rim of an earlier rounding: it runs tangentially into the face next to it, without a crease, and so is no edge any more. Other reasons: the line lies inside the solid (after a union), the faces run on across it (two parts whose sides are flush), or a wedge is sharper than about 10°.

The top edge is rounded by 3 mm; now the transition to the top is to become softer still:

let block = box(30, 20, 10)
export block |> fillet_edges(_, (0, 10, 5), 3) |> fillet_edges(_, (0, 7, 5), 1)

Reading the message. The point is the one the model gives (here (0, 7, 5)), that is, where it pointed; not where the nearest edge lies.

What helps. Round in the order in which each edge is still one when its turn comes. There is no rounding of a rounding (chapter 8, limits); for a softer transition round the edge larger right away:

export box(30, 20, 10) |> fillet_edges(_, (0, 10, 5), 4)

The tube folds: the surface folds and runs through itself, the shape runs through itself

The path of tube(arc(10, 0, 180), 12) (green) and the profile, a circle of radius 12, every 30°: on the inside of the bend the circles reach past the bend's centre (small ball) and cross each other.

What is wrong. sweep, tube and pipe carry a profile along a path (chapter 5). In a bend the profiles move together on the inside and apart on the outside. If the profile reaches further from the path than the radius of the bend, on the inside they do not just come together but pass over each other: the wall turns back there and runs back through the rest of the tube, a fold. Shown on screen it looks right, and even the summary of kf render says closed solid ✓, because every edge has its two triangles. But the surface passes through itself: where inside and outside are cannot be told, and a slicer fills it wrongly.

That is why knotflow warns while building it (the surface folds …) and lets the shape only be shown and exported. A boolean, shell, fillet_edges or chamfer_edges on it gives the error the shape runs through itself, instead of silently delivering a broken mesh.

export tube(arc(10, 0, 180), 12)
export difference(box(40, 40, 40) |> move(x: -20, y: -20, z: -20), tube(arc(10, 0, 180), 12))

Reading the message. the profile reaches 12 mm from the path is the reach of the profile (here its radius), the radius 10 mm of its bend the radius of the bend at that place, near … a point of the fold. The further the first number lies above the second, the worse the fold.

What helps. Make the profile smaller than the radius of the tightest bend, or the bend wider. With an elongated profile (sweep) it also helps to turn it so that its narrow side points into the bend:

export tube(arc(10, 0, 180), 8)
export tube(arc(15, 0, 180), 12)

The loft folds: the surface through the sections turns back on itself

What is wrong. loft stretches a skin through its sections in order (chapter 5), smoothly unless degree: 1. If a section lies back where the skin came from, or so far aside that the skin through it swings out and comes back, the skin runs through itself – or past the last section and back to it through the flat cap that closes the end. As with a folded tube, kf render still says closed solid ✓, but inside and outside cannot be told there.

knotflow therefore looks at the skin of every loft through closed sections: where two parts of it cross, where it folds into itself (just beside it the winding number is not 0 on one side and 1 on the other), or where it passes through an end cap, it warns while building it. Showing and exporting work; a boolean, shell, fillet_edges or chamfer_edges on it gives the error the shape runs through itself. sweeps.closed from the library is a loft, and says the same when its profile is wider than a bend of the path.

export loft([circle(10), circle(10) |> move(z: 20), circle(10) |> move(z: 10)])

Reading the message. near … is a point of the skin where it runs through itself; the skin around it is what to look at.

What helps. The sections in the order the skin is to go, and each not far aside of the last one compared with how far it lies on; where the skin turns sharply, more sections in between (or, if straight pieces are fine, degree: 1, which does not swing out). Round a bend, as with a tube: a smaller profile or a wider bend.

export loft([circle(10), circle(10) |> move(z: 10), circle(10) |> move(z: 20)])

the profile reaches across the axis to …

What is wrong. revolve turns its profile round the axis x = 0 (chapter 5). A profile with points on both sides of the axis sweeps one side through the other: the part at x < 0 turned by half a turn lies where the part at x > 0 already is. The surface passes through itself; kf render would still say closed solid ✓, and volume would give the difference of the two sides instead of the solid seen.

export revolve(polyline([(-2, 0), (5, 0), (5, 10), (-2, 10)], closed: true))

Reading the message. The point is the place of the profile farthest across the axis, on the side it reaches less far to.

What helps. Draw the profile at x ≥ 0 only: on the axis is fine (a ball, a cylinder whose profile starts at x = 0). A solid of revolution is what the wider side sweeps:

export revolve(polyline([(0, 0), (5, 0), (5, 10), (0, 10)], closed: true))

the curve crosses itself near …, the profile crosses itself near …

What is wrong. The same in the plane: a curve that extrude draws up, revolve turns or sweep moves along a path crosses itself (a figure eight, a profile with too thick a wall at a tight bend, an outline from interpolate that swings out over itself at a narrow waist). Its walls would run through each other in the solid. For extrude the curve counts as seen along the direction of the extrusion, also when it is not flat: a bow tie whose corners rise a little crosses itself seen from above. Only where an open curve passes over itself at the crossing by at least the height of the extrusion (a helix with room between its turns) do the walls not meet; a closed curve gets flat caps, and they cross wherever the curve does seen from above.

export extrude(interpolate([(0, 0), (10, 10), (20, 0), (10, -10), (0, 0), (-10, 10), (-20, 0), (-10, -10)],
                           closed: true), 5)
export revolve(polyline([(1, 0), (10, 0), (1, 10), (10, 10)], closed: true))
let eight = interpolate([(2 * sin(v), 1.5 * sin(2 * v)) | v <- range(0, 360, step: 15)], closed: true)
export sweep(eight, line((0, 0, 0), (0, 0, 20)))

Reading the message. The point is a place where the curve crosses itself: for the figure eight its middle, for the profile the point where its two slanted sides cross.

What helps. Draw the curve so that it does not cross itself: move the points at the crossing apart, set more points at a narrow waist, make a wall thinner. If two parts are meant, take two curves and join the solids with union:

let loop = interpolate([(0, 0), (10, 10), (20, 0), (10, -10)], closed: true)
export union(extrude(loop, 5), extrude(loop, 5) |> rotate(180))