A curved block with a helical groove milled through it by a drum screwed across it, as an end mill mills a helical groove.
The block is a sector of a ring about the z axis: everything with distance from the z axis between 8 and 12, with z between −1 and 1, and with polar angle between 0° and 60° (measured from +x toward +y).
The drum is a solid cylinder of radius 1 about the vertical line through (10, 0), from z = −0.5 to z = 0.5, its ends flat.
It is carried along a screw about the z axis: it turns right-handed about it (from +x toward +y) and rises 0.5 for every whole turn, rigidly, from a turn of −140° to one of +140°. It starts clear of the block, passes wholly through it, and ends clear of it. Cut from the block everything the drum passes through.
The drum's flat ends keep no plane: each sweeps a thin helical ramp.
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 occt'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
2.47 s; CPU time 6.46 s; peak memory 33.8 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
62.5700536354
area
200.454408361
agrees with
no other kernel
mesh
199044 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.806; Ixy 200.93; Iyz 1.24693; Izx -0.850698
//! A ring sector (radii 8 to 12 about z, z from −1 to 1, polar angle 0° to 60°) with a helical//! groove milled through it by a drum, the cylinder of radius 1 about the vertical line through//! (10, 0) from z = −0.5 to 0.5, screwed about z, right-handed and rising 0.5 a turn, from a turn//! of −140° to +140°.usecrate::sketch::polygon;
use cad_kernel::build::{disc, prism, revolve};
use cad_kernel::geom::{tolerance, V};
use cad_kernel::swept::closed::cut_from;
use cad_kernel::topo::Brep;
use cad_kernel::trajectory::{Screw, Trajectory};
use std::f64::consts::FRAC_PI_3;
constUP: V = [0., 0., 1.];
constDRUM_FOOT: V = [10., 0., -0.5];
constDRUM_RADIUS: f64 = 1.;
constDRUM_HEIGHT: f64 = 1.;
/// How far the screw rises a whole turn.constRISE: f64 = 0.5;
/// How far the screw turns each way from where the drum is drawn, in degrees.constTURN: f64 = 140.;
/// How closely the drum is meshed for the sweep's membership reads: a five-hundredth of its radius.constBAR: f64 = 0.002;
/// The ring sector: its section in the half-plane at 0° turned 60° about z.fnsector() -> Result<Brep, String> {
let section = polygon(&[[8., 0., -1.], [12., 0., -1.], [12., 0., 1.], [8., 0., 1.]]);
revolve(§ion, [0.; 3], UP, FRAC_PI_3)
}
pubfnbuild() -> Result<Brep, String> {
let block = sector()?;
let drum = prism(&disc(DRUM_FOOT, UP, DRUM_RADIUS), 0., DRUM_HEIGHT)?;
// the screw about z: a radian a radian of the roll, rising `RISE` a turnlet path = Trajectory::Twist(Screw { origin: [0.; 3], axis: UP, ratio: 1., advance: RISE });
// the kernel's closed swept solid cut from the sector on one arrangement: the drum's side// touches along its generators in the plane through both axes, screwed into coaxial cylinders,// and its rims' discs screw into helical rampslet size = block.size().max(drum.size());
let turn = TURN.to_radians();
cut_from(&block, &drum, &path, [-turn, turn], BAR, tolerance(size))
.map_err(|why| format!("the drum's sweep not built: {why:?}"))
}
Time
2.73 s; CPU time 2.73 s; peak memory 433.9 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Workaround † no sweep of a solid
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
62.5700536844
area
200.454223762
agrees with
no other kernel
mesh
120170 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.806; Ixy 200.93; Iyz 1.24693; Izx -0.850698
"""A helical groove milled by a drum screwed across a block. A curved block with a helical groove
milled through it by a drum screwed across it, as an end mill mills a helical groove.
The block is a sector of a ring about the z axis: everything with distance from the z axis between
8 and 12, with z between −1 and 1, and with polar angle between 0° and 60° (measured from +x toward
+y).
The drum is a solid cylinder of radius 1 about the vertical line through (10, 0), from z = −0.5 to
z = 0.5, its ends flat.
It is carried along a screw about the z axis: it turns right-handed about it (from +x toward +y)
and rises 0.5 for every whole turn, rigidly, from a turn of −140° to one of +140°. It starts clear
of the block, passes wholly through it, and ends clear of it. Cut from the block everything the
drum passes through.
The drum's flat ends keep no plane: each sweeps a thin helical ramp."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from sweep import cut, plane, ring_sector, screw, screwed
BLOCK = (8, 12, -1, 1, 0, 60) # radii, heights and polar anglesAXIS = (10, 0) # the drum stands on the vertical line through this pointRADIUS, LOW, HIGH = 1, -0.5, 0.5LEAD = 0.5# rise per whole turnSTART, STOP = -140, 140# degreesdefbuild():
drum = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(*AXIS, LOW), gp.DZ_s()), RADIUS, HIGH - LOW)
tool = screw(drum.Shape(), LEAD, START)
# The drum's side, upright, has level normals, square to the screw's rise: it meets the# screw square-on where it meets the turn, along its lines in the plane through both axes.# Its flat ends rise or sink all over.
through_axes = screw(plane((0, 0, 0), (0, 1, 0)), LEAD, START)
returncut(ring_sector(*BLOCK), screwed(tool, LEAD, START, STOP, [through_axes]))
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.
Time
82 ms; CPU time 93 ms; peak memory 20.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
62.5701192274
area
200.454323759
agrees with
no other kernel
mesh
148628 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.807; Ixy 200.93; Iyz 1.24692; Izx -0.850695
//! A curved block, the sector of the ring about the z axis between radii 8 and 12, z from −1 to 1//! and polar angle from 0° to 60°, with a helical groove milled through it by a drum: the solid//! cylinder of radius 1 about the vertical line through (10, 0), |z| ≤ 0.5, carried along the//! screw about the z axis, right-handed, rising 0.5 a turn, from a turn of −140° to +140°.//! Everything the drum passes through, cut.//!//! The drum's sweep is kentron's sweep of a solid (`sweep::solid`, one screw), cut from the block.usecrate::bench::{frame, p};
usecrate::shared::swept::ring_sector;
use kentron::math::{Axis, Direction};
use kentron::primitives::Cylinder;
use kentron::sweep::{self, RigidMotion};
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let block = ring_sector(m)?;
let drum = Cylinder::new(1.0, 1.0).with_frame(frame(p(10.0, 0.0, -0.5), Direction::Z)).build(m)?;
let screw = RigidMotion::Screw { axis: Axis::Z, lead: 0.5, from: (-140f64).to_radians(), to: 140f64.to_radians() };
let swept = sweep::solid(m, drum, &screw)?;
kentron::boolean::difference(m, block, swept)
}
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.
Time
4.00 s; CPU time 4.00 s; peak memory 60 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
Workaround † no sweep of a solid
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.
//! A sector of a ring about the z axis (radii 8 to 12, z from −1 to 1, polar angles 0° to 60°)//! with a helical groove milled by a drum, the cylinder of radius 1 about the upright line through//! (10, 0) from z = −0.5 to z = 0.5, carried along the screw about the z axis that rises 0.5 a//! turn, from a turn of −140° to one of +140°.//!//! solidcraft-kernel has no sweep of a solid, so the drum's sweep is built by elementary geometry//! from the kernel's helical sweep of planar regions (`sweep_helix`). The drum's side meets the//! screw's motion square-on along its two lines in the plane y = 0, through both axes. Split by//! that plane, the half on y ≥ 0 moves away from a point only through its bottom and the cut (the//! screw turns from +x toward +y), so a point it passes over and leaves before the end is left//! through one of those; the half on y ≤ 0 likewise first reaches a point through its top or the//! cut. So the drum's sweep is the drum where it starts and where it ends, clear of the block, with//! the screw sweeps of its section by y = 0 and its two ends, each of which crosses the motion,//! never moving along itself.usesuper::square_bar_screwed_through_rod::screw;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
let (lead, start, stop) = (0.5, -140.0, 140.0);
letmut block = revolve_z(rect(8.0, -1.0, 12.0, 1.0), 60.0)?;
block = cut(&block, &screw(&xz(), &rect(9.0, -0.5, 11.0, 0.5), lead, start, stop)?)?;
for z in [0.5, -0.5] {
let end = Plane { origin: v3(0.0, 0.0, z), x: Vec3::X, y: Vec3::Y };
block = cut(&block, &screw(&end, &disc((10.0, 0.0), 1.0), lead, start, stop)?)?;
}
Ok(block)
}
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 helical groove milled by a drum screwed across a block.//// 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
211 ms; CPU time 211 ms; peak memory 32.1 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
62.5700538183
area
200.454277618
agrees with
no other kernel
mesh
149284 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.806; Ixy 200.93; Iyz 1.24693; Izx -0.850697
//! A ring sector grooved by a drum screwed across it.//!//! The kernel's whole sweep of a solid (`sweep_solid`): the drum is a solid of revolution about//! the vertical line through (10, 0), its meridian the rectangle out to radius 1 from z = −0.5 to//! 0.5, swept by the screw about the z axis that rises 0.5 a turn, from −140° to +140°; cut from the//! block (the rectangle 8 ≤ x ≤ 12, |z| ≤ 1 revolved from 0° to 60°).usecrate::solids::{p, polygon};
usecrate::Refusal;
use brep_kernel::{
boolean_operation_nary, revolve_profile_brep, sweep_solid, BooleanOperation, BrepSolid,
OutlinePiece, ScrewStep, SolidMotion, SolidTool,
};
#[allow(unused_imports)]use std::f64::consts::{FRAC_PI_2, PI, TAU};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let z = p(0.0, 0.0, 1.0);
let section = [p(8.0, 0.0, -1.0), p(12.0, 0.0, -1.0), p(12.0, 0.0, 1.0), p(8.0, 0.0, 1.0)];
let block = revolve_profile_brep(&polygon(§ion)?, p(0.0, 0.0, 0.0), z, 60f64.to_radians())?;
let tool = SolidTool::Revolved {
axis_origin: p(10.0, 0.0, 0.0),
axis_direction: z,
radial: p(1.0, 0.0, 0.0),
meridian: vec![
OutlinePiece::Line { from: [0.0, -0.5], to: [1.0, -0.5] },
OutlinePiece::Line { from: [1.0, -0.5], to: [1.0, 0.5] },
OutlinePiece::Line { from: [1.0, 0.5], to: [0.0, 0.5] },
OutlinePiece::Line { from: [0.0, 0.5], to: [0.0, -0.5] },
],
};
let motion = SolidMotion {
steps: vec![ScrewStep { axis_origin: p(0.0, 0.0, 0.0), axis_direction: z, turn: 1.0, advance: 0.5 / TAU }],
from: (-140.0f64).to_radians(),
to: 140.0f64.to_radians(),
};
letmut operands = vec![block];
operands.push(sweep_solid(&tool, &motion)?);
Ok(boolean_operation_nary(&operands, BooleanOperation::Subtract)?)
}
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
78 ms; CPU time 186 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
62.5700535909
area
200.454385661
agrees with
no other kernel
mesh
166880 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.806; Ixy 200.93; Iyz 1.24693; Izx -0.850698
//! A curved block (the ring sector between radii 8 and 12, heights ±1, polar angles 0° to 60°)//! with a helical groove milled by a drum (radius 1 about the upright through (10, 0), from z =//! −0.5 to 0.5) screwed about the z axis, rising 0.5 a turn, from a turn of −140° to +140°.//!//! What the drum passes through is cadrs's sweep of a solid (a turn and a slide along its axis at//! once: a screw), cut from the block (cadrs's cylindrical box).usecrate::bench::{cut, cylinder, p3, v3};
usecrate::shared::swept::{ring_sector, screwed, z_axis};
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let block = ring_sector(k, (8.0, 12.0), (-1.0, 1.0), (0.0, 60.0))?;
let drum = cylinder(k, p3(10.0, 0.0, -0.5), v3(0.0, 0.0, 1.0), 1.0, 1.0)?;
let swept = screwed(k, drum, z_axis(), 0.5, -140.0, 140.0)?;
cut(k, block, swept)
}
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.
Time
245 ms; CPU time 242 ms; peak memory 12.2 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
62.5700536681
area
200.454280196
agrees with
no other kernel
mesh
153204 triangles, closed
centre of gravity
(8.4083, 4.85453, -0.0141213) its STEP's solid
inertia
about it, of unit density: Ixx 478.462; Iyy 246.448; Izz 672.806; Ixy 200.93; Iyz 1.24693; Izx -0.850698
//! The ring sector (radii 8 to 12, heights −1 to 1, angles 0° to 60°) less everything a drum//! passes through as it is screwed about the z axis, rising 0.5 a turn, from a turn of −140° to one//! of 140°: the cylinder of radius 1 about the upright line through (10, 0), from z = −0.5 to 0.5.use springrep::boolean::difference;
use springrep::primitive::cylinder;
use springrep::sweep::solid;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::{deg, screwing, sector_block};
pubfnbuild() -> Result<Brep, String> {
let drum = cylinder(&crate::shared::at([10.0, 0.0, -0.5]), 1.0, 1.0, "drum").map_err(e)?;
let swept = solid(&drum, &screwing(0.5, deg(-140.0), deg(140.0)), "screw").map_err(e)?;
difference(§or_block()?, &swept).map_err(e)
}
geomsolver left no solid to show.
Time
8.40 s; CPU time 15.3 s; peak memory 97.5 MB
Notes
refused solventc: `groove` is in the closed class (a screw), its tool's 3 faces and 3 edges read as planes and lines, to be cut from the blank on one arrangement
solventc: [ 0.0 s] `part`: the static blank by this kernel: 83.775804 mm³, 6 faces (268.511µs)
solventc: [ 1.7 s] `groove` (a screw) cut from the blank on one arrangement: 11 faces (1.684652377s)
solventc: [ 1.7 s] the solid by the Rust kernel: 11 faces, 31 edges
solventc: the mesh has 4 triangles facing against their surfaces
solventc: `part` is read by its material field, and `--stl-backend mesh` writes that reading instead: drawn from the field, not built, and not held to the export's tolerance
// A curved block, the ring sector between radii 8 and 12 about the z axis, z within 1, polar angle// from 0 to 60 degrees: its section in the front plane (x, z) turned 60 degrees about the z axis.// A drum, the cylinder of radius 1 about the upright line through (10, 0) from z = -0.5 to 0.5,// carried by a screw about the z axis that turns right-handed (from +x toward +y) and rises 0.5 a// turn, from a turn of -140 degrees to one of +140, and everything it passes through cut from the// block.unit mm
use std
use std.solids
use std.solids (cut)
use std.motion (screws)
in std.front {
a := point
b := point hint((12, -1))
c := point hint((12, 1))
d := point hint((8, 1))
meridian := horizontal line(a, b) -> vertical line(b, c) ->
horizontal line(c, d) -> vertical line(d, a) -> close
fix((8, -1)) a
a distance(4) b
b distance(2) c
}
part := solid(std.solids.Revolution(meridian, about: std.z, to: 60deg))
in std.top {
o := point
fix((10, 0)) o
rim := circle(center: o) hint(r: 1)
radius(1) rim
}
drum := solid(std.solids.Prism(face(rim), from: -0.5mm, to: 0.5mm))
climb := frame
climb screws(0.5mm) std.z
groove := solid({ p | some t in (-140deg, 140deg): p in drum at(under: climb) t })
groove cut part
anvilcad left no solid to show.
Time
1.2 ms; CPU time 990 µs; peak memory 3.5 MB
Notes
refused anvil-brep has no sweep of a solid and no helical curve: a body screwed along an axis sweeps envelopes of its surfaces under the screw, which it cannot make from its profile sweeps
//! A helical groove milled by a drum screwed across a block.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid and no helical curve: a body screwed along an axis sweeps envelopes of its surfaces under the screw, which it cannot make from its profile sweeps".into())
}