mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-02-21 08:02:24 +01:00
57 lines
1.5 KiB
Markdown
57 lines
1.5 KiB
Markdown
# bend
|
|
|
|
Bends a 3D object into an arc shape.
|
|
|
|
## Parameters
|
|
|
|
- `size` : The size of a cube which can contain the target object.
|
|
- `angle` : The central angle of the arc shape. The radius of the arc is calculated automatically.
|
|
- `frags` : Number of fragments. The target object will be cut into `frags` fragments and recombined into an arc shape. The default value is 24.
|
|
|
|
## Examples
|
|
|
|
The containing cube of the target object should be laid down on the x-y plane. For example.
|
|
|
|
include <bend.scad>;
|
|
|
|
x = 9.25;
|
|
y = 9.55;
|
|
z = 1;
|
|
|
|
%cube(size = [x, y, z]);
|
|
linear_extrude(z) text("A");
|
|
|
|

|
|
|
|
Once you have the size of the containing cube, you can use it as the `size` argument of the `bend` module.
|
|
|
|
include <bend.scad>;
|
|
|
|
x = 9.25;
|
|
y = 9.55;
|
|
z = 1;
|
|
|
|
*cube(size = [x, y, z]);
|
|
|
|
bend(size = [x, y, z], angle = 270)
|
|
linear_extrude(z) text("A");
|
|
|
|

|
|
|
|
The arc shape is smoother if the `frags` value is larger.
|
|
|
|
include <bend.scad>;
|
|
|
|
x = 9.25;
|
|
y = 9.55;
|
|
z = 1;
|
|
|
|
bend(size = [x, y, z], angle = 270, frags = 360)
|
|
linear_extrude(z)
|
|
text("A");
|
|
|
|

|
|
|
|
This module is especially useful when you want to create things such as [zentangle bracelet](https://www.thingiverse.com/thing:1569263).
|
|
|
|
[](https://www.thingiverse.com/thing:1569263) |