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.
OpLoft Fails
thomas_fieguth
Member Posts: 5 EDU
Hello,
I am trying to do an opLoft, and it fails, giving me the following error:
@opLoft : LOFT_SELECT_GUIDES
I am initializing the loft in the following way:
opFitSpline(context, id + ("outSpline" ~ edgeId ~ "Face" ~ faceId), {
"points" : outPts
});
opFitSpline(context, id + ("inSpline" ~ edgeId ~ "Face" ~ faceId), {
"points" : inPts
});
opLoft(context, id + ("ellipseLoft" ~ edgeId ~ "Face" ~ faceId), {
"profileSubqueries" : [ qSketchRegion(id + ("startSketch" ~ edgeId ~ "Face" ~ faceId)), qSketchRegion(id + ("endSketch" ~ edgeId ~ "Face" ~ faceId)) ],
"guideSubqueries" : [qCreatedBy(id + ("outSpline" ~ edgeId ~ "Face" ~ faceId)), qCreatedBy(id + ("inSpline" ~ edgeId ~ "Face" ~ faceId)), faceEdge]
});
I have done the loft manually (manually selecting all 3 edges that the opLoft would use) and it works
Thanks in advance
Comments
I highly recommend using @jnewth’s viz() and dbg() with his Report feature. Debugging queries is very challenging without being able to see what each step looks like. Also showing the count for the items in the query.
https://forum.onshape.com/discussion/29653/use-report-viz-and-dbg-for-conditional-println-and-debug-visualizations
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
What @S1mon is correctly pointing out is that you should verify that all of your queries, e.g.
qSketchRegion(id + ("startSketch" ~ edgeId ~ "Face" ~ faceId))qSketchRegion(id + ("endSketch" ~ edgeId ~ "Face" ~ faceId))qCreatedBy(id + ("outSpline" ~ edgeId ~ "Face" ~ faceId))qCreatedBy(id + ("inSpline" ~ edgeId ~ "Face" ~ faceId))and
faceEdgeactually exist, are of the right type, and follow the rules (Each guide curve should intersect each profile once.)
Using the Report feature is a great way to do so….
hmm, ok thanks for the advice. I haven't figured it out yet, but these tools will definitely help.
I can confirm that they all exist and that the types are correct:
Sketch region 1 { featureId : [ FgBIysKu6rXgK3O_0 , startSketch2Face0 ] , filterInnerLoops : false , queryType : SKETCH_REGION }is type FACE 1Sketch region 2 { featureId : [ FgBIysKu6rXgK3O_0 , endSketch2Face0 ] , filterInnerLoops : false , queryType : SKETCH_REGION }is type FACE 1Out Spline { featureId : [ FgBIysKu6rXgK3O_0 , outSpline2Face0 ] , queryType : CREATED_BY }is type EDGE 1In Spline { featureId : [ FgBIysKu6rXgK3O_0 , inSpline2Face0 ] , queryType : CREATED_BY }is type EDGE 1Face Edge { queryType : TRANSIENT , transientId : JGJ }is type EDGE 1Also, I'm pretty sure that the points are coincident on the sketch plane because I defined them as such:
skPolyline(startSketch, "polyline1", {"points" : [
vector( 0, 0) * inch,
worldToPlane(startSketchPlane, inPts[0]),
worldToPlane(startSketchPlane, outPts[0]),
vector(0, 0) * inch
]
});
I guess there is a chance that the spline points (outPts[0] and inPts[0]) are not actually on the plane and are just being projected onto the plane? That being said, visually it looks correct, and again, when doing a loft manually with those selected edges, it works. I'll keep working at it. Let me know if anyone else has any ideas.
Thanks again
Are you trimming the guides/profiles? In the regular feature I believe it defaults to doing that.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn