A block, the cylinder of radius 10 on the z axis from z = 0 to z = 8, with a blind bore in its top: the cylinder of radius 5 from z = 2 up through the top is cut away, leaving a flat floor at z = 2. The concave edge where the bore's side meets its floor, the circle of radius 5 at z = 2, is filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of radius 3 at z = 4, concave, tangent to the floor at radius 3 and to the bore's side at z = 4. Grow the solid by 3: every point within 3 of it.
That is more than the fillet's radius. The fillet moved 3 outward, into the bore, would be a torus of tube radius 2 − 3 = −1, turned inside out: it lies inside the grown solid and is no part of its boundary. The bore's side, moved in to radius 2, and its floor, moved up to z = 5, run on past it and meet in a sharp concave edge, the circle of radius 2 at z = 5. The fillet makes no difference to the result: it is the bored block without it, grown by 3.
The convex edges are rounded, as a growth rounds them: the block's two rims by quarter tori of tube radius 3 about the circles of radius 10 at z = 0 and z = 8, and the bore's mouth by one about the circle of radius 5 at z = 8, which narrows the bore from radius 5 at the grown top, z = 11, to radius 2 at z = 8. The grown solid runs from z = −3 to z = 11 and out to radius 13.
expected
closed form
volume
7025.949462
B − π(5 − d)²(6 − d) − π(25d − 5πd²/2 + 2d³/3), d = 3: the grown block, B = 800π + 360πd + (8π + 10π²)d² + 4πd³/3 by Steiner's formula, less what is left of the bore: the cylinder of radius 5 − d from z = 2 + d to z = 8, and above it the mouth, of radius 5 − √(d² − (z − 8)²) at height z up to z = 8 + d
area
2050.264467
[360π + 2(8π + 10π²)d + 4πd²] − 25π + 2π(5 − d)(6 − d) + π(5 − d)² + 2πd(5π/2 − d), d = 3: the grown block's surface less the bore's mouth in its top; the bore's side; its floor; and the round of its mouth
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
46 ms; CPU time 58 ms; peak memory 12.2 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no offset past a round's radius (offset in two steps, the first the round's radius)
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 cylinder of radius 10 on the z axis from z = 0 to z = 8 with a blind bore of radius 5 in its//! top down to a flat floor at z = 2, the concave edge where the bore's side meets its floor//! filleted to radius 2, grown by 3: every point within 3 of it.//!//! The kernel's offset sweeps a fillet's torus outward only as far as its tube's radius: past it//! the torus would turn inside out, and the offset refuses it rather than drop it. A solid grown by//! a and then by b is the solid grown by a + b (every point within a + b of it), so it is grown//! first by the fillet's radius, which takes the fillet down to a sharp edge, and then by the//! rest.use cad_kernel::boolean::{combined, Op};
use cad_kernel::build::{disc, prism};
use cad_kernel::fillet::roll;
use cad_kernel::geom::tolerance;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
constBLOCK_RADIUS: f64 = 10.;
constBLOCK_HEIGHT: f64 = 8.;
constBORE_RADIUS: f64 = 5.;
constFLOOR: f64 = 2.;
constFILLET: f64 = 2.;
constGROWTH: f64 = 3.;
pubfnbuild() -> Result<Brep, String> {
let up = [0., 0., 1.];
let block = prism(&disc([0., 0., 0.], up, BLOCK_RADIUS), 0., BLOCK_HEIGHT)?;
// the drill runs from the floor up past the block's toplet drill = prism(&disc([0., 0., FLOOR], up, BORE_RADIUS), 0., BLOCK_HEIGHT)?;
let bored = combined(&block, &drill, Op::Cut, 0.)?;
// the edge is picked by a point on it, where the bore's side meets its floor; the kernel// rolls the ball between the floor and the side round the looplet round = roll(&bored, [0., BORE_RADIUS, FLOOR], FILLET, tolerance(bored.size()))?;
// a concave edge's round fills its piece inlet op = if round.concave { Op::Union } else { Op::Cut };
let filleted = combined(&bored, &round.piece, op, 0.)?;
grown(&grown(&filleted, FILLET, Join::Round)?, GROWTH - FILLET, Join::Round)
}
Time
643 ms; CPU time 642 ms; peak memory 363.9 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no offset that drops a fillet turned inside out; the grown solid's half-section is revolved
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 block with a blind bore, filleted at the bore's floor, grown past the fillet's radius. A block,
the cylinder of radius 10 on the z axis from z = 0 to z = 8, with a blind bore in its top: the
cylinder of radius 5 from z = 2 up through the top is cut away, leaving a flat floor at z = 2.
The concave edge where the bore's side meets its floor, the circle of radius 5 at z = 2, is
filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of radius 3
at z = 4, concave, tangent to the floor at radius 3 and to the bore's side at z = 4. Grow the
solid by 3: every point within 3 of it.
That is more than the fillet's radius. The fillet moved 3 outward, into the bore, would be a torus
of tube radius 2 − 3 = −1, turned inside out: it lies inside the grown solid and is no part of its
boundary. The bore's side, moved in to radius 2, and its floor, moved up to z = 5, run on past it
and meet in a sharp concave edge, the circle of radius 2 at z = 5. The fillet makes no difference to
the result: it is the bored block without it, grown by 3.
The convex edges are rounded, as a growth rounds them: the block's two rims by quarter tori of tube
radius 3 about the circles of radius 10 at z = 0 and z = 8, and the bore's mouth by one about the
circle of radius 5 at z = 8, which narrows the bore from radius 5 at the grown top, z = 11, to
radius 2 at z = 8. The grown solid runs from z = −3 to z = 11 and out to radius 13."""from offset import revolved
# The grown solid's half-section in (ρ, z), counter-clockwise from the axis: a corner to run# straight to, or an arc about a center, of a radius, from one angle to another in degrees.SECTION = [
('to', 0, -3),
('to', 10, -3),
('arc', 10, 0, 3, 270, 360),
('to', 13, 8),
('arc', 10, 8, 3, 0, 90),
('to', 5, 11),
('arc', 5, 8, 3, 90, 180),
('to', 2, 5),
('to', 0, 5),
]
defbuild():
# BRepOffsetAPI_MakeOffsetShape makes no solid of this growth: it does not drop the fillet's# moved face, turned inside out. The result is built as the case states it: its half-section,# the moved faces and the rounds of the convex edges, turned about the z axis.returnrevolved(SECTION, "the grown solid's half-section")
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
16 ms; CPU time 15 ms; peak memory 12.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 cylinder of radius 10 on the z axis from z = 0 to z = 8 with a blind bore of radius 5 down to//! a floor at z = 2, the concave edge round the floor filleted to radius 2, grown by 3: every point//! within 3 of it. The fillet grown past its radius drops; the moved bore and floor meet in a sharp//! concave edge, the circle of radius 2 at z = 5.usecrate::Refusal;
usecrate::bench::{frame, p};
usecrate::shared::offset::{on_rim, rounded};
use kentron::boolean;
use kentron::math::Direction;
use kentron::offset::{self, Join};
use kentron::primitives::Cylinder;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> Result<Shape, Refusal> {
let block = Cylinder::new(10.0, 8.0).build(m)?;
let bore = Cylinder::new(5.0, 7.0).with_frame(frame(p(0.0, 0.0, 2.0), Direction::Z)).build(m)?;
let bored = boolean::difference(m, block, bore)?;
let filleted = rounded(m, bored, &[on_rim(5.0, 2.0)], 2.0)?;
Ok(offset::shape(m, filleted, 3.0, Join::Arc)?)
}
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
593 ms; CPU time 593 ms; peak memory 56.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.
//! A block, the cylinder of radius 10 on the z axis from z = 0 to z = 8, with a blind bore of//! radius 5 from z = 2 up through its top, the concave edge round the bore's floor filleted to//! radius 2, grown by 3: every point within 3 of it, SolidCraft's offset of the whole solid//! (`offset_solid`), its convex edges rounded.usesuper::rounded_puck_shrunk_by_its_rounds::round_circles;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
let block = zcyl(0.0, 0.0, 10.0, 0.0, 8.0)?;
// the bore runs on past the toplet bore = zcyl(0.0, 0.0, 5.0, 2.0, 9.0)?;
let filleted = round_circles(&cut(&block, &bore)?, &[(5.0, 2.0)], 2.0)?;
solidcraft_kernel::offset_solid(&filleted, 3.0, true)
}
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
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
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
18 ms; CPU time 17 ms; peak memory 21.8 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.
//! A block with a blind bore, filleted at the bore's floor, grown past the fillet's radius. A//! block, the cylinder of radius 10 on the z axis from z = 0 to z = 8, with a blind bore in its//! top: the cylinder of radius 5 from z = 2 up through the top is cut away, leaving a flat floor at//! z = 2. The concave edge where the bore's side meets its floor, the circle of radius 5 at z = 2,//! is filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of radius//! 3 at z = 4, concave, tangent to the floor at radius 3 and to the bore's side at z = 4. Grow the//! solid by 3: every point within 3 of it.//!//! The edges are rounded by the kernel's fillet and the solid grown by its offset, which drops a//! round turned inside out (or shrunk to nothing) and joins the faces on either side of it.usecrate::solids::offset::{parallel, subtract};
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{fillet_edges, make_cylinder_brep, BrepSolid};
constDISTANCE: f64 = 3.0;
pubfnbuild() -> Result<BrepSolid, Refusal> {
let z = p(0.0, 0.0, 1.0);
let block = make_cylinder_brep(p(0.0, 0.0, 0.0), z, 10.0, 8.0)?;
let bore = make_cylinder_brep(p(0.0, 0.0, 2.0), z, 5.0, 10.0)?;
// the bore's floor edge, by a point on itlet edge = p(0.0, -5.0, 2.0);
let rounded = fillet_edges(&subtract(&block, &bore)?, &[edge], None, 2.0, false, None)?;
Ok(parallel(&rounded, DISTANCE)?)
}
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.4 ms; CPU time 9.7 ms; peak memory 11.9 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.
//! A block with a blind bore, filleted at the bore's floor, grown past the fillet's radius. A//! block, the cylinder of radius 10 on the z axis from z = 0 to z = 8, with a blind bore in its//! top: the cylinder of radius 5 from z = 2 up through the top is cut away, leaving a flat floor at//! z = 2. The concave edge where the bore's side meets its floor, the circle of radius 5 at z = 2,//! is filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of radius//! 3 at z = 4, concave, tangent to the floor at radius 3 and to the bore's side at z = 4. Grow the//! solid by 3: every point within 3 of it.//!//! The edges are rounded by cadrs's Fillet and the part grown by its offset. cadrs declines it: its//! offset has no slab for a torus face moved to or past its tube's center line.usecrate::bench::{cut, cylinder, p3, v3};
usecrate::shared::fillet::fillet;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Pick};
constDISTANCE: f64 = 3.0;
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let block = cylinder(k, p3(0.0, 0.0, 0.0), v3(0.0, 0.0, 1.0), 10.0, 8.0)?;
let bore = cylinder(k, p3(0.0, 0.0, 2.0), v3(0.0, 0.0, 1.0), 5.0, 10.0)?;
let bored = cut(k, block, bore)?;
let edges = k.edges_at(bored, &[p3(0.0, -5.0, 2.0)])?;
let rounded = fillet(k, bored, &edges, 2.0)?;
grown(k, rounded, DISTANCE)
}
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
5.9 ms; CPU time 5.6 ms; peak memory 8.9 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 cylinder of radius 10 from z = 0 to z = 8 with a blind bore of radius 5 down to a floor at//! z = 2, the concave edge round the floor filleted to radius 2, grown by 3: the fillet vanishes//! and the moved bore side and floor meet in a sharp concave edge. springrep 1.0.1 refuses it: its//! offset cannot follow the concave fillet moved past its radius ("an offset … closes a torus to//! nothing").use springrep::blend::fillet;
use springrep::boolean::difference;
use springrep::primitive::cylinder;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let block = cylinder(&at([0., 0., 0.]), 10., 8., "block").map_err(e)?;
let bore = cylinder(&at([0., 0., 2.]), 5., 7., "bore").map_err(e)?;
let bored = difference(&block, &bore).map_err(e)?;
let filleted = fillet(&bored, &[("bore.start", "bore.side")], 2., "floor").map_err(e)?;
grown(&filleted, 3.)
}
geomsolver left no solid to show.
Time
87 ms; CPU time 92 ms; peak memory 27.1 MB
Notes
refused error[E080]: `grown.body`: a body grown whose faces a term of it reads (a round) is read by the field
// A block with a blind bore, filleted at the bore's floor, grown by 3: the block the prism over a// circle of radius 10 about the origin of the top plane, from z = 0 to z = 8; the bore the prism// over one of radius 5 from z = 2 up past the top, cut from it; the concave edge where the bore's// side meets its floor rounded to radius 2; and the points within 3 of all that,// `std.rounds.Grown`'s body.unit mm
use std
use std.solids
use std.solids (cut)
use std.rounds
use std.rounds (round)
in std.top {
o := point
fix((0, 0)) o
rim := circle(center: o) hint(r: 10)
radius(10) rim
mouth := circle(center: o) hint(r: 5)
radius(5) mouth
}
block := solid(std.solids.Prism(face(rim), from: 0mm, to: 8mm))
bore := solid(std.solids.Prism(face(mouth), from: 2mm, to: 12mm))
bore cut block
round(r: 2mm) block.bore
grown := std.rounds.Grown(block, d: 3mm)
part := solid(grown.body)
anvilcad left no solid to show.
Time
1.2 ms; CPU time 970 µs; peak memory 3.5 MB
Notes
refused anvil-brep's offset moves each face along its normal and extends the moved faces until they meet, keeping the solid's edges; it adds no round about a convex edge or corner, so it cannot grow a solid to every point within a distance of it
//! A block with a blind bore, filleted at the bore's floor, grown past the fillet's radius, grown with its convex edges rounded.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep's offset moves each face along its normal and extends the moved faces until they meet, keeping the solid's edges; it adds no round about a convex edge or corner, so it cannot grow a solid to every point within a distance of it".into())
}