mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Implement support for IfcLibraryInformation like a Git server
This commit is contained in:
@@ -95,6 +95,7 @@ def register():
|
|||||||
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
|
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
|
||||||
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
|
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
|
||||||
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
|
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
|
||||||
|
bpy.types.Scene.BIMLibrary = bpy.props.PointerProperty(type=prop.BIMLibrary)
|
||||||
bpy.types.Scene.MapConversion = bpy.props.PointerProperty(type=prop.MapConversion)
|
bpy.types.Scene.MapConversion = bpy.props.PointerProperty(type=prop.MapConversion)
|
||||||
bpy.types.Scene.TargetCRS = bpy.props.PointerProperty(type=prop.TargetCRS)
|
bpy.types.Scene.TargetCRS = bpy.props.PointerProperty(type=prop.TargetCRS)
|
||||||
bpy.types.Object.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
bpy.types.Object.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
||||||
|
|||||||
@@ -865,9 +865,9 @@ class IfcExporter():
|
|||||||
self.create_units()
|
self.create_units()
|
||||||
self.create_people()
|
self.create_people()
|
||||||
self.create_organisations()
|
self.create_organisations()
|
||||||
self.create_library_information()
|
|
||||||
self.create_rep_context()
|
self.create_rep_context()
|
||||||
self.create_project()
|
self.create_project()
|
||||||
|
self.create_library_information()
|
||||||
self.create_documents()
|
self.create_documents()
|
||||||
self.create_classifications()
|
self.create_classifications()
|
||||||
self.create_classification_references()
|
self.create_classification_references()
|
||||||
@@ -1001,7 +1001,18 @@ class IfcExporter():
|
|||||||
information = self.ifc_parser.library_information
|
information = self.ifc_parser.library_information
|
||||||
if not information:
|
if not information:
|
||||||
return
|
return
|
||||||
# TODO
|
information['attributes']['Publisher'] = self.owner_history.OwningUser
|
||||||
|
information['ifc'] = self.file.create_entity('IfcLibraryInformation',
|
||||||
|
**information['attributes'])
|
||||||
|
print(information['ifc'])
|
||||||
|
print(self.ifc_parser.project['ifc'])
|
||||||
|
self.file.createIfcRelAssociatesLibrary(
|
||||||
|
ifcopenshell.guid.new(),
|
||||||
|
self.owner_history,
|
||||||
|
information['attributes']['Name'],
|
||||||
|
information['attributes']['Description'],
|
||||||
|
[self.ifc_parser.project['ifc']],
|
||||||
|
information['ifc'])
|
||||||
|
|
||||||
def create_documents(self):
|
def create_documents(self):
|
||||||
for document in self.ifc_parser.documents.values():
|
for document in self.ifc_parser.documents.values():
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class BIM_PT_library(Panel):
|
|||||||
scene = context.scene
|
scene = context.scene
|
||||||
bim_properties = scene.BIMProperties
|
bim_properties = scene.BIMProperties
|
||||||
|
|
||||||
layout.row().prop(scene.BIMProperties, 'has_georeferencing')
|
layout.row().prop(scene.BIMProperties, 'has_library')
|
||||||
|
|
||||||
layout.label(text="Project Library:")
|
layout.label(text="Project Library:")
|
||||||
layout.row().prop(scene.BIMLibrary, 'location')
|
layout.row().prop(scene.BIMLibrary, 'location')
|
||||||
|
|||||||
Reference in New Issue
Block a user