Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

hp_bridge.h
Go to the documentation of this file.
1 
3 #ifndef __HP_BRIDGE_H_
4 #define __HP_BRIDGE_H_
5 
6 #include "hc.h"
7 #include "parafrustdefs.h"
8 
9 #define HP_ERROR_key_out_of_range -1
10 #define HP_ERROR_non_circle_key_out_of_range -2
11 #define HP_ERROR_key_does_not_exist -3
12 #define HP_ERROR_unable_to_determine_entity_class -4
13 #define HP_ERROR_non_mappable_entity_class -5
14 #define HP_ERROR_unknown_entity_class -6
15 #define HP_ERROR_not_implemented -7
16 #define HP_ERROR_hoops_key_maps_to_invalid_entity_class -8
17 #define HP_ERROR_incorrect_face_tag_mapping -9
19 #ifndef _MSC_VER
20 #define __wchar_t wchar_t
21 #endif
22 
35 extern void HP_Init(const char* pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames=true);
36 
37 extern void HP_Update(void);
38 
42 extern void HP_Close(void);
43 
44 extern PK_ERROR_code_t HP_Read_Xmt_File(const char* filename, PK_PARTITION_t file_partition, int* num_parts, PK_PART_t** parts, const PK_PART_receive_o_t* options, bool tesselate=true, const char * face_tessellation_level = nullptr);
45 extern PK_ERROR_code_t HP_Write_Xmt_File(const char* filename, int num_parts, const PK_PART_t* parts, const PK_PART_transmit_o_t* options);
46 
47 #ifdef _MSC_VER
48 
61 extern void HP_Init(const __wchar_t* pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames=true);
62 extern PK_ERROR_code_t HP_Read_Xmt_File(const __wchar_t * filename, PK_PARTITION_t file_partition, int* num_parts, PK_PART_t** parts, const PK_PART_receive_o_t* options, bool tesselate=true, const char * face_tessellation_level = nullptr);
63 extern PK_ERROR_code_t HP_Write_Xmt_File(const __wchar_t * filename, int num_parts, const PK_PART_t* parts, const PK_PART_transmit_o_t* options);
64 
65 #else
66 
79 extern void HP_Init(const wchar_t* pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames=true);
80 
107 extern PK_ERROR_code_t HP_Read_Xmt_File(const wchar_t * filename, PK_PARTITION_t file_partition, int* num_parts, PK_PART_t** parts, const PK_PART_receive_o_t* options, bool tesselate=true);
108 
124 extern PK_ERROR_code_t HP_Write_Xmt_File(const wchar_t * filename, int num_parts, const PK_PART_t* parts, const PK_PART_transmit_o_t* options);
125 
126 #endif
127 
141 extern void HP_Delete_Entity_Geometry(unsigned long count, PK_ENTITY_t* entities, bool PreserveSegments=false);
142 
143 //GH99
155 extern void HP_Render_Entities(unsigned long count, PK_ENTITY_t* entities, PK_TRANSF_t view_transf=NULTAG, PK_TRANSF_t* topol_transf=0, const char * face_tessellation_level = nullptr);
156 
166 extern void HP_Render_Entity(PK_ENTITY_t entity, PK_TRANSF_t trans=NULTAG, PK_TRANSF_t topol_transf=NULTAG, const char * face_tessellation_level = nullptr);
167 
180 extern bool HP_Update_Entity(PK_ENTITY_t entity, PK_TRANSF_t view_trans=NULTAG, PK_TRANSF_t topol_transf=NULTAG);
181 
192 extern 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);
193 
204 extern 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);
205 
238 extern long HP_Compute_Geometry_Keys(PK_ENTITY_t tagID, long max_count, HC_KEY* keys, const char* list);
239 
269 extern long HP_Compute_Geometry_Key_Count(PK_ENTITY_t tagID, char* list);
270 
283 extern PK_ENTITY_t HP_Compute_TagID(HC_KEY key, PK_CLASS_t paraClass);
284 
393 extern void HP_Set_Rendering_Options(const char* list);
394 
400 extern void HP_Show_Rendering_Options(char* list);
401 extern void HP_Show_One_Rendering_Option(const char* type, char* value);
402 extern int HP_CheckConsistency(void);
403 extern const __wchar_t * HP_Get_Schema_Path(void);
404 extern void HP_Set_Schema_Path(const char* schema_path);
405 extern unsigned char HP_Get_Hash_Level(void);
406 extern void HP_Set_Hash_Level(unsigned char level);
407 
416 extern void HP_Set_Instances_To_Bodies(bool flatten);
417 
423 extern bool HP_Get_Instances_To_Bodies(void);
424 extern int HP_Check_Consistency(void);
425 
436 extern bool HP_Associate_Key_To_Entity(PK_ENTITY_t entity, HC_KEY key);
437 extern void HP_Compute_Selected_Entity_List(PK_ENTITY_t** entities, int* numentities);
438 
439 #endif
void HP_Init(const char *pathToSchemaFiles, PK_LOGICAL_t useBulletinBoard, bool bUnicodeFilenames=true)
Initializes the Parasolid kernel, registers the HOOPS specific implementation of the Parasolid GO_Rou...
PK_ERROR_code_t HP_Read_Xmt_File(const wchar_t *filename, PK_PARTITION_t file_partition, int *num_parts, PK_PART_t **parts, const PK_PART_receive_o_t *options, bool tesselate=true)
Parses the specified Parasolid file and populates the modeling kernel with its contents, then maps the model to a corresponding HOOPS segment tree hierarchy including geometry and attributes.
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 primi...
void HP_Show_Rendering_Options(char *list)
This routine allows developers to query what the current rendering option settings are as previously ...
void HP_Render_Entities(unsigned long count, PK_ENTITY_t *entities, PK_TRANSF_t view_transf=NULTAG, PK_TRANSF_t *topol_transf=0, const char *face_tessellation_level=nullptr)
This call will generate the tessellation of a set of Parasolid entities and store the primitives in t...
void HP_Set_Rendering_Options(const char *list)
Provides control over the manner in which Parasolid models are mapped to the HOOPS Segment Tree by th...
bool HP_Update_Entity(PK_ENTITY_t entity, PK_TRANSF_t view_trans=NULTAG, PK_TRANSF_t topol_transf=NULTAG)
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...
long HP_Compute_Geometry_Keys(PK_ENTITY_t tagID, long max_count, HC_KEY *keys, const char *list)
Given a Parasolid tag ID, this routine will return all the HOOPS keys for the tessellated HOOPS geome...
void HP_Close(void)
Shuts down the Parasolid kernel.
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 contain...
bool HP_Get_Instances_To_Bodies(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.
PK_ERROR_code_t HP_Write_Xmt_File(const wchar_t *filename, int num_parts, const PK_PART_t *parts, const PK_PART_transmit_o_t *options)
Write a collection of Parasolid entities to a file.
void HP_Render_Entity(PK_ENTITY_t entity, PK_TRANSF_t trans=NULTAG, PK_TRANSF_t topol_transf=NULTAG, const char *face_tessellation_level=nullptr)
This call will generate the tessellation of a Parasolid entity and store it in the HOOPS database usi...
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 HO...
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 X...
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.