OSArch Community

Save UV mapping to ifc style

  1. T
  2. A

    This is for sure the holy grail,

    Btw I can't see anything in your video not sure if it is just me?

  3. T

    sorry, i uploaded a new one.

  4. T

    This is for sure the holy grail,

    For sure. I believe it's possible though... i've done it before. The button is not in the UI, but the operator's there.

  5. B
  6. T

    Triangulation!.. that's what i forgot. Thank you.

    It did take the assignment (well most of them.. not all), but when i saved, and tried to open the .ifc file again, i got the following error...

    files after assignment: https://www.dropbox.com/scl/fi/cbnuuhe872xqkd3lx7u55/rock_moss_set_02_4k.blend-2.zip?rlkey=8ww9fllhsgbfozplf2vdo4617&dl=1

    
    os: Windows
    
    os_version: 10.0.19045
    
    python_version: 3.11.7
    
    architecture: ('64bit', 'WindowsPE')
    
    machine: AMD64
    
    processor: Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
    
    blender_version: 4.2.1 LTS
    
    bonsai_version: 0.0.0
    
    bonsai_commit_hash: f8f3519
    
    last_actions: 
    
    # ifcopenshell.api: geometry.add_representation
    
    >>> {"context": {"cast_type": "entity_instance", "value": 15, "Name": null}, "blender_object": "<bpy_struct, Object(\"IfcGeographicElementType/rock_moss_set_02_rock07\") at 0x00000169D9272B20>", "geometry": "<bpy_struct, Mesh(\"low.004\") at 0x00000169D91EF220>", "coordinate_offset": "None", "total_items": "1", "should_force_faceted_brep": "False", "should_force_triangulation": "False", "should_generate_uvs": "True", "ifc_representation_class": "", "profile_set_usage": "None"}
    
    # ifcopenshell.api: owner.update_owner_history
    
    >>> {"element": {"cast_type": "entity_instance", "value": 12693, "Name": "rock_moss_set_02_rock07"}}
    
    # ifcopenshell.api: style.assign_representation_styles
    
    >>> {"shape_representation": {"cast_type": "entity_instance", "value": 13744, "Name": null}, "styles": [{"cast_type": "entity_instance", "value": 3465, "Name": "rock_moss_set_02"}], "should_use_presentation_style_assignment": "False"}
    
    # ifcopenshell.api: geometry.assign_representation
    
    >>> {"product": {"cast_type": "entity_instance", "value": 12693, "Name": "rock_moss_set_02_rock07"}, "representation": {"cast_type": "entity_instance", "value": 13744, "Name": null}}
    
    # ifcopenshell.api: owner.update_owner_history
    
    >>> {"element": {"cast_type": "entity_instance", "value": 12693, "Name": "rock_moss_set_02_rock07"}}
    
    # operator: BIM_OT_load_styles
    
    # operator: BIM_OT_enable_editing_surface_style
    
    # operator: BIM_OT_edit_surface_style
    
    # ifcopenshell.api: style.add_surface_textures
    
    >>> {"textures": "[{'URLReference': 'D:/Dropbox/Gitea_OD/OD_Project_Template/Open/Models/Bonsai/OD_Textures/Open/PolyHaven/rock_moss_set_02_4k.blend/textures/rock_moss_set_02_diff_4k.jpg', 'Mode': 'DIFFUSE', 'RepeatS': True, 'RepeatT': True, 'uv_mode': 'UV'}]", "uv_maps": "[]"}
    
    # ifcopenshell.api: style.add_surface_style
    
    >>> {"style": {"cast_type": "entity_instance", "value": 3465, "Name": "rock_moss_set_02"}, "ifc_class": "IfcSurfaceStyleWithTextures", "attributes": "{'Textures': [#13759=IfcImageTexture(.T.,.T.,'DIFFUSE',$,$,'D:/Dropbox/Gitea_OD/OD_Project_Template/Open/Models/Bonsai/OD_Textures/Open/PolyHaven/rock_moss_set_02_4k.blend/textures/rock_moss_set_02_diff_4k.jpg')]}"}
    
    # ifcopenshell.api: style.edit_surface_style
    
    >>> {"style": {"cast_type": "entity_instance", "value": 13760, "Name": null}, "attributes": "{'Textures': [#13759=IfcImageTexture(.T.,.T.,'DIFFUSE',$,$,'D:/Dropbox/Gitea_OD/OD_Project_Template/Open/Models/Bonsai/OD_Textures/Open/PolyHaven/rock_moss_set_02_4k.blend/textures/rock_moss_set_02_diff_4k.jpg')]}"}
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_uv_to_style
    
    # operator: BIM_OT_save_project
    
    # operator: BIM_OT_save_project
    
    last_error: Traceback (most recent call last):
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 732, in finish_loading_project
    
        bpy.ops.bim.load_project_elements()
    
      File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    
        ret = _op_call(self.idname_py(), kw)
    
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    RuntimeError: Error: Python: Traceback (most recent call last):
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 813, in execute
    
        ifc_importer.execute()
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 258, in execute
    
        self.create_element_types()
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 563, in create_element_types
    
        self.create_element_type(element_type)
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 589, in create_element_type
    
        self.material_creator.create(element, obj, mesh)
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 81, in create
    
        self.load_texture_maps()
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\import_ifc.py", line 114, in load_texture_maps
    
        tool.Loader.load_indexed_texture_map(coords, self.mesh)
    
      File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\tool\loader.py", line 488, in load_indexed_texture_map
    
        index = next(v.index for v in bm.verts if (v.co - co).length_squared < 1e-5)
    
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    StopIteration
    
    Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109
    
    
    
    
    ifc: rock_moss_set_02_4k_lowpoly.ifc
    
    schema: IFC4
    
    preprocessor_version: IfcOpenShell 0.0.0
    
    originating_system: Bonsai 0.8.1-alpha240924-f8f3519
    

Login or Register to reply.