Dion Moult
a970120fac
See #3126 and 5b4010c. Fix failing tests, and allow schema_by_name to follow the same schema_version distinction as file.
2023-07-06 22:40:31 +10:00
Dion Moult
5b4010c67d
Fix #3126 . Implement mapping from IFC4X3 to IFC4X3_ADD1 and explicit version identifiers in ifcopenshell.file
2023-07-06 14:22:36 +10:00
Andrej730
9fbcb3900f
ShapeBuilder.polyline - skip creating segments if they are not needed
2023-07-05 13:02:17 +05:00
Dion Moult
a1caef5b4f
See #3334 . Fix some get_pset implementation errors in 64516a1
2023-07-05 10:37:13 +10:00
Andrej730
52a8fcd86e
add_representation - detect non consequtive curves and handle them
...
Basically if current mesh curve is non consequtive we handle it in similar way to b03c4da7b - convert it to curves using Blender and then save them to ifc.
The advantage is that it creates less curves in ifc because mesh method wasn't able to detect separate curves correctly if vertex order was messed up (usually it is) and it would create separate curve for each curve segment.
I've also replaced figuring vertex duplicates with `bmesh.ops.remove_doubles` manually with `bmesh.ops.remove_doubles` and it's now much faster. In some cases because of the manual calculations it was taking too long - in #3233 Ryan mentiones that it freezes blender, it wasn't really freezing Blender but to finish calculations it would take 10 minutes.
2023-07-04 16:43:42 +05:00
Andrej730
b03c4da7bf
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
2023-07-04 10:57:22 +05:00
Dion Moult
c0402687b5
See #3334 . Optimise pset getting and add simple "broadphase" filtering for all facets for faster validation.
2023-07-04 15:50:44 +10:00
Dion Moult
64516a173a
See #3334 . Fix bug where get_pset didn't handle property inheritance correctly.
2023-07-04 15:50:44 +10:00
Andrej730
a86456392b
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
2023-06-30 18:05:26 +05:00
Andrej730
243eee9ebf
Added support for OCCLUSION textures for 3aff29dec
2023-06-30 14:44:06 +05:00
Andrej730
f23ac034c7
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
2023-06-30 14:19:07 +05:00
Andrej730
f5031035c7
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))
2023-06-30 13:27:00 +05:00
Thomas Krijnen
fc50bdd3a0
Fix openbot build
2023-06-30 09:32:10 +02:00
Thomas Krijnen
fc4b36e759
Fix openbot build
2023-06-29 22:04:18 +02:00
Thomas Krijnen
832cdce934
Fix openbot build
2023-06-29 22:03:29 +02:00
Andrej730
bba118ed19
ShapeBuilder to use IfcPolyline of IfcIndexedPolyCurve to support ifc2x3
...
needed it to add suport for window/door modifiers in ifc2x3 in the next commit
2023-06-29 18:38:06 +05:00
Thomas Krijnen
d501118eb4
Add --prefilter flag to draw.py
2023-06-29 13:29:49 +02:00
Andrej730
40656297a6
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.
2023-06-28 15:57:29 +05:00
Andrej730
f88835b87b
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.
2023-06-28 15:56:38 +05:00
Dion Moult
89b0674b08
You can now exclude classes from streaming in ifcopenshell.stream
2023-06-28 12:41:50 +10:00
Andrej730
e89a9cd01c
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).
2023-06-27 19:30:49 +05:00
Dion Moult
183230b7f5
Naive implementation of file stream and Lark based IFC-SPF reader to handle huge IFCs.
2023-06-27 21:03:02 +10:00
Dion Moult
897dfb1e33
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).
2023-06-26 17:08:50 +10:00
Thomas Krijnen
1c996013b6
#2805 Further fixes for aggregates of select
2023-06-22 14:10:55 +02:00
Thomas Krijnen
7aa04611a1
#2805 provide aggregate typedef for select types
2023-06-22 10:07:26 +02:00
Thomas Krijnen
c72f960ed4
#2805 statically typed select types as aggregates
2023-06-21 19:25:04 +02:00
Thomas Krijnen
e6b05b547b
Further defer sql.py imports for ifcopenbot to succeed
2023-06-16 20:32:40 +02:00
Thomas Krijnen
5e8ec48d98
Comment out import mysql.connector
2023-06-16 14:16:17 +02:00
Thomas Krijnen
9c21304629
Correct if-clause
2023-06-16 14:08:48 +02:00
Totally a booplicate
d31b470e83
smol fix
2023-06-16 14:08:48 +02:00
Totally a booplicate
1ecb25684e
fix missing else clause
2023-06-16 14:08:48 +02:00
Totally a booplicate
5999976d37
raise TypeError on invalid pset
2023-06-16 14:08:48 +02:00
Totally a booplicate
51e5f843ba
rework unpack_unit_value
...
handle the `None` case, simplify logic
2023-06-16 14:08:48 +02:00
Totally a booplicate
3d787338fb
improve naming of the new method
2023-06-16 14:08:48 +02:00
Totally a booplicate
de67648f3e
improve update_existing_properties
...
explicit class check
error out on a not supported type
better methods names
2023-06-16 14:08:48 +02:00
Totally a booplicate
afa803ea62
implement _try_purge
...
per review comment about repeating code
2023-06-16 14:08:48 +02:00
Totally a booplicate
3a0aaee03b
restructure if/elif/else chain
2023-06-16 14:08:48 +02:00
Totally a booplicate
a5353e02b5
support tuples
2023-06-16 14:08:48 +02:00
Totally a booplicate
1acc743370
move prop check
2023-06-16 14:08:48 +02:00
Totally a booplicate
375f4f2a86
per review
...
change exception message
remove TODO
pass `Unit`
raise `NotImplementedError` when no template was found
2023-06-16 14:08:48 +02:00
Totally a booplicate
d4b88fd422
resolve TODO
...
This is being fixed, we should always have a class to use
2023-06-16 14:08:48 +02:00
Totally a booplicate
df6cc74a87
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
2023-06-16 14:08:48 +02:00
Dion Moult
c8ede38edb
Run black on existing entity_instance
2023-06-16 16:17:17 +10:00
Dion Moult
704e27ecca
Build testing prototype of an SQLite based file / entity_instance.
2023-06-16 16:16:22 +10:00
Dion Moult
bac683e105
Fix bug for getting psets of materials and profiles in IFC2X3
2023-06-16 13:32:33 +10:00
Dion Moult
64b9d2e5e3
See #3226 . New batched remove_deep2() which uses serialisation for faster removal performance on large graphs.
2023-06-06 17:40:31 +10:00
Andrej730
a3859385c4
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).
2023-06-05 17:21:27 +05:00
Andrej730
c7394faf51
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.
2023-06-05 14:54:41 +05:00
Dion Moult
3ee6bdf207
You can now get decompositions non-recursively in element utilities
2023-06-05 15:11:55 +10:00
Andrej730
5805653431
same generate_pset_templates.py for ifcopenshell and ifc dev repos
...
same script will be easier to maintain
2023-06-03 12:57:48 +05:00