The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down its z axis from the top, 8 deep, to a flat floor at z = 2. Grow it by 4, more than the bore's radius: the solid of every point within 4 of the block.
The block grows as a box does: each face moves 4 outward, each edge becomes a quarter of a cylinder of radius 4, each corner an eighth of a ball. The bore is gone, filled solid: every point of it is within 3 of its wall. Over the bore's mouth, as over a hole drilled through (offset/drilled-plate-grown-past-its-hole), a point is within 4 of the block only within 4 of the bore's rim (the floor, 8 down, is too far to matter), so the grown top dips in a dimple: the inner part of a spindle torus, a tube of radius 4 about the rim's circle of radius 3, whose lowest point is on the axis √7 ≈ 2.65 above the top face. The bottom stays flat, and there is no cavity anywhere inside.
As a set:
$$\Bigl([-10,10]^2\times[0,10] \setminus \{\,\rho \le 3,\ z \ge 2\,\}\Bigr) \oplus B_{4}$$
expected
closed form
volume
13175.69842
V₀ − 2π(dρ²/2 − ρ/2·(ρq + d²·asin(ρ/d)) + (d³ − q³)/3), V₀ = abc + 2(ab + bc + ca)d + π(a + b + c)d² + 4πd³/3, a = b = 20, c = 10, ρ = 3, d = 4, q = √(d² − ρ²) = √7
area
3059.33105
A₀ − πρ² + 2πd(ρφ − d(1 − cos φ)), A₀ = 2(ab + bc + ca) + 2π(a + b + c)d + 4πd², φ = asin(ρ/d), a = b = 20, c = 10, ρ = 3, d = 4
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.
Time
77 ms; CPU time 127 ms; peak memory 13.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.
Data
its STEP's
expected
rel. error
volume
13175.69842
13175.69842
1.4e-16
area
3059.33105
3059.33105
3.0e-16
agrees with
next.BREP, cadrs
mesh
23237 triangles, closed, 9 degenerate
centre of gravity
(8.06891e-18, -2.3297e-16, 4.99624) its STEP's solid
inertia
about it, of unit density: Ixx 1.13195e+06; Iyy 1.13195e+06; Izz 1.60622e+06; Ixy 5.45697e-12; Iyz -2.81828e-11; Izx -6.3229e-12
//! The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down its z axis from//! the top to a flat floor at z = 2, grown by 4, more than the bore's radius: the bore fills, and a//! dimple stays over its mouth.usecrate::sketch::block;
use cad_kernel::boolean::{combined, Op};
use cad_kernel::build::{disc, prism};
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
constBORE_RADIUS: f64 = 3.;
constFLOOR: f64 = 2.;
constGROWTH: f64 = 4.;
pubfnbuild() -> Result<Brep, String> {
let solid = block([-10., -10., 0.], [10., 10., 10.])?;
// the drill runs from the floor on 1 past the top, so its top cuts nothinglet drill = prism(&disc([0., 0., FLOOR], [0., 0., 1.], BORE_RADIUS), 0., 10. - FLOOR + 1.)?;
grown(&combined(&solid, &drill, Op::Cut, 0.)?, GROWTH, Join::Round)
}
occt left no solid to show.
Time
625 ms; CPU time 624 ms; peak memory 365.1 MB
Notes
refused BRepOffsetAPI_MakeOffsetShape answered done but made no shape of the solid offset by 4
"""A block with a deep blind bore grown by 4, past the bore's radius. The block from (−10, −10, 0)
to (10, 10, 10) with a blind bore of radius 3 down its z axis from the top, 8 deep, to a flat
floor at z = 2, grown by 4: the bore fills, and its mouth leaves a dimple in the grown top."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from offset import less, offset
HALF_SIDE = 10HEIGHT = 10BORE_RADIUS = 3FLOOR = 2GROWTH = 4defbuild():
block = BRepPrimAPI_MakeBox(gp_Pnt(-HALF_SIDE, -HALF_SIDE, 0),
gp_Pnt(HALF_SIDE, HALF_SIDE, HEIGHT)).Shape()
# The drill runs from the floor to 1 past the top.
drill = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, FLOOR), gp.DZ_s()), BORE_RADIUS,
HEIGHT - FLOOR + 1).Shape()
# BRepOffsetAPI_MakeOffsetShape reports itself done but makes no shape (a null one), as for# offset/drilled-plate-grown-past-its-hole, where a face it moves vanishes; `offset` refuses it.returnoffset(less(block, drill, "the bore"), GROWTH)
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
It has not run.
Notes
missing no implementation
Data
No measures: it built no solid to measure.
Implementation
No implementation yet.
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
60 ms; CPU time 59 ms; peak memory 44.2 MB
Notes
refused the operation failed: SMLib offset: operation: solidcore: offset::offset_executive::p2::offset_brep: the offset could not be built; caused by offset::offset_executive::p1: the rounded offset's tube about edge 4 by 4 folds over itself: the edge bends more tightly than that on the side the tube faces (the largest distance at which this edge's tube is proved not to fold is 2.819151270274869)
//! The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down its z axis from//! the top to a floor at z = 2, grown by 4, more than the bore's radius: every point within 4 of//! it, SolidCraft's offset of the whole solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let block = block((-10.0, -10.0, 0.0), (10.0, 10.0, 10.0))?;
// the bore runs on past the toplet bore = zcyl(0.0, 0.0, 3.0, 2.0, 11.0)?;
solidcraft_kernel::offset_solid(&cut(&block, &bore)?, 4.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
169 ms; CPU time 169 ms; peak memory 29.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.
Data
its STEP's
expected
rel. error
volume
13175.69842
13175.69842
1.4e-16
area
3059.33105
3059.33105
1.5e-16
agrees with
cad-kernel, cadrs
mesh
14607 triangles, closed, 9 degenerate
centre of gravity
(-2.40792e-15, -6.72465e-16, 4.99624) its STEP's solid
inertia
about it, of unit density: Ixx 1.13195e+06; Iyy 1.13195e+06; Izz 1.60622e+06; Ixy -1.81899e-12; Iyz -6.64038e-11; Izx 6.20088e-11
//! The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down the z axis from//! its top to a flat floor at z = 2, grown by 4, more than the bore's radius, to its parallel body://! the bore fills, and its mouth leaves a dimple in the grown top.//!//! The bore is cut by a cylinder from its floor up past the top.usecrate::solids::offset::{parallel, subtract};
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{make_box_brep, make_cylinder_brep, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let block = make_box_brep(p(-10.0, -10.0, 0.0), 20.0, 20.0, 10.0)?;
let bore = make_cylinder_brep(p(0.0, 0.0, 2.0), p(0.0, 0.0, 1.0), 3.0, 9.0)?;
let bored = subtract(&block, &bore)?;
Ok(parallel(&bored, 4.0)?)
}
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
26 ms; CPU time 43 ms; peak memory 11.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.
Data
its STEP's
expected
rel. error
volume
13175.69842
13175.69842
1.4e-16
area
3059.33105
3059.33105
3.0e-16
agrees with
cad-kernel, next.BREP
mesh
15939 triangles, closed, 9 degenerate
centre of gravity
(-3.45141e-17, 0, 4.99624) its STEP's solid
inertia
about it, of unit density: Ixx 1.13195e+06; Iyy 1.13195e+06; Izz 1.60622e+06; Ixy 1.09139e-11; Iyz 9.09495e-13; Izx -4.54577e-12
//! The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down its z axis from//! the top to a flat floor at z = 2, grown by 4, more than the bore's radius: the solid of every//! point within 4 of it. The bore fills; over its mouth the grown top dips in a dimple, the inner//! part of a spindle torus about the rim, down to a point on the axis √7 above the top.//!//! The block a rectangle extruded, the bore a circle extruded from its floor up past the top and//! cut; then cadrs's offset with rounded edges.usecrate::bench::{block, cut, cylinder, p3, v3};
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let b = block(k, p3(-10.0, -10.0, 0.0), p3(10.0, 10.0, 10.0))?;
let bore = cylinder(k, p3(0.0, 0.0, 2.0), v3(0.0, 0.0, 1.0), 3.0, 10.0)?;
let bored = cut(k, b, bore)?;
grown(k, bored, 4.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
14 ms; CPU time 13 ms; peak memory 9.4 MB
Notes
wrong volume 13141.7658074 against 13175.6984186 (its STEP's); area 3136.36133213 against 3059.33104986 (its STEP's)
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
expected
rel. error
volume
13141.76581
13175.69842
2.6e-03
area
3136.361332
3059.33105
2.5e-02
agrees with
no other kernel
mesh
18370 triangles, closed, 2 degenerate
centre of gravity
(2.59727e-16, 1.21989e-16, 4.99268) its STEP's solid
inertia
about it, of unit density: Ixx 1.13181e+06; Iyy 1.13181e+06; Izz 1.60608e+06; Ixy -1.27161e-11; Iyz -2.76099e-12; Izx 8.39674e-12
//! The block from (−10, −10, 0) to (10, 10, 10) with a blind bore of radius 3 down its z axis from//! the top to a flat floor at z = 2, grown by 4, past the bore's radius: springrep's own offset.use springrep::boolean::difference;
use springrep::math::Vec3;
use springrep::primitive::{block, cylinder};
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let b = block(&at([-10., -10., 0.]), Vec3::new(20., 20., 10.), "block").map_err(e)?;
// the bore's cutter from its floor at z = 2 up past the toplet bore = cylinder(&at([0., 0., 2.]), 3., 9., "bore").map_err(e)?;
let bored = difference(&b, &bore).map_err(e)?;
grown(&bored, 4.)
}
geomsolver 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.
anvilcad left no solid to show.
Time
1.2 ms; CPU time 980 µ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 deep blind bore grown past the bore's radius.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())
}