FUNCTION check_associative_shape_aspects
(* SCHEMA aic_associative_draughting_elements; *)
FUNCTION check_associative_shape_aspects
(sdr : shape_definition_representation) : BOOLEAN;
LOCAL
sr1, sr2 : SET OF representation;
dm, pv : SET OF representation;
END_LOCAL;
-- Check if the representation contains only two items
IF (SIZEOF (sdr.used_representation.items) <> 2) THEN
RETURN (FALSE);
END_IF;
-- Find the representations that use each item
sr1 := using_representations(sdr.used_representation.items[1]);
sr2 := using_representations(sdr.used_representation.items[2]);
-- Find the representations in which item 1 representations are mapped
REPEAT i := 1 TO HIINDEX(sr1);
dm := representations_mapped_into(sr1[i]);
REPEAT j := 1 TO HIINDEX(dm);
IF ('AIC_ASSOCIATIVE_DRAUGHTING_ELEMENTS.DRAUGHTING_MODEL' IN TYPEOF(dm[j]))
THEN
IF (dm[j] IN sr2) THEN RETURN (TRUE);
END_IF;
-- Find the views that the draughting model is mapped into
pv := representations_mapped_into(dm[j]);
REPEAT k := 1 TO HIINDEX(pv);
IF ('AIC_ASSOCIATIVE_DRAUGHTING_ELEMENTS.PRESENTATION_VIEW' IN TYPEOF(pv[k]))
THEN
IF (pv[k] IN sr2) THEN RETURN (TRUE);
END_IF;
END_IF;
END_REPEAT;
END_IF;
END_REPEAT;
END_REPEAT;
-- Find the representations in which item 2 representations are mapped
REPEAT i := 1 TO HIINDEX(sr2);
dm := representations_mapped_into(sr2[i]);
REPEAT j := 1 TO HIINDEX(dm);
IF ('AIC_ASSOCIATIVE_DRAUGHTING_ELEMENTS.DRAUGHTING_MODEL' IN TYPEOF(dm[j]))
THEN
IF (dm[j] IN sr1) THEN RETURN (TRUE);
END_IF;
-- Find the views that the draughting model is mapped into
pv := representations_mapped_into(dm[j]);
REPEAT k := 1 TO HIINDEX(pv);
IF ('AIC_ASSOCIATIVE_DRAUGHTING_ELEMENTS.PRESENTATION_VIEW' IN TYPEOF(pv[k]))
THEN
IF (pv[k] IN sr1) THEN RETURN (TRUE);
END_IF;
END_IF;
END_REPEAT;
END_IF;
END_REPEAT;
END_REPEAT;
RETURN(FALSE);
END_FUNCTION;
Referenced By
Defintion check_associative_shape_aspects is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:14:00-04:00