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.

constructPath returning error, need advise on correcting

darren_13darren_13 Member, Developers Posts: 117 PRO
edited July 2017 in FeatureScript
I have this line:

var upperQueries is Query = qUnion([sketchEntityQuery(id + "sketch1", EntityType.EDGE, "upperLEArc"),
                                                sketchEntityQuery(id + "sketch1", EntityType.EDGE, "UpperLE_Spline"),
                                                sketchEntityQuery(id + "sketch1", EntityType.EDGE, "UpperTE_Spline"),
                                                sketchEntityQuery(id + "sketch1", EntityType.EDGE, "upperTEArc")]);

pathMap.upperPath = constructPath(context, upperQueries);

where a path should be created, so I can evaluate points on the aerofoil to print for xfoil analysis.

the problem is I get this error returned:
'throw Edges do not form a continuous path.'

This is the debug of 'upperQueries':


What I think is happening is that one of the splines ends and begins the opposite way to how it would form a continuous path. My question is; does this matter? or do I, in fact, have end and beginning points that don't coincide? The reason I doubt the second is that the combination of upper and lower edges forms an enclosed sketch profile, this tells me they do coincide.

I imagined that if the line is continuous in terms of point to point, and regardless of edge draw direction the path would be able to piece together the path.

the project is here:
https://cad.onshape.com/documents/95877be3b17f49277e87a2c3/w/b503830fd20472014beb1221/e/fd18fc6a8649f47782fe61bb

under profile generator new. The line at fault is line 581.

Any advice and further information on constructPath would be appreciated.
Darren
Tagged:

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 2,405
    Is the first edge in your Query one of the end edges (i.e. not in the middle?). Not sure if that is the cause, but constructPath should fix spline direction (which is its primary purpose).
    Neil Cooke, Director of Technical Marketing, Onshape Inc.
  • darren_13darren_13 Member, Developers Posts: 117 PRO
    Hi @NeilCooke, yes the first edge is the front element, so it goes front arc, then onto a front spline then a rear spline then finally onto a rear arc. Assuming draw direction doesn't matter they form a continuous line.
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,385
    Hi @darren_13 ,

    From your debug picture it looks like constructPath should work fine.  It shouldn't matter whether one of the end edges is the first in the Query.  I'll look into this for you sometime in the next couple days, sorry you're having trouble.
    Jake Rosenfeld - Modeling Team
  • darren_13darren_13 Member, Developers Posts: 117 PRO
    Hi @Jake_Rosenfeld, thank you.
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,385
    edited July 2017
    Hi Darren,

    I think the line numbers have changed a bit from when you posted this, but I am seeing the `Edges do not form a continuous Path` error on like 595:
    pathMap.lowerPath = constructPath(context, lowerQueries);
    If I debug lowerQueries I can see the following:

    The issue here is that:
    sketchEntityQuery(id + "sketch1", EntityType.EDGE, "lowerLE_Spline")
    resolves to nothing.  If you change it to "LowerLE_Spline" it resolves to the edge you want :smile:

    Let me know if you need any additional help, or if this did not resolve your questions about constructPath!
    Jake Rosenfeld - Modeling Team
  • darren_13darren_13 Member, Developers Posts: 117 PRO
    Hi @Jake_Rosenfeld, this does indeed look like the culprit, not sure how I missed that but many thanks for looking into this.

    Much appreciated,
    Darren
Sign In or Register to comment.