Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
new Featurescript: Statics Solver
joshtargo
Member Posts: 221 EDU
I needed to calculate the force on a cable for a robot, so I decided to do it the hard way, but writing a FS to do it.
Link: Statics Solver
Pick your force locations (where they touch the object, flip the direction as desired. Outputs curves that are named and scaled to the force magnitude..
Can only do up to 3 unknowns, due to math.
Need to add checks for planar, and also make it work for any plane, currently hard-coded for YZ
6
Comments
It gives live results as the sketch is changed with config variables
Cool! :0) Could be helpful in conceptual design.
If I can make this, they can easily incorporate it.
Lmk if you find some of the many deficiencies in my FS.
Slightly (a lot) off topic but might be of interest to you @joshtargo, I created a document to calculate the forces in a simple frame using a Funicular polygon.
It's just for the one frame, I don't know how it could be set up for a more general solution.
It also can't determine if the members are struts or ties. I've no idea on where one might start getting directional information, though some discussions on here about vectors make me think it might be possible.
https://cad.onshape.com/documents/30632144ce1febd02d23f53f/w/cedb008c7872131437eb95d8/e/758d3241e9b203083846ed97
Im not familiar with that method. Mine uses 3d force vectors and their moments to calculate the unknown forces and directions.
I've a video that goes through it if your interested, but, it's 40 mins of your life you'll never get back :)
I think doing this in FS allows us to calculate the unknowns mathematically, but I could write something that does this.
Updated Static Solver today to include multiple known forces, which the FS will combine into a single resultant force.
Static Solver FS link
This is very cool!
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I really wish we could just click peoples names on the forum and see all of the custom features that they have published.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Thanks! @MichaelPascoe I think so too, but nobody seems to care. this is an actual useful tool that I don't think exists yet. let me know if you have improvement ideas. I wish we could do code review so i learn how to do things more efficiently!
a few things are bugging me about the input ui.
1. using array in the definition does not automatically select the correct input box like it does using normal individual queries
2. when i ask for a force, I need both a location and direction, so I'm using implicit Mate connectors, but maybe there's a less confusing way. this is tricky because a force arrow might need to appear at either end of the chosen line, pointing either direction, and appear point first or tail first. this is essentially an ALLOWS_AXIS and two BOOLEANS (parameter 1 or 0) and extractDirection + or -
Regarding code review:
Everything I have learned about FS I'm putting into the CADSharp FeatureScript Video Tutorials. If you learn the content from those lessons, then you will pretty much know what I know about FS. More lessons are still coming out weekly.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I cleaned up the UI quite a bit today. I tried a linear manip, but decided to make it even more simple. And the focus thing worked well.