Overview Schemas Index

LAYERED_INTERCONNECT_MODULE_3D_DESIGN_XIM (jsdai.SLayered_interconnect_module_3d_design_xim)


FUNCTION in_3d_assembly_context
          (comp : assembly_component_armx) : LOGICAL;

LOCAL
    shapes : SET  OF  Assembly_component_3d_shape_model := [];
    shapes_in_context : SET  OF  Physical_unit_3d_shape_model := [];
    assemblies : SET OF Product_view_definition := [];
    i, j : INTEGER := 0;
    in_context : LOGICAL := TRUE;
  END_LOCAL;
  
  REPEAT  i := 1 TO  SIZEOF(comp.occurrence_contexts);
    assemblies := assemblies + comp.occurrence_contexts[i].relating_view;
  END_REPEAT;

  shapes := bag_to_set(USEDIN(comp,'PHYSICAL_UNIT_3D_DESIGN_VIEW_XIM.ASSEMBLY_COMPONENT_3D_SHAPE_MODEL.SHAPE_CHARACTERIZED_COMPONENT'));
  REPEAT  i := 1 TO SIZEOF(shapes);
    shapes_in_context := bag_to_set(USEDIN(shapes[i]\Shape_representation.context_of_items,'ELEMENTAL_GEOMETRIC_SHAPE_XIM.SHAPE_REPRESENTATION.CONTEXT_OF_ITEMS'));
    in_context := FALSE;
    j := 1;
    REPEAT WHILE ((j <= SIZEOF(shapes_in_context)) AND (NOT (in_context)));
      in_context := (shapes_in_context[j].shape_characterized_definition IN assemblies);
      j := j + 1;
    END_REPEAT;
    
    IF NOT (in_context) THEN
      RETURN  (FALSE);
    END_IF;
  END_REPEAT;
  
  RETURN (SIZEOF(shapes) > 0);

END_FUNCTION; -- in_3d_assembly_context

public class FIn_3d_assembly_context
          public static Value run(SdaiContext _context, Value comp)