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.
Custom Feature: Clone Curve to Points
Allows you to move or copy a 3D curve to a new location by defining the new endpoints.
New curve retains the essential "Character" of the original curve but is stretched parallel to new Chord to reach target points. (Chord is a line between curve endpoints)
User can also scale new curve normal to new Chord, and rotate new curve around new Chord.
Let me know if you find bugs or want to help make improvements, I am not very skilled in writing scripts, I had a lot of help from GPT and searching for existing code.
Link: Clone Curve to Points
Comments
You should enable "link" permissions so that other users can add the feature to their toolbar.
Custom FeatureScript and Onshape Integrated Applications
Fixed, I think. Still working on improvements for next version.
Definitely want to try this out.
You might want to look at the "official" publishing recommendations for custom features.
https://forum.onshape.com/discussion/22767/please-publish-your-high-quality-custom-features
Improvements to Onshape - November 28th, 2023 — Onshape
Nice work Josh! Keep it up 😎
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
I'm going to be having nightmares about coordinate system transformations for weeks!
Working on the next version, I cleaned up the code a lot, and now have it so that you can pick a curve and it will scale until it touches that curve. still lots of bugs and edge cases, but the core is working.
https://cad.onshape.com/documents/557b17f88f38ef73de260113/w/847f2ad071cb0e78bd856b1e/e/bee2d1e7d3c20968dc61c493
I'm starting to use this. It's interesting that "mutating" a sketch seems to result in another sketch, rather than a curve.
Latest update (V4) broke things for me, so I reverted.
What are the changes? Any clues why it broke?
Ill take a look, it's a work in progress
working better now. I only intended it for 3d curves, like a CP curve. never tried it on sketches. I need to start adding checks and filters to make sure only valid things are selected. you can choose a point or curve as the target (but I also need to add checks to make sure target is valid). keep playing!
It seems like there's value in this working on curves, sketches, and edges. It would be consistent with other tools if it would always produce a curve. It might be interesting if it also had an option to "keep points" like CP curve and some other features.
I can look into keeping points.
For generic edges, you mean to select the edge of a solid or surface and move it somewhere?
What would you want it to do if you select a sketch?
I think that might be useful for other types of modifications (until we get a real 3D sketcher).
Yes.
Make a curve. In V3 it turns a sketch into a sketch, which might be good for some people, but you can't edit it, so the usual thing seems to be to make a curve.
Ill try. Everything is a struggle.
I'm trying, but I have no idea how to turn an edge into a curve. I tried to use the code from Composite Curve, but it didn't work. It is cool that you can Mutate a sketch curve, and the sketch still controls the copy. That seems useful.