Skip to content

don't assign ID to Simple types#254

Merged
aothms merged 1 commit into
IfcOpenShell:masterfrom
bjorkstrom:no_id_simple_type
Sep 9, 2017
Merged

don't assign ID to Simple types#254
aothms merged 1 commit into
IfcOpenShell:masterfrom
bjorkstrom:no_id_simple_type

Conversation

@ghost

@ghost ghost commented Aug 30, 2017

Copy link
Copy Markdown

When adding entities, don't assign ID to Simple types.
Otherwise that type will be serialized incorrectly.

This fixes the issue with IFCPLANEANGLEMEASURE being serilzed
incorrectly when used as attribute to IFCMEASUREWITHUNIT.

With ID assigned, it will look like this:

#10=IFCMEASUREWITHUNIT(#9=IFCPLANEANGLEMEASURE(0.017453293),#8);

The correct way to serialze is:

#10=IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453293),#8);

When adding entities, don't assign ID to Simple types.
Otherwise that type will be serialized incorrectly.

This fixes the issue with IFCPLANEANGLEMEASURE being serilzed
incorrectly when used as attribute to IFCMEASUREWITHUNIT.

With ID assigned, it will look like this:

  IfcOpenShell#10=IFCMEASUREWITHUNIT(IfcOpenShell#9=IFCPLANEANGLEMEASURE(0.017453293),IfcOpenShell#8);

The correct way to serialze is:

  IfcOpenShell#10=IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453293),IfcOpenShell#8);
@aothms

aothms commented Sep 9, 2017

Copy link
Copy Markdown
Member

Many thanks! Seems to be related to a specific condition here [1], perhaps that should have been && instead. Introduced by #190. Yours should do the trick as well though, better not assign (and increment the counter) in the first place.

[1] https://github.com/elmirjagudin/IfcOpenShell/blame/b65a2a957ee529c56d181986020bf722bc0f3b36/src/ifcparse/IfcParse.cpp#L924

@aothms aothms merged commit f6645b1 into IfcOpenShell:master Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant