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.
Dividing an edge in featurescript
stefan_nilsson
Member Posts: 13 ✭✭
I want to place a specified number of sketch points on even intervals along an edge in featurescript. I have done the slot tutorial but i need more understanding on these subjects:
Determining the length of an edge in featurescript
placing an sketchpoint on the edge in featurescript.
It would be great i i was able to extend this beyond lines to arcs and splines
Tagged:
0
Answers
Hi @stefan_nilsson.
Is there a particular reason you want sketch points? This could also be done with opPoint(). Regardless, here is a workflow that could still be applied:
const pointLocationsArray = [0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1]; const lines = evEdgeTangentLines(context, { "edge" : definition.edge, "parameters" : pointLocationsArray }); for (var i = 0; i < size(lines); i += 1) { opPoint(context, id + i + "point1", { "point" : lines[i].origin }); }https://cad.onshape.com/documents/cd8ab450b2d559505a8ab7ca/w/7ee16799b54ab47bdbdf00f4/e/2d1b397c1048565b558bde16?renderMode=0&leftPanel=false&uiState=640f0f268382c54ad0a246f0
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com