Skip to content

Added code snippets to Muscle Modeling tutorial to enable testing #47

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JacobAdamsen
Copy link
Contributor

Adding code snippets and the AnyBody models to Muscle Modeling tutorial, to enable testing of the models.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @JacobAdamsen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request adds code snippets and AnyBody models to the Muscle Modeling tutorial, enabling testing of the models. The changes include adding code snippets to various lessons, modifying AnyScript files, and updating the tutorial's index file.

Highlights

  • Code Snippets: Adds code snippets to various lessons in the Muscle Modeling tutorial, allowing users to test the models.
  • AnyScript Models: Includes AnyBody models to the Muscle Modeling tutorial, providing practical examples and test cases.
  • Tutorial Updates: Modifies AnyScript files and updates the tutorial's index file to incorporate the new code snippets and models.

Changelog

Click here to see the changelog
  • A_Getting_started_anyscript/index.md
    • Added an anchor link for 'How to write AnyScript'.
  • Muscle_modeling/Downloads/MuscleDemo.4.any
    • Corrected a typo in a comment.
    • Changed Reaction.Type from {0} to {Off}.
    • Commented out RGB definition in AnyDrawMuscle and changed Bulging from 1 to 2.
  • Muscle_modeling/Downloads/MuscleDemo.5.any
    • Changed Bulging from 4 to 2 in AnyDrawMuscle.
  • Muscle_modeling/Snippets/lesson1/snip.Muscles.main-1.any
    • Added a code snippet for a simple muscle modeling demonstration.
  • Muscle_modeling/Snippets/lesson1/snip.Muscles.main-2.any
    • Added a code snippet demonstrating AnyMuscleModel insertion.
  • Muscle_modeling/Snippets/lesson1/snip.Muscles.main-3.any
    • Added code snippets for AnyMuscleModel and AnyViaPointMuscle definitions.
  • Muscle_modeling/Snippets/lesson1/snip.Muscles.main-4.any
    • Added code snippets for defining origin and insertion points, and a muscle via point.
  • Muscle_modeling/Snippets/lesson1/snip.Muscles.main-5.any
    • Added a code snippet for AnyMuscleViaPoint with origin, insertion, and drawing properties.
  • Muscle_modeling/Snippets/lesson2/snip.Muscles.main-1.any
    • Added a code snippet for AnyDrawMuscle object insertion.
  • Muscle_modeling/Snippets/lesson2/snip.Muscles.main-2.any
    • Added code snippets for joint driver and bulging muscle visualization.
  • Muscle_modeling/Snippets/lesson2/snip.Muscles.main-3.any
    • Added code snippets for RGB color customization of muscles.
  • Muscle_modeling/Snippets/lesson3/snip.Muscles.main-1.any
    • Added code snippets for bulging and insertion point modifications.
  • Muscle_modeling/Snippets/lesson3/snip.Muscles.main-2.any
    • Added code snippets for via point introduction.
  • Muscle_modeling/Snippets/lesson4/snip.Muscles.main-1.any
    • Added code snippets for cylinder center definition.
  • Muscle_modeling/Snippets/lesson4/snip.Muscles.main-2.any
    • Added code snippets for cylinder surface wrapping.
  • Muscle_modeling/Snippets/lesson4/snip.Muscles.main-3.any
    • Added code snippets for cylinder rotation and multiple muscle definitions.
  • Muscle_modeling/Snippets/lesson4/snip.Muscles.main-4.any
    • Added code snippets for shortest path muscle definitions and initial wrap position vectors.
  • Muscle_modeling/Snippets/lesson5/snip.Muscles.main-1.any
    • Added code snippets for AnyMuscleModel2ELin definition.
  • Muscle_modeling/Snippets/lesson5/snip.Muscles.main-2.any
    • Added code snippets for AnyMuscleModel2ELin parameter assignment and muscle model assignment.
  • Muscle_modeling/lesson1.md
    • Replaced inline code with literal include for the first lesson's code snippet.
    • Added a notice about missing muscles.
    • Replaced inline code with literal include for AnyMuscleModel insertion.
    • Replaced inline code with literal include for SimpleModel modifications.
    • Replaced inline code with literal include for AnyViaPointMuscle insertion.
    • Replaced inline code with literal include for origin and insertion points.
    • Replaced inline code with literal include for AnyMuscleViaPoint definition.
    • Updated the description of muscle force plotting.
  • Muscle_modeling/lesson2.md
    • Replaced inline code with literal include for AnyDrawMuscle object insertion.
    • Replaced inline code with literal include for bulging muscle visualization.
    • Replaced inline code with literal include for joint driver modification.
    • Replaced inline code with literal include for RGB color customization of muscles.
  • Muscle_modeling/lesson3.md
    • Replaced inline code with literal include for bulging modification.
    • Replaced inline code with literal include for insertion point modification.
    • Replaced inline code with literal include for via point introduction.
    • Replaced inline code with literal include for via point muscle definition.
  • Muscle_modeling/lesson4.md
    • Replaced inline code with literal include for cylinder center definition.
    • Replaced inline code with literal include for cylinder surface wrapping.
    • Replaced inline code with literal include for cylinder rotation.
    • Replaced inline code with literal include for multiple muscle definitions.
    • Replaced inline code with literal include for shortest path muscle definition.
    • Replaced inline code with initial wrap position vectors.
  • Muscle_modeling/lesson5.md
    • Replaced inline code with literal include for AnyMuscleModel2ELin definition.
    • Replaced inline code with AnyMuscleModel2ELin parameter assignment and muscle model assignment.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


AnyScript's embrace,
Muscles modeled with care,
Motion comes alive.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request adds code snippets to the Muscle Modeling tutorial to enable testing of the models. The changes involve adding new code snippets and modifying existing AnyBody model files. Overall, the changes seem well-organized and contribute to the tutorial's completeness. However, some areas could benefit from minor adjustments to improve clarity and consistency.

Merge Readiness

The pull request is in good shape to be merged, but the identified medium severity issues should be addressed first to ensure code quality and clarity. After addressing these points, the pull request would be ready for merging, though I am unable to directly approve it and recommend that others review and approve this code before merging.

@@ -57,10 +57,10 @@ AnySeg Arm = {
AnyRefFrame &Ins = .Arm.M1Insertion;
AnyDrawMuscle drw =
{
RGB = {1, 0, 0};
//RGB = {1, 0, 0};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It might be helpful to uncomment this line to visualize the muscle in the model view. This can aid in debugging and understanding the model's behavior. What is the rationale for commenting it out?

        RGB = {1, 0, 0};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant