CAD/CAM and Computer Integrated Manufacturing cover
Interactive book · Semester 4-7

CAD/CAM and Computer Integrated Manufacturing

Bend a Bezier curve, build a solid with Euler operators, rough out a shaft with G71 and find the bottleneck of a flexible manufacturing system

27 chapters, 27 interactives, few words. Every chapter is mapped to the Anna University, VTU, SPPU, Mumbai University and KTU units it covers: CAD hardware and raster algorithms, 2D and 3D transformations and projections, Hermite, Bezier, B-spline and NURBS curves, surfaces, B-rep and CSG solids, assemblies and data exchange, CNC resolution and interpolation, turning and milling part programs, CAM tool paths, production models, transfer lines, AS/RS and AGVs, group technology, FMS, Petri nets, process planning, MRP, adaptive control and SPC. Manual G-code basics are in the Machining Science book; STL files and 3D printing are in the Additive Manufacturing book.

  • AUME3792, CME340Computer Integrated Manufacturing; CAD/CAM (elective)
  • VTUBME504LCNC Programming and 3-D Printing Lab
  • SPPU202042, 402048Solid Modeling and Drafting; Computer Integrated Manufacturing
  • MUMEC404CAD/CAM
  • KTUPEMET523, PCMET502Computer Aided Design and Analysis; Advanced Manufacturing Engineering (Module 1)

By Skill-Lync · Updated 19 Nov 2026 · 27 chapters · 27 interactives · free, no sign-up

Chapter 1

CAD in the product cycle: hardware, raster and vector displays, software modules

Which syllabus covers thisAU ME3792 Unit IVTU not in syllabusSPPU 202042 Unit IMU MEC404 Module 1KTU PEMET523 Module 1

Where does CAD sit in the life of a product?

A product starts as a need, becomes a concept and then a design that is modelled, analysed, optimised, detailed and documented. Manufacturing then plans the process, programs the machines, makes, inspects and ships it. CAD covers the design half: geometric modelling, analysis (stress, mass properties, interference) and drafting. CAM covers the manufacturing half: process plans, NC programs, inspection. CIM links both through one shared database, so a changed dimension reaches the drawing, the tool path and the bill of materials without retyping. The first interactive CAD program, Ivan Sutherland's Sketchpad, ran in 1963 on MIT Lincoln Laboratory's TX-2 computer.

What modules make up a CAD software package?

Four groups. The geometric modelling module builds and edits wireframe, surface and solid models and keeps them in the database. Application modules use that geometry: meshing and finite element analysis, mass properties, mechanism motion, tool-path generation and drafting with dimensions and tolerances. The programming module (a macro language or an API) lets a company automate repeated work, such as generating a family of flanges from a table of sizes. The communication module exchanges models with other systems through neutral formats such as IGES and STEP, and with the plant's PDM and ERP software.

How does a raster display differ from a vector (random-scan) display?

A vector display steers its beam along each line of the drawing, like a pen, following a display list of MOVE and LINE commands. Lines are perfectly smooth, but the whole list must be retraced many times a second, so a long list flickers. A raster display sweeps every pixel row by row and reads each pixel's colour from a frame buffer. Lines become staircases of pixels (chapter 2), but shading and images cost nothing extra. A 1920 × 1080 screen at 24 bits per pixel needs a 6.22 MB frame buffer and, at 60 Hz, 124.4 million pixels a second.

Raster and vector displays: frame buffer memory, pixel rate and the scan beam: interactive loads as you scroll

What hardware does a CAD workstation need?

Input devices: a mouse or trackball for picking, a keyboard for values, a 3D mouse that pushes, pulls and twists the view in six degrees of freedom, and sometimes a digitiser tablet for tracing old drawings. A processor and plenty of memory hold large assemblies. A graphics card (GPU) does the transformations, projections and rasterisation of chapters 2 to 4 in hardware, so models spin smoothly. One or two high-resolution raster monitors show the model. Output goes to printers, large-format plotters, 3D printers and, through CAM, to machine tools.

What are graphics standards and why do they matter?

A graphics standard is an agreed set of functions between a program and the display hardware, so one CAD program runs on many devices. GKS, the Graphical Kernel System, became ISO 7942 in 1985, the first ISO graphics standard, and is two-dimensional. PHIGS, the Programmer's Hierarchical Interactive Graphics System (ISO/IEC 9592), added 3D and a hierarchy of structures. OpenGL, released by Silicon Graphics in 1992 and run by the Khronos Group since 2006, became a common 3D interface for CAD viewports. Exchange formats such as IGES and STEP are different: they describe the model, not drawing calls.

Predict, then check

A 1920 × 1080 monitor at 24 bits per pixel is replaced by a 3840 × 2160 one at the same colour depth. How much frame-buffer memory does one frame need now?

Worked examples

Frame buffer and data rate of a design monitor · 2560 × 1440 pixels, 30-bit colour (10 bits per red, green and blue channel), 120 Hz refresh
  1. Pixels per frame = 2560 × 1440 = 36,86,400
  2. Frame buffer = 36,86,400 × 30 bits = 11,05,92,000 bits = 13.824 MB (1 MB = 10⁶ bytes)
  3. Pixel rate = 36,86,400 × 120 = 442.4 million pixels per second
  4. Active data rate = 442.4 × 10⁶ × 30 bits = 13.27 Gbit/s; the cable must carry more, because the video signal also has blanking intervals
  5. Colours = 2³⁰ = 1,07,37,41,824, about 1.07 billion

Answer: 13.82 MB per frame, 442.4 Mpx/s, 13.27 Gbit/s of active pixel data

Saving memory with a colour lookup table · A 1920 × 1080 CAD view that never shows more than 256 different colours, each chosen from 24-bit colour
  1. Direct colour: 1920 × 1080 × 24/8 = 6.221 MB
  2. Indexed colour: store an 8-bit index per pixel: 1920 × 1080 × 1 byte = 2.074 MB
  3. Plus the lookup table: 256 entries × 3 bytes = 768 bytes
  4. The display hardware reads the index and looks up the 24-bit colour for every pixel as it scans
  5. Saving = 1 − (20,73,600 + 768)/62,20,800 = 66.65 %

Answer: 2.07 MB instead of 6.22 MB, a saving of about 66.7 %

Will a vector display flicker? · Illustrative random-scan display: a display list of 2,400 strokes averaging 40 mm and 300 blank moves averaging 60 mm; the beam writes at 5 mm/µs and moves blank at 20 mm/µs; flicker-free needs 60 refreshes per second
  1. Drawing time = 2400 × 40/5 = 19,200 µs
  2. Blank moves = 300 × 60/20 = 900 µs
  3. One refresh = 20,100 µs = 20.1 ms, so at most 49.8 refreshes per second: below 60, the picture flickers
  4. At 60 Hz the budget is 16,667 µs; minus the blank moves leaves 15,767 µs, enough for 1,970 strokes of 40 mm
  5. A raster display has no such limit: it always scans every pixel, however much is drawn

Answer: 49.8 Hz: it flickers; cut the list to about 1,970 strokes or switch to raster

Chapter 2

Drawing on pixels: DDA and Bresenham line and circle algorithms

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU not in syllabusMU not in syllabusKTU PEMET523 Module 2

What does scan conversion mean?

A raster screen can only light whole pixels on an integer grid, so every line, arc and curve that the CAD model holds exactly must be turned into a set of pixels: scan conversion, or rasterisation. A good line algorithm lights one pixel per column for a shallow line (one per row for a steep one), picks the pixel nearest the true line, starts and ends exactly on the end points, keeps the brightness even and runs fast, because a CAD view redraws thousands of lines every time you turn it. The staircase on a shallow line is called aliasing.

How does the DDA (digital differential analyser) draw a line?

Take n = the larger of |Δx| and |Δy|. Each step adds Δx/n to x and Δy/n to y: one increment is exactly 1, the other is the slope or its inverse. Round both and light that pixel. It is simple, but it needs floating-point additions and two roundings per pixel, and repeatedly adding an inexact slope (0.1 has no exact binary form) can drift on long lines. On a 21 × 21 grid the DDA and Bresenham's algorithm choose different pixels on 31,208 of the 1,94,481 possible lines, every time where the true line passes exactly half-way between two pixels.

How does Bresenham's algorithm draw a line with integers only?

For a shallow line (slope between 0 and 1) x always steps by 1; the only question is whether y stays or steps up. Bresenham's decision parameter p measures which candidate pixel is nearer the true line, scaled by 2Δx so it stays an integer. Start with p0 = 2Δy − Δx. If p is negative, keep y and add 2Δy; otherwise step y and add 2Δy − 2Δx. That is one integer addition and a sign test per pixel. Jack Bresenham developed it at IBM in 1962 to drive a Calcomp plotter; the IBM Systems Journal published it in 1965.

DDA and Bresenham line and circle algorithms on a pixel grid: interactive loads as you scroll

How does one algorithm handle lines in every direction?

Split the directions into eight 45° octants. Let a be the larger and b the smaller of |Δx| and |Δy|: the axis with a is the driving axis. Step the driving coordinate by ±1 at every pixel, start with p0 = 2b − a, and step the other coordinate by ±1 whenever p ≥ 0. A line steeper than 45° just swaps the roles of x and y. On an exact tie (p = 0) this version steps, so a line drawn from A to B can differ by a pixel from B to A. The interactive's maths was checked against the nearest-pixel rule for all 1,94,481 end-point pairs on a 21 × 21 grid.

How is a circle drawn with integers?

A circle centred on the origin has eight-way symmetry: compute one octant, from (0, r) round to the 45° point, and mirror each pixel (x, y) to (±x, ±y) and (±y, ±x). In that octant x always steps by 1 and y stays or drops by 1. The midpoint algorithm asks whether the point half-way between the two candidates, (x + 1, y − ½), lies inside the circle: p0 = 1 − r; if p is negative add 2x + 1, else drop y and add 2x + 1 − 2y, using the new x and y. For r = 8 it computes 6 pixels and mirrors them into 44.

Predict, then check

A line runs from pixel (0, 0) to pixel (10, 4). How many pixels does Bresenham's algorithm light?

Worked examples

Bresenham's line from (2, 3) to (12, 7) · End points (2, 3) and (12, 7) on a pixel grid
  1. Δx = 10, Δy = 4: slope 0.4, so x drives; 2Δy = 8 and 2Δy − 2Δx = −12
  2. p0 = 2Δy − Δx = 8 − 10 = −2; light the start pixel (2, 3)
  3. k=0: p=−2 → (3, 3); k=1: p=6 → (4, 4); k=2: p=−6 → (5, 4); k=3: p=2 → (6, 5); k=4: p=−10 → (7, 5)
  4. k=5: p=−2 → (8, 5); k=6: p=6 → (9, 6); k=7: p=−6 → (10, 6); k=8: p=2 → (11, 7); k=9: p=−10 → (12, 7)
  5. Largest vertical distance from the true line y = 3 + 0.4(x − 2): 0.4 pixel (never more than 0.5)

Answer: 11 pixels: (2, 3), (3, 3), (4, 4), (5, 4), (6, 5), (7, 5), (8, 5), (9, 6), (10, 6), (11, 7), (12, 7)

Midpoint circle of radius 8 · Centre (0, 0), r = 8; compute the octant from (0, 8) to the 45° line
  1. p0 = 1 − r = −7; light (0, 8)
  2. p = −7 → (1, 8); p = −4 → (2, 8); p = 1 → (3, 7); p = −6 → (4, 7); p = 3 → (5, 6)
  3. Next x = 6 would pass y, so the octant ends: 6 pixels (0, 8), (1, 8), (2, 8), (3, 7), (4, 7), (5, 6)
  4. Check: round(√(64 − x²)) for x = 0..5 gives 8, 8, 8, 7, 7, 6: the same y values
  5. Mirror (x, y) to (±x, ±y) and (±y, ±x): 44 distinct pixels, all within 0.38 pixel of radius 8

Answer: Octant: 6 pixels; full circle: 44 pixels

A tie, and floating point deciding the DDA · End points (2, 2) and (12, 5)
  1. Δx = 10, Δy = 3: x drives; Bresenham: p0 = 2 × 3 − 10 = −4, add 6 while p is negative, else add −14 and step y
  2. k=0: p=−4 → (3, 2); k=1: p=2 → (4, 3); k=2: p=−12 → (5, 3); k=3: p=−6 → (6, 3); k=4: p=0 → (7, 4); k=5: p=−14 → (8, 4); k=6: p=−8 → (9, 4); k=7: p=−2 → (10, 4); k=8: p=4 → (11, 5); k=9: p=−10 → (12, 5)
  3. At x = 7 the true line is at y = 2 + 0.3 × 5 = 3.5: exactly half-way between 3 and 4
  4. Bresenham's p there is 0, and p ≥ 0 steps: (7, 4)
  5. The DDA adds 0.3 five times, but 0.3 has no exact binary value: the sum is 3.499999999999999, which rounds to 3: (7, 3)

Answer: 11 pixels; the methods differ only at x = 7: Bresenham (7, 4), DDA (7, 3), both equally near the true line

Chapter 3

2D transformations: homogeneous coordinates, concatenation and inverse

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 202042 Unit IVMU MEC404 Module 2KTU PEMET523 Module 2

Why add a third coordinate to a 2D point?

Rotation and scaling about the origin are 2 × 2 matrix products, but translation is an addition, so a chain such as rotate, move, scale cannot collapse into one matrix. Writing the point as [x y 1]ᵀ, its homogeneous coordinates, makes translation a 3 × 3 matrix too: [1 0 tx; 0 1 ty; 0 0 1]. Any sequence of moves then becomes one matrix, computed once and applied to every vertex of the model. This book uses column vectors, P' = M·P. If the third value w is not 1, the point is (x/w, y/w): chapter 4 uses that for perspective.

What are the basic 2D transformation matrices?

Translation [1 0 tx; 0 1 ty; 0 0 1]. Rotation by θ about the origin, counter-clockwise positive: [cos θ −sin θ 0; sin θ cos θ 0; 0 0 1]. Scaling about the origin: [sx 0 0; 0 sy 0; 0 0 1]. Reflection in the x-axis [1 0 0; 0 −1 0; 0 0 1], in the y-axis [−1 0 0; 0 1 0; 0 0 1], in y = x [0 1 0; 1 0 0; 0 0 1]. Shear in x: x' = x + shx·y. The determinant tells the area change: 1 for rotation and translation, −1 for a reflection (it also reverses the vertex order), sx·sy for scaling, 1 for a shear.

Why does the order of transformations matter?

Matrix products do not commute. Rotate the triangle A(2, 1), B(6, 1), C(4, 4) by 45° about the origin and then move it by (3, 3): A lands at (3.71, 5.12). Move first, then rotate: A lands at (0.71, 6.36). With column vectors, 'first M1, then M2' is M = M2·M1, read right to left. Books that write points as rows [x y 1] post-multiply, P' = P·M1·M2, so the same sequence reads left to right and every matrix is the transpose of the one here. Both give the same picture; never mix the two in one calculation.

2D homogeneous transformations: translate, rotate, scale, reflect, shear and their order: interactive loads as you scroll

How do you rotate about any point, or reflect in any line?

Move the problem to the origin, do the simple operation, move back. Rotation by θ about P(px, py): M = T(px, py)·R(θ)·T(−px, −py). Reflection in y = mx + c: shift the line down by c so it passes through the origin, turn it onto the x-axis with R(−α) where tan α = m, reflect in the x-axis, then undo both: M = T(0, c)·R(α)·Ref_x·R(−α)·T(0, −c). Two quick checks: the composite has det = −1, and every point on the line stays where it is.

How do you undo a transformation?

Each basic transformation has an obvious inverse: T(tx, ty)⁻¹ = T(−tx, −ty), R(θ)⁻¹ = R(−θ), which is also its transpose, S(sx, sy)⁻¹ = S(1/sx, 1/sy), and a reflection is its own inverse. The inverse of a chain reverses the order, (M2·M1)⁻¹ = M1⁻¹·M2⁻¹, like taking off shoes before socks. A CAD system uses inverses to map a mouse click on the screen back into model coordinates. A matrix with det = 0, such as a scale by zero, has no inverse: it squashes the figure onto a line or a point.

Predict, then check

You rotate a part 90° about the origin and then move it 10 mm along x. A colleague moves it 10 mm along x first and then rotates it 90° about the origin. Do the parts end in the same place?

Worked examples

Rotating the triangle 30° about its corner A · Triangle A(2, 1), B(6, 1), C(4, 4); rotate 30° counter-clockwise about A
  1. M = T(2, 1)·R(30°)·T(−2, −1); cos 30° = 0.866, sin 30° = 0.5
  2. M = [0.866 −0.5 0.768; 0.5 0.866 −0.866; 0 0 1]
  3. A' = A = (2, 1) (the centre does not move)
  4. B' = (2 + 4 × 0.866, 1 + 4 × 0.5) = (5.464, 3)
  5. C' = (2 + 2 × 0.866 − 3 × 0.5, 1 + 2 × 0.5 + 3 × 0.866) = (2.232, 4.598)

Answer: A'(2, 1), B'(5.464, 3), C'(2.232, 4.598)

Reflecting the triangle in the line y = 0.5x + 2 · Triangle A(2, 1), B(6, 1), C(4, 4); line y = 0.5x + 2, so tan α = 0.5
  1. cos 2α = (1 − m²)/(1 + m²) = 0.6 and sin 2α = 2m/(1 + m²) = 0.8; reflection in the line through the origin: [0.6 0.8 0; 0.8 −0.6 0; 0 0 1]
  2. M = T(0, 2)·Ref·T(0, −2): the last column becomes Ref·(0, −2) + (0, 2) = (−1.6, 3.2)
  3. M = [0.6 0.8 −1.6; 0.8 −0.6 3.2; 0 0 1], det M = −1
  4. A' = (0.4, 4.2), B' = (2.8, 7.4), C' = (4, 4)
  5. Check A: the midpoint of A and A' is (1.2, 2.6), and 0.5 × 1.2 + 2 = 2.6, so it lies on the line

Answer: A'(0.4, 4.2), B'(2.8, 7.4), C'(4, 4)

