The straight bevel gear's blank with one tooth space cut by a pinion tooth on a shaft that misses the gear's: shafts square, 12 apart, a 30-tooth gear and a 14-tooth pinion. It is the second of five cases that cut a gear with its mate as the shafts move apart, from bevel to worm.
The gear's axis is the z axis. Write g = (2, 0, 1)/√5 and d = (−1, 0, 2)/√5 as in the straight bevel case.
The blank is that case's blank: the solid of revolution, about the z axis, of the quadrilateral in the xz-plane (ρ = x, z) with corners (30.894427, 13.211146), (27.316718, 20.366563), (18.372447, 15.894427) and (21.683489, 9.272343), the points s·g + u·d at s = 15√5, u = −2; s = 15√5, u = 6; s = 15√5 − 10, u = 6; and s = 15√5 − 10, u = −2(15√5 − 10)/(15√5).
The pinion's axis is the line through (0, 12, 0) along the x axis: square to the z axis, and 12 from it along their common perpendicular, the y axis. That distance is the hypoid's offset.
The tool is the straight bevel case's tooth turned about the z axis by φ, where sin φ = 24/(75 − 5√5), so φ ≈ 22.0898°. That tooth is the frustum of the pyramid with apex O (the origin) over the trapezoid of the points P + u·d + w·(0, 1, 0), P = (30, 0, 15), with |u| ≤ 2.5 and |w| ≤ π/2 − u·tan 20° (corners (28.881966, ±0.660871, 17.236068) and (31.118034, ±2.480721, 12.763932)), cut off by the planes square to g at distances 15√5 − 12 and 15√5 + 2 from O. Turned, it lies along the gear's pitch cone at azimuth φ, its flanks still planes through O.
The angle places the tooth where the pinion can carry it: at the tooth's mean point M, halfway across the face (cone distance 15√5 − 5), the line through M square to the gear's pitch cone meets the pinion's axis. So the pitch surfaces touch at M, and there the tooth neither rises nor sinks as it passes. Its length runs along the gear's cone, through O, and so leans to the pinion's: the pinion's teeth are spiral where the gear's are straight.
The motion. The pinion turns by t about its axis, right-handed about +x (from +y toward +z), while the gear turns by −7t/15 about the z axis. Seen from the blank, the tooth at t is turned by t about the pinion's axis and then by 7t/15 about the z axis. As t runs from −70° to 70° 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.
The tooth slides along its length at M, as every hypoid tooth does. It would slide nowhere across itself there at the ratio cos φ / 2 ≈ 0.4633; the case runs at the tooth counts' 7/15 ≈ 0.4667, as a pair is made, so it slides a little across as well. The turns no longer hold a point in common: the space is no cone, and its flanks are envelopes of planes under a motion whose axes are skew.
where K is the blank, T the straight bevel case's tooth and A the pinion's axis.
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.
Time
88.1 s; CPU time 277.8 s; peak memory 119.6 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
11792.2464647
area
5510.28425769
agrees with
cadrs
centre of gravity
(-0.256122, -0.102458, 14.781) its STEP's solid
inertia
about it, of unit density: Ixx 3.80549e+06; Iyy 3.74284e+06; Izz 7.42023e+06; Ixy 29870.5; Iyz -2079.19; Izx -5190.42
STEP
B-rep advanced faces, each on a surface AUTOMOTIVE_DESIGN
//! The straight bevel case's blank with one tooth space cut by its tooth turned about the z axis by//! φ (sin φ = 24/(75 − 5√5)), carried by a pinion whose axis is the line through (0, 12, 0) along//! x: the pinion turns by t about it while the gear turns by −7t/15 about the z axis, t from −70°//! to 70°.//!//! As in the straight bevel case, the tooth's turn seen from the gear's is no constant twist, 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, after about 40 s: its trim finds a piece of a wall's family//! both the sweep's boundary and off it, parted by a meeting it was not given (`Unbuilt::Failed`).usecrate::gears::{bevel_blank, bevel_tooth, in_mesh, turn};
use cad_kernel::geom::{tolerance, Rigid};
use cad_kernel::swept::closed::cut_from;
use cad_kernel::topo::Brep;
constBAR: f64 = 0.01;
pubfnbuild() -> Result<Brep, String> {
let phi = (24. / (75. - 5. * 5f64.sqrt())).asin();
let blank = bevel_blank()?;
let tooth = bevel_tooth()?.moved(&Rigid::turn([0.; 3], [0., 0., 1.], phi));
let path = in_mesh(turn([0., 12., 0.], [1., 0., 0.], 1.), -7. / 15.);
let roll = [-70f64.to_radians(), 70f64.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
614 ms; CPU time 613 ms; peak memory 356.6 MB
Notes
refused occt has no sweep of a solid under two turns about skew axes at once: it slides, turns about one axis, or follows a path it is given; the space's flanks are the envelope of the tooth's flank planes, which occt has no operation to find
"""A hypoid gear's tooth space cut by its pinion. The straight bevel gear's blank with one tooth space
cut by a pinion tooth on a shaft that misses the gear's: shafts square, 12 apart, a 30-tooth gear
and a 14-tooth pinion. It is the second of five cases that cut a gear with its mate as the shafts
move apart, from bevel to worm.
The gear's axis is the z axis. Write g = (2, 0, 1)/√5 and d = (−1, 0, 2)/√5 as in the straight
bevel case.
The blank is that case's blank: the solid of revolution, about the z axis, of the quadrilateral in
the xz-plane (ρ = x, z) with corners (30.894427, 13.211146), (27.316718, 20.366563), (18.372447,
15.894427) and (21.683489, 9.272343), the points s·g + u·d at s = 15√5, u = −2; s = 15√5, u = 6; s
= 15√5 − 10, u = 6; and s = 15√5 − 10, u = −2(15√5 − 10)/(15√5).
The pinion's axis is the line through (0, 12, 0) along the x axis: square to the z axis, and 12
from it along their common perpendicular, the y axis. That distance is the hypoid's offset.
The tool is the straight bevel case's tooth turned about the z axis by φ, where sin φ = 24/(75 −
5√5), so φ ≈ 22.0898°. That tooth is the frustum of the pyramid with apex O (the origin) over the
trapezoid of the points P + u·d + w·(0, 1, 0), P = (30, 0, 15), with |u| ≤ 2.5 and |w| ≤ π/2 −
u·tan 20° (corners (28.881966, ±0.660871, 17.236068) and (31.118034, ±2.480721, 12.763932)), cut
off by the planes square to g at distances 15√5 − 12 and 15√5 + 2 from O. Turned, it lies along the
gear's pitch cone at azimuth φ, its flanks still planes through O.
The angle places the tooth where the pinion can carry it: at the tooth's mean point M, halfway
across the face (cone distance 15√5 − 5), the line through M square to the gear's pitch cone meets
the pinion's axis. So the pitch surfaces touch at M, and there the tooth neither rises nor sinks as
it passes. Its length runs along the gear's cone, through O, and so leans to the pinion's: the
pinion's teeth are spiral where the gear's are straight.
The motion. The pinion turns by t about its axis, right-handed about +x (from +y toward +z), while
the gear turns by −7t/15 about the z axis. Seen from the blank, the tooth at t is turned by t about
the pinion's axis and then by 7t/15 about the z axis. As t runs from −70° to 70° 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.
The tooth slides along its length at M, as every hypoid tooth does. It would slide nowhere across
itself there at the ratio cos φ / 2 ≈ 0.4633; the case runs at the tooth counts' 7/15 ≈ 0.4667, as
a pair is made, so it slides a little across as well. The turns no longer hold a point in common:
the space is no cone, and its flanks are envelopes of planes under a motion whose axes are skew."""from bench importRefuseddefbuild():
# As in the straight bevel case, OCCT's sweeps slide, turn or carry a shape along a path; seen# from the gear, the tooth turns about the pinion's axis while that axis turns about the gear's,# the two skew. The space's flanks are the envelope of the tooth's flank planes under that# motion, which occt has no operation to find.raiseRefused("occt has no sweep of a solid under two turns about skew axes at once: it ""slides, turns about one axis, or follows a path it is given; 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.3 ms; CPU time 1.1 ms; peak memory 3.8 MB
Notes
refused kentron has no sweep of a solid along two turns about skew axes: `sweep::cut_by_motion` takes a prism moved in a plane or one screw or turn of a solid of revolution; the flanks are envelopes of the tooth's planes kentron has no operation to find
//! The straight bevel gear's blank with one tooth space cut by a pinion tooth on a shaft 12 from//! the gear's: the tooth turned by t about the line through (0, 12, 0) along x and then by 7t/15//! about the z axis, for t from −70° to 70°.//!//! Refused. The two turns are about skew axes: 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 tooth//! is neither moved so. The flanks are envelopes of planes under that motion, 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 skew axes: `sweep::cut_by_motion` takes \
a prism moved in a plane or one screw or turn of a solid of revolution; the flanks are \
envelopes of the tooth's planes kentron has no operation to 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.5 ms; CPU time 1.3 ms; peak memory 4.4 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 turns about two skew axes 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 two skew axes at once, and the tooth space's//! flanks are the envelope of its planar flanks over that motion. 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 turns about two skew axes 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.6 ms; CPU time 3.4 ms; peak memory 11.4 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 hypoid 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
13.5 s; CPU time 13.5 s; peak memory 155.9 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
11792.2451509
area
5510.28601008
agrees with
no other kernel
mesh
8728 triangles, closed
centre of gravity
(-0.256123, -0.102458, 14.781) its STEP's solid
inertia
about it, of unit density: Ixx 3.80549e+06; Iyy 3.74284e+06; Izz 7.42023e+06; Ixy 29870.6; Iyz -2079.2; Izx -5190.42
//! The straight bevel case's blank with one tooth space cut by a pinion tooth on a shaft that//! misses the gear's (a hypoid): the tooth is the straight bevel case's frustum of a pyramid with//! apex O, turned by φ (sin φ = 24/(75 − 5√5)) about the gear's axis; the pinion turns by t about//! its axis (through (0, 12, 0) along x) while the gear turns by −7t/15 about z, t from −70° to 70°.//!//! Seen from the blank the tooth is turned by t about the pinion's axis and then by 7t/15 about z://! two turns about skew axes, which the kernel sweeps whole for a convex polyhedron//! (`sweep_solid_tumbled`). The tooth is that polyhedron, its 8 corners the trapezoid's at the two//! end planes, and its 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_solid_tumbled, BooleanOperation, BrepSolid, SolidTool, TwoTurns, Vec3};
use std::f64::consts::{FRAC_PI_2, TAU};
constS5: f64 = 2.236_067_977_499_79;
pubfnbuild() -> Result<BrepSolid, Refusal> {
// g along the pitch cone's generator, d from the pinion into the gear, e = y (at azimuth 0).let (g, d, e) = (p(2.0 / S5, 0.0, 1.0 / S5), p(-1.0 / S5, 0.0, 2.0 / S5), p(0.0, 1.0, 0.0));
let s0 = 15.0 * S5;
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 phi = (24.0 / (75.0 - 5.0 * S5)).asin();
let turned = |x: Vec3| p(phi.cos() * x.x - phi.sin() * x.y, phi.sin() * x.x + phi.cos() * x.y, x.z);
// The trapezoid at P = s0·g, scaled from O to the end planes square to g at s0 − 12 and s0 + 2.letmut vertices = Vec::new();
for s in [s0 - 12.0, s0 + 2.0] {
for q in trapezoid {
vertices.push(turned(g.scale(s0).add(d.scale(q[0])).add(e.scale(q[1])).scale(s / s0)));
}
}
let faces = vec![vec![0, 1, 2, 3], vec![4, 5, 6, 7], vec![0, 1, 5, 4], vec![1, 2, 6, 5], vec![2, 3, 7, 6], vec![3, 0, 4, 7]];
let tooth = SolidTool::Polyhedron { vertices, faces };
let deg = 1f64.to_radians();
let motion = TwoTurns {
axes: [(p(0.0, 12.0, 0.0), p(1.0, 0.0, 0.0)), (p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0))],
rates: [1.0, 7.0 / 15.0],
from: -70.0 * deg,
to: 70.0 * deg,
};
let space = sweep_solid_tumbled(&tooth, &motion)?;
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.9 ms; CPU time 1.7 ms; peak memory 9.3 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 skew shafts turn, which geop cannot build
//! A hypoid 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 skew 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 skew shafts turn, which geop cannot build"
.into())
}
Time
1.97 s; CPU time 5.30 s; peak memory 42.3 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
11792.2464578
area
5510.28426919
agrees with
cad-kernel
mesh
18392 triangles, closed, 8 degenerate
centre of gravity
(-0.256122, -0.102458, 14.781) its STEP's solid
inertia
about it, of unit density: Ixx 3.80549e+06; Iyy 3.74284e+06; Izz 7.42023e+06; Ixy 29870.5; Iyz -2079.19; Izx -5190.42
//! The straight bevel case's blank with one tooth space cut by its tooth turned about the z axis//! by φ (sin φ = 24/(75 − 5√5)), carried by a pinion whose axis is the line through (0, 12, 0)//! along x: the pinion turns by t about it while the gear turns by −7t/15 about the z axis, t//! from −70° to 70°.//!//! The tooth as in the straight bevel case, turned; cadrs's cut by a moving tool under the two//! turns (`Kernel::cut_swept`, `SolidMotion::Rigid`, seen from the gear: by t about the pinion's//! axis, then by 7t/15 about the z axis).usecrate::bench::{p3, turned, v3};
usecrate::shared::swept::{bevel_cut, bevel_tooth, z_axis};
usecrate::Refusal;
use cadrs_kernel::{Axis, BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let phi = (24.0 / (75.0 - 5.0 * 5f64.sqrt())).asin();
let tooth = bevel_tooth(k)?;
let tooth = turned(k, tooth, z_axis(), phi.to_degrees())?;
bevel_cut(k, tooth, Axis::new(p3(0.0, 12.0, 0.0), v3(1.0, 0.0, 0.0)), -7.0 / 15.0, (-70.0, 70.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.1 ms; CPU time 900 µs; peak memory 3.4 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 pinion tooth on a shaft 12 from the gear's,//! turning in mesh.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
126 ms; CPU time 260 ms; peak memory 43.5 MB
Notes
refused error[E080]: `space` is outside the generating-sweep class (T1: the tool is read from its boundary, every face a face of revolution of lines and arcs, a ruled side of lines or arcs (drafted or not) or a plane, its planes that are no side clear of the blank unless they are the caps of one undrafted prism standing alone, or a union of tools each in the class): a cap of the prism `placed.std.sets.Segment(q, r)` bounds passes through the blank, and the class cuts with a cap only of a prism standing alone as the tool or placed, undrafted, its profile one loop: make the prism longer than the blank is thick at (23.3668, 8.6808, 10.8196)
// A hypoid gear's tooth space cut by its pinion's tooth. The blank is the turn about the z axis of// its quadrilateral section in the front plane (x, z). The tooth is the frustum, between the planes// square to g = (2, 0, 1)/sqrt 5 at 15 sqrt 5 - 12 and 15 sqrt 5 + 2 from the origin, of the// pyramid joining the origin to a trapezoid at P = 15 sqrt 5 g in the plane square to g, spanned by// d = (-1, 0, 2)/sqrt 5 and y: |u| <= 2.5 along d and |w| <= pi/2 - u tan 20 along y, a rack tooth// pi wide at its pitch line with its sides 20 degrees from square; it is the join (the hull) of its// two end sections. It is turned about the z axis by phi, sin phi = 24/(75 - 5 sqrt 5). The pinion// turns about the line through (0, 12, 0) along x a radian a radian of the roll, the gear -7/15 of// a radian about the z axis; seen from the gear, everything the tooth passes through as the roll// runs from -70 to +70 degrees is cut from the blank.unit mm
use std
use std.sets
use std.solids
use std.solids (cut)
use std.motion (turns)
in std.front {
k0 := point
k1 := point
k2 := point
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
section := line(k0, k1) -> line(k1, k2) -> line(k2, k3) -> line(k3, k0) -> close
}
part := solid(std.solids.Revolution(section, about: std.z))
// The frustum is the join of its two ends, each in a plane square to g, spanned by d and y: 12// nearer the origin than P (the toe) and 2 farther (the back). Each end is the trapezoid at P as// the pyramid from the origin cuts that plane, scaled by its distance from the origin over P's,// `heel`.
heel := 15 * sqrt(5)
toe_d := axis hint(dir: (-0.45, 0, 0.89))
fix(dir == (-1 / sqrt(5), 0, 2 / sqrt(5))) toe_d
toe_across := axis hint(dir: (0, 1, 0))
fix(dir == (0, 1, 0)) toe_across
toe := plane(u: toe_d, v: toe_across)
fix(origin == ((heel - 12) * 2 / sqrt(5), 0, (heel - 12) / sqrt(5))) toe
in toe {
toe0 := point
toe1 := point
toe2 := point
toe3 := point
fix((2.5 * (heel - 12) / heel, -(pi / 2 - 2.5 * tan(20deg)) * (heel - 12) / heel)) toe0
fix((2.5 * (heel - 12) / heel, (pi / 2 - 2.5 * tan(20deg)) * (heel - 12) / heel)) toe1
fix((-2.5 * (heel - 12) / heel, (pi / 2 + 2.5 * tan(20deg)) * (heel - 12) / heel)) toe2
fix((-2.5 * (heel - 12) / heel, -(pi / 2 + 2.5 * tan(20deg)) * (heel - 12) / heel)) toe3
toe_end := line(toe0, toe1) -> line(toe1, toe2) -> line(toe2, toe3) -> line(toe3, toe0) ->
close
toe_face := face(toe_end)
}
back_d := axis hint(dir: (-0.45, 0, 0.89))
fix(dir == (-1 / sqrt(5), 0, 2 / sqrt(5))) back_d
back_across := axis hint(dir: (0, 1, 0))
fix(dir == (0, 1, 0)) back_across
back := plane(u: back_d, v: back_across)
fix(origin == ((heel + 2) * 2 / sqrt(5), 0, (heel + 2) / sqrt(5))) back
in back {
back0 := point
back1 := point
back2 := point
back3 := point
fix((2.5 * (heel + 2) / heel, -(pi / 2 - 2.5 * tan(20deg)) * (heel + 2) / heel)) back0
fix((2.5 * (heel + 2) / heel, (pi / 2 - 2.5 * tan(20deg)) * (heel + 2) / heel)) back1
fix((-2.5 * (heel + 2) / heel, (pi / 2 + 2.5 * tan(20deg)) * (heel + 2) / heel)) back2
fix((-2.5 * (heel + 2) / heel, -(pi / 2 + 2.5 * tan(20deg)) * (heel + 2) / heel)) back3
back_end := line(back0, back1) -> line(back1, back2) -> line(back2, back3) ->
line(back3, back0) -> close
back_face := face(back_end)
}
tooth := solid({ p | some q in toe_face, r in back_face: p in std.sets.Segment(q, r) })
// placed about the gear's axis by phi, where the pitch surfaces touch at the tooth's mean point
placed := tooth at(under: std.z) asin(24 / (75 - 5 * sqrt(5)))
pa := point
fix((0, 12, 0)) pa
pb := point
fix((1, 12, 0)) pb
pinion_axis := line(pa, pb)
pinion := frame
pinion turns(1) pinion_axis
gear := frame
gear turns(-7 / 15) std.z
space := solid({ p | some t in (-70deg, 70deg): p in placed at(under: pinion, seen_from: gear) t })
space cut part
anvilcad left no solid to show.
Time
1.2 ms; CPU time 1 ms; peak memory 3.5 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 hypoid 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())
}