A five-pointed star prism: its outline in the xy plane is the polygon through ten points around the origin, alternately 10 and 5 from it, the first at 10 on the +y axis, (0, 10), and each next 36° further anticlockwise, so that the points of the star are 10 from the origin at 90°, 162°, 234°, 306° and 18°, and its inside corners 5 from it at 126°, 198°, 270°, 342° and 54°. It is extruded 2 along +z. Grow it by 1/2: the solid of every point within 1/2 of the prism.
Each face moves 1/2 outward. Each convex edge becomes a part of a cylinder of radius 1/2 about it, and each corner where three convex edges meet a part of a ball. The ten sides are e long. At each point of the star they meet at 2γ, about 52.5°, so the vertical edge there is rounded by a cylinder turning through 180° − 2γ; at each inside corner they meet at 2(144° − γ), about 235.5°, and the concave vertical edge there stays sharp: the two sides beside it, moved out, meet along a vertical line. 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 prism's section at any height from z = 0 to z = 2 is the outline grown by 1/2: its sides moved out 1/2, its points rounded to radius 1/2 and its inside corners sharp, of area A + Pd + kd², where A and P are the outline's area and perimeter, and k counts at each point half the angle its rounding turns through, (π − 2γ)/2, and takes off at each inside corner the kite that the two sides beside it both cover, tan(54° − γ). Above the top, at height u (0 ≤ u ≤ 1/2), the section is the outline grown by √(1/4 − u²) in the same way, and likewise below the bottom.
As a set:
$$\bigl(S \times [0,2]\bigr) \oplus B_{1/2},\quad S = \operatorname{poly}\bigl(p_0, \dots, p_9\bigr),\ p_i = \rho_i\,(\cos(90^\circ + 36^\circ i),\ \sin(90^\circ + 36^\circ i)),\ \rho_i = 10 \text{ for even } i,\ 5 \text{ for odd } i$$
expected
closed form
volume
535.2786402
t(A + Pd + kd²) + 2(Ad + πPd²/4 + 2kd³/3), A = 250 sin 36°, P = 10e, e = √(125 − 100 cos 36°), k = 5π/2 − 5γ − 5 tan(54° − γ), γ = asin(5 sin 36°/e), t = 2, d = 1/2
area
539.8160064
t(P + 2kd) + 2(A + πPd/2 + 2kd²)
Drawing
TopIsometricFrontRight
Third-angle projection, the three views at one scale. Drawn from occt's result, which passed.
† 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
221 ms; CPU time 431 ms; peak memory 17.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
535.2786402
535.2786402
1.1e-15
area
539.8160064
539.8160064
2.1e-16
agrees with
occt, solidcraft, next.BREP, cadrs, springrep
mesh
25122 triangles, closed, 10 degenerate
centre of gravity
(-1.81279e-16, -1.33227e-15, 1) its STEP's solid
inertia
about it, of unit density: Ixx 9293.05; Iyy 9293.05; Izz 17800.6; Ixy -1.13953e-12; Iyz 1.59663e-15; Izx -8.89416e-14
//! A five-pointed star prism, its points 10 from the z axis (the first on +y) and its inside//! corners 5, 2 high, grown by 1/2: its five concave edges, at an oblique angle, stay sharp.usecrate::sketch::polygon;
use cad_kernel::build::prism;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
// ten corners anticlockwise from (0, 10), alternately 10 and 5 out, 36° apartlet corners: Vec<_> = (0..10).map(|k| {
let r = if k % 2 == 0 { 10. } else { 5. };
let (s, c) = (90. + 36. * k as f64).to_radians().sin_cos();
[r * c, r * s, 0.]
}).collect();
grown(&prism(&polygon(&corners), 0., 2.)?, 0.5, Join::Round)
}
Time
651 ms; CPU time 650 ms; peak memory 370.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.
"""A five-pointed star prism grown by a half. Its outline in the xy plane is the polygon through ten
points around the origin, alternately 10 and 5 from it, the first at 10 on the +y axis and each
next 36° further anticlockwise, extruded 2 along +z; grown by 1/2, its inside corners stay sharp."""import math
fromOCP.BRepBuilderAPIimportBRepBuilderAPI_MakeFace, BRepBuilderAPI_MakePolygonfromOCP.BRepPrimAPIimportBRepPrimAPI_MakePrismfromOCP.gp import gp_Pnt, gp_Vec
from offset import offset
OUTER, INNER = 10, 5# how far the points and the inside corners are from the originTHICKNESS = 2GROWTH = 0.5defbuild():
polygon = BRepBuilderAPI_MakePolygon()
for i inrange(10):
radius = OUTERif i % 2 == 0elseINNER
turn = math.radians(90 + 36 * i)
polygon.Add(gp_Pnt(radius * math.cos(turn), radius * math.sin(turn), 0))
polygon.Close()
outline = BRepBuilderAPI_MakeFace(polygon.Wire()).Face()
star = BRepPrimAPI_MakePrism(outline, gp_Vec(0, 0, THICKNESS)).Shape()
returnoffset(star, 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.55 s; CPU time 2.55 s; peak memory 60.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
535.2786402
535.2786402
2.1e-16
area
539.8160064
539.8160064
1.1e-15
agrees with
cad-kernel, occt, next.BREP, cadrs, springrep
mesh
15714 triangles, closed, 10 degenerate
centre of gravity
(1.2232e-14, -1.70974e-14, 1) its STEP's solid
inertia
about it, of unit density: Ixx 9293.05; Iyy 9293.05; Izz 17800.6; Ixy 5.63657e-12; Iyz -9.22081e-12; Izx -1.61293e-12
//! The five-pointed star prism, its outline the ten points alternately 10 and 5 from the origin,//! the first (0, 10) and each next 36° further anticlockwise, extruded 2 along +z, grown by 1/2://! every point within 1/2 of it, its convex edges rounded and its five concave ones sharp,//! SolidCraft's offset of the whole solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let points: Vec<(f64, f64)> = (0..10)
.map(|i| {
let r = if i % 2 == 0 { 10.0 } else { 5.0 };
let a = (90.0 + 36.0 * i as f64).to_radians();
(r * a.cos(), r * a.sin())
})
.collect();
let star = extrude(&Plane::XY, polygon(&points), 0.0, 2.0)?;
solidcraft_kernel::offset_solid(&star, 0.5, 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
1.20 s; CPU time 1.20 s; peak memory 62.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
535.2786405
535.2786402
4.8e-10
area
539.8160066
539.8160064
3.6e-10
agrees with
cad-kernel, occt, solidcraft, cadrs, springrep
mesh
75466 triangles, closed
centre of gravity
(-8.20689e-10, -6.98983e-09, 1) its STEP's solid
inertia
about it, of unit density: Ixx 9293.05; Iyy 9293.05; Izz 17800.6; Ixy -1.83672e-06; Iyz -5.78568e-06; Izx 4.42489e-07
//! The five-pointed star prism, the outline through ten points alternately 10 and 5 from the//! origin, every 36° from (0, 10), extruded 2 along +z, grown by 1/2 to its parallel body: its//! convex edges rounded, its five concave vertical edges left sharp.usecrate::solids::offset::parallel;
usecrate::solids::{p, polygon};
usecrate::Refusal;
use brep_kernel::{extrude_profile_brep, BrepSolid};
use std::f64::consts::{FRAC_PI_2, PI};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let corners: Vec<_> = (0..10)
.map(|i| {
let angle = FRAC_PI_2 + i as f64 * PI / 5.0;
let rho = if i % 2 == 0 { 10.0 } else { 5.0 };
p(rho * angle.cos(), rho * angle.sin(), 0.0)
})
.collect();
let star = extrude_profile_brep(&polygon(&corners)?, p(0.0, 0.0, 1.0), 2.0)?;
Ok(parallel(&star, 0.5)?)
}
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
54 ms; CPU time 88 ms; peak memory 13.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.
//! The five-pointed star prism: its outline the polygon through ten points about the origin,//! alternately 10 and 5 from it, the first (0, 10) and each next 36° further anticlockwise,//! extruded 2 along +z, grown by 1/2: the solid of every point within 1/2 of it. The points'//! edges round in pieces of cylinders; the five 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 star: Vec<[f64; 2]> = (0..10)
.map(|i| {
let r = if i % 2 == 0 { 10.0 } else { 5.0 };
let a = (90.0 + 36.0 * i as f64).to_radians();
[r * a.cos(), r * a.sin()]
})
.collect();
let prism = extrude(k, &Profile::of(Plane::xy(0.0), vec![Loop::polygon(&star)]), 2.0)?;
grown(k, prism, 0.5)
}
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 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.
Data
its STEP's
expected
rel. error
volume
535.2786402
535.2786402
1.1e-15
area
539.8160064
539.8160064
0.0e+00
agrees with
cad-kernel, occt, solidcraft, next.BREP, cadrs
mesh
13606 triangles, closed
centre of gravity
(3.98228e-16, -8.88178e-16, 1) its STEP's solid
inertia
about it, of unit density: Ixx 9293.05; Iyy 9293.05; Izz 17800.6; Ixy 1.20318e-12; Iyz -6.68804e-14; Izx -8.65974e-14
//! The five-pointed star prism, the outline through ten points alternately 10 and 5 from the//! origin, every 36° from (0, 10), 2 thick, grown by 1/2: its convex edges rounded, its five inside//! corners' edges sharp.use std::f64::consts::{FRAC_PI_2, PI};
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::shell::prism;
pubfnbuild() -> Result<Brep, String> {
let outline: Vec<[f64; 2]> = (0..10)
.map(|i| {
let angle = FRAC_PI_2 + i as f64 * PI / 5.;
let rho = if i % 2 == 0 { 10. } else { 5. };
[rho * angle.cos(), rho * angle.sin()]
})
.collect();
let star = prism(&outline, &["wall"; 10], 2., "star")?;
grown(&star, 0.5)
}
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 940 µs; 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 five-pointed star prism grown by a half.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())
}