A plate from (−30, −30, 0) to (30, 30, 4) with a hole of radius 20 drilled through it along the z axis, grown by 20, exactly the hole's radius: the solid of every point within 20 of the drilled plate. It is offset/drilled-plate-grown-by-its-hole with a hole much wider than the plate is thick.
The plate grows as a box does: each face moves 20 outward, each outer edge becomes a quarter of a cylinder of radius 20, each corner an eighth of a ball. The hole's wall moves 20 in, onto the z axis, so the hole closes: every point of it is within 20 of its wall, and it is filled. Over each end of the hole, though, a point is within 20 of the plate only within 20 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 20 about the rim's circle of radius 20, 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
244 ms; CPU time 380 ms; peak memory 22.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
362114.3484
362114.3484
1.1e-15
area
29124.70896
29124.70896
2.5e-16
agrees with
next.BREP, cadrs, springrep
mesh
43562 triangles, closed, 10 degenerate
centre of gravity
(-6.26627e-16, -2.08967e-15, 2) its STEP's solid
inertia
about it, of unit density: Ixx 3.06194e+08; Iyy 3.06194e+08; Izz 5.15651e+08; Ixy -1.86265e-09; Iyz -5.12227e-09; Izx 3.0268e-09
//! The plate from (−30, −30, 0) to (30, 30, 4) drilled through along z with a hole of radius 20,//! grown by 20, the hole's radius: the hole fills, and a horn torus's dimple, cusped on the axis,//! stays over each of its ends.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 = 20.;
pubfnbuild() -> Result<Brep, String> {
let plate = block([-30., -30., 0.], [30., 30., 4.])?;
// the drill runs 1 past both faces of the platelet drill = prism(&disc([0., 0., -1.], [0., 0., 1.], 20.), 0., 6.)?;
grown(&combined(&plate, &drill, Op::Cut, 0.)?, GROWTH, Join::Round)
}
occt left no solid to show.
Time
682 ms; CPU time 681 ms; peak memory 366.5 MB
Notes
refused BRepOffsetAPI_MakeOffsetShape answered done but made no shape of the solid offset by 20
"""A plate with a wide hole grown by 20, exactly the hole's radius. The plate from (−30, −30, 0) to
(30, 30, 4), with a hole of radius 20 through it along the z axis, grown by 20: the hole fills, and
each end of it leaves a dimple, part of a horn torus, coming to a point on the axis."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinderfromOCP.gp import gp, gp_Ax2, gp_Pnt
from offset import less, offset
HALF_SIDE = 30THICKNESS = 4HOLE_RADIUS = 20GROWTH = 20defbuild():
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()
returnoffset(less(plate, drill, "the hole"), 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
104 ms; CPU time 104 ms; peak memory 47.1 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 20 is not proved regular, nor proved to fold, so no size is named
//! The plate from (−30, −30, 0) to (30, 30, 4) with a hole of radius 20 drilled through it along//! the z axis, grown by 20, the hole's radius: every point within 20 of it, SolidCraft's offset of//! the whole solid (`offset_solid`), its convex edges rounded. The hole closes onto its axis, and//! over each end the grown face dips to a cusp, the inside of a horn torus about the rim.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let plate = block((-30.0, -30.0, 0.0), (30.0, 30.0, 4.0))?;
// the drill runs past both faceslet drill = zcyl(0.0, 0.0, 20.0, -1.0, 5.0)?;
solidcraft_kernel::offset_solid(&cut(&plate, &drill)?, 20.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
83 ms; CPU time 82 ms; peak memory 27.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
362114.3484
362114.3484
3.2e-16
area
29124.70896
29124.70896
2.5e-16
agrees with
cad-kernel, cadrs, springrep
mesh
35036 triangles, closed, 10 degenerate
centre of gravity
(1.49946e-15, -3.16464e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 3.06194e+08; Iyy 3.06194e+08; Izz 5.15651e+08; Ixy 9.87293e-08; Iyz 1.03028e-08; Izx -6.0536e-09
//! The plate from (−30, −30, 0) to (30, 30, 4) with a hole of radius 20 drilled through it along//! the z axis, grown by 20, 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(-30.0, -30.0, 0.0), 60.0, 60.0, 4.0)?;
let drill = make_cylinder_brep(p(0.0, 0.0, -1.0), p(0.0, 0.0, 1.0), 20.0, 6.0)?;
let drilled = subtract(&plate, &drill)?;
Ok(parallel(&drilled, 20.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.1 ms; CPU time 5.2 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
362114.3484
362114.3484
8.0e-16
area
29124.70896
29124.70896
0.0e+00
agrees with
cad-kernel, next.BREP, springrep
mesh
31370 triangles, closed, 10 degenerate
centre of gravity
(1.296e-15, 3.21488e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 3.06194e+08; Iyy 3.06194e+08; Izz 5.15651e+08; Ixy -7.45058e-09; Iyz -1.16415e-10; Izx 7.5437e-26
//! The plate from (−30, −30, 0) to (30, 30, 4), with a hole of radius 20 drilled through it along//! the z axis, grown by 20, exactly the hole's radius: the solid of every point within 20 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, 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(-30.0, -30.0, 0.0), p3(30.0, 30.0, 4.0))?;
let drill = cylinder(k, p3(0.0, 0.0, -1.0), v3(0.0, 0.0, 1.0), 20.0, 6.0)?;
let drilled = cut(k, plate, drill)?;
grown(k, drilled, 20.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 14 ms; peak memory 9.4 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
362114.3484
362114.3484
6.4e-16
area
29124.70896
29124.70896
2.5e-16
agrees with
cad-kernel, next.BREP, cadrs
mesh
27714 triangles, closed, 2 degenerate
centre of gravity
(1.93897e-15, 1.92893e-15, 2) its STEP's solid
inertia
about it, of unit density: Ixx 3.06194e+08; Iyy 3.06194e+08; Izz 5.15651e+08; Ixy 1.86265e-09; Iyz 9.19681e-09; Izx 1.86265e-09
//! The plate from (−30, −30, 0) to (30, 30, 4) with a hole of radius 20 drilled through it along//! the z axis, grown by 20, the hole's radius: the hole closes onto its axis, each end a dimple.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([-30., -30., 0.]), Vec3::new(60., 60., 4.), "plate").map_err(e)?;
let drill = cylinder(&at([0., 0., -1.]), 20., 6., "hole").map_err(e)?;
let drilled = difference(&plate, &drill).map_err(e)?;
grown(&drilled, 20.)
}
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.3 ms; CPU time 1.1 ms; 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 plate with a wide hole, grown by the hole'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())
}