FUNCTION gbsf_check_curve

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP232
-- IN AP203e2/AP214/AP232/AP238 STEP-NC/AP242
FUNCTION gbsf_check_curve
      (cv : representation_item ) : BOOLEAN;
      IF SIZEOF([ 'STEP_MERGED_AP_SCHEMA.BOUNDED_CURVE', 'STEP_MERGED_AP_SCHEMA.CONIC', 'STEP_MERGED_AP_SCHEMA.CURVE_REPLICA', 'STEP_MERGED_AP_SCHEMA.LINE', 'STEP_MERGED_AP_SCHEMA.OFFSET_CURVE_3D' ] * TYPEOF(cv)) > 1 THEN
         RETURN (FALSE);
      END_IF;
      IF SIZEOF([ 'STEP_MERGED_AP_SCHEMA.CIRCLE', 'STEP_MERGED_AP_SCHEMA.ELLIPSE', 'STEP_MERGED_AP_SCHEMA.TRIMMED_CURVE' ] * TYPEOF(cv)) = 1 THEN
         RETURN (TRUE);
      ELSE
         IF ('STEP_MERGED_AP_SCHEMA.B_SPLINE_CURVE' IN TYPEOF(cv)) AND (cv\b_spline_curve.self_intersect = FALSE) OR (cv\b_spline_curve.self_intersect = UNKNOWN) THEN
            RETURN (TRUE);
         ELSE
            IF ('STEP_MERGED_AP_SCHEMA.COMPOSITE_CURVE' IN TYPEOF(cv)) AND (cv\composite_curve.self_intersect = FALSE) OR (cv\composite_curve.self_intersect = UNKNOWN) THEN
               RETURN (SIZEOF(QUERY (seg <* cv\composite_curve.segments| NOT gbsf_check_curve(seg.parent_curve))) = 0);
            ELSE
               IF 'STEP_MERGED_AP_SCHEMA.CURVE_REPLICA' IN TYPEOF(cv) THEN
                  RETURN (gbsf_check_curve(cv\curve_replica.parent_curve));
               ELSE
                  IF (('STEP_MERGED_AP_SCHEMA.OFFSET_CURVE_3D' IN TYPEOF(cv)) AND ((cv\offset_curve_3d.self_intersect = FALSE) OR (cv\offset_curve_3d.self_intersect = UNKNOWN))) AND NOT ('STEP_MERGED_AP_SCHEMA.POLYLINE' IN TYPEOF(cv\offset_curve_3d.basis_curve)) THEN
                     RETURN (gbsf_check_curve(cv\offset_curve_3d.basis_curve));
                  ELSE
                     IF 'STEP_MERGED_AP_SCHEMA.PCURVE' IN TYPEOF(cv) THEN
                        RETURN (gbsf_check_curve(cv\pcurve.reference_to_curve\representation.items[1]) AND gbsf_check_surface(cv\pcurve.basis_surface));
                     ELSE
                        IF 'STEP_MERGED_AP_SCHEMA.POLYLINE' IN TYPEOF(cv) THEN
                           IF SIZEOF(cv\polyline.points) >= 3 THEN
                              RETURN (TRUE);
                           END_IF;
                        ELSE
                           IF 'STEP_MERGED_AP_SCHEMA.SURFACE_CURVE' IN TYPEOF(cv) THEN
                              IF gbsf_check_curve(cv\surface_curve.curve_3d) THEN
                                 REPEAT i := 1 TO SIZEOF(cv\surface_curve.associated_geometry);
                                    IF 'STEP_MERGED_AP_SCHEMA.SURFACE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
                                       IF NOT gbsf_check_surface(cv\surface_curve.associated_geometry[i]) THEN
                                          RETURN (FALSE);
                                       END_IF;
                                    ELSE
                                       IF 'STEP_MERGED_AP_SCHEMA.PCURVE' IN TYPEOF(cv\surface_curve.associated_geometry[i]) THEN
                                          IF NOT gbsf_check_curve(cv\surface_curve.associated_geometry[i]) THEN
                                             RETURN (FALSE);
                                          END_IF;
                                       END_IF;
                                    END_IF;
                                 END_REPEAT;
                                 RETURN (TRUE);
                              END_IF;
                           END_IF;
                        END_IF;
                     END_IF;
                  END_IF;
               END_IF;
            END_IF;
         END_IF;
      END_IF;
      RETURN (FALSE);
END_FUNCTION;

Referenced By

Defintion gbsf_check_curve is references by the following definitions:
DefinitionType
 gbsf_check_point FUNCTION
 gbsf_check_surface FUNCTION
 geometrically_bounded_surface_shape_representation ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00