CubitStatus RefEdge::get_point_direction( CubitVector& origin, CubitVector& direction ) { Curve* curve_ptr = get_curve_ptr(); if( curve_ptr != NULL ) { if( curve_ptr->geometry_type() != STRAIGHT_CURVE_TYPE ) return CUBIT_FAILURE; if( curve_ptr->get_point_direction( origin, direction ) == CUBIT_FAILURE ) { origin = start_coordinates(); direction = end_coordinates() - origin; direction.normalize(); } } else { PRINT_WARNING("In RefEdge::get_point_direction\n" " %s (curve %d) is not associated with a valid\n" " underlying geometric Curve\n", entity_name().c_str(), id()) ; return CUBIT_FAILURE ; } if (curve_ptr->bridge_sense() == CUBIT_REVERSED) direction = -direction; return CUBIT_SUCCESS; }
great_circle::arc::operator std::string() const { return "[" + std::string(begin_coordinates()) + " -> " +std::string(end_coordinates()) + "]"; }