| 1 | #include "RefEdge_ccapi.h" |
|---|
| 2 | |
|---|
| 3 | #include "CubitDefines.h" |
|---|
| 4 | #include "RefVolume.hpp" |
|---|
| 5 | #include "RefFace.hpp" |
|---|
| 6 | #include "RefEdge.hpp" |
|---|
| 7 | #include "RefVertex.hpp" |
|---|
| 8 | |
|---|
| 9 | #include "DLCoEdgeList.hpp" |
|---|
| 10 | #include "DLCubitVectorList.hpp" |
|---|
| 11 | |
|---|
| 12 | #include "CubitVectorStruct.h" |
|---|
| 13 | |
|---|
| 14 | #include "copy_defines.h" |
|---|
| 15 | |
|---|
| 16 | void *RefEdge_get_address(void *this_ref_edge, |
|---|
| 17 | enum EntityType inputEntityType) |
|---|
| 18 | { |
|---|
| 19 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 20 | return temp_ref_edge->get_address(inputEntityType); |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | enum CubitStatus RefEdge_get_point_direction(void *this_ref_edge, |
|---|
| 24 | /* CubitVector & */ struct CubitVectorStruct *origin, |
|---|
| 25 | /* CubitVector & */ struct CubitVectorStruct *direction ) |
|---|
| 26 | { |
|---|
| 27 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 28 | CubitVector temp_origin(*origin); |
|---|
| 29 | CubitVector temp_direction(*direction); |
|---|
| 30 | |
|---|
| 31 | return temp_ref_edge->get_point_direction(temp_origin, temp_direction); |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | enum CubitStatus RefEdge_get_center_radius(void *this_ref_edge, |
|---|
| 35 | /* CubitVector & */ struct CubitVectorStruct *center, |
|---|
| 36 | /* double& */ double *radius ) |
|---|
| 37 | { |
|---|
| 38 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 39 | CubitVector temp_center(*center); |
|---|
| 40 | |
|---|
| 41 | return temp_ref_edge->get_center_radius(temp_center, *radius); |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | enum EntityType RefEdge_entity_type(void *) |
|---|
| 45 | { return RefEdge_TYPE;} |
|---|
| 46 | |
|---|
| 47 | enum EntityType RefEdge_get_child_ref_entity_type(void *) |
|---|
| 48 | { return RefVertex_TYPE; } |
|---|
| 49 | |
|---|
| 50 | enum EntityType RefEdge_get_parent_ref_entity_type(void *) |
|---|
| 51 | { return RefFace_TYPE; } |
|---|
| 52 | |
|---|
| 53 | enum EntityType RefEdge_get_topology_bridge_type(void *) |
|---|
| 54 | { return Curve_TYPE ;} |
|---|
| 55 | |
|---|
| 56 | enum EntityType RefEdge_get_grouping_entity_type(void *) |
|---|
| 57 | { return Chain_TYPE; } |
|---|
| 58 | |
|---|
| 59 | enum EntityType RefEdge_get_sense_entity_type(void *) |
|---|
| 60 | { return CoEdge_TYPE; } |
|---|
| 61 | |
|---|
| 62 | /* RefVertex * */ void *RefEdge_startRefVertex(void *this_ref_edge) |
|---|
| 63 | { |
|---|
| 64 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 65 | return temp_ref_edge->startRefVertex(); |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | /* RefVertex * */ void *RefEdge_endRefVertex(void *this_ref_edge) |
|---|
| 69 | { |
|---|
| 70 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 71 | return temp_ref_edge->endRefVertex(); |
|---|
| 72 | } |
|---|
| 73 | |
|---|
| 74 | void RefEdge_switch_vertices(void *this_ref_edge) |
|---|
| 75 | { |
|---|
| 76 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 77 | temp_ref_edge->switch_vertices(); |
|---|
| 78 | } |
|---|
| 79 | |
|---|
| 80 | /* Chain * */ void *RefEdge_get_first_chain_ptr(void *this_ref_edge) |
|---|
| 81 | { |
|---|
| 82 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 83 | return temp_ref_edge->get_first_chain_ptr(); |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | enum CubitStatus RefEdge_get_co_edges(void *this_ref_edge, |
|---|
| 87 | /* DLCoEdgeList & */ void ***co_edges_found_list, int *co_edges_found_list_size, |
|---|
| 88 | /* RefFace * */ void *input_ref_face_ptr) |
|---|
| 89 | { |
|---|
| 90 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 91 | |
|---|
| 92 | RefFace *temp_input_ref_face_ptr = (RefFace *) input_ref_face_ptr; |
|---|
| 93 | DLCoEdgeList temp_co_edges_found_list; |
|---|
| 94 | |
|---|
| 95 | CubitStatus result = temp_ref_edge->get_co_edges(temp_co_edges_found_list, temp_input_ref_face_ptr); |
|---|
| 96 | |
|---|
| 97 | COPY_LIST_TO_ARRAY(temp_co_edges_found_list, *co_edges_found_list, *co_edges_found_list_size); |
|---|
| 98 | |
|---|
| 99 | return result; |
|---|
| 100 | } |
|---|
| 101 | |
|---|
| 102 | double RefEdge_angle_between(void *this_ref_edge, |
|---|
| 103 | /* RefEdge * */ void *other_edge_ptr, /* RefFace * */ void *face_ptr ) |
|---|
| 104 | { |
|---|
| 105 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 106 | |
|---|
| 107 | RefEdge *temp_other_edge_ptr = (RefEdge *) other_edge_ptr; |
|---|
| 108 | RefFace *temp_face_ptr = (RefFace *) face_ptr; |
|---|
| 109 | |
|---|
| 110 | return temp_ref_edge->angle_between(temp_other_edge_ptr, temp_face_ptr); |
|---|
| 111 | } |
|---|
| 112 | |
|---|
| 113 | enum CubitSense RefEdge_sense(void *this_ref_edge, |
|---|
| 114 | /* RefFace * */ void *face ) |
|---|
| 115 | { |
|---|
| 116 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 117 | RefFace *temp_face = (RefFace *) face; |
|---|
| 118 | |
|---|
| 119 | return temp_ref_edge->sense(temp_face); |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | int RefEdge_dimension(void *this_ref_edge) |
|---|
| 123 | { |
|---|
| 124 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 125 | return temp_ref_edge->dimension(); |
|---|
| 126 | } |
|---|
| 127 | |
|---|
| 128 | /* RefVertex * */ void *RefEdge_common_ref_vertex_1(void *this_ref_edge, |
|---|
| 129 | /* RefEdge * */ void *otherRefEdgePtr ) |
|---|
| 130 | { |
|---|
| 131 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 132 | RefEdge *temp_otherRefEdgePtr = (RefEdge *) otherRefEdgePtr; |
|---|
| 133 | |
|---|
| 134 | return temp_ref_edge->common_ref_vertex(temp_otherRefEdgePtr); |
|---|
| 135 | } |
|---|
| 136 | /* RefVertex * */ void *RefEdge_common_ref_vertex_2(void *this_ref_edge, |
|---|
| 137 | /* RefEdge * */ void *next_ref_edge, |
|---|
| 138 | /* RefFace * */ void *ref_face_ptr ) |
|---|
| 139 | { |
|---|
| 140 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 141 | RefEdge *temp_next_ref_edge = (RefEdge *) next_ref_edge; |
|---|
| 142 | RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr; |
|---|
| 143 | |
|---|
| 144 | return temp_ref_edge->common_ref_vertex(temp_next_ref_edge, temp_ref_face_ptr); |
|---|
| 145 | } |
|---|
| 146 | |
|---|
| 147 | enum CubitBoolean RefEdge_common_vertices(void *this_ref_edge, |
|---|
| 148 | /* RefEdge * */ void *otherRefEdgePtr, |
|---|
| 149 | /* DLRefVertexList & */ void ***common_verts, int *common_verts_size) |
|---|
| 150 | { |
|---|
| 151 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 152 | RefEdge *temp_otherRefEdgePtr = (RefEdge *) otherRefEdgePtr; |
|---|
| 153 | |
|---|
| 154 | DLRefVertexList temp_common_verts; |
|---|
| 155 | |
|---|
| 156 | enum CubitBoolean result = temp_ref_edge->common_vertices(temp_otherRefEdgePtr, temp_common_verts); |
|---|
| 157 | |
|---|
| 158 | COPY_LIST_TO_ARRAY(temp_common_verts, *common_verts, *common_verts_size); |
|---|
| 159 | |
|---|
| 160 | return result; |
|---|
| 161 | } |
|---|
| 162 | |
|---|
| 163 | /* RefEdge * */ void *RefEdge_get_other_curve(void *this_ref_edge, |
|---|
| 164 | /* RefVertex * */ void *common_vertex, |
|---|
| 165 | /* RefFace * */ void *ref_face_ptr) |
|---|
| 166 | { |
|---|
| 167 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 168 | |
|---|
| 169 | RefVertex *temp_common_vertex = (RefVertex *) common_vertex; |
|---|
| 170 | |
|---|
| 171 | RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr; |
|---|
| 172 | |
|---|
| 173 | return temp_ref_edge->get_other_curve(temp_common_vertex, temp_ref_face_ptr); |
|---|
| 174 | } |
|---|
| 175 | |
|---|
| 176 | enum CubitStatus RefEdge_get_two_co_edges(void *this_ref_edge, |
|---|
| 177 | /* RefEdge * */ void *next_ref_edge, |
|---|
| 178 | /* RefFace * */ void *ref_face_ptr, |
|---|
| 179 | /* CoEdge *& */ void **co_edge_this, |
|---|
| 180 | /* CoEdge *& */ void **co_edge_next ) |
|---|
| 181 | { |
|---|
| 182 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 183 | RefEdge *temp_next_ref_edge = (RefEdge *) next_ref_edge; |
|---|
| 184 | |
|---|
| 185 | RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr; |
|---|
| 186 | |
|---|
| 187 | CoEdge *temp_co_edge_this; |
|---|
| 188 | CoEdge *temp_co_edge_next; |
|---|
| 189 | |
|---|
| 190 | enum CubitStatus result = temp_ref_edge->get_two_co_edges(temp_next_ref_edge, temp_ref_face_ptr, |
|---|
| 191 | temp_co_edge_this, temp_co_edge_next); |
|---|
| 192 | |
|---|
| 193 | *co_edge_this = temp_co_edge_this; |
|---|
| 194 | *co_edge_next = temp_co_edge_next; |
|---|
| 195 | |
|---|
| 196 | return result; |
|---|
| 197 | } |
|---|
| 198 | |
|---|
| 199 | /* RefFace * */ void *RefEdge_other_face(void *this_ref_edge, |
|---|
| 200 | /* RefFace * */ void *not_face, |
|---|
| 201 | /* RefVolume * */ void *ref_volume) |
|---|
| 202 | { |
|---|
| 203 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 204 | |
|---|
| 205 | RefFace *temp_not_face = (RefFace *) not_face; |
|---|
| 206 | RefVolume *temp_ref_volume = (RefVolume *) ref_volume; |
|---|
| 207 | |
|---|
| 208 | return temp_ref_edge->other_face(temp_not_face, temp_ref_volume); |
|---|
| 209 | } |
|---|
| 210 | |
|---|
| 211 | /* RefVertex * */ void *RefEdge_other_vertex(void *this_ref_edge, |
|---|
| 212 | /* RefVertex * */ void *refVertexPtr) |
|---|
| 213 | { |
|---|
| 214 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 215 | RefVertex *temp_refVertexPtr = (RefVertex *) refVertexPtr; |
|---|
| 216 | |
|---|
| 217 | return temp_ref_edge->other_vertex(temp_refVertexPtr); |
|---|
| 218 | } |
|---|
| 219 | |
|---|
| 220 | /* RefVertex * */ void *RefEdge_closest_vertex(void *this_ref_edge, |
|---|
| 221 | const /* CubitVector & */ struct CubitVectorStruct *point3) |
|---|
| 222 | { |
|---|
| 223 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 224 | return temp_ref_edge->closest_vertex(*point3); |
|---|
| 225 | } |
|---|
| 226 | |
|---|
| 227 | /* Curve * */ void *RefEdge_get_curve_ptr(void *this_ref_edge) |
|---|
| 228 | { |
|---|
| 229 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 230 | return temp_ref_edge->get_curve_ptr(); |
|---|
| 231 | } |
|---|
| 232 | |
|---|
| 233 | struct CubitVectorStruct RefEdge_start_coordinates(void *this_ref_edge) |
|---|
| 234 | { |
|---|
| 235 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 236 | return temp_ref_edge->start_coordinates(); |
|---|
| 237 | } |
|---|
| 238 | struct CubitVectorStruct RefEdge_end_coordinates(void *this_ref_edge) |
|---|
| 239 | { |
|---|
| 240 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 241 | return temp_ref_edge->end_coordinates(); |
|---|
| 242 | } |
|---|
| 243 | |
|---|
| 244 | void RefEdge_move_to_curve (void *this_ref_edge, |
|---|
| 245 | /* CubitVector & */ struct CubitVectorStruct *vector ) |
|---|
| 246 | { |
|---|
| 247 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 248 | CubitVector temp_vector(*vector); |
|---|
| 249 | |
|---|
| 250 | temp_ref_edge->move_to_curve (temp_vector); |
|---|
| 251 | |
|---|
| 252 | *vector = temp_vector; |
|---|
| 253 | } |
|---|
| 254 | |
|---|
| 255 | enum CubitStatus RefEdge_get_interior_extrema(void *this_ref_edge, |
|---|
| 256 | /* DLCubitVectorList& */ struct CubitVectorStruct **interior_points, |
|---|
| 257 | int *interior_points_size, |
|---|
| 258 | /* CubitSense& */ enum CubitSense *return_sense) |
|---|
| 259 | { |
|---|
| 260 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 261 | DLCubitVectorList temp_interior_points; |
|---|
| 262 | |
|---|
| 263 | |
|---|
| 264 | enum CubitStatus result = temp_ref_edge->get_interior_extrema(temp_interior_points, *return_sense); |
|---|
| 265 | COPY_LIST_TO_STRUCTARRAY(temp_interior_points, *interior_points, *interior_points_size, |
|---|
| 266 | CubitVectorStruct); |
|---|
| 267 | |
|---|
| 268 | return result; |
|---|
| 269 | } |
|---|
| 270 | |
|---|
| 271 | enum CubitStatus RefEdge_closest_point_trimmed(void *this_ref_edge, |
|---|
| 272 | /* CubitVector const& */ struct CubitVectorStruct *location, |
|---|
| 273 | /* CubitVector & */ struct CubitVectorStruct *closest_location) |
|---|
| 274 | { |
|---|
| 275 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 276 | CubitVector temp_closest_location; |
|---|
| 277 | |
|---|
| 278 | enum CubitStatus result = temp_ref_edge->closest_point_trimmed(*location, temp_closest_location); |
|---|
| 279 | |
|---|
| 280 | *closest_location = temp_closest_location; |
|---|
| 281 | |
|---|
| 282 | return result; |
|---|
| 283 | } |
|---|
| 284 | |
|---|
| 285 | enum CubitStatus RefEdge_closest_point(void *this_ref_edge, |
|---|
| 286 | /* CubitVector const& */ struct CubitVectorStruct *location, |
|---|
| 287 | /* CubitVector & */ struct CubitVectorStruct *closest_location, |
|---|
| 288 | /* CubitVector * */ struct CubitVectorStruct *tangent_ptr, |
|---|
| 289 | /* CubitVector * */ struct CubitVectorStruct *curvature_ptr) |
|---|
| 290 | { |
|---|
| 291 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 292 | |
|---|
| 293 | CubitVector temp_closest_location; |
|---|
| 294 | CubitVector *temp_tangent_ptr = (tangent_ptr ? new CubitVector(*tangent_ptr) : |
|---|
| 295 | NULL); |
|---|
| 296 | CubitVector *temp_curvature_ptr = (curvature_ptr ? new CubitVector(*curvature_ptr) : |
|---|
| 297 | NULL); |
|---|
| 298 | |
|---|
| 299 | |
|---|
| 300 | enum CubitStatus result = temp_ref_edge->closest_point(*location, temp_closest_location, |
|---|
| 301 | temp_tangent_ptr, temp_curvature_ptr); |
|---|
| 302 | |
|---|
| 303 | *closest_location = temp_closest_location; |
|---|
| 304 | |
|---|
| 305 | if (temp_tangent_ptr) { |
|---|
| 306 | *tangent_ptr = *temp_tangent_ptr; |
|---|
| 307 | delete temp_tangent_ptr; |
|---|
| 308 | } |
|---|
| 309 | if (temp_curvature_ptr) { |
|---|
| 310 | *curvature_ptr = *temp_curvature_ptr; |
|---|
| 311 | delete temp_curvature_ptr; |
|---|
| 312 | } |
|---|
| 313 | |
|---|
| 314 | return result; |
|---|
| 315 | } |
|---|
| 316 | |
|---|
| 317 | void RefEdge_tangent_1(void *this_ref_edge, |
|---|
| 318 | const /* CubitVector & */ struct CubitVectorStruct *point, |
|---|
| 319 | /* CubitVector & */ struct CubitVectorStruct *tangent_vec ) |
|---|
| 320 | { |
|---|
| 321 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 322 | |
|---|
| 323 | CubitVector temp_tangent_vec, temp_point(*point); |
|---|
| 324 | |
|---|
| 325 | temp_ref_edge->tangent(temp_point, temp_tangent_vec); |
|---|
| 326 | |
|---|
| 327 | *tangent_vec = temp_tangent_vec; |
|---|
| 328 | } |
|---|
| 329 | |
|---|
| 330 | enum CubitStatus RefEdge_tangent_2(void *this_ref_edge, |
|---|
| 331 | const /* CubitVector & */ struct CubitVectorStruct *point, |
|---|
| 332 | /* CubitVector & */ struct CubitVectorStruct *tangent_vec, |
|---|
| 333 | /* RefFace * */ void *ref_face_ptr) |
|---|
| 334 | { |
|---|
| 335 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 336 | RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr; |
|---|
| 337 | |
|---|
| 338 | CubitVector temp_tangent_vec; |
|---|
| 339 | |
|---|
| 340 | enum CubitStatus result = temp_ref_edge->tangent(*point, temp_tangent_vec, temp_ref_face_ptr); |
|---|
| 341 | |
|---|
| 342 | *tangent_vec = temp_tangent_vec; |
|---|
| 343 | |
|---|
| 344 | return result; |
|---|
| 345 | |
|---|
| 346 | } |
|---|
| 347 | |
|---|
| 348 | enum CubitStatus RefEdge_tangent_3(void *this_ref_edge, |
|---|
| 349 | const /* CubitVector & */ struct CubitVectorStruct *point, |
|---|
| 350 | /* CubitVector & */ struct CubitVectorStruct *tangent_vec, |
|---|
| 351 | /* RefEdge * */ void *next_ref_edge, |
|---|
| 352 | /* RefFace * */ void *ref_face_ptr ) |
|---|
| 353 | { |
|---|
| 354 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 355 | RefEdge *temp_next_ref_edge = (RefEdge *) next_ref_edge; |
|---|
| 356 | RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr; |
|---|
| 357 | |
|---|
| 358 | CubitVector temp_tangent_vec; |
|---|
| 359 | |
|---|
| 360 | enum CubitStatus result = temp_ref_edge->tangent(*point, temp_tangent_vec, |
|---|
| 361 | temp_next_ref_edge, temp_ref_face_ptr); |
|---|
| 362 | *tangent_vec = temp_tangent_vec; |
|---|
| 363 | |
|---|
| 364 | return result; |
|---|
| 365 | |
|---|
| 366 | } |
|---|
| 367 | |
|---|
| 368 | double RefEdge_measure(void *this_ref_edge) |
|---|
| 369 | { |
|---|
| 370 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 371 | return temp_ref_edge->measure(); |
|---|
| 372 | } |
|---|
| 373 | |
|---|
| 374 | /* CubitString */ const char *measure_label(void *this_ref_edge) |
|---|
| 375 | { |
|---|
| 376 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 377 | return temp_ref_edge->measure_label().c_str(); |
|---|
| 378 | } |
|---|
| 379 | |
|---|
| 380 | double RefEdge_get_arc_length_1(void *this_ref_edge) |
|---|
| 381 | { |
|---|
| 382 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 383 | return temp_ref_edge->get_arc_length(); |
|---|
| 384 | } |
|---|
| 385 | |
|---|
| 386 | double RefEdge_get_arc_length_2(void *this_ref_edge, |
|---|
| 387 | const /* CubitVector & */ struct CubitVectorStruct *point1, |
|---|
| 388 | const /* CubitVector & */ struct CubitVectorStruct *point2 ) |
|---|
| 389 | { |
|---|
| 390 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 391 | return temp_ref_edge->get_arc_length(*point1, *point2); |
|---|
| 392 | } |
|---|
| 393 | |
|---|
| 394 | double RefEdge_get_arc_length_3(void *this_ref_edge, |
|---|
| 395 | const /* CubitVector & */ struct CubitVectorStruct *point1, const int whichEnd ) |
|---|
| 396 | { |
|---|
| 397 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 398 | return temp_ref_edge->get_arc_length(*point1, whichEnd); |
|---|
| 399 | } |
|---|
| 400 | |
|---|
| 401 | double RefEdge_get_chord_length(void *this_ref_edge) |
|---|
| 402 | { |
|---|
| 403 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 404 | return temp_ref_edge->get_chord_length(); |
|---|
| 405 | } |
|---|
| 406 | |
|---|
| 407 | /* CubitVector */ struct CubitVectorStruct RefEdge_center_point(void *this_ref_edge) |
|---|
| 408 | { |
|---|
| 409 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 410 | return temp_ref_edge->center_point(); |
|---|
| 411 | } |
|---|
| 412 | |
|---|
| 413 | enum CubitStatus RefEdge_mid_point_1(void *this_ref_edge, |
|---|
| 414 | const /* CubitVector & */ struct CubitVectorStruct *point1, |
|---|
| 415 | const /* CubitVector & */ struct CubitVectorStruct *point2, |
|---|
| 416 | /* CubitVector & */ struct CubitVectorStruct *midPoint ) |
|---|
| 417 | { |
|---|
| 418 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 419 | CubitVector temp_midPoint; |
|---|
| 420 | |
|---|
| 421 | enum CubitStatus result = temp_ref_edge->mid_point(*point1, *point2, temp_midPoint); |
|---|
| 422 | |
|---|
| 423 | *midPoint = temp_midPoint; |
|---|
| 424 | |
|---|
| 425 | return result; |
|---|
| 426 | } |
|---|
| 427 | |
|---|
| 428 | enum CubitStatus RefEdge_mid_point_2(void *this_ref_edge, |
|---|
| 429 | /* CubitVector & */ struct CubitVectorStruct *mid_point) |
|---|
| 430 | { |
|---|
| 431 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 432 | CubitVector temp_mid_point; |
|---|
| 433 | |
|---|
| 434 | enum CubitStatus result = temp_ref_edge->mid_point(temp_mid_point); |
|---|
| 435 | |
|---|
| 436 | *mid_point = temp_mid_point; |
|---|
| 437 | |
|---|
| 438 | return result; |
|---|
| 439 | } |
|---|
| 440 | |
|---|
| 441 | enum CubitStatus RefEdge_position_from_fraction(void *this_ref_edge, |
|---|
| 442 | const double fraction_along_curve, |
|---|
| 443 | /* CubitVector & */ struct CubitVectorStruct *output_position ) |
|---|
| 444 | { |
|---|
| 445 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 446 | CubitVector temp_output_position; |
|---|
| 447 | |
|---|
| 448 | enum CubitStatus result = temp_ref_edge->position_from_fraction(fraction_along_curve, temp_output_position); |
|---|
| 449 | |
|---|
| 450 | *output_position = temp_output_position; |
|---|
| 451 | |
|---|
| 452 | return result; |
|---|
| 453 | } |
|---|
| 454 | |
|---|
| 455 | double RefEdge_start_param(void *this_ref_edge) |
|---|
| 456 | { |
|---|
| 457 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 458 | return temp_ref_edge->start_param(); |
|---|
| 459 | } |
|---|
| 460 | |
|---|
| 461 | double RefEdge_end_param(void *this_ref_edge) |
|---|
| 462 | { |
|---|
| 463 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 464 | return temp_ref_edge->end_param(); |
|---|
| 465 | } |
|---|
| 466 | |
|---|
| 467 | enum CubitBoolean RefEdge_get_param_range(void *this_ref_edge, |
|---|
| 468 | /* double& */ double *start_param, |
|---|
| 469 | /* double& */ double *end_param ) |
|---|
| 470 | { |
|---|
| 471 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 472 | return temp_ref_edge->get_param_range(*start_param, *end_param); |
|---|
| 473 | } |
|---|
| 474 | |
|---|
| 475 | double RefEdge_u_from_position (void *this_ref_edge, |
|---|
| 476 | const /* CubitVector & */ struct CubitVectorStruct *input_position) |
|---|
| 477 | { |
|---|
| 478 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 479 | return temp_ref_edge->u_from_position (*input_position); |
|---|
| 480 | } |
|---|
| 481 | |
|---|
| 482 | enum CubitStatus RefEdge_position_from_u (void *this_ref_edge, |
|---|
| 483 | double u_value, |
|---|
| 484 | /* CubitVector & */ struct CubitVectorStruct *output_position) |
|---|
| 485 | { |
|---|
| 486 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 487 | CubitVector temp_output_position; |
|---|
| 488 | |
|---|
| 489 | enum CubitStatus result = temp_ref_edge->position_from_u (u_value, temp_output_position); |
|---|
| 490 | |
|---|
| 491 | *output_position = temp_output_position; |
|---|
| 492 | |
|---|
| 493 | return result; |
|---|
| 494 | } |
|---|
| 495 | |
|---|
| 496 | double RefEdge_u_from_arc_length (void *this_ref_edge, |
|---|
| 497 | double root_param, |
|---|
| 498 | double arc_length ) |
|---|
| 499 | { |
|---|
| 500 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 501 | return temp_ref_edge->u_from_arc_length (root_param, arc_length); |
|---|
| 502 | } |
|---|
| 503 | |
|---|
| 504 | enum CubitStatus RefEdge_point_from_arc_length (void *this_ref_edge, |
|---|
| 505 | const /* CubitVector & */ struct CubitVectorStruct *root_point, |
|---|
| 506 | double const arc_length, |
|---|
| 507 | /* CubitVector & */ struct CubitVectorStruct *new_point ) |
|---|
| 508 | { |
|---|
| 509 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 510 | CubitVector temp_new_point; |
|---|
| 511 | |
|---|
| 512 | enum CubitStatus result = temp_ref_edge->point_from_arc_length (*root_point, arc_length, temp_new_point); |
|---|
| 513 | |
|---|
| 514 | *new_point = temp_new_point; |
|---|
| 515 | |
|---|
| 516 | return result; |
|---|
| 517 | } |
|---|
| 518 | |
|---|
| 519 | double RefEdge_length_from_u(void *this_ref_edge, |
|---|
| 520 | double parameter1, |
|---|
| 521 | double parameter2 ) |
|---|
| 522 | { |
|---|
| 523 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 524 | return temp_ref_edge->length_from_u(parameter1, parameter2); |
|---|
| 525 | } |
|---|
| 526 | |
|---|
| 527 | enum CubitBoolean RefEdge_is_periodic_1(void *this_ref_edge) |
|---|
| 528 | { |
|---|
| 529 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 530 | return temp_ref_edge->is_periodic(); |
|---|
| 531 | } |
|---|
| 532 | |
|---|
| 533 | enum CubitBoolean RefEdge_is_periodic_2(void *this_ref_edge, |
|---|
| 534 | /* double& */ double *period) |
|---|
| 535 | { |
|---|
| 536 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 537 | return temp_ref_edge->is_periodic(*period); |
|---|
| 538 | } |
|---|
| 539 | |
|---|
| 540 | int RefEdge_get_mark(void *this_ref_edge) |
|---|
| 541 | { |
|---|
| 542 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 543 | return temp_ref_edge->get_mark(); |
|---|
| 544 | } |
|---|
| 545 | void RefEdge_set_mark(void *this_ref_edge, |
|---|
| 546 | int set_value ) |
|---|
| 547 | { |
|---|
| 548 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 549 | temp_ref_edge->set_mark(set_value); |
|---|
| 550 | } |
|---|
| 551 | |
|---|
| 552 | enum CubitStatus RefEdge_relative_sense(void *this_ref_edge, |
|---|
| 553 | /* RefEdge * */ void *ref_edge_ptr_2, |
|---|
| 554 | double tolerance_factor, |
|---|
| 555 | enum CubitSense *sense, |
|---|
| 556 | /* CubitBoolean & */ enum CubitBoolean *spatially_equal, |
|---|
| 557 | /* CubitBoolean & */ enum CubitBoolean *tangent_warning, |
|---|
| 558 | enum CubitBoolean force_merge) |
|---|
| 559 | { |
|---|
| 560 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 561 | RefEdge *temp_ref_edge_ptr_2 = (RefEdge *) ref_edge_ptr_2; |
|---|
| 562 | |
|---|
| 563 | return temp_ref_edge->relative_sense(temp_ref_edge_ptr_2, tolerance_factor, sense, |
|---|
| 564 | *spatially_equal, *tangent_warning, force_merge); |
|---|
| 565 | } |
|---|
| 566 | |
|---|
| 567 | enum CubitBoolean RefEdge_about_spatially_equal(void *this_ref_edge, |
|---|
| 568 | /* RefEdge * */ void *ref_edge_ptr_2, |
|---|
| 569 | double tolerance_factor, |
|---|
| 570 | enum CubitSense *sensePtr, |
|---|
| 571 | enum CubitBoolean notify_refEntity, |
|---|
| 572 | enum CubitBoolean force_merge) |
|---|
| 573 | { |
|---|
| 574 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 575 | RefEdge *temp_ref_edge_ptr_2 = (RefEdge *) ref_edge_ptr_2; |
|---|
| 576 | |
|---|
| 577 | return temp_ref_edge->about_spatially_equal(temp_ref_edge_ptr_2, tolerance_factor, |
|---|
| 578 | sensePtr, notify_refEntity, force_merge); |
|---|
| 579 | } |
|---|
| 580 | |
|---|
| 581 | |
|---|
| 582 | int RefEdge_validate(void *this_ref_edge) |
|---|
| 583 | { |
|---|
| 584 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 585 | return temp_ref_edge->validate(); |
|---|
| 586 | } |
|---|
| 587 | |
|---|
| 588 | enum CubitBoolean RefEdge_is_tolerant(void *this_ref_edge) |
|---|
| 589 | { |
|---|
| 590 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 591 | return temp_ref_edge->is_tolerant(); |
|---|
| 592 | } |
|---|
| 593 | |
|---|
| 594 | /* RefVertex * */ void *RefEdge_get_startRefVertex(void *this_ref_edge) |
|---|
| 595 | { |
|---|
| 596 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 597 | return temp_ref_edge->get_startRefVertex(); |
|---|
| 598 | } |
|---|
| 599 | /* RefVertex * */ void *RefEdge_get_endRefVertex(void *this_ref_edge) |
|---|
| 600 | { |
|---|
| 601 | RefEdge *temp_ref_edge = (RefEdge *) this_ref_edge; |
|---|
| 602 | return temp_ref_edge->get_endRefVertex(); |
|---|
| 603 | } |
|---|