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.

Why does skEllipticalArc throw NO_ERROR?

dave_cowdendave_cowden Member, Developers Posts: 475 ✭✭✭
<div>export const myFeature = defineFeature(function(context is Context, id is Id, definition is map)</div><div>&nbsp; &nbsp; precondition</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Define the parameters of the feature type</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; 	var sketch = newSketchOnPlane(context, id + "ellipseTest", {</div><div>		"sketchPlane" : plane(vector(0, 0, 0) * meter, vector(0, 0, 1), vector(1, 0, 0))</div><div>	 &nbsp; &nbsp;});</div><div>	 &nbsp; &nbsp;</div><div>&nbsp; &nbsp; 	skEllipticalArc(sketch, "ellipticalArc1", {</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"center" : vector(0, 0) * inch,</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"majorAxis" : vector(1, 0) * inch,</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"minorRadius" : 1 * inch,</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"majorRadius" : 2 * inch,</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"startParameter" : 0,</div><div>&nbsp; &nbsp; 	 &nbsp; &nbsp; &nbsp; &nbsp;"endParameter" : 0.25</div><div>&nbsp; &nbsp; 	});</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; 	skSolve(sketch);	 &nbsp; &nbsp;</div><div>&nbsp; &nbsp; });</div>



I had a lot more complex script, but I eventually reduced it to the above, which fails despite input that passes the pre-conditions, and appears to be pretty much exactly what you get when you use the sample values from the documentation.

Best Answer

Answers

  • dave_cowdendave_cowden Member, Developers Posts: 475 ✭✭✭
    ok. sometimes i feel bad asking and then finding out i was doing something stupid.  But in this case, glad i asked! I'd never have figured that one out!
Sign In or Register to comment.