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.

Options

skfitspline

darren_13darren_13 Member, Developers Posts: 118 ✭✭
edited September 2016 in FeatureScript

Hi, so I'm writing another script I copied and pasted a bit of code form my other script:

 

skFitSpline(sketch1, "UpperSpline", {

            "points" : UpperCoordinates

            });

 

where:

UpperCoordinates=[vector(1,0.0130)*meter,

                        vector(0.95,0.0230)*meter,

                        vector(0.9,0.0396)*meter,

                        vector(0.8,0.0732)*meter,

                        vector(0.7,0.1039)*meter,

                        vector(0.6,0.1302)*meter,

                        vector(0.5,0.1512)*meter,

                        vector(0.4,0.1660)*meter,

                        vector(0.3,0.1712)*meter,

                        vector(0.2,0.1660)*meter,

                        vector(0,15,0.1564)*meter,

                        vector(0.1,0.1404)*meter,

                        vector(0.075,0.1294)*meter,

                        vector(0.05,0.1142)*meter,

                        vector(0.025,0.0928)*meter,

                        vector(0.0125,0.0764)*meter,

                        vector(0,0.0460)*meter];

 

 

the error says:

Precondition of skFitSpline failed (is2dPointVector(value.points))

 

but documentation says:

EXAMPLE

 

[vector(0, 0) * inch, vector(0, 1) * inch, vector(1, 0) * inch]

 

 

 

What am I doing wrong?

Tagged:

Comments

  • Options
    darren_13darren_13 Member, Developers Posts: 118 ✭✭
    sorry bout formatting don't know why that happenrd
  • Options
    jon_sorrellsjon_sorrells Onshape Employees Posts: 51
    vector(0,15,0.1564)*meter is a 3d vector.  You probably meant vector(0.15,0.1564)*meter,
  • Options
    darren_13darren_13 Member, Developers Posts: 118 ✭✭
    such a small detail, you won't believe how long I was chasing... Thanks so much!
Sign In or Register to comment.