Skip to main content
8-Gravel
October 31, 2023
Question

BoundingBox attributes vs boxextents - unexpected results

  • October 31, 2023
  • 2 replies
  • 2502 views

Having an issue with a calculated attribute on EPMDocument type to determine material thickness. Using attributes noted in CS324653 and using the supplied code for minimum model extent size  - the returned value  of the new attribute is not correct. 

 

As an example - when looking at the values in /servlet/odata/v3/CADDocumentMgmt/CADDocuments('{CADDocumentId}')/Representations for a sample part - the value for 'BoundingBox' is:
      "BoundingBox": [
        -0.0533878,
        -0.0673053,
        0,
        0.0860431,
        0.441427,
        0.009525
      ],
This data appears correct and are dimensions measured from the main part planes.

For this example - if Az is BoundingBox[2] and Bz is BoundingBox[5], then `BoundingBox[5] - BoundingBox[2] = 0.009525` which is correct for this part.

However, if I create a new calculated attribute on the CADDocument type (BoxThicknessmin), and set the formula equal to `abs(boxExtents.Az - boxExtents.Bz)`, the value I get for this new attribute is `"BoxThicknessmin": 0.014859520749434692` which is incorrect.

 

An incorrect valve is shown even if I make a direct attribute relationship without a formula (e.g. simply put BoxExtents.Bz as the formula). 

 

Does anyone have any suggestions or explanations on why the calculated value has an unexpected result? Are there any server logs that we could lookup to debug this issue?

2 replies

20-Turquoise
October 31, 2023

As a warning the "bounding box" dimensions stored in Windchill are the useless size with datums:

Windchill PDMLink: Is it possible to show the value of EPMDocument boxExtents.* attributes without considering datums? 

 

 

HelesicPetr
22-Sapphire II
22-Sapphire II
October 31, 2023

Hi @AW_ME 

A value is stored In a database but this value can represent some Measurement System. The value is different for SI and for  USCS 

Check what is set in the model, and check what is really in the database and what is shown with the calculated attribute. 

 

Also check if the visualization is really actual and everything has been regenerated in the model.

Based on config the visualization is regenerated during visual process but user can forget to do so. 

 

PetrH

10-Marble
March 12, 2024

Hi @HelesicPetr 

 

I'm trying to make use of the BoxExtents data as well.

Some of our models are in SI units, some use the USCS measurement (*sigh*) system.

 

Do you know if there is a way in WT to detect the measurement system for a given EPMDocument?

 

Regards

 

20-Turquoise
March 12, 2024

@PN_5076692 wrote:

Hi @HelesicPetr 

 

I'm trying to make use of the BoxExtents data as well.

Some of our models are in SI units, some use the USCS measurement (*sigh*) system.

 

Do you know if there is a way in WT to detect the measurement system for a given EPMDocument?

 


It does not matter what the model unit system is. The values are stored in Windchill as meters.