A plate, the cylinder of radius 8 about the z axis from z = −2 to z = 0, and on it a boss, the cone frustum from radius 4 at z = 0 to radius 1 at z = 6, joined. The concave edge where the boss's cone meets the plate's top is filleted to radius 1: a piece of a torus tangent to the top and to the cone. Grow the solid by 2 with rounded edges: every point within 2 of it.
That is more than the fillet's radius. A fillet grown by its radius or more shrinks to nothing: its moved face would be a torus of tube radius 1 − 2 ≤ 0, and the moved top and the moved cone run on until they meet in a sharp concave edge, as if the fillet had never been there. So the result is the sharp plate and boss grown by 2: the bottom moved down 2, the plate's side out 2 with a quarter round of radius 2 at each of its rims, the plate's top up 2 and the cone out 2 along its normal, meeting in the circle of radius 5.2360679775 at z = 2, and the boss's top up 2 with a round of radius 2 where it meets the cone.
As a set: the filleted solid lies between the sharp one and the sharp one closed by 1 (grown by 1 and shrunk back), and growing either of those by at least 1 gives the same solid, so the result is the sharp plate and boss grown by 2: every point within 2 of it.
expected
closed form
volume
2055.758088
Pappus on the grown half-section: 2π∮ρ²/2 dz round its boundary, the lines z = −2 − d (to ρ = 8), ρ = 8 + d, z = d (to the meeting point), the cone moved out by d (from there to (1, 6) + d(2, 1)/√5), z = 6 + d, and the arcs of radius d about (8, −2), (8, 0) and (1, 6), each in closed form; d = 2
area
976.6548977
Σ π(ρ₀ + ρ₁)L over the lines and 2πd(c Δα + d Δ sin α) over the arcs about (c, ·), the same boundary as for the volume
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
26 ms; CPU time 34 ms; peak memory 11.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.
//! The plate of radius 8 on the z axis from z = −2 to z = 0 joined to a boss, the cone frustum from//! radius 4 at z = 0 to radius 1 at z = 6, the concave edge where the boss meets the plate's top//! filleted to radius 1, grown by 2 with rounded edges: every point within 2 of it.//!//! Refused, by the kernel: "`round` (torus) is not swept along its normal: swept past the centre//! of its torus: no point stands that far off it". `offset::grown` sweeps the fillet's torus//! outward only as far as its tube's radius and refuses it past that rather than drop it. Grown in//! two steps (`offset/filleted-post-grown-past-its-fillet`'s way), first by the fillet's radius,//! which the kernel builds with the fillet gone, the boss's top rim has become a torus as wide as//! the circle it runs round, and the second step refuses it: "face 7 (torus) is not swept along//! its normal: its sweep passes the axis of its torus" (`offset::revolved_sweep` cuts a sweep at//! the axis only for a straight meridian or a whole tube, not a part of a torus); so does every//! other split tried. (Growing the boss without its fillet builds, but that is not the solid//! described grown: it drops the face the case is about.)use cad_kernel::boolean::{combined, Op};
use cad_kernel::build::{cone, 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 = 2.;
constBOSS_FOOT: f64 = 4.;
constBOSS_TOP: f64 = 1.;
constBOSS_HEIGHT: f64 = 6.;
constFILLET: f64 = 1.;
constGROWTH: f64 = 2.;
pubfnbuild() -> Result<Brep, String> {
let up = [0., 0., 1.];
let plate = prism(&disc([0., 0., -PLATE_DEPTH], up, PLATE_RADIUS), 0., PLATE_DEPTH)?;
let boss = cone([0., 0., 0.], up, BOSS_FOOT, BOSS_TOP, BOSS_HEIGHT)?;
let part = combined(&plate, &boss, Op::Union, 0.)?;
// the edge is picked by a point on it, the boss's foot on the plate's top; the kernel rolls// the ball between the top and the cone round the looplet round = roll(&part, [0., BOSS_FOOT, 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(&filleted, GROWTH, Join::Round)
}
Time
648 ms; CPU time 648 ms; peak memory 369.1 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 filleted cone boss grown past its fillet's radius. A plate, the cylinder of radius 8 about the z axis from z = −2 to z = 0, and on it a boss, the cone frustum from
radius 4 at z = 0 to radius 1 at z = 6, joined. The concave edge where the boss's cone meets the plate's top
is filleted to radius 1: a piece of a torus tangent to the top and to the cone. Grow the solid by 2 with
rounded edges: every point within 2 of it.
That is more than the fillet's radius. A fillet grown by its radius or more shrinks to nothing: its
moved face would be a torus of tube radius 1 − 2 ≤ 0, and the moved top and the moved cone run on until they meet
in a sharp concave edge, as if the fillet had never been there. So the result is the sharp plate and boss
grown by 2: the bottom moved down 2, the plate's side out 2 with a quarter round of radius 2 at each of its
rims, the plate's top up 2 and the cone out 2 along its normal, meeting in the circle of radius 5.2360679775 at
z = 2, and the boss's top up 2 with a round of radius 2 where it meets the cone."""fromOCP.BRepAlgoAPIimportBRepAlgoAPI_FusefromOCP.BRepBuilderAPIimportBRepBuilderAPI_MakeSolidfromOCP.BRepPrimAPIimportBRepPrimAPI_MakeCone, BRepPrimAPI_MakeCylinderfromOCP.TopAbsimportTopAbs_ShapeEnumfromOCP.TopoDSimportTopoDSfromOCP.gp import gp_Ax2, gp_Dir, gp_Pnt
from bench importRefusedfrom blend import edges_where, rounded
from edit import on_circle
from offset import offset
DISTANCE = 2.0defbuild():
up = gp_Dir(0, 0, 1)
plate = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0, 0, -2), up), 8, 2).Shape()
joined = BRepAlgoAPI_Fuse(plate, BRepPrimAPI_MakeCone(4, 1, 6).Shape())
ifnot joined.IsDone():
raiseRefused("BRepAlgoAPI_Fuse declined the plate and the boss")
solid = joined.Shape()
solid = rounded(solid, 1.0, edges_where(solid, on_circle((0, 0, 0), 4)), "the boss's root")
result = offset(solid, DISTANCE)
# OCCT's offset may give the solid back as its closed shell; the solid is the one it bounds.if result.ShapeType() == TopAbs_ShapeEnum.TopAbs_SHELL:
result = BRepBuilderAPI_MakeSolid(TopoDS.Shell(result)).Solid()
return result
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
26 ms; CPU time 26 ms; peak memory 12.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.
//! The plate, the cylinder of radius 8 about the z axis from z = −2 to z = 0, and on it the cone//! frustum from radius 4 at z = 0 to radius 1 at z = 6, joined, the concave edge where they meet//! filleted to radius 1; grown by 2: every point within 2 of it. The fillet grown past its radius drops, and the//! grown top and cone meet in a sharp concave edge.usecrate::Refusal;
usecrate::shared::offset::on_plate;
use kentron::offset::{self, Join};
use kentron::primitives::Cone;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> Result<Shape, Refusal> {
let boss = Cone::new(4.0, 1.0, 6.0).build(m)?;
let solid = on_plate(m, 2.0, boss, 4.0, 1.0)?;
Ok(offset::shape(m, solid, 2.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
572 ms; CPU time 573 ms; peak memory 56.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 cone boss on a plate of `offset/filleted-cone-boss-grown-by-its-fillet`, its concave edge//! filleted to radius 1, grown by 2: every point within 2 of it, SolidCraft's offset of the whole//! solid (`offset_solid`), its convex edges rounded.usesuper::filleted_cone_boss_grown_by_its_fillet::filleted_cone_boss;
usecrate::solids::*;
pubfnbuild() -> R<Body> {
solidcraft_kernel::offset_solid(&filleted_cone_boss(1.0)?, 2.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 21.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 filleted cone boss grown past its fillet's radius: a plate (radius 8, z = −2 to 0) and a cone boss (radius 4 at z = 0 to 1 at z = 6) joined,//! the concave root filleted to radius 1, grown by 2 with rounded edges.//!//! The root is filleted by the kernel's fillet and the solid grown by its offset, which drops a fillet//! grown to or past its radius and joins the faces on either side of it.usecrate::solids::boolean::union;
usecrate::solids::offset::parallel;
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{fillet_edges, make_cone_brep, make_cylinder_brep, BrepSolid};
constDISTANCE: f64 = 2.0;
pubfnbuild() -> Result<BrepSolid, Refusal> {
let z = p(0.0, 0.0, 1.0);
let plate = make_cylinder_brep(p(0.0, 0.0, -2.0), z, 8.0, 2.0)?;
let boss = make_cone_brep(p(0.0, 0.0, 0.0), z, 4.0, 1.0, 6.0)?;
let joined = union(&plate, &boss)?;
// the root, by a point on itlet filleted = fillet_edges(&joined, &[p(0.0, -4.0, 0.0)], None, 1.0, false, None)?;
Ok(parallel(&filleted, 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.3 ms; CPU time 9.3 ms; peak memory 12.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.
//! A filleted cone boss grown past its fillet's radius: a plate (radius 8, z = −2 to 0) and a cone boss (radius 4 at z = 0 to 1 at z = 6) joined,//! the concave root filleted to radius 1, grown by 2. cadrs's cylinder and cone united, filleted, then its offset.usecrate::bench::{cone, cylinder, p3, union, v3};
usecrate::shared::fillet::fillet;
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Pick};
constDISTANCE: f64 = 2.0;
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let z = v3(0.0, 0.0, 1.0);
let plate = cylinder(k, p3(0.0, 0.0, -2.0), z, 8.0, 2.0)?;
let boss = cone(k, p3(0.0, 0.0, 0.0), z, 4.0, 1.0, 6.0)?;
let joined = union(k, plate, boss)?;
let root = k.edge_at(joined, p3(0.0, -4.0, 0.0))?;
let filleted = fillet(k, joined, &[root], 1.0)?;
grown(k, filleted, 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
6.1 ms; CPU time 5.8 ms; peak memory 8.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.
//! The plate of radius 8 from z = −2 to z = 0 with a cone boss from radius 4 at z = 0 to radius 1//! at z = 6 on it, the concave edge where they meet filleted to radius 1, grown by 2, past the//! fillet's radius: the fillet vanishes and the moved top and cone 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::topo::Brep;
usecrate::shared::offset::{cone_boss, grown};
pubfnbuild() -> Result<Brep, String> {
grown(&cone_boss(1.)?, 2.)
}
geomsolver left no solid to show.
Time
75 ms; CPU time 79 ms; peak memory 27.5 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 filleted cone boss grown by 2: the plate the prism over a circle of radius 8 about the origin// of the top plane, from z = −2 to z = 0; the boss the frustum from radius 4 at z = 0 to radius 1// at z = 6, its half-section drawn in the front plane (x, z) and turned about the z axis, in union// with it; the concave edge where the boss's cone meets the plate's top rounded to radius 1; and// the points within 2 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
}
in std.front {
a := point
b := point hint((4, 0))
c := point hint((1, 6))
d := point hint((0, 6))
horizontal (foot := line(a, b)) -> (flank := line(b, c)) -> horizontal (top := line(c, d)) ->
vertical (axis_run := line(d, a)) -> close
fix((0, 0)) a
a distance(4) b
a distance(6) d
d distance(1) c
half := face(foot, flank, top, axis_run)
}
body := solid(std.solids.Prism(face(rim), from: -2mm, to: 0mm))
boss := solid(std.solids.Revolution(half, about: std.z))
boss union body
body.boss.flank round(r: 1mm) body.near
grown := std.rounds.Grown(body, d: 2mm)
part := solid(grown.body)
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 filleted cone boss grown past its 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())
}