The plate of offset/drilled-plate-grown, from (−10, −10, 0) to (10, 10, 4), with a round recess of radius 3 sunk 1 into its top about the z axis (a flat floor at z = 3), grown by 4, more than the recess's radius: the solid of every point within 4 of the plate.
The plate 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 recess is gone: every point of it is within 3 of its wall. Over it, though, a point is within 4 of the plate if it is within 4 of the recess's rim or of its floor, and only then, so the grown top, at z = 8, dips over the recess: a flat floor at z = 7, 4 above the recess's floor, out to radius 3 − √7 ≈ 0.354, and from there the inner side of a tube of radius 4 about the rim's circle (of radius 3, at z = 4), which rises to meet the flat of the grown top along the circle of radius 3.
As a set:
$$\Bigl(\bigl([-10,10]^2\times[0,4]\bigr) \setminus \{\,\rho \le 3,\ z \ge 3\,\}\Bigr) \oplus B_{4}$$
expected
closed form
volume
8554.149195
V₀ − 2π((3 − √7)²/2 + 15√7/2 − 24·asin(√7/4) − 5/3), V₀ = abc + 2(ab + bc + ca)d + π(a + b + c)d² + 4πd³/3, a = b = 20, c = 4, d = 4
area
2428.382592
A₀ − 9π + π(3 − √7)² + 8π(3·asin(√7/4) − 1), A₀ = 2(ab + bc + ca) + 2π(a + b + c)d + 4πd², a = b = 20, c = 4, d = 4
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
95 ms; CPU time 157 ms; peak memory 14.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
8554.149195
8554.149195
2.1e-16
area
2428.382592
2428.382592
1.9e-16
agrees with
occt, next.BREP, cadrs
mesh
24936 triangles, closed, 8 degenerate
centre of gravity
(-1.21881e-16, -2.52515e-16, 1.99622) its STEP's solid
inertia
about it, of unit density: Ixx 602649; Iyy 602649; Izz 1.01997e+06; Ixy 1.81899e-12; Iyz -2.3184e-11; Izx -8.76862e-13
//! The plate from (−10, −10, 0) to (10, 10, 4) with a round recess of radius 3 sunk 1 into its top//! about the z axis, grown by 4: the recess fills, and the grown top dips over it to a flat floor//! at z = 7 ringed by the inside of a tube about the recess's rim.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;
pubfnbuild() -> Result<Brep, String> {
let plate = block([-10., -10., 0.], [10., 10., 4.])?;
// the cutter from the recess's floor on 1 past the toplet recess = prism(&disc([0., 0., 3.], [0., 0., 1.], 3.), 0., 2.)?;
grown(&combined(&plate, &recess, Op::Cut, 0.)?, 4., Join::Round)
}
Time
658 ms; CPU time 657 ms; peak memory 370.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.
Data
its STEP's
expected
rel. error
volume
8554.149195
8554.149195
2.5e-12
area
2428.382592
2428.382592
6.4e-12
agrees with
cad-kernel, next.BREP, cadrs
mesh
12334 triangles, closed
centre of gravity
(-1.10611e-13, 3.11167e-13, 1.99622) its STEP's solid
inertia
about it, of unit density: Ixx 602649; Iyy 602649; Izz 1.01997e+06; Ixy -1.73917e-09; Iyz -1.54811e-08; Izx 1.78729e-08
"""A plate with a shallow round recess grown by 4, past the recess's radius. The plate from
(−10, −10, 0) to (10, 10, 4), with a round recess of radius 3 sunk 1 into its top about the z axis,
grown by 4: the recess fills, and over it the grown top dips."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from offset import less, offset
HALF_SIDE = 10THICKNESS = 4RECESS_RADIUS = 3RECESS_DEPTH = 1GROWTH = 4defbuild():
plate = BRepPrimAPI_MakeBox(gp_Pnt(-HALF_SIDE, -HALF_SIDE, 0),
gp_Pnt(HALF_SIDE, HALF_SIDE, THICKNESS)).Shape()
# The cutter runs from the recess's floor to 1 above the plate's top.
floor = THICKNESS - RECESS_DEPTH
cutter = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, floor), gp.DZ_s()), RECESS_RADIUS,
RECESS_DEPTH + 1).Shape()
returnoffset(less(plate, cutter, "the recess"), 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
57 ms; CPU time 57 ms; peak memory 47.4 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.819251970160662)
//! The plate from (−10, −10, 0) to (10, 10, 4) with a round recess of radius 3 sunk 1 into its top//! about the z axis, grown by 4, more than the recess'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 plate = block((-10.0, -10.0, 0.0), (10.0, 10.0, 4.0))?;
// the recess's cutter runs on past the toplet recess = zcyl(0.0, 0.0, 3.0, 3.0, 5.0)?;
solidcraft_kernel::offset_solid(&cut(&plate, &recess)?, 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
177 ms; CPU time 177 ms; peak memory 29.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.
Data
its STEP's
expected
rel. error
volume
8554.149195
8554.149195
2.1e-16
area
2428.382592
2428.382592
5.6e-16
agrees with
cad-kernel, occt, cadrs
mesh
16044 triangles, closed, 8 degenerate
centre of gravity
(-3.11181e-17, 5.0503e-16, 1.99622) its STEP's solid
inertia
about it, of unit density: Ixx 602649; Iyy 602649; Izz 1.01997e+06; Ixy 8.18545e-11; Iyz -1.82062e-11; Izx -2.6317e-11
//! The plate from (−10, −10, 0) to (10, 10, 4) with a round recess of radius 3 sunk 1 into its top//! about the z axis, grown by 4, more than the recess's radius, to its parallel body.//!//! The recess is cut by a cylinder from its floor at z = 3 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 plate = make_box_brep(p(-10.0, -10.0, 0.0), 20.0, 20.0, 4.0)?;
let recess = make_cylinder_brep(p(0.0, 0.0, 3.0), p(0.0, 0.0, 1.0), 3.0, 2.0)?;
let recessed = subtract(&plate, &recess)?;
Ok(parallel(&recessed, 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
37 ms; CPU time 72 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.
Data
its STEP's
expected
rel. error
volume
8554.149195
8554.149195
4.3e-16
area
2428.382592
2428.382592
1.9e-16
agrees with
cad-kernel, occt, next.BREP
mesh
15708 triangles, closed, 8 degenerate
centre of gravity
(-6.6451e-17, 5.19658e-20, 1.99622) its STEP's solid
inertia
about it, of unit density: Ixx 602649; Iyy 602649; Izz 1.01997e+06; Ixy 3.63657e-12; Iyz 9.05939e-13; Izx -7.40921e-13
//! The plate from (−10, −10, 0) to (10, 10, 4) with a round recess of radius 3 sunk 1 into its//! top about the z axis (a flat floor at z = 3), grown by 4, more than the recess's radius: the//! solid of every point within 4 of it. The grown top dips over the recess: a flat at z = 7 out//! to radius 3 − √7, then the inner side of a tube of radius 4 about the rim.//!//! The plate a rectangle extruded, the recess 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 plate = block(k, p3(-10.0, -10.0, 0.0), p3(10.0, 10.0, 4.0))?;
let recess = cylinder(k, p3(0.0, 0.0, 3.0), v3(0.0, 0.0, 1.0), 3.0, 2.0)?;
let recessed = cut(k, plate, recess)?;
grown(k, recessed, 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
13 ms; CPU time 13 ms; peak memory 9.5 MB
Notes
wrong volume 8525.83118999 against 8554.14919531 (its STEP's); area 2447.38415841 against 2428.38259243 (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
8525.83119
8554.149195
3.3e-03
area
2447.384158
2428.382592
7.8e-03
agrees with
no other kernel
mesh
13511 triangles, closed, 1 degenerate
centre of gravity
(5.87599e-16, 3.73955e-16, 1.97861) its STEP's solid
inertia
about it, of unit density: Ixx 601782; Iyy 601782; Izz 1.01984e+06; Ixy -9.09262e-12; Iyz 3.5328e-12; Izx -5.08096e-12
//! The plate from (−10, −10, 0) to (10, 10, 4) with a round recess of radius 3 sunk 1 into its top//! about the z axis, grown by 4, past the recess'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 plate = block(&at([-10., -10., 0.]), Vec3::new(20., 20., 4.), "plate").map_err(e)?;
// the recess's cutter from its floor at z = 3 up past the toplet recess = cylinder(&at([0., 0., 3.]), 3., 2., "recess").map_err(e)?;
let recessed = difference(&plate, &recess).map_err(e)?;
grown(&recessed, 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.1 ms; CPU time 920 µs; peak memory 3.4 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 plate with a shallow round recess grown past the recess'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())
}