The plate of offset/drilled-plate-grown, from (−10, −10, 0) to (10, 10, 4) with a hole of radius 3 drilled through it along the z axis, grown by 3, exactly the hole's radius: the solid of every point within 3 of the drilled plate.
The plate grows as a box does: each face moves 3 outward, each outer edge becomes a quarter of a cylinder of radius 3, each corner an eighth of a ball. The hole's wall moves 3 in, onto the z axis, so the hole closes: every point of it is within 3 of its wall, and it is filled. Over each end of the hole, though, a point is within 3 of the plate only within 3 of the hole's rim, so the grown top (and bottom) is not flat there but dips in a dimple: the part of a horn torus, a tube of radius 3 about the rim's circle of radius 3, inside the rim. Its surface comes down to a point on the axis, at z = 4 (and z = 0), where it meets itself in a cusp.
† 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
242 ms; CPU time 430 ms; peak memory 16.5 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no offset by a hole's radius in one step (offset in two steps)
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
6300.904006
6300.904006
4.3e-16
area
2070.484672
2070.484672
6.6e-16
agrees with
kentron, next.BREP, cadrs, springrep
mesh
32220 triangles, closed, 10 degenerate
centre of gravity
(6.44599e-16, -1.71408e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 381143; Iyy 381143; Izz 665465; Ixy 2.00089e-11; Iyz 3.86535e-12; Izx -1.7053e-12
//! The plate from (−10, −10, 0) to (10, 10, 4) drilled through along z with a hole of radius 3,//! grown by 3, the hole's radius: the hole fills, and a dimple stays over each of its ends.//!//! Grown by 3 in one step the kernel refuses the union of its pieces: "the join of `far` (plane)//! and face 6 (cylinder) united: a shell of the arrangement is kept on one side of a plane//! (`near`) and dropped on another: two of its cells joined round an edge" (the hole's wall swept//! onto its own axis, the tube over its rim a horn torus meeting itself there). 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 by//! half the hole's radius twice, which the kernel builds (as it does any split of the 3).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;
constGROWTH: f64 = 3.;
pubfnbuild() -> Result<Brep, String> {
let plate = block([-10., -10., 0.], [10., 10., 4.])?;
// the drill runs 1 past both faces of the platelet drill = prism(&disc([0., 0., -1.], [0., 0., 1.], 3.), 0., 6.)?;
let drilled = combined(&plate, &drill, Op::Cut, 0.)?;
grown(&grown(&drilled, GROWTH / 2., Join::Round)?, GROWTH / 2., Join::Round)
}
occt left no solid to show.
Time
632 ms; CPU time 631 ms; peak memory 365.9 MB
Notes
refused BRepOffsetAPI_MakeOffsetShape answered done but made no shape of the solid offset by 3
"""A drilled plate grown by 3, exactly the hole's radius. The plate from (−10, −10, 0) to (10, 10, 4), with a hole
of radius 3 through it along the z axis, grown by 3: the hole fills, and each end of it leaves a
dimple in the grown face."""fromOCP.BRepAlgoAPIimportBRepAlgoAPI_CutfromOCP.BRepPrimAPIimportBRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from bench importRefusedfrom offset import offset
HALF_SIDE = 10THICKNESS = 4HOLE_RADIUS = 3GROWTH = 3defbuild():
plate = BRepPrimAPI_MakeBox(gp_Pnt(-HALF_SIDE, -HALF_SIDE, 0),
gp_Pnt(HALF_SIDE, HALF_SIDE, THICKNESS)).Shape()
# The drill runs 1 past both faces of the plate.
drill = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, -1), gp.DZ_s()), HOLE_RADIUS,
THICKNESS + 2).Shape()
cut = BRepAlgoAPI_Cut(plate, drill)
ifnot cut.IsDone():
raiseRefused("BRepAlgoAPI_Cut declined the hole")
returnoffset(cut.Shape(), 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.
Time
28 ms; CPU time 27 ms; peak memory 11.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
6300.904006
6300.904006
4.3e-16
area
2070.484672
2070.484672
6.6e-16
agrees with
cad-kernel, next.BREP, cadrs, springrep
mesh
25594 triangles, closed, 10 degenerate
centre of gravity
(2.34558e-16, 0, 2) its STEP's solid
inertia
about it, of unit density: Ixx 381143; Iyy 381143; Izz 665465; Ixy 2.72848e-12; Iyz -9.09495e-13; Izx 1.13687e-13
//! The plate from (−10, −10, 0) to (10, 10, 4) with a hole of radius 3 drilled through it along the//! z axis, grown by 3: every point within 3 of it, exactly the hole's radius: the hole closes onto//! the axis, and over each of its ends the grown face dips in a horn torus about the rim, down to a//! cusp on the axis.usecrate::shared::offset::drilled_plate;
use kentron::offset::{self, Join};
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let plate = drilled_plate(m)?;
offset::shape(m, plate, 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.
solidcraft left no solid to show.
Time
104 ms; CPU time 104 ms; peak memory 47 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 3 is not proved regular, nor proved to fold, so no size is named
//! The plate from (−10, −10, 0) to (10, 10, 4) with a hole of radius 3 drilled through it along//! the z axis, grown by 3, the hole's radius: every point within 3 of it, SolidCraft's offset of//! the whole solid (`offset_solid`), its convex edges rounded. The plate grows as a box does, the//! hole closes onto its axis, and over each end of it the grown face dips in a dimple, the inside//! of a horn torus about the rim.usecrate::solids::*;
pubfnbuild() -> R<Body> {
grown(1.0)
}
/// The plate, its hole and the growth with every length `s` times as long.pubfngrown(s: f64) -> R<Body> {
let plate = block((-10.0 * s, -10.0 * s, 0.0), (10.0 * s, 10.0 * s, 4.0 * s))?;
// the drill runs past both faceslet drill = zcyl(0.0, 0.0, 3.0 * s, -1.0 * s, 5.0 * s)?;
let drilled = cut(&plate, &drill)?;
solidcraft_kernel::offset_solid(&drilled, 3.0 * s, 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
67 ms; CPU time 62 ms; peak memory 26.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
6300.904006
6300.904006
2.9e-16
area
2070.484672
2070.484672
4.4e-16
agrees with
cad-kernel, kentron, cadrs, springrep
mesh
25502 triangles, closed, 10 degenerate
centre of gravity
(-3.60267e-18, -6.64897e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 381143; Iyy 381143; Izz 665465; Ixy -4.36555e-11; Iyz 4.76064e-12; Izx -9.166e-12
//! The plate from (−10, −10, 0) to (10, 10, 4) with a hole of radius 3 drilled through it along//! the z axis, grown by 3, exactly the hole's radius, to its parallel body: the hole fills, and//! each end of it leaves a dimple in the grown face, the inside of a horn torus.//!//! The hole is cut by a cylinder running past both faces of the plate.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 drill = make_cylinder_brep(p(0.0, 0.0, -1.0), p(0.0, 0.0, 1.0), 3.0, 6.0)?;
let drilled = subtract(&plate, &drill)?;
Ok(parallel(&drilled, 3.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
4 ms; CPU time 5.1 ms; peak memory 8.7 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
6300.904006
6300.904006
4.3e-16
area
2070.484672
2070.484672
8.8e-16
agrees with
cad-kernel, kentron, next.BREP, springrep
mesh
25594 triangles, closed, 10 degenerate
centre of gravity
(3.43098e-16, -1.89451e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 381143; Iyy 381143; Izz 665465; Ixy -1.00044e-11; Iyz -6.36536e-15; Izx -7.95808e-13
//! The plate from (−10, −10, 0) to (10, 10, 4), with a hole of radius 3 drilled through it along//! the z axis, grown by 3, exactly the hole's radius: the solid of every point within 3 of it.//! The plate grows as a box does; the hole fills, and over each end of it the grown face dips in a//! dimple, the part inside the rim of a horn torus (a tube of radius 3 about the rim's circle of//! radius 3), down to a cusp on the axis.//!//! The rectangle extruded, the hole a circle extruded through it 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 drill = cylinder(k, p3(0.0, 0.0, -1.0), v3(0.0, 0.0, 1.0), 3.0, 6.0)?;
let drilled = cut(k, plate, drill)?;
grown(k, drilled, 3.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
12 ms; CPU time 11 ms; peak memory 9.6 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
6300.904006
6300.904006
4.3e-16
area
2070.484672
2070.484672
8.8e-16
agrees with
cad-kernel, kentron, next.BREP, cadrs
mesh
23250 triangles, closed, 2 degenerate
centre of gravity
(8.84386e-16, 7.66825e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 381143; Iyy 381143; Izz 665465; Ixy 4.27308e-27; Iyz 4.76848e-12; Izx -5.68434e-13
//! The plate from (−10, −10, 0) to (10, 10, 4) with a hole of radius 3 drilled through it along//! the z axis, grown by 3, the hole's radius: the hole closes onto its axis, and each end of it//! leaves a dimple, a horn torus's inside, coming down to a cusp on the axis.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)?;
let drill = cylinder(&at([0., 0., -1.]), 3., 6., "hole").map_err(e)?;
let drilled = difference(&plate, &drill).map_err(e)?;
grown(&drilled, 3.)
}
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 950 µs; peak memory 3.6 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 drilled plate grown by its hole'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())
}