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.

BoundSpec Declarations

Frederick_WrightFrederick_Wright Member Posts: 3
I was looking at the Featurescript for the Hex Infill feature, am puzzles by several aspects of the following:
<div>// integer from 1 to 100, default 10 (used for %Infill)</div><div>export const INFILL_BOUNDS =</div><div>{</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "min" &nbsp; &nbsp; &nbsp; &nbsp;: 1,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "max" &nbsp; &nbsp; &nbsp; &nbsp;: 100,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (unitless) &nbsp; : [1, 10, 100]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; } as IntegerBoundSpec;</div><div><br></div><div>// parameter values (real numbers) in various document unit systems with defaults</div><div>export const HEX_BOUNDS =</div><div>{</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "min" &nbsp; &nbsp; &nbsp; &nbsp;: 1 * millimeter,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "max" &nbsp; &nbsp; &nbsp; &nbsp;: 100 * millimeter,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (meter) &nbsp; &nbsp; &nbsp;: [0.0, 0.025, 500],</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (centimeter) : 0.5,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (millimeter) : [1, 5, 100],</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (inch) &nbsp; &nbsp; &nbsp; : .25,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (foot) &nbsp; &nbsp; &nbsp; : 0.015,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (yard) &nbsp; &nbsp; &nbsp; : 0.005</div><div>&nbsp; &nbsp; &nbsp; &nbsp; } as LengthBoundSpec;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>//----------------- &nbsp; &nbsp; </div>
Does the line  "(unitless) : [1, 10, 100]" redundantly define the min/max, given that they're explicitly given on the two lines above?

Somewhat similarly, for the HEX_BOUNDS, the line "(meter) : [0.0, 0.025, 500]" seems to contradict the min/max given on the two preceeding lines. Is one range ignored in favor of the other? Does it depend on the document units?

Thanks for any clarification.

Best Answer

Answers

  • Frederick_WrightFrederick_Wright Member Posts: 3
    Thank you, Kevin, for the swift and thorough answer. Much appreciated.
Sign In or Register to comment.