Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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.
Solved! Go to Solution.
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.
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.
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
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