Conversation
| # assert self.packing_mode in [ | ||
| # "random", | ||
| # "close", | ||
| # "closePartner", | ||
| # "randomPartner", | ||
| # "gradient", | ||
| # "hexatile", | ||
| # "squaretile", | ||
| # "triangletile", | ||
| # ] |
There was a problem hiding this comment.
something weird is going on with packing_mode. I would love some help on this if possible. i added a migrate script to make sure it's defined, and still hit this error
There was a problem hiding this comment.
I ran the packing and the result looked good! What error are you seeing, or is there a way I can reproduce it?
There was a problem hiding this comment.
if you uncomment these lines
There was a problem hiding this comment.
The example packing code ran for me after uncommenting these lines. Could you let me know the error message/repro steps?
mogres
left a comment
There was a problem hiding this comment.
I was able to pack and run the recipe in the original form! This format will be useful for mesh file free packing for cellpack analysis.
I would recomment applying the suggestions by Ruge before merging as they fixed the assertion bug and also allowed the grid to load from a saved file.
|
|
||
| def handle_positions(input_positions): | ||
| positions = [] | ||
| if isinstance(input_positions, list) and isinstance(input_positions[0], int): |
There was a problem hiding this comment.
Do the input_positions have to be int? We might want to add a check for isinstance(input_positions[0], (int, float))
| def handle_radii(input_radii): | ||
| radii = [] | ||
| # is just a list of radii | ||
| if isinstance(input_radii, list) and isinstance(input_radii[0], int): |
There was a problem hiding this comment.
Same check for floats here?
| normals = data["normals"] | ||
|
|
||
| return { | ||
| "name": "direct_mesh" + datetime.datetime.now().strftime("%Y%m%d%H%M%S"), |
There was a problem hiding this comment.
Can we pass in the ingredient name as an argument to have that included in the mesh file name?
| @@ -0,0 +1 @@ | |||
| test file No newline at end of file | |||
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
| @@ -0,0 +1,17 @@ | |||
| import copy | |||
|
|
|||
| from ..interface_objects.gradient_data import GradientData, ModeOptions | |||
There was a problem hiding this comment.
This is not used, could be removed?
| from ..interface_objects.gradient_data import GradientData, ModeOptions |
| # assert self.packing_mode in [ | ||
| # "random", | ||
| # "close", | ||
| # "closePartner", | ||
| # "randomPartner", | ||
| # "gradient", | ||
| # "hexatile", | ||
| # "squaretile", | ||
| # "triangletile", | ||
| # ] |
There was a problem hiding this comment.
The example packing code ran for me after uncommenting these lines. Could you let me know the error message/repro steps?



Problem
This converts a recipe ludo gave me, the format is slightly different than other v1 recipes; the sphere trees and meshes are inline
Solution
added utils to unpack the data and convert it
Type of change
Please delete options that are not relevant.
Steps to Verify:
1. pack -r 'examples/recipes/v1/example-ludo-recipe.json'