A bevel gear blank with one tooth space cut by a tooth of its pinion turning in mesh with it, as a gear shaper cuts, but on shafts that meet: a 30-tooth gear and a 15-tooth pinion, module 2 at the outer end, the shafts square.
This is the first of five cases that cut a gear with its mate in one way while the shafts move apart, from bevel to worm: this one, the hypoid, the spiroid, the helicon and the worm wheel. In each the blank turns about the z axis while the tool turns about a line square to it, at the pair's ratio, and what the tool passes through is cut from the blank. Here the two axes meet.
The gear's axis is the z axis and the pinion's the x axis; they meet at the origin O. Write g = (2, 0, 1)/√5 and d = (−1, 0, 2)/√5. The line through O along g is where the two pitch cones touch: the gear's pitch cone is the cone about the z axis through it (half-angle atan 2 ≈ 63.43°), and the pinion's the cone about the x axis through it (half-angle atan ½). d is square to g in the xz-plane and points from the pinion into the gear.
The blank is the solid of revolution, about the z axis, of the quadrilateral in the xz-plane (ρ = x, z) whose corners are the points s·g + u·d at
s = 15√5, u = −2: (30.894427, 13.211146), the outer tip;
s = 15√5, u = 6: (27.316718, 20.366563);
s = 15√5 − 10, u = 6: (18.372447, 15.894427);
s = 15√5 − 10, u = −2(15√5 − 10)/(15√5): (21.683489, 9.272343), the inner tip.
So its back and front faces are cones square to the pitch cone, at cone distances 15√5 ≈ 33.54 (where the pitch radius is 30) and 10 less; its face cone runs from the outer tip to O, 2 outside the pitch cone at the outer end; and its bore is the cone 6 inside the pitch cone.
The tool is one tooth of the pinion, straight-sided, its flanks planes through O. In the plane square to g through the outer pitch point P = 15√5·g = (30, 0, 15), take the trapezoid of the points P + u·d + w·(0, 1, 0) with |u| ≤ 2.5 and |w| ≤ π/2 − u·tan 20°. Its corners are (28.881966, ±0.660871, 17.236068), 2.5 into the gear, and (31.118034, ±2.480721, 12.763932), 2.5 into the pinion: a tooth π wide at the pitch cone, its sides 20° from d. The tooth is the pyramid with apex O over this trapezoid, cut off by the planes square to g at distances 15√5 − 12 and 15√5 + 2 from O: a frustum of a pyramid, reaching 2 past the blank at each end. It is centred on the line where the pitch cones touch.
The motion. The pinion turns by t about the x axis, right-handed (from +y toward +z), while the gear turns by −t/2 about the z axis, so that the pitch cones roll on each other without slipping. Seen from the blank, the tooth at t is turned by t about the x axis and then by t/2 about the z axis. As t runs from −60° to 60° the tooth comes into the blank, passes through the mesh and leaves it; at both ends it is clear of the blank. Cut from the blank everything the tooth passes through, seen from the blank.
Both turns hold O still and the tooth's flanks pass through O, so between the tooth's ends the space is a cone with apex O: its section by every sphere about O is the same curve, scaled. That curve is the envelope of an arc of a great circle as the two turns carry it over the sphere, a spherical curve and not a plane involute. The gear it makes is conjugate to this straight-sided tooth, not to an involute pinion.
Unsettled. This solid has no closed form, and no two kernels yet agree on it to 1e-8, so it has no answer to grade against. Below is what each kernel builds: built means a watertight, consistently oriented solid, whatever its measures; the table says which kernels agree with which.
Drawing
TopIsometricFrontRight
Third-angle projection, the three views at one scale. Drawn from next.BREP's result, which passed.
† works around a missing feature. Pick an entry to see its solid, its measures and its code.
Drag to turn, scroll or pinch to zoom, right-drag to move. The solid as its STEP file has it, meshed in the browser by Open CASCADE (occt-import-js): each face colored by the kind of its surface, and the edges that bound each face drawn between them.
Drag to turn, scroll or pinch to zoom, right-drag to move. Black lines are where the surface turns sharply; red ones, seen through the solid, are open edges, where the mesh is not closed.
//! A 30-tooth bevel gear's blank with one tooth space cut by a straight-sided tooth of its 15-tooth//! pinion, the shafts square and meeting at O: the pinion turns by t about the x axis while the//! gear turns by −t/2 about the z axis, t from −60° to 60°.//!//! The blank is its meridian quadrilateral revolved; the tooth a prism kept behind its four flank//! planes through O. The tooth's turn seen from the gear's (`Trajectory::Relative`) is no constant//! twist and keeps no plane, and the tooth is all planes and lines, so the kernel's sweep cut from//! the blank (`swept::closed::cut_from`) takes the contact's road under any motion//! (`swept::general`).//!//! Refused by the kernel at run time, before the trim: a wall between two of the contact's events//! cannot be fitted through its stations, which stand too close to tell apart (`family::Stations`,//! "a face family's stations stand on one another", `Unbuilt::Failed`). It is refused alike with//! the sweep built closed alone (`swept::closed::closed`) and over the roll's first half alone.usecrate::gears::{bevel_blank, bevel_tooth, in_mesh, turn};
use cad_kernel::geom::tolerance;
use cad_kernel::swept::closed::cut_from;
use cad_kernel::topo::Brep;
/// How closely the tooth is meshed for the sweep's membership reads (its faces are flat).constBAR: f64 = 0.01;
pubfnbuild() -> Result<Brep, String> {
let (blank, tooth) = (bevel_blank()?, bevel_tooth()?);
let path = in_mesh(turn([0.; 3], [1., 0., 0.], 1.), -0.5);
let roll = [-60f64.to_radians(), 60f64.to_radians()];
cut_from(&blank, &tooth, &path, roll, BAR, tolerance(blank.size()))
.map_err(|why| format!("the tooth's sweep not cut: {why:?}"))
}
occt left no solid to show.
Time
626 ms; CPU time 626 ms; peak memory 356.7 MB
Notes
refused occt has no sweep of a solid under two turns at once: it slides, turns about one axis, or follows a path it is given, and the tooth seen from the gear turns about the pinion's axis while that axis turns about the gear's; the space's flanks are the envelope of the tooth's flank planes, which occt has no operation to find
"""A straight bevel gear's tooth space cut by its pinion. A bevel gear blank with one tooth space cut
by a tooth of its pinion turning in mesh with it, as a gear shaper cuts, but on shafts that meet: a
30-tooth gear and a 15-tooth pinion, module 2 at the outer end, the shafts square.
This is the first of five cases that cut a gear with its mate in one way while the shafts move
apart, from bevel to worm: this one, the hypoid, the spiroid, the helicon and the worm wheel. In
each the blank turns about the z axis while the tool turns about a line square to it, at the pair's
ratio, and what the tool passes through is cut from the blank. Here the two axes meet.
The gear's axis is the z axis and the pinion's the x axis; they meet at the origin O. Write g = (2,
0, 1)/√5 and d = (−1, 0, 2)/√5. The line through O along g is where the two pitch cones touch: the
gear's pitch cone is the cone about the z axis through it (half-angle atan 2 ≈ 63.43°), and the
pinion's the cone about the x axis through it (half-angle atan ½). d is square to g in the xz-plane
and points from the pinion into the gear.
The blank is the solid of revolution, about the z axis, of the quadrilateral in the xz-plane (ρ =
x, z) whose corners are the points s·g + u·d at
- s = 15√5, u = −2: (30.894427, 13.211146), the outer tip;
- s = 15√5, u = 6: (27.316718, 20.366563);
- s = 15√5 − 10, u = 6: (18.372447, 15.894427);
- s = 15√5 − 10, u = −2(15√5 − 10)/(15√5): (21.683489, 9.272343), the inner tip.
So its back and front faces are cones square to the pitch cone, at cone distances 15√5 ≈ 33.54
(where the pitch radius is 30) and 10 less; its face cone runs from the outer tip to O, 2 outside
the pitch cone at the outer end; and its bore is the cone 6 inside the pitch cone.
The tool is one tooth of the pinion, straight-sided, its flanks planes through O. In the plane
square to g through the outer pitch point P = 15√5·g = (30, 0, 15), take the trapezoid of the
points P + u·d + w·(0, 1, 0) with |u| ≤ 2.5 and |w| ≤ π/2 − u·tan 20°. Its corners are (28.881966,
±0.660871, 17.236068), 2.5 into the gear, and (31.118034, ±2.480721, 12.763932), 2.5 into the
pinion: a tooth π wide at the pitch cone, its sides 20° from d. The tooth is the pyramid with apex
O over this trapezoid, cut off by the planes square to g at distances 15√5 − 12 and 15√5 + 2 from
O: a frustum of a pyramid, reaching 2 past the blank at each end. It is centred on the line where
the pitch cones touch.
The motion. The pinion turns by t about the x axis, right-handed (from +y toward +z), while the
gear turns by −t/2 about the z axis, so that the pitch cones roll on each other without slipping.
Seen from the blank, the tooth at t is turned by t about the x axis and then by t/2 about the z
axis. As t runs from −60° to 60° the tooth comes into the blank, passes through the mesh and leaves
it; at both ends it is clear of the blank. Cut from the blank everything the tooth passes through,
seen from the blank.
Both turns hold O still and the tooth's flanks pass through O, so between the tooth's ends the
space is a cone with apex O: its section by every sphere about O is the same curve, scaled. That
curve is the envelope of an arc of a great circle as the two turns carry it over the sphere, a
spherical curve and not a plane involute. The gear it makes is conjugate to this straight-sided
tooth, not to an involute pinion."""from bench importRefuseddefbuild():
# OCCT's sweeps slide (BRepPrimAPI_MakePrism), turn (BRepPrimAPI_MakeRevol) or carry a shape# along a path under a law of its trihedron (BRepOffsetAPI_MakePipe, MakePipeShell). Seen from# the gear, the pinion's tooth turns about the x axis while that axis turns about the z axis:# a spherical motion, which none of these makes. The space's flanks are the envelope of the# tooth's flank planes under it, which occt has no operation to find.raiseRefused("occt has no sweep of a solid under two turns at once: it slides, turns about ""one axis, or follows a path it is given, and the tooth seen from the gear ""turns about the pinion's axis while that axis turns about the gear's; the ""space's flanks are the envelope of the tooth's flank planes, which occt has no"" operation to find")
arris left no solid to show.
Time
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
kentron left no solid to show.
Time
1.5 ms; CPU time 1.3 ms; peak memory 3.7 MB
Notes
refused kentron has no sweep of a solid along two turns about meeting axes (a spherical motion): `sweep::cut_by_motion` takes a prism moved in a plane or one screw or turn of a solid of revolution; the tooth space's flanks are spherical envelopes kentron cannot find
//! A bevel gear blank (the 30-tooth gear's, about the z axis) with one tooth space cut by a//! straight-sided tooth of its 15-tooth pinion, turned by t about the x axis while the gear turns//! by −t/2 about the z axis, for t from −60° to 60°.//!//! Refused. Seen from the blank the tooth turns about two axes through the origin at once, a//! spherical motion: kentron's cut by a motion (`sweep::cut_by_motion`) takes a prism moved in a//! plane, or one screw or turn of a solid of revolution, and the space's flanks are cones over//! spherical envelopes of the tooth's flanks, which kentron has no operation to find.usecrate::Refusal;
use kentron::topology::{Model, Shape};
pubfnbuild(_m: &mutModel) -> Result<Shape, Refusal> {
Err(Refusal::from(
"kentron has no sweep of a solid along two turns about meeting axes (a spherical motion): \
`sweep::cut_by_motion` takes a prism moved in a plane or one screw or turn of a solid of \
revolution; the tooth space's flanks are spherical envelopes kentron cannot find",
))
}
vcad left no solid to show.
Time
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
solidcraft left no solid to show.
Time
1.7 ms; CPU time 1.5 ms; peak memory 4.6 MB
Notes
refused no layer (solidcraft-kernel, solidcore-ops, solidcore) has a sweep of a solid or an envelope: the tooth space's flanks are the envelope of the pinion tooth's flanks under two turns at once, which no sweep of a profile along a line, a screw, a revolve or a path makes
//! Refused. Seen from the blank the tooth turns about the x axis and the z axis at once, and the//! tooth space's flanks are the envelope of its planar flanks over that motion: a cone over a//! spherical curve, no plane involute. solidcraft-kernel has no sweep of a solid and no envelope,//! and its sweeps of a profile follow a line, a screw, a revolve or a path's own frame, none of//! which is this motion; an envelope computed here would be geometry made outside the kernel.usecrate::Refusal;
usecrate::solids::Body;
pubfnbuild() -> Result<Body, Refusal> {
Err("no layer (solidcraft-kernel, solidcore-ops, solidcore) has a sweep of a solid or an envelope: the tooth space's flanks \
are the envelope of the pinion tooth's flanks under two turns at once, which no sweep \
of a profile along a line, a screw, a revolve or a path makes"
.into())
}
brepkit left no solid to show.
Time
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
popkern left no solid to show.
Time
3.1 ms; CPU time 2.9 ms; peak memory 11.3 MB
Notes
refused popkern has no sweep of a solid, and this sweep's wall is an envelope its other operations do not make
// A straight bevel gear's tooth space cut by its pinion.//// Refused: popkern has no sweep of a solid (its sweeps carry a profile along a path), and this// one's boundary is an envelope of the moving solid that its other operations do not make.throw"popkern has no sweep of a solid, and this sweep's wall is an envelope its other operations do not make";
aetheris left no solid to show.
Time
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
Time
458 ms; CPU time 457 ms; peak memory 61.4 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Its volume and area are its STEP file's, as the harness measures them from the file's exact geometry (harness/mass/); its triangles are Open CASCADE's mesh of the file, for the pictures.
Data
its STEP's
volume
11803.8033704
area
5510.1030227
agrees with
no other kernel
mesh
11626 triangles, closed
centre of gravity
(-0.249596, -3.83064e-12, 14.7798) its STEP's solid
inertia
about it, of unit density: Ixx 3.81754e+06; Iyy 3.73931e+06; Izz 7.42864e+06; Ixy 1.12367e-05; Iyz -1.18094e-07; Izx -5229.17
//! A 30-tooth bevel gear's blank with one tooth space cut by a straight-sided tooth of its//! 15-tooth pinion, the shafts square and meeting at O: the pinion turns by t about the x axis//! while the gear turns by −t/2 about the z axis, t from −60° to 60°.//!//! Seen from the blank the tooth is turned by t about the x axis and then by t/2 about the z axis://! two turns about axes through O, the tooth's apex. The kernel sweeps a pyramid frustum under//! turns about axes through its apex (`sweep_pyramid_within`), exactly within a range of distances//! from the apex; the range given is the blank's own, from its front cone's nearest point to O (on//! the pitch cone, 15√5 − 10 from O) to its back corner (√((15√5)² + 6²)). The sweep is cut from//! the blank, the case's quadrilateral revolved.usecrate::solids::{p, polygon};
usecrate::Refusal;
use brep_kernel::{
boolean_operation_nary, revolve_profile_brep, sweep_pyramid_within, BooleanOperation, BrepSolid, Pyramid, ScrewStep,
SolidMotion,
};
use std::f64::consts::{FRAC_PI_2, TAU};
constS5: f64 = 2.236_067_977_499_79;
pubfnbuild() -> Result<BrepSolid, Refusal> {
// g along the line where the pitch cones touch, d from the pinion into the gear.let (g, d) = (p(2.0 / S5, 0.0, 1.0 / S5), p(-1.0 / S5, 0.0, 2.0 / S5));
let s0 = 15.0 * S5;
// The trapezoid in the plane square to g through P = s0·g, (u, w) along d and y; the section's// second axis is g × d = −y, so w is read negated.let t20 = 20f64.to_radians().tan();
let trapezoid = [[-2.5, FRAC_PI_2 + 2.5 * t20], [2.5, FRAC_PI_2 - 2.5 * t20], [2.5, -(FRAC_PI_2 - 2.5 * t20)], [-2.5, -(FRAC_PI_2 + 2.5 * t20)]];
let tooth = Pyramid {
apex: p(0.0, 0.0, 0.0),
axis: g,
x_axis: d,
at: s0,
section: trapezoid.iter().map(|q| [q[0], -q[1]]).collect(),
from: s0 - 12.0,
to: s0 + 2.0,
};
let o = p(0.0, 0.0, 0.0);
let deg = 1f64.to_radians();
let motion = SolidMotion {
steps: vec![
ScrewStep { axis_origin: o, axis_direction: p(1.0, 0.0, 0.0), turn: 1.0, advance: 0.0 },
ScrewStep { axis_origin: o, axis_direction: p(0.0, 0.0, 1.0), turn: 0.5, advance: 0.0 },
],
from: -60.0 * deg,
to: 60.0 * deg,
};
let space = sweep_pyramid_within(&tooth, &motion, [s0 - 10.0, (s0 * s0 + 36.0).sqrt()])?;
let q = [(30.894427, 13.211146), (27.316718, 20.366563), (18.372447, 15.894427), (21.683489, 9.272343)];
let meridian = polygon(&q.iter().map(|&(x, z)| p(x, 0.0, z)).collect::<Vec<_>>())?;
let blank = revolve_profile_brep(&meridian, p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), TAU)?;
Ok(boolean_operation_nary(&[blank, space], BooleanOperation::Subtract)?)
}
geop left no solid to show.
Time
1.8 ms; CPU time 1.6 ms; peak memory 9.7 MB
Notes
refused geop sweeps a profile along a path, turning it with the path; it has no sweep of a solid through a motion, and the space the pinion's tooth cuts is bounded by the envelope of its flanks as the two shafts turn, which geop cannot build
//! A straight bevel gear's tooth space cut by its pinion.//!//! geop sweeps a profile along a path, turning it with the path; it has no sweep of a solid//! through a motion, and the space the pinion's tooth cuts is bounded by the envelope of its//! flanks as the two shafts turn, which geop cannot build.usecrate::{Bench, Refusal};
pubfnbuild(_: &mutBench) -> Result<(), Refusal> {
Err("geop sweeps a profile along a path, turning it with the path; it has no sweep of a \
solid through a motion, and the space the pinion's tooth cuts is bounded by the \
envelope of its flanks as the two shafts turn, which geop cannot build"
.into())
}
Time
128 ms; CPU time 359 ms; peak memory 13.5 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Its volume and area are its STEP file's, as the harness measures them from the file's exact geometry (harness/mass/); its triangles are Open CASCADE's mesh of the file, for the pictures.
Data
its STEP's
volume
11803.8044645
area
5510.1032823
agrees with
no other kernel
mesh
8318 triangles, closed
centre of gravity
(-0.249596, 1.1967e-15, 14.7798) its STEP's solid
inertia
about it, of unit density: Ixx 3.81754e+06; Iyy 3.73931e+06; Izz 7.42864e+06; Ixy 3.53973e-07; Iyz 6.47646e-09; Izx -5229.17
//! A 30-tooth bevel gear's blank with one tooth space cut by a straight-sided tooth of its//! 15-tooth pinion, the shafts square and meeting at O: the pinion turns by t about the x axis//! while the gear turns by −t/2 about the z axis, t from −60° to 60°.//!//! The blank is its meridian quadrilateral revolved; the tooth is a pyramid with apex O lofted//! from its outer trapezoid and cut off at the inner plane, a convex polyhedron. cadrs's cut by a//! moving tool under the two turns (`Kernel::cut_swept`, `SolidMotion::Rigid`, seen from the gear://! by t about the x axis, then by t/2 about the z axis): the tooth space's five faces are the//! cones its flanks and tip envelop and its tip's two edges trace.usecrate::bench::{p3, v3};
usecrate::shared::swept::{bevel_cut, bevel_tooth};
usecrate::Refusal;
use cadrs_kernel::{Axis, BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let tooth = bevel_tooth(k)?;
bevel_cut(k, tooth, Axis::new(p3(0.0, 0.0, 0.0), v3(1.0, 0.0, 0.0)), -0.5, (-60.0, 60.0))
}
smlib left no solid to show.
Time
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
springrep left no solid to show.
Time
1.3 ms; CPU time 1.1 ms; peak memory 3.7 MB
Notes
refused springrep's sweep of a solid is exact only under a slide, a turn or a screw. The tooth (or thread) is carried by two turns at once, about the blank's axis and the mating one, so the space it cuts is bounded by envelopes of its flanks under that motion, which it cannot make exactly
//! A bevel gear blank with one tooth space cut by a tooth of its pinion turning in mesh, the//! shafts square and meeting.use springrep::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
Err("springrep's sweep of a solid is exact only under a slide, a turn or a screw. The tooth (or thread) is carried by two turns at once, about the blank's axis and the mating one, so the space it cuts is bounded by envelopes of its flanks under that motion, which it cannot make exactly".into())
}
geomsolver left no solid to show.
Time
948 ms; CPU time 2.85 s; peak memory 84.5 MB
Notes
refused error[E080]: `space` is outside the generating-sweep class (E2: each tool point touches the blank at most once in the roll): a tool point touches the blank at roll 0.3355 and again at 0.4516 at (21.3302, -0.8942, 9.9663)
// A straight bevel gear's tooth space cut by a tooth of its pinion turning in mesh with it: a// 30-tooth gear about z and a 15-tooth pinion about x, module 2 at the outer end, the shafts// meeting at the origin O. g = (2, 0, 1)/sqrt 5 runs along the line the pitch cones touch on and// d = (-1, 0, 2)/sqrt 5 square to it, from the pinion into the gear.//// The blank is the given quadrilateral in the front plane (x, z) turned whole about z. The tooth// is the pyramid with apex O over the trapezoid P + u d + w y (|u| <= 2.5,// |w| <= pi/2 - u tan 20) in the plane square to g through P = 15 sqrt 5 g, cut off square to g// at 15 sqrt 5 - 12 and 15 sqrt 5 + 2 from O: built as the join of its two end sections, each// corner on the ray from O through the trapezoid's corner. The pinion turns t about x while the// gear turns -t/2 about z; the kernel's sweep of the tooth as the gear sees it, t from -60 to 60// degrees, is cut from the blank.unit mm
use std
use std.solids (cut)
use std.sets
use std.place (coords)
use std.motion (turns)
cd := 15 * sqrt(5) // the outer cone distance, where the pitch radius is 30
near := cd - 12// where the tooth is cut off, toward O and away from it
far := cd + 2// the blank, its section's corners as givenin std.front {
private k0 := point
private k1 := point
private k2 := point
private k3 := point
fix((30.894427, 13.211146)) k0
fix((27.316718, 20.366563)) k1
fix((18.372447, 15.894427)) k2
fix((21.683489, 9.272343)) k3
private back := line(k0, k1)
private bore := line(k1, k2)
private front := line(k2, k3)
private face_cone := line(k3, k0)
construction centerline gear_axis := line(std.origin, hint((0, 1)))
fix((0, 1)) gear_axis.p2
}
part := solid(std.solids.Revolution(face(back, bore, front, face_cone), about: gear_axis))
// the planes square to g (each its own axes, along d and y): through the outer pitch point, and// at the tooth's two endsprivate pitch_d := axis
fix(dir == (-1, 0, 2)) pitch_d
private pitch_y := axis
fix(dir == (0, 1, 0)) pitch_y
pitch := plane(u: pitch_d, v: pitch_y)
fix(origin == (2 * cd / sqrt(5), 0, cd / sqrt(5))) pitch
private inner_d := axis
fix(dir == (-1, 0, 2)) inner_d
private inner_y := axis
fix(dir == (0, 1, 0)) inner_y
inner := plane(u: inner_d, v: inner_y)
fix(origin == (2 * near / sqrt(5), 0, near / sqrt(5))) inner
private outer_d := axis
fix(dir == (-1, 0, 2)) outer_d
private outer_y := axis
fix(dir == (0, 1, 0)) outer_y
outer := plane(u: outer_d, v: outer_y)
fix(origin == (2 * far / sqrt(5), 0, far / sqrt(5))) outer
o := point
fix((0, 0, 0)) o
// the trapezoid at the pitch point, pi wide at the pitch cone, its sides 20 degrees from din pitch {
private c0 := point
private c1 := point
private c2 := point
private c3 := point
c0 coords(du: 2.5mm, dv: (pi / 2 - 2.5 * tan(20deg)) * 1mm) pitch
c1 coords(du: 2.5mm, dv: -(pi / 2 - 2.5 * tan(20deg)) * 1mm) pitch
c2 coords(du: -2.5mm, dv: -(pi / 2 + 2.5 * tan(20deg)) * 1mm) pitch
c3 coords(du: -2.5mm, dv: (pi / 2 + 2.5 * tan(20deg)) * 1mm) pitch
}
// its sections at the tooth's ends, each corner on the ray from O through the trapezoid'sin inner {
private n0 := point hint((2, 1.1))
private n1 := point hint((2, -1.1))
private n2 := point hint((-2, -2.0))
private n3 := point hint((-2, 2.0))
}
in outer {
private f0 := point hint((2.7, 1.2))
private f1 := point hint((2.7, -1.2))
private f2 := point hint((-2.7, -2.4))
private f3 := point hint((-2.7, 2.4))
}
n0 coincident line(o, c0)
n1 coincident line(o, c1)
n2 coincident line(o, c2)
n3 coincident line(o, c3)
f0 coincident line(o, c0)
f1 coincident line(o, c1)
f2 coincident line(o, c2)
f3 coincident line(o, c3)
in inner {
small := face(n0, n1, n2, n3, -> close)
}
in outer {
large := face(f0, f1, f2, f3, -> close)
}
construction tooth := solid({ p | some q in small, r in large: p in std.sets.Segment(q, r) })
// the pinion turning about x, the gear half as fast the other way about z
pinion := frame
pinion turns(1) std.x
gear := frame
gear turns(-1 / 2) gear_axis
construction space := solid({ p | some t in (-60deg, 60deg): p in tooth at(under: pinion, seen_from: gear) t })
space cut part
anvilcad left no solid to show.
Time
1.1 ms; CPU time 950 µs; peak memory 3.4 MB
Notes
refused anvil-brep has no sweep of a solid: the cutter, carried by two motions at once relative to the blank, sweeps envelopes of its faces that it would have to compute itself
//! A straight bevel gear's tooth space cut by its pinion.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid: the cutter, carried by two motions at once relative to the blank, sweeps envelopes of its faces that it would have to compute itself".into())
}