Repository navigation
AP210e3 problems #381
Description
Update:
I have now noticed more issues with this schema, see this comment.
I am working with ap210e3, and I see that the EXPRESS schema included with STEPcode has this:
ENTITY shape_definition_representation
SUBTYPE OF ( property_definition_representation );
SELF\property_definition_representation.definition : property_definition;
SELF\property_definition_representation.used_representation : shape_representation;
WHERE
wr1: ( ( 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.PRODUCT_DEFINITION_SHAPE' IN TYPEOF(
definition ) ) OR ( 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.SHAPE_DEFINITION' IN
TYPEOF( definition\property_definition.definition ) ) );
END_ENTITY;
(* ... *)
ENTITY property_definition_representation;
definition : represented_definition;
used_representation : representation;
DERIVE
description : text := get_description_value( SELF );
name : label := get_name_value( SELF );
WHERE
wr1: ( SIZEOF( USEDIN( SELF, 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.' + 'DESCRIPTION_ATTRIBUTE.'
+ 'DESCRIBED_ITEM' ) ) <= 1 );
wr2: ( SIZEOF( USEDIN( SELF, 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.' + 'NAME_ATTRIBUTE.'
+ 'NAMED_ITEM' ) ) <= 1 );
END_ENTITY;
So to my understanding shape_definition_representation renames both attributes of property_definition_representation, and text and label are derived attributes (so they should not be included in STEP file output).
However, in build/sc/schemas/sdai_ap201e3/entities/SdaiShape_definition_representation.cc this code is used for the constructor:
SdaiShape_definition_representation::SdaiShape_definition_representation(): SdaiProperty_definition_representation(), _property_definition_representation_definition( 0 ), _property_definition_representation_used_representation( 0 ) {
/* parent: SdaiProperty_definition_representation */
/* Ignore the first parent since it is */
/* part of the main inheritance hierarchy */
eDesc = ap210_electronic_assembly_interconnect_and_packaging_design_mim_lf::e_shape_definition_representation;
STEPattribute * a = new STEPattribute( * ap210_electronic_assembly_interconnect_and_packaging_design_mim_lf::a_959Rproperty_definition_representation_definition, ( SDAI_Application_instance_ptr * ) & _property_definition_representation_definition );
a->set_null();
attributes.push( a );
MakeRedefined( a, "definition" );
a = new STEPattribute( * ap210_electronic_assembly_interconnect_and_packaging_design_mim_lf::a_960Rproperty_definition_representation_used_representation, ( SDAI_Application_instance_ptr * ) & _property_definition_representation_used_representation );
a->set_null();
attributes.push( a );
MakeRedefined( a, "used_representation" );
MakeDerived( "definition", "property_definition_representation" );
MakeDerived( "used_representation", "property_definition_representation" );
MakeDerived( "description", "property_definition_representation" );
MakeDerived( "name", "property_definition_representation" );
}So definition and used_representation are marked first as redefined, then they are marked derived. I would have expected this code to generated a shape_definition_representation to work:
SdaiShape_definition_representation * oShapeDefinitionRepresentation
= (SdaiShape_definition_representation *)oRegistry->ObjCreate("Shape_Definition_Representation");
oShapeDefinitionRepresentation->property_definition_(new SdaiRepresented_definition(oProductDefinitionShape));
oShapeDefinitionRepresentation->shape_representation_(new SdaiRepresentation(oShape));
oInstanceManager->Append((SDAI_Application_instance *)oShapeDefinitionRepresentation, completeSE);But it doesn't, and in the output it only produces:
#1499=SHAPE_DEFINITION_REPRESENTATION(*,*);
I also tried to manually walk through the attributes using ResetAttributes(), NextAttribute() and comparing Name() to either definition or property_definition_representation.definition, but nothing worked (it still produced * in the output for both attributes). I tried to create this entity as a STEPcomplex, which allowed me to set the attributes on Property_Definition_Representation, and they finally showed in the output. The only problem with this approach is that CAD tools don't accept it. I know from existing STEP files that this entity is not represented as a complex.
Where is the problem?
Activity
TRThurman commentedon Sep 11, 2018
AureaNoire commentedon Sep 12, 2018
Ok, I understand –
definitionandused_representationare not renamed, but their type is specialised.Nevertheless, there seems to be a problem with STEPcode if it marks both
definitionandused_representationas "derived" and hence never emitted in the file when creating aSHAPE_DEFINITION_REPRESENTATIONentity.AureaNoire commentedon Sep 14, 2018
Here is an updated list of problems that I found when working with AP210e3:
definitionandused_representationon aSHAPE_DEFINITION_REPRESENTATIONentity; even if set,SHAPE_DEFINITION_REPRESENTATION(*,*)is always emitted.PRODUCT_DEFINITIONshould emit with 4 attributes, instead STEPcode adds 3 additional nulls:PRODUCT_DEFINITION(1,2,3,4,$,$,$).PRODUCT_DEFINITION, e.g.COMPONENT_FUNCTIONAL_TERMINAL,NETWORK_NODE_DEFINITION.PRODUCT_DEFINITION_SHAPEshould emit with 3 attributes, instead STEPcode adds 2 additional nullsPRODUCT_DEFINITION_SHAPE(1,2,3,$,$).ELECTRICAL_NETWORKshould have a requirednameattribute, but it has to be set indirectly by iterating through the entity attributes instead ofinstance->name_(...).[-]Attributes marked as derived erroneously[/-][+]AP210e3 problems[/+]TRThurman commentedon Mar 20, 2021
Just a note: AP 210 ed4 is due to be publised by ISO in March 2021.
brlcad commentedon Mar 24, 2021
Thanks for the update @TRThurman ! Is there a summary of changes available?
TRThurman commentedon Mar 24, 2021
Change annex from the document in XML source form is attached.
It is rather daunting because of the significant additions in wire harness, PDM and tessellated geometry inherited from AP 242.
It also includes changes for the ARM longform schema which may be ignored by AIM/MIM implementations.
Files that are compliant to earlier versions should be compliant to this version.
Please advise of any difficulties, as we will be publishing an amendment next year to address some issues in wire harness area.
The actual current schemata are available on publicly available site:
https://standards.iso.org/iso/10303/smrl/v8/tech/smrlv8.zip
The previous version schemata are at:
https://standards.iso.org/iso/10303/smrl/v8/tech/smrlv7.zip
We are interested in discovering implementations of the standard as it is not the primary AP under development these days.
change_annex_from_version4_to_version5_extract.xml.zip