Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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

bartyborrisbartyborris OS Professional 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.&nbsp; If anyone knows a workaround I could use the help:<br><br>skFitSpline(sketch1, "spline1", {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "points" : [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0,&nbsp; 0) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0, -1) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 1,&nbsp; 1) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector(-1,&nbsp; 0) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0,&nbsp; 0) * inch<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "startAngle": 0 * degree,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "endSlope":&nbsp; -30 * degree<br>});



Comments

  • bartyborrisbartyborris OS Professional Posts: 11 PRO
    Correction:

    <br>skFitSpline(sketch1, "spline1", {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "points" : [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0,&nbsp; 0) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0, -1) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 1,&nbsp; 1) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector(-1,&nbsp; 0) * inch,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vector( 0,&nbsp; 0) * inch<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "startAngle": 0 * degree,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "endAngle":&nbsp; -30 * degree<br><span>});</span>


  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    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 Inc
  • bartyborrisbartyborris OS Professional Posts: 11 PRO
    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.
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    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 Inc
  • bartyborrisbartyborris OS Professional Posts: 11 PRO
    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.
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    Yes, the improvement to skFitSpline is coming soon (though not in the next update).
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.