Commit Graph

8475 Commits

Author SHA1 Message Date
Andrej730 5ce7abbda0 adding default ifc objects added from shift-a menu to the current collection 2024-04-15 13:30:40 +02:00
Andrej730 1b39f243eb Editiing arbitrary profile without enabling editing profile
It was a bit confusing UX since when you finish editing arbitrary profile path the data is already saved in ifc but you were still in editing profile properties
2024-04-15 13:30:40 +02:00
Andrej730 9864f7d19e Update type manager thumbnails on editing profiles
Example - https://imgur.com/a/IcV8IIR
2024-04-15 13:30:40 +02:00
Andrej730 5a5e1e9892 disable chaching sound running the bim tests
to save someone's ears (probably mine 😁) from running 10 chaching sounds per second
2024-04-15 13:30:40 +02:00
Dion Moult 4845242769 Fix #3366. Fix crash in IfcDiff if you are comparing a model with no geometry. 2024-04-15 13:30:40 +02:00
Andrej730 847d30fdaa Fixed errors displaying IFC Connections for IfcRelConnectsElements
IfcRelConnectsElements type of connection wasn't handled properly resulting in errors.
Now you should be able to see connections for connected slabs, walls etc - https://i.imgur.com/LpFBKBC.png

Traceback:
Traceback (most recent call last):
  File "\blenderbim\bim\module\geometry\ui.py", line 102, in draw
    ConnectionsData.load()
  File "\blenderbim\bim\module\geometry\data.py", line 100, in load
    cls.data = {"connections": cls.connections()}
  File "\blenderbim\bim\module\geometry\data.py", line 134, in connections
    relating_element_connection_type = rel.RelatingConnectionType
  File "\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 171, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC4.IfcRelConnectsElements' has no attribute 'RelatingConnectionType'
2024-04-15 13:30:40 +02:00
Dion Moult 99e2598c00 Fix #3355. Reimplement graphical clash snapshots in BCF from IfcClash in the BlenderBIM Add-on. 2024-04-15 13:30:40 +02:00
Dion Moult 6758d878d8 You can now unload BCF projects to load another one. 2024-04-15 13:30:40 +02:00
Trashman247 6986b901d0 Move Brick.ttl ignore to main git-ignore file 2024-04-15 13:30:10 +02:00
Trashman247 9cedd37694 Silence known rdflib_sqlalchemy TypeError warning 2024-04-15 13:29:29 +02:00
Trashman247 2b52ab930c Implement fully undo/redo with checks
While these actions are short in the backend--taking about 0.01 seconds to run--the Blender UI lags a lot leading to 2-3 second pauses because of the "refresh_brick_viewer" function being slow. This should be investigated.
2024-04-15 13:29:29 +02:00
Trashman247 36d0e33958 Change namespace selector to only show alias 2024-04-15 13:29:29 +02:00
Trashman247 6a88905e23 Add changeset versioning to Brick add/remove 2024-04-15 13:29:29 +02:00
Trashman247 64d1fb4ee7 Reformat commenting, remove prints, and remove BrickStore.project 2024-04-15 13:29:29 +02:00
Trashman247 bcd7c79004 Implement fully serialize operator
- Turns out, you need the keyword "graph=" in graph_at() to actually select a graph of that name from the collection, otherwise it just returns the entire collection, so I changed that, which correctly isolates the project from the collection for serialization now.
- With this same change, I opted turn BrickStore.VersionedGraphCollection simply into BrickStore.graph and create a new BrickStore.get_project() to return the isolated graph. - This meant I should remove the reload_graph() function because I was actually just loading the entire collection into it still, and its functionality breaks when it isn't the entire collection
2024-04-15 13:29:29 +02:00
Trashman247 38788cc95b Implement early testing for serialize operator (not functional)
All the right code seems to be in place, but it seems the package won't go through with the serialize function because of read/write permissions (ERRNO 13)
2024-04-15 13:29:29 +02:00
Trashman247 4a04411262 Change graph naming to all caps 2024-04-15 13:29:29 +02:00
Trashman247 590049638e Add Brick.ttl to .gitignore 2024-04-15 13:29:29 +02:00
Trashman247 b13f6116d0 Update BrickStore.purge()
I wanted to just have a BrickStore.clear() which would so this:

        BrickStore.VersionedGraphCollection = None
        BrickStore.graph = None
        BrickStore.path = None

