1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-01 02:33:00 +02:00

updated polysections

This commit is contained in:
Justin Lin
2017-05-10 16:27:35 +08:00
parent 81b0b6dd6b
commit 2f13a9f2bd
2 changed files with 7 additions and 24 deletions

View File

@@ -14,26 +14,14 @@ You can also view it as a better polyline3d module if you want. If you have only
When using this module, you should use points to represent each cross-section.
You need to provide indexes of triangles, too. This module provides three prepared triangles indexes. One is `"RADIAL"`. For example, if you have a cross-section such as:
![polysections](images/lib-polysections-3.JPG)
When using `"RADIAL"` (default), the module will cut them into triangles from the first point to each remaining point:
![polysections](images/lib-polysections-4.JPG)
If your cross-sections are hollow, you may use `"HOLLOW"`. For example:
If your 2D shape is not solid, indexes of triangles are required. This module has a built-in index vector suitable for one type of hollow shapes. For example, if you have a cross-section such as:
![polysections](images/lib-polysections-5.JPG)
When using `"HOLLOW"`, the above shape will be cut into triangles such as:
When `triangles` is `"HOLLOW"`, the above shape will be cut into triangles such as:
![polysections](images/lib-polysections-6.JPG)
When using `"TAPE"`, a tape shape will be cut into triangles such as:
![polysections](images/lib-polysections-10.JPG)
You can cut triangles by yourself, for example, the indexes of the above triangles is:
[
@@ -50,7 +38,7 @@ Triangles may be defined in any order.
## Parameters
- `sections` : A list of cross-sections. Each cross-section is represented by a list of points. See the example below.
- `triangles` : `"RADIAL"` (default), `"HOLLOW"`, `"TAPE"` or user-defined indexes. See example below.
- `triangles` : `"SOLID"` (default), `"HOLLOW"`, or user-defined indexes. See example below.
## Examples