Home » Developers » Shapeways API » /price/v1 bounding box parameters
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
/price/v1 bounding box parameters [message #69721] Wed, 12 June 2013 20:52 UTC Go to next message
avatar jonemo  is currently offline jonemo
Messages: 3
Registered: July 2011
Go to my shop
Junior 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:
xBoundMin
xBoundMax
yBoundMin
yBoundMax
zBoundMin
zBoundMax

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?
Re: /price/v1 bounding box parameters [message #69729 is a reply to message #69721 ] Wed, 12 June 2013 23:42 UTC Go to previous messageGo to next message
avatar stonysmith is currently online stonysmith
Messages: 1962
Registered: August 2008
Go to my shop
Shapie Expert
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.


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
Re: /price/v1 bounding box parameters [message #69852 is a reply to message #69729 ] Fri, 14 June 2013 19:32 UTC Go to previous messageGo to next message
avatar jonemo  is currently offline jonemo
Messages: 3
Registered: July 2011
Go to my shop
Junior 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?

[Updated on: Fri, 14 June 2013 20:34 UTC]

Re: /price/v1 bounding box parameters [message #70509 is a reply to message #69852 ] Tue, 25 June 2013 22:37 UTC Go to previous message
avatar jlevine  is currently offline jlevine
Messages: 32
Registered: August 2011
Go to my shop
Member
I work here
Hey guys,

Quote:

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?


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;
      }
    }


Re:
Quote:

Why are the dimensions for the *BoundMax parameters in meters and for the *BoundMax return values centimeters?


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.

Best,
Josh


VP of Engineering | Shapeways

 
   
Previous Topic:POST models/v1
Next Topic:Questions about using shapeways API in my website

Logo

Hello.

We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.