(aka not also set BrickStore.schema = None, since it should theoretically just load in the same path anyway) but for some reason Blender crashes when clearing a project and loading one again this way.
2024-04-15 13:29:29 +02:00
Trashman247 d2815415df Rework NewBrick and LoadBrick in test_brick.py to fit with new VGC format
- VGC means VersionedGraphCollection.
- BrickStore.schema is now a filepath, so make that the case in the testing also.
2024-04-15 13:29:29 +02:00
Trashman247 c85b97af5a Implement VersionedGraphCollection to Brick module
- Reworked `load_brick_file` and `new_brick_file` to fit under the VersionedGraphCollection implementation. (Other methods may have broken).
- Added `undo_brick` and `redo_brick`.
- Kept BrickStore.graph the same as to generally still work with the rest of the code. This was done by parsing the VersionedGraphCollection with the new `reload_brick_graph` method.
2024-04-15 13:29:29 +02:00
Carlos Dias 205128400e Update operator.py
missing output file format in arguments
2024-04-15 13:29:28 +02:00
Andrej730 6e01d5ce01 reworked detecting neighbour walls when placing new ones
hopefully it will be a bit more natural now - please give feeback

before - https://imgur.com/a/VYQt5ua
now - https://imgur.com/a/5LRAmrd
2024-04-15 13:29:28 +02:00
Andrej730 6a1d1cf039 More responsive UI for IFC search 2024-04-15 13:29:28 +02:00
Andrej730 62ecb1e261 a bit of bim.join_wall refactor 2024-04-15 13:29:28 +02:00
Andrej730 4e186f4a62 Error editing roof profile #3357
it was assuming it's a slab and was giving errors trying to start editing slab profile

