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.
query point coordinate
pierre_gr
Member Posts: 12 ✭✭
Hi,
I have a feature script which creates 2 line and place a point of the intersection, like
It works fine but how do I query the new location of the point A, after the constraint are applied, and continue my sketch after that ?
Thank you,
I have a feature script which creates 2 line and place a point of the intersection, like
skPoint(gearSketch, "A", { "position" : center + vector(1, 0) * (pitchCircleRadius + addendum) }); skConstraint(gearSketch, "A_coincident1", { "constraintType" : ConstraintType.COINCIDENT, "localFirst" : "A", "localSecond" : "axis" }); skConstraint(gearSketch, "A_coincident2", { "constraintType" : ConstraintType.COINCIDENT, "localFirst" : "A", "localSecond" : "pitchCircle" });
It works fine but how do I query the new location of the point A, after the constraint are applied, and continue my sketch after that ?
Thank you,
Tagged:
0
Comments
When writing custom feature it is better to work out your sketch geometry instead of using constraints. Are you looking for an intersection point of circle and line?
From your answer, does it means I case do an skSolve and project the point onto a new plane/sketch ?
if so, how can I evaluate the coordinate of a point from it's pointId ?
Doc: http://www.gearseds.com/files/Approx_method_draw_involute_tooth_rev2.pdf
const pointQ = sketchEntityQuery(sketchId, EntityType.VERTEX, "A") query to identify it, and evVertexPoint(context, {'vertex' : pointQ}) to get its xyz location.
A warning, though, unless you eliminate more degrees of freedom with additional constraints, you don't know which geometry will change when sketch is solved.
It can be marked as solved.