The solid oblate spheroid of geometry/oblate-spheroid, (x² + y²)/36 + z²/9 ≤ 1, centered on the origin about the z axis, grown by 1: the solid of every point within 1 of it.
The spheroid is convex and smooth, so the grown solid is bounded by one smooth face, the spheroid's surface moved 1 outward along its normals: its equator moves out to radius 7 and its poles to z = ±4. That face is not an ellipsoid. Its section through the z axis is the parallel curve of the ellipse x²/36 + z²/9 = 1 at distance 1.
For a convex body the volume of the grown solid is Steiner's polynomial in the distance d, whose coefficients are the body's volume V, its surface area S and the integral M of its surface's mean curvature, (κ₁ + κ₂)/2, over the surface; the grown solid's area is its derivative in d. For the spheroid with equatorial radius a = 6 and polar radius c = 3, the parallels' curvature integrates to 4πc and the meridians' to 4πa²·atan(√(a² − c²)/c)/√(a² − c²), half their sum being M.
† 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.8 ms; CPU time 1.6 ms; peak memory 7 MB
Notes
refused face 0 (revolution) is not swept along its normal: a revolution has no offset in closed form (at Some([0.0, 0.0, -3.0]))
//! The solid oblate spheroid (x² + y²)/36 + z²/9 ≤ 1 grown by 1: one smooth face, the spheroid's//! surface moved 1 out along its normals, which is no ellipsoid.usecrate::cases::geometry::oblate_spheroid;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
grown(&oblate_spheroid::build()?, 1., Join::Round)
}
Time
636 ms; CPU time 635 ms; peak memory 366.9 MB
Notes
wrong volume 632.753135033 against 833.201215626 (its STEP's); area 649.508295865 against 453.624759902 (its STEP's)
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
632.753135
833.2012156
2.4e-01
area
649.5082959
453.6247599
4.3e-01
agrees with
no other kernel
centre of gravity
(-3.84952e-12, 6.97048e-12, -6.5743e-12) its STEP's solid
inertia
about it, of unit density: Ixx 9799.89; Iyy 9799.89; Izz 14494.9; Ixy -5.90626e-09; Iyz 2.03727e-10; Izx 8.31506e-10
STEP
B-rep advanced faces, each on a surface AUTOMOTIVE_DESIGN
"""An oblate spheroid grown by 1. The solid oblate spheroid (x² + y²)/36 + z²/9 ≤ 1 centred on the
origin about the z axis (geometry/oblate-spheroid), grown by 1: every point within 1 of it,
bounded by the spheroid's surface moved 1 outward along its normals."""from bench import other_case
from offset import offset
GROWTH = 1defbuild():
# OCCT grows it right (its own measures are the case's), but its STEP writer writes the grown# face, an offset of the whole revolved ellipse, bounded only by a vertex loop at its pole: the# file's face is the ellipse's both halves revolved and moved out, the spheroid's surface moved# 1 outward and 1 inward, and OCCT reading it back measures that too.returnoffset(other_case("geometry/oblate-spheroid").build(), 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.
solidcraft left no solid to show.
Time
4.05 s; CPU time 4.03 s; peak memory 533 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 0 by 1 is neither proved regular nor proved to fold, so no size is named
//! The oblate spheroid of `geometry/oblate-spheroid`, (x² + y²)/36 + z²/9 ≤ 1, grown by 1: every//! point within 1 of it, bounded by its one face moved 1 out along its normal. The spheroid has no//! edge to round, and this is SolidCraft's offset of the whole solid (`offset_solid`), rounded.usecrate::solids::*;
use solidcore_record::Seg2;
use std::f64::consts::FRAC_1_SQRT_2;
/// The spheroid: the half ellipse x²/36 + z²/9 = 1, x ≥ 0, in x and z, closed along the z axis/// and turned a whole turn about it. The half ellipse is the two rational quadratic quarters it/// is, through (0, −3), (6, 0) and (0, 3), the corners of the rectangle about them weighted √2/2.pubfnoblate_spheroid() -> R<Body> {
let (bottom, waist, top) = (v2(0.0, -3.0), v2(6.0, 0.0), v2(0.0, 3.0));
let lower = Seg2::Conic { a: bottom, apex: v2(6.0, -3.0), b: waist, w: FRAC_1_SQRT_2 };
let upper = Seg2::Conic { a: waist, apex: v2(6.0, 3.0), b: top, w: FRAC_1_SQRT_2 };
let outer = Loop2 { segs: vec![lower, upper, Seg2::Line { a: top, b: bottom }] };
revolve_z(Region2 { outer, holes: vec![] }, 360.0)
}
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&oblate_spheroid()?, 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
264 ms; CPU time 263 ms; peak memory 47.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
833.2012135
833.2012156
2.6e-09
area
453.6247577
453.6247599
4.8e-09
agrees with
cadrs
mesh
73448 triangles, closed, 2 degenerate
centre of gravity
(-1.77636e-15, 6.87799e-16, -2.6501e-15) its STEP's solid
inertia
about it, of unit density: Ixx 10931.5; Iyy 10931.5; Izz 16448.5; Ixy -1.5915e-12; Iyz -3.62161e-14; Izx -7.18055e-13
//! The oblate spheroid (x² + y²)/36 + z²/9 ≤ 1 of `geometry/oblate-spheroid`, grown by 1 to its//! parallel body: the kernel's offset of the solid of revolution.usecrate::cases::geometry::r#oblate_spheroid;
usecrate::solids::offset::parallel;
usecrate::Refusal;
use brep_kernel::BrepSolid;
pubfnbuild() -> Result<BrepSolid, Refusal> {
Ok(parallel(&oblate_spheroid::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
15 ms; CPU time 30 ms; peak memory 8 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
833.201215
833.2012156
7.2e-10
area
453.6247597
453.6247599
3.9e-10
agrees with
next.BREP
mesh
58014 triangles, closed, 2 degenerate
centre of gravity
(8.88178e-16, 0, 7.17421e-17) its STEP's solid
inertia
about it, of unit density: Ixx 10931.5; Iyy 10931.5; Izz 16448.5; Ixy -9.09495e-13; Iyz 3.09933e-14; Izx -5.14864e-13
//! The solid oblate spheroid of `geometry/oblate-spheroid`, (x² + y²)/36 + z²/9 ≤ 1, grown by 1://! every point within 1 of it, bounded by the spheroid's surface moved 1 out along its normals//! (not an ellipsoid).//!//! The spheroid as `geometry/oblate-spheroid` makes it (the half ellipse revolved); then cadrs's//! offset with rounded edges.usecrate::cases::geometry::r#oblate_spheroid;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let spheroid = oblate_spheroid::build(k)?;
grown(k, spheroid, 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
8.63 s; CPU time 8.63 s; peak memory 15.3 MB
Notes
refused unsupported: offsetting a face whose offset no spline holds to the tolerance
//! An oblate spheroid grown by 1.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no ellipsoid surface, its revolve takes no ellipse, and its scale refuses to stretch a sphere, which it would make elliptic".into())
}