clean docs
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 18 KiB |
@@ -1,42 +0,0 @@
|
|||||||
# polytransversals
|
|
||||||
|
|
||||||
Crosscutting a polyline at different points gets several transversals. This module can operate reversely. It uses transversals to construct a polyline. For example, imagine that you have the following transversals:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
This module can use them to construct the polyline:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
When using this module, you should use points to represent each transversal.
|
|
||||||
|
|
||||||
You can view it as a better polyline2d module. If you have only the points of a path, using `polyline2d` or `hull_polyline2d` is a simple solution. If you know the transversals along a path, you can use `polytransversals` to get a better polyline.
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
- `transversals` : A list of transversals. Each transversal is represented by a list of points. See the example below.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
use <rotate_p.scad>;
|
|
||||||
use <polytransversals.scad>;
|
|
||||||
use <hull_polyline2d.scad>;
|
|
||||||
|
|
||||||
r = 35;
|
|
||||||
tran_pts = [[-5, 0], [0, 5], [5, 0]];
|
|
||||||
|
|
||||||
trans = [
|
|
||||||
for(a = [0:10:120])
|
|
||||||
[
|
|
||||||
for(p = tran_pts)
|
|
||||||
rotate_p(p, [0, 0, a]) + [r * cos(a), r * sin(a)]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
polytransversals(trans);
|
|
||||||
|
|
||||||
#for(tran = trans) {
|
|
||||||
hull_polyline2d(tran, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||

|
|
@@ -1,65 +0,0 @@
|
|||||||
# shape_glued2circles
|
|
||||||
|
|
||||||
Returns shape points of two glued circles. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
- `radius` : The radius of two circles.
|
|
||||||
- `centre_dist` : The distance between centres of two circles.
|
|
||||||
- `tangent_angle` : The angle of a tangent line. It defaults to 30 degrees. See examples below.
|
|
||||||
- `t_step` : It defaults to 0.1. See [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_curve.html) for details.
|
|
||||||
- `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
use <shape_glued2circles.scad>;
|
|
||||||
|
|
||||||
$fn = 36;
|
|
||||||
|
|
||||||
radius = 10;
|
|
||||||
centre_dist = 30;
|
|
||||||
|
|
||||||
shape_pts = shape_glued2circles(radius, centre_dist);
|
|
||||||
polygon(shape_pts);
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
use <shape_glued2circles.scad>;
|
|
||||||
|
|
||||||
$fn = 36;
|
|
||||||
|
|
||||||
radius = 10;
|
|
||||||
centre_dist = 30;
|
|
||||||
|
|
||||||
shape_pts = shape_glued2circles(radius, centre_dist);
|
|
||||||
width = centre_dist / 2 + radius;
|
|
||||||
|
|
||||||
rotate_extrude() difference() {
|
|
||||||
polygon(shape_pts);
|
|
||||||
|
|
||||||
translate([-width, -radius])
|
|
||||||
square([width, radius * 2]);
|
|
||||||
}
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
use <shape_glued2circles.scad>;
|
|
||||||
|
|
||||||
$fn = 36;
|
|
||||||
|
|
||||||
radius = 10;
|
|
||||||
centre_dist = 30;
|
|
||||||
|
|
||||||
shape_pts = shape_glued2circles(radius, centre_dist);
|
|
||||||
|
|
||||||
width = centre_dist + radius * 2;
|
|
||||||
|
|
||||||
rotate_extrude()
|
|
||||||
intersection() {
|
|
||||||
rotate(-90) polygon(shape_pts);
|
|
||||||
|
|
||||||
translate([radius / 2, 0])
|
|
||||||
square([radius, width], center = true);
|
|
||||||
}
|
|
||||||
|
|
||||||

|
|