跳到内容
CADCAMFUN
文档

文档

特征生成器

渐开线齿轮、ISO 公制螺纹、螺旋线和带平面图案的金属板条:通过少量数字即可获得精确的轮廓和啮合。

从英文自动翻译。 查看英文原文

特征生成器

特征生成器将一些工程数字转换为精确的轮廓或啮合:根据模数和齿数计算的渐开线齿轮、根据直径和螺距计算的 ISO 螺纹、根据半径和节距计算的螺旋、根据中心线和厚度计算的弯曲条带。每个都是纯函数 packages/core/src/cad;编辑器、助手和 CAM 模型调用相同的函数,因此三者都会看到相同的部分。

发电机文件主要出口产品
渐开线正齿轮gear.tsgearDimensions、gearOutline、MIN_GEAR_TEETH = 6
ISO 公制螺纹thread.ts (124 行)threadSizes、threadProblem、threadTool、threadGroove
螺旋/线圈helix.ts (41 行)线圈几何、stepsPerTurn、COIL_STEPS_PER_TURN = 32、COIL_MAX_TURNS = 60
钣金sheet-metal.ts (235 行)sheetOutline、developedLength、withHems、flatPatternDrawing、flatPatternDxf

渐开线齿轮

Pitch radius m·z/2, tip radius pitch + m, root radius pitch − 1.25·m, flanks the involute of the base circle r_p·cos α (ISO 53 / DIN 867). The outline is one counter-clockwise ring about the origin with tooth 0 centred on +X. When the teeth would come to a point before the tip circle (few teeth, a large pressure angle), the tip is pulled in by bisection to where the tooth is still 2 % of a pitch wide.

规格沥青根据提示根
m 2, z 18, 20°1816.9142015.5
m 2, z 12, 20°1211.276149.5
m 2, z 18, 25°1816.3142015.5
网格对 m 2:z 18 和 z 12 拖动进行轨道旋转·滚动进行缩放·右键拖动进行平移
Both outlines are gearOutline(…, 4) output, extruded 8 mm with Ø8 and Ø6 bores. Centre distance m(z₁ + z₂)/2 = 30 mm; the 12-tooth gear is turned half a pitch (π/12) so its tooth sits in a gap of the 18-tooth gear.
错误——真实消息
gearOutline({ moduleValue: 2, teeth: 5 })
// RangeError: A gear needs a module > 0 and at least 6 whole teeth
gearOutline({ moduleValue: 2, teeth: 18, pressureAngle: 50 })
// RangeError: The pressure angle must be between 0 and 45 degrees

ISO 公制螺纹

A modelled thread is real helical geometry: a core cylinder at the root united with a ridge swept along a helix with the profile kept radial, clipped to the thread length. External threads have their core at d₃ = d − 1.22687·P and a ridge up to d; internal ones are the tool that cuts a tapped hole, core at D₁ = D − 1.08253·P (the tap drill) and a groove out to D. The flank is cut square to the helix and the axial widths are corrected by the cosine of the helix angle so pitch and crest widths are exact.

线分机。小调d₃分机。高度h₃国际。小调D₁根宽波峰宽度
M6 × 14.77310.61344.91750.83330.125
M8 × 1.256.46640.76686.64681.04170.1563
M10 × 1.58.15970.92018.37621.250.1875
M12 × 1.759.8531.073510.10561.45830.2188

值为 threadSizes(d, P, internal) output. Heights are 0.61343·P (external) and 0.54127·P (internal); the crest is P/8.

M8 × 1.25 外螺纹,5 毫米 拖动进行轨道旋转·滚动进行缩放·右键拖动进行平移
threadTool({ diameter: 8, pitch: 1.25, length: 5, internal: false }): 3 698 triangles. The full 10 mm version is 7 020 triangles, a closed solid of genus 0, V 408.0 mm³, built in 460 ms.
threadProblem — 真实消息
threadProblem({ diameter: 6, pitch: 4, length: 10, internal: false })
// "A pitch of 4 mm is too coarse for a 6 mm thread"       (pitch > d/2)
threadProblem({ diameter: 6, pitch: 0.1, length: 10, internal: false })
// "A thread has at most 58 turns (this one is 100.0 long: 10 mm at a pitch of 0.1 mm)"
threadProblem({ diameter: 6, pitch: 1, length: 10, internal: false })   // undefined: buildable

58 圈限制为 COIL_MAX_TURNS − 2:脊在螺纹前一螺距开始,在螺纹后一螺距结束,因此平端切削符合整个轮廓。

螺旋

coilGeometry 返回围绕 Z 缠绕的线的中心线和第一个轮廓环,对于 sweepSolid。每转的点遵循半径,因此弦保持在真实螺旋线的 0.01 毫米范围内: stepsPerTurn(r) = clamp(⌈π / acos(1 − 0.01/r)⌉, 32, 128).
半径stepsPerTurn
132
550
50128
线圈 r 10,节距 4,5 匝 拖动进行轨道旋转·滚动进行缩放·右键拖动进行平移
coilGeometry({ cx: 0, cy: 0, z0: 0, radius: 10, pitch: 4, turns: 5, wire: 1.5, square: false, left: false }).path: 356 points (5 × 71 + 1), drawn as a toolpath-style polyline.

钣金

钣金轮廓是一条中心线加厚为厚度恒定的条带,材料位于左侧、右侧或两侧,每个角都有内部弯曲半径 r。 developedLength unbends it with a K-factor (default 0.44): each bend contributes (r + K·t)·θ and each straight run loses the setback of its neighbouring bends.

U 型槽:t 2,内部 R3,30 mm 法兰 拖动进行轨道旋转·滚动进行缩放·右键拖动进行平移
sheetOutline([(0,30),(0,0),(40,0),(40,20)], 2, ”left”, 3): an 80-point closed outline, extruded 30 mm along the sketch normal as the history does.
developmentLength(path, 2, 3, "left") — 实际输出
{"straight":70,
 "bends":[{"angle":1.5707963267948966,"allowance":6.094689747964199},
          {"angle":1.5707963267948966,"allowance":6.094689747964199}],
 "length":82.18937949592839}
部分平面跨度,mm
平坦的0 → 25
弯曲 90°25 → 31.095(余量 6.0947)
平坦的31.095 → 61.095
弯曲 90°61.095 → 67.189
平坦的67.189 → 82.189

Check: (3 + 0.44 × 2) × π/2 = 6.0947 per bend, and 70 + 2 × 6.0947 = 82.189 mm.

故障排除

信息使固定
齿轮需要模数 > 0 和至少 6 个全齿使用 z ≥ 6 和整数齿数
压力角必须在 0 和 45 度之间20°为标准; 14.5° 和 25° 是常见的替代方案
P 毫米的螺距对于 D 毫米的螺纹来说太粗节距最多只能是直径的一半
线程最多有 58 圈将螺纹分成较短的特征,或使用较粗的螺距
板材厚度必须为正数(为 0)通过厚度 > 0
对于该厚度,路径太紧:其偏移曲线破裂增加弯曲半径或减少厚度