1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-23 23:03:23 +02:00
This commit is contained in:
Justin Lin
2019-05-03 09:18:03 +08:00
parent 4fe79dc568
commit 57ed5a8901
3 changed files with 40 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

30
docs/lib-m_cumulate.md Normal file
View 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);
![m_cumulate](images/lib-m_cumulate-1.JPG)

View File

@@ -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>;
function _m_cumulate(matrice, i) =