/price/v1 bounding box parameters

Discussion in 'Shapeways API' started by jonemo, Jun 12, 2013.

  1. jonemo
    jonemo New Member
    I'm a little confused about the meaning of the bounding box parameters of the price API endpoint: http://developers.shapeways.com/docs?li=dh_docs#POST_-price- v1

    The (required) parameters are:

    Through testing I have determined that the *Min and *Max parameters for each pair must be different, i.e. xBoundMin != xBoundMax.

    The models for which I need to know the price all just have one bounding box. What is the meaning of these parameters in the context of requesting the price for one model?
  2. stonysmith
    stonysmith Well-Known Member Moderator
    If you set xboundMin=0 and xboundMax=(width of your item) then it should work.

    OR.... let's say your item was a 2mm cube centered around the point {100,100,100}
    You could enter xboundMin=99 xboundMax=101

    The min/max setting are designed to all you to run a loop across all the vertexes in your model and get the min/max values without having to try to center it on the origin.
  3. jonemo
    jonemo New Member
    Ah, that makes sense! I assume though that the center point makes no difference in the price calculation, correct?

    Continuing to work on this, I noticed that the information returned from /printers/v1 also includes the same parameters, for eample:

    {"printerId":"1","title":"Somatech FDM","xBoundMin":"0.2500","xBoundMax":"25.0000","yBoundMin":"0.2500","yBoundMax":"25.0000","zBoundMin":"0.1000","zBoundMax":"30.0000"}
    It appears that in these results the *BoundMax parameters alone define the max bounding box. Depending on the printer, the *BoundMin seems to be equal to the minimum wall thickness or the minimum Bounding Box dimensions (using the information on shapeways.com/materials as a reference). Can you clarify what exactly these return values mean?

    In addition to that: Any chance you could include all design constraints (min wall thickness, min bounding box length, etc) in the info returned by the API?

    Edit: One more thing: Why are the dimensions for the *BoundMax parameters in meters and for the *BoundMax return values centimeters?
    Last edited: Jun 14, 2013
  4. jlevine
    jlevine New Member
    Hey guys,

    This is the min and max bounds of the printer in centimeters.

    Here is an example of how we use the data:

        foreach (array($dx, $dy, $dz) as $bound) {
          if (
            $bound < $printer->getXBoundMin()
            && $bound < $printer->getYBoundMin()
            && $bound < $printer->getZBoundMin()
          ) {
            $problems[] = self::TOO_SMALL;
          } elseif (
            $bound > $printer->getXBoundMax()
            && $bound > $printer->getYBoundMax()
            && $bound > $printer->getZBoundMax()
          ) {
            $problems[] = self::TOO_BIG;
    This is a good question - we are looking to standardize all input parameters to centimeters, but some of our functions still operate on meters. When we are ready, we'll roll out a v2 of the endpoints in meters and those will operate in centimeters.