Commit Graph

1659 Commits

Author SHA1 Message Date
Dion Moult 5840b1770e Write IfcOpenShell documentation for geometry trees. 2024-04-15 13:30:40 +02:00
Andrej730 33d3afc35d experimental support for spline curves representation #3233
there is still no full support but as a workaround I've added blender converting curves to meshes and back to curves so we could preserve the actual shapes

before - https://i.imgur.com/9F542Iy.png
after - https://i.imgur.com/t58RlkF.png
2024-04-15 13:30:40 +02:00
Dion Moult ce8a9293bb See #3334. Optimise pset getting and add simple "broadphase" filtering for all facets for faster validation. 2024-04-15 13:30:40 +02:00
Dion Moult 9af7ddaf56 See #3334. Fix bug where get_pset didn't handle property inheritance correctly. 2024-04-15 13:30:40 +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 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 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
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 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
Thomas Krijnen 727d075e0e Add --prefilter flag to draw.py 2024-04-15 13:28:16 +02:00
Andrej730 8d18a8a023 Fix for f88835b #3271
Now we do not rely on small offset to keep using inner curves to create linings, if some part of the lining is not present (which happens on mullions and transoms) we'll create U or L shape extrusion instead of rectangle with inner curve.

Long story short - this should keep ifc for windows valid.
2024-04-15 13:25:51 +02:00
Andrej730 e3b77613d3 Corrected L shapes in window lining after e89a9cd #3271
From this - https://i.imgur.com/hQuCcR3.png
To this - https://i.imgur.com/qZ2Lyfo.png

It's a bit hacky since we still use really small offsets to keep "The outer curve shall enclose all inner curves." rule for IfcArbitraryProfileDefWithVoids valid.
2024-04-15 13:25:51 +02:00
Dion Moult bde5b52495 You can now exclude classes from streaming in ifcopenshell.stream 2024-04-15 13:25:50 +02:00
Andrej730 2fbb3c8ac6 adjust window offset on transoms/mullions for symmetry #3271
Before -  https://i.imgur.com/DbEzJ9H.png
After - https://i.imgur.com/0CERh86.png

Added it for modifier preview and ifc 2d and 3d repr but still need to work some things in 3d representation (L shape lining is not always detected correctly).
2024-04-15 13:25:50 +02:00
Dion Moult 17582f00cf Naive implementation of file stream and Lark based IFC-SPF reader to handle huge IFCs. 2024-04-15 13:25:50 +02:00
Dion Moult fee6ea52ba ifcopenshell.sqlite wrapper now handles JSON fields by default, which is significantly more performant
f attributes holding entity lists are expanded in SQL, this means that you end up with significantly more rows. Also, you cannot have the ifc_id marked as a UNIQUE field / benefit from unique primary key index. So leaving the fields as JSON is actually significantly more efficient (almost 10X faster to load a model into BBIM).
2024-04-15 13:25:50 +02:00
Thomas Krijnen 29fbbc2a02 Remove dependency on bootstrap 2024-04-15 13:03:00 +02:00
Thomas Krijnen 970b71663e #3120 item_id vector test case 2024-04-15 13:03:00 +02:00
Thomas Krijnen 88823943f0 Further defer sql.py imports for ifcopenbot to succeed 2024-04-15 12:04:44 +02:00
Thomas Krijnen 4f387e723b Comment out import mysql.connector 2024-04-15 12:04:44 +02:00
Thomas Krijnen 5a601f16fd Correct if-clause 2024-04-15 12:04:44 +02:00
Thomas Krijnen a7b10a2880 Add test 2024-04-15 12:04:44 +02:00
Totally a booplicate aced364a08 smol fix 2024-04-15 12:04:44 +02:00
Totally a booplicate 0b2cfc7560 fix missing else clause 2024-04-15 12:04:44 +02:00
Totally a booplicate dc5a0d4568 raise TypeError on invalid pset 2024-04-15 12:04:44 +02:00
Totally a booplicate 79983e5097 rework unpack_unit_value
handle the `None` case, simplify logic
2024-04-15 12:04:44 +02:00
Totally a booplicate e31047e8c6 improve naming of the new method 2024-04-15 12:04:44 +02:00
Totally a booplicate 182aa3ed01 improve update_existing_properties
explicit class check
error out on a not supported type
better methods names
2024-04-15 12:04:44 +02:00
Totally a booplicate 0632c9bf1b implement _try_purge
per review comment about repeating code
2024-04-15 12:04:44 +02:00
Totally a booplicate cd5baefb55 restructure if/elif/else chain 2024-04-15 12:04:44 +02:00
Totally a booplicate 53dd817d97 support tuples 2024-04-15 12:04:43 +02:00
Totally a booplicate 0ce987f788 move prop check 2024-04-15 12:04:43 +02:00
Totally a booplicate f4c618701c per review
change exception message
remove TODO
pass `Unit`
raise `NotImplementedError` when no template was found
2024-04-15 12:04:43 +02:00
Totally a booplicate c186e7120c resolve TODO
This is being fixed, we should always have a class to use
2024-04-15 12:04:43 +02:00
Totally a booplicate 1f89fea569 attempt to improve pset support
1. Adds support to directly passed in property entities
2. Adds support for tuples
3. Adds support for P_LISTVALUE
2024-04-15 12:04:43 +02:00
Dion Moult e7bb823f15 Run black on existing entity_instance 2024-04-15 12:04:43 +02:00
Dion Moult aafb905199 Build testing prototype of an SQLite based file / entity_instance. 2024-04-15 12:04:43 +02:00
Dion Moult 297ac5af3a Minor geometry processing documentation fix 2024-04-15 12:04:43 +02:00
Dion Moult 534247daa1 Fix bug for getting psets of materials and profiles in IFC2X3 2024-04-15 12:04:43 +02:00
Ahmad Saleem Z 3ebd31a486 added link to aws/lambda guide in installation guide 2024-04-15 11:44:55 +02:00
Dion Moult a4f7da598f See #3266. Write documentation on how to use IfcCSV. 2024-04-15 11:04:27 +02:00
Dion Moult 02462c1209 Fix #3264. Describe IFC to JSON conversion (and other formats) in documentation. 2024-04-15 11:04:26 +02:00
Dion Moult 13b80af97e See #3226. New batched remove_deep2() which uses serialisation for faster removal performance on large graphs. 2024-04-15 10:59:03 +02:00
Andrej730 ad4f00648f Blender curves to IfcIndexedPolyCurve #3233
Now blender curves segments saved in IfcIndexedPolyCurves instead of creating individual polygons.
Also changed ShapeBuilder.polyline - now it will try to store points in IfcLineIndex where it's possible (previously it was storing just 2).
2024-04-15 10:59:03 +02:00
Andrej730 2db82371bd Display units for more pset/qset props #3235
Now current project units displayed for area and volume properties too.
https://i.imgur.com/7dgl1pC.png
Also added support for imperial units symbols.
2024-04-15 10:59:03 +02:00
Dion Moult bc76c8497e You can now get decompositions non-recursively in element utilities 2024-04-15 10:59:03 +02:00
Andrej730 58ea6d7de9 same generate_pset_templates.py for ifcopenshell and ifc dev repos
same script will be easier to maintain
2024-04-15 10:59:02 +02:00