The elliptic cylinder x²/100 + y²/4 ≤ 1, the ellipse in the plane z = 0 with semi-axes 10 along x and 2 along y, extruded straight up to z = 10, grown by 1: the solid of every point within 1 of it. It is offset/elliptic-cylinder-grown with a flatter ellipse.
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, extruded from z = 0 to z = 10. The ellipse curves most tightly at the ends of its long axis, where its radius of curvature is b²/a = 0.4, less than the distance grown; but the curve moved outward does not fold, so the side is smooth. Each rim becomes the outer quarter of a tube of radius 1 about the rim's ellipse.
E is the complete elliptic integral of the second kind, of parameter m = 1 − b²/a² = 24/25, so p is the ellipse's perimeter, about 42.0201; 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
3.09 s; CPU time 6.99 s; peak memory 45.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
1275.792838
1275.792846
6.0e-09
area
753.2728208
753.2728238
3.9e-09
agrees with
next.BREP
mesh
44134 triangles, closed
centre of gravity
(-5.65761e-12, -1.62545e-12, 5) its STEP's solid
inertia
about it, of unit density: Ixx 17792.6; Iyy 55188; Izz 43222; Ixy -2.20969e-07; Iyz -4.4908e-09; Izx 3.71561e-07
//! The elliptic cylinder x²/100 + y²/4 ≤ 1 from z = 0 to z = 10, grown by 1: the ellipse curves//! more tightly at the ends of its long axis (radius 0.4) than the distance grown.use cad_kernel::build::{prism, Profile, ProfileEdge};
use cad_kernel::nurbs::BSpline;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
use std::f64::consts::FRAC_1_SQRT_2;
use std::sync::Arc;
constA: f64 = 10.;
constB: f64 = 2.;
constHEIGHT: f64 = 10.;
pubfnbuild() -> Result<Brep, String> {
// a profile has no ellipse: the rim as a closed rational quadratic B-spline, four quarters,// each on the corner of the box round it, weighted √2/2let at = |x: f64, y: f64| [A * x, B * y, 0.];
let poles = vec![at(1., 0.), at(1., 1.), at(0., 1.), at(-1., 1.), at(-1., 0.), at(-1., -1.),
at(0., -1.), at(1., -1.), at(1., 0.)];
let h = FRAC_1_SQRT_2;
let weights = vec![1., h, 1., h, 1., h, 1., h, 1.];
let knots = vec![0., 0., 0., 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1., 1., 1.];
let rim = BSpline::rational(2, knots, poles, weights)?;
let end = Profile { origin: [0., 0., 0.], normal: [0., 0., 1.],
loops: vec![vec![ProfileEdge::Spline(Arc::new(rim))]], names: Vec::new() };
grown(&prism(&end, 0., HEIGHT)?, 1., Join::Round)
}
Time
652 ms; CPU time 651 ms; peak memory 368.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
1275.793906
1275.792846
8.3e-07
area
753.2732383
753.2728238
5.5e-07
agrees with
no other kernel
mesh
53812 triangles, closed
centre of gravity
(1.89804e-07, -2.62886e-14, 5) its STEP's solid
inertia
about it, of unit density: Ixx 17792.6; Iyy 55188.1; Izz 43222; Ixy 7.21378e-09; Iyz 3.89952e-13; Izx 8.15433e-12
"""A flat elliptic cylinder grown by 1. The ellipse x²/100 + y²/4 ≤ 1 (semi-axes 10 along x and 2
along y) in the plane z = 0 extruded straight up to z = 10, grown by 1: every point within 1 of
it. The ellipse curves at the ends of its long axis more tightly (radius 0.4) than the distance
grown."""fromOCP.BRepBuilderAPIimport (BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeFace,
BRepBuilderAPI_MakeWire)
fromOCP.BRepPrimAPIimportBRepPrimAPI_MakePrismfromOCP.gp import gp, gp_Elips, gp_Vec
from offset import offset
A, B = 10, 2# the semi-axes along x and yHEIGHT = 10GROWTH = 1defbuild():
# gp.XOY: the frame at the origin, normal +z, its x (the major axis) along +x
rim = gp_Elips(gp.XOY_s(), A, B)
end = BRepBuilderAPI_MakeFace(
BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(rim).Edge()).Wire()).Face()
cylinder = BRepPrimAPI_MakePrism(end, gp_Vec(0, 0, HEIGHT)).Shape()
returnoffset(cylinder, 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
3.13 s; CPU time 3.13 s; peak memory 63.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
1275.792842
1275.792846
3.1e-09
area
753.2728297
753.2728238
7.9e-09
agrees with
next.BREP
mesh
54778 triangles, closed
centre of gravity
(6.12636e-16, -2.78471e-18, 5) its STEP's solid
inertia
about it, of unit density: Ixx 17792.6; Iyy 55188; Izz 43222; Ixy 1.7053e-12; Iyz 5.68434e-14; Izx 2.27374e-12
//! The elliptic cylinder x²/100 + y²/4 ≤ 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.usesuper::elliptic_cylinder_grown::elliptic_cylinder;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&elliptic_cylinder(10.0, 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
175 ms; CPU time 175 ms; peak memory 20.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
1275.792846
1275.792846
2.4e-13
area
753.2728238
753.2728238
6.9e-14
agrees with
cad-kernel, solidcraft
mesh
74054 triangles, closed
centre of gravity
(2.00546e-15, -4.47137e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 17792.6; Iyy 55188; Izz 43222; Ixy -3.32604e-12; Iyz 3.65671e-13; Izx -6.1491e-13
//! The elliptic cylinder x²/100 + y²/4 ≤ 1, 0 ≤ z ≤ 10, grown by 1 to its parallel body, as//! `offset/elliptic-cylinder-grown` grows its 5 × 3 ellipse.usecrate::solids::offset::parallel;
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{extrude_profile_brep, make_ellipse, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let (o, x, y, z) = (p(0.0, 0.0, 0.0), p(1.0, 0.0, 0.0), p(0.0, 1.0, 0.0), p(0.0, 0.0, 1.0));
let cylinder = extrude_profile_brep(&[make_ellipse(o, x, y, 10.0, 2.0)?], z, 10.0)?;
Ok(parallel(&cylinder, 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
14 ms; CPU time 19 ms; peak memory 9.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
1275.793402
1275.792846
4.4e-07
area
753.2729608
753.2728238
1.8e-07
agrees with
no other kernel
mesh
41800 triangles, closed
centre of gravity
(2.2889e-07, -3.39379e-16, 5) its STEP's solid
inertia
about it, of unit density: Ixx 17792.6; Iyy 55188; Izz 43222; Ixy 9.22188e-13; Iyz 2.78933e-13; Izx -5.64646e-14
//! The elliptic cylinder x²/100 + y²/4 ≤ 1 from z = 0 to z = 10, grown by 1: every point within 1//! of it. Its side moves out along its normals (the curve moved outward doesn't fold, though the//! ellipse curves tighter than 1 at the ends of its long axis), 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], 10.0, 2.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.
springrep left no solid to show.
Time
24.9 s; CPU time 24.9 s; peak memory 17.2 MB
Notes
refused unsupported: a rolling-ball fillet whose sections do not fit within the tolerance
//! The ellipse x²/100 + y²/4 ≤ 1 extruded from z = 0 to z = 10, grown by 1, as//! `offset/elliptic-cylinder-grown` grows its 5 × 3 ellipse: springrep's own offset.use springrep::boolean::unify;
use springrep::math::Vec2;
use springrep::profile::Profile;
use springrep::sweep::extrude;
use springrep::topo::Brep;
usecrate::shared::geometry::ellipse;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let section = Profile::outline(ellipse(Vec2::ZERO, 10., 2., "side"));
let drum = extrude(§ion, &at([0., 0., 0.]), 10., "drum").map_err(e)?;
// the ellipse is drawn as two halves; unified, the side and each rim are one face and one edgelet drum = unify(&drum).map_err(e)?;
grown(&drum, 1.)
}
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 930 µs; peak memory 3.4 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 flat elliptic cylinder 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())
}