|
FUNCTION msf_curve_check (cv : representation_item) : BOOLEAN; IF SIZEOF ( [ 'aic_manifold_surface.bounded_curve' , 'aic_manifold_surface.conic' , 'aic_manifold_surface.curve_replica' , 'aic_manifold_surface.line' , 'aic_manifold_surface.offset_curve_3d' ] * TYPEOF ( cv ) ) > 1 THEN RETURN ( FALSE ) ; END_IF ; IF ( ( 'aic_manifold_surface.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 SIZEOF ( [ 'aic_manifold_surface.conic' , 'aic_manifold_surface.line' ] * TYPEOF ( cv ) ) = 1 THEN RETURN ( TRUE ) ; ELSE IF 'aic_manifold_surface.curve_replica' IN TYPEOF ( cv ) THEN RETURN ( msf_curve_check ( cv \ curve_replica . parent_curve ) ) ; ELSE IF ( ( 'aic_manifold_surface.offset_curve_3d' IN TYPEOF ( cv ) ) AND ( ( cv \ offset_curve_3d . self_intersect = FALSE ) OR ( cv \ offset_curve_3d . self_intersect = UNKNOWN ) ) AND ( NOT ( 'aic_manifold_surface.polyline' IN TYPEOF ( cv \ offset_curve_3d . basis_curve ) ) ) ) THEN RETURN ( msf_curve_check ( cv \ offset_curve_3d . basis_curve ) ) ; ELSE IF 'aic_manifold_surface.pcurve' IN TYPEOF ( cv ) THEN RETURN ( ( msf_curve_check ( cv \ pcurve . reference_to_curve \ representation . items [ 1 ] ) ) AND ( msf_surface_check ( cv \ pcurve . basis_surface ) ) ) ; ELSE IF 'aic_manifold_surface.surface_curve' IN TYPEOF ( cv ) THEN IF msf_curve_check ( cv \ surface_curve . curve_3d ) THEN REPEAT i := 1 TO SIZEOF ( cv \ surface_curve . associated_geometry ) ; IF 'aic_manifold_surface.surface' IN TYPEOF ( cv \ surface_curve . associated_geometry [ i ] ) THEN IF NOT msf_surface_check ( cv \ surface_curve . associated_geometry [ i ] ) THEN RETURN ( FALSE ) ; END_IF ; ELSE IF 'aic_manifold_surface.pcurve' IN TYPEOF ( cv \ surface_curve . associated_geometry [ i ] ) THEN IF NOT msf_curve_check ( cv \ surface_curve . associated_geometry [ i ] ) THEN RETURN ( FALSE ) ; END_IF ; END_IF ; END_IF ; END_REPEAT ; RETURN ( TRUE ) ; END_IF ; ELSE IF 'aic_manifold_surface.polyline' IN TYPEOF ( cv ) THEN IF ( SIZEOF ( cv \ polyline . points ) >= 3 ) THEN RETURN ( TRUE ) ; END_IF ; END_IF ; END_IF ; END_IF ; END_IF ; END_IF ; END_IF ; END_IF ; RETURN ( FALSE ) ; END_FUNCTION; -- msf_curve_check |
|
public class FMsf_curve_check public static Value run(SdaiContext _context, Value cv) |