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.
skFitSpline start and end angles
bartyborris
Posts: 11 PRO
Is it possible to set the slope at the start and end points of a spline in FeatureScript?
// Something like the following would be a really big help. If anyone knows a workaround I could use the help:<br><br>skFitSpline(sketch1, "spline1", {<br> "points" : [<br> vector( 0, 0) * inch,<br> vector( 0, -1) * inch,<br> vector( 1, 1) * inch,<br> vector(-1, 0) * inch,<br> vector( 0, 0) * inch<br> ],<br> "startAngle": 0 * degree,<br> "endSlope": -30 * degree<br>});0
Comments
-
Correction:
<br>skFitSpline(sketch1, "spline1", {<br> "points" : [<br> vector( 0, 0) * inch,<br> vector( 0, -1) * inch,<br> vector( 1, 1) * inch,<br> vector(-1, 0) * inch,<br> vector( 0, 0) * inch<br> ],<br> "startAngle": 0 * degree,<br> "endAngle": -30 * degree<br><span>});</span>
0 -
Not for a sketch spline (yet), but as of today, you can do it with opFitSpline in 3D.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
OK, given it is not possible with skFitSpline, is there a path to get a 3D spline created with opFitSpline "projected" into a sketch so I can utilize it? It is not clear to me how to create a face, that I can extrude, for which one or more edges are composed of a spline that I can define a tangent vector at the end points (i.e. "startDerivative" and "endDerivative" in opFitSpline). It would save me substantial time (still getting up to speed with featureScript) to know if this is a possibility yet or not, and if so roughly how to go about it.
0 -
It's not pretty, but you can use opSplitFace to imprint/project the 3D spline (and the other edges you want) onto a face (possibly of a sheet body) and then extrude the relevant portion of the split face. Please post if you need more detail than that.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
I see.... and agree it's not pretty. I figured out another approach by "doing math" to figure out where to place points for the skFitSpline (also not pretty). You intimated that improving skFitSpline is on the todo list; I hope this is the case (along with something that makes doing a fillet in a sketch easier as well). Keep up the great work.
0 -
Yes, the improvement to skFitSpline is coming soon (though not in the next update).Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0

