Andrej730
a44357dad5
shape builder polyline example and tests
2024-01-25 16:46:34 +05:00
Andrej730
2ab32e41b2
shape builder docs fixes
2024-01-24 16:38:53 +05:00
Andrej730
3fbd9d7cdf
IFC4 Landscape Library
...
Created IFC library with simple trees, shrubs and hedges - with both 2d and 3d representations. Example - https://i.imgur.com/pOjh1si.png
Now it's available along with the furniture library when creating new project - https://i.imgur.com/Ho0B5Gn.png
2024-01-24 16:38:52 +05:00
Dion Moult
e8bd272189
Fix #4057 . Data objects for the API are now in util.data instead of mixed into the shape builder utility and only depends on numpy.
2023-11-29 14:36:01 +11:00
Dion Moult
434a11a502
Fix #4057 . Move clipping info dataclass to util.shape_builder
2023-11-29 09:28:24 +11:00
Dion Moult
3e268be5c7
Fix #4052 . Bug where invalid plane was generated due to missing X axis.
2023-11-28 11:52:56 +11:00
Andrej730
c6454803ee
fixed issue adding bend between segments located at the same point
...
also added some tests
2023-11-14 17:18:57 +05:00
Andrej730
7b28bc9c68
fixed bug creating transition shapes
...
it was accidentally assigning extrusion vector instead of an offset
2023-09-18 11:30:36 +05:00
Andrej730
b0d1823968
MEP bends - fixed bunch of bugs related to adjusting already existing bends types
2023-09-15 15:36:33 +05:00
Andrej730
9778253d21
bends - support for zero radius bends
2023-09-14 18:19:03 +05:00
Andrej730
d79b912e0e
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.
2023-09-13 16:30:20 +05:00
Andrej730
7ec8f8b03e
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).
2023-09-13 16:30:20 +05:00
Andrej730
d3df22b44b
bends - use IfcArcIndex to define bends curves
...
instead of manually generating polylines of segments
2023-09-12 16:29:33 +05:00
Andrej730
257208d55b
bends - support for start and end segments
2023-09-12 16:00:02 +05:00
Andrej730
6f9e14ceb0
Bends - replace faceset with simple extrusion
2023-09-12 16:00:02 +05:00
Andrej730
d854984dda
MEP bends - support for circular profiles
...
Demo - https://imgur.com/a/XQBOvGz
2023-09-12 16:00:01 +05:00
Andrej730
e93ff7a6b1
MEP bends - more robust start/end points detection
...
also support for bends with angles > 90 degrees and some other bugs fixed
2023-09-11 16:28:14 +05:00
Andrej730
bf80e4b5e1
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😬
2023-09-08 19:40:18 +05:00
Andrej730
cfac835607
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
2023-09-04 15:42:45 +05:00
Andrej730
6089d3af78
shape_builder docs test
2023-08-28 16:14:05 +05:00
Andrej730
a30ad9b886
Fixed bug in shape_builder.mep_transition_calculate
...
it wasn't taking account that `h` can also end up negative
2023-08-24 18:22:03 +05:00
Andrej730
1a142ad5eb
fixed bug in mep transitions
...
it wasn't taking into account that offset can be too big to sustain the angle
2023-08-23 18:42:06 +05:00
Andrej730
2bc22e150c
added tests for shape builder transition length calculator
2023-08-23 18:42:06 +05:00
Andrej730
64bc7af4ef
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.
2023-08-22 16:06:24 +05:00
Andrej730
2d3295ec54
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
2023-08-21 17:56:17 +05:00
Andrej730
2c1c13f27e
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
2023-08-09 15:04:27 +05:00
Andrej730
bb3e978bba
moving code to shape builder
2023-07-21 11:04:44 +05:00
Andrej730
9fbcb3900f
ShapeBuilder.polyline - skip creating segments if they are not needed
2023-07-05 13:02:17 +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
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
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
11601d6532
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.
2023-04-28 11:43:15 +05:00
Andrej730
ee2f18349f
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
2023-04-26 18:04:39 +05:00
Andrej730
2e973a4591
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.
2023-04-14 19:07:38 +05:00
Andrej730
f6623db0e6
Sliding doors - moved annotation arrow to Annotation/PLAN_VIEW #2919
2023-04-04 18:38:44 +05:00
Andrej730
fc45f5b48f
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(())
```
2023-04-03 19:53:43 +05:00
Andrej730
c7105a22e6
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
```
2023-04-03 19:53:43 +05:00
Andrej730
afeeaeb984
Fixed some validation errors for doors and windows #2925
...
Fixed the ones caused by using 3d curves as inner/outer curves in profiles.
2023-04-03 19:53:42 +05: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