A chain and its inverse · Scale the triangle by (2, 1.5) about the origin, then shear x' = x + 0.5y, then move by (5, −2)
  1. M = T(5, −2)·Sh(0.5)·S(2, 1.5) (column vectors: the first operation sits on the right)
  2. M = [2 0.75 5; 0 1.5 −2; 0 0 1]
  3. A' = (9.75, −0.5), B' = (17.75, −0.5), C' = (16, 4)
  4. det M = 2 × 1.5 × 1 = 3; area 6 → 18
  5. M⁻¹ = S(0.5, 1/1.5)·Sh(−0.5)·T(−5, 2) = [0.5 −0.25 −3; 0 0.667 1.333; 0 0 1]; M⁻¹·C' = (4, 4) = C

Answer: Area grows 3 times to 18; the inverse applies the undo steps in reverse order

Chapter 4

3D transformations, orthographic, isometric and perspective projection

Which syllabus covers thisAU CME340 Unit IIIVTU not in syllabusSPPU 202042 Unit IVMU MEC404 Modules 1, 2KTU PEMET523 Module 2

What are the model, world and screen coordinate systems?

Each part is modelled in its own model coordinate system (MCS), fixed to the part. An assembly places parts in the world or working coordinate system (WCS) with 4 × 4 transforms, so a bolt modelled once can sit in every hole. A viewing transform then turns the world so the eye looks along the z-axis, a projection flattens it onto the picture plane, and the window-to-viewport mapping turns picture coordinates in millimetres into screen coordinates (SCS) in pixels. A sketch plane in CAD and a work offset such as G54 on a CNC machine are the same idea: one more coordinate system, one more matrix.

How do the 2D matrices grow into 3D?

Points become [x y z 1]ᵀ and matrices 4 × 4. Translation puts tx, ty, tz in the last column; scaling puts sx, sy, sz on the diagonal. Rotation about z is the 2D rotation acting on x and y, with z unchanged; about x it acts on y and z; about y it acts on z and x, so Ry(θ) = [cos θ 0 sin θ 0; 0 1 0 0; −sin θ 0 cos θ 0; 0 0 0 1]. Positive angles follow the right-hand rule: thumb along the axis, fingers curl the positive way. Reflection in the x-y plane flips the sign of z. As in 2D, order matters.

How are orthographic and isometric views made with matrices?

Orthographic projection drops z after the viewing rotation: [1 0 0 0; 0 1 0 0; 0 0 0 0; 0 0 0 1]. With no rotation that gives the front view; turn 90° about x for the top view and −90° about y for the side view. Turn the part 45° about y and then 35.26° about x (the angle whose sine is tan 30°) and all three axes shorten equally to √(2/3) = 0.8165 and sit 120° apart: the isometric projection. An isometric drawing scales this back up so lengths along the axes read true.

3D transformations: orthographic, isometric and perspective projection of a bracket: interactive loads as you scroll

How does perspective projection work, and what is a vanishing point?

Put the eye on the z-axis at distance d in front of the picture plane z = 0. By similar triangles, a point at depth z (negative behind the plane) lands at x' = x·d/(d − z): far things shrink. The 4 × 4 matrix with −1/d in its bottom row produces w = 1 − z/d, and dividing by w gives the same answer; this divide is why homogeneous points carry a w. Receding parallel edges meet at a vanishing point, −d·(ux, uy)/uz for direction u. One, two or three receding edge families give one-, two- or three-point perspective. Books that measure z away from the eye write x·d/(z + d).

How does a drawing in millimetres reach the pixels of the screen?

The window is the rectangle of the picture plane you want to see, in model units; the viewport is the rectangle of the screen it fills, in pixels. Each axis maps linearly: u = umin + (x − xmin)·(umax − umin)/(xmax − xmin), and the same for v. Screen rows usually count downwards, so take vmin at the bottom row and the y scale comes out negative. If the two scale sizes differ, circles turn into ellipses, so zoom-to-fit keeps them equal. Zooming in shrinks the window; panning slides it.

Predict, then check

In an isometric projection (no isometric drawing scale), how long does a 100 mm edge parallel to the x-axis appear?

Worked examples

Window to viewport for a part drawing · Window x 0 to 240 mm, y 0 to 150 mm; viewport pixels u 160 to 1760, v from row 1040 (bottom) to row 40 (top); a hole of 30 mm diameter centred at (90, 60) mm
  1. x scale = (1760 − 160)/(240 − 0) = 6.667 px/mm
  2. y scale = (40 − 1040)/(150 − 0) = −6.667 px/mm (negative: rows count down)
  3. Equal sizes, so the hole stays round
  4. u = 160 + 90 × 6.667 = 760; v = 1040 + 60 × (−6.667) = 640
  5. Check by proportion: 90/240 = 0.375 of the window and (760 − 160)/1600 = 0.375 of the viewport; the hole is 200 px across

Answer: The hole centre is at pixel (760, 640), drawn 200 px across

Perspective of a corner and a vanishing point · Eye at d = 500 mm on the z-axis; a corner at (80, 40, −120) mm after the viewing rotation; an edge family along u = (0.6, 0, −0.8)
  1. Similar triangles: x' = 80 × 500/(500 + 120) = 64.52 mm; y' = 40 × 500/620 = 32.26 mm
  2. Matrix route: [1 0 0 0; 0 1 0 0; 0 0 0 0; 0 0 −1/500 1] gives w = 1 + 120/500 = 1.24; x/w = 80/1.24 = 64.52 mm
  3. Vanishing point = −d·(ux, uy)/uz = −500 × (0.6, 0)/(−0.8) = (375, 0) mm
  4. Check: a point 10⁹ mm along the edge from the corner projects to x' = 375 mm, the same point
  5. Edges along y have uz = 0, stay parallel and vertical: two-point perspective

Answer: Corner at (64.52, 32.26) mm; that edge family vanishes at (375, 0) mm

An isometric view of the bracket corner · Bracket corner (60, 10, 40) mm in model coordinates; turn −45° about y, then 35.26° about x; orthographic
  1. About y: x1 = 60 cos 45° − 40 sin 45° = 14.142, z1 = 60 sin 45° + 40 cos 45° = 70.711, y1 = 10
  2. About x: y2 = 10 cos 35.26° − 70.711 sin 35.26° = −32.66, z2 = 63.509
  3. Projected point (drop z): (14.142, −32.66) mm
  4. The 60 mm base edge along x appears 48.99 mm long (60 × 0.8165) and runs 30° below the horizontal
  5. An isometric drawing multiplies by 1/0.8165 = 1.2247 so the edge is drawn 60 mm long, still 30° below the horizontal

Answer: (14.14, −32.66) mm; every axis shortens to 0.8165 of true length

Chapter 5

Parametric curves: lines, circles, conics and continuity

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 202042 Unit IIMU MEC404 Module 1KTU PEMET523 Module 3

Why does a CAD system store curves in parametric form?

An implicit equation such as x² + y² = R² tells you whether a point is on the circle, but not how to walk along it: solving y = ±√(R² − x²) gives two branches and a vertical tangent at x = ±R. Step x evenly on a 50 mm circle with 16 points and the chords near x = ±R come out 2.81 times longer than those at the top. A parametric form x = R cos θ, y = R sin θ gives every point from one parameter, bounds a segment by its parameter range, handles closed and vertical curves, and transforms by moving points alone.

How many points does a circle need on screen or in a tool path?

A curve is drawn, meshed or machined as straight chords, and each chord cuts inside the arc by its chord height (sagitta). For a radius R and an angle step Δθ it is R(1 − cos(Δθ/2)). A 50 mm circle at 16 equal angles is off by 0.961 mm; at 32 points the error drops to 0.241 mm, about a quarter, because the error grows with Δθ². Holding 0.01 mm on that circle needs 158 chords. Equal-x (implicit) points do far worse: 3.23 mm with 16 points.

Parametric vs implicit circles, chord error and C0/G1/C1/C2 continuity: interactive loads as you scroll

How do you generate circle points without calling sin and cos every time?

Every step is the same rotation by Δθ, so compute cos Δθ and sin Δθ once and apply x' = x cos Δθ − y sin Δθ, y' = x sin Δθ + y cos Δθ. Each new point then costs four multiplications and two additions, which mattered on early graphics hardware and still suits small controllers. Rounding errors accumulate, but slowly: in double precision a 360-step turn drifts only 1.1 × 10⁻¹⁴ R from the exact points. In single precision, or over millions of steps, re-anchor the point to the true radius now and then.

How are ellipses, parabolas and hyperbolas written parametrically?

An ellipse with semi-axes a and b is x = a cos θ, y = b sin θ; equal steps in θ are no longer equal steps in length, so a 60 × 35 mm ellipse with 24 points has chords 1.68 times longer at the flat sides than at the ends. A parabola y² = 4ax is x = at², y = 2at, and a hyperbola x = a cosh u, y = b sinh u. These are the analytic curves; free-form shapes need the synthetic curves of the next chapters, where one rational form (NURBS) covers every conic exactly.

What do C0, G1, C1 and C2 mean where two curves meet?

C0: the pieces touch, maybe with a corner. G1: the tangent directions match, so there is no corner. C1: the first derivatives match in direction and size, so the parameter flows on smoothly. C2: second derivatives match, and with them curvature. A straight line joined to an R 20 tangent arc is G1 but curvature jumps from 0 to 0.05 per mm; a curvature comb shows this as a step. That jump is visible as a kink in reflections on a polished surface, which is why styling surfaces aim for curvature continuity (G2).

Predict, then check

A 50 mm circle drawn as 16 parametric chords is off by 0.961 mm at the worst point. You double the points to 32. What is the error now?

Worked examples

Chords for a CAM tolerance · A R 40 mm boss is approximated by straight moves with a chordal tolerance of 0.005 mm
  1. Chord height e = R(1 − cos(Δθ/2)), so Δθ = 2 acos(1 − e/R)
  2. Δθ = 2 acos(1 − 0.005/40) = 1.8119°
  3. Chords for a full circle: 360/1.8119 = 198.69, round up to N = 199
  4. Check: 40 × (1 − cos(180°/199)) = 4.98 µm, within 5 µm

Answer: 199 chords of 1.809° each; the real error is 4.98 µm

A circle by the rotation recurrence · R = 30 mm, 12 points (Δθ = 30°), start at (30, 0)
  1. Set up once: cos 30° = 0.866025, sin 30° = 0.5
  2. P1 = (30 × 0.866 − 0 × 0.5, 30 × 0.5 + 0 × 0.866) = (25.981, 15)
  3. P2 = (25.981 × 0.866 − 15 × 0.5, 25.981 × 0.5 + 15 × 0.866) = (15, 25.981)
  4. P3 = (0, 30): the 90° point, reached with no further trig calls
  5. Only two trig evaluations for the whole circle instead of 24

Answer: P1 (25.981, 15), P2 (15, 25.981), P3 (0, 30) mm

Making a joint C2 · Piece A(u) = (10u, 5u²), u from 0 to 1; piece B(v) = (10 + 10v, 5 + 10v + c·v²), v from 0 to 1
  1. C0: A(1) = (10, 5) = B(0), the pieces touch
  2. C1: A'(1) = (10, 10u) at u = 1 = (10, 10); B'(0) = (10, 10): equal, so C1 (and G1)
  3. C2: A''(u) = (0, 10); B''(v) = (0, 2c); equal when c = 5
  4. With c = 0 (B a straight line) curvature jumps from |x'y'' − y'x''|/|r'|³ = 100/2828.4 = 0.0354 per mm to 0

Answer: c = 5 gives C2; any other c leaves a C1 joint with a curvature jump

Chapter 6

The Hermite cubic curve: end points and tangent vectors

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 202042 Unit IIMU MEC404 Module 1KTU PEMET523 Module 3

Why are cubic polynomials the workhorse of synthetic curves?

A cubic is the lowest degree that lets you fix both end points and both end slopes, and the lowest that can twist out of a plane in 3D. A straight line has no shape to give, a quadratic is always planar and cannot have an inflection, and higher degrees wiggle and cost more to evaluate. Each coordinate of a cubic has four coefficients, so a 3D segment carries 12 numbers. Synthetic curves (Hermite, Bezier, B-spline) are different ways of choosing those 12 numbers from things a designer can see.

How is a Hermite cubic defined?

By two end points P0, P1 and two tangent vectors T0, T1, mixed by four blending functions: H1 = 2t³ − 3t² + 1, H2 = −2t³ + 3t², H3 = t³ − 2t² + t, H4 = t³ − t², with t from 0 to 1. H1 and H2 hand the position over from P0 to P1 and always add up to 1; H3 and H4 are zero at both ends and only bend the curve. In matrix form P(t) = [t³ t² t 1]·M_H·[P0 P1 T0 T1]^T. The same polynomials, with the slope terms scaled by the element length, are the beam shape functions of the Finite Element Analysis book.

Hermite cubic curve: end points, tangent vectors and blending functions: interactive loads as you scroll

What does the length of a tangent vector do to the curve?

Direction sets which way the curve leaves the end point; magnitude sets how far it keeps going that way before turning. On a 100 mm chord with tangents at ±45°, the peak rises from 26.5 mm at 150 mm tangents to 53 mm at 300 mm. Push further and the curve folds: for equal, mirrored tangents the middle becomes a cusp when the tangent component along the chord reaches three chord lengths (424 mm at 45°), and a loop beyond. Tangent magnitude is a real design input, not a detail.

How is a Hermite cubic related to a Bezier cubic and a spline?

They are the same curve described differently. The Bezier control points are P0, P0 + T0/3, P1 − T1/3 and P1, so dragging a Bezier handle is the same as stretching a Hermite tangent. Chaining Hermite segments that share points and tangents gives a C1 curve automatically. Choosing the shared tangents so that second derivatives also match gives a C2 cubic spline: one small linear system (tridiagonal for many points) solved for the tangents. Arc length has no closed form; integrate |P'(t)| numerically.

Predict, then check

On a 100 mm chord both tangents point at ±45° with 150 mm magnitude. You double both magnitudes to 300 mm. What happens?

Worked examples

A point on a Hermite curve · P0 = (10, 20), P1 = (90, 40), T0 = (60, 120), T1 = (80, −60) mm; find P(0.4)
  1. H1 = 2(0.064) − 3(0.16) + 1 = 0.648; H2 = 0.352
  2. H3 = 0.064 − 0.32 + 0.4 = 0.144; H4 = 0.064 − 0.16 = −0.096
  3. x = 0.648×10 + 0.352×90 + 0.144×60 + (−0.096)×80 = 39.12
  4. y = 0.648×20 + 0.352×40 + 0.144×120 + (−0.096)×(−60) = 50.08

Answer: P(0.4) = (39.12, 50.08) mm

The same curve as a Bezier · The curve of the previous example; check P(0.5) by de Casteljau and find its length
  1. B0 = P0 = (10, 20); B1 = P0 + T0/3 = (30, 60); B2 = P1 − T1/3 = (63.333, 60); B3 = P1 = (90, 40)
  2. Halve each leg: (20, 40), (46.667, 60), (76.667, 50)
  3. Again: (33.333, 50), (61.667, 55); and once more: B(0.5) = (47.5, 52.5)
  4. Hermite blending at t = 0.5 (H = 0.5, 0.5, 0.125, −0.125) gives the same point
  5. Length by Simpson's rule on |P'(t)|: 97.09 mm, against a chord of 82.46 mm

Answer: P(0.5) = (47.5, 52.5) mm both ways; length 97.1 mm

A C2 spline through three points · Q0 = (0, 0), Q1 = (50, 30), Q2 = (100, 0) mm; two Hermite segments, t from 0 to 1 on each, zero second derivative at both ends
  1. Equal P'' at Q1 and P'' = 0 at the ends give: 2T0 + T1 = 3(Q1 − Q0); T0 + 4T1 + T2 = 3(Q2 − Q0); T1 + 2T2 = 3(Q2 − Q1)
  2. x: 2T0 + T1 = 150, T0 + 4T1 + T2 = 300, T1 + 2T2 = 150; y: right-hand sides 90, 0, −90
  3. Solve: T0 = (50, 45), T1 = (50, 0), T2 = (50, −45)
  4. Check at Q1: P'' from the left = (0, −90), from the right = (0, −90)

Answer: Tangents (50, 45), (50, 0), (50, −45): the curve passes Q1 moving horizontally, as the symmetry demands

Chapter 7

Bezier curves: Bernstein polynomials and de Casteljau's construction

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 202042 Unit IIMU MEC404 Module 1KTU PEMET523 Module 3

What is a Bezier curve?

A curve shaped by a control polygon of n + 1 points: it starts at the first, ends at the last and is pulled towards the others without passing through them. It is named after Pierre Bézier, who used it in the 1960s for Renault car bodies; Paul de Casteljau had developed the same curves and his construction at Citroën in 1959. Designers like it because the polygon is a handle you can see: drag a point and the curve follows smoothly. Fonts use it too: TrueType outlines are quadratic Bezier pieces, PostScript ones cubic.

How do the Bernstein polynomials weight the control points?

B(t) = Σ C(n, i) tⁱ (1 − t)ⁿ⁻ⁱ Pᵢ: each point gets a weight that peaks at t = i/n. For a cubic at t = 0.5 the weights are 0.125, 0.375, 0.375, 0.125, so the inner points pull three times harder than the ends there. The weights are never negative and always add up to 1, so B(t) is a weighted average of the points. That is why the curve stays inside the convex hull of its polygon, and why moving or rotating the polygon moves the curve exactly the same way.

Bezier curve with de Casteljau's construction and the convex hull: interactive loads as you scroll

How does de Casteljau's construction find a point on the curve?

Divide every leg of the control polygon at the same ratio t, which gives one point fewer; join those and repeat until one point is left. That point is B(t). It needs only additions and multiplications by t and 1 − t, so it is numerically very stable, and it gives more than a point: the first points of every level form the control polygon of the left part of the curve and the last points that of the right part. That split (subdivision) is how CAD systems intersect, render and trim Bezier curves.

Which properties of a Bezier curve matter in design?

