Skip to content

Commit aa74c1b

Browse files
Fixed some grammatical errors
1 parent 2154460 commit aa74c1b

File tree

3 files changed

+16527
-16527
lines changed

3 files changed

+16527
-16527
lines changed

ifc2json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
if not args.v or args.v == "4":
5050
jsonData = ifcjson.IFC2JSON4(ifcFilePath).spf2Json()
5151
with open(jsonFilePath, 'w') as outfile:
52-
json.dump(jsonData, outfile, indent=4)
52+
json.dump(jsonData, outfile, indent=2)
5353
elif args.v == "5a":
5454
jsonData = ifcjson.IFC2JSON5a(ifcFilePath).spf2Json()
5555
with open(jsonFilePath, 'w') as outfile:
56-
json.dump(jsonData, outfile, indent=4)
56+
json.dump(jsonData, outfile, indent=2)
5757
else:
5858
print('Version ' + args.v + ' is not supported')
5959
else:

ifcjson/ifc2json5a.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def entityToDict(self, entity, objData, parent=None):
7373
entityAttributes = entity.__dict__
7474
# inverseAttributes = explicitInverseAttributes.intersection(entity.wrapped_data.get_inverse_attribute_names())
7575
entityType = entity.is_a()
76+
entityType = entityType[3:]
7677

7778
ref = {
7879
'type': entityType
@@ -84,7 +85,6 @@ def entityToDict(self, entity, objData, parent=None):
8485
if 'GlobalId' in entityAttributes:
8586
reference = True
8687
if entity.is_a == 'IfcRelAggregates':
87-
# print('relaggregates!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
8888
reference = False
8989

9090
d = {
@@ -230,12 +230,12 @@ def entityToDict(self, entity, objData, parent=None):
230230
id = guid.split(guid.expand(guid.new()))[1:-1]
231231
d['representations'] = [
232232
{
233-
"class": "ShapeRepresentation",
233+
"type": "ShapeRepresentation",
234234
"ref": id
235235
}
236236
]
237237
self.representations[id] = {
238-
"class": "ShapeRepresentation",
238+
"type": "ShapeRepresentation",
239239
"globalId": id,
240240
"representationIdentifier": "Body",
241241
"representationType": "OBJ",

0 commit comments

Comments
 (0)