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.

Many points and skFitSpline

darren_13darren_13 Member, Developers Posts: 119 PRO
Hi I am automating a profile connecting many points with skFitSpline and the resulting spline misses most of the points specified.

the snippet of code is as follows:

skFitSpline(sketch1, "camberSpline", {
                "points" : pointsCamber
        });

where pointsCamber is an array of many vectors.

any ideas as to how i could improve this


also is there an way to specify an additional point to end this spline on? such as one specified by the user?  this is needed as the points are automated using an equation apending the co-ordinates to the pointsCamber however doesn't accurately finish at the final required point thus leaving an opening in the created face. (the profile is an aerofoil)

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    skFitSpline should go through all points specified, not missing any.  Could you post a link to a public document with the issue here?
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • darren_13darren_13 Member, Developers Posts: 119 PRO
    Part studio 2 is the result of the code, showed each of the 3 splines but makes the spline look un-smoothed and missing points (might need to zoom a bit).

    https://cad.onshape.com/documents/95877be3b17f49277e87a2c3/w/c312c5dc50237be412236044/e/0652608a5a941e4062f7e896

    thanks,
    Darren Lynch
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    Hey Darren,

    From what I can see, the reason you're seeing gaps is just the viewer being imperfect. The graphic data displayed for splines is just a piecewise approximation of what the actual shape is underneath (and there are performance reasons why you can't just always display a more accurate version).

    The real spline that is parametrically part of your model actually passes through those points, you just can't see it as such.

    Best,
    Kevin
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    Moreover, if you measure the distance between one of the points and the spline, you get 0.000 mm
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • darren_13darren_13 Member, Developers Posts: 119 PRO
    ok thanks guys

Sign In or Register to comment.