The solid a thick disc fills as it is turned partway about an upright line that passes through its rim.
The disc is a solid cylinder of radius 2 whose axis is the line through (2, 0, 0) parallel to the y axis, from y = 0 to y = 0.5, its faces flat. Its rim in the plane y = 0, a sharp circle of radius 2, passes through the origin, on the z axis.
It turns rigidly about the z axis, right-handed (from +x toward +y), by 90°. Make the solid of everything the disc passes through.
Each rim is a sharp circle leaning to the turn's velocity; the one through the axis sweeps a surface of revolution that closes on the axis, and the disc's flat face there turns about a line in its own plane.
expected
closed form
volume
46.54700107
no closed form: OCCT and cadrs give the same volume to the twelve figures the board publishes
area
71.45505715
no closed form: OCCT and cadrs give the same area to the twelve figures the board publishes
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
1.18 s; CPU time 3.40 s; peak memory 23 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
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.
//! The solid a disc fills — the cylinder of radius 2 about the line through (2, 0, 0) along y, from//! y = 0 to 0.5, its faces flat — as it turns rigidly about the z axis, right-handed, by 90°. Its//! rim in the plane y = 0 passes through the origin, on the axis.//!//! The kernel's closed sweep (`swept::closed::closed`) takes the coin whole: under a turn its//! closed class takes a sharp circle leaning to the axis only clear of it, and refuses one through//! the axis (`Unbuilt::Curved`), whose ring closes on the axis; since 0.10.0 such a tool goes the//! contact's road — each sheet on the surface of revolution of its section's meridian, cut where//! the meridian crosses the axis, a pole of the sheets either side, and trimmed by membership in//! the sweep.use cad_kernel::build::{disc, prism};
use cad_kernel::geom::{tolerance, V};
use cad_kernel::swept::closed::closed;
use cad_kernel::topo::Brep;
use cad_kernel::trajectory::{Screw, Trajectory};
constUP: V = [0., 0., 1.];
constCENTRE: V = [2., 0., 0.];
constALONG: V = [0., 1., 0.];
constRADIUS: f64 = 2.;
constTHICKNESS: f64 = 0.5;
/// The turn, in degrees.constTURN: f64 = 90.;
/// How closely the disc is meshed for the sweep's membership reads: a thousandth of its radius.constBAR: f64 = 0.002;
pubfnbuild() -> Result<Brep, String> {
let coin = prism(&disc(CENTRE, ALONG, RADIUS), 0., THICKNESS)?;
// the turn about z: a screw that does not advance, a radian a radian of the rolllet path = Trajectory::Twist(Screw { origin: [0.; 3], axis: UP, ratio: 1., advance: 0. });
// the kernel's closed swept solid: the side, a cylinder about an axis square to the turn's,// touching along a curve turned into a surface of revolution, and each rim a sharp circle// leaning to the axis turned into its ringclosed(&coin, &path, [0., TURN.to_radians()], BAR, tolerance(coin.size()))
.map_err(|why| format!("the disc's sweep not built: {why:?}"))
}
Time
832 ms; CPU time 831 ms; peak memory 374.2 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
not by the harness, which graded the runner's own measures instead: cannot measure: face #332: a loop that does not join up on its surface ((1.5707963267948966, 6.283185307179586) to (1.5707963267948966, 4.7123889909214025))
"""A disc turned about an upright line through its rim. The solid a thick disc fills as it is
turned partway about an upright line that passes through its rim.
The disc is a solid cylinder of radius 2 whose axis is the line through (2, 0, 0) parallel to the y
axis, from y = 0 to y = 0.5, its faces flat. Its rim in the plane y = 0, a sharp circle of radius
2, passes through the origin, on the z axis.
It turns rigidly about the z axis, right-handed (from +x toward +y), by 90°. Make the solid of
everything the disc passes through.
Each rim is a sharp circle leaning to the turn's velocity; the one through the axis sweeps a
surface of revolution that closes on the axis, and the disc's flat face there turns about a line in
its own plane."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from sweep import plane, turned, unified, united
CENTRE = (2, 0, 0) # the middle of the face y = 0, on the disc's axisRADIUS, THICK = 2, 0.5TURN = 90# degrees about the z axisdefbuild():
coin = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(*CENTRE), gp.DY_s()), RADIUS, THICK).Shape()
# At the point (2 + 2 cos t, y, 2 sin t) of the disc's side, its normal (cos t, 0, sin t) is# square to the velocity ẑ × p = (−y, 2 + 2 cos t, 0) where y cos t = 0: on its rim in the# face y = 0, and along its two lines at x = 2 (top and bottom), where the plane x = 2 cuts# it. Its flat faces meet the turn square-on along the plane x = 0 through the axis and# their normal, which reaches them only at a point of their rims.returnunified(united(turned(coin, gp.OZ_s(), TURN, [plane(CENTRE, (1, 0, 0))])))
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
9.5 ms; CPU time 9.2 ms; peak memory 10.1 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
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.
//! The solid a thick disc fills as it is turned about an upright line through its rim: the solid//! cylinder of radius 2 about the line through (2, 0, 0) along y, from y = 0 to 0.5, turned rigidly//! about the z axis by 90°.//!//! kentron's sweep of a solid (`sweep::solid`, one turn), which refuses it: the turn's axis//! touches the coin's rim, and kentron's sweep refuses a turn about an axis meeting the tool.usecrate::bench::{frame, p};
use kentron::math::{Axis, Direction};
use kentron::primitives::Cylinder;
use kentron::sweep::{self, RigidMotion};
use kentron::topology::{Model, Shape};
use std::f64::consts::FRAC_PI_2;
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let coin = Cylinder::new(2.0, 0.5).with_frame(frame(p(2.0, 0.0, 0.0), Direction::Y)).build(m)?;
sweep::solid(m, coin, &RigidMotion::Turn { axis: Axis::Z, from: 0.0, to: FRAC_PI_2 })
}
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
1.03 s; CPU time 1.03 s; peak memory 49.8 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
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.
//! The solid a thick disc fills as it is turned 90° about the z axis, right-handed: the solid//! cylinder of radius 2 about the line through (2, 0, 0) along y, from y = 0 to 0.5, whose rim in//! the plane y = 0 passes through the origin, on the z axis.//!//! solidcore-ops has no sweep of a solid, so the turn is built by elementary geometry, from the//! kernel's revolves of flat regions about the z axis. At height z the disc is the rectangle//! 2 − c ≤ x ≤ 2 + c, 0 ≤ y ≤ 0.5, c = √(4 − z²), which meets each circle about the z axis in one//! arc (going round, x falls and y rises), a few degrees wide. Turned by 90°, a solid that meets//! each circle in one arc passes over that arc where it starts, the arc where it stops, and//! between them the 90° on from any one point of the arc; so the sweep is the disc where it stops//! with, revolved through the turn, flat regions of the disc that between them meet every circle//! the disc meets, and with what of the disc where it starts lies behind them. The half of its//! face in the plane y = 0 nearer the axis (x ≤ 2) meets the circles out from 2 − c to 2, which it//! meets at 0°, the disc's first point on them, so nothing of the disc there lies behind it; its//! section by the plane x = 2 (the rectangle 0 ≤ y ≤ 0.5, |z| ≤ 2) meets those from 2 to//! √(2² + 0.5²), and the half of its face in the plane y = 0.5 beyond that plane those on out to//! its far corners, √((2 + c)² + 0.5²). What lies behind those two on their circles is the//! disc's half beyond the plane x = 2. Each of the three regions meets each circle once, so turns//! without folding over itself.usecrate::bench::{arc, common, fuse_all, line, polygon, rotated, translated};
usecrate::Refusal;
use solidcore_ops::sweep::revolve;
use solidcore_ops::{make_box, make_cylinder, Body};
use std::f64::consts::FRAC_PI_2;
pubfnbuild() -> Result<Body, Refusal> {
let (z, turn) = ([0.0, 0.0, 1.0], FRAC_PI_2);
// the kernel's cylinder stands on +z: turned a quarter turn back about x it lies along +ylet disc = || -> Result<Body, Refusal> {
let upright = make_cylinder([0.0; 3], 2.0, 0.5)?;
translated(rotated(upright, [0.0; 3], [1.0, 0.0, 0.0], -90.0)?, [2.0, 0.0, 0.0])
};
// about +y, angle 0 along +x, so counter-clockwise runs from −z through −x (the origin) to +zlet near_half = [
arc([2.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0], 2.0, FRAC_PI_2, 3.0 * FRAC_PI_2),
line([2.0, 0.0, 2.0], [2.0, 0.0, -2.0]),
];
let middle = polygon(&[[2.0, 0.0, -2.0], [2.0, 0.5, -2.0], [2.0, 0.5, 2.0], [2.0, 0.0, 2.0]]);
// about −y, angle 0 along +x, so counter-clockwise runs from −z through +x up to +zlet far_half = [
arc([2.0, 0.5, 0.0], [0.0, -1.0, 0.0], [1.0, 0.0, 0.0], 2.0, -FRAC_PI_2, FRAC_PI_2),
line([2.0, 0.5, 2.0], [2.0, 0.5, -2.0]),
];
let behind = common(disc()?, make_box([2.0, -1.0, -3.0], [3.0, 3.0, 6.0])?)?;
let pieces = [
revolve(&near_half, [0.0; 3], z, turn, true)?,
revolve(&middle, [0.0; 3], z, turn, true)?,
revolve(&far_half, [0.0; 3], z, turn, true)?,
behind,
rotated(disc()?, [0.0; 3], z, 90.0)?,
];
fuse_all(pieces)
}
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 motion's envelope is not one its extrudes, revolves and booleans make exactly
// A disc turned about an upright line through its rim.//// Refused: popkern has no sweep of a solid (its sweeps carry a profile along a path), and the// envelope this motion leaves is not one its extrudes, revolves and booleans make exactly: the// tool is not symmetric about the planes of its motion, or the motion is a screw or a curve.throw"popkern has no sweep of a solid, and this motion's envelope is not one its extrudes, revolves and booleans make exactly";
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
19 ms; CPU time 19 ms; peak memory 11.2 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
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.
//! The solid a thick disc fills as it is turned 90° about the z axis, which passes through its rim.//!//! Through the kernel's whole sweep of a solid (`sweep_solid`): the disc is a solid of revolution//! about the line through (2, 0, 0) along y, its meridian the rectangle out to radius 2 from y = 0//! to y = 0.5; turned about the z axis from 0° to 90°.usecrate::solids::p;
usecrate::Refusal;
#[allow(unused_imports)]use brep_kernel::{
boolean_operation_nary, make_box_brep, make_cylinder_brep, revolve_profile_brep,
sweep_solid, BooleanOperation, BrepSolid, OutlinePiece, ScrewStep, SolidMotion,
SolidTool, Vec3,
};
#[allow(unused_imports)]use std::f64::consts::{FRAC_PI_2, PI, TAU};
pubfnbuild() -> Result<BrepSolid, Refusal> {
letmut bodies = Vec::new();
let tool0 = SolidTool::Revolved {
axis_origin: p(2.0, 0.0, 0.0),
axis_direction: p(0.0, 1.0, 0.0),
radial: p(1.0, 0.0, 0.0),
meridian: vec![
OutlinePiece::Line { from: [0.0, 0.0], to: [2.0, 0.0] },
OutlinePiece::Line { from: [2.0, 0.0], to: [2.0, 0.5] },
OutlinePiece::Line { from: [2.0, 0.5], to: [0.0, 0.5] },
OutlinePiece::Line { from: [0.0, 0.5], to: [0.0, 0.0] },
],
};
let motion0 = SolidMotion {
steps: vec![
ScrewStep { axis_origin: p(0.0, 0.0, 0.0), axis_direction: p(0.0, 0.0, 1.0), turn: 1.0, advance: 0.0 },
],
from: 0.0,
to: FRAC_PI_2,
};
bodies.push(sweep_solid(&tool0, &motion0)?);
Ok(boolean_operation_nary(&bodies, 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
12 ms; CPU time 27 ms; peak memory 9.3 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
not by the harness, which graded the runner's own measures instead: cannot measure: face #194: a loop whose path on its surface breaks (an edge laid across a place where its surface meets itself?)
//! The solid a thick disc (radius 2 about the line through (2, 0, 0) along y, from y = 0 to 0.5)//! fills as it turns 90° about the z axis, which passes through its rim.//!//! The disc is a circle extruded; what it passes through is cadrs's sweep of a solid (one//! turn).usecrate::bench::{cylinder, p3, v3};
usecrate::shared::swept::{swung, z_axis};
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let coin = cylinder(k, p3(2.0, 0.0, 0.0), v3(0.0, 1.0, 0.0), 2.0, 0.5)?;
swung(k, coin, z_axis(), 0.0, 90.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.
Time
48 ms; CPU time 48 ms; peak memory 8.5 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
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.
//! The solid a thick disc (radius 2 about the line through (2, 0, 0) along y, from y = 0 to 0.5)//! fills as it turns 90° about the z axis.use std::f64::consts::PI;
use springrep::math::{Frame, Vec3};
use springrep::primitive::cylinder;
use springrep::sweep::solid;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::{turning, v3};
pubfnbuild() -> Result<Brep, String> {
let face = Frame::new(v3(2.0, 0.0, 0.0), Vec3::Y, Vec3::X).map_err(e)?;
let disc = cylinder(&face, 2.0, 0.5, "disc").map_err(e)?;
solid(&disc, &turning(0.0, PI / 2.0), "turn").map_err(e)
}
geomsolver left no solid to show.
Time
44 ms; CPU time 44 ms; peak memory 22.5 MB
Notes
refused error[E080]: `part`: native CAD boundary construction for continuous motion sweeps is not yet supported
// The solid a thick disc fills as it is turned partway about an upright line through its rim: the// cylinder of radius 2 about the line through (2, 0, 0) along y, from y = 0 to y = 0.5 (its face// drawn in the front plane and carried along y), turned rigidly 90 degrees about the z axis,// right-handed (from +x toward +y).unit mm
use std
use std.solids
use std.motion (turns)
// the front plane's normal is -y, so the disc stands from 0 to 0.5 behind itin std.front {
o := point
fix((2, 0)) o
rim := circle(center: o) hint(r: 2)
radius(2) rim
}
coin := solid(std.solids.Prism(face(rim), from: -0.5mm, to: 0mm))
swing := frame
swing turns(1) std.z
part := solid({ p | some t in (0deg, 90deg): p in coin at(under: swing) t })
anvilcad left no solid to show.
Time
1.1 ms; CPU time 970 µs; peak memory 3.6 MB
Notes
refused anvil-brep has no sweep of a solid, and what this motion sweeps is bounded by envelopes of the body's surfaces under it (a rim or a face leaning to the motion) that follow from no elementary construction, which it would have to compute itself
//! A disc turned about an upright line through its rim.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid, and what this motion sweeps is bounded by envelopes of the body's surfaces under it (a rim or a face leaning to the motion) that follow from no elementary construction, which it would have to compute itself".into())
}