A plate shaped like a plus sign: its outline in the xy plane is the polygon through (3, 0), (6, 0), (6, 3), (9, 3), (9, 6), (6, 6), (6, 9), (3, 9), (3, 6), (0, 6), (0, 3) and (3, 3), a square 3 × 3 with an arm 3 × 3 on each of its four sides, 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 four inside corners' edges, the concave vertical edges through (3, 3), (6, 3), (6, 6) and (3, 6), stay sharp: the two faces beside each, moved out, meet along a vertical line 1 out from both, such as x = 7, y = 2 beside the edge through (6, 3). 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 eight convex corners rounded to radius 1 and its four inside corners sharp, of area A + Pd + kd², where A = 45 and P = 36 are the outline's area and perimeter and k = 8·(π/4) − 4·1 counts a quarter disc's worth at each convex corner and takes off the square 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
209 ms; CPU time 324 ms; peak memory 17.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
316.1592855
316.1592855
1.4e-15
area
293.362818
293.362818
7.8e-16
agrees with
occt, solidcraft, next.BREP, cadrs, springrep
mesh
32764 triangles, closed, 16 degenerate
centre of gravity
(4.5, 4.5, 1) its STEP's solid
inertia
about it, of unit density: Ixx 2544.46; Iyy 2544.46; Izz 4308.62; Ixy -4.9738e-14; Iyz 9.76996e-15; Izx 2.30926e-14
//! The plus-shaped plate through (3, 0), (6, 0), (6, 3), (9, 3), (9, 6), (6, 6), (6, 9), (3, 9),//! (3, 6), (0, 6), (0, 3), (3, 3), 2 thick, grown by 1: its four concave edges stay sharp.usecrate::sketch::polygon;
use cad_kernel::build::prism;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubconstPLUS: [[f64; 2]; 12] = [[3., 0.], [6., 0.], [6., 3.], [9., 3.], [9., 6.], [6., 6.],
[6., 9.], [3., 9.], [3., 6.], [0., 6.], [0., 3.], [3., 3.]];
pubfnbuild() -> Result<Brep, String> {
let outline = polygon(&PLUS.map(|[x, y]| [x, y, 0.]));
grown(&prism(&outline, 0., 2.)?, 1., Join::Round)
}
Time
660 ms; CPU time 659 ms; peak memory 370.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.
"""A plus-shaped plate grown by 1. The plate whose outline in the xy plane is the polygon through
(3, 0), (6, 0), (6, 3), (9, 3), (9, 6), (6, 6), (6, 9), (3, 9), (3, 6), (0, 6), (0, 3) and (3, 3),
extruded 2 along +z, grown by 1: every point within 1 of it. Its four concave vertical edges stay
sharp."""fromOCP.BRepBuilderAPIimportBRepBuilderAPI_MakeFace, BRepBuilderAPI_MakePolygonfromOCP.BRepPrimAPIimportBRepPrimAPI_MakePrismfromOCP.gp import gp_Pnt, gp_Vec
from offset import offset
OUTLINE = [(3, 0), (6, 0), (6, 3), (9, 3), (9, 6), (6, 6), (6, 9), (3, 9), (3, 6), (0, 6), (0, 3),
(3, 3)]
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
2.44 s; CPU time 2.43 s; peak memory 63.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
316.1592855
316.1592855
7.2e-16
area
293.362818
293.362818
9.7e-16
agrees with
cad-kernel, occt, next.BREP, cadrs, springrep
mesh
19532 triangles, closed, 16 degenerate
centre of gravity
(4.5, 4.5, 1) its STEP's solid
inertia
about it, of unit density: Ixx 2544.46; Iyy 2544.46; Izz 4308.62; Ixy 3.83693e-13; Iyz -3.62821e-13; Izx -3.08198e-13
//! The plus-shaped plate, its outline the polygon through (3, 0), (6, 0), (6, 3), (9, 3), (9, 6),//! (6, 6), (6, 9), (3, 9), (3, 6), (0, 6), (0, 3) and (3, 3) extruded 2 along +z, grown by 1: every//! point within 1 of it, its convex edges rounded and its four concave ones sharp, SolidCraft's//! offset of the whole solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
/// The plus outline in the plane z = 0, extruded `thickness` along +z.pubfnplus_plate(thickness: f64) -> R<Body> {
let outline = polygon(&[
(3.0, 0.0),
(6.0, 0.0),
(6.0, 3.0),
(9.0, 3.0),
(9.0, 6.0),
(6.0, 6.0),
(6.0, 9.0),
(3.0, 9.0),
(3.0, 6.0),
(0.0, 6.0),
(0.0, 3.0),
(3.0, 3.0),
]);
extrude(&Plane::XY, outline, 0.0, thickness)
}
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&plus_plate(2.0)?, 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
664 ms; CPU time 664 ms; peak memory 47.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
316.1592855
316.1592855
6.2e-13
area
293.362818
293.362818
8.1e-13
agrees with
cad-kernel, occt, solidcraft, cadrs, springrep
mesh
47674 triangles, closed, 16 degenerate
centre of gravity
(4.5, 4.5, 1) its STEP's solid
inertia
about it, of unit density: Ixx 2544.46; Iyy 2544.46; Izz 4308.62; Ixy -4.76847e-10; Iyz -2.1957e-10; Izx 8.17113e-10
//! The plus-shaped plate, the outline through (3, 0), (6, 0), (6, 3), (9, 3), (9, 6), (6, 6),//! (6, 9), (3, 9), (3, 6), (0, 6), (0, 3) and (3, 3) extruded 2 along +z, grown by 1 to its//! parallel body: its convex edges rounded, its four 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(3.0, 0.0, 0.0), p(6.0, 0.0, 0.0), p(6.0, 3.0, 0.0), p(9.0, 3.0, 0.0),
p(9.0, 6.0, 0.0), p(6.0, 6.0, 0.0), p(6.0, 9.0, 0.0), p(3.0, 9.0, 0.0),
p(3.0, 6.0, 0.0), p(0.0, 6.0, 0.0), p(0.0, 3.0, 0.0), p(3.0, 3.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
18 ms; CPU time 30 ms; peak memory 10.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.
//! The plus-shaped plate whose outline is the polygon through (3, 0), (6, 0), (6, 3), (9, 3),//! (9, 6), (6, 6), (6, 9), (3, 9), (3, 6), (0, 6), (0, 3) and (3, 3), extruded 2 along +z, grown//! by 1: the solid of every point within 1 of it. Convex edges become quarter cylinders and//! corners eighths of balls; the four 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};
pubconstPLUS: [[f64; 2]; 12] = [
[3.0, 0.0], [6.0, 0.0], [6.0, 3.0], [9.0, 3.0], [9.0, 6.0], [6.0, 6.0],
[6.0, 9.0], [3.0, 9.0], [3.0, 6.0], [0.0, 6.0], [0.0, 3.0], [3.0, 3.0],
];
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let plate = extrude(k, &Profile::of(Plane::xy(0.0), vec![Loop::polygon(&PLUS)]), 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
24 ms; CPU time 23 ms; peak memory 10.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
316.1592855
316.1592855
9.0e-16
area
293.362818
293.362818
5.8e-16
agrees with
cad-kernel, occt, solidcraft, next.BREP, cadrs
mesh
14860 triangles, closed
centre of gravity
(4.5, 4.5, 1) its STEP's solid
inertia
about it, of unit density: Ixx 2544.46; Iyy 2544.46; Izz 4308.62; Ixy -1.42109e-14; Iyz -5.32907e-15; Izx 4.35207e-14
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 plus-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())
}