I really hope this is the right place to post my question and anyone can help. I am working with ifcopenshell0.6 for python 2.7 on Ubuntu.
Currently I am stuck with the encoding of the property RepresentationType:
*
RepresentationType = product.Representation.Representations[1].RepresentationType
RepresentationType2 = product.Representation.Representations[1].getinfo()['RepresentationType']*
I expect those values to be "SweptSolid" but the value I read is:
*u'\U00770053\U00700065\U00530074\U006c006f\U00640069\x00\x80\x01\U006f004c\U0067006e'
*
No matter what decoding of encoding I have tried, I don#t get "SweptSolid".
What I figured out until now is that its independent of the ifc version used (2x3 or 4).
I really hope anyone can help me!
Best,
Mathias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With python 2.7 you need to be careful to select the 2.7 or 2.7u. You have the wrong version. Before version 3.3 python had a compile time setting to use either 16bit or 32bit fixed unicode code points. For 0.6 we still provide both variants, for 0.7 we don't provide builds anymore for 2.7 because it's eol. https://github.com/IfcOpenBot/IfcOpenShell/commit/721fe4729aa5302efe1602971aae2558934ad098#comments
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks a lot for your help, you solved my problem. I am "new" to the world of Python and had trouble finding the actual problem. But it was the wrong version as you mentioned. But still nice to see the other solution.
thanks for this nice piece of software
Best
Mathias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all together,
I really hope this is the right place to post my question and anyone can help. I am working with ifcopenshell0.6 for python 2.7 on Ubuntu.
Currently I am stuck with the encoding of the property RepresentationType:
*
RepresentationType = product.Representation.Representations[1].RepresentationType
RepresentationType2 = product.Representation.Representations[1].getinfo()['RepresentationType']*
I expect those values to be "SweptSolid" but the value I read is:
*u'\U00770053\U00700065\U00530074\U006c006f\U00640069\x00\x80\x01\U006f004c\U0067006e'
*
No matter what decoding of encoding I have tried, I don#t get "SweptSolid".
What I figured out until now is that its independent of the ifc version used (2x3 or 4).
I really hope anyone can help me!
Best,
Mathias
With python 2.7 you need to be careful to select the 2.7 or 2.7u. You have the wrong version. Before version 3.3 python had a compile time setting to use either 16bit or 32bit fixed unicode code points. For 0.6 we still provide both variants, for 0.7 we don't provide builds anymore for 2.7 because it's eol. https://github.com/IfcOpenBot/IfcOpenShell/commit/721fe4729aa5302efe1602971aae2558934ad098#comments
Edit: for fun, if you take the string you reported and strip out the \U you can recover the value your after:
Hello Thomas,
thanks a lot for your help, you solved my problem. I am "new" to the world of Python and had trouble finding the actual problem. But it was the wrong version as you mentioned. But still nice to see the other solution.
thanks for this nice piece of software
Best
Mathias