The plate from (−20, −15, 0) to (20, 15, 4) with a window cut right through it along z: the rectangle from (−10, −7) to (10, 7) with its four corners rounded to radius 2. Grow it by 3, more than the corners' radius but less than half the window's width: the solid of every point within 3 of the 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 window stays open but narrows: within the plate's thickness its walls come in 3, to the rectangle from (−7, −4) to (7, 4), whose corners are square, the rounded corners (of radius 2) having closed up. Over and under the window, at a height u beyond the plate's face (0 ≤ u ≤ 3), the opening is the window's outline shrunk by √(9 − u²): its sides moved in that far and its corners' radius 2 − √(9 − u²) where that is positive, square where it is not. So the grown faces round the window's straight rim in quarter cylinders of radius 3 about its edges, and its rounded corners in the outer side of a tube of radius 3 about each corner's arc.
† 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
200 ms; CPU time 283 ms; peak memory 19.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
14575.52727
14575.52727
0.0e+00
area
4580.552126
4580.552126
7.9e-16
agrees with
occt, next.BREP, cadrs
mesh
22616 triangles, closed, 16 degenerate
centre of gravity
(-6.08388e-16, -2.49595e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 1.74324e+06; Iyy 2.78641e+06; Izz 4.30364e+06; Ixy -1.09139e-11; Iyz -2.18279e-11; Izx -6.13909e-12
//! The plate from (−20, −15, 0) to (20, 15, 4) with a window through it, the rectangle from//! (−10, −7) to (10, 7) with its corners rounded to radius 2, grown by 3: the window narrows and its//! rounded corners close up square.usecrate::sketch::{block, rounded_rectangle};
use cad_kernel::boolean::{combined, Op};
use cad_kernel::build::prism;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
let plate = block([-20., -15., 0.], [20., 15., 4.])?;
// the window's punch runs 1 past both faces of the platelet window = prism(&rounded_rectangle([-10., -7.], [10., 7.], 2., -1.), 0., 6.)?;
grown(&combined(&plate, &window, Op::Cut, 0.)?, 3., Join::Round)
}
Time
650 ms; CPU time 650 ms; peak memory 371.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
14575.52727
14575.52727
9.6e-12
area
4580.552126
4580.552126
1.1e-13
agrees with
cad-kernel, next.BREP, cadrs
mesh
12518 triangles, closed, 8 degenerate
centre of gravity
(-9.67181e-16, -1.16998e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 1.74324e+06; Iyy 2.78641e+06; Izz 4.30364e+06; Ixy -6.91784e-11; Iyz -4.09273e-12; Izx 2.72848e-12
"""A windowed plate grown by 3, past its window's corner radius. The plate from (−20, −15, 0) to
(20, 15, 4) with a window cut right through it: the rectangle from (−10, −7) to (10, 7), its four
corners rounded to radius 2. Grown by 3, the window narrows and its rounded corners close up."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeBoxfromOCP.gp import gp_Pnt
from draft import rounded_box
from offset import less, offset
PLATE = ((-20, -15, 0), (20, 15, 4))
WINDOW = ((-10, -7), (10, 7))
CORNER_RADIUS = 2GROWTH = 3defbuild():
plate = BRepPrimAPI_MakeBox(gp_Pnt(*PLATE[0]), gp_Pnt(*PLATE[1])).Shape()
(x0, y0), (x1, y1) = WINDOW# The window's cutter runs 1 past both faces of the plate.
cutter = rounded_box((x0, y0, PLATE[0][2] - 1), (x1, y1, PLATE[1][2] + 1), CORNER_RADIUS)
returnoffset(less(plate, cutter, "the window"), 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
125 ms; CPU time 125 ms; peak memory 49 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 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 1.3242976304283565)
//! The plate from (−20, −15, 0) to (20, 15, 4) with a window cut through it, the rectangle from//! (−10, −7) to (10, 7) with its corners rounded to radius 2, grown by 3, more than the corners'//! radius: every point within 3 of it, SolidCraft's offset of the whole solid (`offset_solid`),//! its convex edges rounded.usesuper::pocketed_block_grown_past_its_corners::rounded_box;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
let plate = block((-20.0, -15.0, 0.0), (20.0, 15.0, 4.0))?;
// the window's cutter, a box with its vertical edges rounded, runs past both faceslet window = rounded_box((-10.0, -7.0, -1.0), (10.0, 7.0, 5.0), 2.0)?;
solidcraft_kernel::offset_solid(&cut(&plate, &window)?, 3.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
4.20 s; CPU time 4.20 s; peak memory 72.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
14575.52727
14575.52727
2.1e-12
area
4580.552126
4580.552126
1.9e-12
agrees with
cad-kernel, occt, cadrs
mesh
32384 triangles, closed, 16 degenerate
centre of gravity
(-1.37234e-11, 9.88215e-12, 2) its STEP's solid
inertia
about it, of unit density: Ixx 1.74324e+06; Iyy 2.78641e+06; Izz 4.30364e+06; Ixy -3.96351e-07; Iyz 4.2297e-07; Izx 4.27597e-07
//! The plate from (−20, −15, 0) to (20, 15, 4) with a window cut through it, the rectangle from//! (−10, −7) to (10, 7) with its corners rounded to radius 2, grown by 3, more than the corners'//! radius, to its parallel body.//!//! The window's rounded rectangle is extruded from below the plate up past its top and cut away.usecrate::solids::offset::{parallel, subtract};
usecrate::solids::outline::{deg, Chain};
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{extrude_profile_brep, make_box_brep, transform_brep, AffineTransform, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
letmut c = Chain::new();
c.line((-8.0, -7.0), (8.0, -7.0))?
.arc((8.0, -5.0), 2.0, deg(270.0), deg(360.0), true)?
.line((10.0, -5.0), (10.0, 5.0))?
.arc((8.0, 5.0), 2.0, deg(0.0), deg(90.0), true)?
.line((8.0, 7.0), (-8.0, 7.0))?
.arc((-8.0, 5.0), 2.0, deg(90.0), deg(180.0), true)?
.line((-10.0, 5.0), (-10.0, -5.0))?
.arc((-8.0, -5.0), 2.0, deg(180.0), deg(270.0), true)?;
let window = extrude_profile_brep(&c.curves, p(0.0, 0.0, 1.0), 6.0)?;
let down = AffineTransform { elements: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 0.0, 1.0] };
let window = transform_brep(&window, down, false)?;
let plate = make_box_brep(p(-20.0, -15.0, 0.0), 40.0, 30.0, 4.0)?;
let windowed = subtract(&plate, &window)?;
Ok(parallel(&windowed, 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
61 ms; CPU time 112 ms; peak memory 13.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
14575.52727
14575.52727
1.2e-16
area
4580.552126
4580.552126
7.9e-16
agrees with
cad-kernel, occt, next.BREP
mesh
16008 triangles, closed, 16 degenerate
centre of gravity
(0, 3.11994e-17, 2) its STEP's solid
inertia
about it, of unit density: Ixx 1.74324e+06; Iyy 2.78641e+06; Izz 4.30364e+06; Ixy -4.36557e-11; Iyz -1.81899e-12; Izx -6.82121e-13
//! The plate from (−20, −15, 0) to (20, 15, 4) with a window cut through it along z, the//! rectangle from (−10, −7) to (10, 7) with its four corners rounded to radius 2, grown by 3, more//! than the corners' radius: the solid of every point within 3 of it.//!//! The plate a rectangle extruded, the window its rounded rectangle sketched below the plate and//! extruded up through it, and cut; then cadrs's offset with rounded edges.usecrate::bench::{block, cut, extrude, p3};
usecrate::shared::fillet::rounded_polygon;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Loop, Plane, Profile};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let plate = block(k, p3(-20.0, -15.0, 0.0), p3(20.0, 15.0, 4.0))?;
let outline = rounded_polygon(&[(-10.0, -7.0), (10.0, -7.0), (10.0, 7.0), (-10.0, 7.0)], &[2.0; 4]);
let window = extrude(k, &Profile::of(Plane::xy(-1.0), vec![Loop::new(outline)]), 6.0)?;
let windowed = cut(k, plate, window)?;
grown(k, windowed, 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
109 ms; CPU time 108 ms; peak memory 10.2 MB
Notes
wrong volume 14574.7253948 against 14575.5272681 (its STEP's); area 4580.84937506 against 4580.55212621 (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
14574.72539
14575.52727
5.5e-05
area
4580.849375
4580.552126
6.5e-05
agrees with
no other kernel
mesh
7712 triangles, closed
centre of gravity
(2.27768e-15, 4.68016e-16, 2) its STEP's solid
inertia
about it, of unit density: Ixx 1.7432e+06; Iyy 2.78633e+06; Izz 4.30355e+06; Ixy 2.18279e-11; Iyz 2.91038e-11; Izx -3.86535e-12
//! The plate (−20, −15, 0)–(20, 15, 4) with a window cut through it, the rectangle from (−10, −7)//! to (10, 7) with its corners rounded to radius 2, grown by 3: springrep's own offset.use std::f64::consts::FRAC_PI_2;
use springrep::boolean::difference;
use springrep::math::{Vec2, Vec3};
use springrep::primitive::block;
use springrep::profile::{NamedSegment, Profile};
use springrep::sweep::extrude;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let plate = block(&at([-20., -15., 0.]), Vec3::new(40., 30., 4.), "plate").map_err(e)?;
let p = |x: f64, y: f64| Vec2::new(x, y);
let outline = Profile::outline(vec![
NamedSegment::line(p(-8., -7.), p(8., -7.), "wall"),
NamedSegment::arc(p(8., -5.), 2., -FRAC_PI_2, FRAC_PI_2, "corner"),
NamedSegment::line(p(10., -5.), p(10., 5.), "wall"),
NamedSegment::arc(p(8., 5.), 2., 0., FRAC_PI_2, "corner"),
NamedSegment::line(p(8., 7.), p(-8., 7.), "wall"),
NamedSegment::arc(p(-8., 5.), 2., FRAC_PI_2, FRAC_PI_2, "corner"),
NamedSegment::line(p(-10., 5.), p(-10., -5.), "wall"),
NamedSegment::arc(p(-8., -5.), 2., 2. * FRAC_PI_2, FRAC_PI_2, "corner"),
]);
// the window's cutter runs past both faces of the platelet window = extrude(&outline, &at([0., 0., -1.]), 6., "window").map_err(e)?;
let windowed = difference(&plate, &window).map_err(e)?;
grown(&windowed, 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.2 ms; CPU time 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 round-cornered window grown past the corners' 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())
}