Andrej730
37f1f6d125
MEP bends - fixed bunch of bugs related to adjusting already existing bends types
2024-04-16 10:37:15 +02:00
Andrej730
5f94e2b251
bends - support for zero radius bends
2024-04-16 10:37:15 +02:00
Andrej730
4b48b30c3b
bends - consider profile dimensions searching for compatible fitting
...
So basically now it won't reuse a bend fitting created for the same profile but with different dimension.
2024-04-16 10:37:15 +02:00
Andrej730
37eb1751b4
bends - adjusting compatible fitting rotation to match the segments
...
Demo - https://imgur.com/a/cYdWy9X (note that no bend types created in the process - it's just adjusting the type created for the first two segments).
2024-04-16 10:37:15 +02:00
Andrej730
5715a14b17
bends - use IfcArcIndex to define bends curves
...
instead of manually generating polylines of segments
2024-04-16 10:37:15 +02:00
Andrej730
e7b6fad348
bends - support for start and end segments
2024-04-16 10:37:15 +02:00
Andrej730
7cef9ffe0e
Bends - replace faceset with simple extrusion
2024-04-16 10:37:15 +02:00
Andrej730
5180f40245
MEP bends - support for circular profiles
...
Demo - https://imgur.com/a/XQBOvGz
2024-04-16 10:37:15 +02:00
Andrej730
315e8a436a
MEP bends - more robust start/end points detection
...
also support for bends with angles > 90 degrees and some other bugs fixed
2024-04-16 10:34:30 +02:00
Andrej730
602ec57cba
Considering parametric data for fitting #3695
...
Search for compatible fitting wasn't taking into account that maybe fitting used for the same segments but fitting's parameters are not the same (such as start_length, end_length, angle and offset between profiles).
I also forgot to promote transition angle to operator's property😬
2024-04-16 10:34:29 +02:00
Andrej730
98503179d9
bim.mep_add_bend
...
Added operator to create bend fittings between objects, it's still work in progress and now it only supports rectangular profiles.
Small demo - https://imgur.com/a/vM7hnJa
2024-04-16 10:33:34 +02:00
Andrej730
f573871493
shape_builder docs test
2024-04-16 10:26:51 +02:00
Andrej730
f92709dadd
Fixed bug in shape_builder.mep_transition_calculate
...
it wasn't taking account that `h` can also end up negative
2024-04-16 10:25:01 +02:00
Andrej730
8bb1a129dd
fixed bug in mep transitions
...
it wasn't taking into account that offset can be too big to sustain the angle
2024-04-16 10:25:00 +02:00
Andrej730
4e47827b86
added tests for shape builder transition length calculator
2024-04-16 10:25:00 +02:00
Andrej730
ca7984e12e
mep transitions - correct angle when connected segments share the same dimensions
...
Basically there are 3 methods to define the transition angle (https://i.imgur.com/AtCIJty.png ). Before we supported only the second method, now we support 1 and 3 too.
2024-04-16 10:24:59 +02:00
Andrej730
b998e1c927
more work on transitions for MEP
...
- support transitions from and to circle profiles
- reworked transition length algorithm now it should be more accurate
- added support for creating transitions between profiles that are parallel but not collinear
2024-04-16 10:24:59 +02:00
Andrej730
86b63242d8
bim.add_transition
...
Added simple operator to add transition between two mep segments (now only rectangular collinear segments are supported).
It also reuses the transition type that was previously used to connect segments of the same type.
Demonstration - https://imgur.com/a/c1AOxj1
2024-04-16 10:24:53 +02:00
Andrej730
4b03cace3e
moving code to shape builder
2024-04-16 10:05:50 +02:00
Andrej730
5b10923b45
ShapeBuilder.polyline - skip creating segments if they are not needed
2024-04-15 13:30:40 +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
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
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
b5d24334fd
Fixed bug with wrong position of support in wall mounted railing
...
The problem was that that support's disk was not rotated according to the railing path.
2024-04-15 09:52:38 +02:00
Andrej730
1dcf74eb60
WALL_MOUNTED_HANDRAIL type for Railing modifier
...
Added WALL_MOUNTED_HANDRAIL type for railing modifier. It's still a bit work in progress - still need to add support for different railing termination types.
Here's the short demonstration - https://user-images.githubusercontent.com/9417531/234582621-6c6f948b-9cdc-4be6-b380-17ddbf5803bf.mp4
2024-04-15 09:52:37 +02:00
Andrej730
d2124e1c8b
Fixed bugs with furniture library toilets and basins #2976
...
Bug was introduced in cf6acd5 when `shape_builder.get_rectangle_coords` started returning coords in counter-clockwise order instead of clockwise.
2024-04-15 09:37:49 +02:00
Andrej730
5d4ecb7177
Sliding doors - moved annotation arrow to Annotation/PLAN_VIEW #2919
2024-04-15 09:25:49 +02:00
Andrej730
be75ef2596
Fixed ifc validation errors for furniture library #2925
...
Fixed bunch of validation errors with furniture library:
- IfcSpaceType PredefinedType wasn't optional
`<attribute PredefinedType: <enumeration IfcSpaceTypeEnum: (EXTERNAL, GFA, INTERNAL, NOTDEFINED, PARKING, SPACE, USERDEFINED)>> Not optional`
- some object had 0.0 depth extrusion
```
Rule IfcPositiveLengthMeasure_WR1:
(self > 0.)
Violated by:
(0.0 > 0.0)
```
- some orphan representations violating:
```
Rule IfcShapeModel_WR11:
((sizeof(self.OfProductRepresentation) == 1) ^ (sizeof(self.RepresentationMap) == 1) ^ (sizeof(ofshapeaspect) == 1))
Violated by:
((0 == 1 ^ 0 == 1) ^ 0 == 1)
+ where 0 = sizeof(())
+ where () = #9091=IfcShapeRepresentation(#15,'Body','SweptSolid',(#9090 )).OfProductRepresentation
+ and 0 = sizeof(())
+ where () = #9091=IfcShapeRepresentation(#15,'Body','SweptSolid',(#9090 )).RepresentationMap
+ and 0 = sizeof(())
```
2024-04-15 09:25:48 +02:00
Andrej730
ec882a1a7d
Fixed validation error for ELEVATION_VIEW curves #2925
...
Error occured because ShapeBuilder was assigning "Curve2D" representation type for elevation view curves when the correct type is "Curve3D".
It use to occur for both doors and windows created with ifc modifier.
```
Validation error text:
2023-04-03:18:21:28,879 ERROR [rule_executor.py:154] On instance:
#135=IfcShapeRepresentation(#21,'Profile','Curve2D',(#134 ))
Rule IfcShapeRepresentation_CorrectItemsForType:
(IfcShapeRepresentationTypes(self.RepresentationType,self.Items))
Violated by:
False
+ where False = IfcShapeRepresentationTypes('Curve2D', (#134=IfcIndexedPolyCurve(#133,(IfcLineIndex((1,2)),IfcLineIndex((2,3)),IfcLineIndex((3,4)),IfcLineIndex((4,1))),$),))
+ where 'Curve2D' = #135=IfcShapeRepresentation(#21,'Profile','Curve2D',(#134 )).RepresentationType
+ and (#134=IfcIndexedPolyCurve(#133,(IfcLineIndex((1,2)),IfcLineIndex((2,3)),IfcLineIndex((3,4)),IfcLineIndex((4,1))),$),) = #135=IfcShapeRepresentation(#21,'Profile','Curve2D',(#134 )).Items
```
2024-04-15 09:25:48 +02:00
Andrej730
3095521e36
Fixed some validation errors for doors and windows #2925
...
Fixed the ones caused by using 3d curves as inner/outer curves in profiles.
2024-04-15 09:25:48 +02:00
Andrej730
0d0691a012
Door modifier - double doors type support
2023-02-11 16:09:13 +05:00
Dion Moult
50d71d5ea1
Black code and make profile representation optional for windows.
2023-02-09 20:13:14 +11:00
Andrej730
9f0ad9be3c
Black formatting window modifier
2023-01-25 11:13:41 +05:00
Andrej730
cf6acd5dd6
ShapeBuilder - added 3d rectangles and polylines support
2023-01-25 11:10:20 +05:00
Andrej730
d0cf5f9d0c
Fixed ShapeBuilder bug for mirroring IfcExtrudedAreaSolid
...
Also fixed typo in shape_builder_examples
2023-01-25 11:10:19 +05:00
Andrej730
1888048d4d
Moved ShapeBuilder to separate module #2679
...
Moved ShapeBuilder to separate module - now `mathutils` will be only required if you're actually using ShapeBuilder (related to #2679 )
2023-01-08 19:47:18 +05:00