A U-shaped plate: its outline in the xy plane is the polygon through (0, 0), (9, 0), (9, 9), (6, 9), (6, 3), (3, 3), (3, 9) and (0, 9), a square 9 × 9 with a slot 3 wide cut 6 deep into it from the side y = 9, extruded 2 along +z. Grow it by 1: the solid of every point within 1 of the plate.
Each face moves 1 outward. Each convex edge becomes a quarter of a cylinder of radius 1 about it, and each corner where three convex edges meet an eighth of a ball. The slot's walls move 1 into it, leaving it 1 wide, from x = 4 to x = 5, and its floor moves up to y = 4. The slot's two inside corners, the concave vertical edges through (3, 3) and (6, 3), stay sharp: the faces beside each, moved, meet along the vertical lines x = 4, y = 4 and x = 5, y = 4. Where such an edge meets the top or the bottom face, the rounds of the two top or bottom edges beside it meet in a sharp concave crease.
The grown plate's section at any height from z = 0 to z = 2 is the outline grown by 1: its sides moved out 1, its six convex corners rounded to radius 1 and its two inside corners sharp, of area A + Pd + kd², where A = 63 and P = 48 are the outline's area and perimeter and k = 6·(π/4) − 2·1 counts a quarter disc's worth at each convex corner and takes off the square that the two sides beside an inside corner both cover. Above the top, at height u (0 ≤ u ≤ 1), the section is the outline grown by √(1 − u²) in the same way, and likewise below the bottom.
† 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
157 ms; CPU time 235 ms; peak memory 16.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
432.4395203
432.4395203
5.3e-16
area
394.4955592
394.4955592
2.9e-16
agrees with
occt, solidcraft, next.BREP, cadrs, springrep
mesh
24416 triangles, closed, 12 degenerate
centre of gravity
(4.5, 4.32542, 1) its STEP's solid
inertia
about it, of unit density: Ixx 4698.93; Iyy 4993.43; Izz 8622.15; Ixy -7.53137e-14; Iyz -1.52713e-14; Izx 1.68754e-14
//! The U-shaped plate through (0, 0), (9, 0), (9, 9), (6, 9), (6, 3), (3, 3), (3, 9), (0, 9), 2//! thick, grown by 1: the slot narrows to 1 wide, its two concave edges sharp.usecrate::sketch::polygon;
use cad_kernel::build::prism;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
constU: [[f64; 2]; 8] = [[0., 0.], [9., 0.], [9., 9.], [6., 9.], [6., 3.], [3., 3.], [3., 9.], [0., 9.]];
pubfnbuild() -> Result<Brep, String> {
let outline = polygon(&U.map(|[x, y]| [x, y, 0.]));
grown(&prism(&outline, 0., 2.)?, 1., Join::Round)
}
Time
644 ms; CPU time 643 ms; peak memory 370 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.
"""A U-shaped plate grown by 1. Its outline in the xy plane is the polygon through (0, 0), (9, 0),
(9, 9), (6, 9), (6, 3), (3, 3), (3, 9) and (0, 9), a 9 × 9 square with a slot 3 wide cut 6 deep
into it, extruded 2 along +z; grown by 1, the slot's two inside corners stay sharp."""fromOCP.BRepBuilderAPIimportBRepBuilderAPI_MakeFace, BRepBuilderAPI_MakePolygonfromOCP.BRepPrimAPIimportBRepPrimAPI_MakePrismfromOCP.gp import gp_Pnt, gp_Vec
from offset import offset
OUTLINE = [(0, 0), (9, 0), (9, 9), (6, 9), (6, 3), (3, 3), (3, 9), (0, 9)]
THICKNESS = 2GROWTH = 1defbuild():
polygon = BRepBuilderAPI_MakePolygon()
for x, y inOUTLINE:
polygon.Add(gp_Pnt(x, y, 0))
polygon.Close()
outline = BRepBuilderAPI_MakeFace(polygon.Wire()).Face()
plate = BRepPrimAPI_MakePrism(outline, gp_Vec(0, 0, THICKNESS)).Shape()
returnoffset(plate, 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.
Time
1.65 s; CPU time 1.65 s; peak memory 58.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
432.4395203
432.4395203
0.0e+00
area
394.4955592
394.4955592
4.3e-16
agrees with
cad-kernel, occt, next.BREP, cadrs, springrep
mesh
14504 triangles, closed, 12 degenerate
centre of gravity
(4.5, 4.32542, 1) its STEP's solid
inertia
about it, of unit density: Ixx 4698.93; Iyy 4993.43; Izz 8622.15; Ixy 1.54769e-12; Iyz -3.02913e-12; Izx 1.91491e-12
//! The U-shaped plate, its outline the polygon through (0, 0), (9, 0), (9, 9), (6, 9), (6, 3),//! (3, 3), (3, 9) and (0, 9) extruded 2 along +z, grown by 1: every point within 1 of it, its//! convex edges rounded and the slot's two concave ones sharp, SolidCraft's offset of the whole//! solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let outline = polygon(&[(0.0, 0.0), (9.0, 0.0), (9.0, 9.0), (6.0, 9.0), (6.0, 3.0), (3.0, 3.0), (3.0, 9.0), (0.0, 9.0)]);
let plate = extrude(&Plane::XY, outline, 0.0, 2.0)?;
solidcraft_kernel::offset_solid(&plate, 1.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
190 ms; CPU time 189 ms; peak memory 32.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
432.4395203
432.4395203
6.6e-16
area
394.4955592
394.4955592
7.2e-16
agrees with
cad-kernel, occt, solidcraft, cadrs, springrep
mesh
31504 triangles, closed, 12 degenerate
centre of gravity
(4.5, 4.32542, 1) its STEP's solid
inertia
about it, of unit density: Ixx 4698.93; Iyy 4993.43; Izz 8622.15; Ixy 5.26264e-13; Iyz 2.64225e-13; Izx 4.22329e-13
//! The U-shaped plate, the outline through (0, 0), (9, 0), (9, 9), (6, 9), (6, 3), (3, 3),//! (3, 9) and (0, 9) extruded 2 along +z, grown by 1 to its parallel body: its convex edges//! rounded, the slot's two concave vertical edges left sharp.usecrate::solids::offset::parallel;
usecrate::solids::{p, polygon};
usecrate::Refusal;
use brep_kernel::{extrude_profile_brep, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let outline = polygon(&[
p(0.0, 0.0, 0.0), p(9.0, 0.0, 0.0), p(9.0, 9.0, 0.0), p(6.0, 9.0, 0.0),
p(6.0, 3.0, 0.0), p(3.0, 3.0, 0.0), p(3.0, 9.0, 0.0), p(0.0, 9.0, 0.0),
])?;
let plate = extrude_profile_brep(&outline, p(0.0, 0.0, 1.0), 2.0)?;
Ok(parallel(&plate, 1.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
20 ms; CPU time 30 ms; peak memory 9.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.
//! The U-shaped plate whose outline is the polygon through (0, 0), (9, 0), (9, 9), (6, 9),//! (6, 3), (3, 3), (3, 9) and (0, 9), extruded 2 along +z, grown by 1: the solid of every point//! within 1 of it. The slot narrows to 1 wide; its two concave vertical edges stay sharp.//!//! The outline extruded, then cadrs's offset with rounded edges.usecrate::bench::extrude;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Loop, Plane, Profile};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let outline = Loop::polygon(&[
[0.0, 0.0], [9.0, 0.0], [9.0, 9.0], [6.0, 9.0], [6.0, 3.0], [3.0, 3.0], [3.0, 9.0], [0.0, 9.0],
]);
let plate = extrude(k, &Profile::of(Plane::xy(0.0), vec![outline]), 2.0)?;
grown(k, plate, 1.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
21 ms; CPU time 20 ms; peak memory 9.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
432.4395203
432.4395203
9.2e-16
area
394.4955592
394.4955592
4.3e-16
agrees with
cad-kernel, occt, solidcraft, next.BREP, cadrs
mesh
10988 triangles, closed
centre of gravity
(4.5, 4.32542, 1) its STEP's solid
inertia
about it, of unit density: Ixx 4698.93; Iyy 4993.43; Izz 8622.15; Ixy -1.14389e-13; Iyz 1.94487e-14; Izx 4.44089e-15
//! The U-shaped plate on the outline (0, 0), (9, 0), (9, 9), (6, 9), (6, 3), (3, 3), (3, 9),//! (0, 9), 2 thick, grown by 1: its convex edges rounded, the slot's two inside corners' edges//! sharp.use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::shell::prism;
pubfnbuild() -> Result<Brep, String> {
let outline = [
[0., 0.], [9., 0.], [9., 9.], [6., 9.], [6., 3.], [3., 3.], [3., 9.], [0., 9.],
];
let plate = prism(&outline, &["wall"; 8], 2., "plate")?;
grown(&plate, 1.)
}
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 U-shaped plate grown by 1.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())
}