The solid a cone fills as it is spun partway about a line that crosses its axis aslant, inside it.
The cone's axis is the line through the origin along w = (cos 30°, 0, sin 30°), 60° from the z axis. Its point is at −2w and it opens along +w at 50° (each side 25° from its axis) to a flat base at +5w, of radius 7 tan 25°. The z axis meets its axis at the origin, inside it.
It turns rigidly about the z axis, right-handed (from +x toward +y), by 150°. Make the solid of everything the cone passes through.
The z axis runs through the cone, leaving it through its side above and below the origin. There the turn holds the cone's side still, and the contact passes over those two points as well as down to the cone's point.
expected
closed form
volume
288.495057
no closed form: cad-kernel and cadrs agree to 2e-9; the mean of their values
area
267.0088237
no closed form: cad-kernel and cadrs agree to 2e-10; the mean of their values
Drawing
TopIsometricFrontRight
Third-angle projection, the three views at one scale. Drawn from next.BREP'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
3.90 s; CPU time 13.5 s; peak memory 28.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.
Data
its STEP's
expected
rel. error
volume
288.4950573
288.495057
1.1e-09
area
267.0088237
267.0088237
1.2e-10
agrees with
next.BREP, cadrs
mesh
13612 triangles, closed, 4 degenerate
centre of gravity
(0.456617, 1.70412, 1.76638) its STEP's solid
inertia
about it, of unit density: Ixx 1593.55; Iyy 2897.47; Izz 3353.54; Ixy 376.408; Iyz 51.9388; Izx 13.917
//! The solid a cone fills as it turns rigidly about the z axis, right-handed, by 150°: its axis the//! line through the origin along w = (cos 30°, 0, sin 30°), its point at −2w, opening at 50° to a//! flat base at 5w of radius 7 tan 25°. The z axis crosses it aslant, through the origin.//!//! The kernel's closed sweep (`swept::closed::closed`) takes the cone whole: under a turn its//! closed class takes a cone about a leaning axis where its contact is a curve over the face clear//! of the turn's axis, and refuses one the turn's axis crosses within the face (`Unbuilt::Curved`);//! since 0.10.0 such a tool goes the contact's road — each sheet on the surface of revolution of//! its section's meridian, cut where the meridian folds back and where it crosses the axis, and//! trimmed by membership in the sweep.use cad_kernel::build::cone;
use cad_kernel::geom::{tolerance, V};
use cad_kernel::swept::closed::closed;
use cad_kernel::topo::Brep;
use cad_kernel::trajectory::{Screw, Trajectory};
use cad_kernel::util::space::scale;
constUP: V = [0., 0., 1.];
/// How far the cone's axis rises from x toward z, in degrees.constRISE: f64 = 30.;
/// Where its point and its base stand along w.constPOINT: f64 = -2.;
constBASE: f64 = 5.;
/// Each side of the cone from its axis, in degrees.constHALF_ANGLE: f64 = 25.;
/// The turn, in degrees.constTURN: f64 = 150.;
/// How closely the cone is meshed for the sweep's membership reads.constBAR: f64 = 0.002;
pubfnbuild() -> Result<Brep, String> {
let (s, c) = RISE.to_radians().sin_cos();
let w = [c, 0., s];
let height = BASE - POINT;
let tool = cone(scale(w, POINT), w, 0., height * HALF_ANGLE.to_radians().tan(), height)?;
// the turn about z: a screw that does not advance, a radian a radian of the rolllet path = Trajectory::Twist(Screw { origin: [0.; 3], axis: UP, ratio: 1., advance: 0. });
// the kernel's closed swept solid: a cone about an axis leaning to the turn's touches along a// curve on each ring, turned into a surface of revolution — here crossing the turn's axisclosed(&tool, &path, [0., TURN.to_radians()], BAR, tolerance(tool.size()))
.map_err(|why| format!("the cone's sweep not built: {why:?}"))
}
occt left no solid to show.
Time
1.58 s; CPU time 1.58 s; peak memory 379.8 MB
Notes
refused BRepAlgoAPI_Fuse declined the tool and what its faces sweep
"""A cone spun about a line that crosses it aslant. The solid a cone fills as it is spun partway
about a line that crosses its axis aslant, inside it.
The cone's axis is the line through the origin along w = (cos 30°, 0, sin 30°), 60° from the z
axis. Its point is at −2w and it opens along +w at 50° (each side 25° from its axis) to a flat base
at +5w, of radius 7 tan 25°. The z axis meets its axis at the origin, inside it.
It turns rigidly about the z axis, right-handed (from +x toward +y), by 150°. Make the solid of
everything the cone passes through.
The z axis runs through the cone, leaving it through its side above and below the origin. There the
turn holds the cone's side still, and the contact passes over those two points as well as down to
the cone's point."""import math
fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeConefromOCP.gp import gp, gp_Ax2, gp_Dir, gp_Pnt
from sweep import plane, turned, united
TILT = math.radians(30) # of the cone's axis w, up from the x axis toward zPOINT, BASE = -2, 5# along w, from the originHALF_ANGLE = math.radians(25)
TURN = 150# degrees about the z axisdefbuild():
w = (math.cos(TILT), 0, math.sin(TILT))
cone = BRepPrimAPI_MakeCone(gp_Ax2(gp_Pnt(*(POINT * x for x in w)), gp_Dir(*w)), 0,
(BASE - POINT) * math.tan(HALF_ANGLE), BASE - POINT).Shape()
# The cone's axis meets the turn's, at the origin o. At a point p = s w + ρ r̂ of its side# (r̂ square to w), its normal is n = cos 25°·r̂ − sin 25°·w, and the velocity is ẑ × p, so# n·(ẑ × p) = (s cos 25° + ρ sin 25°)·(ẑ × w)·r̂. That is zero where r̂ lies in the plane# y = 0 through both axes, and on the circle where s cos 25° + ρ sin 25° = 0, the circle# whose normals pass through o: with ρ = (s + 2) tan 25°, at s = −2 sin² 25°, which the# plane square to w there cuts out. The flat base meets the turn square-on along y = 0 too.# The lines in y = 0 cross the turn's axis, where it leaves the cone, and a curve turned# about an axis it crosses sweeps a surface that passes through itself, which MakeRevol# declines: the plane x = 0 through the axis cuts the cone again there.
circle = -2 * math.sin(HALF_ANGLE) ** 2
cuts = [plane((0, 0, 0), (0, 1, 0)), plane(tuple(circle * x for x in w), w),
plane((0, 0, 0), (1, 0, 0))]
returnunited(turned(cone, gp.OZ_s(), TURN, cuts))
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
341 ms; CPU time 395 ms; peak memory 34.7 MB
Notes
refused operation failed: a sweep running into itself: its pieces, as often as it winds round them, hold 71.66920032684763, not its 325.1883603423501
//! The solid a cone fills as it is spun about a line through it: the cone about the line through//! the origin along w = (cos 30°, 0, sin 30°), its point at −2w, opening at 25° from its axis to a//! flat base at 5w of radius 7 tan 25°, turned rigidly about the z axis by 150°.//!//! kentron's sweep of a solid (`sweep::solid`, one turn), which refuses it: the turn's axis passes//! through the cone, and kentron's sweep refuses a turn about an axis meeting the tool.usecrate::bench::{frame, p};
use kentron::math::{Axis, Direction};
use kentron::primitives::Cone;
use kentron::sweep::{self, RigidMotion};
use kentron::topology::{Model, Shape};
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let (sin, cos) = 30f64.to_radians().sin_cos();
let base = 7.0 * 25f64.to_radians().tan();
let cone = Cone::new(0.0, base, 7.0).with_frame(frame(p(-2.0 * cos, 0.0, -2.0 * sin), Direction::new(cos, 0.0, sin))).build(m)?;
sweep::solid(m, cone, &RigidMotion::Turn { axis: Axis::Z, from: 0.0, to: 150f64.to_radians() })
}
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
7.25 s; CPU time 7.25 s; peak memory 62.1 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no sweep 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
288.4950582
288.495057
4.2e-09
area
267.0088279
267.0088237
1.6e-08
agrees with
no other kernel
mesh
15753 triangles, closed, 5 degenerate
centre of gravity
(0.456617, 1.70412, 1.76638) its STEP's solid
inertia
about it, of unit density: Ixx 1593.55; Iyy 2897.47; Izz 3353.54; Ixy 376.408; Iyz 51.9388; Izx 13.917
//! The solid a cone fills as it is spun 150° about the z axis, right-handed. Its axis is the line//! through the origin along w = (cos 30°, 0, sin 30°); its point is at −2w and it opens at 25°//! from its axis to a flat base at 5w, of radius 7 tan 25°.//!//! solidcraft-kernel has no sweep of a solid, so the turn is built by elementary geometry. The//! cone's axis meets the z axis at the origin, so every point of its base's rim is one distance//! from it, R = √(5² + (7 tan 25°)²). Fill the cone out to the ball of radius R about the origin://! K′, the cone with its base replaced by that sphere's cap. A circle about the z axis stays on a//! sphere about the origin; beyond the base it meets the cone in two arcs mirrored in the xz//! plane, and the cap fills the gap between them, which is narrower than the turn, so K′ sweeps//! what the cone does. K′ is symmetric in the xz plane and meets every circle about the z axis in//! arcs about its point at 0° and/or at 180°, or holds it whole; turned by 150°, an arc about 0° is//! passed over where K′ starts, the 150° on from 0° and where it stops, and one about 180°//! likewise from 180°. So the sweep is K′ where it starts and where it stops, with K′'s section by//! the xz plane on the side x ≥ 0 revolved from 0° to 150° and on the side x ≤ 0 from 180° to//! 330°: cones, spheres and planes.usesuper::drum_swung_partway_into_ring_sector::turned;
usecrate::solids::*;
use solidcore_record::Seg2;
use std::f64::consts::{FRAC_PI_2, TAU};
pubfnbuild() -> R<Body> {
spun(1.0)
}
/// The sweep with every length `s` times as long.pubfnspun(s: f64) -> R<Body> {
let (s30, c30) = 30f64.to_radians().sin_cos();
let w = v3(c30, 0.0, s30);
let u = v3(-s30, 0.0, c30); // square to w, in the xz planelet (tip, base) = (2.0 * s, 5.0 * s);
let rb = 7.0 * s * 25f64.to_radians().tan();
let big = (base * base + rb * rb).sqrt();
// K′, revolved about w: its section in (out from w along u, along w) from the point out to// the rim at (rb, base), the sphere's arc up to the axis at R, and the axis backlet filled = vec![
Seg2::Line { a: v2(0.0, -tip), b: v2(rb, base) },
Seg2::Arc { center: v2(0.0, 0.0), radius: big, start: base.atan2(rb), sweep: FRAC_PI_2 - base.atan2(rb) },
Seg2::Line { a: v2(0.0, big), b: v2(0.0, -tip) },
];
let frame = Plane { origin: Vec3::ZERO, x: u, y: w };
let filled = Region2 { outer: Loop2 { segs: filled }, holes: vec![] };
let start = one(solidcraft_kernel::revolve(&frame, &[filled], Vec2::ZERO, Vec2::Y, TAU)?)?;
// K′'s section by the xz plane, in (x, z): the point a = −tip·w, the rims base·w ± rb·u, the// sphere's arc between them; the z axis crosses its sides at `top` and `bottom`let at = |along: f64, out: f64| w * along + u * out;
let a = at(-tip, 0.0);
let (rim_up, rim_down) = (at(base, rb), at(base, -rb));
let cross = |q: Vec3| a + (q - a) * (-a.x / (q.x - a.x)); // where the side from a to q meets x = 0let (top, bottom) = (cross(rim_up), cross(rim_down));
let line = |p: Vec3, q: Vec3| Seg2::Line { a: v2(p.x, p.z), b: v2(q.x, q.z) };
let angle = |q: Vec3| q.z.atan2(q.x);
let outer = vec![
line(bottom, rim_down),
Seg2::Arc { center: v2(0.0, 0.0), radius: big, start: angle(rim_down), sweep: angle(rim_up) - angle(rim_down) },
line(rim_up, top),
line(top, bottom),
];
let ahead = revolve_z(Region2 { outer: Loop2 { segs: outer }, holes: vec![] }, 150.0)?;
// the side x ≤ 0, the triangle a, bottom, top, drawn mirrored at 0° and turned to 180°let inner = polygon(&[(-a.x, a.z), (0.0, top.z), (0.0, bottom.z)]);
let behind = turned(&revolve_z(inner, 150.0)?, 180.0)?;
let end = turned(&start, 150.0)?;
// The kernel's boolean refuses to unite `ahead` with K′ where it starts or stops: they// overlap on the sphere, and touch along the section's sides. So `ahead` is first joined to// the parts of K′ that only meet it on its end faces, K′ less its quarter x ≥ 0, y ≥ 0 where// it starts and less its quarter x ≥ 0, y ≤ 0 where it stops; the rest of K′ comes with// `behind`, which the kernel unites with it.let far = 2.0 * big;
let first = cut(&start, &block((0.0, 0.0, -far), (far, far, far))?)?;
let last = turned(&cut(&start, &block((0.0, -far, -far), (far, 0.0, far))?)?, 150.0)?;
let ahead = union(&union(&ahead, &first)?, &last)?;
union(&union(&union(&behind, &start)?, &end)?, &ahead)
}
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
3.5 ms; CPU time 3.3 ms; peak memory 11.7 MB
Notes
refused popkern has no sweep of a solid, and this sweep's wall is an envelope its other operations do not make
// A cone spun about a line that crosses it aslant.//// Refused: popkern has no sweep of a solid (its sweeps carry a profile along a path), and this// one's boundary is an envelope of the moving solid that its other operations do not make.throw"popkern has no sweep of a solid, and this sweep's wall is an envelope its other operations do not make";
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
261 ms; CPU time 260 ms; peak memory 27.3 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Workaround † no sweep of a solid turned about a line through it
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
288.4950567
288.495057
1.0e-09
area
267.0088236
267.0088237
8.5e-11
agrees with
cad-kernel, cadrs
mesh
51185 triangles, closed, 9 degenerate
centre of gravity
(0.456617, 1.70412, 1.76638) its STEP's solid
inertia
about it, of unit density: Ixx 1593.55; Iyy 2897.47; Izz 3353.54; Ixy 376.408; Iyz 51.9388; Izx 13.917
//! The solid a cone fills as it is spun 150° about the z axis, which crosses its axis inside it.//!//! The cone's axis (through the origin along w = (cos 30°, 0, sin 30°)) and the z axis meet at the//! origin, so every point of the base's rim lies at one distance from it, R = √(5² + (7 tan 25°)²).//! Fill the cone out to the ball of radius R about the origin: K′ = the cone with its flat base//! replaced by the cap of that sphere. A circle about the z axis stays on that sphere, and it meets//! the cone in two arcs mirrored in the xz-plane (with neither the +x nor the −x direction between//! them) only beyond the base, where the cap fills the gap between them: the gap is narrower than//! the turn, so K′ sweeps what the cone sweeps. K′ meets every circle about the z axis in arcs that//! hold the direction 0° or 180° (it is symmetric in the xz-plane and holds the circle's points//! there), and an arc [a, b] holding 0° turned by up to 150° covers [a, b + 150°] = [a, b] ∪//! [0°, 150°] ∪ [a + 150°, b + 150°]. So the sweep is K′ where it starts, K′ where it stops, and the//! halves of K′'s section by the xz-plane at x ≥ 0 and x ≤ 0 revolved about the z axis through//! 0°…150° and 180°…330°: cones, spheres and planes, united.usecrate::solids::sweep::{moved, turn_z};
usecrate::solids::swept::{planar, Piece};
usecrate::solids::{p, polygon};
usecrate::Refusal;
use brep_kernel::{boolean_operation_nary, revolve_profile_brep, BooleanOperation, BrepSolid, Vec3};
use std::f64::consts::{FRAC_PI_2, TAU};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let (s30, c30) = 30f64.to_radians().sin_cos();
let w = p(c30, 0.0, s30);
let u = p(-s30, 0.0, c30); // square to w, in the xz-planelet rb = 7.0 * 25f64.to_radians().tan(); // the base's radiuslet big = (25.0 + rb * rb).sqrt(); // the rim's distance from the originlet rim_angle = 5f64.atan2(rb);
// K′: about w, (radial, axial) from the origin: the point at axial −2, the side out to the// rim at (rb, 5), the sphere's arc up to the axis at R.let filled = planar(
&[
Piece::Line { from: [0.0, -2.0], to: [rb, 5.0] },
Piece::Arc { centre: [0.0, 0.0], radius: big, start: rim_angle, end: FRAC_PI_2 },
Piece::Line { from: [0.0, big], to: [0.0, -2.0] },
],
p(0.0, 0.0, 0.0),
u,
w,
)?;
let start = revolve_profile_brep(&filled, p(0.0, 0.0, 0.0), w, TAU)?;
let turn = 150f64.to_radians();
let end = moved(&start, turn_z(turn, p(0.0, 0.0, 0.0))?)?;
// K′'s section by the xz-plane, in (x, z): the point A = −2w, the rims r± = 5w ± rb·u, the// sphere's arc between them through Rw. The z axis crosses the two sides at P+ (upper) and P−.let at = |s: f64, side: f64| -> Vec3 { w.scale(s).add(u.scale(side)) };
let a = at(-2.0, 0.0);
let (rim_up, rim_down) = (at(5.0, rb), at(5.0, -rb));
let cross = |q: Vec3| -> Vec3 {
// where the segment from A to q meets x = 0let k = -a.x / (q.x - a.x);
a.add(q.sub(a).scale(k))
};
let (top, bottom) = (cross(rim_up), cross(rim_down));
// Angles in the xz-plane (from +x toward +z) of the rims on the sphere about the origin.let angle = |q: Vec3| q.z.atan2(q.x);
let outer = planar(
&[
Piece::Line { from: [bottom.x, bottom.z], to: [rim_down.x, rim_down.z] },
Piece::Arc { centre: [0.0, 0.0], radius: big, start: angle(rim_down), end: angle(rim_up) },
Piece::Line { from: [rim_up.x, rim_up.z], to: [top.x, top.z] },
Piece::Line { from: [top.x, top.z], to: [bottom.x, bottom.z] },
],
p(0.0, 0.0, 0.0),
p(1.0, 0.0, 0.0),
p(0.0, 0.0, 1.0),
)?;
let ahead = revolve_profile_brep(&outer, p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), turn)?;
let inner = polygon(&[a, bottom, top])?;
// The x ≤ 0 half sits at 180°: revolved through 150° from there.let behind = revolve_profile_brep(&inner, p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), turn)?;
// United revolved parts first: the kernel's n-ary union refuses the same four given the cone// first (an open loop where the parts touch along the generators in the xz-plane).Ok(boolean_operation_nary(&[ahead, behind, end, start], BooleanOperation::Union)?)
}
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
85 ms; CPU time 181 ms; peak memory 17 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
288.4950567
288.495057
1.1e-09
area
267.0088236
267.0088237
1.0e-10
agrees with
cad-kernel, next.BREP
mesh
13435 triangles, closed, 5 degenerate
centre of gravity
(0.456617, 1.70412, 1.76638) its STEP's solid
inertia
about it, of unit density: Ixx 1593.55; Iyy 2897.47; Izz 3353.54; Ixy 376.408; Iyz 51.9388; Izx 13.917
//! The solid a cone (its axis along w = (cos 30°, 0, sin 30°) through the origin, its point at −2w,//! opening at 50° to a flat base at 5w) fills as it turns 150° about the z axis, which crosses it.//!//! The cone is cadrs's cone primitive; what it passes through is cadrs's sweep of a solid (one//! turn).usecrate::bench::{cone, P3, V3};
usecrate::shared::swept::{swung, z_axis};
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let w = V3::new(30f64.to_radians().cos(), 0.0, 30f64.to_radians().sin());
let point = P3::from(w * -2.0);
let c = cone(k, point, w, 0.0, 7.0 * 25f64.to_radians().tan(), 7.0)?;
swung(k, c, z_axis(), 0.0, 150.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.
springrep left no solid to show.
Time
25 ms; CPU time 25 ms; peak memory 9 MB
Notes
refused invalid result: a face a curve sweeps passes through itself, another such face or an end of the sweep
//! The solid a cone (axis along (cos 30°, 0, sin 30°), point at −2 along it, opening at 50° to a//! base at 5) fills as it turns 150° about the z axis.use springrep::math::Frame;
use springrep::primitive::cone;
use springrep::sweep::solid;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::{deg, turning, v3};
pubfnbuild() -> Result<Brep, String> {
let (s, c) = deg(30.0).sin_cos();
let w = v3(c, 0.0, s);
let point = Frame::from_axis(w * -2.0, w).map_err(e)?;
let tool = cone(&point, 0.0, 7.0 * deg(25.0).tan(), 7.0, "cone").map_err(e)?;
solid(&tool, &turning(0.0, deg(150.0)), "spin").map_err(e)
}
geomsolver left no solid to show.
Time
44 ms; CPU time 45 ms; peak memory 23.2 MB
Notes
refused error[E080]: `part`: native CAD boundary construction for continuous motion sweeps is not yet supported
// The solid a cone fills as it is spun partway about a line crossing its axis aslant: the cone// about the line through the origin along w = (cos 30, 0, sin 30), its point at -2w, opening at// 50 degrees (each side 25 degrees from its axis) to its flat base at +5w; a turn of its// half-section in the front plane (x, z) about its axis. It is turned rigidly 150 degrees about// the z axis, right-handed (from +x toward +y).unit mm
use std
use std.solids
use std.motion (turns)
in std.front {
o := point
fix((0, 0)) o
apex := point hint((-1.73, -1))
centre := point hint((4.33, 2.5))
rim := point hint((2.69, 5.34))
spine := line(apex, centre)
o coincident spine
o distance(2) apex
o distance(5) centre
// the axis 30 degrees up from x, turned about the front plane's normal (-y)
std.x angle(30deg, about: std.front.normal) spine
half := (flank := line(apex, rim)) -> (base := line(rim, centre)) ->
(axle := line(centre, apex)) -> close
base perpendicular spine
spine angle(25deg) flank
}
cone := solid(std.solids.Revolution(half, about: axle))
swing := frame
swing turns(1) std.z
part := solid({ p | some t in (0deg, 150deg): p in cone at(under: swing) t })
anvilcad left no solid to show.
Time
1.1 ms; CPU time 950 µs; peak memory 3.6 MB
Notes
refused anvil-brep has no sweep of a solid, and what this motion sweeps is bounded by envelopes of the body's surfaces under it (a rim or a face leaning to the motion) that follow from no elementary construction, which it would have to compute itself
//! A cone spun about a line that crosses it aslant.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid, and what this motion sweeps is bounded by envelopes of the body's surfaces under it (a rim or a face leaning to the motion) that follow from no elementary construction, which it would have to compute itself".into())
}