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, shrunk by 1: the solid of every point at least 1 from its outside.
The ends move to z = 1 and z = 9, and the edges stay sharp. The side moves in along its normals to the curve at distance 1 inside the ellipse, which is no ellipse, extruded from z = 1 to z = 9. The ellipse curves most tightly at the ends of its long axis, (±5, 0), with radius of curvature b²/a = 1.8; moved in by 1, less than that, the curve stays smooth, and the area inside it and its length follow from the ellipse's own (Steiner): πab − pd + πd² and p − 2πd.
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.
† 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
775 ms; CPU time 1.28 s; peak memory 16.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
197.9078688
197.9078688
1.0e-10
area
203.4274757
203.4274756
8.3e-11
agrees with
occt, next.BREP, cadrs, springrep
mesh
17404 triangles, closed
centre of gravity
(2.11134e-11, -5.46587e-12, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy -3.78336e-08; Iyz -4.02299e-09; Izx -6.28306e-12
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to 10)//! shrunk by 1: every point of it at least 1 inside 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::shrunk` 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::{shrunk, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
shrunk(&elliptic_cylinder::build()?, 1., Join::Round)
}
Time
657 ms; CPU time 656 ms; peak memory 369.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
197.9078689
197.9078688
8.5e-10
area
203.4274758
203.4274756
7.8e-10
agrees with
cad-kernel, next.BREP, cadrs, springrep
mesh
676 triangles, closed
centre of gravity
(2.72077e-10, 5.75428e-13, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy -5.58359e-08; Iyz 9.74276e-16; Izx -1.16133e-14
"""An elliptic cylinder shrunk by 1. The ellipse x²/25 + y²/9 ≤ 1 in the plane z = 0 extruded up
to z = 10 (geometry/elliptic-cylinder), shrunk by 1: every point at least 1 from its outside."""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
8.7 ms; CPU time 8.4 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
197.9079382
197.9078688
3.5e-07
area
203.4275033
203.4274756
1.4e-07
agrees with
no other kernel
mesh
8622 triangles, closed
centre of gravity
(-8.73844e-07, 8.04923e-12, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.088; Ixy -9.01223e-06; Iyz 1.58963e-14; Izx 3.00398e-14
//! The elliptic cylinder of `geometry/elliptic-cylinder`, the ellipse x²/25 + y²/9 ≤ 1 at z = 0//! extruded up to z = 10, shrunk by 1: every point at least 1 from its//! outside. The side moves in to the curve at distance 1 inside the ellipse, which stays smooth, and//! the edges stay sharp.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
1.21 s; CPU time 1.21 s; peak memory 54.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
197.9079039
197.9078688
1.8e-07
area
203.4275151
203.4274756
1.9e-07
agrees with
no other kernel
mesh
24918 triangles, closed
centre of gravity
(0, -9.44512e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy -6.57559e-06; Iyz -6.03544e-15; Izx 3.59739e-15
//! The elliptic cylinder of `geometry/elliptic-cylinder`, x²/25 + y²/9 ≤ 1 from z = 0 to z = 10,//! shrunk by 1: every point at least 1 from its outside. Its edges are convex and stay sharp//! shrunk, and the side's least radius of curvature, 1.8, is more than 1, so it moves in without//! folding: Offset Face moving every face 1 inward would be the solid shrunk. SolidCraft's//! (`offset_faces`, on the ellipse as its profile's four conics) refuses it ("how far its//! neighbours extend to meet it has no certified bound"), and so does ops's ("its surface opens//! across its seam"), so this is SolidCraft's offset of the whole solid inward (`offset_solid`,//! rounded).usesuper::elliptic_cylinder_grown::elliptic_cylinder;
usecrate::solids::*;
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
115 ms; CPU time 116 ms; peak memory 21.8 MB
Notes
refused FeatureFailed at elliptic_cylinder_shrunk.rhai:4:7: feature 'offset' (offset_solid) failed: result failed structural validation with 5 error(s); first: Loop LoopHandle(1v1) is not closed (gap: 1)
// 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
76 ms; CPU time 76 ms; peak memory 21.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
197.9078682
197.9078688
2.6e-09
area
203.4274758
203.4274756
7.8e-10
agrees with
cad-kernel, occt, cadrs, springrep
mesh
33224 triangles, closed
centre of gravity
(-4.77825e-16, -2.61705e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy -5.03937e-15; Iyz 4.52476e-14; Izx -1.21828e-13
//! The elliptic cylinder of `geometry/elliptic-cylinder`, x²/25 + y²/9 ≤ 1 from z = 0 to z = 10,//! shrunk by 1 to its parallel body by the kernel's offset: its side moved in along its normals,//! its ends to z = 1 and z = 9, its edges sharp.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
13 ms; CPU time 18 ms; peak memory 8.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
197.9078687
197.9078688
2.1e-10
area
203.4274756
203.4274756
1.5e-10
agrees with
cad-kernel, occt, next.BREP, springrep
mesh
16292 triangles, closed
centre of gravity
(1.20955e-09, -4.48754e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy 2.37682e-15; Iyz 1.49064e-14; Izx 5.76372e-14
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to 10)//! shrunk by 1: its side moved in along its normals (less than its least radius of curvature,//! 1.8, so it stays smooth), its ends 1 nearer, its edges sharp.//!//! The ellipse sketched and extruded (as `geometry/elliptic-cylinder`), then offset inward by 1//! (cadrs's offset of a solid).usecrate::bench::extrude;
usecrate::shared::offset::shrunk;
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)?;
shrunk(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
14 ms; CPU time 14 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
197.9078687
197.9078688
2.2e-10
area
203.4274756
203.4274756
1.1e-11
agrees with
cad-kernel, occt, next.BREP, cadrs
mesh
55144 triangles, closed
centre of gravity
(2.45355e-16, -2.9385e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 1251.02; Iyy 1832.09; Izz 972.086; Ixy -7.0415e-14; Iyz -3.71184e-16; Izx -5.43247e-13
//! The ellipse x²/25 + y²/9 ≤ 1 extruded from z = 0 to z = 10, shrunk by 1: its ends move in to//! z = 1 and z = 9 and its side onto the ellipse's inner offset curve, its edges sharp.use springrep::edit::offset;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::offset::elliptic_cylinder;
pubfnbuild() -> Result<Brep, String> {
offset(&elliptic_cylinder()?, -1., "shrunk").map_err(e)
}
geomsolver left no solid to show.
Time
56 ms; CPU time 56 ms; peak memory 26.1 MB
Notes
refused error[E080]: `shrunk.body`: a body shelled that is no body of terms
// The elliptic cylinder x²/25 + y²/9 ≤ 1 from z = 0 to z = 10, shrunk 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 of it at least 1 from its outside,// `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))
shrunk := std.rounds.Grown(cylinder, d: -1mm)
part := solid(shrunk.body)
anvilcad left no solid to show.
Time
1.3 ms; CPU time 1.1 ms; peak memory 4.7 MB
Notes
refused not supported yet: offsets of freeform faces