File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\model\slab.py", line 618, in _execute
if extrusion.Position:
AttributeError: 'NoneType' object has no attribute 'Position'
2024-04-15 13:29:28 +02:00
Bruno Postle 84b08fa448 BlenderBIM Git documentation minor corrections 2024-04-15 13:29:28 +02:00
Bruno Postle e61c572743 BlenderBIM document Git merge asymmetry (#3096) 2024-04-15 13:29:28 +02:00
Dion Moult fcd68a1e64 Whoops 2024-04-15 13:29:28 +02:00
Dion Moult 623ac1fe93 Fix hppfcl segfault by bumping hppfcl and its dependencies. Remove support for py37. 2024-04-15 13:29:28 +02:00
Andrej730 2122ab7bdc Added warning for a86456392 2024-04-15 13:29:28 +02:00
Andrej730 49abaf6798 improved relative path handling for textures #3365
now we're going to store all texture paths in .ifc as posix to keep them working if .ifc moved from one platform to another

previously it was saving all paths as absolute
2024-04-15 13:29:28 +02:00
Andrej730 bfcc8decc0 Calculating angle based on world position instead of camera pos #3362 2024-04-15 13:29:28 +02:00
Andrej730 1357b83d99 Added support for OCCLUSION textures for 3aff29dec 2024-04-15 13:29:28 +02:00
Andrej730 0d74ffd52f Shape builder - detect AdvancedSweptSolid
To avoid validation errors on creating wall mounted railings

    #143=IfcShapeRepresentation(#15,'Body','SweptSolid',(#116,#126,#129,#139,#142))
Rule IfcShapeRepresentation.CorrectItemsForType:
    IfcShapeRepresentationTypes(self.RepresentationType, self.Items)
Violated by:
    False
     +  where False = IfcShapeRepresentationTypes('SweptSolid', (#116=IfcSweptDiskSolid(#115,10.,$,$,$), #126=IfcExtrudedAreaSolid(#120,#124,#125,20.), #129=IfcSweptDiskSolid(#128,10.,$,$,$), #139=IfcExtrudedAreaSolid(#133,#137,#138,20.), #142=IfcSweptDiskSolid(#141,25.000000372529,$,$,$)))
     +    where 'SweptSolid' = #143=IfcShapeRepresentation(#15,'Body','SweptSolid',(#116,#126,#129,#139,#142)).RepresentationType
     +    and   (#116=IfcSweptDiskSolid(#115,10.,$,$,$), #126=IfcExtrudedAreaSolid(#120,#124,#125,20.), #129=IfcSweptDiskSolid(#128,10.,$,$,$), #139=IfcExtrudedAreaSolid(#133,#137,#138,20.), #142=IfcSweptDiskSolid(#141,25.000000372529,$,$,$)) = #143=IfcShapeRepresentation(#15,'Body','SweptSolid',(#116,#126,#129,#139,#142)).Items
2024-04-15 13:29:28 +02:00
Andrej730 805d6652f1 set default position on creating window and door
to avoid validation errors like IfcProduct.PlacementForShapeRepresentation
2024-04-15 13:29:28 +02:00
Andrej730 2fc79e0bd3 Fixing ifc git poll errors if .ifc file is not yet saved
Errors:
Traceback (most recent call last):
  File "\Blender\3.6\scripts\addons\blenderbim\bim\module\ifcgit\operator.py", line 20, in poll
    if not os.path.isfile(path_ifc):
  File "\Blender\3.6\python\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Traceback (most recent call last):
  File "\Blender\3.6\scripts\addons\blenderbim\bim\module\ifcgit\operator.py", line 48, in poll
    if not os.path.isfile(path_ifc):
  File "\Blender\3.6\python\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
2024-04-15 13:29:28 +02:00
Andrej730 d511b6fdc8 updated furniture library after f5031035c and a385938 2024-04-15 13:29:28 +02:00
Andrej730 5c1a96c24c Shape builder - avoid duplicated indices in polylines
For example
IfcLineIndex((1,2,3,4,1))
instead of
IfcLineIndex((1,2,2,3,3,4,4,1))
2024-04-15 13:29:28 +02:00
Thomas Krijnen cb804f2e84 Fix openbot build 2024-04-15 13:29:28 +02:00
Massimo Fabbro 62a0b64b2a Add regen button also under space tool 2024-04-15 13:29:20 +02:00
Dion Moult 3dd75e98a0 See #3283. Minor fix where IfcContext is abstract, so IfcProjectLibrary should be checked instead when loading filtered models. 2024-04-15 13:29:20 +02:00
Dion Moult 82519a56c2 Fix failing build 2024-04-15 13:29:20 +02:00
Dion Moult 5f73a2b36d Bundle qhull for hppfcl on Linux too 2024-04-15 13:29:20 +02:00
Thomas Krijnen 4e599cf132 Fix openbot build 2024-04-15 13:29:20 +02:00
Thomas Krijnen b76beabb43 Fix openbot build 2024-04-15 13:29:20 +02:00
Andrej730 57f43fe608 Support for door/window/stair modifiers in ifc2x3 2024-04-15 13:29:20 +02:00
Andrej730 ced6326bfd ShapeBuilder to use IfcPolyline of IfcIndexedPolyCurve to support ifc2x3
needed it to add suport for window/door modifiers in ifc2x3 in the next commit
2024-04-15 13:29:20 +02:00
Andrej730 2b3a7ba30c fixing errors running tests if no tool selected in blender startup file
Error was: AttributeError: 'NoneType' object has no attribute 'idname'
2024-04-15 13:29:20 +02:00
Dion Moult 34d44c9e7c Bundle qhull for ifcclash on macosm1 2024-04-15 13:29:20 +02:00