|
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) |