|
FUNCTION nmsf_curve_check (cv : representation_item) : BOOLEAN; IF SIZEOF ( [ 'aic_non_manifold_surface.bounded_curve' , 'aic_non_manifold_surface.conic' , 'aic_non_manifold_surface.curve_replica' , 'aic_non_manifold_surface.line' , 'aic_non_manifold_surface.offset_curve_3d' ] * TYPEOF ( cv ) ) > 1 THEN RETURN ( FALSE ) ; ELSE IF ( ( 'aic_non_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_non_manifold_surface.conic' , 'aic_non_manifold_surface.line' ] * TYPEOF ( cv ) ) = 1 THEN RETURN ( TRUE ) ; ELSE IF 'aic_non_manifold_surface.curve_replica' IN TYPEOF ( cv ) THEN RETURN ( nmsf_curve_check ( cv \ curve_replica . parent_curve ) ) ; ELSE IF ( ( 'aic_non_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_non_manifold_surface.polyline' IN TYPEOF ( cv \ offset_curve_3d . basis_curve ) ) ) ) THEN RETURN ( nmsf_curve_check ( cv \ offset_curve_3d . basis_curve ) ) ; ELSE IF 'aic_non_manifold_surface.pcurve' IN TYPEOF ( cv ) THEN RETURN ( ( nmsf_curve_check ( cv \ pcurve . reference_to_curve \ representation . items [ 1 ] ) ) AND ( nmsf_surface_check ( cv \ pcurve . basis_surface ) ) ) ; ELSE IF 'aic_non_manifold_surface.surface_curve' IN TYPEOF ( cv ) THEN IF nmsf_curve_check ( cv \ surface_curve . curve_3d ) THEN REPEAT i := 1 TO SIZEOF ( cv \ surface_curve . associated_geometry ) ; IF 'aic_non_manifold_surface.surface' IN TYPEOF ( cv \ surface_curve . associated_geometry [ i ] ) THEN IF NOT nmsf_surface_check ( cv \ surface_curve . associated_geometry [ i ] ) THEN RETURN ( FALSE ) ; END_IF ; ELSE IF 'aic_non_manifold_surface.pcurve' IN TYPEOF ( cv \ surface_curve . associated_geometry [ i ] ) THEN IF NOT nmsf_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_non_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 ; END_IF ; RETURN ( FALSE ) ; END_FUNCTION; -- nmsf_curve_check |
|
public class FNmsf_curve_check public static Value run(SdaiContext _context, Value cv) |