A curved block with a notch cut into it by a bull-nose mill swung partway into it.
The block is a sector of a ring about the z axis: everything with distance from the z axis between 8 and 12, with z between −1 and 1, and with polar angle between 0° and 60° (measured from +x toward +y).
The mill is a solid of revolution about the vertical line through (10, 0), from z = −0.5 to z = 0.5: a cylinder of radius 1 whose bottom corner is rounded to radius 0.3. Its flat bottom is a disc of radius 0.7 at z = −0.5, joined to its side (radius 1, from z = −0.2 up) by a quarter of a torus whose tube, of radius 0.3, is centered on the circle of radius 0.7 at z = −0.2. Its top is flat, at z = 0.5.
It turns rigidly about the z axis, right-handed (from +x toward +y), from −140° to +30°: it starts clear of the block and stops halfway across it. Cut from the block everything the mill passes through.
The round's bottom circle stays in its plane, so the notch has a flat floor; the round's meridians nearest and farthest from the axis sweep tori about the z axis.
expected
closed form
volume
71.99190096
80π/3 − ∫(π R(z)²/2 + (π/3)·10 R(z)) dz, R(z) the mill's radius at height z: 0.7 + √(0.3² − (z + 0.2)²) below z = −0.2, 1 above
area
175.6285311
40π + 16 − ∫2R dz (the opening at 0°) + the flat top and bottom swept, π R²/2 + (10π/3)R at R = 1 and 0.7 + the walls about the axis (π/6)·2·10·ℓ, ℓ = 0.7 + 0.3π/2 the side's profile + half the mill's side and round, π·0.7 + π·0.3(0.7π/2 + 0.3)
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
8.49 s; CPU time 24.7 s; peak memory 45.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 ring sector (radii 8 to 12 about z, z from −1 to 1, polar angle 0° to 60°) notched by a//! bull-nose mill about the vertical line through (10, 0), from z = −0.5 to 0.5 — radius 1, its//! bottom corner rounded to 0.3 — turned rigidly about z, right-handed, from −140° to +30°: it//! starts clear and stops halfway across.//!//! Refused by the kernel: the closed sweep's arrangement fails to meet a traced curve with a plane//! (`Unbuilt::Failed`: the meeting was not proved, the search reading more boxes than any may).usecrate::sketch::polygon;
use cad_kernel::build::{revolve, Profile, ProfileEdge};
use cad_kernel::geom::{tolerance, Frame, V};
use cad_kernel::swept::closed::cut_from;
use cad_kernel::topo::Brep;
use cad_kernel::trajectory::{Screw, Trajectory};
use std::f64::consts::{FRAC_PI_2, FRAC_PI_3, TAU};
constUP: V = [0., 0., 1.];
/// The middle of the mill's flat bottom.constFOOT: V = [10., 0., -0.5];
constRADIUS: f64 = 1.;
constCORNER: f64 = 0.3;
constHEIGHT: f64 = 1.;
/// The turn's start and stop, in degrees.constFROM: f64 = -140.;
constTO: f64 = 30.;
/// How closely the mill is meshed for the sweep's membership reads: a hundred-and-fiftieth of its/// corner's radius.constBAR: f64 = 0.002;
/// The ring sector: its section in the half-plane at 0° turned 60° about z.fnsector() -> Result<Brep, String> {
let section = polygon(&[[8., 0., -1.], [12., 0., -1.], [12., 0., 1.], [8., 0., 1.]]);
revolve(§ion, [0.; 3], UP, FRAC_PI_3)
}
/// The mill: its meridian in the half-plane y = 0 beyond its axis — out along its flat bottom,/// round the quarter circle of its corner, up its side, back across its top and down its axis —/// turned once about the axis.fnmill() -> Result<Brep, String> {
let at = |x: f64, z: f64| [FOOT[0] + x, 0., FOOT[2] + z];
let corner = Frame::new(at(RADIUS - CORNER, CORNER), [0., -1., 0.], [1., 0., 0.]);
let edges = vec![
ProfileEdge::Line { a: at(0., 0.), b: at(RADIUS - CORNER, 0.) },
ProfileEdge::Arc { frame: corner, r: CORNER, span: Some([-FRAC_PI_2, 0.]) },
ProfileEdge::Line { a: at(RADIUS, CORNER), b: at(RADIUS, HEIGHT) },
ProfileEdge::Line { a: at(RADIUS, HEIGHT), b: at(0., HEIGHT) },
ProfileEdge::Line { a: at(0., HEIGHT), b: at(0., 0.) },
];
let meridian = Profile { origin: FOOT, normal: [0., 1., 0.], loops: vec![edges],
names: Vec::new() };
revolve(&meridian, FOOT, UP, TAU)
}
pubfnbuild() -> Result<Brep, String> {
let blank = sector()?;
let tool = mill()?;
// 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 cut from the sector on one arrangement: a mill about an axis// along the turn's, its side's generators and its round's meridians in the plane through both// axes turned into cylinders and tori about z, its flat faces kept in their planeslet size = blank.size().max(tool.size());
cut_from(&blank, &tool, &path, [FROM.to_radians(), TO.to_radians()], BAR, tolerance(size))
.map_err(|why| format!("the mill's sweep not built: {why:?}"))
}
Time
653 ms; CPU time 652 ms; peak memory 369 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.
"""A bull-nose mill swung partway into a curved block. A curved block with a notch cut into it by a
bull-nose mill swung partway into it.
The block is a sector of a ring about the z axis: everything with distance from the z axis between
8 and 12, with z between −1 and 1, and with polar angle between 0° and 60° (measured from +x toward
+y).
The mill is a solid of revolution about the vertical line through (10, 0), from z = −0.5 to z =
0.5: a cylinder of radius 1 whose bottom corner is rounded to radius 0.3. Its flat bottom is a disc
of radius 0.7 at z = −0.5, joined to its side (radius 1, from z = −0.2 up) by a quarter of a torus
whose tube, of radius 0.3, is centered on the circle of radius 0.7 at z = −0.2. Its top is flat, at
z = 0.5.
It turns rigidly about the z axis, right-handed (from +x toward +y), from −140° to +30°: it starts
clear of the block and stops halfway across it. Cut from the block everything the mill passes
through.
The round's bottom circle stays in its plane, so the notch has a flat floor; the round's meridians
nearest and farthest from the axis sweep tori about the z axis."""fromOCP.BRepBuilderAPIimport (BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeFace,
BRepBuilderAPI_MakeWire)
fromOCP.BRepPrimAPIimportBRepPrimAPI_MakeRevolfromOCP.GCimportGC_MakeArcOfCirclefromOCP.gp import gp, gp_Ax1, gp_Pnt
from sweep import cut, plane, ring_sector, turn, turned
BLOCK = (8, 12, -1, 1, 0, 60) # radii, heights and polar anglesAXIS = 10# the mill's axis is the vertical line through (10, 0)RADIUS, ROUND = 1, 0.3BOTTOM, TOP = -0.5, 0.5START, STOP = -140, 30# degrees about the z axisdefmill():
"""The mill's half-section beside its axis, in the plane y = 0, turned about the axis: a flat
bottom of radius 0.7, the quarter circle of radius 0.3 rounding its corner, its side and its
flat top."""
flat = AXIS + RADIUS - ROUND
p = [gp_Pnt(AXIS, 0, BOTTOM), gp_Pnt(flat, 0, BOTTOM), gp_Pnt(AXIS + RADIUS, 0, BOTTOM + ROUND),
gp_Pnt(AXIS + RADIUS, 0, TOP), gp_Pnt(AXIS, 0, TOP)]
middle = gp_Pnt(flat + ROUND * 0.5 ** 0.5, 0, BOTTOM + ROUND - ROUND * 0.5 ** 0.5)
wire = BRepBuilderAPI_MakeWire()
wire.Add(BRepBuilderAPI_MakeEdge(p[0], p[1]).Edge())
wire.Add(BRepBuilderAPI_MakeEdge(GC_MakeArcOfCircle(p[1], middle, p[2]).Value()).Edge())
for a, b in ((2, 3), (3, 4), (4, 0)):
wire.Add(BRepBuilderAPI_MakeEdge(p[a], p[b]).Edge())
half = BRepBuilderAPI_MakeFace(wire.Wire()).Face()
returnBRepPrimAPI_MakeRevol(half, gp_Ax1(gp_Pnt(AXIS, 0, 0), gp.DZ_s())).Shape()
defbuild():
tool = turn(mill(), gp.OZ_s(), START)
# The turn's axis and the mill's are parallel. A surface of revolution about the mill's axis# meets the turn square-on where its normal lies in the plane through both axes, which cuts# its side and its round along their contact; its flat ends turn in their own planes.
through_axes = turn(plane((0, 0, 0), (0, 1, 0)), gp.OZ_s(), START)
swept = turned(tool, gp.OZ_s(), STOP - START, [through_axes])
returncut(ring_sector(*BLOCK), swept)
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
39 ms; CPU time 39 ms; peak memory 11.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 curved block, the sector of the ring about the z axis between radii 8 and 12, z from −1 to 1//! and polar angle from 0° to 60°, notched by a bull-nose mill swung partway into it: about the//! vertical line through (10, 0), from z = −0.5 to 0.5, a cylinder of radius 1 whose bottom corner//! is rounded to radius 0.3, turned rigidly about the z axis from −140° to +30°. Everything the//! mill passes through, cut.//!//! The mill is its half section revolved about its axis; its sweep is kentron's sweep of a solid//! (`sweep::solid`, one turn), cut from the block.usecrate::bench::p;
usecrate::shared::parts::xz_plane;
usecrate::shared::swept::ring_sector;
use kentron::math::{Axis, Direction};
use kentron::sketch::{self, Outcome, Step};
use kentron::sweep::{self, RigidMotion};
use kentron::topology::{Model, Shape};
use std::f64::consts::TAU;
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
useStep::{Arc, Start, To};
let block = ring_sector(m)?;
// The mill: its half section, out from its axis (the flat bottom to 0.7, the round's quarter// circle about (10.7, −0.2), the side up to the flat top), turned whole about it.let half = [Start(10.0, -0.5), To(10.7, -0.5), Arc { radius: 0.3, angle: 90.0 }, To(11.0, 0.5), To(10.0, 0.5)];
let half = sketch::profile(m, xz_plane(0.0), &half, Outcome::Face)?;
let mill = sweep::revolve(m, half, Axis::new(p(10.0, 0.0, 0.0), Direction::Z), TAU)?.shape;
let turn = RigidMotion::Turn { axis: Axis::Z, from: (-140f64).to_radians(), to: 30f64.to_radians() };
let swept = sweep::solid(m, mill, &turn)?;
kentron::boolean::difference(m, block, swept)
}
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
116 ms; CPU time 115 ms; peak memory 52.4 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.
//! A ring sector, everything between 8 and 12 from the z axis with |z| ≤ 1 and polar angle from//! 0° to 60°, notched by a bull-nose mill swung about the z axis from −140° to +30°: about the//! vertical line through (10, 0) from z = −0.5 to 0.5, a cylinder of radius 1 whose bottom corner//! is rounded to radius 0.3, the round's tube centred on the circle of radius 0.7 at z = −0.2.//!//! solidcraft-kernel has no sweep of a solid, so the swing is built by elementary geometry//! ([`swung_partway`]): the mill meets each circle about the z axis in one arc holding the//! circle's point at 0°, so its section through its axis there is its shadow, revolved through//! the turn, with the mill's half ahead of that section where it stops.usesuper::drum_swung_partway_into_ring_sector::{half_ahead, swung_partway};
usecrate::solids::*;
use solidcore_record::Seg2;
use std::f64::consts::FRAC_PI_2;
pubfnbuild() -> R<Body> {
let line = |a: (f64, f64), b: (f64, f64)| Seg2::Line { a: v2(a.0, a.1), b: v2(b.0, b.1) };
// the round's quarter circle in the section, on either side of the axis at x = 10let round = |x: f64, start: f64| Seg2::Arc { center: v2(x, -0.2), radius: 0.3, start, sweep: FRAC_PI_2 };
let section = vec![
line((9.3, -0.5), (10.7, -0.5)),
round(10.7, -FRAC_PI_2),
line((11.0, -0.2), (11.0, 0.5)),
line((11.0, 0.5), (9.0, 0.5)),
line((9.0, 0.5), (9.0, -0.2)),
round(9.3, 2.0 * FRAC_PI_2),
];
let half = vec![
line((10.0, -0.5), (10.7, -0.5)),
round(10.7, -FRAC_PI_2),
line((11.0, -0.2), (11.0, 0.5)),
line((11.0, 0.5), (10.0, 0.5)),
line((10.0, 0.5), (10.0, -0.5)),
];
let region = |segs: Vec<Seg2>| Region2 { outer: Loop2 { segs }, holes: vec![] };
swung_partway(region(section), Some(half_ahead(region(half))?))
}
// A ring sector (8 to 12 from the z axis, |z| ≤ 1, 0° to 60°) less everything a bull-nose mill (radius 1, corner 0.3, about the vertical through (10, 0), |z| ≤ 0.5) passes through as it turns about z from -140° to 30°.//// A turn about the z axis sweeps the tool where it starts and where it stops and, between them, the// shadow of the tool on a half-plane through the axis (each point carried there round its circle// about the axis) revolved through the turn: here the tool is symmetric about its own plane through// the axis, so the shadow is its section in that plane.fnblock(m) {
m.profile(xz()).polygon([[8.0, -1.0], [12.0, -1.0], [12.0, 1.0], [8.0, 1.0]]).sketch("block")
.revolve(axis_at([0.0, 0.0, 0.0], [0.0, 0.0, 1.0]), blind(60.0))
}
fnswing(m, section, from, to) {
section.sketch("shadow").revolve(axis_at([0.0, 0.0, 0.0], [0.0, 0.0, 1.0]), blind(to - from))
.rotate(axis_at([0.0, 0.0, 0.0], [0.0, 0.0, 1.0]), from)
}
fnturned(body, angle) { body.rotate(axis_at([0.0, 0.0, 0.0], [0.0, 0.0, 1.0]), angle) }
fncutter(m) { m.profile(xz()).path(10.0, -0.5).line_to(10.7, -0.5).arc_to([10.7 + 0.3 * sqrt(0.5), -0.2 - 0.3 * sqrt(0.5)], [11.0, -0.2]).line_to(11.0, 0.5).line_to(10.0, 0.5).close().sketch("mill").revolve(axis_at([10.0, 0.0, 0.0], [0.0, 0.0, 1.0]), full_circle()) }
let m = model();
let b = block(m);
b = b.subtract(m.tool(|m| turned(cutter(m), -140.0)));
b = b.subtract(m.tool(|m| swing(m, m.profile(xz()).path(9.3, -0.5).line_to(10.7, -0.5).arc_to([10.7 + 0.3 * sqrt(0.5), -0.2 - 0.3 * sqrt(0.5)], [11.0, -0.2]).line_to(11.0, 0.5).line_to(9.0, 0.5).line_to(9.0, -0.2).arc_to([9.3 - 0.3 * sqrt(0.5), -0.2 - 0.3 * sqrt(0.5)], [9.3, -0.5]).close(), -140.0, 30.0)));
b = b.subtract(m.tool(|m| turned(cutter(m), 30.0)));
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
31 ms; CPU time 31 ms; peak memory 26.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.
//! The ring sector 8 ≤ ρ ≤ 12, −1 ≤ z ≤ 1, 0° to 60° about the z axis, less everything a bull-nose//! mill swung into it passes through as it turns rigidly about the z axis from −140° to +30°: the//! solid of revolution about the upright line through (10, 0): a flat bottom of radius 0.7 at z =//! −0.5, a quarter torus of tube radius 0.3 about the circle of radius 0.7 at z = −0.2, a side of//! radius 1 up to a flat top at z = 0.5.//!//! Through the kernel's whole sweep of a solid (`sweep_solid`): the mill, a solid of revolution//! about the upright line through (10, 0, 0) with the meridian described, turned about the z axis//! from −140° to +30°, its end positions included, and cut from the block.usecrate::solids::p;
usecrate::solids::swept::{less_all, revolved_tool, ring_sector, turn_about_z, Piece};
usecrate::Refusal;
use brep_kernel::{sweep_solid, BrepSolid};
use std::f64::consts::{FRAC_PI_2};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let (x, z) = (p(1.0, 0.0, 0.0), p(0.0, 0.0, 1.0));
let mill = revolved_tool(p(10.0, 0.0, 0.0), z, x, &[
Piece::Line { from: [0.0, -0.5], to: [0.7, -0.5] },
Piece::Arc { centre: [0.7, -0.2], radius: 0.3, start: -FRAC_PI_2, end: 0.0 },
Piece::Line { from: [1.0, -0.2], to: [1.0, 0.5] },
Piece::Line { from: [1.0, 0.5], to: [0.0, 0.5] },
Piece::Line { from: [0.0, 0.5], to: [0.0, -0.5] },
]);
less_all(ring_sector(8.0, 12.0, -1.0, 1.0, 0.0, 60f64.to_radians())?, vec![sweep_solid(&mill, &turn_about_z((-140f64).to_radians(), 30f64.to_radians(), 0.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
22 ms; CPU time 40 ms; peak memory 11.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 curved block (the ring sector between radii 8 and 12, heights ±1, polar angles 0° to 60°)//! notched by a bull-nose mill (a cylinder of radius 1 about the upright through (10, 0) from//! z = −0.5 to 0.5, its bottom corner rounded to radius 0.3) turned about the z axis from −140°//! to +30°.//!//! The mill is its half section turned about its axis (the round a quarter circle, drawn as the//! rational quadratic it is); what it passes through is cadrs's sweep of a solid (one turn), cut//! from the block (cadrs's cylindrical box).usecrate::bench::{cut, p3, v3};
usecrate::shared::geometry::Section;
usecrate::shared::swept::{ring_sector, swung, z_axis};
usecrate::Refusal;
use cadrs_kernel::{BodyId, DefaultKernel, Plane};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
let block = ring_sector(k, (8.0, 12.0), (-1.0, 1.0), (0.0, 60.0))?;
let section = Section::on(Plane::xz(0.0))
.line((10.0, -0.5), (10.7, -0.5))
.conic((10.7, -0.5), (11.0, -0.5), 2f64.sqrt() / 2.0, (11.0, -0.2))
.line((11.0, -0.2), (11.0, 0.5))
.line((11.0, 0.5), (10.0, 0.5))
.line((10.0, 0.5), (10.0, -0.5));
let mill = section.turned(k, p3(10.0, 0.0, 0.0), v3(0.0, 0.0, 1.0))?;
let swept = swung(k, mill, z_axis(), -140.0, 30.0)?;
cut(k, block, swept)
}
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
23 ms; CPU time 23 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 ring sector (radii 8 to 12, heights −1 to 1, angles 0° to 60°) less everything a bull-nose//! mill passes through as it turns about the z axis from −140° to 30°: a cylinder of radius 1 about//! the upright line through (10, 0), from z = −0.5 to 0.5, its bottom corner rounded to 0.3.use std::f64::consts::PI;
use springrep::boolean::difference;
use springrep::sweep::solid;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::{arc, deg, line, outline, sector_block, turning, upright};
pubfnbuild() -> Result<Brep, String> {
let meridian = outline(vec![
line((0.0, -0.5), (0.7, -0.5), "bottom"),
arc((0.7, -0.2), 0.3, -PI / 2.0, PI / 2.0, "round"),
line((1.0, -0.2), (1.0, 0.5), "side"),
line((1.0, 0.5), (0.0, 0.5), "top"),
line((0.0, 0.5), (0.0, -0.5), "axis"),
]);
let mill = upright(&meridian, 10.0, 0.0, "mill")?;
let notch = solid(&mill, &turning(deg(-140.0), deg(30.0)), "notch").map_err(e)?;
difference(§or_block()?, ¬ch).map_err(e)
}
Time
3.79 s; CPU time 6.11 s; peak memory 40.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 curved block, the ring sector between radii 8 and 12 about the z axis, z within 1, polar angle// from 0 to 60 degrees: its section in the front plane (x, z) turned 60 degrees about the z axis.// A bull-nose mill about the upright line through (10, 0): radius 1 from z = -0.5 to 0.5, its// bottom corner rounded to 0.3, a turn of its half-section in the front plane. It is turned// rigidly about the z axis from -140 to +30 degrees, and everything it passes through cut from the// block.unit mm
use std
use std.solids
use std.solids (cut)
use std.motion (turns)
in std.front {
a := point
b := point hint((12, -1))
c := point hint((12, 1))
d := point hint((8, 1))
meridian := horizontal line(a, b) -> vertical line(b, c) ->
horizontal line(c, d) -> vertical line(d, a) -> close
fix((8, -1)) a
a distance(4) b
b distance(2) c
}
part := solid(std.solids.Revolution(meridian, about: std.z, to: 60deg))
in std.front {
e0 := point
q := point hint((11, -0.5))
e2 := point hint((11, 0.5))
e3 := point hint((10, 0.5))
fix((10, -0.5)) e0
e0 distance(1) q
e0 distance(1) e3
// the side meets the flat bottom at q, the corner rounded to 0.3
half := horizontal line(e0, q) -> round(r: 0.3mm) vertical line(q, e2) ->
horizontal line(e2, e3) -> vertical (spindle := line(e3, e0)) -> close
}
mill := solid(std.solids.Revolution(half, about: spindle))
swing := frame
swing turns(1) std.z
notch := solid({ p | some t in (-140deg, 30deg): p in mill at(under: swing) t })
notch cut part
anvilcad left no solid to show.
Time
1.2 ms; CPU time 990 µs; peak memory 3.4 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 bull-nose mill swung partway into a curved block.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())
}