A plate, the cylinder of radius 8 on the z axis from z = −4 to z = 0, with a post standing on it, the cylinder of radius 3 from z = 0 to z = 8. The concave edge where the post meets the plate, the circle of radius 3 at z = 0, is filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of radius 5 at z = 2, concave, tangent to the post's side at z = 2 and to the plate's top at radius 5. Grow the solid by 3: every point within 3 of it.
That is more than the fillet's radius. The fillet moved 3 outward would be a torus of tube radius 2 − 3 = −1, turned inside out: it lies inside the grown solid and is no part of its boundary. The post's side, moved out to radius 6, and the plate's top, moved up to z = 3, run on past it and meet in a sharp concave edge, the circle of radius 6 at z = 3. The fillet makes no difference to the result: it is the plate and post without it, grown by 3.
The convex edges are rounded, as a growth rounds them: the plate's two rims by quarter tori of tube radius 3 about the circles of radius 8 at z = −4 and z = 0, and the post's top edge by one about the circle of radius 3 at z = 8. The grown solid runs from z = −7 to z = 11 and out to radius 11.
expected
closed form
volume
4390.709282
P + π(3 + d)²(8 − d) + 9πd + (π²d²/2)(3 + 4d/(3π)), d = 3: the grown plate, P = 256π + 192πd + (4π + 8π²)d² + 4πd³/3 by Steiner's formula; the grown post above it, radius 3 + d from z = d to z = 8; and its rounded top, the disk of radius 3 and height d and a quarter disk of radius d turned about the axis
area
1514.470025
[192π + 2(4π + 8π²)d + 4πd²] − π(3 + d)² + 2π(3 + d)(8 − d) + 9π + π²d(3 + 2d/π), d = 3: the grown plate's surface less the post's footprint on it; the post's side; its flat top; and the round of its top edge
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
43 ms; CPU time 53 ms; peak memory 12 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no offset past a round's radius (offset in two steps, the first the round's radius)
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 plate of radius 8 on the z axis from z = −4 to z = 0 with a post standing on it, the//! cylinder of radius 3 from z = 0 to z = 8, the concave edge where the post meets the plate//! filleted to radius 2, grown by 3: every point within 3 of it.//!//! The kernel's offset sweeps a fillet's torus outward only as far as its tube's radius: past it//! the torus would turn inside out, and the offset refuses it rather than drop it. A solid grown by//! a and then by b is the solid grown by a + b (every point within a + b of it), so it is grown//! first by the fillet's radius, which takes the fillet down to a sharp edge, and then by the//! rest.use cad_kernel::boolean::{combined, Op};
use cad_kernel::build::{disc, prism};
use cad_kernel::fillet::roll;
use cad_kernel::geom::tolerance;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
constPLATE_RADIUS: f64 = 8.;
constPLATE_DEPTH: f64 = 4.;
constPOST_RADIUS: f64 = 3.;
constPOST_HEIGHT: f64 = 8.;
constFILLET: f64 = 2.;
constGROWTH: f64 = 3.;
pubfnbuild() -> Result<Brep, String> {
let up = [0., 0., 1.];
let plate = prism(&disc([0., 0., -PLATE_DEPTH], up, PLATE_RADIUS), 0., PLATE_DEPTH)?;
let post = prism(&disc([0., 0., 0.], up, POST_RADIUS), 0., POST_HEIGHT)?;
let part = combined(&plate, &post, Op::Union, 0.)?;
// the edge is picked by a point on it, the post's foot on the plate's top; the kernel rolls// the ball between the top and the post's side round the looplet round = roll(&part, [0., POST_RADIUS, 0.], FILLET, tolerance(part.size()))?;
// a concave edge's round fills its piece inlet op = if round.concave { Op::Union } else { Op::Cut };
let filleted = combined(&part, &round.piece, op, 0.)?;
grown(&grown(&filleted, FILLET, Join::Round)?, GROWTH - FILLET, Join::Round)
}
Time
642 ms; CPU time 642 ms; peak memory 364.1 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no offset that drops a fillet turned inside out; the grown solid's half-section is revolved
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 post on a plate, filleted at its foot, grown past the fillet's radius. A plate, the cylinder of
radius 8 on the z axis from z = −4 to z = 0, with a post standing on it, the cylinder of radius 3
from z = 0 to z = 8. The concave edge where the post meets the plate, the circle of radius 3 at z
= 0, is filleted to radius 2: a quarter of a torus whose tube has radius 2 about the circle of
radius 5 at z = 2, concave, tangent to the post's side at z = 2 and to the plate's top at radius
5. Grow the solid by 3: every point within 3 of it.
That is more than the fillet's radius. The fillet moved 3 outward would be a torus of tube radius 2
− 3 = −1, turned inside out: it lies inside the grown solid and is no part of its boundary. The
post's side, moved out to radius 6, and the plate's top, moved up to z = 3, run on past it and meet
in a sharp concave edge, the circle of radius 6 at z = 3. The fillet makes no difference to the
result: it is the plate and post without it, grown by 3.
The convex edges are rounded, as a growth rounds them: the plate's two rims by quarter tori of tube
radius 3 about the circles of radius 8 at z = −4 and z = 0, and the post's top edge by one about the
circle of radius 3 at z = 8. The grown solid runs from z = −7 to z = 11 and out to radius 11."""from offset import revolved
# The grown solid's half-section in (ρ, z), counter-clockwise from the axis: a corner to run# straight to, or an arc about a center, of a radius, from one angle to another in degrees.SECTION = [
('to', 0, -7),
('to', 8, -7),
('arc', 8, -4, 3, 270, 360),
('to', 11, 0),
('arc', 8, 0, 3, 0, 90),
('to', 6, 3),
('to', 6, 8),
('arc', 3, 8, 3, 0, 90),
('to', 0, 11),
]
defbuild():
# BRepOffsetAPI_MakeOffsetShape makes no solid of this growth: it does not drop the fillet's# moved face, turned inside out. The result is built as the case states it: its half-section,# the moved faces and the rounds of the convex edges, turned about the z axis.returnrevolved(SECTION, "the grown solid's half-section")
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
17 ms; CPU time 17 ms; peak memory 12.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.
//! The plate, the cylinder of radius 8 on the z axis from z = −4 to z = 0, and on it the post, the//! cylinder of radius 3 up to z = 8, joined, the concave edge where they meet filleted to radius 2;//! grown by 3: every point within 3 of it. The fillet grown past its radius drops; the moved post and//! plate meet in a sharp concave edge, the circle of radius 6 at z = 3.usecrate::Refusal;
usecrate::shared::offset::on_plate;
use kentron::offset::{self, Join};
use kentron::primitives::Cylinder;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> Result<Shape, Refusal> {
let post = Cylinder::new(3.0, 8.0).build(m)?;
let solid = on_plate(m, 4.0, post, 3.0, 2.0)?;
Ok(offset::shape(m, solid, 3.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
532 ms; CPU time 533 ms; peak memory 56 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 plate, the cylinder of radius 8 on the z axis from z = −4 to z = 0, with a post on it, the//! cylinder of radius 3 from z = 0 to z = 8, the concave edge where they meet filleted to radius//! 2, grown by 3: every point within 3 of it, SolidCraft's offset of the whole solid//! (`offset_solid`), its convex edges rounded.usesuper::rounded_puck_shrunk_by_its_rounds::round_circles;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
let plate = zcyl(0.0, 0.0, 8.0, -4.0, 0.0)?;
let post = zcyl(0.0, 0.0, 3.0, 0.0, 8.0)?;
let filleted = round_circles(&union(&plate, &post)?, &[(3.0, 0.0)], 2.0)?;
solidcraft_kernel::offset_solid(&filleted, 3.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
21 ms; CPU time 21 ms; peak memory 22 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 post on a plate, filleted at its foot, grown past the fillet's radius. A plate, the cylinder//! of radius 8 on the z axis from z = −4 to z = 0, with a post standing on it, the cylinder of//! radius 3 from z = 0 to z = 8. The concave edge where the post meets the plate, the circle of//! radius 3 at z = 0, is filleted to radius 2: a quarter of a torus whose tube has radius 2 about//! the circle of radius 5 at z = 2, concave, tangent to the post's side at z = 2 and to the plate's//! top at radius 5. Grow the solid by 3: every point within 3 of it.//!//! The edges are rounded by the kernel's fillet and the solid grown by its offset, which drops a//! round turned inside out (or shrunk to nothing) and joins the faces on either side of it.usecrate::solids::offset::{parallel, union};
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{fillet_edges, make_cylinder_brep, BrepSolid};
constDISTANCE: f64 = 3.0;
pubfnbuild() -> Result<BrepSolid, Refusal> {
let z = p(0.0, 0.0, 1.0);
let plate = make_cylinder_brep(p(0.0, 0.0, -4.0), z, 8.0, 4.0)?;
let post = make_cylinder_brep(p(0.0, 0.0, 0.0), z, 3.0, 8.0)?;
// the post's foot, by a point on itlet foot = p(0.0, -3.0, 0.0);
let rounded = fillet_edges(&union(&plate, &post)?, &[foot], None, 2.0, false, None)?;
Ok(parallel(&rounded, DISTANCE)?)
}
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
8.1 ms; CPU time 9.2 ms; peak memory 12.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.
//! A post on a plate, filleted at its foot, grown past the fillet's radius. A plate, the cylinder//! of radius 8 on the z axis from z = −4 to z = 0, with a post standing on it, the cylinder of//! radius 3 from z = 0 to z = 8. The concave edge where the post meets the plate, the circle of//! radius 3 at z = 0, is filleted to radius 2: a quarter of a torus whose tube has radius 2 about//! the circle of radius 5 at z = 2, concave, tangent to the post's side at z = 2 and to the plate's//! top at radius 5. Grow the solid by 3: every point within 3 of it.//!//! The edges are rounded by cadrs's Fillet and the part grown by its offset. cadrs declines it: its//! offset has no slab for a torus face moved to or past its tube's center line.usecrate::bench::{cylinder, p3, union, v3};
usecrate::shared::fillet::fillet;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Pick};
constDISTANCE: f64 = 3.0;
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let plate = cylinder(k, p3(0.0, 0.0, -4.0), v3(0.0, 0.0, 1.0), 8.0, 4.0)?;
let post = cylinder(k, p3(0.0, 0.0, 0.0), v3(0.0, 0.0, 1.0), 3.0, 8.0)?;
let joined = union(k, plate, post)?;
let edges = k.edges_at(joined, &[p3(0.0, -3.0, 0.0)])?;
let rounded = fillet(k, joined, &edges, 2.0)?;
grown(k, rounded, DISTANCE)
}
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
5.5 ms; CPU time 5.2 ms; peak memory 8.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.
//! The plate of radius 8 from z = −4 to z = 0 with a post of radius 3 up to z = 8 on it, the//! concave edge at its foot filleted to radius 2, grown by 3: the fillet vanishes and the moved//! post and plate meet in a sharp concave edge.//! springrep 1.0.1 refuses it: its offset cannot follow the concave fillet moved past its radius//! ("an offset … closes a torus to nothing").use springrep::blend::fillet;
use springrep::boolean::union;
use springrep::primitive::cylinder;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let plate = cylinder(&at([0., 0., -4.]), 8., 4., "plate").map_err(e)?;
let post = cylinder(&at([0., 0., 0.]), 3., 8., "post").map_err(e)?;
let joined = union(&plate, &post).map_err(e)?;
let filleted = fillet(&joined, &[("plate.end", "post.side")], 2., "foot").map_err(e)?;
grown(&filleted, 3.)
}
geomsolver left no solid to show.
Time
79 ms; CPU time 83 ms; peak memory 27 MB
Notes
refused error[E080]: `grown.body`: a body grown whose faces a term of it reads (a round) is read by the field
// A post on a plate, filleted at its foot, grown by 3: the plate the prism over a circle of radius// 8 about the origin of the top plane, from z = −4 to z = 0; the post the prism over one of radius// 3, from z = 0 to z = 8, in union with it; the concave edge where the post's side meets the// plate's top rounded to radius 2; and the points within 3 of all that, `std.rounds.Grown`'s body.unit mm
use std
use std.solids
use std.solids (union)
use std.rounds
use std.rounds (round)
in std.top {
o := point
fix((0, 0)) o
rim := circle(center: o) hint(r: 8)
radius(8) rim
foot := circle(center: o) hint(r: 3)
radius(3) foot
}
body := solid(std.solids.Prism(face(rim), from: -4mm, to: 0mm))
post := solid(std.solids.Prism(face(foot), from: 0mm, to: 8mm))
post union body
body.post round(r: 2mm) body.near
grown := std.rounds.Grown(body, d: 3mm)
part := solid(grown.body)
anvilcad left no solid to show.
Time
1.1 ms; CPU time 950 µ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 post on a plate, filleted at its foot, grown past the fillet's radius, 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())
}