The elliptic cylinder of geometry/elliptic-cylinder, the ellipse x²/25 + y²/9 ≤ 1 in the plane z = 0 extruded straight up to z = 10, grown by 1: the solid of every point within 1 of it.
The ends move to z = −1 and z = 11. The side moves out along its normals to the curve at distance 1 outside the ellipse, which is no ellipse (an offset of an ellipse is not a conic, nor even rational), extruded from z = 0 to z = 10. Each rim becomes the outer quarter of a tube of radius 1 about the rim's ellipse: a canal surface whose spine is an ellipse, not a torus.
E is the complete elliptic integral of the second kind, of parameter m = 1 − b²/a² = 16/25, so p is the ellipse's perimeter; M is the side's mean curvature integrated over it, πh, plus each rim's length times half its turning angle, π/4.
† 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
5.64 s; CPU time 9.48 s; peak memory 90.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
896.4590976
896.4590991
1.7e-09
area
505.1114239
505.111424
2.1e-10
agrees with
next.BREP, springrep
mesh
40362 triangles, closed
centre of gravity
(-1.28055e-11, -5.87106e-12, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -7.12954e-08; Iyz 5.11592e-13; Izx 3.17606e-07
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to 10)//! grown by 1: every point within 1 of it.//!//! Refused, by the kernel: "face 0 (extrusion) is not swept along its normal: a extrusion has no//! offset in closed form". cad-kernel has no ellipse in a profile, so the side is the rational//! B-spline ellipse extruded (`Surface::Extrusion`), and `offset::grown` sweeps a face along its//! normal only on a plane, cylinder, cone, sphere or torus (`offset::normal_sweep`); an ellipse's offset//! is no conic. Nothing else in 0.21.0 moves the side: `Surface::parallel` reads only a B-spline//! sheet's offset, not an extrusion's; `build::offset` refuses a spline in a profile; and the//! circular cylinder stretched into an elliptic one is an affine image (`Surface::Affine`), which//! has no offset either (`Surface::has_offset`).usecrate::cases::geometry::elliptic_cylinder;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
grown(&elliptic_cylinder::build()?, 1., Join::Round)
}
Time
633 ms; CPU time 632 ms; peak memory 368 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
896.4593587
896.4590991
2.9e-07
area
505.1115453
505.111424
2.4e-07
agrees with
no other kernel
mesh
32950 triangles, closed
centre of gravity
(-1.83605e-08, 7.82669e-14, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -2.44971e-10; Iyz 7.95607e-13; Izx 3.88468e-12
"""An elliptic cylinder grown by 1. The ellipse x²/25 + y²/9 ≤ 1 in the plane z = 0 extruded up to
z = 10 (geometry/elliptic-cylinder), grown by 1: every point within 1 of it."""from bench import other_case
from offset import offset
defbuild():
# OCCT builds this solid (its section at z = 5 bounds the offset ellipse's area), but the# runner's measures of it are off: BRepGProp's adaptive integration over the side's offset# surface strays further the finer it is asked to be, by 2e-2 at 1e-10 and 5e-2 at 1e-6.returnoffset(other_case("geometry/elliptic-cylinder").build(), 1)
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
155 ms; CPU time 154 ms; peak memory 14 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
896.4591357
896.4590991
4.1e-08
area
505.1114222
505.111424
3.7e-09
agrees with
no other kernel
mesh
60694 triangles, closed
centre of gravity
(-3.4241e-07, -6.8018e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -4.93655e-13; Iyz -2.2054e-13; Izx 3.99418e-13
//! The elliptic cylinder of `geometry/elliptic-cylinder`, the ellipse x²/25 + y²/9 ≤ 1 at z = 0//! extruded up to z = 10, grown by 1: every point within 1 of it. The side moves out//! to the curve at distance 1 outside the ellipse, and each rim becomes a quarter of a tube of radius//! 1 about the rim's ellipse.usecrate::shared::offset::elliptic_cylinder;
use kentron::offset::{self, Join};
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let cylinder = elliptic_cylinder(m)?;
offset::shape(m, cylinder, 1.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.
Time
2.52 s; CPU time 2.52 s; peak memory 60.6 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
896.4590053
896.4590991
1.0e-07
area
505.1114092
505.111424
2.9e-08
agrees with
no other kernel
mesh
67360 triangles, closed
centre of gravity
(-8.71871e-17, 1.58522e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -6.03961e-13; Iyz -5.68434e-14; Izx -3.97904e-13
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to z = 10)//! grown by 1: every point within 1 of it, its rims tubes about the ellipses, SolidCraft's offset//! of the whole solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
/// The ellipse x²/a² + y²/b² ≤ 1, drawn as its four rational quadratic quarters/// (`chamfer/elliptic-cylinder-rim`'s), extruded from z = 0 to z = 10.pubfnelliptic_cylinder(a: f64, b: f64) -> R<Body> {
let region = Region2 { outer: crate::cases::chamfer::elliptic_cylinder_rim::ellipse(a, b), holes: vec![] };
extrude(&Plane::XY, region, 0.0, 10.0)
}
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&elliptic_cylinder(5.0, 3.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
206 ms; CPU time 300 ms; peak memory 21.8 MB
Notes
refused FeatureFailed at elliptic_cylinder_grown.rhai:4:7: feature 'offset' (offset_solid) failed: result failed structural validation with 2 error(s); first: precision: recover edge precision for EdgeHandle(2v1)
// The ellipse x²/25 + y²/9 ≤ 1 extruded from z = 0 to 10, offset by 1.0.let m = model();
let e = m.profile(xy()).ellipse(5.0, 3.0).sketch("ellipse").extrude(blind(10.0));
e = e.offset_solid(1.0, #{ label: "offset" });
m
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
45 ms; CPU time 44 ms; peak memory 14.6 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
896.4590991
896.4590991
9.2e-13
area
505.111424
505.111424
2.8e-13
agrees with
cad-kernel, springrep
mesh
92094 triangles, closed
centre of gravity
(3.72694e-17, -1.95199e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy 1.13183e-13; Iyz -2.21244e-13; Izx 3.15224e-13
//! The elliptic cylinder of `geometry/elliptic-cylinder`, x²/25 + y²/9 ≤ 1 from z = 0 to z = 10,//! grown by 1 to its parallel body by the kernel's offset: its side moved out along its normals,//! its ends to z = −1 and z = 11, each rim rounded by the tube of radius 1 about it.usecrate::cases::geometry::r#elliptic_cylinder;
usecrate::solids::offset::parallel;
usecrate::Refusal;
use brep_kernel::BrepSolid;
pubfnbuild() -> Result<BrepSolid, Refusal> {
Ok(parallel(&elliptic_cylinder::build()?, 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
12 ms; CPU time 15 ms; peak memory 8.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
896.4593116
896.4590991
2.4e-07
area
505.1114859
505.111424
1.2e-07
agrees with
no other kernel
mesh
47200 triangles, closed
centre of gravity
(8.85049e-08, 2.41021e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -3.66545e-13; Iyz 2.61252e-14; Izx -1.10883e-13
//! The elliptic cylinder x²/25 + y²/9 ≤ 1 from z = 0 to z = 10, grown by 1: every point within 1//! of it. Its side moves out along its normals, its ends to z = −1 and z = 11, and each rim//! becomes the outer quarter of a tube of radius 1 about it.//!//! The ellipse 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 s = Profile::of(Plane::xy(0.0), vec![Loop::ellipse([0.0, 0.0], 5.0, 3.0)]);
let c = extrude(k, &s, 10.0)?;
grown(k, c, 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
3.17 s; CPU time 3.17 s; peak memory 49 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
896.459099
896.4590991
7.8e-11
area
505.111424
505.111424
7.0e-11
agrees with
cad-kernel, next.BREP
mesh
102442 triangles, closed
centre of gravity
(1.38725e-15, -2.8534e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 14030.8; Iyy 18513.6; Izz 11586.7; Ixy -1.42247e-12; Iyz -3.97904e-13; Izx -3.75418e-12
//! The ellipse x²/25 + y²/9 ≤ 1 extruded from z = 0 to z = 10, grown by 1: its side moves out onto//! the ellipse's offset curve and its rims become canal surfaces about the ellipses.use springrep::boolean::unify;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::offset::{elliptic_cylinder, grown};
pubfnbuild() -> Result<Brep, String> {
// the ellipse is drawn as two halves; unified, the side and each rim are one face and one edgelet drum = unify(&elliptic_cylinder()?).map_err(e)?;
grown(&drum, 1.)
}
geomsolver left no solid to show.
Time
55 ms; CPU time 55 ms; peak memory 25.8 MB
Notes
refused error[E080]: `grown.body`: a face on a extrusion: read by the field
// The elliptic cylinder x²/25 + y²/9 ≤ 1 from z = 0 to z = 10, grown by 1: the ellipse of semi-axes// 5 along x and 3 along y traced about the origin of the top plane (x, y) (`std.shapes.Ellipse`),// the prism over it, and the points within 1 of it, `std.rounds.Grown`'s body.unit mm
use std
use std.solids
use std.shapes
use std.rounds
in std.top {
o := point
fix((0, 0)) o
}
rim := trace(std.shapes.Ellipse(o, a: 5mm, b: 3mm, tilt: 0deg).p over u in (0deg, 360deg))
cylinder := solid(std.solids.Prism(face(rim), from: 0mm, to: 10mm))
grown := std.rounds.Grown(cylinder, d: 1mm)
part := solid(grown.body)
anvilcad left no solid to show.
Time
1.1 ms; CPU time 950 µ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
//! An elliptic cylinder of semi-axes 5 and 3, 10 high, grown by 1, 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())
}