A solid torus about the z axis, centered on the origin, whose tube has radius 2 about a middle circle of radius 4, as in offset/torus-grown-past-its-hole. Grow it by 2: the solid of every point within 2 of the torus.
That is every point within 4 of the middle circle. The grown tube's radius, 4, equals the middle circle's, so the grown torus just closes its hole: it is the horn torus of geometry/horn-torus, whose surface comes to the z axis at one point, the origin, where it meets itself like two cones tip to tip. Its section through the axis, on one side of it, is the disk of radius 4 about (4, 0), which touches the axis at the origin.
† 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
3.1 ms; CPU time 4.2 ms; peak memory 10.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.
Data
its STEP's
expected
rel. error
volume
1263.309363
1263.309363
0.0e+00
area
631.6546817
631.6546817
0.0e+00
agrees with
occt, solidcraft, next.BREP, cadrs, springrep
mesh
252 triangles, closed, 252 degenerate
centre of gravity
(0, 1.79983e-16, 5.90568e-17) its STEP's solid
inertia
about it, of unit density: Ixx 22739.6; Iyy 22739.6; Izz 35372.7; Ixy 9.09495e-13; Iyz -2.62876e-14; Izx -4.12453e-13
//! A solid torus about z, its tube of radius 2 about a middle circle of radius 4, grown by 2: the//! horn torus, its tube of radius 4 just closing the hole at the origin.use cad_kernel::build::torus;
use cad_kernel::offset::{grown, Join};
use cad_kernel::topo::Brep;
pubfnbuild() -> Result<Brep, String> {
grown(&torus([0., 0., 0.], [0., 0., 1.], 4., 2.)?, 2., Join::Round)
}
Time
631 ms; CPU time 630 ms; peak memory 363.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 torus grown just to its hole. A solid torus about the z axis, centred on the origin, whose tube
has radius 2 about a middle circle of radius 4, grown by 2: the horn torus whose tube, of radius 4,
just closes the hole at the origin."""fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeTorusfromOCP.gp import gp
from offset import offset
MAJOR_RADIUS = 4MINOR_RADIUS = 2GROWTH = 2defbuild():
torus = BRepPrimAPI_MakeTorus(gp.XOY_s(), MAJOR_RADIUS, MINOR_RADIUS).Shape()
returnoffset(torus, 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.
Time
90 ms; CPU time 89 ms; peak memory 42.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.
Data
its STEP's
expected
rel. error
volume
1263.309363
1263.309363
3.6e-16
area
631.6546817
631.6546817
0.0e+00
agrees with
cad-kernel, occt, next.BREP, cadrs, springrep
mesh
63464 triangles, closed
centre of gravity
(-2.30845e-16, 0, -1.96122e-15) its STEP's solid
inertia
about it, of unit density: Ixx 22739.6; Iyy 22739.6; Izz 35372.7; Ixy 4.54747e-13; Iyz -4.54747e-13; Izx 1.13687e-13
//! The torus whose tube of radius 2 runs about a middle circle of radius 4, grown by 2: every//! point within 2 of it, the tube of radius 4 about the same circle, the horn torus, which closes//! the hole and touches itself at the origin. SolidCraft's offset of the whole solid//! (`offset_solid`), rounded: the torus has no edge, so that is its one face moved 2 outward.usecrate::solids::*;
pubfnbuild() -> R<Body> {
let torus = solidcraft_kernel::torus(Vec3::ZERO, 4.0, 2.0)?;
solidcraft_kernel::offset_solid(&torus, 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
3.2 ms; CPU time 2.9 ms; peak memory 9.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
1263.309363
1263.309363
0.0e+00
area
631.6546817
631.6546817
3.6e-16
agrees with
cad-kernel, occt, solidcraft, cadrs, springrep
mesh
65942 triangles, closed, 2 degenerate
centre of gravity
(-3.59965e-16, -6.41673e-16, 0) its STEP's solid
inertia
about it, of unit density: Ixx 22739.6; Iyy 22739.6; Izz 35372.7; Ixy -6.82121e-13; Iyz 4.54747e-13; Izx 2.27374e-13
//! The solid torus about the z axis whose tube has radius 2 about a middle circle of radius 4,//! grown by 2 to its parallel body: every point within 4 of the middle circle, a horn torus.usecrate::solids::offset::parallel;
usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{make_torus_brep, BrepSolid};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let torus = make_torus_brep(p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), 4.0, 2.0)?;
Ok(parallel(&torus, 2.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
2 ms; CPU time 1.8 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 solid torus about the z axis, centered on the origin, its tube of radius 2 about a middle//! circle of radius 4, grown by 2: every point within 4 of the middle circle, the horn torus,//! which closes its hole at the origin.//!//! The torus is cadrs's torus primitive. Then cadrs's offset with rounded edges.usecrate::bench::{p3, torus, v3};
usecrate::shared::offset::grown;
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let t = torus(k, p3(0.0, 0.0, 0.0), v3(0.0, 0.0, 1.0), 4.0, 2.0)?;
grown(k, t, 2.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
1.8 ms; CPU time 1.6 ms; peak memory 7.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.
//! The torus about the z axis of middle radius 4 and tube radius 2, grown by 2: the grown tube's//! radius equals the middle circle's, a horn torus closing its hole at the origin.use springrep::primitive::torus;
use springrep::topo::Brep;
usecrate::shared::offset::grown;
usecrate::shared::{at, e};
pubfnbuild() -> Result<Brep, String> {
let ring = torus(&at([0., 0., 0.]), 4., 2., "torus").map_err(e)?;
grown(&ring, 2.)
}
geomsolver 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.
anvilcad left no solid to show.
Time
1.2 ms; CPU time 1 ms; peak memory 4.7 MB
Notes
refused not supported yet: the offset would make a torus's tube reach its axis
//! A torus about the z axis (middle circle 4, tube 2) grown by 2, to its hole: its one face is the//! tube of radius 4, which just closes over the axis, a horn torus.use anvil_brep::{Frame, Solid};
usecrate::shared::{offset, torus};
pubfnbuild() -> Result<Solid, String> {
// the torus has no edge to round: growing it is moving its one faceoffset(&torus(&Frame::world(), 4., 2.)?, 2.)
}