Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I have been reading some of the other posts and noticed here that the accepted solution mentions "techniques to get the bounding boxes of 3D parts", so I was hoping to learn how to do this. I am currently working on some projects in which this capability would be very useful. Thank you in advance for your help.
Regards,
JT
Solved! Go to Solution.
Hi @JTFrandsen ,
I think the bounding boxes of 3D parts/components could be passed to Studio metadata but this is something what is not possible to be achieved by default in the current functionality - so far I know and so far I understand the current functionality after some more detailed check.
Here is an example what currently the meta data of specific pvs /PVZ component will contain:
...
,"/0/0/1/1/11":{"":{"Feature_Id":"74","Source_file_name":"main_bearing.prt.3","Source_part_name":"main_bearing_mid.prt"},"PROE Parameters":{"COST":"0.000000","DESCRIPTION":"Bearing, Main","DESIGNER":"J Buch","MATERIAL":"Steel","PART_NUMBER":"000-000-000","PDMDB":"ProEngine","PDMREV":"1.10+","PDMRL":"WIP","PTC_MATERIAL_NAME":"STEELMMNS","VENDOR":"PTC","WEIGHT":"0.000021"},"__PV_SystemProperties":{"Child Count":"0","Component Name":"MAIN_BEARING_MID.PRT","Display Name":"MAIN_BEARING_MID.PRT","Model Extents (mm)":"55.5","OL File Name":"l-Creo 3D_0_l-Creo 3D_0_proengine_9.ol","Part Depth":"6","Part ID":"11","Part ID Path":"/0/0/1/1/11","Part Name":"MAIN_BEARING_MID.PRT","Part Path":"Illustration/Illustration/ENGINE.ASM/ENGINE_BODY.ASM/CYLINDER_BLOCK.ASM/MAIN_BEARING_MID.PRT"}},...
We can see that all PROE parameters are comming (in case that the source CAD system is Creo Parameteric). The only geometrical property what we could see is the extend attribute.
.... But the data is there -> here for example when we open a PVZ file in Creo View (MCAD license) and check the component properties:
So, we can find for each component the center of gravity and the bounding box information.
Possibly we can have soon this information also in the meta file when we load a file in Studio with the option to create a json meta file. I will check with dev team if such configuration could be setup in the current release / R&D reference VTS-719/ .
if this is not possible then I think we have the following options:
Advanced PVS Optimize Utility Configuration
Using the PVS Optimize Utility to Add Attributes to PVS Files from XML input
Advanced Recipe Configuration for PVS Optimize Utility
The problem here is that in this case we need to extract the information . The trivial case to read the info and write down to a xml file if we have an assembly with few parts.
In case that the parts are coming form Creo Parametric we can use Creo Parametric Toolkit (requires dev license) or JLink(does not require dev license) to visit the Root assembly tree and for each component to extract the bounding box information , center of gravity ... etc. and then to write these information
Here are some more useful topics:
Hi @JTFrandsen ,
I think the bounding boxes of 3D parts/components could be passed to Studio metadata but this is something what is not possible to be achieved by default in the current functionality - so far I know and so far I understand the current functionality after some more detailed check.
Here is an example what currently the meta data of specific pvs /PVZ component will contain:
...
,"/0/0/1/1/11":{"":{"Feature_Id":"74","Source_file_name":"main_bearing.prt.3","Source_part_name":"main_bearing_mid.prt"},"PROE Parameters":{"COST":"0.000000","DESCRIPTION":"Bearing, Main","DESIGNER":"J Buch","MATERIAL":"Steel","PART_NUMBER":"000-000-000","PDMDB":"ProEngine","PDMREV":"1.10+","PDMRL":"WIP","PTC_MATERIAL_NAME":"STEELMMNS","VENDOR":"PTC","WEIGHT":"0.000021"},"__PV_SystemProperties":{"Child Count":"0","Component Name":"MAIN_BEARING_MID.PRT","Display Name":"MAIN_BEARING_MID.PRT","Model Extents (mm)":"55.5","OL File Name":"l-Creo 3D_0_l-Creo 3D_0_proengine_9.ol","Part Depth":"6","Part ID":"11","Part ID Path":"/0/0/1/1/11","Part Name":"MAIN_BEARING_MID.PRT","Part Path":"Illustration/Illustration/ENGINE.ASM/ENGINE_BODY.ASM/CYLINDER_BLOCK.ASM/MAIN_BEARING_MID.PRT"}},...
We can see that all PROE parameters are comming (in case that the source CAD system is Creo Parameteric). The only geometrical property what we could see is the extend attribute.
.... But the data is there -> here for example when we open a PVZ file in Creo View (MCAD license) and check the component properties:
So, we can find for each component the center of gravity and the bounding box information.
Possibly we can have soon this information also in the meta file when we load a file in Studio with the option to create a json meta file. I will check with dev team if such configuration could be setup in the current release / R&D reference VTS-719/ .
if this is not possible then I think we have the following options:
Advanced PVS Optimize Utility Configuration
Using the PVS Optimize Utility to Add Attributes to PVS Files from XML input
Advanced Recipe Configuration for PVS Optimize Utility
The problem here is that in this case we need to extract the information . The trivial case to read the info and write down to a xml file if we have an assembly with few parts.
In case that the parts are coming form Creo Parametric we can use Creo Parametric Toolkit (requires dev license) or JLink(does not require dev license) to visit the Root assembly tree and for each component to extract the bounding box information , center of gravity ... etc. and then to write these information
Hi @JTFrandsen , but also hello everybodiy who is looking on this post.
This is an enhancement which is considered by R&D and could be implemented soon. But could you please, provide a short justification what will be the goal when you have e.g. the bounding box coordinates/dims. What of new functionality could be achieved, what will we advantage? I will appreciate if you could share your viewpoints regarding this issue so I could discuss this later with dev team.
Thanks
Thank you @RolandRaytchev and @VladimirN for your speedy and thorough replies! I am currently swamped with other projects, but I will definitely look more into your solutions when time permits. Your solutions seem very promising and I'm excited to dig in deeper.
As far as some use cases for bounding boxes, I have a few projects in mind. The first being the ability to accurately determine which objects AR experience users are looking at. I'm involved in AR research at a university level and I've been looking at how to use data about a user's gaze to enhance the experience itself. I have worked with @SteveGhee (thank you again, Steve!!) to lay the groundwork for some potential applications in this area (you can find my GitHub repo here), but presently I have to base everything off of the object's origin. In the case of larger objects or objects that are long and thin, using the origin just doesn't work very well. Bounding boxes would help me get a much more accurate idea of what people are looking at because I could essentially reference the object's actual size.
The other application I would love bounding boxes for is robot path planning in AR. I have already developed methods for creating 3D paths for the robot to follow using an AR interface (I made a poster about it for a PTC event which can be found on this webpage), but one feature I would LOVE to add is the ability to define obstacles in AR (such as another piece of equipment). I would factor bounding boxes into my path planning algorithm so that the robot could avoid crashing into the obstacles around it.
These are some areas I can think of for using bounding boxes, but I'm sure there are plenty more too! @RolandRaytchev like you said in your first post, even if bounding boxes could just be passed into Vuforia Studio as metadata, that would be a great place to start.
Thank you for all your help!
You're welcome.
Hi @JTFrandsen ,
It seems that there is TWX extension which will be able to extract the Json metada data including the bouding box. This was metioned in the post:
https://community.ptc.com/t5/Vuforia-Studio/metadata-vuforia-experience-service/m-p/779433#M10633
-> so there is the linnk to the gibhub for the CreoViewRWExtension
Possibly is this helpful in you case.
e.g. in demo extraction if
...
"/0/2/2/11" : {
"" : {
"Source_file_name" : "upper_end_screw_m6x16__103_.prt.1",
"Feature_Id" : "176"
},
"__PV_SystemProperties" : {
"Display Name" : "UPPER_END_SCREW_M6X16__103_.PRT",
"Part Path" : "/Illustration/MINI_MILL_ASSY.ASM/COLUMN_SPINDLE.ASM/COLUMN_ASSY.ASM/UPPER_END_SCREW_M6X16__103_.PRT",
"Child Count" : 0,
"Component Name" : "UPPER_END_SCREW_M6X16__103_.PRT",
"Model Extents (mm)" : 22.000044,
"Instance Location" : "180.0 0.0 180.0 0.015 -0.035 -0.0135 ",
"Part Name" : "UPPER_END_SCREW_M6X16__103_.PRT",
"Model Bounds" : "0.01 0.055999998 -0.2725 0.02 0.066 -0.25049996",
"Direct Child Count" : 0,
"Instance Transformation" : "-1 0 0 0.015 0 1 0 -0.035 0 0 -1 -0.0135 0 0 0 1",
"Model Transformation" : "-1 0 0 0.015 0 1 0 0.061 0 0 -1 -0.2725 0 0 0 1",
"Model Location" : "-180.0 0.0 180.0 0.015 0.061 -0.2725 ",
"OL File Name" : "l-Creo 3D_0_mini_mill_assy_v5_80.ol",
"Part Depth" : 4,
"Instance Type" : 0,
"Instance ID" : "11",
"Component Bounds" : "-0.0050000004 -0.0050000004 -0.022000026 0.0050000004 0.0050000004 1.110223E-18",
"Part ID Path" : "/0/2/2/11"
},
....
json file: