double RefEdge::u_from_arc_length ( double root_param, double arc_length ) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); if (curvePtr->bridge_sense() == CUBIT_REVERSED) return -(curvePtr->u_from_arc_length(-root_param, -arc_length)); else return curvePtr->u_from_arc_length(root_param, arc_length); }
double RefEdge::length_from_u( double parameter1, double parameter2 ) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); if (curvePtr->bridge_sense() == CUBIT_REVERSED) return -(curvePtr->length_from_u(-parameter1, -parameter2)); else return curvePtr->length_from_u(parameter1, parameter2); }
CubitStatus RefEdge::get_interior_extrema(DLIList<CubitVector*>& interior_points, CubitSense& return_sense) const { CubitStatus result; // Cast away the constness of the Curve Curve* curve = const_cast<Curve*>(get_curve_ptr()); result = curve->get_interior_extrema(interior_points, return_sense); if (curve->bridge_sense() == CUBIT_REVERSED) return_sense = CubitUtil::opposite_sense(return_sense); return result; }
CubitStatus RefEdge::position_from_u (double u_value, CubitVector& output_position) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); if (curvePtr->bridge_sense() == CUBIT_REVERSED) u_value = -u_value; // Now get the parameter values of the start and end locations // of this RefEdge return curvePtr->position_from_u(u_value, output_position); }
double RefEdge::u_from_position (const CubitVector& input_position) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); // Now get the parameter values of the start and end locations // of this RefEdge double param = curvePtr->u_from_position(input_position); if (curvePtr->bridge_sense() == CUBIT_REVERSED) param = -param; return param; }
CubitBoolean RefEdge::is_periodic( double& period) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); // Now get the parameter values of the start and end locations // of this RefEdge CubitBoolean periodic = curvePtr->is_periodic(period); if (curvePtr->bridge_sense() == CUBIT_REVERSED) period = -period; return periodic; }
CubitStatus RefEdge::point_from_arc_length ( double root_param, double arc_length, CubitVector& new_point ) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); if (curvePtr->bridge_sense() == CUBIT_REVERSED) arc_length = -arc_length; // Now get the parameter values of the start and end locations // of this RefEdge return curvePtr->point_from_arc_length (root_param, arc_length, new_point ); }
CubitBoolean RefEdge::get_param_range( double& start_param, double& end_param ) { // Get the Curve of this RefEdge Curve* curvePtr = this->get_curve_ptr(); // Now get the parameter values of the start and end locations // of this RefEdge CubitBoolean result = curvePtr->get_param_range( start_param, end_param ); if (curvePtr->bridge_sense() == CUBIT_REVERSED) { double tmp_start_param = start_param; start_param = -end_param; end_param = -tmp_start_param; } return result; }