The initial torus is centered at (2.02, 0, 1), with axis parallel to z, major radius 1 and tube radius 0.16. The major radius is the radius of the circle through the tube's centers. It is a ring torus, including its interior.
Let A be the oriented line through (2, 0, 0) in direction (0, 0, 1). Define ℓ = 1°, α = 89° and h = 0. Let B be the oriented line through q = (0, h cos ℓ, h sin ℓ), with unit direction u = (cos α, sin α cos ℓ, sin α sin ℓ).
At roll t, first turn the initial torus by 1.01t about A, then turn that result by -1t about B. Both angles use the same t; the second axis stays fixed in the world. Take the union of every occupied position for all real t from -180° to 180°, including both end poses. This is the continuous swept solid, not a finite union of sampled poses. Overlapped material is counted once; interior envelope sheets are not part of the boundary.
A control for swept/tumbling-torus-near-orthogonal: only the tube radius changes, from 0.08 to 0.16.
No closed-form volume or area is asserted. The case remains unsettled until independently implemented kernels agree under the benchmark's rules.
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.
cad-kernel left no solid to show.
Time
22.8 s; CPU time 37.9 s; peak memory 26.9 MB
Notes
refused the torus's continuous sweep not built: Failed("a bspline's pieces do not close")
//! A thicker torus under the nearly perpendicular tumble. See cases/swept/tumbling-torus-near-orthogonal-thick.md for the continuous solid.//!//! Swept by the kernel's road for a ring under a motion no constant twist takes//! (`swept::closed::ring`, through `crate::tumble`), which builds the half-turn, full-turn and thin//! tumbling tori; it refuses this one at run time in cad-kernel 0.21.0 (that road, #942, is still//! in progress): it fits a tube whose B-spline's pieces do not close//! (`Unbuilt::Failed`).usecrate::tumble::Tumble;
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
Tumble {
centre: [2.02, 0., 1.],
hub: 2., tube: 0.16, ratio: 1.01,
lean: 1., heading: 89., height: 0.,
observer: 1., roll: [-180., 180.],
}.build()
}
occt left no solid to show.
Time
629 ms; CPU time 628 ms; peak memory 356.6 MB
Notes
refused occt has no continuous solid sweep under two turns about different axes; its prism, revolution and pipe operations do not construct this torus envelope
"""Continuous torus tumble: the solid is defined in cases/swept/tumbling-torus-near-orthogonal-thick.md.
Uses the same unavailable operation as the baseline tumbling-torus case. A union
of finitely many poses would change the solid and is not a valid workaround.
"""from bench importRefuseddefbuild():
raiseRefused("occt has no continuous solid sweep under two turns about different axes; ""its prism, revolution and pipe operations do not construct this torus envelope")
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
2.1 ms; CPU time 1.9 ms; peak memory 8.1 MB
Notes
refused invalid input: a motion under which where it grazes the tool moves over it: its envelope is no product of a curve and the motion
//! The solid a torus fills as it tumbles: the torus centred at (2.02, 0, 1), axis parallel to the//! z axis, radii 1 and 0.16, turned by 1.01t about the vertical line through (2, 0, 0) and then by//! −t about the line through the origin along (cos 89°, sin 89° cos 1°, sin 89° sin 1°), for t//! from −180° to 180°.//!//! The motion is given by its places (`shared::swept::tumble`, a `sweep::RigidMotion::Carried`)//! for kentron's sweep of a solid (`sweep::solid`), which refuses it: the curves where the motion grazes the tool move over it, so its envelope is//! no product of a fixed curve and the motion, and kentron's sweep builds only those.usecrate::bench::{d, frame, p};
usecrate::shared::swept::tumble;
use kentron::math::{Axis, Direction};
use kentron::primitives::Torus;
use kentron::sweep;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let tool = Torus::new(1.0, 0.16).with_frame(frame(p(2.02, 0.0, 1.0), Direction::Z)).build(m)?;
let first = Axis::new(p(2.0, 0.0, 0.0), Direction::Z);
let motion = tumble(first, 1.01, Axis::new(p(0.0, 0.0, 0.0), d(89f64.to_radians().cos(), 89f64.to_radians().sin() * 1f64.to_radians().cos(), 89f64.to_radians().sin() * 1f64.to_radians().sin())), -1.0, -180.0, 180.0);
sweep::solid(m, tool, &motion)
}
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.4 ms; CPU time 1.2 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 tumbling torus's sweep is bounded by the envelope of its places, which no sweep of a profile makes
//! Refused. The torus moves by two turns about skew axes at once, so no line of it stays fixed and//! its sweep's boundary is an envelope of no simpler kind. solidcraft-kernel has no sweep of a//! solid and no envelope, and 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 tumbling torus's sweep \
is bounded by the envelope of its places, which no sweep of a profile 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.4 ms; CPU time 3.2 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 thicker torus under the nearly perpendicular tumble.//// 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
3.63 s; CPU time 3.63 s; peak memory 544.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
27.0249149913
area
168.905375488
agrees with
no other kernel
mesh
203098 triangles, closed
centre of gravity
(0.018811, 0.0514658, 0.00687449) its STEP's solid
inertia
about it, of unit density: Ixx 99.8759; Iyy 172.84; Izz 99.8561; Ixy 1.53332; Iyz 0.670965; Izx 0.0134788
//! A torus tumbled about nearly perpendicular axes, through the kernel's sweep of a solid of//! revolution tumbled by two turns about skew axes (`sweep_solid_tumbled`): the torus centred at//! (2.02, 0, 1), axis along z, the circle through its tube's centres of radius 1, tube radius 0.16;//! at roll t turned by 1.01t about the line through (2, 0, 0) along z, then by −t about the line//! through the origin along (cos 89°, sin 89° cos 1°, sin 89° sin 1°); t from −180° to 180°. The//! turn is a little over a full revolution, so the two half-times are swept apart and joined.usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{boolean_operation_nary, sweep_solid_tumbled, BooleanOperation, BrepSolid, OutlinePiece, SolidTool, TwoTurns};
use std::f64::consts::TAU;
pubfnbuild() -> Result<BrepSolid, Refusal> {
let torus = SolidTool::Revolved {
axis_origin: p(2.02, 0.0, 1.0),
axis_direction: p(0.0, 0.0, 1.0),
radial: p(1.0, 0.0, 0.0),
meridian: vec![OutlinePiece::Arc { centre: [1.0, 0.0], radius: 0.16, start: 0.0, end: TAU }],
};
let (l, a) = (1f64.to_radians(), 89f64.to_radians());
let half = |from: f64, to: f64| TwoTurns {
axes: [
(p(2.0, 0.0, 0.0), p(0.0, 0.0, 1.0)),
(p(0.0, 0.0, 0.0), p(a.cos(), a.sin() * l.cos(), a.sin() * l.sin())),
],
rates: [1.01, -1.0],
from: from.to_radians(),
to: to.to_radians(),
};
let first = sweep_solid_tumbled(&torus, &half(-180.0, 0.0))?;
let second = sweep_solid_tumbled(&torus, &half(0.0, 180.0))?;
Ok(boolean_operation_nary(&[first, second], BooleanOperation::Union)?)
}
geop 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
1.26 s; CPU time 4.77 s; peak memory 19.5 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Data
measured
volume
27.0249145939
area
168.905374099
agrees with
no other kernel
faces
8 bspline, 4 torus
mesh
14656 triangles, closed
centre of gravity
(0.0187385, 0.051613, 0.00699237) its triangles
inertia
about it, of unit density: Ixx 99.3891; Iyy 172.047; Izz 99.3778; Ixy 1.52368; Iyz 0.657735; Izx 0.0148806
not by the harness, which graded the runner's own measures instead: cannot measure: face #2120: a loop that does not join up on its surface ((0.9987243374350006, 1.5079374241332477) to (0.0, 1.5700817609839095))
//! The torus of `swept/tumbling-torus-near-orthogonal` with a tube of radius 0.16.//!//! Cadrs's sweep of a solid with the rigid motion of the two turns.usecrate::shared::swept::tumbling_torus;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
usecrate::bench::p3;
tumbling_torus(k, p3(2.02, 0.0, 1.0), 0.16, (1.0, 89.0, 0.0), 1.01, -1.0, (-180.0, 180.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
8.56 s; CPU time 8.55 s; peak memory 453.2 MB
Notes
refused invalid result: the edge through (-0.867830, 0.078883, -0.882720) would be used by 1 faces; the edge through (-1.138773, 0.872110, -0.894154) would be used by 1 faces; the edge through (-1.226457, -0.755219, -0.951117) would be used by 1 faces; the edge through (-1.973284, 1.262674, -0.942807) would be used by 1 faces; the edge through (-2.023850, -1.053431, -1.056410) would be used by 1 faces; the edge through (-2.747534, 0.965053, -1.010351) would be used by 1 faces; the edge through (-2.835606, -0.667357, -1.065292) would be used by 1 faces
//! The solid the torus about (2.02, 0, 1) (radii 1 and 0.16) fills as it tumbles about two//! nearly square axes, for t from −180° to 180°.use springrep::topo::Brep;
usecrate::shared::swept::{deg, tumble, tumbled, v3};
pubfnbuild() -> Result<Brep, String> {
let motion = tumble(
1.01,
-1.0,
(deg(1.0), deg(89.0), 0.0),
deg(-180.0),
deg(180.0),
);
tumbled(v3(2.02, 0.0, 1.0), 0.16, &motion)
}
geomsolver left no solid to show.
Time
45 ms; CPU time 45 ms; peak memory 24.1 MB
Notes
refused error[E080]: `part`: native CAD boundary construction for continuous motion sweeps is not yet supported
// A thicker torus tumbled about nearly square axes: the torus centred at (2.02, 0, 1), its axis// along z, its tube (radius 0.16) 1 from that axis, turned 1.01 t about A, the upright line through// (2, 0, 0), and then -t about B, the line through the origin along u =// (cos 89, sin 89 cos 1, sin 89 sin 1). The part is the kernel's sweep of the torus as t runs from// -180 to 180 degrees, read as the torus turning about A seen from a frame turning +t about B.unit mm
use std
use std.solids
use std.place (above, right_of)
use std.motion (turns)
// the torus: its tube's circle drawn in the front plane, 1 out from its upright axis through// (2.02, 0, 1), turned about that axisin std.front {
private c := point
fix((2.02, 1)) c
private c_up := point
c_up above(d: 1mm) c
construction centerline torus_axis := line(c, c_up)
private tc := point
tc right_of(d: 1mm) c
private tube := circle(center: tc) hint(r: 0.16)
radius(0.16mm) tube
}
construction torus := solid(std.solids.Revolution(face(tube), about: torus_axis))
// A: the upright line through (2, 0, 0)private a_foot := point
fix((2, 0, 0)) a_foot
private a := axis
fix(dir == (0, 0, 1)) a
a_foot coincident a
// B: the line through q = (0, 0, 0)// along u = (cos 89, sin 89 cos 1, sin 89 sin 1)private q := point
fix((0, 0, 0)) q
private b := axis
fix(dir == (cos(89deg), sin(89deg) * cos(1deg), sin(89deg) * sin(1deg))) b
q coincident b
// the torus turns 1.01 t about A while the frame it is seen from turns t about B, so seen from// that frame it is turned 1.01 t about A and then -t about Bprivate spin := frame
spin turns(1.01) a
private observer := frame
observer turns(1) b
part := solid({ p | some t in (-180deg, 180deg): p in torus at(under: spin, seen_from: observer) t })
anvilcad left no solid to show.
Time
1.2 ms; CPU time 960 µs; peak memory 3.5 MB
Notes
refused anvil-brep has no sweep of a solid: a body tumbled by two turns at once sweeps envelopes of its surfaces that follow from no elementary construction, which it would have to compute itself
//! A thicker torus under the nearly perpendicular tumble.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid: a body tumbled by two turns at once sweeps envelopes of its surfaces that follow from no elementary construction, which it would have to compute itself".into())
}