Constant errors when trying to compile FeatureScript
I get constant errors when trying to compile FeatureScript. What is the problem?
https://cad.onshape.com/documents/429e6210f5198eba46d587d4/w/6de781fd87ddbe3f0f8b3da7/e/e099ef0e63da6fe167a1b6fc
Answers
-
There are a few little things missing:
1. your skPolyline is not closed (therefore you have no closed region to revolve into a solid. Just add another pointvector(0, 0) * millimeterat the end of the array…whille developing features you might want to add a debugs like:
debug(context, qSketchRegion(id + "sketch"));to make sure things are as you intend.
2. the sketch plane needs to be a query. use something like
var sketch = newSketch(context, id + "sketch", { "sketchPlane" : qCreatedBy(makeId("Front"), EntityType.FACE) });3. the opRevolve needs one more parameter:
"
angleForward" : 360 * degree0 -
Thank you Greg, that helped.
I tried slightly modify code and to add Chamfer to the top of the larger button, but Featurescript didn't accept code and show notices:
Function qEdgeFilter with 2 argument(s) not found
45:30
Feature Studio 1Function evEdgeCenter with 2 argument(s) not found
46:34
Feature Studio 1Can you advice?
https://cad.onshape.com/documents/429e6210f5198eba46d587d4/w/6de781fd87ddbe3f0f8b3da7/e/14a4127feaa3f8e5106a09df0

