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 2.5: the solid of every point at least 2.5 from its outside.
The ends move to z = 2.5 and z = 7.5. The side would move in along its normals by 2.5, but the ellipse curves more tightly than that near the ends of its long axis, where its radius of curvature falls to b²/a = 1.8: there the curve moved in by 2.5 turns back on itself in a swallowtail, two cusps and a loop crossing the long axis. Of that curve, only the part at least 2.5 from the ellipse everywhere bounds the result. The loops are trimmed away where the curve crosses itself on the long axis, and the shrunk side meets itself there in a sharp vertical edge at each end, from z = 2.5 to z = 7.5.
The trimmed curve's area and length have no closed form here, so the case is unsettled until two kernels agree.
Unsettled. This solid has no closed form, and no two kernels yet agree on it to 1e-8, so it has no answer to grade against. Below is what each kernel builds: built means a watertight, consistently oriented solid, whatever its measures; the table says which kernels agree with which.
Drawing
TopIsometricFrontRight
Third-angle projection, the three views at one scale. Drawn from next.BREP'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.
cad-kernel left no solid to show.
Time
1.9 ms; CPU time 1.7 ms; peak memory 7 MB
Notes
refused face 0 (extrusion) is not swept along its normal: its sweep to -2.5 folds where its curve turns tighter than that (its rate across the fold -0.3888888888888886) (at Some([5.0, 0.0, 0.0]))
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to 10)//! shrunk by 2.5, past its least radius of curvature b²/a = 1.8: its side's offset swallowtails//! near the ends of the long axis, and the solid of every point at least 2.5 inside keeps only its//! part clear of them, meeting itself in a sharp upright edge at each end.//!//! 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()?, 2.5, Join::Round)
}
"""An elliptic cylinder shrunk past its curvature. The ellipse x²/25 + y²/9 ≤ 1 in the plane z = 0
extruded up to z = 10 (geometry/elliptic-cylinder), shrunk by 2.5: every point at least 2.5 from its
outside, more than the ellipse's least radius of curvature, 1.8."""from bench import other_case
from offset import offset
defbuild():
returnoffset(other_case("geometry/elliptic-cylinder").build(), -2.5)
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
13 ms; CPU time 12 ms; peak memory 10.8 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
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
volume
15.3133845555
area
51.9320129993
agrees with
no other kernel
mesh
6720 triangles, closed
centre of gravity
(-4.25045e-16, 1.23033e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 32.7987; Iyy 47.5889; Izz 16.5818; Ixy -1.22125e-15; Iyz 1.45633e-16; Izx -3.55271e-15
//! The elliptic cylinder of `geometry/elliptic-cylinder`, the ellipse x²/25 + y²/9 ≤ 1 at z = 0//! extruded up to z = 10, shrunk by 2.5: every point at//! least 2.5 from its outside. Moved in by more than the ellipse's least radius of curvature, 1.8,//! the side's curve would loop at the ends of the long axis; trimmed, it meets itself there in a//! sharp edge.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, -2.5, 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.
solidcraft left no solid to show.
Time
26 ms; CPU time 26 ms; peak memory 43.3 MB
Notes
refused the operation failed: SMLib offset: operation: solidcore: offset::offset_executive::p2::offset_brep: the offset could not be built; caused by offset::offset_executive::p2::do_solid_offset: the offset of face 2 by -2.5 folds: the wall is thicker than a radius of curvature of the face on that side (the largest wall that works is 1.799999999999999)
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to z = 10)//! shrunk by 2.5, more than the ellipse's least radius of curvature (1.8): the moved side folds//! into swallowtails at the ends of the long axis, which SolidCraft's offset of the whole solid//! inward (`offset_solid`, rounded) trims away where the moved side crosses itself (its//! self-intersections merged).usesuper::elliptic_cylinder_grown::elliptic_cylinder;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&elliptic_cylinder(5.0, 3.0)?, -2.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
6.6 ms; CPU time 6.9 ms; peak memory 20 MB
Notes
refused FeatureFailed at elliptic_cylinder_shrunk_past_its_curvature.rhai:4:7: feature 'offset' (offset_solid) failed: offset 2.500000 exceeds the maximum 1.781937 supported by the geometry (face FaceHandle(1v1): offset map folds within the face window (distance 2.500000 exceeds the local curvature radius); max safe offset 1.781937)
// The ellipse x²/25 + y²/9 ≤ 1 extruded from z = 0 to 10, offset by -2.5.let m = model();
let e = m.profile(xy()).ellipse(5.0, 3.0).sketch("ellipse").extrude(blind(10.0));
e = e.offset_solid(-2.5, #{ 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
73 ms; CPU time 72 ms; peak memory 22.4 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
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
volume
15.3133845245
area
51.9320189757
agrees with
no other kernel
mesh
11098 triangles, closed
centre of gravity
(1.18178e-15, 2.15331e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 32.7987; Iyy 47.5889; Izz 16.5818; Ixy -9.48514e-16; Iyz 2.66787e-15; Izx 4.44089e-15
//! The elliptic cylinder of `geometry/elliptic-cylinder`, x²/25 + y²/9 ≤ 1 from z = 0 to z = 10,//! shrunk by 2.5 to its parallel body by the kernel's offset: past the ellipse's tightest//! curvature, so the moved side's swallowtails must be trimmed where it crosses itself.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()?, -2.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
11 ms; CPU time 14 ms; peak memory 7.4 MB
Notes
built A watertight, consistently oriented solid; the case has no settled answer yet to grade it against.
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
volume
15.3133847403
area
51.9320131857
agrees with
no other kernel
mesh
9266 triangles, closed
centre of gravity
(1.54956e-16, 3.87391e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 32.7987; Iyy 47.5889; Izz 16.5818; Ixy -4.44089e-16; Iyz -2.91001e-16; Izx -1.11022e-16
//! The elliptic cylinder of `geometry/elliptic-cylinder` (x²/25 + y²/9 ≤ 1 from z = 0 to 10)//! shrunk by 2.5, more than the ellipse's least radius of curvature (1.8, at the ends of its long//! axis): its side moved in along its normals and trimmed where it crosses itself, meeting itself//! in a sharp upright edge at each end.//!//! The ellipse sketched and extruded (as `geometry/elliptic-cylinder`), then offset inward by 2.5//! (cadrs's offset of a solid: the outline's exact inward offset, trimmed of its swallowtails,//! extruded between the ends moved in).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, 2.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.
springrep left no solid to show.
Time
202 ms; CPU time 202 ms; peak memory 9.3 MB
Notes
refused unsupported: offsetting a face past its radius of curvature, where its offset loops over itself
//! The ellipse x²/25 + y²/9 ≤ 1 extruded from z = 0 to z = 10, shrunk by 2.5, more than the//! ellipse's least radius of curvature: the side's inner offset crosses itself near the ends of the//! long axis, and the shrunk side meets itself there in a sharp edge.//! springrep 1.0.1 refuses it: the side's offset, trimmed where it crosses itself, comes out off//! its edges (1e-3 mm), which its checker refuses.use springrep::topo::Brep;
usecrate::shared::offset::{elliptic_cylinder, shrunk};
pubfnbuild() -> Result<Brep, String> {
shrunk(&elliptic_cylinder()?, 2.5)
}
geomsolver left no solid to show.
Time
55 ms; CPU time 55 ms; peak memory 24 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 2.5, past the ellipse's// least radius of curvature (1.8): 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 2.5 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: -2.5mm)
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
//! An elliptic cylinder of semi-axes 5 and 3, 10 high, shrunk by 2.5, past its least radius of curvature.use anvil_brep::Solid;
usecrate::shared::{elliptic_cylinder, offset};
pubfnbuild() -> Result<Solid, String> {
offset(&elliptic_cylinder(5., 3., 0., 10.)?, -2.5)
}