A cylinder of radius 5 on the z axis, from z = 0 to z = 10, grown by 1: the solid of every point within 1 of the cylinder.
The side moves out to radius 6, the ends to z = −1 and z = 11, and each rim becomes the outer quarter of a torus's tube: a tube of radius 1 about the rim's circle, of radius 5.
As a set:
$$\{\,\rho \le 5,\ 0 \le z \le 10\,\} \oplus B_{1}$$
expected
closed form
volume
1341.5898
πR²h + (2πRh + 2πR²)d + (πh + π²R)d² + 4πd³/3, R = 5, h = 10, d = 1
area
645.3331657
2πRh + 2πR² + 2(πh + π²R)d + 4πd²
Drawing
TopIsometricFrontRight
Third-angle projection, the three views at one scale. Drawn from occt'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.
Time
10 ms; CPU time 13 ms; peak memory 10.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.
//! A cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1.use cad_kernel::build::{disc, prism};
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
grown(&prism(&disc([0., 0., 0.], [0., 0., 1.], 5.), 0., 10.)?, 1., Join::Round)
}
Time
634 ms; CPU time 633 ms; peak memory 365.3 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.
"""A cylinder grown by 1. A cylinder of radius 5 on the z axis, from z = 0 to z = 10, grown by 1."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeCylinderfrom offset import offset
RADIUS = 5HEIGHT = 10GROWTH = 1defbuild():
returnoffset(BRepPrimAPI_MakeCylinder(RADIUS, HEIGHT).Shape(), GROWTH)
arris left no solid to show.
Time
1.2 ms; CPU time 980 µs; peak memory 3.6 MB
Notes
refused arris has no offset with rounded joins: `offset_faces` moves every face and joins the moved faces sharp, where they meet
//! A cylinder of radius 5 on the z axis, from z = 0 to z = 10, grown by 1.//!//! Refused: arris's `offset_faces` moves every face of a solid along its normal and joins the moved//! faces where they meet, so at a convex edge of an outward offset the join is sharp. Growing by//! every point within 1 rounds each convex edge and corner, and arris has no rounded join.usecrate::Refusal;
use arris::topo::{Body, Model};
pubfnbuild(_: &mutModel) -> Result<Body, Refusal> {
Err("arris has no offset with rounded joins: `offset_faces` moves every face and joins the moved faces sharp, where they meet".into())
}
Time
9.2 ms; CPU time 9 ms; peak memory 11.7 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.
//! A cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1: every point within 1 of//! it, each rim the outer quarter of a torus's tube.use kentron::offset::{self, Join};
use kentron::primitives::Cylinder;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let cylinder = Cylinder::new(5.0, 10.0).build(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
161 ms; CPU time 160 ms; peak memory 48.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.
//! A cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1: every point within 1 of//! it, its rims the outer quarters of tori, SolidCraft's offset of the whole solid//! (`offset_solid`), its convex edges rounded.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let drum = zcyl(0.0, 0.0, 5.0, 0.0, 10.0)?;
solidcraft_kernel::offset_solid(&drum, 1.0, true)
}
Time
2.6 ms; CPU time 2.4 ms; peak memory 6.9 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no rounded offset
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.
//! A cylinder of radius 5 on the z axis from z = 0 to 10, grown by 1, its rims rounded.//!//! brepkit's rounded offset (`offset_solid_arc_v2`) does not build its arc joints yet, so the//! cylinder is offset with sharp joints (radius 6, from z = −1 to 11) and the grown cylinder's two//! rims are then rounded to radius 1: each round lies 1 from the moved side and end, on the tube//! of radius 1 about the cylinder's own rim.use brepkit_operations::blend_ops::{all_blended, fillet_v2};
use brepkit_operations::offset_v2::offset_solid_v2;
use brepkit_operations::primitives::make_cylinder;
use brepkit_topology::solid::SolidId;
use brepkit_topology::Topology;
usecrate::solids::{edges_where, near};
usecrate::Refusal;
pubfnbuild(topo: &mutTopology) -> Result<SolidId, Refusal> {
let cylinder = make_cylinder(topo, 5.0, 10.0)?;
let grown = offset_solid_v2(topo, cylinder, 1.0)?;
let rims = edges_where(topo, grown, |q| near(q.z(), -1.0))?
.into_iter()
.chain(edges_where(topo, grown, |q| near(q.z(), 11.0))?)
.collect::<Vec<_>>();
Ok(all_blended(fillet_v2(topo, grown, &rims, 1.0)?)?)
}
Time
77 ms; CPU time 78 ms; peak memory 22.7 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.
// A cylinder of radius 5 on the z axis from z = 0 to 10, grown by 1.let m = model();
let c = m.profile(xy()).circle(5.0).sketch("cylinder").extrude(blind(10.0));
c = c.offset_solid(1.0, #{ label: "grown" });
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
15 ms; CPU time 14 ms; peak memory 13 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.
//! The cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1 to its parallel body://! radius 6 from z = −1 to z = 11, each rim the outer quarter of a torus's tube of radius 1.usecrate::solids::offset::parallel;
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{make_cylinder_brep, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let cylinder = make_cylinder_brep(p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), 5.0, 10.0)?;
Ok(parallel(&cylinder, 1.0)?)
}
Time
20.9 s; CPU time 20.9 s; peak memory 39.7 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no rounded offset of a solid
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
1341.589754
1341.5898
3.4e-08
area
645.3331248
645.3331657
6.3e-08
agrees with
no other kernel
mesh
20352 triangles, closed
centre of gravity
(-1.08291e-15, -1.9937e-17, 5) its STEP's solid
inertia
about it, of unit density: Ixx 27720; Iyy 27720; Izz 23907.6; Ixy -1.45253e-12; Iyz -5.50059e-13; Izx 1.58451e-12
//! A cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1: every point within 1//! of it. The side moves out to radius 6, the ends to z = −1 and z = 11, and each rim becomes the//! outer quarter of a torus's tube of radius 1 about the rim's circle.//!//! geop has no offset of a solid that rounds where moved faces part: its face offset moves the//! faces and meets them sharp. So the cylinder's faces are offset 1 out, to the cylinder of//! radius 6 from z = −1 to z = 11, and its two rims then rounded to radius 1: each round is//! tangent to the moved side and the moved end, so it is the tube of radius 1 about the//! cylinder's own rim.usecrate::shared::hollow::{offset_faces, round, whole_edges};
usecrate::shared::{Drawing, extrude, sketch, xy};
usecrate::{Bench, Refusal};
use geop_ops_fillet::FilletArgs;
use geop_ops_model::Combine;
pubfnbuild(b: &mutBench) -> Result<(), Refusal> {
letmut base = Drawing::new();
base.circle([0.0, 0.0], 5.0);
sketch(b, "base", xy(), base)?;
extrude(b, "can", "base", 10.0, Combine::NewBody)?;
letmut faces = round(5.0, 5.0);
faces.extend([[0.0, 0.0, 0.0], [0.0, 0.0, 10.0]]);
offset_faces(b, "grow", &faces, 1.0)?;
letmut rims = round(6.0, -1.0);
rims.extend(round(6.0, 11.0));
let rims = whole_edges(b, &rims)?;
b.step("rounds", FilletArgs::constant(rims, 1.0))
}
Time
2.4 ms; CPU time 2.2 ms; peak memory 6.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.
//! A cylinder of radius 5 on the z axis, from z = 0 to z = 10, grown by 1: the solid of every//! point within 1 of it. The side moves out to radius 6, the ends to z = −1 and z = 11, and each//! rim becomes the outer quarter of a torus's tube of radius 1.//!//! The circle extruded, then cadrs's offset with rounded edges.usecrate::bench::{cylinder, p3, v3};
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let c = cylinder(k, p3(0.0, 0.0, 0.0), v3(0.0, 0.0, 1.0), 5.0, 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
2.4 ms; CPU time 2.2 ms; peak memory 8.3 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.
//! The cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1.use springrep::primitive::cylinder;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let c = cylinder(&at([0., 0., 0.]), 5., 10., "drum").map_err(e)?;
grown(&c, 1.)
}
Time
79 ms; CPU time 109 ms; peak memory 33.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.
// A cylinder of radius 5 on the z axis from z = 0 to z = 10, grown by 1: the circle drawn in the// top plane (x, y), 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.rounds
in std.top {
o := point
fix((0, 0)) o
rim := circle(center: o) hint(r: 5)
radius(5) rim
}
post := solid(std.solids.Prism(face(rim), from: 0mm, to: 10mm))
grown := std.rounds.Grown(post, d: 1mm)
part := solid(grown.body)
anvilcad left no solid to show.
Time
1.1 ms; CPU time 960 µ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 cylinder 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())
}