End-point interpolation: B(0) = P0, B(1) = Pn. End tangents: B'(0) = n(P1 − P0), so the first leg sets the leaving direction and speed. Convex hull: the curve stays inside its polygon's hull, useful for quick clash checks. Variation diminishing: a straight line cuts the curve no more often than it cuts the polygon, so the curve never wiggles more than its polygon. Global control: every point influences the whole curve, and n + 1 points force degree n. The last two are why long shapes use B-splines.

Can you add a control point without changing the curve?

Yes, by degree elevation. A degree-n curve is rewritten exactly as degree n + 1 with Qᵢ = (i/(n + 1))Pᵢ₋₁ + (1 − i/(n + 1))Pᵢ: the new polygon is closer to the curve and gives the designer one more handle. A quadratic becomes a cubic with the inner points two thirds of the way along each leg. The reverse (degree reduction) is only approximate. Subdivision does the other useful trick: it splits one curve into two at any t, with no change in shape.

Predict, then check

A degree-4 Bezier curve: you lift only the middle control point P2 by 30 mm. How far does the curve's midpoint B(0.5) move?

Worked examples

de Casteljau by hand · Cubic with P0 = (15, 15), P1 = (45, 95), P2 = (160, 95), P3 = (195, 20) mm; find B(0.4)
  1. Level 1 (40 % along each leg): (27, 47), (91, 95), (174, 65)
  2. Level 2: (52.6, 66.2), (124.2, 83)
  3. Level 3: B(0.4) = (81.24, 72.92)
  4. The left-hand points P0, (27, 47), (52.6, 66.2), B(0.4) are the control polygon of the curve from t = 0 to 0.4

Answer: B(0.4) = (81.24, 72.92) mm

The same point by Bernstein weights · The cubic of the previous example at t = 0.4
  1. Weights (1 − t)³, 3t(1 − t)², 3t²(1 − t), t³ = 0.216, 0.432, 0.288, 0.064 (sum 1)
  2. x = 0.216×15 + 0.432×45 + 0.288×160 + 0.064×195 = 81.24
  3. y = 0.216×15 + 0.432×95 + 0.288×95 + 0.064×20 = 72.92
  4. Start tangent B'(0) = 3(P1 − P0) = (90, 240) mm per unit t
  5. Curve length by Simpson's rule on |B'(t)|: 227.49 mm

Answer: B(0.4) = (81.24, 72.92) mm, the same as de Casteljau; length 227.5 mm

Raising a quadratic to a cubic · Quadratic P0 = (20, 10), P1 = (100, 95), P2 = (190, 20) mm
  1. Q0 = P0 and Q3 = P2
  2. Q1 = (1/3)P0 + (2/3)P1 = (73.333, 66.667)
  3. Q2 = (2/3)P1 + (1/3)P2 = (130, 70)
  4. Check the midpoint: quadratic (P0 + 2P1 + P2)/4 = (102.5, 55); cubic (Q0 + 3Q1 + 3Q2 + Q3)/8 = (102.5, 55)

Answer: Cubic polygon (20, 10), (73.333, 66.667), (130, 70), (190, 20): the same curve

Chapter 8

B-splines and NURBS: knots, local control and exact circles

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 202042 Unit IIMU MEC404 Module 1KTU PEMET523 Module 3

What does a B-spline fix that a single Bezier curve cannot?

A Bezier curve through many points needs a high degree, and every point moves the whole curve. A B-spline keeps the degree p you choose (usually 3) however many points there are: the curve is a chain of degree-p pieces joined at parameter values called knots, with C(p − 1) continuity at each simple knot, so a cubic B-spline is C2 everywhere. Each control point influences at most p + 1 neighbouring pieces. The B-spline basis came into CAD through Riesenfeld's dissertation; Versprille's extended it to non-uniform, rational splines.

How do the knot vector and the basis functions work?

A curve with n control points of order k = p + 1 needs n + k knots, a non-decreasing list of parameter values. The basis functions come from the Cox-de Boor recursion: Nᵢ,₁ is 1 on [tᵢ, tᵢ₊₁) and 0 elsewhere; each higher order blends two lower ones with linear ramps, Nᵢ,ₖ = (t − tᵢ)/(tᵢ₊ₖ₋₁ − tᵢ)·Nᵢ,ₖ₋₁ + (tᵢ₊ₖ − t)/(tᵢ₊ₖ − tᵢ₊₁)·Nᵢ₊₁,ₖ₋₁. Each Nᵢ,ₖ is non-negative, lives only on [tᵢ, tᵢ₊ₖ), and on the curve's domain they add up to exactly 1.

B-spline and NURBS: degree, knot vector, local control and an exact circle: interactive loads as you scroll

What exactly does local control mean?

Moving Pᵢ changes the curve only where Nᵢ,ₖ is non-zero: t in [tᵢ, tᵢ₊ₖ). With 7 points, a clamped cubic has knots 0 0 0 0 1 2 3 4 4 4 4 and four spans; P0 moves only the first span, while the middle point P3 reaches all 4. Drop to a quadratic (knots 0 0 0 1 2 3 4 5 5 5) and P3 moves 3 of 5 spans. Lower degree or more points means more local control; that is how a designer reshapes one region of a long body line without disturbing the rest.

What is the difference between uniform and clamped (open uniform) knots?

Uniform knots (0, 1, 2, ...) give identical, shifted basis functions, but the curve is only defined on the middle of the knot range and starts near, not at, the first control point. Clamped knots repeat the end values k times, so the curve starts at P0 and ends at the last point, tangent to the end legs, like a Bezier curve. With exactly k control points a clamped B-spline is the Bezier curve. Repeating an interior knot lowers the continuity there, which is how a deliberate corner is made.

What do NURBS add, and why do CAD systems exchange them?

Each control point gets a weight wᵢ; the curve is the weighted ratio below. A larger weight pulls the curve towards that point. Rational curves represent conics exactly: a quarter circle is a quadratic with weights 1, cos 45° and 1, while the usual cubic Bezier imitation (handles 0.5523R) bulges out by up to 0.0273 % of the radius. One form covers lines, arcs, conics and free-form shapes, which is why NURBS sit in exchange standards such as IGES and STEP.

Predict, then check

A clamped cubic B-spline has 7 control points (knots 0 0 0 0 1 2 3 4 4 4 4). You drag the first point P0. Which part of the curve moves?

Worked examples

Evaluating a clamped quadratic B-spline · Points (0, 0), (20, 40), (60, 50), (90, 10), (120, 30) mm; order k = 3; find C(1.5)
  1. Knots: n + k = 8 values, clamped: 0 0 0 1 2 3 3 3; domain t from 0 to 3
  2. Order 1: t = 1.5 lies in [t3, t4) = [1, 2), so N3,1 = 1
  3. Order 2: N2,2 = (t4 − t)/(t4 − t3)·N3,1 = 0.5; N3,2 = (t − t3)/(t4 − t3)·N3,1 = 0.5
  4. Order 3: N1,3 = (t4 − t)/(t4 − t2)·N2,2 = 0.125; N2,3 = (t − t2)/(t4 − t2)·N2,2 + (t5 − t)/(t5 − t3)·N3,2 = 0.75; N3,3 = (t − t3)/(t5 − t3)·N3,2 = 0.125
  5. C(1.5) = 0.125×(20, 40) + 0.75×(60, 50) + 0.125×(90, 10) = (58.75, 43.75)

Answer: C(1.5) = (58.75, 43.75) mm; the weights 0.125 + 0.75 + 0.125 add up to 1

A NURBS quarter circle · R = 100 mm: points (100, 0), (100, 100), (0, 100); weights 1, cos 45° = 0.7071, 1; knots 0 0 0 1 1 1
  1. At t = 0.5 the basis is N = (0.25, 0.5, 0.25)
  2. Denominator Σ N·w = 0.25 + 0.5 × 0.7071 + 0.25 = 0.8536
  3. x = (0.25 × 100 + 0.3536 × 100 + 0)/0.8536 = 70.711; y = 70.711 by symmetry
  4. Radius √(x² + y²) = 100 mm; over 2,001 points the largest error is below 1e-10 mm
  5. With all weights 1 (a plain quadratic) the midpoint sits 6.066 mm outside the circle

Answer: C(0.5) = (70.711, 70.711) mm, exactly on the circle

How good is a cubic Bezier circle? · A R 40 mm hole as four cubic Bezier quarters, handles κR with κ = 4(√2 − 1)/3; compare with an illustrative 0.01 mm CAM tolerance
  1. κ = 0.552285; the midpoint B(0.5) lies exactly on the circle
  2. Radial error r(t)/R − 1, maximised by golden section on t from 0 to 0.5: 2.7253 × 10⁻⁴ at t = 0.211
  3. The curve is never inside the circle: the error is 0 at the ends and the middle
  4. On R 40: 2.7253 × 10⁻⁴ × 40 mm = 10.9 µm

Answer: Up to 10.9 µm oversize, just over a 10 µm tolerance; the NURBS form is exact

Chapter 9

Surfaces: ruled, revolved, Bezier patches, Coons patches and point clouds

Which syllabus covers thisAU CME340 Unit IIIVTU not in syllabusSPPU 202042 Unit IIMU MEC404 Module 1KTU not in syllabus

How does a CAD system describe a surface?

As a patch S(u, v): two parameters, each running from 0 to 1, map a unit square onto a curved sheet in space. Holding v fixed and moving u traces an iso-line, and the CAD display draws a grid of them. The partial derivatives Su and Sv are tangent vectors, and their cross product Su × Sv is the surface normal that shading, offsets and tool paths need. The simplest patch is bilinear: four corner points blended. If the corners are not coplanar, the patch twists into a saddle: lifting one corner of a 60 × 60 mm square by 25 mm raises its area from 3,600 mm² to about 3,801 mm².

What are ruled surfaces and surfaces of revolution?

A ruled surface joins two rail curves with straight lines: S(u, v) = (1 − v)·C0(u) + v·C1(u). A cone, a cylinder and a twisted aerofoil-style blend between two edges are ruled, and a wire-EDM or a flank-milling cutter can make one in a single pass because the tool is a straight line. A surface of revolution turns a profile curve about an axis: every point keeps its profile radius. A cone frustum from radius 20 to 12 mm over 40 mm of height has a curved area π(r1 + r2)·slant = 4,101 mm².

How do a bicubic Bezier patch and a Coons patch differ?

A bicubic Bezier patch is a 4 × 4 net of 16 control points blended by cubic Bernstein weights in u and in v. It passes through the four corners, its edges are the Bezier curves of the boundary rows, and the four inner points only shape the inside: in the figure, lifting them to 25 mm gives an area of 3,965 mm² and a highest point of 17.9 mm while the edges stay put. A Coons patch starts from the other end: four boundary curves are given and the inside is filled by two ruled blends minus the bilinear corner patch. B-spline and NURBS surfaces use the same tensor-product idea with local control.

Surfaces: bilinear, ruled, revolved, bicubic Bezier and Coons patches: interactive loads as you scroll

How does reverse engineering turn a scanned part into a CAD model?

A laser or structured-light scanner measures millions of points on the part: a point cloud. The ASTM E57 format (E2807) stores such points with colour or intensity and photos, in binary plus XML; simpler text formats list x y z per line. The cloud is cleaned (noise, outliers, reflective-surface gaps), several scans are registered into one frame, meshed into triangles, then surfaces are fitted and stitched into a closed solid. Two million points as 4-byte floats is 24 MB of coordinates, 48 MB as doubles (illustrative). Holes and thin edges usually need manual surfacing.

Predict, then check

On a bicubic Bezier patch you lift the four inner control points by 10 mm. What happens to the four boundary edges?

Worked examples

Point and normal on a twisted bilinear patch · Corners P00 = (0, 0, 0), P10 = (60, 0, 0), P01 = (0, 60, 0), P11 = (60, 60, 24) mm; find S, the tangents and the unit normal at u = v = 0.5
  1. S = (1 − u)(1 − v)P00 + u(1 − v)P10 + (1 − u)v P01 + uv P11 = average of the four corners = (30, 30, 6) mm
  2. Su = (1 − v)(P10 − P00) + v(P11 − P01) = 0.5(60, 0, 0) + 0.5(60, 0, 24) = (60, 0, 12)
  3. Sv = (1 − u)(P01 − P00) + u(P11 − P10) = (0, 60, 12)
  4. Su × Sv = (−720, −720, 3600), length 3741.23
  5. Unit normal = (−0.192, −0.192, 0.962), tilted 15.8° from vertical

Answer: S(0.5, 0.5) = (30, 30, 6) mm; unit normal (−0.192, −0.192, 0.962)

A cone frustum as a surface of revolution · Profile line from (r, z) = (20, 0) to (12, 40) mm, revolved 360° about the z axis
  1. S(u, v) = (r(u) cos 2πv, r(u) sin 2πv, 40u) with r(u) = 20 − 8u
  2. At u = 0.5, v = 0.25: r = 16 mm, angle 90°, so S = (0, 16, 20) mm
  3. Slant length = √(8² + 40²) = 40.792 mm
  4. |Su × Sv| = 2π r(u) × slant, integrated over u and v: area = π(r1 + r2) × slant = π × 32 × 40.792
  5. A 2D Simpson integral of |Su × Sv| gives the same 4100.9 mm²

Answer: Point (0, 16, 20) mm; curved area 4,101 mm²

Filling a Coons patch from its boundary · Corners P00 = (0, 0, 0), P10 = (50, 0, 0), P01 = (0, 40, 0), P11 = (50, 40, 20) mm with straight edges; then the bottom edge is bulged to z = 32u(1 − u) (8 mm at mid-edge)
  1. S = Lv + Lu − B: Lv blends bottom and top edges in v, Lu blends left and right edges in u, B is the bilinear corner patch
  2. Straight edges at u = v = 0.5: Lv = (25, 20, 5), Lu = (25, 20, 5), B = (25, 20, 5)
  3. S = Lv + Lu − B = (25, 20, 5): with straight edges the Coons patch is the bilinear patch
  4. Bulged bottom: Lv = 0.5(25, 0, 8) + 0.5(25, 40, 10) = (25, 20, 9); Lu and B unchanged
  5. S = (25, 20, 9): the 8 mm edge bulge shows as 4 mm at the centre, and at v = 0 the patch still equals the bulged edge

Answer: Centre point (25, 20, 5) mm with straight edges, (25, 20, 9) mm with the bulged edge

Chapter 10

Solid modelling: wireframe ambiguity, B-rep and the Euler-Poincare formula

Which syllabus covers thisAU CME340 Unit IIIVTU not in syllabusSPPU 202042 Unit IIIMU MEC404 Module 1KTU PEMET523 Module 3

Why is a wireframe model not enough?

A wireframe stores only vertices and edges. The 12 edges of a 50 × 40 × 30 mm box could be a closed box, an open tray or a tube open at both ends, and nothing in the data says which, so the software cannot shade it, remove hidden lines, cut a section or find a volume (60,000 mm³ only if it is the closed box). A surface model adds faces but still does not know which side is material. A solid model is closed and knows inside from outside, so volume, mass and interference follow automatically.

What does a boundary representation (B-rep) store?

Two layers. Geometry: the point, curve and surface equations. Topology: how they connect: vertices bound edges, edges form loops, loops bound faces, faces form a closed shell. A face has one outer loop and may have inner loops (rings), like the top face of a block with a pocket. Loops run anticlockwise seen from outside, so every edge is used exactly twice, once in each direction. That block, 60 × 60 × 30 mm with a 30 × 30 × 15 mm pocket, has 16 vertices, 24 edges, 11 faces and 1 ring. Half-edge or winged-edge structures let the kernel walk from any face to its neighbours.

What does the Euler-Poincare formula check?

For a valid closed solid, V − E + F − H = 2(S − G), with H inner loops (rings), S separate shells and G through holes (genus). A cube gives 8 − 12 + 6 − 0 = 2 = 2(1 − 0). The block with a square through hole gives 16 − 24 + 10 − 2 = 0 = 2(1 − 1). An open tray from the box's 12 edges gives 1, not 2, so it is flagged. The check is necessary, not sufficient: a self-intersecting model can still balance the counts, so kernels also test geometry.

Solid modelling: B-rep counts, the Euler-Poincare formula and Euler operators: interactive loads as you scroll

What are Euler operators?

Small topology edits that keep the formula true at every step. MVFS makes a vertex, face and shell; MEV adds an edge and a vertex; MEF adds an edge that closes a new face; KEMR deletes an edge to leave a ring; KFMRH turns a face into a ring of another face, making a through hole. Each has an inverse (KVFS, KEV ...), which is how undo works. A cube takes 13 operators: MVFS, 7 MEV, 5 MEF. The pocketed block takes 27 and the through-hole block 28.

Predict, then check

A 60 × 60 × 30 mm block has a square hole right through it: V = 16, E = 24, F = 10, and the top and bottom faces each have one ring (H = 2). What is V − E + F − H?

Worked examples

Counting an L-shaped bracket · An L-shaped profile with 6 corners extruded 40 mm into a bracket
  1. Two copies of the profile: V = 2 × 6 = 12
  2. Edges: 6 on each profile plus 6 along the extrusion: E = 3 × 6 = 18
  3. Faces: front and back plus one side face per profile edge: F = 6 + 2 = 8
  4. V − E + F − H = 12 − 18 + 8 − 0 = 2 = 2(1 − 0)

Answer: V = 12, E = 18, F = 8: the formula holds

Finding the genus of a block with two through holes · A block with two separate square holes from the top face to the bottom face
  1. Vertices: 8 on the block + 8 per hole: V = 24
  2. Edges: 12 + 12 per hole: E = 36
  3. Faces: 6 outer + 4 walls per hole: F = 14
  4. Rings: two on the top face, two on the bottom: H = 4; one shell, S = 1
  5. V − E + F − H = 24 − 36 + 14 − 4 = −2 = 2(1 − G), so G = 2

Answer: Genus G = 2: two through holes

Building a triangular prism with Euler operators · A triangular prism: V = 6, E = 9, F = 5
  1. MVFS makes the first vertex, a face and the shell: (V, E, F) = (1, 0, 1), and 1 − 0 + 1 = 2
  2. MEV × 5 grows a tree of 5 edges that reaches all 6 vertices: (6, 5, 1), and 6 − 5 + 1 = 2
  3. Each MEF adds the edge that closes a face: (6, 6, 2), (6, 7, 3), (6, 8, 4), (6, 9, 5)
  4. At every step V − E + F = 2, so the solid is never invalid on the way

