-
Notifications
You must be signed in to change notification settings - Fork 3
Fix/v1 ludo #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix/v1 ludo #338
Conversation
| # assert self.packing_mode in [ | ||
| # "random", | ||
| # "close", | ||
| # "closePartner", | ||
| # "randomPartner", | ||
| # "gradient", | ||
| # "hexatile", | ||
| # "squaretile", | ||
| # "triangletile", | ||
| # ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you uncomment these lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'