Make two swept solids A and B from the same torus: center (3, 0, 2), axis parallel to z, major radius 1, tube radius 0.22, including its interior.
The first oriented rotation axis is the vertical line through (2, 0, 0). The second is through q = (0, 0.7071 cos 45°, 0.7071 sin 45°), in unit direction u = (cos 20°, sin 20° cos 45°, sin 20° sin 45°). Both axes stay fixed in the world.
For A, at roll t first turn the torus by 0.7t about the first axis and then by −t about the second. For B, first turn it by 0.7t about the first axis and then by +t about the second. Each solid is the union of all its positions for every real t from −100° to +100°, including the end poses. These are the solids separately described in swept/tumbling-torus-crossed-forward and swept/tumbling-torus-crossed-reverse.
The result is the regularized intersection: the closure of the interior of the set of points in A and in B. Each sweep quantifies its own roll independently. In particular, this is the intersection of the two completed sweeps, not a sweep of the instantaneous intersection at a shared t. Keep every volumetric component. Count overlaps once and discard internal sheets.
This isolates the interaction between two envelopes from the construction of either operand. The boundary switches between envelope sheets at their intersections, forming sharp curves and potentially narrow surviving regions.
No closed-form volume or area is asserted; this case is unsettled.
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 cadrs'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
39.0 s; CPU time 103.2 s; peak memory 1996.1 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Data
measured
volume
4.61657873269
area
36.8640100782
agrees with
no other kernel
faces
40 bspline, 16 torus
mesh
63082 triangles, closed
centre of gravity
(2.85899, 0.317349, 1.7859) its triangles
inertia
about it, of unit density: Ixx 5.80172; Iyy 5.49673; Izz 5.94694; Ixy 1.10217; Iyz -0.667972; Izx 0.333599
not by the harness, which graded the runner's own measures instead: cannot measure: face #2058572: a loop whose path on its surface breaks (an edge laid across a place where its surface meets itself?)
//! The regularized intersection of two independently swept tori, not of synchronized poses.//!//! Asked at the tolerance its operands are built to (`Tumble::tolerance`, a fifty-thousandth of//! the tube's radius), as `ring_pushed_in_at_a_lean` asks its cut at its sweep's: at the kernel's//! own, a billionth of the size, the arrangement would resolve its sheets some five hundred times//! finer than they are fitted.usesuper::{tumbling_torus_crossed_forward, tumbling_torus_crossed_reverse};
use cad_kernel::boolean::{combined, Op};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
let a = tumbling_torus_crossed_forward::build().map_err(|e| format!("forward operand: {e}"))?;
let b = tumbling_torus_crossed_reverse::build().map_err(|e| format!("reverse operand: {e}"))?;
// at the tolerance the two are built to: no finer than what it combineslet tol = tumbling_torus_crossed_forward::tumble().tolerance();
combined(&a, &b, Op::Common, tol).map_err(|e| format!("swept operands' intersection: {e}"))
}
occt left no solid to show.
Time
635 ms; CPU time 634 ms; peak memory 356.5 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-crossed-intersection.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.2 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 intersection of the two torus tumbles of `swept/tumbling-torus-crossed-forward` and//! `swept/tumbling-torus-crossed-reverse`: the torus centred at (3, 0, 2), radii 1 and 0.22,//! turned by 0.7t about the vertical line through (2, 0, 0) and then by ∓t about a second, skew//! line, for t from −100° to 100°, each sweep over its own t.//!//! Each tumble is kentron's sweep of a solid (`sweep::solid`) under the tumble given by its places//! (`shared::swept::crossed_tumble`); the intersection is kentron's boolean of the two.//! kentron's sweep refuses each tumble: the curves where the motion grazes the torus move over it,//! so its envelope is no product of a fixed curve and the motion.usecrate::shared::swept::crossed_tumble;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let forward = crossed_tumble(m, -1.0)?;
let reverse = crossed_tumble(m, 1.0)?;
kentron::boolean::intersection(m, forward, reverse)
}
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 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; this case intersects two such sweeps.//! 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
// The intersection of opposing torus tumbles.//// 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.
next.BREP left no solid to show.
Time
25.4 s; CPU time 25.4 s; peak memory 171.9 MB
Notes
refused sweepSolid: the ring's grazing curves turn too fast
//! The intersection of the crossed pair of torus tumbles, each swept by the kernel's//! `sweep_solid_tumbled` (`swept/tumbling-torus-crossed-forward` and `-reverse`), then a boolean.usecrate::solids::swept::crossed_tumble;
usecrate::Refusal;
use brep_kernel::{boolean_operation, BooleanOperation, BooleanOptions, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let forward = crossed_tumble(-1.0)?;
let reverse = crossed_tumble(1.0)?;
Ok(boolean_operation(&forward, &reverse, BooleanOperation::Intersect, &BooleanOptions::default())?)
}
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
8.86 s; CPU time 32.7 s; peak memory 64.4 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Data
measured
volume
4.61657774596
area
36.8640127002
agrees with
no other kernel
faces
43 bspline, 10 torus
mesh
30492 triangles, closed
centre of gravity
(2.85932, 0.317752, 1.78493) its triangles
inertia
about it, of unit density: Ixx 5.77743; Iyy 5.47407; Izz 5.92095; Ixy 1.09787; Iyz -0.665399; Izx 0.332778
not by the harness, which graded the runner's own measures instead: cannot measure: face #17332: a loop whose path on its surface breaks (an edge laid across a place where its surface meets itself?)
//! The regularized intersection of the two crossed tumbling tori (`swept/tumbling-torus-crossed-forward`//! and `-reverse`): each swept on its own (cadrs's sweep of a solid), then cadrs's boolean.usecrate::shared::swept::crossed_tori;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let (a, b) = crossed_tori(k)?;
crate::bench::common(k, a, b)
}
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
54 ms; CPU time 54 ms; peak memory 9.2 MB
Notes
refused unsupported: a sweep along a motion whose velocity changes on the body, of a torus that grazes along a whole meridian
//! The intersection of the crossed-forward and crossed-reverse tumbling tori's swept solids.use springrep::boolean::intersection;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::crossed;
pubfnbuild() -> Result<Brep, String> {
intersection(&crossed(-1.0)?, &crossed(1.0)?).map_err(e)
}
geomsolver left no solid to show.
Time
46 ms; CPU time 47 ms; peak memory 24.2 MB
Notes
refused error[E080]: `part`: native CAD boundary construction for continuous motion sweeps is not yet supported
// The regularized intersection of two torus tumbles, each swept over its own roll. The torus is// centred at (3, 0, 2), its axis along z, its tube (radius 0.22) 1 from that axis. Sweep A turns it// 0.7 t about the upright line through (2, 0, 0) and then -t about B, the line through q =// (0, h cos 45, h sin 45), h = 0.7071, along u = (cos 20, sin 20 cos 45, sin 20 sin 45); sweep B// the same but +t about B; t runs -100 to 100 degrees in each. Each is the kernel's sweep of the// torus turning about A seen from a frame turning about B; the part is A in common with B.unit mm
use std
use std.solids (common)
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// (3, 0, 2), turned about that axisin std.front {
private c := point
fix((3, 2)) 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.22)
radius(0.22mm) 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.7071 cos 45, 0.7071 sin 45)// along u = (cos 20, sin 20 cos 45, sin 20 sin 45)private q := point
fix((0, 0.7071 * cos(45deg), 0.7071 * sin(45deg))) q
private b := axis
fix(dir == (cos(20deg), sin(20deg) * cos(45deg), sin(20deg) * sin(45deg))) b
q coincident b
private spin_fwd := frame
spin_fwd turns(0.7) a
private observer_fwd := frame
observer_fwd turns(1) b
private spin_rev := frame
spin_rev turns(0.7) a
private observer_rev := frame
observer_rev turns(-1) b
construction reverse := solid({ p | some t in (-100deg, 100deg): p in torus at(under: spin_rev, seen_from: observer_rev) t })
part := solid({ p | some t in (-100deg, 100deg): p in torus at(under: spin_fwd, seen_from: observer_fwd) t })
reverse common part
anvilcad left no solid to show.
Time
1.1 ms; CPU time 950 µs; peak memory 3.3 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
//! The intersection of opposing torus tumbles.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())
}