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 4, more than the hole's radius: the solid of every point within 4 of the drilled plate.
The plate grows as a box does: each face moves 4 outward, each outer edge becomes a quarter of a cylinder of radius 4, each corner an eighth of a ball. The hole is gone: every point of it is within 3 of its wall, so it is filled. Over each end of the hole, though, a point is within 4 of the plate only within 4 of the hole's rim, so the grown top (and bottom) dips there in a dimple: the inner part of a spindle torus, a tube of radius 4 about the rim's circle of radius 3, which crosses the axis. The dimple's lowest point is on the axis, √7 ≈ 2.65 above the top face (and below the bottom), where the spindle's surface meets itself in a point, and it meets the flat of the grown top along the circle of radius 3 over the rim.
† 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
98 ms; CPU time 159 ms; peak memory 14.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
8548.447247
8548.447247
0.0e+00
area
2430.166661
2430.166661
5.6e-16
agrees with
kentron, next.BREP, cadrs, springrep
mesh
30414 triangles, closed, 10 degenerate
centre of gravity
(-1.22555e-16, -2.52683e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 602456; Iyy 602456; Izz 1.01996e+06; Ixy 1.81899e-12; Iyz -2.31921e-11; Izx -1.36424e-12
//! The plate from (−10, −10, 0) to (10, 10, 4) drilled through along z with a hole of radius 3,//! grown by 4, past the hole's radius: the hole fills, and a dimple 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 = 4.;
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.)?;
grown(&combined(&plate, &drill, Op::Cut, 0.)?, GROWTH, Join::Round)
}
occt left no solid to show.
Time
631 ms; CPU time 630 ms; peak memory 365.2 MB
Notes
refused BRepOffsetAPI_MakeOffsetShape answered done but made no shape of the solid offset by 4
"""A drilled plate grown by 4, past 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 4: 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 = 4defbuild():
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
34 ms; CPU time 34 ms; peak memory 12.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
8548.447247
8548.447247
2.1e-16
area
2430.166661
2430.166661
5.6e-16
agrees with
cad-kernel, next.BREP, cadrs, springrep
mesh
21186 triangles, closed, 10 degenerate
centre of gravity
(3.85675e-16, -1.32991e-17, 2) its STEP's solid
inertia
about it, of unit density: Ixx 602456; Iyy 602456; Izz 1.01996e+06; Ixy -4.38461e-29; Iyz -9.09495e-13; Izx -4.54747e-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 4: every point within 4 of it, more than the hole's radius: the hole fills, and//! over each of its ends the grown face dips in the inner part of a spindle torus about the rim.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, 4.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
58 ms; CPU time 57 ms; peak memory 47.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.8176258859862537)
//! 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 4, more than the hole's radius: every point within 4 of it, SolidCraft's//! offset of the whole solid (`offset_solid`), its convex edges rounded. The plate grows as a box//! does, the hole fills, and over each end of it the grown face dips in a dimple, the inside of a//! spindle torus about the rim.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let plate = block((-10.0, -10.0, 0.0), (10.0, 10.0, 4.0))?;
// the drill runs past both faceslet drill = zcyl(0.0, 0.0, 3.0, -1.0, 5.0)?;
let drilled = cut(&plate, &drill)?;
solidcraft_kernel::offset_solid(&drilled, 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
70 ms; CPU time 70 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
8548.447247
8548.447247
2.1e-16
area
2430.166661
2430.166661
3.7e-16
agrees with
cad-kernel, kentron, cadrs, springrep
mesh
19952 triangles, closed, 10 degenerate
centre of gravity
(1.27533e-15, 2.31067e-17, 2) its STEP's solid
inertia
about it, of unit density: Ixx 602456; Iyy 602456; Izz 1.01996e+06; Ixy 5.63887e-11; Iyz 4.95675e-11; Izx -1.40972e-11
//! 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 4, more than the hole's radius, to its parallel body: the hole fills, and//! each end of it leaves a dimple in the grown face, the inner part of a spindle 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, 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
4 ms; CPU time 5.2 ms; peak memory 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
8548.447247
8548.447247
2.1e-16
area
2430.166661
2430.166661
5.6e-16
agrees with
cad-kernel, kentron, next.BREP, springrep
mesh
21186 triangles, closed, 10 degenerate
centre of gravity
(9.34055e-17, -3.19179e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 602456; Iyy 602456; Izz 1.01996e+06; Ixy 3.63798e-12; Iyz -5.21e-15; Izx 2.27374e-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 4, more than the hole's radius: the solid of every point within 4 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 inner part of a spindle torus (a tube of radius 4 about the rim's circle of radius//! 3), down to a point on the axis √7 from the face.//!//! 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, 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
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
8548.447247
8548.447247
2.1e-16
area
2430.166661
2430.166661
3.7e-16
agrees with
cad-kernel, kentron, next.BREP, cadrs
mesh
18378 triangles, closed, 2 degenerate
centre of gravity
(5.85265e-16, 3.72375e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 602456; Iyy 602456; Izz 1.01996e+06; Ixy -9.09495e-12; Iyz 3.63124e-12; Izx -5.00222e-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 4, past the hole's radius: the hole fills, and each end of it leaves a//! dimple, a spindle torus's inside, its lowest point 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, 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.3 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 past its hole, 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())
}