hp_bridge.h
Macro Definitions
Functions
void |
|
void |
|
void |
|
PK_ERROR_code_t |
|
PK_ERROR_code_t |
|
void |
|
PK_ERROR_code_t |
|
PK_ERROR_code_t |
|
void |
|
void |
|
void |
|
bool |
|
void |
|
void |
|
long |
|
long |
|
PK_ENTITY_t |
|
void |
|
void |
|
void |
|
int |
|
wchar_t const * |
|
void |
|
unsigned char |
|
void |
|
void |
|
bool |
|
int |
|
bool |
|
void |
Detailed Description
Macro Definition
-
HP_ERROR_key_out_of_range
This errors is obsolete, as the HOOPS-Parasolid integration no longer renumbers HOOPS keys. You should not see this \ error code.
-
HP_ERROR_non_circle_key_out_of_range
This errors is obsolete, as the HOOPS-Parasolid integration no longer renumbers HOOPS keys. You should not see this \ error code.
-
HP_ERROR_key_does_not_exist
No HOOPS geometry exists for the given key.
-
HP_ERROR_unable_to_determine_entity_class
The key provided does not map to an existing Parasolid entity. You have probably performed a Parasolid operation \ that deleted this entity, without first calling HP_Delete_Entity_Geometry.
-
HP_ERROR_non_mappable_entity_class
There is no clear mapping from the given HOOPS key to the requested Parasolid entity class. For example, if you pass \ the key to a HOOPS elliptical arc and ask for PK_FACE, you will get this error code returned. It makes more sense to \ ask for a PK_EDGE when passing a key to a HOOPS elliptical arc.
-
HP_ERROR_unknown_entity_class
This error would likely indicate an internal error. Contact technical support.
-
HP_ERROR_not_implemented
This error would likely indicate an internal error, or possibly a case where there is no clear mapping from the \ given HOOPS key to a single entity of the requested class. Contact technical support.
-
HP_ERROR_hoops_key_maps_to_invalid_entity_class
This error would indicate an internal error. Contact technical support.
-
HP_ERROR_incorrect_face_tag_mapping
This error would indicate an internal error. Contact technical support.
-
__wchar_t
Function Documentation
Warning
doxygenfunction: Unable to resolve function “HP_Init” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- void HP_Init(char const *pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames = true)
- void HP_Init(wchar_t const *pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames = true)
-
void HP_Update(void)
-
void HP_Close(void)
Shuts down the Parasolid kernel.
Warning
doxygenfunction: Unable to resolve function “HP_Read_Xmt_File” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- PK_ERROR_code_t HP_Read_Xmt_File(char const *filename, PK_PARTITION_t file_partition, int *num_parts, PK_PART_t **parts, PK_PART_receive_o_t const *options, bool tesselate = true, char const *face_tessellation_level = nullptr)
- PK_ERROR_code_t HP_Read_Xmt_File(wchar_t const *filename, PK_PARTITION_t file_partition, int *num_parts, PK_PART_t **parts, PK_PART_receive_o_t const *options, bool tesselate = true)
Warning
doxygenfunction: Unable to resolve function “HP_Write_Xmt_File” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- PK_ERROR_code_t HP_Write_Xmt_File(char const *filename, int num_parts, PK_PART_t const *parts, PK_PART_transmit_o_t const *options)
- PK_ERROR_code_t HP_Write_Xmt_File(wchar_t const *filename, int num_parts, PK_PART_t const *parts, PK_PART_transmit_o_t const *options)
Warning
doxygenfunction: Unable to resolve function “HP_Init” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- void HP_Init(char const *pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames = true)
- void HP_Init(wchar_t const *pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames = true)
Warning
doxygenfunction: Unable to resolve function “HP_Read_Xmt_File” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- PK_ERROR_code_t HP_Read_Xmt_File(char const *filename, PK_PARTITION_t file_partition, int *num_parts, PK_PART_t **parts, PK_PART_receive_o_t const *options, bool tesselate = true, char const *face_tessellation_level = nullptr)
- PK_ERROR_code_t HP_Read_Xmt_File(wchar_t const *filename, PK_PARTITION_t file_partition, int *num_parts, PK_PART_t **parts, PK_PART_receive_o_t const *options, bool tesselate = true)
Warning
doxygenfunction: Unable to resolve function “HP_Write_Xmt_File” with arguments None in doxygen xml output for project “parasolid” from directory: /home/jenkins-sa/jenkins/workspace/hps/hoops_3df/documentation/build/html/../doxygen/parasolid/xml. Potential matches:
- PK_ERROR_code_t HP_Write_Xmt_File(char const *filename, int num_parts, PK_PART_t const *parts, PK_PART_transmit_o_t const *options)
- PK_ERROR_code_t HP_Write_Xmt_File(wchar_t const *filename, int num_parts, PK_PART_t const *parts, PK_PART_transmit_o_t const *options)
-
void HP_Delete_Entity_Geometry(unsigned long count, PK_ENTITY_t *entities, bool PreserveSegments = false)
This routine will delete the geometric primitives associated with the given ACIS entities from the HOOPS database and update the mapping between the ACIS pointers and the HOOPS keys.
Details
This function must be called prior to making any Parasolid calls which could modify the topology of a given entity, if it has been previously rendered. Once the Parasolid calls that modify (or delete) the given entity have been completed, the user may choose to call HP_Render_Entities to display the result. This function need not be called if automatic updates are enabled (see HP_Init).
For C# Developers, this function is not available. Instead, we recommend that you use the native C# methods provided by Parasolid.
- Parameters:
count – Number of Parasolid entities in the entities array.
entities – Array of Parasolid entity tagIDs.
PreserveSegments – true means delete geometry only, preserve segment structure
-
void HP_Render_Entities(unsigned long count, PK_ENTITY_t *entities, PK_TRANSF_t view_transf = NULTAG, PK_TRANSF_t *topol_transf = 0, char const *face_tessellation_level = nullptr)
This call will generate the tessellation of a set of Parasolid entities and store the primitives in the HOOPS database using the HOOPS/Parasolid Bridge.
Details
This routine encapsulates and replaces the Parasolid PK_TOPOL_render_xxx routines for users of the HOOPS/Parasolid Bridge. Call this function to populate the HOOPS graphical database. This function need not be called if automatic updates are enabled (see HP_Init).
- Parameters:
count – Number of Parasolid entities in the entities array
entities – Array of Parasolid entities
transf – Transformation matrix ID for view dependent tesselation (default is 0)
face_tessellation_level – Facet tessellation level (default is custom). Allowed values are lowest, low, medium, high, highest, custom.
-
void HP_Render_Entity(PK_ENTITY_t entity, PK_TRANSF_t trans = NULTAG, PK_TRANSF_t topol_transf = NULTAG, char const *face_tessellation_level = nullptr)
This call will generate the tessellation of a Parasolid entity and store it in the HOOPS database using the HOOPS/Parasolid Bridge.
Details
This routine encapsulates and replaces the Parasolid PK_TOPOL_render_xxx routines for users of the HOOPS/Parasolid Bridge. Call this function to populate the HOOPS graphical database. This function need not be called if automatic updates are enabled (see HP_Init).
- Parameters:
entity – Parasolid entity
transf – Transformation matrix ID for view dependent tesselation (default is 0)
-
bool HP_Update_Entity(PK_ENTITY_t entity, PK_TRANSF_t view_trans = NULTAG, PK_TRANSF_t topol_transf = NULTAG)
Updates the given entity by re-tessellating it. The HOOPS segment hierarchy will be retained. This API function requires following conditions to succeed
entity to be updated should be of PK_BODY_t class
entity should have already been rendered first by calling HP_Render_Entity API
’create body segments’ rendering option should be on
- Parameters:
entity – The entity to be updated (should be of PK_BODY_t type)
transView – transformation (default is NULTAG)
topol_transf – Entity transformation (default is NULTAG)
- Returns:
bool true if succeeds
-
void HP_Show_Tessellation_Options(PK_TOPOL_render_line_o_t *line_Options, PK_TOPOL_render_facet_go_o_t *go_options, PK_TOPOL_facet_mesh_o_t *generation_settings)
Shows the attribute values previously stored with HP_Set_Tessellation_Options.
Details
Caller passes pointers to PK_TOPOL_xxx structures. These must be pointers to valid structures, as this function will not allocate memory.
- Parameters:
line_options – Parasolid options structure. Returned to user. Passed by reference.
go_options – Parasolid options structure. Returned to user. Passed by reference.
generation_settings – Parasolid options structure. Returned to user. Passed by reference.
-
void HP_Set_Tessellation_Options(PK_TOPOL_render_line_o_t *line_Options, PK_TOPOL_render_facet_go_o_t *go_options, PK_TOPOL_facet_mesh_o_t *generation_settings)
Provides control over how the Parasolid PK_Render routine maps geometry to the HOOPS database via the HOOPS/Parasolid GO_Routines.
Details
The line_options, go_options, and generation_settings parameters are Parasolid option structures and are passed directly to the appropriate PK_Render_XXX routine. For details on what the Parasolid option structures are, please refer to the Parasolid Reference manual. These options are used during all HP_Render_Entity, HP_Read_Xmt_file, and HP_Update operations.
- Parameters:
line_options – Parasolid options structure.
go_options – Parasolid options structure.
generation_settings – Parasolid options structure.
-
long HP_Compute_Geometry_Keys(PK_ENTITY_t tagID, long max_count, HC_KEY *keys, char const *list)
Given a Parasolid tag ID, this routine will return all the HOOPS keys for the tessellated HOOPS geometric primitives associated with the Parasolid entity.
Details
Given a Parasolid tag ID for any entity, this routine will fill the given array with HOOPS keys for the geometry in the HOOPS database representing that entity. The value returned will be the total number of keys put into the keys array. This number will never be greater than the max_count parameter passed in, which specifies the maximum number of keys desired. The returned value may be less than max_count if the number of HOOPS keys corresponding to the given tagID is less than max_count. The call HP_Compute_Geometry_Key_Count can be used to determine the size of the keys array that will be returned.
Parasolid body entities have, among others, both face and edge entities. The list specifies which of these entities, or both, should be considered when converting the Parasolid tagID. The list is of the form “specification, specification,…”, where each specification can be either “type=value” or “no type”.
The following choices are recognized for type:
vertices
Calculate the keys of the HOOPS geometric primitives representing the PK_Vertex entities in the given Parasolid entity.
edges
Calculate the keys of the HOOPS geometric primitives representing the PK_Edge entities in the given Parasolid entity.
faces
Calculate the keys of the HOOPS geometric primitives representing the PK_Face entities in the given Parasolid entity.
bodies
Calculate the keys of the HOOPS segments representing the PK_Body entities in the given Parasolid entity.
A negative return value for count indicates an error. For an explanation of the possible error tokens, please see HOOPS/Parasolid Error Tokens.
- Parameters:
tagID – The Tag ID for the Parasolid entity provided for conversion.
max_count – Maximum number of keys that should be returned.
list – A quoted string or string variable specifying the particular types of Parasolid geometry that should be converted.
keys – Array of associated HOOPS keys. Returned to user.
count – Actual number of keys returned to user in keys array. Always less than or equal to max_count. Returned to user.
-
long HP_Compute_Geometry_Key_Count(PK_ENTITY_t tagID, char *list)
Given a Parasolid tag ID for any entity, this routine will return the number of HOOPS geometric primitives in the HOOPS database that graphically represent the Parasolid entity. This allows you to create structures of the appropriate size for your subsequent HP_Compute_Geometry_Keys call.
Details
Given a Parasolid tag ID for any entity, this routine will compute the number of HOOPS keys that exist for the geometry in the HOOPS database that represents this Parasolid entity.
Parasolid body entities have, among others, both face and edge entities. The list specifies which of these entities, or both, should be considered when converting the Parasolid TagID. The list is of the form “specification, specification,…”, where each specification can be either “type=value” or “no type”.
The following choices are recognized for type:
vertices
Calculate the keys of the HOOPS geometric primitives representing the PK_Vertex entities in the given Parasolid entity.
edges
Calculate the keys of the HOOPS geometric primitives representing the PK_Edge entities in the given Parasolid entity.
faces
Calculate the keys of the HOOPS geometric primitives representing the PK_Face entities in the given Parasolid entity.
bodies
Calculate the keys of the HOOPS geometric primitives representing the PK_Body entities in the given Parasolid entity.
- Parameters:
tagID – The Tag ID for the Parasolid entity provided for computation.
list – A quoted string or string variable specifying the particular types of Parasolid geometry that should be converted.
count – Number of HOOPS keys associated with the given Parasolid entity. Returned to user.
-
PK_ENTITY_t HP_Compute_TagID(HC_KEY key, PK_CLASS_t paraClass)
Given a HOOPS Key this routine will return the Parasolid Tag ID for the Parasolid entity that contains the specified HOOPS geometric entity.
Details
There is always one and only one Parasolid entity returned by this function. The returned TagID will be of the type chosen by the caller via the “paraClass” parameter. For instance, given a HOOPS key for an edge or face in a HOOPS shell, you may request the tagID of the corresponding PK_Vertex, PK_Edge, PK_Face, or PK_Body.
If no tagID can be found which corresponds to the given HOOPS key, a negative error token is returned. For an explanation of the possible error tokens, please see HOOPS/Parasolid Error Tokens.
- Parameters:
key – HOOPS key provided for computing associated Parasolid entity TagID.
paraClass – Parasolid Class for desired entity associated with the input HOOPS key.
TagID – The requested Parasolid tagID. Returned to user.
-
void HP_Set_Rendering_Options(char const *list)
Provides control over the manner in which Parasolid models are mapped to the HOOPS Segment Tree by the HOOPS/Parasolid GO_Routines implementation.
Details
The following choices are recognized:
[no] create body segments [= on, off]
Controls how each Parasolid Body entity is mapped to the HOOPS segment tree.
When you specify “create body segments = on”, a HOOPS segment is created for each Parasolid body. These HOOPS segments are created as sub segments of the currently open segment. This is useful when you wish to apply unique HOOPS display/rendering attributes to a group of geometric primitives representing a Parasolid Body, or expect to apply additional transformations to individual Parasolid Bodies.
When you specify “create body segments = off”, no extra HOOPS segments are created for individual bodies when they are rendered.
The default is “create body segments”.
Controls how the Parasolid face entities are mapped to HOOPS shell primitives.
When you specify “merge faces”, when each subsequent PK_BODY is finished being rendered, the HOOPS shells that have been generated (one for each face) will be merged together into a single shell. In the case of a multi-colored PK_BODY, the shells corresponding to PK_FACES that have the same color attribute will be merged into one HOOPS shell, resulting in as many HOOPS shells are there are distinct colors in the PK_BODY entity. This mapping results in optimal rendering speed at the expense of ease of manipulating individual PK_FACE entities. Applications that are concerned only with viewing, or that do not need to select at the PK_FACE level (to perform ‘face level’ Parasolid operations) may gain rendering speed advantages by making use of this feature.
When you specify “no merge faces”, one HOOPS shell remains for each PK_FACE rendered. This mode is required if your application must interact with individual PK_FACEs.
The default is “no merge faces”.
Controls whether the Parasolid rendered geometry will be partitioned into separate HOOPS segments based on color attributes. This will result in correct rendering of the geometry while maximizing performance by grouping like-colored geometry into the same segment.
When you specify “preserve color = on” , then a HOOPS segment is created for each unique color in the Parasolid geometry being rendered. These HOOPS segments are created as sub segments of the currently open segment.
When specified in conjunction with “create body segments
= on”, the segment that is currently open at the time the color segments are created will be the segment that is unique to the PK_BODY being rendered.
Otherwise, the currently open segment will be whatever HOOPS segment the user has opened at the time that the PK_TOPOL_render_facet or PK_TOPOL_render_line is called. Within each created HOOPS segment, the color attributes of the segment will be set (for lines and faces) to the appropriate values.When you specify “preserve color = off”, then color attributes in the Parasolid geometry are ignored when HOOPS geometry is created.
The default is “preserve color”.
In addition to segments created for each unique color attribute set in the Parasolid geometry being rendered, one additional segment will be created if there is any Parasolid geometry that does not have any color attribute set on it. This segment, like the colored segments, will be created as a child segment of the currently open segment and a sibling segment of any colored segments if any exist. No color attributes will be set in this segment.
Parasolid PK_EDGEs in general do not have color attributes attached to them. If an edge itself does not have a color attribute attached, then these edges are treated as if they have the color attribute of their owning face. However, an edge may have more than one owning face (usually an edge will have two owning faces), and each of the owning faces may have a different color attribute. In this unusual case, the color of the PK_EDGE is undefined, and may be assigned a color of any one of its owning faces.
If you wish for PK_EDGEs to ignore color attributes, but you do want faces to be colored by their color attributes, then you can set a global color attribute for line color and specify an “attribute lock” on line color, which will override the line color attributes set in the created color segments (in the HOOPS world, Parasolid PK_EDGEs will correspond to HOOPS line entities, not HOOPS edge entities). As an example of how to do this, you could, in the same segment that is open when you call PK_TOPOL_render_xxxx, call the following two functions:
HC_Set_Color(“lines = white”);
HC_Set_Rendering_Options(“attribute lock = (color =
(lines))”);
- Parameters:
list – A quoted string or a string variable containing a list of the desired settings.
-
void HP_Show_Rendering_Options(char *list)
This routine allows developers to query what the current rendering option settings are as previously stored with HP_Set_Rendering_Options.
- Parameters:
options – A string which the function will write the current rendering options into
-
void HP_Show_One_Rendering_Option(char const *type, char *value)
-
int HP_CheckConsistency(void)
-
wchar_t const *HP_Get_Schema_Path(void)
-
void HP_Set_Schema_Path(char const *schema_path)
-
unsigned char HP_Get_Hash_Level(void)
-
void HP_Set_Hash_Level(unsigned char level)
-
void HP_Set_Instances_To_Bodies(bool flatten)
Allows developer to tell the bridge to honor the assembly definition that may be contained within a XT file.
Details
If the parameter is true then the bridge flattens the assembly by turning all instances into bodies with an appropriately applied transform. If false then instances will be honored and created as included objects within the segment hierarchy. The default setting is false.
- Parameters:
flatten_assembly – Indicates whether or not assemblies contained within an XT file are to be flattened
-
bool HP_Get_Instances_To_Bodies(void)
Allows the developer to determine what the modeller will do when it encounters assemblies within a file.
Details
This routine allows developers to see what the current behaviour of the bridge is when it encounters an assembly. If true then the bridge flattens the assembly by turning all instances into bodies with an appropriately applied transform. If false then instances will be honored and created as included objects within the segment hierarchy.
-
int HP_Check_Consistency(void)
-
bool HP_Associate_Key_To_Entity(PK_ENTITY_t entity, HC_KEY key)
This routine will map the provided HOOPS Key to the Parasolid entity.
Details
The Parasolid entity must exist and there must be no existing mapping to this key for this function to succeed.
- Parameters:
key – HOOPS key that needs to be associated to the Parasolid entity.
TagID – Parasolid entity that should be associated to the HOOPS key.
success – Success of operation. Returned to user.
-
void HP_Compute_Selected_Entity_List(PK_ENTITY_t **entities, int *numentities)