Answer: 10 operators: MVFS, 5 MEV, 4 MEF, ending at V = 6, E = 9, F = 5

Chapter 11

CSG, sweeps, cell decomposition and mass properties

Which syllabus covers thisAU CME340 Unit IIIVTU not in syllabusSPPU 202042 Unit IIIMU MEC404 Module 1KTU PEMET523 Module 3

How does constructive solid geometry (CSG) build a part?

It keeps a tree: leaves are primitives (block, cylinder, cone, sphere, torus, wedge), nodes are Boolean operations: union ∪, intersection ∩ and difference −. The operations are regularised: the result is closed up and stray zero-thickness faces or edges are dropped. Order matters for difference: plate − boss and boss − plate are different parts. In the figure, ((plate − hole Ø30) ∪ boss) ∩ chamfer half-plane gives 9321.5 mm². The tree is compact and always valid, but to display or machine it the software still has to evaluate the boundary.

CSG tree, quadtree cell decomposition and mass properties of a plate: interactive loads as you scroll

What is a sweep, and how do CSG and B-rep compare?

A sweep moves a 2D profile along a path: a straight line (extrude), an axis (revolve) or a curve. Extruding the plate profile 10 mm gives 93,215 mm³. CSG stores how the part was made in few bytes and is easy to edit by changing a leaf, but fillets and free-form faces are awkward and every display needs an evaluation. B-rep stores every face explicitly: larger, but fast to draw, and needed for fillets, drafts and NURBS faces. Feature-based CAD keeps both: a history tree like CSG and an evaluated B-rep.

What are cell decomposition and spatial enumeration?

Both describe a solid by cells. Spatial enumeration fills space with equal voxels and marks each full or empty: a 120 × 80 × 10 mm plate at 0.5 mm needs 768,000 voxels. A quadtree (octree in 3D) splits only where needed: cells fully inside or outside stay large, and only cells on the boundary are split again. At depth 5 (5 mm cells) the figure's area is off by −0.23 %; at depth 8 (0.625 mm) by 0.11 %. Each extra level roughly doubles the boundary cells. Finite-element meshing and 3D-printing slicers use the same idea.

How does a CAD system find mass properties?

It integrates over the solid: volume, mass = density × volume, centroid, and moments of inertia. For a part made of simple pieces, the composite rules below do it by hand: subtract holes as negative areas and move each piece's inertia to the common axis with the parallel-axis term A·d². The figure's plate has its centroid at (67.66, 39.28) mm. As 10 mm steel at an illustrative 7,850 kg/m³ it weighs 0.732 kg. For revolved parts, Pappus's theorem gives volume = 2π × centroid radius × section area.

Predict, then check

You raise the quadtree depth by one, so the cells are half the size. Roughly what happens to the number of boundary cells?

Worked examples

Area, centroid and Ixx of the CSG plate · Plate 120 × 80 mm minus a Ø30 hole at (35, 40), plus the outer half of a Ø40 boss centred at (120, 40), minus a 20 × 20 mm corner triangle at the top-left
  1. Plate: A = 9,600, x̄ = 60, ȳ = 40, own Ixx = 120 × 80³/12 = 5,120,000 mm⁴
  2. Hole: A = −π × 15² = −706.86, at (35, 40), own Ixx = −π × 15⁴/4 = −39,761
  3. Half boss: A = π × 20²/2 = 628.32, x̄ = 120 + 4 × 20/(3π) = 128.488, own Ixx = π × 20⁴/8 = 62,832
  4. Triangle: A = −200, centroid (6.667, 73.333), own Ixx = −20 × 20³/36 = −4444.4
  5. ΣA = 9321.46 mm², x̄ = ΣAx/ΣA = 67.657 mm, ȳ = 39.285 mm
  6. Ixx = Σ(own Ixx + A(ȳi − ȳ)²) = 4,911,636 mm⁴

Answer: A = 9321.46 mm², centroid (67.66, 39.28) mm, Ixx = 491.2 cm⁴

Mass properties of a revolved flange ring · A steel ring, inner radius 15 mm, outer radius 40 mm, thickness 12 mm (a rectangle revolved about the axis); density 7,850 kg/m³ (illustrative)
  1. Section area A = (40 − 15) × 12 = 300 mm², centroid radius = (40 + 15)/2 = 27.5 mm
  2. Pappus: V = 2π × 27.5 × 300 = 51,836 mm³ (check: π(40² − 15²) × 12 gives the same)
  3. Mass = 51,836 mm³ × 7.85e-6 kg/mm³ = 0.4069 kg
  4. Inertia about the axis: J = m(Ro² + Ri²)/2 = 0.4069 × (1600 + 225)/2 = 371.3 kg·mm²
  5. A Simpson integral of r² dm over the ring agrees

Answer: V = 51,836 mm³, m = 0.407 kg, J = 371 kg·mm²

Boolean results of a plate and a boss · A = plate 120 × 80 mm (9,600 mm²), B = Ø40 disc centred on the plate's right edge, so half of B lies inside A
  1. |B| = π × 20² = 1256.64 mm², |A ∩ B| = half of B = 628.32 mm²
  2. |A ∪ B| = |A| + |B| − |A ∩ B| = 9,600 + 1256.64 − 628.32 = 10228.32 mm²
  3. |A − B| = |A| − |A ∩ B| = 8971.68 mm² (a notch)
  4. |B − A| = |B| − |A ∩ B| = 628.32 mm² (a half disc lug standing alone)
  5. A 200,000-point Monte Carlo of A − B gives 8972 mm²

Answer: A ∪ B = 10228.3, A ∩ B = 628.3, A − B = 8971.7, B − A = 628.3 mm²

Chapter 12

Feature-based models, assemblies, tolerance stack-up and CAD data exchange

Which syllabus covers thisAU CME340 Unit IVVTU not in syllabusSPPU 202042 Units III, V, VI; 402048 Unit 2MU MEC404 Module 1KTU PEMET523 Module 1

What are parametric, feature-based and constraint-based models?

The part is stored as a history tree of features (extrude, hole, fillet, pattern), each driven by dimensions (parameters) and by sketches held with constraints. A rectangle sketch has 4 corner points, 8 degrees of freedom in 2D; two horizontal and two vertical constraints, a width, a height and a fixed corner remove all 8, so it is fully defined. Change a dimension and the tree replays. The catch: a feature that refers to a face of an earlier one can fail when that face disappears, so model with stable references such as datum planes.

How are assemblies built and checked?

Bottom-up: parts are modelled separately and then placed with mates. Top-down: a layout or skeleton in the assembly drives the part geometry, so a change flows down. A free part has 6 degrees of freedom; a concentric mate of a bearing on a shaft leaves 2 (slide and spin), and seating it against the shoulder removes the slide. Then the software checks clearance (minimum distance between parts) and interference (overlapping volume, shown in red) across the whole assembly, and an exploded view and bill of materials come from the same data.

How do tolerances add up in an assembly?

A gap that depends on several dimensions collects all their variation. Worst case adds the tolerances: in the figure, four parts and the span at ±0.05 mm each give ±0.25 mm, so a 0.10 mm nominal gap could close to −0.15 mm. Statistically, independent centred errors add as a root sum of squares: ±0.112 mm for ±3σ when each process has Cp = 1. The normal model then predicts 0.36 % of assemblies with interference, and the Monte Carlo agrees. RSS assumes centred, independent, normal processes; if not, use worst case or simulate.

Tolerance stack-up: worst case, RSS and Monte Carlo of an assembly gap: interactive loads as you scroll

How is CAD data exchanged between systems?

Within one kernel, natively: Parasolid (Siemens; .x_t) runs inside NX, SolidWorks and Solid Edge, and ACIS (Spatial, part of Dassault Systèmes; .sat) in others. Between kernels, through a neutral format: IGES (first published 1980, last version 5.3 in 1996, 80-column ASCII records) or STEP, ISO 10303, whose AP242 (2014, edition 2 in 2020) replaced AP203 and AP214. DXF serves 2D drawings; STL is in the Additive Manufacturing book. With 5 systems, direct translators number N(N − 1) = 20; through one neutral format, 2N = 10.

What are PMI, model-based definition and CAD APIs?

