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.
@opDraft: Map does not contain field 'queryType'
brian_guan
Member Posts: 13 ✭✭
I am trying to use opDraft in feature script but I am getting a weird error:
@opDraft: Map does not contain field 'queryType'
I don't see anywhere in the documentation what this queryType is in opDraft, so I took a guess a supplied something but the error remains.
Here's the code snippet:
export const XZ_PLANE = plane(vector(0, 0, 0) * meter, vector(0, 1, 0));
annotation { "Feature Type Name" : "BadDraft" }export const BadDraft = defineFeature( function(ctx is Context, id is Id, args is map) precondition { } { fCuboid(ctx, id + "cube4draft", { "corner1" : vector(0, 0, 0)*inch, "corner2" : vector(10, 1, 2)*inch }); var _qFace = qIntersectsPlane( qParallelPlanes(qCreatedBy(id + "cube4draft", EntityType.FACE), XZ_PLANE, false), XZ_PLANE); opDraft(ctx, id + "draftRib", { "neutralPlane" : XY_PLANE, "pullVec" : XY_PLANE.normal, "draftFaces" : _qFace, "angle" : 30 * degree, "queryType": QueryType.TRANSIENT }); });
I have created an example public doc to show the problem, can someone enlighten me please?
https://cad.onshape.com/documents/ed5afb001e7acc0bd4c250a9/w/d7e5cbc472f2a9b26248ac1c/e/6053220dd0440a3cad097c32
@opDraft: Map does not contain field 'queryType'
I don't see anywhere in the documentation what this queryType is in opDraft, so I took a guess a supplied something but the error remains.
Here's the code snippet:
export const XZ_PLANE = plane(vector(0, 0, 0) * meter, vector(0, 1, 0));
annotation { "Feature Type Name" : "BadDraft" }export const BadDraft = defineFeature( function(ctx is Context, id is Id, args is map) precondition { } { fCuboid(ctx, id + "cube4draft", { "corner1" : vector(0, 0, 0)*inch, "corner2" : vector(10, 1, 2)*inch }); var _qFace = qIntersectsPlane( qParallelPlanes(qCreatedBy(id + "cube4draft", EntityType.FACE), XZ_PLANE, false), XZ_PLANE); opDraft(ctx, id + "draftRib", { "neutralPlane" : XY_PLANE, "pullVec" : XY_PLANE.normal, "draftFaces" : _qFace, "angle" : 30 * degree, "queryType": QueryType.TRANSIENT }); });
I have created an example public doc to show the problem, can someone enlighten me please?
https://cad.onshape.com/documents/ed5afb001e7acc0bd4c250a9/w/d7e5cbc472f2a9b26248ac1c/e/6053220dd0440a3cad097c32
0
Comments