FUNCTION get_directed_link
(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP238 STEP-NC
-- IN AP238 STEP-NC/AP242
FUNCTION get_directed_link
(nodes : LIST OF representation;
undirected_link : LIST OF chained_representation_link ) : LIST OF representation_relationship;
LOCAL
directed_link : LIST OF representation_relationship := [];
END_LOCAL;
IF (SIZEOF(nodes) <> SIZEOF(undirected_link) + 1) OR (VALUE_UNIQUE(nodes) = FALSE) THEN
RETURN (?);
END_IF;
REPEAT i := 1 TO SIZEOF(undirected_link);
CASE FALSE OF
'STEP_MERGED_AP_SCHEMA.REPRESENTATION_CONTEXT' IN TYPEOF(undirected_link[i]) :
BEGIN
IF (nodes[i]\representation.context_of_items :=: undirected_link[i]) AND (nodes[(i + 1)]\representation.context_of_items :=: undirected_link[i]) THEN
INSERT( directed_link, representation_relationship('', '', nodes[(i + 1)], nodes[i]), i - 1 );
ELSE
RETURN (?);
END_IF;
END;
'STEP_MERGED_AP_SCHEMA.REPRESENTATION_RELATIONSHIP' IN TYPEOF(undirected_link[i]) :
BEGIN
IF (nodes[i] :=: undirected_link[i]\representation_relationship.rep_1) AND (nodes[(i + 1)] :=: undirected_link[i]\representation_relationship.rep_2) OR (nodes[i] :=: undirected_link[i]\representation_relationship.rep_2) AND (nodes[(i + 1)] :=: undirected_link[i]\representation_relationship.rep_1) THEN
INSERT( directed_link, representation_relationship('', '', nodes[(i + 1)], nodes[i]), i - 1 );
ELSE
RETURN (?);
END_IF;
END;
'STEP_MERGED_AP_SCHEMA.MAPPED_ITEM' IN TYPEOF(undirected_link[i]) :
BEGIN
IF (nodes[i] IN using_representations(undirected_link[i])) AND (nodes[(i + 1)] :=: undirected_link[i]\mapped_item.mapping_source\representation_map.mapped_representation) THEN
INSERT( directed_link, representation_relationship('', '', nodes[(i + 1)], nodes[i]), i - 1 );
ELSE
RETURN (?);
END_IF;
END;
OTHERWISE :
RETURN (?);
END_CASE;
END_REPEAT;
IF VALUE_UNIQUE(directed_link) = FALSE THEN
RETURN (?);
END_IF;
RETURN (directed_link);
END_FUNCTION;
Referenced By
Defintion get_directed_link is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00