Created by: asahidari
Addressed problem description
This PR enable us to simulate wide range of rigid origami fold. Previously, I added #3375 for only one type of folding, but this PR can offer various type of origami folding. Also, this is related to #1381 (closed) 'WISHLIST' of origami fold.
Solution description
I added a script node to SNLite_templates/utils directory to avoid any influence or changes to other modules. Inputs and outputs of this script node are following. I see this link as a reference: https://www.grasshopper3d.com/forum/topics/new-origami-example?groupUrl=kangaroo&groupId=2985220%3AGroup%3A120977&id=2985220%3ATopic%3A973616&page=3
- [in] obj_in (object)
- [in] valleys (edge list)
- [in] valley angle (scalar value)
- [in] mountains (edge list)
- [in] mountain angle (scalar value)
- [in] folding (scalar value, ratio of folding)
- [in] step (scalar value to use as delta angle in integral calculation )
- [in] fixed_face (index of a mesh polygon. Face rotation begin at this face)
- [out] verts (moved vertices)
- [out] edges (edges)
- [out] faces (faces)
Next is an example of the node tree.
In this script, these classes are included.
- ObjectParams (Object wrapper)
- CreaseLines (Manager of crease lines)
- InsideVertex (Instance of each vertices inside of the target paper)
- FoldAngleCalculator (Calculator of each edge's fold angles)
- FaceRotation (Handler to operate face rotation)
Limitation:
- Some types of folding may not be done, which need some extra strength. For example, https://www.youtube.com/watch?v=IP7WbV_yLgQ or https://www.foldfactory.com/offering/twist .
- It may be difficult to find where error occurred. For example, when using wrong edge list or opposite valleys/mountains.
- It's not always right shape because this calculation include differentiation and integration, but these are semi-pseudo implementation using only NumPy library.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. - [] Code documentation complete.
-
Documentation for users complete (or not required, if user never sees these changes). - [x ] Manual testing done.
-
Unit-tests implemented. -
Ready for merge.