mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-12-07 11:22:07 +00:00
Add ring hook
This commit is contained in:
parent
4d097abcd8
commit
0005b778b5
5 changed files with 17 additions and 10 deletions
|
|
@ -23,9 +23,8 @@ PrioritizeFiles:
|
|||
attachments.scad
|
||||
shapes2d.scad
|
||||
shapes3d.scad
|
||||
masks.scad
|
||||
drawing.scad
|
||||
masks2d.scad
|
||||
masks3d.scad
|
||||
distributors.scad
|
||||
color.scad
|
||||
partitions.scad
|
||||
|
|
@ -70,6 +69,7 @@ PrioritizeFiles:
|
|||
tripod_mounts.scad
|
||||
walls.scad
|
||||
wiring.scad
|
||||
hooks.scad
|
||||
DefineHeader(BulletList): Side Effects
|
||||
DefineHeader(Table;Headers=Anchor Name|Position): Named Anchors
|
||||
DefineHeader(Table;Headers=Anchor Type|What it is): Anchor Types
|
||||
|
|
|
|||
|
|
@ -280,9 +280,9 @@ function mask2d_roundover(r, inset=0, mask_angle=90, excess=0.01, clip_angle, fl
|
|||
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
||||
// Example(2D): Mask defined by cut
|
||||
// mask2d_smooth(cut=3);
|
||||
// Example(2D): Mask defined by symmetric joint length
|
||||
// mask2d_smooth(joint=10);
|
||||
// Example(2D): Asymmetric mask by joint length with different lengths and a larger excess
|
||||
// Example(2D): Mask defined by symmetric joint length with larger excess (which helps show the ends of the mask)
|
||||
// mask2d_smooth(joint=10,excess=0.5);
|
||||
// Example(2D): Asymmetric mask by joint length with different lengths
|
||||
// mask2d_smooth(joint=[10,7],excess=0.5);
|
||||
// Example(2D): Acute angle mask by cut
|
||||
// mask2d_smooth(mask_angle=66,cut=3,excess=0.5);
|
||||
|
|
|
|||
14
regions.scad
14
regions.scad
|
|
@ -858,8 +858,10 @@ function _point_dist(path,pathseg_unit,pathseg_len,pt) =
|
|||
// The erroneous removal of segments is more common when your input
|
||||
// contains very small segments and in this case can result in an invalid situation where the remaining
|
||||
// valid segments are parallel and cannot be connected to form an offset curve. If this happens, you
|
||||
// get an error message to this effect. The only solutions are either to remove the small segments with {{deduplicate()}},
|
||||
// or if your path permits it, to set check_valid to false.
|
||||
// get an error message to this effect. The only solutions are either to remove small segments with {{resample_path()}} or
|
||||
// generate your data with fewer points (e.g. by using a smaller `$fn` or larger `$fa` and `$fs` when constructing your input).
|
||||
// Be aware that chamfer and rounding increase the length of the path, so iterated offsets can lead to exponential
|
||||
// growth in the path length.
|
||||
// .
|
||||
// Another situation that can arise with validity testing is that the test is not sufficiently thorough and some
|
||||
// segments persist that should be eliminated. In this case, increase `quality` from its default of 1 to a value of 2 or 3.
|
||||
|
|
@ -869,7 +871,7 @@ function _point_dist(path,pathseg_unit,pathseg_len,pt) =
|
|||
// .
|
||||
// When invalid segments are eliminated, the path length decreases, and multiple points on the input path map to the same point
|
||||
// on the offset path. If you use chamfering or rounding, then
|
||||
// the chamfers and roundings can increase the length of the output path. Hence points in the output may be
|
||||
// the chamfers and roundings increase the length of the output path. Hence points in the output may be
|
||||
// difficult to associate with the input. If you want to maintain alignment between the points you
|
||||
// can use the `same_length` option. This option requires that you use `delta=` with `chamfer=false` to ensure
|
||||
// that no points are added. with `same_length`, when points collapse to a single point in the offset, the output includes
|
||||
|
|
@ -1067,7 +1069,11 @@ function offset(
|
|||
cornercheck = [for(i=idx(goodsegs)) (!closed && (i==0 || i==len(goodsegs)-1))
|
||||
|| is_def(sharpcorners[i])
|
||||
|| approx(unit(deltas(select(goodsegs,i-1))[0]) * unit(deltas(goodsegs[i])[0]),-1)],
|
||||
dummyA = assert(len(sharpcorners)==2 || all(cornercheck),"\nTwo consecutive valid offset segments are parallel but do not meet at their ends, maybe because path contains very short segments that were mistakenly flagged as invalid; unable to compute offset. If you get this error from offset_sweep() try setting ofset=\"delta\"."),
|
||||
dummyA = assert(len(sharpcorners)==2 || all(cornercheck),
|
||||
str("\nUnable to compute offset due to segments that are very close to parallel but not exactly parallel. \n",
|
||||
"This is usually caused by too many points or points that are too close together. \n",
|
||||
"Use fewer points (lower $fn, larger $fa/$fs) or use resample_path(). \n",
|
||||
"If you get this error from offset_sweep() using offset=\"delta\" may help")),
|
||||
reversecheck =
|
||||
!same_length
|
||||
|| !(is_def(delta) && !chamfer) // Reversals only a problem in delta mode without chamfers
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ function _rounding_offsets(edgespec,z_dir=1) =
|
|||
// Synopsis: Create a smoothed path passing through all the points of a given path, or passing through all the segment midpoint tangents.
|
||||
// SynTags: Path
|
||||
// Topics: Rounding, Paths
|
||||
// See Also: round_corners(), smooth_path(), path_join(), offset_stroke()
|
||||
// See Also: round_corners(), smooth_path(), path_join(), offset_stroke(), squircle()
|
||||
// Usage: "edges" method
|
||||
// smoothed = smooth_path(path, [tangents], [size=|relsize=], [method="edges"], [splinesteps=], [closed=], [uniform=]);
|
||||
// Usage: "corners" method
|
||||
|
|
|
|||
|
|
@ -1827,6 +1827,7 @@ function rect_tube(
|
|||
// wedge([40, 80, 30], center=true)
|
||||
// show_anchors(std=false);
|
||||
// Example(3D): Rounding the top of the wedge using the "top_edge" anchor
|
||||
// $fn=32;
|
||||
// diff()
|
||||
// wedge([10,15,7])
|
||||
// attach("top_edge", FWD+LEFT, inside=true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue