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.
Cannot get linearPattern to work??
bill_schnoebelen
OS Professional, Developers, User Group Leader, csevp Posts: 119 PRO
in General
I cannot get this to work for PatternType.FACE or PatternType.FEATURE. It works for PatternType.PART. It be something with how I pass my 'id +cbore1'. It does work if I allow the user to choose a instanceFunction and they choose another cbore outside of the featurescript. I have not tried to pass faces this way.
doc: https://cad.onshape.com/documents/649c5e76e2529519607ea91a/w/519e26b278912c150b334c95/e/b281c3657905275369e36d87
Here is code:
doc: https://cad.onshape.com/documents/649c5e76e2529519607ea91a/w/519e26b278912c150b334c95/e/b281c3657905275369e36d87
Here is code:
//////Face
linearPattern(context, id + "linearPattern1", {
"patternType" : PatternType.FACE,
"faces" : qCreatedBy(id + "cbore1", EntityType.FACE),
"directionOne" : qCreatedBy(newId() + "Right", EntityType.FACE),
"distance" : .5 * inch,
"instanceCount" : 3
});
/////Feature
linearPattern(context, id + "linearPattern1", {
"patternType" : PatternType.FEATURE,
"instanceFunction" : [id + "cbore1"],
"directionOne" : qCreatedBy(newId() + "Right", EntityType.FACE),
"distance" : 1.0 * inch,
"instanceCount" : 2
});
Any suggestions?
Any suggestions?
Tagged:
0
Comments
As for face pattern, do:
to see what your query is actually evaluating to. I suspect the issue is there.
When sharing for forum help, ideally, you'd make your document public and make a version -- otherwise we can't see the feature definitions and we can only see the doc with changes you've made since posting.
I am going to give up on this route and try a for loop.
Thanks