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.
Feature Script way to generate a curve pattern with linear instance spacing?
imants_smidchens
Member Posts: 63 EDU
Hi! I'm working on a chain generator feature script, (also belt) which takes sprocket location inputs, the chain pitch, and teeth at each sprocket, (plus the chain wrap orientation) and generates an accurate model of a chain/belt. (https://cad.onshape.com/documents/1be886df2e36b431c92b2d61/w/791200d47653055fd5d51eb7/e/17a1b8e5fd0b4440efc1c3de?configuration=pitch%3D0.008%2Bmeter%3Bteeth%3D10.0)
I am struggling to space the chain link instances evenly in such a way that the linear distance remains constant, not the distance along a curve path (i.e. not the curve pattern)
Any suggestions on how to achieve this? i essentially need to segment a curve into a bunch of linear approximations.
Thanks in advance!
-Imants Smidchens
(some screenshots of work in progress)
I am struggling to space the chain link instances evenly in such a way that the linear distance remains constant, not the distance along a curve path (i.e. not the curve pattern)
Any suggestions on how to achieve this? i essentially need to segment a curve into a bunch of linear approximations.
Thanks in advance!
-Imants Smidchens
(some screenshots of work in progress)
Tagged:
0
Best Answer
-
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭You don't need the fs itself, the feature studio just contains chordSolver() function which you could use for searching chord end point path parameter. But if the method with arc intersection is OK for your purposes then you probably don't need it. Though if you were trying to distribute N points along path with even arc lengths you would unevitably face the need to numerically solve the system of N equations.
0
Answers
For the time being I'm using a bunch of arcs and evdistance to find the intersections. Next up on my plate is creating accurate sag to account for differences in length between the path and the replicated instances (the last point is always too close to the start)