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.
How to set construction line angle?
oleg_bovykin
Posts: 1 ✭
Hi! Ive been playing with featurescript and got a problem.
I want to draw a construction line with angle from parameters. But I can't find any definition of dimension for it.
Or should I calculate end point via the angle? That feels like very inconvenient way.
I want to draw a construction line with angle from parameters. But I can't find any definition of dimension for it.
Or should I calculate end point via the angle? That feels like very inconvenient way.
0
Comments
-
While you could do this with angle dimensions (using skConstraint with ConstraintType.ANGLE), I expect calculating the endpoint with sin/cos or will actually be much more convenient -- with the constraint, there's an ambiguity of which of two supplementary angles you mean.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
Hi,
There is little to no doc about skConstraint.
Is that code supposed to work ?<div>skLineSegment(gearSketch, "axis", {"start" : center, "end" : center + vector(0, 1) }); </div><div>skLineSegment(gearSketch, "axisAngled", {"start" : center, "end" : center + vector(1, 0) }); </div><div>skConstraint(gearSketch, "fix1", { "constraintType" : ConstraintType.FIX, "localFirst" : "axis" }); </div><div>skConstraint(gearSketch, "constraint1", {"constraintType" : ConstraintType.ANGLE, "localFirst" : "axisAngled", "localSecond" : "axis", "angle" : 5 * degree}); skSolve(gearSketch);</div>
In my case, I'm still getting a 90deg angle between the two axis.1


