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.
Sketching in FeatureScript - Coincident constraint between two vectors
nkone
Member Posts: 3 ✭
I'm currently learning how to sketch in FeatureScript. I want to know if there's a way to sketch with constraints before using skSolve. For example if I want to make a tangent arc with its two end points coincident to two end points of a pair of parallel lines. The arc has to be tangent with both lines. Is there an easy way for me to use the coincident constraint? (beside using the built-in tool). I know FeatureScript is not meant for sketching with constraints. I tried reading the documentation as well, but there is little there. Any work around would be appreciated.
This is what I got so far.
This is what I got so far.
0
Best Answer
-
MBartlett21 Member, OS Professional, Developers Posts: 2,039 ✭✭✭✭✭@nkone
What are you wanting to sketch?
You should be able to calculate the mid position for the arc to be tangent to the lines in the FeatureScript, rather than having to use constraints. If you really want to use constraints, you could look the the hem feature in the std library, as it uses sketch constraints a bit ( https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/1be7b53034b866b20141a528 ).5
Answers
What are you wanting to sketch?
You should be able to calculate the mid position for the arc to be tangent to the lines in the FeatureScript, rather than having to use constraints. If you really want to use constraints, you could look the the hem feature in the std library, as it uses sketch constraints a bit ( https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/1be7b53034b866b20141a528 ).
IR for AS/NZS 1100
Thanks for the reference. I'm currently looking through it. The goal is to recreate this:
https://cad.onshape.com/documents/22aecaf0636ae7ac26ba9bd9/w/1110322913c4b81fb4855023/e/818d81b7411599cc941201a5
I did the 2D sketch using the built-in tools. Now for the school project, I have to recreate it with FeatureScript.
I've looked through the link you showed me. However, I could not find any built in skConstraint in the link. The code is too complex for beginners like me. I've also managed to get the arc to work like you said. But without the coincident constraints, I cannot move multiple entities around. Say if I want the arc to be tangent to a diagonal line along with all the tangent lines with it. I just can't find the math to do it. The link has the all the details about my sketch.