A cone on the z axis with a base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1: the solid of every point within 1 of the cone.
The base moves down to z = −1, and the cone's side moves 1 outward to a cone of the same angle, whose apex is 1/sin α = 5/3 higher, α = atan(3/4) being the half-angle at the apex. The base's rim, where the side meets the base at an angle of β = atan(4/3) inside the cone, becomes a piece of a torus's tube of radius 1 about the rim's circle, turning through π − β. The apex becomes a cap of a ball of radius 1 about it, which meets the moved side along a circle of radius 0.8 at z = 4.6.
† 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
12 ms; CPU time 15 ms; peak memory 11.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 cone on the z axis, base radius 3 at z = 0, apex at (0, 0, 4), grown by 1.use cad_kernel::build::cone;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
grown(&cone([0., 0., 0.], [0., 0., 1.], 3., 0., 4.)?, 1., Join::Round)
}
Time
641 ms; CPU time 640 ms; peak memory 365.4 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 cone grown by 1. A cone on the z axis with a base of radius 3 at z = 0 and its apex at
(0, 0, 4), grown by 1."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeConefrom offset import offset
BASE_RADIUS = 3HEIGHT = 4GROWTH = 1defbuild():
returnoffset(BRepPrimAPI_MakeCone(BASE_RADIUS, 0, HEIGHT).Shape(), GROWTH)
arris left no solid to show.
Time
1.2 ms; CPU time 960 µs; peak memory 4 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 cone on the z axis with a base of radius 3 at z = 0 and its apex at (0, 0, 4), 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
6.5 ms; CPU time 6.3 ms; peak memory 11.7 MB
Notes
wrong volume 151.001010698 against 150.721758018 (its STEP's); area 155.673616909 against 154.835858868 (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
151.0010107
150.721758
1.9e-03
area
155.6736169
154.8358589
5.4e-03
agrees with
no other kernel
mesh
23533 triangles, closed, 1 degenerate
centre of gravity
(7.75768e-15, 1.88222e-16, 0.863767) its STEP's solid
inertia
about it, of unit density: Ixx 688.725; Iyy 688.725; Izz 887.419; Ixy 1.85315e-14; Iyz 2.21812e-14; Izx -1.74083e-12
//! A cone on the z axis, its base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1://! every point within 1 of it, its base's rim a piece of a torus and its apex a cap of a ball.use kentron::offset::{self, Join};
use kentron::primitives::Cone;
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let cone = Cone::new(3.0, 0.0, 4.0).build(m)?;
offset::shape(m, cone, 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
102 ms; CPU time 101 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 cone on the z axis, its base the disc of radius 3 at z = 0 and its apex at (0, 0, 4), grown//! by 1: every point within 1 of it, its rim a piece of a torus's tube and its apex a cap of a//! ball, SolidCraft's offset of the whole solid (`offset_solid`), its convex edges rounded.usecrate::solids::*;
pubfnbuild() -> R<Body> {
// solidcraft-kernel has no cone: its half section turned about the z axislet cone = revolve_z(polygon(&[(0.0, 0.0), (3.0, 0.0), (0.0, 4.0)]), 360.0)?;
solidcraft_kernel::offset_solid(&cone, 1.0, true)
}
brepkit left no solid to show.
Time
1.3 ms; CPU time 1.1 ms; peak memory 5.2 MB
Notes
refused invalid input: invalid input: arc joint construction is not yet implemented; use JointType::Intersection
//! A cone with a base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1 with brepkit's//! rounded offset, whose joints roll a ball of radius 1 round the rim and over the apex.use brepkit_operations::offset_v2::offset_solid_arc_v2;
use brepkit_operations::primitives::make_cone;
use brepkit_operations::OperationsError;
use brepkit_topology::solid::SolidId;
use brepkit_topology::Topology;
pubfnbuild(topo: &mutTopology) -> Result<SolidId, OperationsError> {
let cone = make_cone(topo, 3.0, 0.0, 4.0)?;
offset_solid_arc_v2(topo, cone, 1.0)
}
Time
42 ms; CPU time 43 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 cone on the z axis, its base the disc of radius 3 at z = 0 and its apex at (0, 0, 4): its half// section revolved a full turn about z. Grown by 1.let m = model();
let c = m.profile(xz()).path(0.0, 0.0).line_to(3.0, 0.0).line_to(0.0, 4.0).close()
.sketch("cone_section")
.revolve(axis_at([0.0, 0.0, 0.0], [0.0, 0.0, 1.0]), full_circle());
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
43 ms; CPU time 42 ms; peak memory 24 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 on the z axis with a base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1//! to its parallel body: its side moved out, its rim a piece of a torus, its apex a cap of a ball.usecrate::solids::offset::parallel;
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{make_cone_brep, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let cone = make_cone_brep(p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), 3.0, 0.0, 4.0)?;
Ok(parallel(&cone, 1.0)?)
}
geop left no solid to show.
Time
2.1 ms; CPU time 1.9 ms; peak memory 9.7 MB
Notes
refused geop has no rounded offset of a solid: its face offset meets moved faces sharp, and the cone's apex, a point and not an edge, cannot be rounded into the cap of a ball after
//! A cone on the z axis, its base the disc of radius 3 at z = 0 and its apex at (0, 0, 4),//! grown by 1: every point within 1 of it. The base moves down 1, the side out 1, the rim//! becomes a piece of a torus's tube and the apex a cap of a ball of radius 1 about it.//!//! geop has no offset of a solid that rounds where moved faces part: its face offset moves the//! faces and meets them sharp. A rim can be rounded after by a fillet, but the apex is a point,//! not an edge: no fillet puts the cap of a ball round it, and the sharp offset's apex, 5/3//! higher, would be left. So it is refused.usecrate::{Bench, Refusal};
pubfnbuild(_: &mutBench) -> Result<(), Refusal> {
Err("geop has no rounded offset of a solid: its face offset meets moved faces sharp, and the \
cone's apex, a point and not an edge, cannot be rounded into the cap of a ball after"
.into())
}
Time
2.4 ms; CPU time 2.2 ms; peak memory 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 cone on the z axis with a base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1://! the solid of every point within 1 of the cone. The base moves down to z = −1, the side out to//! a cone of the same angle, the rim becomes a piece of a torus and the apex a cap of a ball.//!//! The cone is cadrs's cone primitive. Then cadrs's offset with rounded edges.usecrate::bench::{cone, p3, v3};
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let c = cone(k, p3(0.0, 0.0, 0.0), v3(0.0, 0.0, 1.0), 3.0, 0.0, 4.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
6.1 ms; CPU time 5.9 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 cone on the z axis with a base of radius 3 at z = 0 and its apex at (0, 0, 4), grown by 1.//! springrep 1.0.1 builds a face off its own edges round the apex (0.31 mm), which its checker//! refuses.use springrep::primitive::cone;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let c = cone(&at([0., 0., 0.]), 3., 0., 4., "cone").map_err(e)?;
grown(&c, 1.)
}
geomsolver left no solid to show.
Time
47 ms; CPU time 47 ms; peak memory 24.7 MB
Notes
refused error[E080]: `grown.body`: a face on a cone: read by the field
// A cone grown by 1: its half-section drawn in the front plane (x, z), the triangle from the axis// out to radius 3 at z = 0 and up to the apex at (0, 4), turned a whole turn about the z axis; and// the points within 1 of it, `std.rounds.Grown`'s body.unit mm
use std
use std.solids
use std.rounds
in std.front {
o := point
rim := point hint((3, 0))
apex := point hint((0, 4))
half := horizontal line(o, rim) -> line(rim, apex) -> vertical line(apex, o) -> close
fix((0, 0)) o
o distance(3) rim
o distance(4) apex
}
cone := solid(std.solids.Revolution(half, about: std.z))
grown := std.rounds.Grown(cone, d: 1mm)
part := solid(grown.body)
anvilcad left no solid to show.
Time
1.1 ms; CPU time 940 µs; peak memory 3.7 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 cone 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())
}