-
Notifications
You must be signed in to change notification settings - Fork 315
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
[SofaCarving] Add an example written in python #3457
Conversation
This is to answer #3395 |
Co-authored-by: Frederick Roy <[email protected]>
|
||
#Function used only if this script is called from a python environment | ||
if __name__ == '__main__': | ||
main() |
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.
Instead of a global variable, please do something like
if __name__ == '__main__':
with_gui = False
if len(sys.args) == 2:
with_gui = sys.args[1] == "with-gui"
main(with_gui)
Would be even better to use argparser https://docs.python.org/3/library/argparse.html instead of manually processing the args.
Hi @epernod, since you changed the label from wip to 'to review', you need to trigger the build manually with [ci-build]. Also, I would rebase this branch since it is an old one. |
[ci-build][with-all-tests] |
FYI, |
root.addObject('BVHNarrowPhase') | ||
root.addObject('MinProximityIntersection', name="Proximity", alarmDistance=0.08, contactDistance=0.05, useSurfaceNormals=False) | ||
root.addObject('CollisionResponse', response="PenalityContactForceField") | ||
root.addObject('CarvingManager',active=True, carvingDistance=-0.01, narrowPhaseDetection="@narrowPhase", toolModel="@Instrument/CollisionModel/ParticleModel") |
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.
To be picky, I would simply expect a comment explaining what the CarvingManager does and its data (for you user standpoint)
Else 👍
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.
Done @hugtalbot , before the method and before adding the component.
I would say, on s'en balek |
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if