cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Computing the bounding box.

Highlighted
Level 10

Computing the bounding box.

Toolkiters,

I have a rectangular part that is assembled into a manufacturing assembly using a csys defined in the mfg assembly. I am trying to calculate the bounding box of each contour on a surface of the part. Currently I am using ProContourBoundbox2dCompute but it is using the csys of the part in which the contour resides. Therefore the bounding box is not computed correctly in reference to the csys defined in the mfg assembly (the rectangular part is rotated about 45 degrees which increases the size of the bounding box). So my question is how do I compute the bounding box in referenct to a differenc cys of a surface contour? i attached an image file that I sent to PTC further explaining the problem.

Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase Inc. | 616.698.4078


2 REPLIES 2

Computing the bounding box.

Patrick,
As J-link is a subset of Pro/TOOLIT I can describe how I do this in
J-Link.
J-link has a method on the ComponentPath class that returns the
transformationmatrix between the component CS and the root assembly CS. A
boolean handles in which direction the transformation matrix is calculated
(asm->prt or prt->asm).
You can use this matrix to transform any 3D coordinat from prt to asm CS.
I hope you are able to "transform" this to Pro/TOOLKIT.

Bjarne Frandsen




"Patrick Williams" <->
07-11-2007 18:34
Please respond to
"Patrick Williams" <->


To
-
cc

Subject
[proecus] - Computing the bounding box.






{Note: The original size of this message and its attachments exceeded our
allowed size. As a convenience, the message below has been converted to
plain text, and all attachments to this message can be easily downloaded
from our online site via the links provided at the end of this message.}


Toolkiters,
I have a rectangular part that is assembled into a manufacturing assembly
using a csys defined in the mfg assembly. I am trying to calculate the
bounding box of each contour on a surface of the part. Currently I am
using ProContourBoundbox2dCompute but it is using the csys of the part in
which the contour resides. Therefore the bounding box is not computed
correctly in reference to the csys defined in the mfg assembly (the
rectangular part is rotated about 45 degrees which increases the size of
the bounding box). So my question is how do I compute the bounding box in
referenct to a differenc cys of a surface contour? i attached an image
file that I sent to PTC further explaining the problem.

Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase Inc.
| 616.698.4078


Computing the bounding box. SUMMARY

It is not possible with Pro/TOOLKIT to compute the 2D bounding box of a
contour with a different transformation matrix. The solution is to
visit all of the edges and call ProEdgeXyzdataEval with T=0 and T=1 to
get the beginning and ending points of each edge (also transform them
with ProPntTrvEval). Once those are all collected for each edge of the
contour, the next step is iterate through all the points calculating the
min and max X and Y values. You can then calculate the proper 2D
bounding box.



Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078