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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Fetch geometry data from solid object having the Facets in it

psarode
7-Bedrock

Fetch geometry data from solid object having the Facets in it

I am using the Creo Parametric 5.0.0.0

I am using the ProTK Toolkit APIS to get the information from the model.

I have a PVZ model where it looks like this model has facets data and no surfaces in it.

To get the geometry data from the surface we use ProSolidSurfaceVisit which gives a call back to user defined function with surface as argument.

 

I am trying to get the Facet data by using the ProSolidFacetsetVisit API, I am getting the call into the call back function with the facets set information and app data information.

Can anyone help me to get the geometry data out of this facets set,
Its better if I get a sample code fetch the geometry data within the callback function from Facets.

 

I have attached the sample model PVZ part file.

 

Thanks and regards.

ACCEPTED SOLUTION

Accepted Solutions
Ben_C
12-Amethyst
(To:psarode)

The call to ProSolidFacetsetVisit will obtain the FacetSets, with this FacetSet you can then call ProFacetsetFacetVisit which will obtain the facets.

 

From the protkdoc:
Visiting Facets and Facet Sets
The functions described below enable you to find all the facet sets in a model and visit the facets stored in those sets.
Functions Introduced:

ProSolidFacetsetVisit()

ProFacetsetFacetVisit()
The function ProSolidFacetsetVisit() visits each of the facet sets in a given model. This function takes the filter function ProFacetsetFilterAction() and the visit function ProFacetsetVisitAction() as its input arguments. The function ProFacetsetFilterAction() is a generic action function for filtering the facet sets from a model. It returns the filter status of the facet sets. This status is used as an input argument by the visit action function ProFacetsetVisitAction().
The function ProFacetsetFacetVisit() visits the facets in the faceted geometry set. This function takes the filter function ProFacetFilterAction() and the visit function ProFacetVisitAction() as its input arguments. The function ProFacetFilterAction() is a generic action function for filtering a facet from the faceted geometry set. It returns the filter status of the facet. This status is used as the input argument by the visit action function ProFacetVisitAction().
Accessing Facet Properties
The functions described below allow you to access the face normal and three vertices or corners of a facet. A facet vertex is given by the object ProFacetVertex.
Functions Introduced:

ProFacetVerticesGet()

ProFacetverticesFree()

ProFacetvertexPointGet()

ProFacetNormalGet()
The function ProFacetVerticesGet() obtains the vertices of a specified facet.
Use the function ProFacetverticesFree() to release the memory allocated for the vertices of a facet.
The function ProFacetvertexPointGet() returns the location of the facet vertex in the model coordinate system.
The function ProFacetNormalGet() returns the normal vector of a facet in the model coordinate system.

View solution in original post

3 REPLIES 3
Ben_C
12-Amethyst
(To:psarode)

The call to ProSolidFacetsetVisit will obtain the FacetSets, with this FacetSet you can then call ProFacetsetFacetVisit which will obtain the facets.

 

From the protkdoc:
Visiting Facets and Facet Sets
The functions described below enable you to find all the facet sets in a model and visit the facets stored in those sets.
Functions Introduced:

ProSolidFacetsetVisit()

ProFacetsetFacetVisit()
The function ProSolidFacetsetVisit() visits each of the facet sets in a given model. This function takes the filter function ProFacetsetFilterAction() and the visit function ProFacetsetVisitAction() as its input arguments. The function ProFacetsetFilterAction() is a generic action function for filtering the facet sets from a model. It returns the filter status of the facet sets. This status is used as an input argument by the visit action function ProFacetsetVisitAction().
The function ProFacetsetFacetVisit() visits the facets in the faceted geometry set. This function takes the filter function ProFacetFilterAction() and the visit function ProFacetVisitAction() as its input arguments. The function ProFacetFilterAction() is a generic action function for filtering a facet from the faceted geometry set. It returns the filter status of the facet. This status is used as the input argument by the visit action function ProFacetVisitAction().
Accessing Facet Properties
The functions described below allow you to access the face normal and three vertices or corners of a facet. A facet vertex is given by the object ProFacetVertex.
Functions Introduced:

ProFacetVerticesGet()

ProFacetverticesFree()

ProFacetvertexPointGet()

ProFacetNormalGet()
The function ProFacetVerticesGet() obtains the vertices of a specified facet.
Use the function ProFacetverticesFree() to release the memory allocated for the vertices of a facet.
The function ProFacetvertexPointGet() returns the location of the facet vertex in the model coordinate system.
The function ProFacetNormalGet() returns the normal vector of a facet in the model coordinate system.

psarode
7-Bedrock
(To:Ben_C)

Thanks for the help.

I just checked this APIs and other APIs from PtoFacet module.

It looks like we can get only vertices and normals information from this Facet.

 

I want the UV and Faces information for this particular facet/FacetSet and the export it as a single geometry.

Is there a way to do that? So that I can export a part as a single geometry with vertices, normals, UVs and Faces.

 

Thanks

psarode
7-Bedrock
(To:psarode)

can anyone tell me how to get the appearance properties of the Facet or Facetset entities using ProToolkit API's.

I got the geometry data but missing the material properties.

 

Thanks

Announcements


Top Tags