A rod, the cylinder of radius 5 about the z axis from z = 0 to z = 20, threaded by a drafted bar whose section is a slot, carried along a screw.
The bar points at the rod's axis. Its section in the plane x = 12 is the slot (stadium) made of the two half discs of radius 1 centered at (12, ±1.5, 0) and the rectangle |y| ≤ 1.5, |z| ≤ 1 between them: 5 long along y and 2 wide along z. The bar is that section carried along −x to x = 4, drafted 3° inward: in the plane x = 12 − s its section is the slot's shrunk by s·tan 3° on every side (its half discs of radius 1 − s tan 3° about the same centers). So its sides are two planes and two half cones, and its tip, the plane x = 4, is 1 inside the rod.
The screw is about the z axis: the tool turns right-handed about it (from +x toward +y) and rises 6 for every whole turn, rigidly. It runs from a turn of −90° (lowered 1.5, the tool wholly below the rod) to a turn of 1350° (raised 22.5, wholly above it). Cut from the rod everything the bar passes through.
expected
closed form
volume
1401.313963
no closed form: cad-kernel, next.BREP and cadrs agree to 1e-9; the mean of their values
area
896.7608938
no closed form: cad-kernel, next.BREP and cadrs agree to 2e-9; 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. ✦ an elegant solution. 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.51 s; CPU time 10.1 s; peak memory 30 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
1401.313954
1401.313963
6.9e-09
area
896.760886
896.7608938
8.6e-09
agrees with
kentron, next.BREP, cadrs, springrep
mesh
59370 triangles, closed
centre of gravity
(-0.0194042, -0.033609, 10) its STEP's solid
inertia
about it, of unit density: Ixx 54761.4; Iyy 54798.4; Izz 16138.9; Ixy 32.0028; Iyz -131.023; Izx 226.939
//! A rod, the cylinder of radius 5 about z from z = 0 to 20, threaded by a drafted bar screwed//! about z, right-handed and rising 6 a turn, from a turn of −90° to 1350°. The bar's section in//! the plane x = 12 is the slot of the half discs of radius 1 about (12, ±1.5, 0) and the rectangle//! between them; it is carried along −x to x = 4, drafted 3° inward, so its sides are two planes//! and two half cones.//!//! The kernel's closed sweep (`swept::closed::cut_from`) takes the bar whole: under a screw its//! closed class takes a cone only about an axis along the screw's and refuses this bar's half//! cones, which stand about axes square to it (`Unbuilt::Curved`), so the bar goes the contact's//! road — its faces' contacts and its sharp edges' fans carried over the roll as sheets, given//! their meetings and the end poses, trimmed by membership in the sweep, and the result cut from//! the rod. Since 0.12.0 it is built: membership's mesh of the drafted cones is held to its sag//! as measured over every triangle, where a point a hair off it was proved outside the sweep.use cad_kernel::build::{disc, drafted, prism, Profile, ProfileEdge};
use cad_kernel::geom::{tolerance, Frame};
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, PI};
constROD_RADIUS: f64 = 5.;
constROD_LENGTH: f64 = 20.;
/// The section's plane, its half discs' centres' offset along y and their radius.constFACE: f64 = 12.;
constOFFSET: f64 = 1.5;
constRADIUS: f64 = 1.;
/// How far the bar runs along −x, and its draft, in degrees.constLENGTH: f64 = 8.;
constDRAFT: f64 = 3.;
/// How far the screw rises a whole turn, and its start and stop, in degrees.constRISE: f64 = 6.;
constFROM: f64 = -90.;
constTO: f64 = 1350.;
/// How closely the bar is meshed for the sweep's membership reads.constBAR: f64 = 0.002;
/// The slot in the plane x = 12, facing −x: its two half discs' arcs (each turning about −x, from/// its top across its far side to its bottom) and the two lines between them.fnslot() -> Profile {
let normal = [-1., 0., 0.];
let arc = |y: f64, from: f64| ProfileEdge::Arc {
frame: Frame::new([FACE, y, 0.], normal, [0., 1., 0.]),
r: RADIUS,
span: Some([from, from + PI]),
};
let edges = vec![
arc(OFFSET, -FRAC_PI_2),
ProfileEdge::Line { a: [FACE, OFFSET, -RADIUS], b: [FACE, -OFFSET, -RADIUS] },
arc(-OFFSET, FRAC_PI_2),
ProfileEdge::Line { a: [FACE, -OFFSET, RADIUS], b: [FACE, OFFSET, RADIUS] },
];
Profile { origin: [FACE, 0., 0.], normal, loops: vec![edges], names: Vec::new() }
}
pubfnbuild() -> Result<Brep, String> {
let up = [0., 0., 1.];
let rod = prism(&disc([0.; 3], up, ROD_RADIUS), 0., ROD_LENGTH)?;
// the kernel's drafted prism: the slot carried along its normal, each side tapered into the// material (a line's into a plane, a half circle's into a half cone)let bar = drafted(&slot(), 0., LENGTH, DRAFT.to_radians())?;
// the screw about z: a radian a radian of the roll, rising `RISE` a turnlet path = Trajectory::Twist(Screw { origin: [0.; 3], axis: up, ratio: 1., advance: RISE });
let size = rod.size().max(bar.size());
cut_from(&rod, &bar, &path, [FROM.to_radians(), TO.to_radians()], BAR, tolerance(size))
.map_err(|why| format!("the bar's sweep not built: {why:?}"))
}
occt left no solid to show.
Time
611 ms; CPU time 610 ms; peak memory 356.5 MB
Notes
refused occt has no sweep of a solid: it carries faces along a screw, and the slot's half cones, whose axes run past the screw's, touch what they sweep along curves that are no plane sections of them, which occt has no operation to find
"""A rod threaded by a drafted bar of slotted section. A rod, the cylinder of radius 5 about the z
axis from z = 0 to z = 20, threaded by a drafted bar whose section is a slot, carried along a
screw.
The bar points at the rod's axis. Its section in the plane x = 12 is the slot (stadium) made of the
two half discs of radius 1 centered at (12, ±1.5, 0) and the rectangle |y| ≤ 1.5, |z| ≤ 1 between
them: 5 long along y and 2 wide along z. The bar is that section carried along −x to x = 4, drafted
3° inward: in the plane x = 12 − s its section is the slot's shrunk by s·tan 3° on every side (its
half discs of radius 1 − s tan 3° about the same centers). So its sides are two planes and two half
cones, and its tip, the plane x = 4, is 1 inside the rod.
The screw is about the z axis: the tool turns right-handed about it (from +x toward +y) and rises 6
for every whole turn, rigidly. It runs from a turn of −90° (lowered 1.5, the tool wholly below the
rod) to a turn of 1350° (raised 22.5, wholly above it). Cut from the rod everything the bar passes
through."""from bench importRefuseddefbuild():
# The bar's flat sides touch the screw along lines a plane would cut out. But its two half# cones have axes parallel to the x axis 1.5 either side of it, which run past the screw's# axis without meeting it: along each, the normal is square to the screw's velocity on a# curve that crosses the cone's rulings, no plane section and none of its circles. OCCT# sweeps no solid, and a face it carries along the screw sweeps to a solid only once split# along its contact: finding that curve would be computing the envelope outside the# kernel.raiseRefused("occt has no sweep of a solid: it carries faces along a screw, and the slot's ""half cones, whose axes run past the screw's, touch what they sweep along ""curves that are no plane sections of them, which occt has no operation to ""find")
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
3.62 s; CPU time 6.72 s; peak memory 180.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 rod, the cylinder of radius 5 about the z axis from z = 0 to z = 20, threaded by a drafted bar//! carried along a screw: its section in the plane x = 12 the slot of two half discs of radius 1//! about (12, ±1.5, 0) and the rectangle between, carried along −x to x = 4 and drafted 3° inward,//! screwed about the z axis, right-handed, rising 6 a turn, from a turn of −90° to +1350°.//! Everything the bar passes through, cut.//!//! The bar is the slot drafted (`sweep::extrude_drafted`); its sweep is kentron's sweep of a solid//! (`sweep::solid`, one screw), cut from the rod.usecrate::bench::p;
use kentron::geometry::curve::{Circle, Curve};
use kentron::make;
use kentron::math::{Axis, Direction, Frame, Vector};
use kentron::primitives::Cylinder;
use kentron::sweep::{self, RigidMotion};
use kentron::topology::{Model, Shape};
use std::f64::consts::FRAC_PI_2;
pubfnbuild(m: &mutModel) -> kentron::Result<Shape> {
let rod = Cylinder::new(5.0, 20.0).build(m)?;
// The slot in the plane x = 12: its two half discs' arcs (about x, from −z through ±y to +z)// and the lines between.let arc = |m: &mutModel, y: f64, from: f64| -> kentron::Result<Shape> {
let circle = Circle::new(Frame::new(p(12.0, y, 0.0), Direction::X, Direction::Y), 1.0);
make::edge_from_curve_range(m, Curve::Circle(circle), from, from + std::f64::consts::PI)
};
let edges = vec![
make::edge_between(m, p(12.0, -1.5, -1.0), p(12.0, 1.5, -1.0))?,
arc(m, 1.5, -FRAC_PI_2)?,
make::edge_between(m, p(12.0, 1.5, 1.0), p(12.0, -1.5, 1.0))?,
arc(m, -1.5, FRAC_PI_2)?,
];
let wire = make::wire(m, &edges)?;
let slot = make::planar_face(m, wire)?;
let bar = sweep::extrude_drafted(m, slot, Vector::new(-8.0, 0.0, 0.0), 3f64.to_radians())?;
let screw = RigidMotion::Screw { axis: Axis::new(p(0.0, 0.0, 0.0), Direction::Z), lead: 6.0, from: -FRAC_PI_2, to: 1350f64.to_radians() };
let swept = sweep::solid(m, bar, &screw)?;
kentron::boolean::difference(m, rod, 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.
solidcraft left no solid to show.
Time
1.7 ms; CPU time 1.5 ms; peak memory 4.6 MB
Notes
refused no layer (solidcraft-kernel, solidcore-ops, solidcore) has a sweep of a solid or an envelope: the bar's half-conical ends meet the screw square-on along space curves, in no plane, so no planar section screwed by either layer's screw sweep (`sweep_helix`, `screw_sweep`) makes the groove's walls
//! Refused. The bar's sides are two planes and two half cones. Its planes meet the screw's motion//! square-on along lines, but its half cones, whose axes run across the screw's, meet it along//! curves that are neither lines of them nor in any plane, and the groove's walls are partly what//! those curves sweep. So no section of the bar screwed by the kernel's helical sweep//! (`sweep_helix`) carries them. solidcraft-kernel has no sweep of a solid and no envelope, and//! those curves computed here would be geometry made outside the kernel.usecrate::Refusal;
usecrate::solids::Body;
pubfnbuild() -> Result<Body, Refusal> {
Err("no layer (solidcraft-kernel, solidcore-ops, solidcore) has a sweep of a solid or an envelope: the bar's half-conical ends \
meet the screw square-on along space curves, in no plane, so no planar section screwed \
by either layer's screw sweep (`sweep_helix`, `screw_sweep`) makes the groove's walls"
.into())
}
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
4.1 ms; CPU time 3.8 ms; peak memory 11.6 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 rod threaded by a drafted bar of slotted section.//// 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
367 ms; CPU time 367 ms; peak memory 21.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
1401.313963
1401.313963
4.2e-10
area
896.7608934
896.7608938
4.2e-10
agrees with
cad-kernel, kentron, cadrs, springrep, geomsolver
mesh
396336 triangles, closed
centre of gravity
(-0.0194041, -0.033609, 10) its STEP's solid
inertia
about it, of unit density: Ixx 54761.4; Iyy 54798.4; Izz 16138.9; Ixy 32.0028; Iyz -131.023; Izx 226.939
//! A rod threaded by a drafted slot-section bar carried along a screw.//!//! Through the kernel's sweep of a solid (`sweep_solid_within`), asked for the bar (its slot in//! the plane x = 12, two lines and two half circles, carried 8 along −x and drafted 3° inward)//! along the screw about the z axis that rises 6 a turn, from −90° to +1350°, within 5.2 of the//! z axis from z = −0.4 to 20.4 (which holds the rod and which neither end position reaches); cut//! from the rod.usecrate::solids::p;
usecrate::Refusal;
use brep_kernel::{
boolean_operation_nary, make_arc, make_cylinder_brep, make_line, sweep_clip_less, sweep_solid_within, BooleanOperation, BrepSolid, ScrewStep,
SolidMotion, SweepClip, SweptTool,
};
use std::f64::consts::{FRAC_PI_2, TAU};
pubfnbuild() -> Result<BrepSolid, Refusal> {
let rod = make_cylinder_brep(p(0.0, 0.0, 0.0), p(0.0, 0.0, 1.0), 5.0, 20.0)?;
let (y, z) = (p(0.0, 1.0, 0.0), p(0.0, 0.0, 1.0));
let bar = SweptTool::Bar {
origin: p(12.0, 0.0, 0.0),
normal: p(-1.0, 0.0, 0.0),
section: vec![
make_line(p(12.0, -1.5, -1.0), p(12.0, 1.5, -1.0))?,
make_arc(p(12.0, 1.5, 0.0), y, z, 1.0, -FRAC_PI_2, FRAC_PI_2)?,
make_line(p(12.0, 1.5, 1.0), p(12.0, -1.5, 1.0))?,
make_arc(p(12.0, -1.5, 0.0), y, z, 1.0, FRAC_PI_2, 3.0 * FRAC_PI_2)?,
],
from: 0.0,
to: 8.0,
draft: 3.0f64.to_radians(),
};
let screw = SolidMotion {
steps: vec![ScrewStep { axis_origin: p(0.0, 0.0, 0.0), axis_direction: p(0.0, 0.0, 1.0), turn: 1.0, advance: 6.0 / TAU }],
from: (-90.0f64).to_radians(),
to: 1350.0f64.to_radians(),
};
let clip = SweepClip {
axis_origin: p(0.0, 0.0, 0.0),
axis_direction: p(0.0, 0.0, 1.0),
reference: p(1.0, 0.0, 0.0),
radius: [0.0, 5.2],
axial: [-0.4, 20.4],
angle: None,
};
// The rod less the sweep, built directly where the kernel can (its clip// the rod itself); else the sweep within the larger clip, subtracted.let rod_clip = SweepClip { radius: [0.0, 5.0], axial: [0.0, 20.0], ..clip.clone() };
ifletSome(mut bodies) = sweep_clip_less(&bar, &screw, &rod_clip)? {
if bodies.len() == 1 {
returnOk(bodies.remove(0));
}
}
letmut operands = vec![rod];
operands.extend(sweep_solid_within(&bar, &screw, &clip)?);
Ok(boolean_operation_nary(&operands, BooleanOperation::Subtract)?)
}
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
490 ms; CPU time 1.27 s; peak memory 27.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 rod (the cylinder of radius 5 about the z axis from z = 0 to z = 20) threaded by a bar whose//! section is a slot (half discs of radius 1 about (12, ±1.5, 0) and the rectangle between them,//! in the plane x = 12), carried along −x to x = 4 drafted 3° inward, screwed about the z axis,//! rising 6 a turn, from a turn of −90° to 1350°.//!//! The bar is cadrs's solid Loft from the slot at x = 12 to the slot shrunk by 8 tan 3° at x = 4//! (each side a plane or a half cone); what it passes through (a turn//! and a slide along its axis at once: a screw) is cut from the rod by cadrs's cut by a swept solid//! (exactly half a turn at a time where it can be, else meshed); of the bar, its part within 5.5//! of the axis (the screw maps the cylinder about its axis onto itself, so only that part reaches//! the rod).usecrate::bench::{arc, p2, p3, v3};
usecrate::shared::loft::loft;
usecrate::shared::swept::{cut_swept, near_axis, rod, screw, z_axis};
usecrate::Refusal;
use cadrs_kernel::{BodyId, Curve2, DefaultKernel, Loop, Plane, Profile};
pubfnbuild(k: &mutDefaultKernel) -> Result<BodyId, Refusal> {
// The plane x = c, sketch x along +y and sketch y along +z (normal +x).let at = |c: f64| Plane::new(p3(c, 0.0, 0.0), v3(0.0, 1.0, 0.0), v3(1.0, 0.0, 0.0));
let slot = |r: f64| {
Loop::new(vec![
Curve2::line(p2(-1.5, -r), p2(1.5, -r)),
arc(p2(1.5, 0.0), r, -90.0, 180.0),
Curve2::line(p2(1.5, r), p2(-1.5, r)),
arc(p2(-1.5, 0.0), r, 90.0, 180.0),
])
};
let shrink = 8.0 * 3f64.to_radians().tan();
let bar = loft(k, vec![Profile::of(at(4.0), vec![slot(1.0 - shrink)]), Profile::of(at(12.0), vec![slot(1.0)])])?;
let bar = near_axis(k, bar, 5.5)?;
let r = rod(k)?;
cut_swept(k, r, bar, &screw(z_axis(), 6.0, -90.0, 1350.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
20.6 s; CPU time 20.6 s; peak memory 76.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.
Data
its STEP's
expected
rel. error
volume
1401.313963
1401.313963
3.9e-10
area
896.7608934
896.7608938
4.3e-10
agrees with
cad-kernel, kentron, next.BREP, cadrs, geomsolver
mesh
70390 triangles, closed
centre of gravity
(-0.0194041, -0.033609, 10) its STEP's solid
inertia
about it, of unit density: Ixx 54761.4; Iyy 54798.4; Izz 16138.9; Ixy 32.0028; Iyz -131.023; Izx 226.939
//! The rod of radius 5 about the z axis from z = 0 to 20 less everything a drafted bar of slot//! section pointing at the axis passes through as it is screwed about the z axis, rising 6 a//! turn.use std::f64::consts::PI;
use springrep::boolean::difference;
use springrep::loft::{Section, loft};
use springrep::math::{Frame, Vec3};
use springrep::sweep::solid;
use springrep::topo::Brep;
usecrate::shared::e;
usecrate::shared::swept::{arc, deg, line, outline, rod, screwing, v3};
/// The slot in the plane x = `x`, drawn in (y, z): half discs of radius `r` about (±1.5, 0) and the/// rectangle between them.fnslot(x: f64, r: f64) -> Result<Section, String> {
let half = PI / 2.0;
let profile = outline(vec![
line((-1.5, -r), (1.5, -r), "side"),
arc((1.5, 0.0), r, -half, PI, "end"),
line((1.5, r), (-1.5, r), "side"),
arc((-1.5, 0.0), r, half, PI, "end"),
]);
let frame = Frame::new(v3(x, 0.0, 0.0), Vec3::X, Vec3::Y).map_err(e)?;
Ok(Section::new(profile, frame))
}
pubfnbuild() -> Result<Brep, String> {
let draft = deg(3.0).tan();
let bar = loft(
&[slot(12.0, 1.0)?, slot(4.0, 1.0 - 8.0 * draft)?],
true,
"bar",
)
.map_err(e)?;
let swept = solid(&bar, &screwing(6.0, deg(-90.0), deg(1350.0)), "screw").map_err(e)?;
difference(&rod()?, &swept).map_err(e)
}
Time
31.3 s; CPU time 109.6 s; peak memory 96 MB
Notes
pass Its volume and area are the expected ones, and its mesh is closed.
Elegant ✦ a stadium drawn as a tangent chain, drafted, and screwed through the rod in one line of set notation
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
1401.31396
1401.313963
2.4e-09
area
896.7608952
896.7608938
1.6e-09
agrees with
kentron, next.BREP, cadrs, springrep
mesh
59184 triangles, closed
centre of gravity
(-0.0194042, -0.033609, 10) its STEP's solid
inertia
about it, of unit density: Ixx 54761.4; Iyy 54798.4; Izz 16138.9; Ixy 32.0028; Iyz -131.023; Izx 226.939
// A rod, the cylinder of radius 5 about the z axis from z = 0 to z = 20; a drafted bar pointing at// the rod's axis: its section the slot in the plane x = 12 made of the half discs of radius 1 about// (12, +-1.5, 0) and the rectangle |y| <= 1.5, |z| <= 1 between them, carried along -x to x = 4 and// drafted 3 degrees inward from that plane; carried by a screw about the z axis that turns// right-handed (from +x toward +y) and rises 6 a turn, from a turn of -90 degrees to one of 1350,// and everything it passes through cut from the rod.unit mm
use std
use std.solids
use std.solids (cut)
use std.motion (screws)
in std.top {
centreline := point
fix((0, 0)) centreline
skin := circle(center: centreline) hint(r: 5)
radius(5) skin
}
part := solid(std.solids.Prism(face(skin), from: 0mm, to: 20mm))
// the plane of the slot, x = 12, its u along y and its v along z, so its normal is +x
across := axis hint(dir: (0, 1, 0))
across parallel(sense: same) std.y
up := axis hint(dir: (0, 0, 1))
up parallel(sense: same) std.z
butt := plane(u: across, v: up)
fix(origin == (12, 0, 0)) butt
in butt {
left := point
right := point
fix((-1.5, 0)) left
fix((1.5, 0)) right
slot := horizontal line(hint((-1.5, -1)), hint((1.5, -1))) -> tangent
(east := arc(center: right) hint(r: 1)) -> tangent
horizontal line(hint((1.5, 1)), hint((-1.5, 1))) -> tangent
(west := arc(center: left) hint(r: 1)) -> tangent close
radius(1) east
radius(1) west
}
bar := solid(std.solids.Drafted(slot, from: -8mm, to: 0mm, draft: 3deg))
climb := frame
climb screws(6mm) std.z
groove := solid({ p | some t in (-90deg, 1350deg): p in bar at(under: climb) t })
groove cut part
anvilcad left no solid to show.
Time
1.2 ms; CPU time 970 µs; peak memory 3.4 MB
Notes
refused anvil-brep has no sweep of a solid and no helical curve: a body screwed along an axis sweeps envelopes of its surfaces under the screw, which it cannot make from its profile sweeps
//! A rod threaded by a drafted bar of slotted section.use anvil_brep::Solid;
pubfnbuild() -> Result<Solid, String> {
Err("anvil-brep has no sweep of a solid and no helical curve: a body screwed along an axis sweeps envelopes of its surfaces under the screw, which it cannot make from its profile sweeps".into())
}