mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Add STEP header metadata
This commit is contained in:
@@ -107,6 +107,8 @@ cd dist/working && wget https://files.pythonhosted.org/packages/a3/b7/d4d69641cb
|
|||||||
cp -r dist/working/pyparsing-2.4.5/pyparsing.py dist/
|
cp -r dist/working/pyparsing-2.4.5/pyparsing.py dist/
|
||||||
rm -rf dist/working
|
rm -rf dist/working
|
||||||
|
|
||||||
|
cd dist/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcdiff/ifcdiff.py
|
||||||
|
|
||||||
cd dist/blenderbim && sed -i "s/999999/$(VERSION)/" __init__.py
|
cd dist/blenderbim && sed -i "s/999999/$(VERSION)/" __init__.py
|
||||||
cd dist && zip -r blender28-bim-$(VERSION)-$(PLATFORM).zip ./*
|
cd dist && zip -r blender28-bim-$(VERSION)-$(PLATFORM).zip ./*
|
||||||
rm -rf dist/blenderbim
|
rm -rf dist/blenderbim
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import bpy
|
|||||||
import csv
|
import csv
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
import datetime
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from mathutils import Vector, Matrix
|
from mathutils import Vector, Matrix
|
||||||
from .helper import SIUnitHelper
|
from .helper import SIUnitHelper
|
||||||
@@ -978,6 +980,18 @@ class IfcExporter():
|
|||||||
# Owner history doesn't actually work like this, but for now, it does :)
|
# Owner history doesn't actually work like this, but for now, it does :)
|
||||||
self.origin = self.file.by_type('IfcAxis2Placement3D')[0]
|
self.origin = self.file.by_type('IfcAxis2Placement3D')[0]
|
||||||
self.create_owner_history()
|
self.create_owner_history()
|
||||||
|
self.set_header()
|
||||||
|
|
||||||
|
def set_header(self):
|
||||||
|
# TODO: add all metadata, pending bug #747
|
||||||
|
self.file.wrapped_data.header.file_name.name = os.path.basename(self.ifc_export_settings.output_file)
|
||||||
|
self.file.wrapped_data.header.file_name.time_stamp = datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc).astimezone().replace(microsecond=0).isoformat()
|
||||||
|
self.file.wrapped_data.header.file_name.preprocessor_version = 'IfcOpenShell {}'.format(ifcopenshell.version)
|
||||||
|
self.file.wrapped_data.header.file_name.originating_system = '{} {}'.format(
|
||||||
|
self.owner_history.OwningApplication.ApplicationFullName,
|
||||||
|
self.owner_history.OwningApplication.Version,
|
||||||
|
)
|
||||||
|
self.file.wrapped_data.header.file_name.authorization = self.owner_history.OwningUser.ThePerson.Identification
|
||||||
|
|
||||||
def create_owner_history(self):
|
def create_owner_history(self):
|
||||||
for person in self.ifc_parser.people:
|
for person in self.ifc_parser.people:
|
||||||
|
|||||||
Reference in New Issue
Block a user