| 1 | #ifndef REFFACE_CCAPI |
|---|
| 2 | #define REFFACE_CCAPI |
|---|
| 3 | |
|---|
| 4 | #include "CubitDefines.h" |
|---|
| 5 | #include "CubitVectorStruct.h" |
|---|
| 6 | #include "LocalStart.h" |
|---|
| 7 | #include "EntityType.h" |
|---|
| 8 | |
|---|
| 9 | /* class CubitVectorStruct; */ |
|---|
| 10 | |
|---|
| 11 | #ifdef __cplusplus |
|---|
| 12 | extern "C" { |
|---|
| 13 | #endif |
|---|
| 14 | |
|---|
| 15 | enum CubitStatus RefFace_get_co_faces(void *RefFace_ptr, |
|---|
| 16 | /* DLCoFaceList & */ void ***co_faces_found_list, |
|---|
| 17 | int *co_faces_found_list_size, |
|---|
| 18 | /* RefVolume * */ void *input_ref_volume_ptr); |
|---|
| 19 | /*R enum CubitStatus */ |
|---|
| 20 | /*R- CubitSuccess/CubitFailure */ |
|---|
| 21 | /*O co_faces_found_list */ |
|---|
| 22 | /*O-Populates the co_faces_found_list with the CoFaces that are */ |
|---|
| 23 | /*-associated with this RefFace. Because the input RefVolume is sent */ |
|---|
| 24 | /*-in it fills the list just with the CoFaces that are associated with */ |
|---|
| 25 | /*-this RefVolume. Note that usually there will be only one CoFace with */ |
|---|
| 26 | /*-the RefVolume but with HardSurfaces there may be more (2). */ |
|---|
| 27 | |
|---|
| 28 | enum CubitStatus RefFace_ordered_loops(void *RefFace_ptr, |
|---|
| 29 | /* DLLoopList & */ void ***loop_list, |
|---|
| 30 | int *loop_list_size); |
|---|
| 31 | /*- Gets the loops in order from outside to inside. */ |
|---|
| 32 | /*- This function is used for all the loop extracting from the refface, */ |
|---|
| 33 | /*- i.e., nodes, ref-edges, ref-vertices. This function orders the */ |
|---|
| 34 | /*- loops based on the angle metric calculation. I believe this metric */ |
|---|
| 35 | /*- is actually currently calculated in AcisGeometryEngine but I see */ |
|---|
| 36 | /*- no reason that it should be done there. I believe it could be */ |
|---|
| 37 | /*- done in the Loop class. */ |
|---|
| 38 | |
|---|
| 39 | int RefFace_co_edge_loops(void *RefFace_ptr, |
|---|
| 40 | /* DLCoEdgeLoopList & */ void ***co_edge_loops, |
|---|
| 41 | int *co_edge_loops_size); |
|---|
| 42 | /*- Returns a list of lists. Each of the included lists contains a list */ |
|---|
| 43 | /*- of CoEdges and represents an ordered list of CoEdges associated */ |
|---|
| 44 | /*- with each of the Loops of this RefFace. */ |
|---|
| 45 | |
|---|
| 46 | int RefFace_ref_edge_loops(void *RefFace_ptr, |
|---|
| 47 | /* DLRefEdgeLoopList & */ void ***ref_edge_loops, |
|---|
| 48 | int *ref_edge_loops_size); |
|---|
| 49 | /*- Returns a list of lists. Each of the included lists contains a list */ |
|---|
| 50 | /*- of RefEdges and represents an ordered list of RefEdges associated */ |
|---|
| 51 | /*- with each of the Loops of this RefFace. */ |
|---|
| 52 | /*- NOTE: All of the ref_edge_lists in ref_edge_loops will */ |
|---|
| 53 | /*- need to be deleted by the *calling* function. */ |
|---|
| 54 | |
|---|
| 55 | void RefFace_ref_vertex_loops(void *RefFace_ptr, |
|---|
| 56 | /* DLRefVertLoopList & */ void ***ref_vert_loop_list, |
|---|
| 57 | int *ref_vert_loop_list_size); |
|---|
| 58 | /*- Returns a list of lists. Each of the included lists contains a list */ |
|---|
| 59 | /*- of RefVertex'es and represents an ordered list of RefVertex'es */ |
|---|
| 60 | /*- associated with each of the Loops of this RefFace. */ |
|---|
| 61 | /*- NOTE: All of the ref_vertex_lists in the ref_vert_loop_list will */ |
|---|
| 62 | /*- need to be deleted by the *calling* function. */ |
|---|
| 63 | |
|---|
| 64 | int RefFace_number_of_Loops(void *RefFace_ptr); |
|---|
| 65 | /*- Returns the number of Loops associated with this RefFace */ |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | /* RefVolume* */ void * RefFace_ref_volume(void *RefFace_ptr); |
|---|
| 69 | /*- Return the first RefVolume pointer to the volume which owns */ |
|---|
| 70 | /*- this RefFace */ |
|---|
| 71 | /*- Note: There may be more than one RefVolume that owns this RefFace. */ |
|---|
| 72 | /*- This method just gets the first in the list. */ |
|---|
| 73 | |
|---|
| 74 | void RefFace_hard_points(void *RefFace_ptr, |
|---|
| 75 | /* DLRefVertexList & */ void ***new_hard_point_list, |
|---|
| 76 | int *new_hard_point_list_size); |
|---|
| 77 | /*- Populate the input DLRefVertexList with the list of hard points */ |
|---|
| 78 | /*- that are defined for this RefFace */ |
|---|
| 79 | |
|---|
| 80 | int RefFace_adjoins(void *RefFace_ptr, |
|---|
| 81 | /* RefFace * */ void *input_face_ptr); |
|---|
| 82 | /*- Returns CUBIT_TRUE if this RefFace adjoins (is connected via a RefEdge) */ |
|---|
| 83 | /*- the input RefFace */ |
|---|
| 84 | |
|---|
| 85 | /* RefEdge* */ void *RefFace_common_ref_edge(void *RefFace_ptr, |
|---|
| 86 | /* RefFace * */ void *input_face_ptr); |
|---|
| 87 | /*- Returns a common RefEdge* if this RefFace shares one with the */ |
|---|
| 88 | /*- input RefFace */ |
|---|
| 89 | |
|---|
| 90 | enum EntityType RefFace_get_grouping_entity_type(void *RefFace_ptr); |
|---|
| 91 | /*R EntityType */ |
|---|
| 92 | /*R- The type of the corresponding GroupingEntity type. */ |
|---|
| 93 | /*- This function returns the type of the corresponding */ |
|---|
| 94 | /*- GroupingEntity . */ |
|---|
| 95 | |
|---|
| 96 | enum EntityType RefFace_get_sense_entity_type(void *RefFace_ptr); |
|---|
| 97 | /*R EntityType */ |
|---|
| 98 | /*R- The type of SenseEntity associated with this object */ |
|---|
| 99 | /*- This function returns the type of SenseEntity associated with */ |
|---|
| 100 | /*- this BasicTopologyEntity. */ |
|---|
| 101 | |
|---|
| 102 | enum EntityType RefFace_get_child_ref_entity_type(void *RefFace_ptr); |
|---|
| 103 | /*R EntityType */ |
|---|
| 104 | /*R- A type value. */ |
|---|
| 105 | /*- This function returns the type of the child RefEntity of */ |
|---|
| 106 | /*- RefFace, which is the type value of the RefEdge class. */ |
|---|
| 107 | |
|---|
| 108 | enum EntityType RefFace_get_parent_ref_entity_type(void *RefFace_ptr); |
|---|
| 109 | /*R EntityType */ |
|---|
| 110 | /*R- A type value. */ |
|---|
| 111 | /*- This function returns the type of the parent RefEntity of */ |
|---|
| 112 | /*- RefFace, which is the type value of the RefVolume class. */ |
|---|
| 113 | |
|---|
| 114 | enum EntityType RefFace_get_topology_bridge_type(void *RefFace_ptr); |
|---|
| 115 | /*R EntityType */ |
|---|
| 116 | /*R- The type of GeometryEntity associated with this object */ |
|---|
| 117 | /*- This function returns the type of GeometryEntity associated with */ |
|---|
| 118 | /*- this BasicTopologyEntity. */ |
|---|
| 119 | |
|---|
| 120 | /* CoFace* */ void *RefFace_get_matching_CoFace(void *RefFace_ptr, |
|---|
| 121 | /* RefVolume * */ void *ref_volume_ptr); |
|---|
| 122 | /*R CoFace* */ |
|---|
| 123 | /*R- Returned CoFace pointer */ |
|---|
| 124 | /*I ref_volume_ptr */ |
|---|
| 125 | /*I- The RefVolume to which matching is done. */ |
|---|
| 126 | /*- This function returns the CoFace that is associated with both "this" */ |
|---|
| 127 | /*- RefFace as well as with the input RefVolume. The function is useful */ |
|---|
| 128 | /*- when a merge operation has resulted in a RefFace that is shared by */ |
|---|
| 129 | /*- more than 1 RefVolume (most often, two). In this case, the RefFace */ |
|---|
| 130 | /*- would be associated with more than one CoFace, each belonging to a */ |
|---|
| 131 | /*- different RefVolume. */ |
|---|
| 132 | /*- If there is no match (i.e., this RefFace is not associated with the */ |
|---|
| 133 | /*- input RefVolume) then a NULL pointer is returned. */ |
|---|
| 134 | |
|---|
| 135 | /* CubitVector */ struct CubitVectorStruct RefFace_center_point(void *RefFace_ptr); |
|---|
| 136 | /*- Return the approximate (spatial) center of this RefFace */ |
|---|
| 137 | |
|---|
| 138 | enum CubitSense RefFace_sense_1(void *RefFace_ptr, |
|---|
| 139 | /* RefVolume * */ void *volume); |
|---|
| 140 | /*-Determines the sense of "this" with respect to the passed-in volume. */ |
|---|
| 141 | |
|---|
| 142 | enum CubitSense RefFace_sense_2(void *RefFace_ptr, |
|---|
| 143 | /* RefFace * */ void *face_ptr); |
|---|
| 144 | /*-Determine the relative sense of the passed face with respect to */ |
|---|
| 145 | /*-this face using the senses of common RefEdges. i.e. if */ |
|---|
| 146 | /*-CUBIT_REVERSED is returned, than the sense of the passed face */ |
|---|
| 147 | /*-should be the opposite of that of this face with respect to */ |
|---|
| 148 | /*-any volume. CUBIT_UNKNOWN is returned if there are no */ |
|---|
| 149 | /*-common RefEdges between RefFaces or there is more than one */ |
|---|
| 150 | /*-common RefEdge. */ |
|---|
| 151 | |
|---|
| 152 | enum CubitSense RefFace_get_geometry_sense(void *RefFace_ptr); |
|---|
| 153 | /*- Gets the sense of the reface with respect to the underlying */ |
|---|
| 154 | /*- geometry engines representation of the surface. */ |
|---|
| 155 | |
|---|
| 156 | enum CubitBoolean RefFace_about_spatially_equal (void *RefFace_ptr, |
|---|
| 157 | /* RefFace * */ void *ref_face_ptr_2, |
|---|
| 158 | double tolerance_factor, |
|---|
| 159 | enum CubitBoolean notify_refEntity, |
|---|
| 160 | enum CubitBoolean test_bbox, |
|---|
| 161 | int test_internal, |
|---|
| 162 | enum CubitBoolean force_merge); |
|---|
| 163 | /*R CubitBoolean */ |
|---|
| 164 | /*R-CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 165 | /*I RefFace*, double, CubitBoolean */ |
|---|
| 166 | /*I- Second RefFace to compare, Tolerance factor to for GEOMETRY_RESABS, */ |
|---|
| 167 | /*I- and flag for notifying compared RefEntities. */ |
|---|
| 168 | /*O CubitBoolean */ |
|---|
| 169 | /*O- If the two RefFaces are spatially equal within the GEOMETRY_RESABS* */ |
|---|
| 170 | /*- the tolerance_factor, then CUBIT_TRUE will be returned. Otherwise */ |
|---|
| 171 | /*- CUBIT_FALSE is returned. */ |
|---|
| 172 | /*- The comparison is done by first checking the bounding boxes of the */ |
|---|
| 173 | /*- RefFaces. If this test is passed then the ref_edges of each face */ |
|---|
| 174 | /*- are looped through and compared. A bounding box check for each */ |
|---|
| 175 | /*- edge is also done first before a comparison, for speed. */ |
|---|
| 176 | |
|---|
| 177 | enum CubitSense RefFace_compare_alignment(void *RefFace_ptr, |
|---|
| 178 | /* RefFace * */ void *second_ref_face_ptr); |
|---|
| 179 | /*R CubitSense */ |
|---|
| 180 | /*R- Sense of this reface with respect to the second one passed in. */ |
|---|
| 181 | /*I RefFace * */ |
|---|
| 182 | /*I- pointer to second ref face with which the alignment is compared. */ |
|---|
| 183 | /*- This function will compare the sense of the two ref-faces, or */ |
|---|
| 184 | /*- rather their normals. */ |
|---|
| 185 | /*- NOTE: It is ASSUMED that BOTH reffaces are SPATIALLY EQUAL. */ |
|---|
| 186 | /*- If this is not followed this could explode. */ |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | /* CubitVector */ struct CubitVectorStruct RefFace_normal_at(void *RefFace_ptr, |
|---|
| 190 | /* const CubitVector& */ const struct CubitVectorStruct location, |
|---|
| 191 | /* RefVolume * */ void *volume); |
|---|
| 192 | |
|---|
| 193 | /*- Calculate normal for input location (optional input RefVolume to */ |
|---|
| 194 | /*- allow for feature consolidation). */ |
|---|
| 195 | /*- Note that the input location is modified to the coordinates */ |
|---|
| 196 | /*- of the closest point on the surface. */ |
|---|
| 197 | /*- */ |
|---|
| 198 | /*- MJP NOTE: */ |
|---|
| 199 | /*- In the previous implementation, the result of this function call */ |
|---|
| 200 | /*- would not only be the returned unit vector which is the normal */ |
|---|
| 201 | /*- at the location, but the function would also fill in the myPosition */ |
|---|
| 202 | /*- and myParametricPosition data members of RefFace. These data */ |
|---|
| 203 | /*- members have been removed in this implementation of RefFace. */ |
|---|
| 204 | /*- However, the Surface::normal_at function that gets called returns */ |
|---|
| 205 | /*- an additional parameter which is the location on the underlying */ |
|---|
| 206 | /*- surface that is closest to the input location. */ |
|---|
| 207 | |
|---|
| 208 | void RefFace_reverse_normal(void *RefFace_ptr); |
|---|
| 209 | /*- switch the sense of this face with respect to the underlying */ |
|---|
| 210 | /*- geometry, so that all normals point in the opposite */ |
|---|
| 211 | /*- direction. The orientation of quads on the surface are switched */ |
|---|
| 212 | /*- to agree with this normal. */ |
|---|
| 213 | |
|---|
| 214 | /*======== Change Code by DZ of Cat, on 10/29/98 8:46:59 AM ======== */ |
|---|
| 215 | enum CubitBoolean RefFace_set_outward_normal(void *RefFace_ptr, |
|---|
| 216 | /* RefVolume * */ void *volume); |
|---|
| 217 | /*- Set the normal of this face to point outward wrt to given volume. */ |
|---|
| 218 | /*- Assumes there is only one coface of the volume for this RefFace. */ |
|---|
| 219 | /*- Uses the above "reverse_normal" function. */ |
|---|
| 220 | /*- return true only if reverse_normal function called. */ |
|---|
| 221 | /*======== Change End by DZ of Cat, on 10/29/98 8:46:59 AM ======== */ |
|---|
| 222 | |
|---|
| 223 | void RefFace_move_to_surface (void *RefFace_ptr, |
|---|
| 224 | /* CubitVector& */ struct CubitVectorStruct *location, |
|---|
| 225 | LocalStart start); |
|---|
| 226 | /*- Moves the given node back onto its surface */ |
|---|
| 227 | |
|---|
| 228 | void RefFace_find_closest_point_trimmed(void *RefFace_ptr, |
|---|
| 229 | /* CubitVector */ struct CubitVectorStruct from_point, |
|---|
| 230 | /* CubitVector& */ struct CubitVectorStruct *point_on_surface); |
|---|
| 231 | /*R void */ |
|---|
| 232 | /*I CubitVector */ |
|---|
| 233 | /*I- point from which to find closest point on trimmed surface */ |
|---|
| 234 | /*O CubitVector */ |
|---|
| 235 | /*O- point on trimmed surface closest to passed-in point */ |
|---|
| 236 | /*- This function finds the closest point on a TRIMMED surface to the */ |
|---|
| 237 | /*- passed-in point. */ |
|---|
| 238 | |
|---|
| 239 | enum CubitStatus RefFace_get_principal_curvatures(void *RefFace_ptr, |
|---|
| 240 | /* const CubitVector& */ const struct CubitVectorStruct point, |
|---|
| 241 | /* double& */ double *curvature1, |
|---|
| 242 | /* double& */ double *curvature2, |
|---|
| 243 | /* RefVolume * */ void *ref_volume_ptr); |
|---|
| 244 | /*R enum CubitStatus */ |
|---|
| 245 | /*R- CUBIT_SUCCESS/FAILURE */ |
|---|
| 246 | /*I point */ |
|---|
| 247 | /*I- Input location. The coordinates of this input point are */ |
|---|
| 248 | /*I- modified to those of the point closest to this one, on the */ |
|---|
| 249 | /*I- surface of this RefFace. */ |
|---|
| 250 | /*O curvature1/curvature2 */ |
|---|
| 251 | /*O- Output principal curvature values. */ |
|---|
| 252 | /*I ref_volume_ptr */ |
|---|
| 253 | /*I- Input RefVolume pointer */ |
|---|
| 254 | /*- This function first computes the point on the surface closest to the */ |
|---|
| 255 | /*- input point and sets the values of "point" to this closest */ |
|---|
| 256 | /*- location. Then, the principal curvatures of the surface at this */ |
|---|
| 257 | /*- new point are computed and returned. If the input RefVolume pointer */ |
|---|
| 258 | /*- is not NULL, it is used when computing the curvatures. */ |
|---|
| 259 | |
|---|
| 260 | struct CubitVectorStruct RefFace_position_from_u_v(void *RefFace_ptr, |
|---|
| 261 | double u, double v); |
|---|
| 262 | |
|---|
| 263 | /*- Return a CubitVector (representing a position vector corresponding */ |
|---|
| 264 | /*- to the input point in {u,v} space */ |
|---|
| 265 | |
|---|
| 266 | enum CubitStatus RefFace_u_v_from_position(void *RefFace_ptr, |
|---|
| 267 | /* CubitVector const& */ const struct CubitVectorStruct location, |
|---|
| 268 | /* double& */ double *u, |
|---|
| 269 | /* double& */ double *v, |
|---|
| 270 | /* CubitVector * */ struct CubitVectorStruct *closest_location); |
|---|
| 271 | /*R enum CubitStatus */ |
|---|
| 272 | /*R- CUBIT_SUCCESS/FAILURE */ |
|---|
| 273 | /*I location */ |
|---|
| 274 | /*I- The input point in global space */ |
|---|
| 275 | /*O u, v */ |
|---|
| 276 | /*O- The returned u, v coordinate values (in local parametric space) */ |
|---|
| 277 | /*O- of the closest_point */ |
|---|
| 278 | /*O closest_location */ |
|---|
| 279 | /*O- The point on the Surface closest to the input location */ |
|---|
| 280 | /*I refvolume_ptr */ |
|---|
| 281 | /*I- The reference RefVolume with respect to which, the normal */ |
|---|
| 282 | /*I- is to be computed. If the pointer is NULL, then the */ |
|---|
| 283 | /*I- first underlying solid model entity is used to compute the */ |
|---|
| 284 | /*I- normal. */ |
|---|
| 285 | /*- This function returns the {u, v} coordinates of the point */ |
|---|
| 286 | /*- on the Surface closest to the input point (specified in global */ |
|---|
| 287 | /*- space). The closest_location is also returned. */ |
|---|
| 288 | |
|---|
| 289 | enum CubitBoolean RefFace_is_parametric(void *RefFace_ptr); |
|---|
| 290 | /*R CubitBoolean */ |
|---|
| 291 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 292 | /*- This function determines whether the underlying geometry of the */ |
|---|
| 293 | /*- Surface is parametrically defined or not. Returns CUBIT_TRUE if */ |
|---|
| 294 | /*- it is and CUBIT_FALSE if it is not. */ |
|---|
| 295 | |
|---|
| 296 | enum CubitBoolean RefFace_get_param_range_U(void *RefFace_ptr, |
|---|
| 297 | /* double& */ double *lower_bound, |
|---|
| 298 | /* double& */ double *upper_bound); |
|---|
| 299 | /*R CubitBoolean */ |
|---|
| 300 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 301 | /*O lower_bound */ |
|---|
| 302 | /*O- The lower bound of the parametric range in the U direction. */ |
|---|
| 303 | /*O- This is set to 0.0 if the surface is not parametric. */ |
|---|
| 304 | /*O upper_bound */ |
|---|
| 305 | /*O- The upper bound of the parametric range in the U direction. */ |
|---|
| 306 | /*O- This is set to 0.0 if the surface is not parametric. */ |
|---|
| 307 | /*- Returns the lower and upper parametric bounds of the */ |
|---|
| 308 | /*- surface in U, if it is parametric. Otherwise, it returns */ |
|---|
| 309 | /*- CUBIT_FALSE and zeroes for the upper and lower parametric */ |
|---|
| 310 | /*- bounds. */ |
|---|
| 311 | |
|---|
| 312 | enum CubitBoolean RefFace_get_param_range_V(void *RefFace_ptr, |
|---|
| 313 | /* double& */ double *lower_bound, |
|---|
| 314 | /* double& */ double *upper_bound); |
|---|
| 315 | /*R CubitBoolean */ |
|---|
| 316 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 317 | /*O lower_bound */ |
|---|
| 318 | /*O- The lower bound of the parametric range in the V direction. */ |
|---|
| 319 | /*O- This is set to 0.0 if the surface is not parametric. */ |
|---|
| 320 | /*O upper_bound */ |
|---|
| 321 | /*O- The upper bound of the parametric range in the V direction. */ |
|---|
| 322 | /*O- This is set to 0.0 if the surface is not parametric. */ |
|---|
| 323 | /*- Returns the lower and upper parametric bounds of the */ |
|---|
| 324 | /*- surface in V, if it is parametric. Otherwise, it returns */ |
|---|
| 325 | /*- CUBIT_FALSE and zeroes for the upper and lower parametric */ |
|---|
| 326 | /*- bounds. */ |
|---|
| 327 | |
|---|
| 328 | enum CubitBoolean RefFace_is_periodic(void *RefFace_ptr); |
|---|
| 329 | /*R CubitBoolean */ |
|---|
| 330 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 331 | /*- This function determines whether the underlying geometry of the */ |
|---|
| 332 | /*- Surface is periodic or not. Returns CUBIT_TRUE if it is and */ |
|---|
| 333 | /*- CUBIT_FALSE if it is not. */ |
|---|
| 334 | |
|---|
| 335 | enum CubitBoolean RefFace_is_periodic_in_U(void *RefFace_ptr, |
|---|
| 336 | /* double& */ double *period); |
|---|
| 337 | /*R CubitBoolean */ |
|---|
| 338 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 339 | /*O period */ |
|---|
| 340 | /*O- The value of the period in the U direction. */ |
|---|
| 341 | /*- Determines whether the surface object is */ |
|---|
| 342 | /*- periodic in the U direction or not. If it is, it */ |
|---|
| 343 | /*- returns CUBIT_TRUE and the value of the period. Otherwise, */ |
|---|
| 344 | /*- it returns CUBIT_FALSE and a value of 0.0 or the period. */ |
|---|
| 345 | |
|---|
| 346 | enum CubitBoolean RefFace_is_periodic_in_V(void *RefFace_ptr, |
|---|
| 347 | /* double& */ double *period); |
|---|
| 348 | /*R CubitBoolean */ |
|---|
| 349 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 350 | /*O period */ |
|---|
| 351 | /*O- The value of the period in the V direction. */ |
|---|
| 352 | /*- Determines whether the surface object is */ |
|---|
| 353 | /*- periodic in the V direction or not. If it is, it */ |
|---|
| 354 | /*- returns CUBIT_TRUE and the value of the period. Otherwise, */ |
|---|
| 355 | /*- it returns CUBIT_FALSE and a value of 0.0 or the period. */ |
|---|
| 356 | |
|---|
| 357 | enum CubitBoolean RefFace_is_singular_in_U(void *RefFace_ptr, |
|---|
| 358 | double u_param); |
|---|
| 359 | |
|---|
| 360 | enum CubitBoolean RefFace_is_singular_in_V(void *RefFace_ptr, |
|---|
| 361 | double v_param); |
|---|
| 362 | /*R CubitBoolean */ |
|---|
| 363 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 364 | /*I double u/v parameter value. */ |
|---|
| 365 | /*- Determines if the surface is singular in a given direction */ |
|---|
| 366 | /*- at a given parameter value. */ |
|---|
| 367 | |
|---|
| 368 | enum CubitBoolean RefFace_is_closed_in_U(void *RefFace_ptr); |
|---|
| 369 | |
|---|
| 370 | enum CubitBoolean RefFace_is_closed_in_V(void *RefFace_ptr); |
|---|
| 371 | /*R CubitBoolean */ |
|---|
| 372 | /*R- CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 373 | /*- Determines if the surface is closed, smoothly or not in the */ |
|---|
| 374 | /*- given parameter direction. */ |
|---|
| 375 | /*- A periodic surface is always closed but a closed surface is */ |
|---|
| 376 | /*- is not always periodic. */ |
|---|
| 377 | |
|---|
| 378 | enum CubitStatus RefFace_uv_derivitives(void *RefFace_ptr, |
|---|
| 379 | double u_param, |
|---|
| 380 | double v_param, |
|---|
| 381 | /* CubitVector & */ struct CubitVectorStruct *du, |
|---|
| 382 | /* CubitVector & */ struct CubitVectorStruct *dv); |
|---|
| 383 | /*R enum CubitStatus */ |
|---|
| 384 | /*R- CUBIT_SUCCESS/CUBIT_FAILURE */ |
|---|
| 385 | /*O- du, dv */ |
|---|
| 386 | /*- Determines the u and v derivitives from the given parameter */ |
|---|
| 387 | /*- values. */ |
|---|
| 388 | |
|---|
| 389 | int RefFace_dimension(void *RefFace_ptr); |
|---|
| 390 | /*- Returns the geometric dimension of RefFace entities. */ |
|---|
| 391 | |
|---|
| 392 | double RefFace_area(void *RefFace_ptr); |
|---|
| 393 | /*- get the area of the underlying surface */ |
|---|
| 394 | |
|---|
| 395 | double RefFace_measure(void *RefFace_ptr); |
|---|
| 396 | |
|---|
| 397 | /* CubitString */ const char *RefFace_measure_label(void *RefFace_ptr); |
|---|
| 398 | |
|---|
| 399 | enum CubitBoolean RefFace_is_planar(void *RefFace_ptr); |
|---|
| 400 | /*R CubitBoolean */ |
|---|
| 401 | /*R CUBIT_TRUE/CUBIT_FALSE */ |
|---|
| 402 | /*- This function returns CUBIT_TRUE if the underlying geometry */ |
|---|
| 403 | /*- of the face is planar. CUBIT_FALSE otherwise. */ |
|---|
| 404 | |
|---|
| 405 | enum CubitStatus RefFace_get_point_normal(void *RefFace_ptr, |
|---|
| 406 | /* CubitVector& */ struct CubitVectorStruct *origin, |
|---|
| 407 | /* CubitVector& */ struct CubitVectorStruct *normal); |
|---|
| 408 | /*- Only valid for planar surfaces */ |
|---|
| 409 | /*- Finds the underlying plane's origin and normal (unit) vector */ |
|---|
| 410 | /*- Returns CUBIT_FAILURE if surface is not a plane */ |
|---|
| 411 | |
|---|
| 412 | int RefFace_validate(void *RefFace_ptr); |
|---|
| 413 | /*- Check that entity is valid. Returns number of problems detected. */ |
|---|
| 414 | |
|---|
| 415 | double RefFace_get_crack_length(void *RefFace_ptr); |
|---|
| 416 | /*- return the length of the periodic crack, or 0.0 if non-periodic. */ |
|---|
| 417 | |
|---|
| 418 | void RefFace_add_hard_point_1(void *RefFace_ptr, |
|---|
| 419 | double x, double y, double z); |
|---|
| 420 | /*- Add a hard point to this RefFace. The input "point" is first */ |
|---|
| 421 | /*- moved to the underlying surface, and then a hard point is added */ |
|---|
| 422 | /*- at this, possibly different, location on the surface. */ |
|---|
| 423 | /*-*************************************************************** */ |
|---|
| 424 | /*- MJP Note: */ |
|---|
| 425 | /*- Currently, the new RefVertex that is created is NOT PART OF THE */ |
|---|
| 426 | /*- main DAG datastructure. The new RefVertex, however, has its */ |
|---|
| 427 | /*- own little mini-DAG which consists of a single CDODAGNode. */ |
|---|
| 428 | /*- Discuss this with the team before making it a part of the main DAG. */ |
|---|
| 429 | /*- It is, however, deleted appropriately when the RefFace is deleted. */ |
|---|
| 430 | /*-*************************************************************** */ |
|---|
| 431 | |
|---|
| 432 | void RefFace_add_hard_point_2(void *RefFace_ptr, |
|---|
| 433 | /* RefVertex * */ void *ref_vertex_ptr); |
|---|
| 434 | /*- Add a hard point to this RefFace. */ |
|---|
| 435 | /*-*************************************************************** */ |
|---|
| 436 | /*- MJP Note: */ |
|---|
| 437 | /*- Currently, the new RefVertex that is created is NOT PART OF THE */ |
|---|
| 438 | /*- main DAG datastructure. The new RefVertex, however, has its */ |
|---|
| 439 | /*- own little mini-DAG which consists of a single CDODAGNode. */ |
|---|
| 440 | /*- Discuss this with the team before making it a part of the main DAG. */ |
|---|
| 441 | /*- It is, however, deleted appropriately when the RefFace is deleted. */ |
|---|
| 442 | /*-*************************************************************** */ |
|---|
| 443 | |
|---|
| 444 | /***********Graphics Related Functions********* */ |
|---|
| 445 | void RefFace_draw_my_edges (void *RefFace_ptr, |
|---|
| 446 | int color); |
|---|
| 447 | |
|---|
| 448 | void RefFace_draw_normal(void *RefFace_ptr, |
|---|
| 449 | int color, |
|---|
| 450 | double length, |
|---|
| 451 | /* RefVolume * */ void *wrt_vol); |
|---|
| 452 | |
|---|
| 453 | /* Surface* */ void *RefFace_get_surface_ptr(void *RefFace_ptr); |
|---|
| 454 | /*R Surface* */ |
|---|
| 455 | /*R- A pointer to the Surface to which the current */ |
|---|
| 456 | /*R- face points. */ |
|---|
| 457 | /*- This function returns a pointer to the Surface */ |
|---|
| 458 | /*- to which the current face points. */ |
|---|
| 459 | |
|---|
| 460 | enum EntityType RefFace_entity_type(void *RefFace_ptr); |
|---|
| 461 | |
|---|
| 462 | void* RefFace_get_address(void *RefFace_ptr, |
|---|
| 463 | enum EntityType inputEntityType); |
|---|
| 464 | /*R void* */ |
|---|
| 465 | /*R- Returned void pointer */ |
|---|
| 466 | /*I inputEntityType */ |
|---|
| 467 | /*I- The input type to get the address of. */ |
|---|
| 468 | /*- This function returns a void pointer that points to the */ |
|---|
| 469 | /*- "appropriate" portion of this object. The appropriate */ |
|---|
| 470 | /*- portion is determined by the input EntityType variable. */ |
|---|
| 471 | /*- Returns NULL if the input type and the type of "this" */ |
|---|
| 472 | /*- are not related by inheritance. */ |
|---|
| 473 | /*- Note: The RTTI capabilities encoded in these functions */ |
|---|
| 474 | /*- are designed to work with any form of multiple */ |
|---|
| 475 | /*- inheritance, as well. Multiple inheritance is what */ |
|---|
| 476 | /*- necessitates having this function defined in every */ |
|---|
| 477 | /*- class in the hierarchy. */ |
|---|
| 478 | /*- Note: This function can also be used to merely check if */ |
|---|
| 479 | /*- an object of one type is related to another type */ |
|---|
| 480 | /*- through inheritance. If a non-NULL pointer is */ |
|---|
| 481 | /*- returned, then this is true. */ |
|---|
| 482 | |
|---|
| 483 | void *RefFace_TopologyEntity(void *RefFace_ptr); |
|---|
| 484 | /* cast to a TopologyEntity, then return a void * */ |
|---|
| 485 | |
|---|
| 486 | void *RefFace_RefEntity(void *RefFace_ptr); |
|---|
| 487 | /* cast to a RefEntity, then return a void * */ |
|---|
| 488 | |
|---|
| 489 | enum CubitStatus RefFace_setup_use_facets( void *RefFace_ptr, |
|---|
| 490 | /* DLCubitFacetList &*/ void ***facet_list, int *facet_list_size, |
|---|
| 491 | int interp_order); |
|---|
| 492 | /* set up the underlying geometry to use a faceted base representation. */ |
|---|
| 493 | |
|---|
| 494 | void RefFace_stop_use_facets(void *RefFace_ptr); |
|---|
| 495 | /* stop using the underlying geometry to use a faceted base representation. */ |
|---|
| 496 | |
|---|
| 497 | enum CubitBoolean RefFace_get_use_facets(void *RefFace_ptr); |
|---|
| 498 | /* find out if the surface is using the faceted rep. */ |
|---|
| 499 | |
|---|
| 500 | #ifdef __cplusplus |
|---|
| 501 | } |
|---|
| 502 | #endif |
|---|
| 503 | |
|---|
| 504 | #endif |
|---|