mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-24 23:25:51 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib-m_cumulate-1.JPG
Normal file
BIN
docs/images/lib-m_cumulate-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
30
docs/lib-m_cumulate.md
Normal file
30
docs/lib-m_cumulate.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# m_cumulate
|
||||||
|
|
||||||
|
The power of using transformation matrice is that you can cumulate all transformations in a matrix. This function multipies all transformation matrice.
|
||||||
|
|
||||||
|
**Since:** 1.1
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
- `matrice` : A list of 4x4 transformation matrice.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
include <m_rotation.scad>;
|
||||||
|
include <m_scaling.scad>;
|
||||||
|
include <m_translation.scad>;
|
||||||
|
include <m_cumulate.scad>
|
||||||
|
|
||||||
|
m = m_cumulate([
|
||||||
|
m_translation([10, 20, 10]), m_scaling(2), m_rotation(60)]
|
||||||
|
);
|
||||||
|
|
||||||
|
multmatrix(m)
|
||||||
|
cube(1);
|
||||||
|
|
||||||
|
multmatrix(m)
|
||||||
|
sphere(1);
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
@@ -1,3 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* m_cumulate.scad
|
||||||
|
*
|
||||||
|
* @copyright Justin Lin, 2019
|
||||||
|
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||||
|
*
|
||||||
|
* @see https://openhome.cc/eGossip/OpenSCAD/lib-m_cumulate.html
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
include <__private__/__m_multiply.scad>;
|
include <__private__/__m_multiply.scad>;
|
||||||
|
|
||||||
function _m_cumulate(matrice, i) =
|
function _m_cumulate(matrice, i) =
|
||||||
|
Reference in New Issue
Block a user