-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ADD: colorize cloud component * FIX: PR reviews fixes here and there, ready for merge --------- Co-authored-by: Andrea Settimi <[email protected]>
- Loading branch information
1 parent
3629571
commit 39c98dc
Showing
7 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
Submodule eigen
updated
from 84282c to 2d4c9b
Submodule pybind11
updated
22 files
+1 −1 | .github/workflows/emscripten.yaml | |
+5 −2 | .github/workflows/pip.yml | |
+1 −0 | CMakeLists.txt | |
+55 −0 | docs/changelog.rst | |
+77 −0 | include/pybind11/detail/cpp_conduit.h | |
+11 −11 | include/pybind11/detail/exception_translation.h | |
+25 −5 | include/pybind11/detail/internals.h | |
+40 −0 | include/pybind11/detail/type_caster_base.h | |
+27 −11 | include/pybind11/pybind11.h | |
+3 −0 | tests/CMakeLists.txt | |
+10 −0 | tests/custom_exceptions.py | |
+103 −0 | tests/exo_planet_c_api.cpp | |
+19 −0 | tests/exo_planet_pybind11.cpp | |
+1 −0 | tests/extra_python_package/test_files.py | |
+13 −0 | tests/home_planet_very_lonely_traveler.cpp | |
+22 −0 | tests/test_cpp_conduit.cpp | |
+162 −0 | tests/test_cpp_conduit.py | |
+47 −0 | tests/test_cpp_conduit_traveler_bindings.h | |
+25 −0 | tests/test_cpp_conduit_traveler_types.h | |
+39 −0 | tests/test_exceptions.cpp | |
+5 −0 | tests/test_exceptions.py | |
+0 −4 | tools/pybind11NewTools.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. image:: ../src/gh/components/DF_colorize_cloud/icon.png | ||
:align: left | ||
:width: 40px | ||
|
||
``DFColorizeCloud`` component | ||
================================= | ||
|
||
.. ghcomponent_to_rst:: ../src/gh/components/DF_colorize_cloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! python3 | ||
|
||
import System | ||
|
||
import Rhino | ||
from ghpythonlib.componentbase import executingcomponent as component | ||
|
||
import numpy as np | ||
|
||
class DFColorizeCloud(component): | ||
def RunScript(self, i_clouds: System.Collections.Generic.List[Rhino.Geometry.PointCloud]): | ||
for cloud in i_clouds: | ||
random_color = System.Drawing.Color.FromArgb( | ||
np.random.randint(0, 255), | ||
np.random.randint(0, 255), | ||
np.random.randint(0, 255)) | ||
for j in range(cloud.Count): | ||
cloud[j].Color = random_color | ||
return i_clouds |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "DFColorizeCloud", | ||
"nickname": "DFColorizeCloud", | ||
"category": "diffCheck", | ||
"subcategory": "Cloud", | ||
"description": "Colorizes randomly a list of point clouds.", | ||
"exposure": 4, | ||
"instanceGuid": "c18ff8d2-6c5a-431d-a0b7-c44e2d7a690a", | ||
"ghpython": { | ||
"hideOutput": true, | ||
"hideInput": true, | ||
"isAdvancedMode": true, | ||
"marshalOutGuids": true, | ||
"iconDisplay": 2, | ||
"inputParameters": [ | ||
{ | ||
"name": "i_clouds", | ||
"nickname": "i_clouds", | ||
"description": "The pointclouds to be colorized.", | ||
"optional": true, | ||
"allowTreeAccess": true, | ||
"showTypeHints": true, | ||
"scriptParamAccess": "list", | ||
"wireDisplay": "default", | ||
"sourceCount": 0, | ||
"typeHintID": "pointcloud" | ||
} | ||
], | ||
"outputParameters": [ | ||
{ | ||
"name": "o_clouds", | ||
"nickname": "o_clouds", | ||
"description": "The point clouds now colorized.", | ||
"optional": false, | ||
"sourceCount": 0, | ||
"graft": false | ||
} | ||
] | ||
} | ||
} |