Product and manufacturing information (PMI) is the dimensions, GD&T, surface finish and notes attached to the 3D faces themselves. In model-based definition (MBD) the annotated 3D model, not a 2D drawing, is the master that CAM, inspection (CMM programs) and suppliers read; STEP AP242 can carry this information. CAD APIs (VBA, C#, Python or C++ interfaces) let a script drive the modeller: build fifty spacer variants from a table, rename features or export a batch to STEP overnight.

Predict, then check

Five parts, each ±0.1 mm, stack into one gap. Each process is centred and normal with Cp = 1. What is the gap's statistical (RSS) tolerance?

Worked examples

Worst case and RSS on a gearbox shaft · Span between shoulders 64.30 ± 0.05 mm; on it a bearing 16.00 ± 0.06, a spacer 10.00 ± 0.04, a gear hub 22.00 ± 0.05 and a bearing 16.00 ± 0.06 mm
  1. Nominal gap = 64.30 − (16 + 10 + 22 + 16) = 0.3 mm
  2. Worst case: ±(0.05 + 0.06 + 0.04 + 0.05 + 0.06) = ±0.26 mm, so the gap lies between 0.04 and 0.56 mm
  3. RSS: ±√(0.05² + 0.06² + 0.04² + 0.05² + 0.06²) = ±√0.0138 = ±0.1175 mm
  4. Statistical range: 0.183 to 0.417 mm

Answer: Gap 0.3 ± 0.26 mm worst case, ± 0.117 mm RSS

How often does the gap close? · The same stack with the span shortened so the nominal gap is 0.10 mm; centred normal processes with Cp = 1, then Cp = 1.33
  1. Cp = 1: each σ = t/3, so σgap = 0.1175/3 = 0.03916 mm
  2. z = 0.10/0.03916 = 2.554; P(gap < 0) = Φ(−2.554) = 0.533 %
  3. A 200,000-assembly Monte Carlo gives 0.537 %
  4. Cp = 1.33: σgap = 0.02944 mm, z = 3.397, P = 0.0341 %
  5. With the original 0.30 mm gap, z = 7.66 at Cp = 1: practically never

Answer: 0.53 % of assemblies at Cp = 1, 0.034 % at Cp = 1.33

Counting translators in a supply chain · An OEM and four suppliers use five different CAD systems; later a sixth joins
  1. Direct: each system needs a translator to each other one: N(N − 1) = 5 × 4 = 20
  2. Neutral format: each system needs one pre-processor (write) and one post-processor (read): 2N = 10
  3. A sixth system: direct 30 (+10), neutral 12 (+2)

Answer: 20 direct vs 10 via STEP; with six systems 30 vs 12

Chapter 13

NC, CNC and DNC: axes, open and closed loop, resolution

Which syllabus covers thisAU CME340 Unit VVTU BME504LSPPU 402048 Unit 3MU MEC404 Module 4KTU PCMET502 Module 1

What is the difference between NC, CNC and DNC?

An NC machine of the 1950s read its program from punched tape one block at a time and executed it with hard-wired logic: to change a dimension you punched a new tape. A CNC has a computer inside the control, so the program is stored, edited at the machine and run again, and the control adds tool offsets, cutter compensation, canned cycles and diagnostics. DNC links many machines to one computer: originally direct control, today distributed, sending programs over the shop network and collecting run data back. Writing basic G-code by hand is covered in the Machining Science, Machine Tools and Metrology book; this chapter is about how the axes move.

How are a CNC machine's axes and zero points named?

Axes follow the right-hand rule with Z along the spindle and positive Z moving the tool away from the work. On a vertical mill X is the long table travel and Y the cross travel; on a lathe Z runs along the spindle axis and X is radial, programmed as a diameter. Machine zero is fixed by the home switches; the work zero (a G54 offset) is where the programmer puts X0 Y0 Z0 on the part. Absolute G90 coordinates are measured from work zero; incremental G91 moves from the last point. Point-to-point machines (drilling) only need the end position, contouring machines need every axis coordinated along the way; 4- and 5-axis machines add one or two rotary axes.

What sets the smallest step a CNC axis can make?

The basic length unit (BLU) is how far the table moves for one counted pulse: the screw lead divided by the counts per screw turn. An illustrative 10 mm lead ball screw driven directly by a 200-step stepper moves 50 µm per step. A servo with a 2,500-line encoder counts every edge of its two channels, 10,000 counts per turn, so the BLU is 1 µm. Finer BLU costs pulse rate: at 1,000 mm/min the encoder produces 16.67 kHz, and a 24 m/min rapid would need 400 kHz. A control that handles 100 kHz could only reach 6 m/min.

CNC resolution: stepper and servo drives, BLU and pulse frequency: interactive loads as you scroll

What does a closed loop buy over an open loop?

An open-loop stepper axis simply counts the pulses it sent. If a heavy cut stalls the motor for a few steps, the control never knows and every later dimension is wrong. A closed loop measures where the axis really is and drives the error to zero. A rotary encoder on the motor (semi-closed loop) sees the motor turn but not ball-screw pitch error or backlash; a linear scale on the table (fully closed) does. The encoder's A and B channels are a quarter period apart, so the control counts four edges per line (27.78 counts per degree for 2,500 lines) and knows the direction from which channel leads. Resolvers and tachogenerators are older feedback devices.

Predict, then check

A servo axis with a 10 mm lead screw and a 2,500-line encoder has a BLU of 1 µm. You fit a 5 mm lead screw instead and keep the motor and encoder. What happens at the same feed of 1,000 mm/min?

Worked examples

A stepper-driven router axis · Ball screw lead 5 mm, belt reduction 2:1 (motor turns twice per screw turn), 200-step motor, full steps, feed 600 mm/min, drive limit 20 kHz (illustrative)
  1. Table travel per motor turn = 5/2 = 2.5 mm; BLU = 2.5/200 = 0.0125 mm = 12.5 µm
  2. Pulse rate at 600 mm/min = 600/60/0.0125 = 800 pulses/s
  3. Motor speed = 600/2.5 = 240 rev/min
  4. Fastest feed at 20 kHz = 20,000 × 0.0125 × 60 = 15,000 mm/min (in practice stepper torque falls well before this)
  5. Check by counting: 37.5 mm of travel = 37.5/0.0125 = 3,000 pulses

Answer: BLU 12.5 µm, 800 pulses/s at 600 mm/min, 240 rev/min

Can the servo axis reach its rapid? · Lead 16 mm, direct drive, 1,024-line encoder counted ×4, required rapid 24 m/min, the control's counter accepts 100 kHz (illustrative)
  1. Counts per screw turn = 4 × 1,024 = 4,096; BLU = 16/4,096 = 3.90625 µm
  2. Count rate at 24,000 mm/min = 24,000/60/0.00390625 = 1,02,400 counts/s
  3. That is 102.4 kHz, above the 100 kHz limit
  4. Fastest feed the counter can follow = 100,000 × 0.00390625 × 60 = 23,438 mm/min

Answer: No: the rapid needs 102.4 kHz; with this encoder the axis tops out at 23,438 mm/min (a coarser encoder or a faster counter fixes it)

Four holes in absolute and incremental · Holes at (20, 15), (60, 15), (60, 45), (20, 45) mm from the work zero, drilled in that order from X0 Y0, BLU 1 µm
  1. G90 (absolute): X20. Y15. / X60. / Y45. / X20. (each block is the hole position itself)
  2. G91 (incremental): X20. Y15. / X40. / Y30. / X-40. (each block is the step from the last hole)
  3. Encoder counts per move (X + Y): 35,000, 40,000, 30,000, 40,000
  4. A typo of X4. instead of X40. in G91 shifts every later hole: the last one lands at (−16, 45) instead of (20, 45). In G90 the same typo spoils one hole only

Answer: Same holes, different words: G90 blocks carry positions, G91 blocks carry steps; absolute programs do not carry an error forward

Chapter 14

Interpolators: how a CNC moves in a straight line and an arc

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 302045-B Unit 6MU not in syllabusKTU PCMET502 Module 1

Why does a CNC need an interpolator?

To cut a straight line from (0, 0) to (30, 40) mm at F500, both axes must start together, run at 300 and 400 mm/min (the ratio 3:4) and stop together; for an arc the ratio changes all the time. The interpolator turns each programmed block into a stream of coordinated small steps for every axis. Point-to-point machines such as a drilling machine only need the end position, so they can move each axis on its own. Contouring machines, lathes and mills, cannot: any mismatch between axes leaves a visible error on the part.

How does a DDA step along a straight line?

A digital differential analyser keeps one n-bit accumulator per axis. On every clock it adds the axis's target (in BLU) to its accumulator; when the sum passes 2^n, it sends one pulse to that axis and keeps the remainder. After exactly 2^n clocks each axis has received its target number of pulses, spread as evenly as whole numbers allow. With 6-bit registers and a target of 23 by 15 BLU, 64 clocks deliver 23 and 15 pulses and the staircase never strays more than 0.765 BLU from the true line; preloading the accumulators with half of 2^n brings that to 0.619. Every block takes 2^n clocks however long it is.

DDA interpolator: how a CNC steps along a line and an arc: interactive loads as you scroll

How does a DDA cut a circle?

For an arc the registers hold the current x and y instead of fixed targets, and they cross-feed: the y accumulator adds x, the x accumulator adds y, because a circle moves dx = −y·dθ, dy = x·dθ. Each clock turns the point by 2^−n radian. This is an explicit Euler step, which spirals outward a little. A quarter circle of radius 20 BLU with 6-bit registers takes 101 clocks, strays up to 1.21 BLU from the true radius and ends at (0, 21) instead of (0, 20). The Euler drift is only 0.25 BLU of that: rounding to whole BLU dominates, so 10-bit registers still give 1.21 BLU. Helical moves add a linear Z channel.

What is the difference between reference-pulse and sampled-data interpolation?

A reference-pulse interpolator (DDA, search-step) emits one pulse per BLU and suits stepper drives, but its pulse rate limits the feed. Most modern servo controls use sampled-data interpolation: every sampling period T the control computes the next position increment, F·T long, along the line or arc, and the position loops of the axes follow those points. An arc is then cut as short chords, and each chord sits inside the arc by R(1 − cos(Δ/2R)) for a chord of length Δ: the error grows with the square of the feed. Parabolic and spline interpolation fit smooth curves through CAM points with fewer blocks.

Predict, then check

A linear DDA with 8-bit registers is told to move X = 200, Y = 50 BLU. How many clock pulses does the move take?

Worked examples

A 4-bit DDA by hand · Target X = 5, Y = 3 BLU, 4-bit accumulators (2^4 = 16) starting at 0
  1. Each clock: X accumulator += 5, Y accumulator += 3; an overflow past 16 sends one pulse and subtracts 16
  2. X pulses come at clocks 4, 7, 10, 13, 16
  3. Y pulses come at clocks 6, 11, 16
  4. After 16 clocks: 5 X pulses and 3 Y pulses, the end point exactly
  5. The visited points stay within 0.686 BLU of the true line (closed form x_k = floor(5k/16), y_k = floor(3k/16))

Answer: 16 clocks; X steps at 4, 7, 10, 13, 16, Y at 6, 11, 16

Why a DDA needs a feed-rate number · 10-bit DDA clocked at 50 kHz, BLU 1 µm; block A moves X 300, Y 400 BLU, block B moves X 30, Y 40 BLU
  1. Every block takes 2^10 = 1,024 clocks = 1,024/50,000 = 20.48 ms
  2. Block A is 0.5 mm long: feed = 0.5/0.02048 s × 60 = 1,465 mm/min
  3. Block B is 0.05 mm long but takes the same time: 146.5 mm/min
  4. To run B at A's feed the clock must rise tenfold, to 5,00,000 Hz: the control scales the clock by a feed-rate number

Answer: 1,465 mm/min for A but only 146.5 mm/min for B at the same clock

Chord error of a sampled-data control · Arc of radius 10 mm cut at F3,000 mm/min, interpolation period 2 ms (illustrative)
  1. Step per sample Δ = 3,000/60 × 0.002 = 0.1 mm
  2. Chord error = R(1 − cos(Δ/2R)) = 10 × (1 − cos 0.005) = 0.125 µm
  3. Check: R minus the distance from the centre to the chord's midpoint gives the same value
  4. At F6,000 the step doubles and the error grows 4-fold to 0.5 µm

Answer: 0.125 µm at F3,000; four times more at twice the feed

Chapter 15

CNC turning programs: G71/G70 roughing and finishing, grooving and G76 threading

Which syllabus covers thisAU CME340 Unit VVTU BME504L Expts 1, 2, 5SPPU 302045-B Unit 6; 402048 Unit 3MU MEC404 Module 4KTU PCMET502 Module 1

What does a CNC turning program set up before it cuts?

A lathe program calls a tool and its offset (T101: tool 1, offset 1), clamps the spindle (G50 S2500) and switches on constant surface speed (G96 S180: 180 m/min). The control then sets the spindle to 1000·Vc/(π·d) at the tool's current diameter: 1,146 rev/min at Ø50, 1,910 at Ø30. Below Ø22.9 the G50 clamp holds it at 2,500. Feeds are per revolution (G99), so F0.25 is 0.25 mm per turn. X words are diameters and Z0 is the finished right-hand face. The programs in this chapter follow Haas's documented format; the shaft and every cutting value are illustrative.

How does G71 rough a stepped shaft from bar?

G71 P10 Q19 U0.4 W0.1 D2. F0.25 tells the control: the finished shape is blocks N10 to N19; leave 0.4 mm on diameter and 0.1 mm on faces; cut 2 mm deep per pass (a radius value). From Ø50 bar the shaft takes 8 passes, each stopping short of the shape, retracting at 45° and rapiding back. The tool then follows the offset shape once to clean up the steps: 85.8 cm³ of steel in about 65 s at Vc 180 m/min. This Type I cycle needs a profile whose X never reverses. Fanuc-style controls write G71 as two blocks (depth and retract in the first), so check your control's manual.

CNC turning program: G71 roughing passes, G70 finish, grooving and G76 threading: interactive loads as you scroll

Why finish with G70, and why is the groove a separate cycle?

G70 P10 Q19 runs the same ten blocks again, this time with the feed written inside them (F0.1 in N11), usually with a sharper finishing tool. In the example it travels 92.1 mm of profile in about 31 s. The thread run-out groove cannot sit inside a Type I G71 profile because X would have to go down and up again, so a 3 mm grooving tool plunges it with G75 X16.5 I1. F0.05: pecks of 1 mm, each followed by a short back-off to break the chip.

How does G76 cut a thread in many passes?

An M20 × 2.5 thread is too deep to cut in one pass. G76 X16.934 Z-22. K1.533 D0.4 F2.5 gives the root diameter, thread length, thread height K, first-pass depth D and lead. Haas makes the total depth after pass N equal to D·√N, so each pass removes about the same area of chip. That gives (K/D)², rounded up, = 15 passes here, the cuts shrinking from 0.4 mm to 0.054 mm. The basic ISO profile is only 0.541P = 1.353 mm deep. Like Haas's own 3/4-16 example, we use K = 0.613P because the external root is rounded below the basic minor diameter. Threading runs at fixed rpm (G97) so every pass lands in the same groove.

Predict, then check

The M20 × 2.5 thread (K = 1.533 mm) takes 15 G76 passes with a first-pass depth D = 0.4 mm. You halve D to 0.2 mm. How many passes now?

Worked examples

Spindle speed under G96 with a G50 clamp · G50 S2500, G96 S180 (Vc = 180 m/min), turning down from Ø50 to Ø20
  1. n = 1000 × 180/(π × 50) = 1,146 rev/min
  2. Ø40: 1,432 rev/min; Ø30: 1,910 rev/min
  3. Ø20 would need 2,865 rev/min, so the clamp holds 2,500
  4. The clamp takes over below d = 1000 × 180/(π × 2,500) = 22.92 mm

Answer: 1,146 → 1,432 → 1,910 rev/min, then 2,500 (clamped) below Ø22.9

G71 pass plan for the shaft · Start point X50. Z2., G71 P10 Q19 U0.4 W0.1 D2. F0.25, G96 S180, Ø50 bar, rapid 24 m/min, 45° retract 0.5 mm (Setting 73, illustrative)
  1. Floor: the P block's X18 → radius 9, plus U/2 = 0.2: radius 9.2 mm
  2. Pass radii from 25 in steps of 2: 23, 21, 19, 17, 15, 13, 11, 9.2 (8 passes; the last one is clamped to the floor)
  3. Pass ends: at r 23 the offset Ø40 face, Z-74.9; at r 17 the offset R3 fillet, Z-44.65; at r 13, Z-24.9
  4. Feed path 422.1 mm (passes + clean-up), rapids 428.3 mm
  5. Time = feed 64.1 s + rapids 1.1 s = 65.1 s
  6. Removed: 85.79 cm³ (the passes alone 77.82 cm³, the clean-up the rest), about 0.67 kg of steel chips

Answer: 8 passes, about 65 s, 85.8 cm³ removed

G76 for M20 × 2.5 · Thread on the Ø20 end from Z5 (two pitches run-in) to Z-22 into the groove, G97 S2500, D0.4, K = 0.613P, Setting 99 = 0.01 mm
  1. K = 0.613 × 2.5 = 1.5325, written K1.533; root X = 20 − 2 × 1.533 = 16.934
  2. Passes = ceil((K/D)²) = ceil(14.69) = 15
  3. Depths D·√N: 0.4, 0.566, 0.693, 0.8 ... 1.497, then 1.533 (= K)
  4. Cuts: first 0.4 mm, second 0.166, the last full step 0.054
  5. Each pass feeds 27 mm at 2.5 mm/rev and 2,500 rev/min: 0.259 s
  6. Total: 3.89 s cutting + 1.28 s rapids = 5.2 s

Answer: G76 X16.934 Z-22. K1.533 D0.4 F2.5: 15 passes, about 5.2 s

Chapter 16

CNC milling programs: arcs, cutter radius compensation, tool length, drilling cycles

Which syllabus covers thisAU CME340 Unit VVTU BME504L Expts 1, 3, 4SPPU 302045-B Unit 6; 402048 Unit 3MU MEC404 Module 4KTU PCMET502 Module 1

How is an arc programmed with I J or with R?

G02 cuts clockwise and G03 counter-clockwise, seen from above the XY plane. The block gives the end point and the centre: either I and J, the centre minus the start point, or R, the radius. Two circles of radius R pass through any two points closer than 2R. Haas, like most controls, takes a positive R for the arc of 180° or less and a negative R for the longer one. For a 20 mm chord and R12 the two centres sit 6.633 mm either side of the chord, giving arcs of 112.9° and 247.1°. A full circle cannot be written with R; use I J.

What does cutter radius compensation do, and when does it gouge?

With G41 (cutter left of the direction of travel) or G42 (right) the program describes the part itself. The control keeps the tool centre one radius R away, reading the cutter diameter from the D register, so one program cuts true size with any cutter. Straight edges shift by R, convex arcs grow to r + R, and sharp outside corners get an arc of radius R. A concave fillet rc shrinks to rc − R; if the cutter is bigger than the fillet, that radius goes negative, the path folds back and the cutter gouges the part (or the control alarms). With a Ø12 cutter (R6) the example profile's tool path is 312.5 mm long.

Cutter radius compensation G41/G42, arc centres and gouging: interactive loads as you scroll

What do G43 and the drilling canned cycles do?

Every tool sticks out of the spindle by a different length. G43 H01 adds the length stored in offset 1, so Z0 means the top of the part for every tool. Drilling cycles pack a whole hole into one block: G81 feeds to depth and rapids out. G83 pecks: it feeds Q deeper, rapids back to the R plane to clear chips, rapids down to just above the last bottom and feeds on. A 30 mm deep Ø8 hole with Q6 takes 5 pecks. The cycle repeats at every X Y position that follows until G80 cancels it.

How do subprograms and loops shorten a milling program?

A subprogram is a separate program that ends with M99. M98 P1001 L5 runs program 1001 five times, and if its moves are incremental (G91) each run starts where the last one ended, so one slot written once becomes a row of five slots at a 15 mm pitch. Pockets are usually cut in a fixed order: plunge or ramp inside, clear the floor with zig-zag or spiral passes leaving a little stock, then take a finishing pass round the walls with G41 climb milling. Clearing strategies and scallop height are in the CAM chapter that follows.

Predict, then check

A pocket's corners have R5 fillets. You finish the walls with a Ø12 end mill under G41. What happens at the corners?

Worked examples

The two centres of an R arc · G03 from X40. Y10. to X20. Y10., R12. or R-12.
  1. Chord = 20 mm; the centres lie on its bisector X30 at a distance √(12² − 10²) = 6.6332 mm
  2. Candidates (30, 3.3668) and (30, 16.6332), both 12 mm from each end point
  3. R12. (≤ 180°) takes the centre (30, 3.3668): a 112.89° arc, 23.64 mm long; as I J: I-10 J-6.6332
  4. R-12. takes (30, 16.6332): the 247.11° arc, 51.76 mm long

Answer: G03 X20. Y10. I-10. J-6.633 = G03 X20. Y10. R12.; R-12. cuts the long way round

Compensated profile: path length, speed and time · The interactive's profile (80 × 50, R10 outside corners, 24 mm notch with R6 fillets), Ø12 4-flute cutter under G41, Vc 150 m/min, fz 0.08 mm (illustrative)
  1. Straight offsets keep their lengths: 45 + 60 + 40 + 28 + 8 + 12 + 8 + 33 = 234 mm (with 5 mm run-on and run-off)
  2. Convex R10 corners become R16 quarter arcs: 2 × 16 × π/2 = 50.27 mm; the R6 notch fillets become R0 (6 − 6)
  3. Three sharp outside corners add quarter arcs of R6: 3 × 6 × π/2 = 28.27 mm
  4. Path = 312.54 mm; S = 1000 × 150/(π × 12) = 3,979 rev/min, F = 0.08 × 4 × 3,979 = 1,273 mm/min
  5. Cutting time = 312.54/1,273 = 14.7 s
  6. A Ø16 cutter would need the R6 fillets to become R-2: it gouges

Answer: 312.5 mm of tool path, about 15 s; anything over Ø12 gouges the R6 fillets

Peck drilling a deep hole with G83 · Ø8 drill, Vc 25 m/min, f 0.12 mm/rev, hole 30 mm deep, R plane 2 mm above, Q6., 0.5 mm re-approach gap (Setting 22, illustrative), rapid 24 m/min
  1. n = 1000 × 25/(π × 8) = 995 rev/min; feed = 0.12 × 994.7 = 119.4 mm/min
  2. Pecks = 30/6 = 5; the tool feeds 32 mm from the R plane plus 4 × 0.5 mm of re-approach = 34 mm
  3. Rapids out to R and back down: 166 mm
  4. Time = 34/119.37 min + 166/24,000 min = 17.5 s
  5. A single G81 plunge would take 16.2 s but packs the flutes with chips in a hole almost 4 diameters deep

Answer: G83 Z-30. R2. Q6. F119.: 5 pecks, about 18 s per hole

Chapter 17

CAM: tool paths, scallop height, pocketing, APT and post-processors

Which syllabus covers thisAU CME340 Unit VVTU BME504L Expts 2-4SPPU 402048 Unit 2MU MEC404 Module 4KTU PCMET502 Module 1

What does a CAM system produce, and what is a post-processor?

CAM turns the CAD model, the stock, the tools and the cutting data into tool positions: cutter-location (CL) data, a list of tool-centre or tool-tip points with the tool axis, feeds and speeds, written for no particular machine. A post-processor then translates the CL data into the G-code dialect of one machine and controller: its axes and limits, the arc format, canned cycles, tool changes and M-codes. One CAM job can be posted to a Haas, a Fanuc or a Siemens control. The manual G-code basics are in the Machining Science book.

What was APT, and what does an APT program look like?

APT (Automatically Programmed Tools) is the classic part-programming language, started in 1956 at MIT's Servomechanisms Laboratory under Douglas T. Ross. You define geometry by name, then drive the tool along it, and the processor writes a CL file for a post-processor. Five original lines for a plate edge: CUTTER/10 (a Ø10 tool); FROM/SP (start point); GO/TO,L1 (approach line L1); TLLFT,GOLFT/L1,PAST,L2 (keep the tool on the left of L1, turn left along it, stop past L2); GOFWD/L2,PAST,L3 (carry on along L2). TLLFT is the idea behind G41.

How far apart can the passes of a ball-nose cutter be?

Each pass of a ball-nose cutter leaves a round groove, and neighbouring grooves meet at a cusp: the scallop. On a flat face its height is h = R − √(R² − s²/4), close to s²/8R. A Ø10 ball (R = 5 mm) at a 1.5 mm stepover leaves 56.6 µm. On a convex R40 face the cusp grows to 63.8 µm; in a concave R40 fillet it shrinks to 49.4 µm. Halving the stepover cuts the scallop to about a quarter, but doubles the passes and the time.

CAM tool paths: scallop height, stepover and pocketing strategies: interactive loads as you scroll

Why does CAM machine a part in roughing, re-roughing and finishing steps?

Roughing clears most of the metal fast with a big flat end mill and leaves an even stock, say 0.5 mm. Re-roughing sends a smaller tool only where the big one could not reach, such as tight corners. Semi-finishing evens out the steps left behind, so the finishing tool cuts a constant thin layer and holds its size. Pockets are cleared zig-zag (rasters) or contour-parallel (offsets of the wall). Offsets of a rectangle leave uncut islands at the corners when the step exceeds 1.707 R.

How is a CAM program checked and its cycle time estimated?

Before a program reaches the machine, CAM simulates material removal to catch gouges, uncut stock, holder collisions and rapid moves into the part. Machine simulation of the posted G-code also checks travel limits and fixtures. The cycle time adds cutting time (each path length divided by its feed), rapids at the machine's rapid rate, tool changes and load/unload. A setup sheet goes with the program: the work zero, clamping, tool list with lengths and offsets, and the estimated time.

Predict, then check

A Ø10 ball-nose at a 1.5 mm stepover leaves a 56.6 µm scallop on a flat face. You halve the stepover to 0.75 mm. What scallop do you get?

Worked examples

Stepover for a 10 µm scallop · Ø10 ball-nose (R = 5 mm), target scallop 0.010 mm, on a flat face, a convex R40 face and a concave R40 fillet; patch 80 mm wide; 4 flutes, Vc 150 m/min, fz 0.08 mm
  1. Flat: s = 2√(2Rh − h²) = 2√(2 × 5 × 0.01 − 0.0001) = 0.6321 mm
  2. Convex R40: solve the exact cusp formula for s (bisection): s = 0.5959 mm (s²/8 × (1/R + 1/Rs) gives the same to 3 figures)
  3. Concave R40: s = 0.6759 mm, the fillet hugs the ball so wider steps are allowed
  4. Flat patch: passes = ⌈80/0.632⌉ + 1 = 128, path = 128 × 80 + 80 = 10,320 mm
  5. Feed: N = 1000 × 150/(π × 10) = 4,775 rev/min, F = 4 × 0.08 × 4,775 = 1,528 mm/min, time = 10,320/1,528 = 6.75 min

Answer: s = 0.632 mm flat, 0.596 mm convex, 0.676 mm concave; 128 passes and about 6.8 min for the flat patch

Zig-zag or contour-parallel pocket · Pocket 80 × 48 mm, Ø12 flat end mill (R = 6), stepover 7.2 mm (60 %), Vc 150 m/min, 4 flutes, fz 0.08 mm
  1. Tool-centre rectangle: (80 − 12) × (48 − 12) = 68 × 36 mm
  2. Zig-zag: ⌈36/7.2⌉ + 1 = 6 rasters of 68 mm, 36 mm of steps, then one finishing loop 2(68 + 36) = 208 mm: 652 mm
  3. Contour-parallel: ⌈(24 − 6)/7.2⌉ = 3 loops at an even step of 6 mm: 208 + 160 + 112 = 480 mm, links 3 × 6√2 = 25.46 mm, centre line 80 − 48 = 32 mm: 537.5 mm
  4. Corners: step/R = 1 < 1.707, so no islands
  5. Feed F = 4 × 0.08 × 1000 × 150/(π × 12) = 1273.2 mm/min: zig-zag 0.512 min, contour 0.422 min

Answer: Contour-parallel is 115 mm shorter (25 s against 31 s) and keeps one cutting direction; zig-zag alternates climb and conventional cuts

Cycle-time estimate for a setup sheet · Bracket (illustrative): T1 Ø12 end mill cuts the pocket above plus a 100 × 60 outside profile at 1,273 mm/min; T2 Ø8 drill, 4 holes × 20 mm, Vc 80 m/min, 0.15 mm/rev; T3 chamfer 320 mm at 1,000 mm/min; 2.4 m of rapids at 24 m/min; 3 tool changes of 6 s; load/unload 45 s
  1. T1: 537.5 + 320 = 857.5 mm / 1273.2 = 0.673 min
  2. T2: N = 1000 × 80/(π × 8) = 3,183 rev/min, F = 0.15 × 3,183 = 477.5 mm/min, 80 mm of drilling = 0.168 min
  3. T3: 320/1000 = 0.32 min; cutting total 1.161 min
  4. Rapids 2400/24000 = 0.1 min, tool changes 3 × 0.1 = 0.3 min, load/unload 0.75 min
  5. Total = 1.161 + 0.1 + 0.3 + 0.75 = 2.31 min

Answer: About 2.31 min per part, so at most 415 parts in a 2-shift day before allowances

Chapter 18

CIM and production models: rate, lead time, capacity, utilisation

Which syllabus covers thisAU ME3792 Unit IVTU not in syllabusSPPU 402048 Unit 1MU not in syllabusKTU not in syllabus

What is computer integrated manufacturing, and what does the CIM wheel show?

CIM links design, planning, production control and the shop floor through computers that share one set of data, so a design change flows to the CAM program, the process plan, the schedule and the inspection plan without retyping. The CIM wheel published by CASA/SME in the 1980s draws this: an integrated systems architecture with a common database at the hub, engineering design, manufacturing planning, production control and factory automation around it, and business management on the outer ring. CIM hardware spans CAD workstations, CNC machines, robots, AGVs, PLCs, sensors and networks; the software spans CAD/CAM, CAPP, MRP/ERP and MES.

How do job, batch and mass production differ?

They differ in variety and quantity. A job shop makes one-off or tiny batches of many different parts on general-purpose machines with skilled operators: tool rooms, prototypes, machine builders. A batch shop makes medium lots that repeat, such as 200 flanges, then changes over to the next part. Mass production makes one design in huge numbers on dedicated machines or flow lines. In the illustrative job-shop preset a single part spends only 5.9 % of its lead time being machined; most of the rest is waiting.

How long does a batch take to get through the plant?

At each of its n_o operations a batch waits for setup Tsu, is run Q × Tc, then spends Tno in non-operation time: moving, queueing, inspection. Its manufacturing lead time is the formula below. A batch of 200 through 6 operations with Tsu 90 min, Tc 2.5 min and Tno 480 min takes 6,420 min (107 h). One part is cut for only 6 × 2.5 = 15 min of that, 0.23 %. Cutting Tno, not Tc, is what shortens lead time.

Production models: production rate, manufacturing lead time, capacity and WIP: interactive loads as you scroll

How are production rate, capacity, utilisation and WIP linked?

Per machine, the time per part including its share of setup is Tp = (Tsu + Q·Tc)/Q, and the rate is Rp = 60/Tp parts per hour: 20.34 for the batch above. With 20 machines working 2 shifts × 8 h × 6 days, plant capacity is PC = n·Sw·Hsh·Rp/n_o = 6,508 parts a week. A demand of 4,800 gives utilisation U = 73.8 %. With availability A = 0.95, Groover's WIP = A·U·PC·MLT/(Sw·Hsh) = 5,083 parts sit in the plant: Little's law, rate × time.

Which kind of automation suits which production, and how do you introduce it?

Fixed automation (transfer lines, dedicated assembly machines) has the lowest cost per part but cannot change product: it suits mass production. Programmable automation (CNC machines, robots, PLC-controlled cells) is reprogrammed between batches, with setup time lost at each changeover: batch production. Flexible automation (FMS) changes part type with almost no setup: a mix of medium-volume parts. A common three-step rule for bringing it in is understand the existing process, simplify it, then automate it, so you do not automate waste. Automation economics are in the Robotics book.

Predict, then check

The flange batch (6 operations, Tsu 90 min, Tc 2.5 min, Tno 480 min) is doubled from 100 to 200 parts. What happens to the manufacturing lead time?

Worked examples

Lead time of a flange batch · Illustrative Pune plant: batch Q = 200, n_o = 6 operations, setup Tsu = 90 min, operation time Tc = 2.5 min, non-operation time Tno = 480 min per operation
  1. Per operation: Tsu + Q·Tc + Tno = 90 + 200 × 2.5 + 480 = 1,070 min
  2. MLT = 6 × 1,070 = 6,420 min = 107 h (a part-by-part walk of the batch gives the same)
  3. Tp = (90 + 500)/200 = 2.95 min, so Rp = 60/2.95 = 20.34 parts/h per machine
  4. One part is machined 6 × 2.5 = 15 min: 0.234 % of MLT

Answer: MLT = 107 h, Rp = 20.3 parts/h; the part is being cut only 0.23 % of the time

Capacity, utilisation and WIP · The same parts on n = 20 machines, Sw = 12 shifts/week (2 × 6 days), Hsh = 8 h, availability A = 0.95, demand 4,800 parts/week
  1. PC = n·Sw·Hsh·Rp/n_o = 20 × 12 × 8 × 20.339/6 = 6,508 parts/week
  2. U = 4,800/6,508 = 73.8 %
  3. Throughput while working = A·U·PC/(Sw·Hsh) = 0.95 × 4,800/96 = 47.5 parts/h
  4. WIP = 47.5 × 107 h = 5,083 parts (Little's law)

Answer: Capacity 6,508 parts/week, U = 74 %, about 5,083 parts in process

Availability of a machining line · A vertical machining centre fails on average every MTBF = 60 h (failure to failure) and takes MTTR = 3 h to repair; five such machines in series, any failure stops the line (illustrative)
  1. A = (MTBF − MTTR)/MTBF = (60 − 3)/60 = 0.95
  2. Of 96 scheduled hours a week the machine is up 91.2 h
  3. Five in series, independent: A_line = 0.95⁵ = 0.774
  4. A seeded up/down simulation (up ~ exp(57 h), down ~ exp(3 h)) gives 0.95

Answer: A = 0.95 per machine, but only 0.77 for the rigid line of five

Chapter 19

Automated transfer lines, buffers and automated assembly

Which syllabus covers thisAU ME3792 Unit IIVTU not in syllabusSPPU not in syllabusMU not in syllabusKTU not in syllabus

How does a transfer line move parts from station to station?

A transfer line is a row of automatic workstations linked by a transfer system that moves every part one station on at the same instant, then all stations work for one cycle. Linear lines use a walking beam, a powered roller conveyor or a chain; dial machines index a rotary table. A Geneva mechanism makes the indexing: a 6-slot wheel turns 60° per driver revolution and moves during only (6 − 2)/(2 × 6) = 0.333 of that turn, so the rest is dwell time for the stations to work. Cams and servo indexers do the same job with smoother motion.

Why does a long transfer line rarely run at its ideal rate?

Every station can jam or break, and on a rigid line any stop stops all stations. If each of n stations fails with probability p per cycle, the line stops F = n·p times per cycle on average, and each stop costs a downtime Td. Twenty stations at p = 0.01 with Tc = 1 min and Td = 5 min give F = 0.2 and E = 1/(1 + 0.2 × 5) = 0.5: the line is down half the time. Adding stations makes E worse, which is why long lines are split.

Automated transfer line: breakdowns, line efficiency and buffer storage: interactive loads as you scroll

What does a storage buffer between two halves of a line buy you?

A buffer of b parts lets one stage keep working while the other is down, until it fills or empties. With no buffer, the 20-station line above runs at E0 = 0.5; with an infinite buffer each 10-station half runs on its own and the line runs at the worse half, E∞ = 0.667. A real buffer lands in between and needs to hold a few downtimes' worth of parts, b of several times Td/Tc, to matter. Groover's approximation for two equal stages is close but a little pessimistic against simulation.

How are parts fed and assembled automatically?

Automated assembly systems are in-line, dial (rotary indexing), carousel or single-station machines with a robot. Each station needs a parts delivery system: a hopper holds parts in bulk, a vibratory bowl or other feeder moves them out, a selector or orientor rejects wrongly oriented parts, a feed track carries them, and an escapement places one at a time. Design for automated assembly helps: fewer parts, parts that are symmetric or clearly asymmetric, that do not tangle, and that are inserted from the top and locate themselves.

How many good assemblies does an automated assembly machine make?

Each station adds a component that is defective with probability q. A defect either jams the station (probability m: the line stops for Td, the bad part is cleared and the assembly stays good) or slips through into the assembly. The share of good assemblies is Pap = Π(1 − q + m·q), and the line stops F = Σ m·q times per cycle. Six stations with q of 1-2 % give 96.5 % good assemblies, and every jam costs time, so better parts help twice.

Predict, then check

A 10-station transfer line runs at efficiency E = 0.8. You add 10 more stations with the same breakdown probability and downtime. What efficiency do you expect?

Worked examples

Efficiency and cost of an 18-station line · Illustrative Chennai machining line: n = 18 stations, p = 0.006 per station per cycle, Tc = 0.8 min, Td = 6 min, line cost ₹40/min
  1. F = n·p = 18 × 0.006 = 0.108 stops per cycle
  2. Tp = Tc + F·Td = 0.8 + 0.108 × 6 = 1.448 min
  3. E = 0.8/1.448 = 0.5525; Rp = 60/1.448 = 41.4 parts/h against an ideal 75
  4. Lower bound on stops (several failures in one stop): F = 1 − (1 − 0.006)¹⁸ = 0.1027, E = 0.565
  5. Cost per piece = 40 × 1.448 = ₹57.92 (₹32 at the ideal rate)

Answer: E = 0.552, about 41 parts/h, ₹57.9 per piece

A buffer in the middle of the line · The same 18 stations split 9 + 9 with a buffer of b = 16 parts; Tc = 0.8 min, Td = 6.4 min (8 cycles), p = 0.006
  1. No buffer: E0 = 0.8/(0.8 + 0.108 × 6.4) = 0.5365
  2. Infinite buffer: each half has F = 0.054, E∞ = 0.8/(0.8 + 0.054 × 6.4) = 0.6983
  3. Groover, equal stages: b = B·(Td/Tc) + L = 2 × 8 + 0, h(b) = B/(B + 1) = 0.6667; D1' = 0.054 × 6.4/(0.8 + 0.108 × 6.4) = 0.2318
  4. E_b = E0 + D1'·h·E2 = 0.5365 + 0.2318 × 0.6667 × 0.6983 = 0.6444
  5. A tick-by-tick Monte Carlo of 400,000 cycles gives E_b ≈ 0.646

Answer: The buffer lifts E from 0.536 to about 0.65 (simulated; Groover's estimate 0.644), against a ceiling of 0.698

Good assemblies from a 6-station machine · Illustrative dial machine: stations 1-4 add parts with q = 0.01 and jam probability m = 0.6; stations 5-6 have q = 0.02 and m = 0.5; Tc = 0.1 min, Td = 1.5 min
  1. Per station good-or-cleared share: 1 − 0.01 + 0.006 = 0.996 (×4), 1 − 0.02 + 0.01 = 0.99 (×2)
  2. Pap = 0.996⁴ × 0.99² = 0.9645 (a 200,000-assembly Monte Carlo gives 0.9654)
  3. F = Σ m·q = 4 × 0.006 + 2 × 0.01 = 0.044 jams per cycle; Tp = 0.1 + 0.044 × 1.5 = 0.166 min
  4. Rp = 60/0.166 = 361.4 per h, E = 0.602; good assemblies = 0.9645 × 361.4 = 348.6 per h

Answer: 96.45 % good, 349 good assemblies per hour against an ideal 600

Chapter 20

Material handling and storage: conveyors, AGVs, AS/RS and carousels

Which syllabus covers thisAU ME3792 Unit IIVTU BME504L Expt 11SPPU 402048 Unit 5MU not in syllabusKTU not in syllabus

What should a material handling system be designed around?

Moving parts adds cost and no value, so the aim is fewer, shorter, safer moves. The Material Handling Industry of America lists ten principles: planning, standardization, work (cut distance and handling steps), ergonomics, unit load (move many items as one pallet or tote), space utilization, system (handling, storage and production planned together), automation, environment, and life cycle cost. In an illustrative Pune plant this means a pallet sized for the machine's fixture, one standard tote across lines, and the store placed next to the line that draws from it most.

When is a conveyor right, and when an AGV?

A conveyor suits a fixed path with steady, high volume: roller and belt conveyors on the floor, chain and overhead trolley conveyors that carry hooks through paint shops, in-floor towline carts. An automated guided vehicle (AGV) suits changing routes and lower volume: tow, unit-load and pallet-truck types, guided by buried wire, magnetic tape or laser and natural-feature navigation. Fleet size comes from the delivery cycle: with a 180 m trip at 45 m/min and 1.6 min of handling, one vehicle makes 5.31 deliveries per hour at a 0.85 traffic factor.

How long does an AS/RS crane take per storage or retrieval?

The storage/retrieval (S/R) machine moves along the aisle and lifts at the same time, so a trip takes the longer of the two times. The textbook relation below assumes the average trip is to the rack's centre. For a 72 m x 18 m rack at 150 and 40 m/min with 0.3 min pick-and-deposit it gives 1.08 min. Averaging over truly random locations gives 1.221 min, 13 % longer, because the longer of two random times averages more than the longer of their averages. Size aisles on the exact figure.

AS/RS cycle times, throughput and AGV fleet sizing: interactive loads as you scroll

Dedicated or randomised storage, and where do carousels fit?

Dedicated storage gives each item fixed slots sized for its own maximum stock. Randomised storage puts a load in any empty slot, so it needs room only for the peak of the total. Four illustrative items, each received in lots of 100 a quarter-cycle apart, need 400 slots dedicated but only 250 randomised. Dedicated storage can put fast movers near the pick-and-deposit station. A carousel brings bins to the picker instead: on a 30 m loop at 25 m/min that turns the shorter way, a pick averages 0.55 min.

Predict, then check

An AS/RS rack is square in time: 0.5 min to the far end and 0.5 min to the top, no pick-and-deposit time. The textbook relation gives a single command cycle of 0.5 min. What is the true mean for random locations?

Worked examples

Cycle times and aisles for a unit-load AS/RS · Rack 72 m long, 18 m high; vx = 150 m/min, vy = 40 m/min; Tpd = 0.3 min; the plant needs 240 storages + retrievals per hour, all as dual commands
  1. L/vx = 0.48 min, H/vy = 0.45 min: horizontal travel governs
  2. Textbook: Tcs = 0.48 + 2(0.3) = 1.08 min; Tcd = 1.5 × 0.48 + 4(0.3) = 1.92 min
  3. Exact mean for random slots (b = 0.45/0.48 = 0.9375): Tcs = 0.48(1 + b²/3) + 0.6 = 1.221 min; Tcd = 0.48(40 + 15b² − b³)/30 + 1.2 = 2.038 min
  4. Per aisle: 2 × 60/1.92 = 62.5 transactions/h (textbook) or 2 × 60/2.038 = 58.9 (exact)
  5. Aisles for 240/h: 240/62.5 = 3.84 → 4; 240/58.9 = 4.08 → 5

Answer: Tcs = 1.08 min and Tcd = 1.92 min by the textbook relation, 1.22 and 2.04 min exactly; 5 aisles, not 4

AGV fleet for an engine-line feeder · Illustrative Chennai plant: 42 deliveries per hour, loaded trip 180 m and the same empty return, speed 45 m/min, load + unload 1.6 min, traffic factor 0.85, availability 0.95
  1. Delivery cycle Tc = 1.6 + 180/45 + 180/45 = 9.6 min
  2. Useful minutes per vehicle-hour = 60 × 0.85 = 51; deliveries per vehicle = 51/9.6 = 5.312 per hour
  3. Vehicles nc = 42/5.312 = 7.906 → 8
  4. With 95 % availability: 48.45 useful min, 5.047 deliveries per vehicle, nc = 8.322 → 9

Answer: 8 vehicles at full availability; 9 once breakdowns and charging take 5 %

Picking from a horizontal carousel · Loop length 30 m, carousel speed 25 m/min, pick time 0.25 min per item, bins in random positions
  1. Turning the shorter way, the bin is on average a quarter of the loop away: 30/4 = 7.5 m
  2. Cycle = 7.5/25 + 0.25 = 0.55 min → 109.1 picks per hour
  3. A carousel that turns one way only averages half the loop: 15/25 + 0.25 = 0.85 min → 70.6 picks per hour

Answer: 0.55 min per pick (109 per hour) bidirectional, 0.85 min one-way

Chapter 21

Group technology: part families, Opitz coding, rank order clustering, Hollier

Which syllabus covers thisAU ME3792 Unit IIIVTU not in syllabusSPPU 402048 Unit 5MU not in syllabusKTU not in syllabus

What is a part family, and how do you find one?

Group technology (GT) groups parts that are alike in shape or in how they are made, so one set of machines, fixtures and set-ups serves the whole family. Three ways to find families: visual inspection of drawings (quick, subjective), classification and coding (each part gets a code from its design and manufacturing attributes, so similar codes sort together), and production flow analysis (PFA), which ignores shape and groups parts that visit the same machines, read from route sheets. PFA's machine-part matrix is the input to rank order clustering.

How does the Opitz code describe a turned part?

Opitz's system gives a five-digit form code for design attributes, then four supplementary digits for manufacturing attributes. For rotational parts: digit 1 is the class from length over diameter (0 for L/D ≤ 0.5, 1 for between 0.5 and 3, 2 for 3 or more); digit 2 the external shape (smooth, stepped to one or both ends, threads, grooves, cones); digit 3 the internal shape; digit 4 plane-surface machining such as flats, slots and splines; digit 5 auxiliary holes and gear teeth. An illustrative 240 mm pump shaft, 40 mm across with a keyway and a circlip groove, codes 26030.

How does rank order clustering turn a machine-part matrix into cells?

Read each machine's row as a binary number, leftmost part the highest bit, and sort the rows by that weight, largest first. Then read each column top to bottom as a binary number and sort the columns. Repeat until nothing moves. Machines and parts that share routes drift together into blocks along the diagonal. A 1 left outside every block is an exceptional element: a part that must leave its cell. A 0 inside a block is a void. Grouping efficacy scores the result: 1 for perfect cells.

Rank order clustering of a machine-part matrix into cells: interactive loads as you scroll

What are the composite part, the key machine and the Hollier method?

A composite part is an imaginary part carrying every feature of its family, so a cell designed to make it can make every member. The key machine is the costly one the cell is built around, worth keeping busy; other machines may idle more. Inside a cell, the Hollier method orders machines from a from-to chart of parts per day so most moves go forward to the next machine. Method 1 puts the machine receiving least at the front and the machine sending least at the back, then repeats on the rest.

Predict, then check

A bush is 160 mm long and 64 mm in diameter. What is the first digit of its Opitz form code?

Worked examples

Rank order clustering by hand · Machines A-D, parts 1-6 (a 1 means the part visits the machine). A: 1 0 0 1 0 1; B: 0 1 1 0 1 0; C: 1 0 0 1 0 0; D: 0 1 0 0 1 0
  1. Row weights with column weights 32, 16, 8, 4, 2, 1: A = 37, B = 26, C = 36, D = 18
  2. Sort rows: A, C, B, D
  3. Column weights with row weights 8, 4, 2, 1 for A, C, B, D: parts 1-6 = 12, 3, 2, 12, 3, 8
  4. Sort columns (ties keep their order): 1, 4, 6, 2, 5, 3
  5. Second pass: row weights 56, 48, 7, 6 are already in order and the columns do not move: converged
  6. Cells: {A, C} x {1, 4, 6} and {B, D} x {2, 5, 3}; no exceptional element; voids at C-6 and D-3

Answer: Two cells; grouping efficacy = (10 − 0)/(10 + 2) = 0.833

Opitz form codes for two pump parts · Illustrative Coimbatore pump maker. Shaft: 240 mm long, largest diameter 40 mm, stepped towards both ends, a circlip groove, a keyway, no bore. Flange: 30 mm thick, 80 mm diameter, a plain through bore, a step on one face, four bolt holes on a pitch circle
  1. Shaft: L/D = 240/40 = 6 ≥ 3 → digit 1 = 2
  2. Stepped to both ends with a functional groove → digit 2 = 6; no hole → digit 3 = 0
  3. Keyway = external groove and/or slot → digit 4 = 3; no auxiliary holes or teeth → digit 5 = 0
  4. Flange: L/D = 30/80 = 0.375 ≤ 0.5 → digit 1 = 0; stepped to one end, no shape elements → digit 2 = 1
  5. Through bore, smooth → digit 3 = 1; no plane surface machining → digit 4 = 0; axial holes on a pitch circle → digit 5 = 2

Answer: Shaft 26030, flange 01102: different families despite sharing an assembly

Ordering a cell with Hollier method 1 · From-to chart, parts per day, illustrative Peenya shop. Lathe → drill 15, lathe → mill 40, lathe → grinder 10; drill → mill 5, drill → grinder 35; saw → lathe 60, saw → mill 20; mill → lathe 10, mill → drill 50
  1. From sums: lathe 65, drill 40, saw 80, mill 60, grinder 0. To sums: lathe 70, drill 65, saw 0, mill 65, grinder 45
  2. Minimum To sum (saw, 0) and minimum From sum (grinder, 0) tie: saw goes first, grinder last
  3. Drop both and recompute: From lathe 55, drill 5, mill 60; To lathe 10, drill 65, mill 45
  4. The smallest sum is now the drill's From sum (5): it sends least, so it goes to the back, just before the grinder. Left: lathe and mill, From lathe 40, mill 10, To lathe 10, mill 40; the lathe receives least → front, the mill next
  5. Sequence saw → lathe → mill → drill → grinder. Of 245 moves a day: 185 to the next machine, 45 bypassing, 15 backtracking
  6. Checking all 120 orderings: none has less than 15 backtracking

Answer: Saw, lathe, mill, drill, grinder: 75.5 % in sequence, 6.1 % backtracking

Chapter 22

Flexible manufacturing systems: layouts, the bottleneck model and sizing

Which syllabus covers thisAU ME3792 Unit IIIVTU BME504L Expt 11SPPU 402048 Unit 5MU not in syllabusKTU not in syllabus

What makes a manufacturing system flexible?

A flexible manufacturing system (FMS) is a group of CNC machines, usually machining centres, joined by automated handling and run by a central computer. Parts ride on pallets: an operator fixtures them at a load/unload station, AGVs or rail carts take them to whichever machine is free, and a CMM may inspect them. The computer stores part programs and sends them to machines, routes and schedules pallets, watches tool life and reports production. Flexible means a mix of parts in any order without stopping to reset, within a planned family.

How are FMS machines laid out?

In-line: machines along a straight transfer system, simple but backtracking is awkward. Loop: a closed loop with secondary spurs at each machine, so parts can go to any station in any order. Ladder: a loop with rungs, giving shorter paths between machines. Open field: several loops and ladders for a large system. Robot-centred cell: one robot serving two or three machines around it. The layout fixes how far pallets travel, and so the transport workload in the bottleneck model.

Which station limits an FMS?

Average each station's work per part over the mix and routes: the workload WL. Divide by its number of servers s; the largest WL/s is the bottleneck, and the plant cannot beat Rp* below however many pallets it holds. In the book's illustrative cell (60 % pump housings, 40 % brackets) the two mills carry 22.4 min per part, so Rp* = 2/22.4 = 5.36 parts per hour. Every other station then runs below full utilisation: the drill at 59 %.

FMS bottleneck model and the extended (closed network) model: interactive loads as you scroll

What changes when there are only a few pallets?

With N pallets, the extended model treats the FMS as a closed network: a finished part frees its pallet for a new one. If N is small, machines starve. Mean Value Analysis, the method behind Solberg's CAN-Q, solves this network exactly for exponential times: here 4.05 parts/h with 4 pallets. Pallets beyond N* = Rp*·ΣWL = 4.58 mostly wait in queues. Little's law ties it together: N = Rp × manufacturing lead time, 59.3 min at 4 pallets.

Predict, then check

The cell runs at 5.36 parts/h with two mills as the bottleneck. You buy a third mill. What is the new upper limit?

Worked examples

Bottleneck model of a four-machine cell · Illustrative mix 60 % pump housing A, 40 % motor bracket B. A: load 3 min, mill 28, drill 10, CMM 8 (half the parts), unload 2. B: load 3, drill 18, mill 14, unload 2. Servers: L/U 2, mill 2, drill 2, CMM 1, AGVs 2 at 2.5 min per move
  1. WL(L/U) = 5 min; WL(mill) = 0.6(28) + 0.4(14) = 22.4; WL(drill) = 0.6(10) + 0.4(18) = 13.2; WL(CMM) = 0.6(0.5)(8) = 2.4
  2. Moves per part n_t = Σ f·p − 1 = 0.6(4.5) + 0.4(4) − 1 = 3.3; WL(AGV) = 3.3 × 2.5 = 8.25 min
  3. WL/s: L/U 2.5, mill 11.2, drill 6.6, CMM 2.4, AGV 4.125: the mill is the bottleneck
  4. Rp* = 2/22.4 = 0.0893 per min = 5.36 per hour: 3.21 A and 2.14 B
  5. Utilisation = (WL/s)·Rp*: L/U 22.3 %, drill 58.9 %, CMM 21.4 %, AGV 36.8 %

Answer: Mill-limited at 5.36 parts per hour

The extended model with few pallets · Same cell, N pallets, exponential times; total work content ΣWL = 51.25 min
  1. N* = Rp*·ΣWL = 0.0893 × 51.25 = 4.58 pallets
  2. MVA, N = 1: no queues, Rp = 1/51.25 per min = 1.171 per hour
  3. N = 2: only the single CMM can be busy when a pallet arrives; it holds 0.0468 pallets on average at N = 1, so its residence time is 2.4(1 + 0.0468) = 2.512 min
  4. Rp(2) = 2/(48.85 + 2.512) = 2.336 per hour
  5. Carrying on to N = 4: Rp = 4.049 per hour (the bound N/ΣWL would say 4.68); lead time = N/Rp = 59.3 min
  6. At N = 10: 5.29 per hour, within 1.2 % of Rp*

Answer: Rp = 4.05 parts/h and MLT = 59.3 min with 4 pallets; about 10 pallets to get near the 5.36 limit

Sizing the cell for 9 parts per hour · Same mix and times; target 9 parts per hour = 0.15 per min
  1. Busy servers needed = WL × 0.15: L/U 0.75, mill 3.36, drill 1.98, CMM 0.36, AGV 1.238
  2. Round up: L/U 1, mills 4, drills 2, CMM 1, AGVs 2
  3. Utilisations: L/U 75 %, mill 84 %, drill 99 %, CMM 36 %, AGV 61.9 %
  4. The drills are now the near-bottleneck at 99 %: any upset there costs output, so a third drill or a shorter drill time buys margin; the pallet count must also rise so the 8 workstations are not starved

Answer: 4 mills, 2 drills, 1 L/U station, 1 CMM, 2 AGVs

Chapter 23

Petri nets and deadlocks in automated manufacturing

Which syllabus covers thisAU ME3792 Unit IIVTU not in syllabusSPPU not in syllabusMU not in syllabusKTU not in syllabus

What is a Petri net?

A Petri net models events competing for resources. Places (circles) hold tokens: a part waiting, a robot free. Transitions (bars) are events: robot picks up, machine starts. Arcs join places to transitions and back. The marking, the token count in every place, is the state. A transition is enabled when each input place holds enough tokens; firing it removes those tokens and adds tokens to its output places. Writing the net as an incidence matrix C turns any firing count σ into the state equation below.

How do you find out whether a cell can lock up?

Start from the initial marking and fire every enabled transition, then every transition enabled after that, recording each new marking: the reachability graph. A marking with no enabled transition is dead. In the book's cell, job 1 takes the robot then the machine and job 2 takes them in the opposite order; the net has 6 reachable markings and 1 dead one: each job holding one resource and waiting for the other. Exploring the graph scales badly, so large cells need structural tests.

Petri net of a robot-machine cell: firing, reachability and deadlock: interactive loads as you scroll

What does a P-invariant prove?

A P-invariant is a weighting y of places with y·C = 0: firing any transition leaves the weighted token sum unchanged. For the robot, the places 'R free', 'job 1 holds R', 'job 1 holds R and M' and 'job 2 holds M and R' always add up to exactly 1, so the robot can never be in two places at once. Invariants prove such properties for every reachable marking without listing the markings, which is how they scale to large nets.

How do automated cells deal with deadlock?

Deadlock needs four conditions together: exclusive resources, holding one while waiting for another, no forced release, and a circular wait. Prevention breaks a condition by design, for example every job takes resources in the same order. Avoidance checks each request at run time and refuses one that could lead to a dead state; a control place (a monitor) with one token does this here by letting only one job into the take-both stretch. Detection and recovery let deadlock happen, spot it, then clear it by moving a part to a buffer.

Predict, then check

In the uncontrolled cell, both jobs are idle and both resources free. Which firing sequence locks it up?

Worked examples

Firing a sequence and the state equation · Uncontrolled net, places in order (J1 idle, J1 has R, J1 has R+M, J2 idle, J2 has M, J2 has M+R, R free, M free), M0 = (1 0 0 1 0 0 1 1)
  1. t1 enabled (J1 idle and R free): M1 = (0 1 0 1 0 0 0 1)
  2. t2 enabled (J1 has R, M free): M2 = (0 0 1 1 0 0 0 0)
  3. t3 releases both: M3 = (1 0 0 1 0 0 1 1), back to M0
  4. t4 (J2 idle, M free): M4 = (1 0 0 0 1 0 1 0)
  5. State equation with σ = (1 1 1 1 0 0): M0 + C·σ adds the columns of t1 to t4 of C and gives the same (1 0 0 0 1 0 1 0)

Answer: M = (1 0 0 0 1 0 1 0): job 2 holds the machine, the robot is free

Finding the deadlock · Same net, all 6 reachable markings listed by depth-first search
  1. From M0 fire t1 then t4: J1 holds R, J2 holds M, R free = 0, M free = 0
  2. t2 needs M free (0), t5 needs R free (0), t3 and t6 need a job holding both (0): nothing is enabled
  3. The search finds 6 markings and exactly 1 dead one, this one
  4. Robot invariant: R free + J1 has R + J1 has R+M + J2 has M+R = 0 + 1 + 0 + 0 = 1, as in every reachable marking

Answer: Dead marking (0 1 0 0 1 0 0 0): a circular wait

A control place removes the deadlock · Add place C with 1 token; t1 and t4 take its token, t3 and t6 give it back
  1. New P-invariant: C + J1 has R + J1 has R+M + J2 has M + J2 has M+R = 1 (check: each transition moves one token in and out of this set)
  2. The deadlock marking has J1 has R = 1 and J2 has M = 1, a sum of 2: it violates the invariant, so it cannot be reached
  3. Search: 5 reachable markings, 0 dead; every marking leads back to M0
  4. Cost: the two jobs can no longer hold one resource each at the same time, so some overlap is lost

Answer: Deadlock-free: 5 reachable markings, none dead

Chapter 24

Process planning and CAPP: anteriorities, process sheets, variant and generative

Which syllabus covers thisAU ME3792 Unit IVVTU not in syllabusSPPU 302045-B Unit 5; 402048 Unit 4MU not in syllabusKTU not in syllabus

What does a process planner decide?

Process planning turns a drawing into instructions for the shop floor. The planner reads the material, sizes, tolerances and finish, chooses the primary process (bar stock turned, a forging, a casting), then the operations, machines, tools, set-ups and fixtures, the order of operations, cutting speeds and feeds, and the time per part. For a small steel hub turned from a 60 mm bar and given one milled flat, that is 8 operations on 2 machines (a CNC lathe and a vertical machining centre) and 2 set-ups. The inputs are the drawing, the batch size, the machines available and the plant's own cutting data.

How does an anteriority matrix give a valid order of operations?

Write the operations as rows and columns and put a 1 at (i, j) when i must come before j: face before rough turn, centre drill before drill, drill before ream, finish turn before the chamfer. Any operation whose column sums to 0 has nothing before it, so it can go first. Remove those, add up the columns again and repeat. The hub's 8 rules give 5 levels and 30 valid sequences. A rule that closes a loop, such as chamfer before rough turn, leaves 4 operations that never reach a zero sum: the plan is infeasible until a rule is dropped.

Process planning: anteriority matrix and operation sequencing: interactive loads as you scroll

What goes on a process sheet?

A process sheet (route sheet, operation sheet) lists, for every operation in order: the operation number and description, the machine, the work-holding, the cutting tool, spindle speed, feed, depth of cut and the time. Speeds follow from the cutting speed: N = 1000·Vc/(π·D), so 180 m/min on a 60 mm bar is 955 rev/min. Times follow from length over feed rate. The sheet travels with the batch, and in a CIM plant the same data feed the CNC programs, scheduling and costing.

What are variant and generative CAPP?

Variant (retrieval) CAPP stores one standard plan per part family. A new part is coded with the plant's group technology code, the closest family plan is retrieved and the planner edits it. It is quick to build but only as good as the stored plans. Generative CAPP builds the plan from the part's features with decision tables, decision trees or rules: hole with a tight tolerance, then drill and ream. Semi-generative systems mix the two. Compared with manual planning, both give the same answer for the same part every time and keep the logic when an experienced planner retires.

Predict, then check

The hub plan has 8 rules and 30 valid sequences. You add one rule: chamfer before rough turn (the chamfer already needs finish turn, which needs rough turn). What does level-by-level sequencing give?

Worked examples

Level-by-level sequencing of the hub · 8 operations FA, RT, FT, CD, DR, RM, MF, CH; rules FA→RT, FA→CD, RT→FT, CD→DR, DR→RM, FT→MF, RM→MF, FT→CH
  1. Column sums: FA 0, RT 1, FT 1, CD 1, DR 1, RM 1, MF 2, CH 1. Level 1 = {FA}
  2. Remove FA: RT and CD drop to 0. Level 2 = {RT, CD}
  3. Remove them: FT and DR drop to 0. Level 3 = {FT, DR}
  4. Remove them: RM and CH drop to 0 (MF still waits on RM). Level 4 = {RM, CH}; level 5 = {MF}
  5. One valid sequence: FA, RT, CD, FT, DR, RM, CH, MF. Counting every order that obeys all 8 rules gives 30 of the 40,320

Answer: 5 levels; 30 valid sequences, e.g. FA RT CD FT DR RM CH MF

Process sheet lines for rough and finish turning · C45 bar Ø60 mm turned to Ø52 mm over 45 mm; rough to Ø52.5 at Vc 180 m/min, f 0.25 mm/rev, at most 2 mm per side per pass; finish at Vc 180 m/min, f 0.1 mm/rev (illustrative data)
  1. Radial stock for roughing = (60 − 52.5)/2 = 3.75 mm, so 2 passes of 1.875 mm
  2. Pass 1 at Ø60: N = 1000 × 180/(π × 60) = 955 rev/min, time = 45/(0.25 × 955) = 11.31 s
  3. Pass 2 at Ø56.25: N = 1019 rev/min, time = 10.6 s
  4. Finish at Ø52: N = 1102 rev/min, time = 45/(0.1 × 1102) = 24.5 s
  5. Cutting time for the two operations = 46.4 s, before rapid moves and tool changes

Answer: Op 20 rough turn: 2 passes, 955-1019 rev/min; op 30 finish turn 1102 rev/min; 46.4 s of cutting

Retrieving a standard plan in variant CAPP · Plant's own 5-digit part code, weights 5, 4, 3, 2, 1 by digit; family plans F1 plain hub 21100, F2 hub with flat 21310, F3 plain pin 10000; new part 21300 (illustrative scheme)
  1. Weighted distance = Σ weight × |digit difference|
  2. F1: only digit 3 differs (3 vs 1): 3 × 2 = 6
  3. F2: only digit 4 differs (0 vs 1): 2 × 1 = 2
  4. F3: digits 1, 2, 3 differ: 5 × 1 + 4 × 1 + 3 × 3 = 18
  5. Counting equal digits alone would tie F1 and F2 (4 of 5 each): the weights break the tie

Answer: Retrieve F2's plan (distance 2) and edit only the steps tied to the fourth digit

Chapter 25

MRP, capacity planning, MRP II, ERP and shop-floor control

Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 402048 Unit 4MU not in syllabusKTU not in syllabus

Why are components planned differently from finished products?

Demand for a finished pedestal fan is independent: it comes from customers and has to be forecast. Demand for its blades is dependent: 120 fans need exactly 360 blades, so it is calculated from the bill of materials, not forecast. MRP explodes the master production schedule through the BOM level by level. An item used at several levels gets a low-level code equal to its deepest level: screw kits go into the fan (level 1) and into the motor and stand (level 2), so they are planned last, at code 2, once every parent's orders are known.

How does an MRP record turn gross requirements into orders?

For each week, gross requirements are compared with stock on hand plus scheduled receipts; the shortfall is the net requirement. A planned order receipt covers it (lot-for-lot orders exactly the shortfall; a fixed or EOQ lot orders more and carries the rest). The planned order release is the receipt moved back by the lead time, and releases become the children's gross requirements. In the fan plan the motor's 70-unit release in week 1 becomes 70 coils needed in week 1. A release that falls before week 1 is past due: expedite it or move the schedule.

MRP explosion: gross to net requirements and planned order releases: interactive loads as you scroll

How big should each order be?

Lot-for-lot keeps the least stock but orders often. A fixed order quantity suits a container or a furnace load. The economic order quantity balances ordering cost S against holding cost H: Q = √(2DS/H). For blades with an annual demand of 8,970, S = ₹1,200 per order and H = ₹13 per blade per year (illustrative), Q is about 1,287. Bigger lots pull component demand earlier, which can push a child's release into the past. Inventory control tracks the stock that these rules leave behind.

How does MRP check that the plant can make the plan?

MRP assumes infinite capacity, so the plan is checked. Rough-cut capacity planning (RCCP) multiplies the master schedule by hours per product at a few key resources. Capacity requirements planning (CRP) uses the planned and released orders, item by item, to load each work centre week by week. A coil winder with 2 shifts × 8 h × 6 days has 96 h a week; at 0.5 h a coil, the fan plan loads it with 100 h in week 4, 4 h too many. The fix is overtime, an earlier release or a smaller master schedule.

How do MRP II, ERP, MES and shop-floor control fit together?

MRP II (manufacturing resource planning) closes the loop: master scheduling, MRP, capacity planning, purchasing and shop-floor feedback, with the money side (costs, inventory value) attached. ERP extends the same single database to the whole business: sales, finance, HR and the supply chain. Shop-floor control releases orders, dispatches jobs to machines and tracks progress. A manufacturing execution system (MES) does this in real time on the shop floor: it collects machine and quality data and reports actual quantities and times back to ERP.

Predict, then check

Lot-for-lot plan, coil lead time 1 week: the coil record releases 70 coils in week 2 to arrive in week 3. The supplier's lead time becomes 3 weeks. What happens to that order?

Worked examples

MRP record for the motor (lot-for-lot) · Fan MPS: 40 in week 2, 120 in week 4, 150 in week 6, 200 in week 8; fans on hand 50, lead time 1 week; motor: 1 per fan, on hand 40, lead time 2 weeks
  1. Fan record: week 2 uses 40 of the 50, leaving 10; week 4 needs 120 − 10 = 110, released in week 3; then 150 released in week 5 and 200 in week 7
  2. Motor gross requirements = fan releases: 110 in week 3, 150 in week 5, 200 in week 7
  3. Week 3: net = 110 − 40 on hand = 70; receipt 70 in week 3, released in week 1
  4. Week 5: net 150, released in week 3; week 7: net 200, released in week 5
  5. Coil gross requirements = motor releases: 70 in week 1, 150 in week 3, 200 in week 5 (one level down, the same netting repeats)

Answer: Motor releases: 70 in week 1, 150 in week 3, 200 in week 5; ending stock 0

Economic order quantity for blades · 8-week blade requirement 1,380 (3 per fan), so D = 1,380 × 52/8 = 8,970 a year; S = ₹1,200 per order, H = ₹13 per blade per year (illustrative)
  1. Q* = √(2DS/H) = √(2 × 8,970 × 1,200/13) = 1286.9 blades
  2. Annual cost at Q*: ordering D/Q × S = ₹8,365 plus holding Q/2 × H = ₹8,365: equal at the optimum, total ₹16,729
  3. With a fixed lot of 500: ₹21,528 + ₹3,250 = ₹24,778
  4. The 500 lot costs 48.1 % more per year: the cost curve is flat near Q*, but not that flat

Answer: Q* ≈ 1,287 blades, ₹16,729 a year; a 500 lot costs ₹24,778

Capacity check on the coil winder · Coil planned order releases (lot-for-lot): 70 in week 2, 200 in week 4; 0.5 h of winding per coil; one winder, 2 shifts × 8 h × 6 days (illustrative)
  1. Capacity = 2 × 8 × 6 = 96 h per week
  2. Week 2 load = 70 × 0.5 = 35 h (36.5 %)
  3. Week 4 load = 200 × 0.5 = 100 h (104.2 %): 4 h over
  4. Options: 4 h of overtime, release 8 coils in week 3 instead (spare capacity there), or a second winder

Answer: Week 4 is overloaded by 4 h (104.2 % of capacity); the rest of the plan fits

Chapter 26

Computer process control, adaptive control, PLC/SCADA and automatic identification

Which syllabus covers thisAU ME3792 Unit VVTU not in syllabusSPPU 402048 Units 4, 5MU not in syllabusKTU PCMET502 Module 1

What kinds of control does a computer apply to a process?

First write a process model: the inputs you can set (feed, speed, valve opening), the outputs you measure (force, temperature, size) and the disturbances. Feedback control measures the output and corrects the input to hold a set point. Feed-forward acts on a measured disturbance before it shows in the output. Optimal control picks inputs that minimise a cost such as time or cost per part, within limits. Adaptive control goes one step further and changes its own settings as the process changes, for example as the depth of cut or tool wear changes along a job.

How does adaptive control make a CNC cut faster?

A fixed feed must be safe for the deepest cut, so it is slow everywhere else. An adaptive control constraint (ACC) system measures the cutting force and raises the feed until the force reaches a limit. For a Ø16 mm 4-flute cutter, kc = 2,000 N/mm² (illustrative) and a 500 N limit, a slot whose depth steps 1, 4, 2 mm over 200 mm takes 16.1 s at a fixed feed and 10.4 s with an ideal adaptive feed, 35 % less. Adaptive control optimisation (ACO) instead maximises a performance index such as metal removal per unit cost.

Adaptive control of milling feed to hold the cutting force: interactive loads as you scroll

How does a computer talk to a machine?

The computer-process interface converts both ways. An ADC turns a sensor voltage into a number: a 12-bit converter on 0-10 V resolves 2.44 mV, so a 0-2,000 N force sensor reads in steps of 0.49 N. A DAC turns a number into a drive voltage. Contact inputs and outputs carry on/off signals (limit switches, solenoids), pulse counters read encoders, and interrupts let an urgent event (a jam, an emergency stop) break into the program at once rather than wait for the next scan.

Where do PLC, SCADA, DDC and supervisory control fit?

Sequence control steps a machine through on/off states: clamp, then start the spindle, then advance. A PLC does this by scanning ladder logic over and over: read the inputs, solve the rungs, write the outputs (worked through in the Mechatronics book). Direct digital control (DDC) puts the control law itself in the computer, which replaces the analog controllers. Supervisory control sits above: it sends set points to local controllers and optimises the whole line. SCADA gathers data from many PLCs and remote units, shows them to operators, logs alarms and lets them change set points from a control room.

How do bar codes, RFID and vision identify parts automatically?

An EAN-13 bar code carries a 13-digit GS1 number whose last digit is a check digit: multiply the other digits by 3 and 1 alternately from the right, add, and round up to the next multiple of 10. GS1 UK's example 501234567000 gets check digit 3. The check catches every single wrong digit and 80 of the 90 possible swaps of two different adjacent digits. RFID tags are read by radio without line of sight, many at once, and can be rewritten. Machine vision reads codes and also checks the part itself.

Predict, then check

An adaptive feed controller is tuned on a 1 mm deep cut with loop gain G = 0.6 there, and it settles smoothly. The same settings then meet a 4 mm deep cut. What happens?

Worked examples

Fixed feed against an ideal adaptive feed · Ø16 mm, 4 flutes, Vc 150 m/min, F = kc·ap·fz with kc = 2,000 N/mm², force limit 500 N, f_max 0.15 mm/tooth; depth 1 mm for 70 mm, 4 mm for 70 mm, 2 mm for 60 mm (illustrative)
  1. N = 1000 × 150/(π × 16) = 2984 rev/min
  2. Fixed feed for the 4 mm cut: fz = 500/(2000 × 4) = 0.0625 mm/tooth, vf = 746 mm/min; 200 mm takes 16.08 s
  3. Adaptive: 1 mm allows 0.25, clamped to 0.15 mm/tooth (1790 mm/min); 4 mm: 0.0625; 2 mm: 0.125 mm/tooth
  4. Time = 70/1790 + 70/746 + 60/1492 min = 10.39 s
  5. A sampled controller (G = 0.3, Ts = 0.1 s) takes 10.36 s, but meets the 4 mm step at the 1 mm feed: one sample at 1200 N

Answer: 16.1 s fixed, 10.4 s adaptive: 35.4 % saved, with a brief 1200 N spike at the step

Is the sampled force loop stable? · Controller fz(k+1) = fz(k) + G·(F_ref − F(k))/(kc × 1 mm), F = kc·ap·fz, G = 0.3
  1. Error e = F_ref − F; one correction changes F by kc·ap·(G·e/kc) = G·ap·e
  2. So e(k+1) = (1 − G·ap)·e(k): at ap = 1 mm the ratio is 0.7 (smooth decay)
  3. At ap = 4 mm the ratio is −0.2: the error flips sign and shrinks 5 times per sample (a small overshoot)
  4. Stable while |1 − G·ap| < 1, that is 0 < G·ap < 2: G < 0.5 for the 4 mm cut

Answer: Stable at G = 0.3 (ratio −0.2 at 4 mm); unstable above G = 0.5

EAN-13 check digit · GS1 UK's published example 501234567000 (check digit C), and an original number 952641800731 on GS1 Prefix 952, which GS1 reserves for demonstrations and examples
  1. From the right, digits in odd places get weight 3: for 501234567000 they are 0, 0, 6, 4, 2, 0, sum 12, × 3 = 36
  2. The other digits 0, 7, 5, 3, 1, 5 sum to 21; 36 + 21 = 57; next multiple of 10 is 60, so C = 3 (GTIN 5012345670003, as published)
  3. For 952641800731: weighted digits (× 3) sum to 20, × 3 = 60; the rest sum to 26; total 86
  4. C = 4, full number 9526418007314; check: weights 1, 3, 1, 3 ... from the left over all 13 digits give a multiple of 10

Answer: 5012345670003 and 9526418007314

Chapter 27

SPC, automated inspection, Industry 4.0 and the digital twin

Which syllabus covers thisAU ME3792 Units II, VVTU not in syllabusSPPU 402048 Units 4, 6MU MEC404 Module 6KTU not in syllabus

How does an X-bar and R chart tell a real change from noise?

Every so often take a subgroup of n parts in a row, then plot its mean (X-bar) and its range (R). From subgroups taken while the process is steady (the figure uses its first 15), set limits at the grand mean ± A2·R̄ and the range limits at D3·R̄ and D4·R̄; for n = 5, A2 = 0.577 and D4 = 2.115 (NIST/SEMATECH table). A point outside a limit is a signal. A steady process gives a false alarm about once in 370 subgroups; a mean shift of 1σ is caught after 4.5 subgroups on average with n = 5.

X-bar and R control charts: limits, a process shift, Cp and Cpk: interactive loads as you scroll

What do Cp and Cpk measure?

Control limits describe what the process does; specification limits describe what the drawing allows. Capability compares the two. Cp = (USL − LSL)/6σ asks whether the spread fits the tolerance if the process were centred. Cpk = min(USL − μ, μ − LSL)/3σ also charges for being off centre, so Cpk ≤ Cp. σ is estimated as R̄/d2 from the chart (d2 = 2.326 for n = 5). Cpk = 1 puts the nearer limit exactly 3σ from the mean. Never draw specification limits on an X-bar chart: means vary less than single parts.

How is inspection automated in a CIM plant?

Inspection can check 100 % of parts or a sample. Automation makes 100 % checking affordable when a check takes seconds: in-process gauges on a grinder, air gauges at the end of a line, a probe in the CNC spindle. Contact methods include coordinate measuring machines (CMMs), which touch a probe to a part and fit features to the points. Non-contact methods include machine vision, laser scanners and structured light. The measurements feed SPC charts directly, so the chart is updated part by part instead of by hand.

How is overall equipment effectiveness worked out?

OEE multiplies three losses: availability (run time over planned time), performance (ideal cycle time × parts made, over run time) and quality (good parts over parts made). A machine planned for 900 min that stops for 75 min, makes 900 parts at an ideal 0.8 min each and has 873 good gets 91.7 % × 87.3 % × 97 % = 77.6 % (illustrative). The same number is good parts × ideal cycle time over planned time, which is a handy check.

What do Industry 4.0, the digital twin and Industry 5.0 add?

Industry 4.0 joins machines, products and software into cyber-physical systems: sensors and the Industrial Internet of Things stream data, cloud and edge computers analyse it, and decisions flow back to the machines. A digital twin is a live model of a machine, line or product, kept in step with the real one by that data, used to test changes and predict failures. Virtual manufacturing simulates the process before anything is cut. Industry 5.0 puts people, resilience and sustainability back at the centre of the same technology.

Predict, then check

An X-bar chart uses subgroups of n = 5 with 3-sigma limits. The process mean shifts by 1σ. On average, how many subgroups pass before a point falls outside the limits?

Worked examples

X-bar and R limits from five subgroups · Ground shaft Ø25.000 mm, deviations in µm, n = 4: (3, −2, 5, 1), (−4, 0, 2, −1), (6, 2, −3, 4), (0, 5, 1, −2), (2, −1, 3, 7); A2 = 0.729, D3 = 0, D4 = 2.282 (NIST/SEMATECH, n = 4); original data, too few subgroups for real use
  1. Means: 1.75, −0.75, 2.25, 1, 2.75; grand mean = 1.4 µm
  2. Ranges: 7, 6, 9, 7, 8; R̄ = 7.4 µm
  3. X-bar limits = 1.4 ± 0.729 × 7.4 = 1.4 ± 5.395: UCL 6.795, LCL −3.995 µm
  4. R limits: UCL = 2.282 × 7.4 = 16.887 µm, LCL = 0
  5. Every mean and range is inside its limits: no signal

Answer: X-bar chart −3.99 to 6.79 µm about 1.4; R chart 0 to 16.89 µm; in control

Cp and Cpk of the shaft · Same data: grand mean 1.4 µm, R̄ = 7.4 µm, n = 4, d2 = 2.0588 (computed by integrating the range distribution); specification Ø25.000 ± 0.020 mm
  1. Estimated σ = R̄/d2 = 7.4/2.0588 = 3.594 µm
  2. Cp = (20 − (−20))/(6 × 3.594) = 1.855
  3. Cpk = min(20 − 1.4, 1.4 + 20)/(3 × 3.594) = 18.6/10.783 = 1.725
  4. The nearer limit is 5.17 estimated σ away: with a normal process far fewer than 1 part per million (0.1155 ppm) falls outside

Answer: Cp = 1.85, Cpk = 1.72: capable, slightly off centre

OEE for one day on a machining cell · 2 shifts × 8 h with two 30 min breaks; 75 min of breakdowns and changeovers; ideal cycle 0.8 min; 900 parts made, 873 good (illustrative)
  1. Planned time = 960 − 60 = 900 min; run time = 900 − 75 = 825 min
  2. Availability = 825/900 = 91.67 %
  3. Performance = 0.8 × 900/825 = 87.27 %
  4. Quality = 873/900 = 97 %
  5. OEE = 0.9167 × 0.8727 × 0.97 = 77.6 %; check: 873 × 0.8/900 = 77.6 %

Answer: OEE = 77.6 %: running below the ideal speed (performance 87.3 %) is the biggest loss

Keep going

Recommended reading

  • CAD/CAM: Theory and Practice, I. Zeid and R. Sivasubramanian
  • Automation, Production Systems and Computer-Integrated Manufacturing, M. P. Groover
  • CAD/CAM: Principles and Applications, P. N. Rao
  • CAD/CAM/CIM, P. Radhakrishnan, S. Subramanyan and V. Raju
  • Mathematical Elements for Computer Graphics, D. F. Rogers and J. A. Adams
  • The NURBS Book, L. Piegl and W. Tiller
  • CNC Programming Handbook, P. Smid
  • Principles of Computer Integrated Manufacturing, S. Kant Vajpayee

How this book was made

Chapters follow the official syllabi listed above. Every interactive's formulas and every worked-example number were checked by script. Explanations, animations and examples are original to Skill-Lync. Topics informed by MIT OpenCourseWare 2.008 (Design and Manufacturing II), CC BY-NC-SA. All explanations, animations and examples are original to Skill-Lync; MIT does not endorse this page.

From the exam to a core job

Talk to a counsellor.

Ask how design and manufacturing engineers use cad/cam and computer integrated manufacturing on real projects, and what the Post Graduate Program in CAD covers.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.