Dion Moult
dbfa4ecf65
Fix minor regression in fe0be0c
2024-09-18 22:58:22 +10:00
Dion Moult
736d91f38e
Shape builder now supportes meshy things and faceted breps
2024-09-18 21:35:40 +10:00
Thomas Krijnen
1697e49e65
Merge branch 'v0.8.0' into fix-ifccircle-ifcellipse-processing
2024-09-12 20:18:57 +02:00
Andrej730
32c6ea9363
shapebuilder.profile - fix bug in ifc2x3 assigning non existing Position attr
...
confused arbitrary profiles with parametric profiles in 640320f
2024-09-11 16:02:48 +05:00
Andrej730
fe0be0cdae
shape_builder.create_axis2_placement_2d
2024-09-11 15:53:04 +05:00
VDobranov
f56bae141b
Update shape_builder.py
...
Described in the https://github.com/IfcOpenShell/IfcOpenShell/issues/4989
2024-07-12 14:59:04 +10:00
Andrej730
a594a6cfe2
typing
2024-06-21 17:49:02 +05:00
Dion Moult
1db26aab15
Fix #4837 . Make mathutils dependency optional.
...
In the long term, I'd like to replace mathutils with numpy.
2024-06-15 15:10:36 +10:00
Andrej730
db98f13982
typing
2024-06-07 17:15:52 +05:00
Andrej730
bb8e84e5ec
typing
2024-05-15 17:18:33 +05:00
Andrej730
640320f70d
shape_builder - create non-optional position for profiles in ifc2x3
2024-04-25 18:05:47 +05:00
Andrej730
5b877b549a
fix numpy typing #4579
...
On older numpy versions, np.ndarray was less forgiving and wasn't allowing passing 1 argument instead of required 2.
And turned out numpy doesn't yet have typing for shapes (https://github.com/numpy/numpy/issues/16544 ), so all matrices and other shapes specified as `npt.NDArray[np.float64]`.
Fixed type discrepancies for `get_edges` and `get_faces` and also had to fix `import_ifc` as Blender apparently has problems with storing np.int32 in custom attributes (https://projects.blender.org/blender/blender/issues/121072 ), tested that Blender is okay with np.int32 in other cases we had (addressing BMesh.verts[i] where `i` is np.int32).
2024-04-25 18:05:47 +05:00
Andrej730
721466c429
typing
2024-04-25 18:05:47 +05:00
Dion Moult
635ddce93d
Autodetect CSG representation types in shape builder
2024-04-04 18:28:26 +11:00
Andrej730
a3d970e014
shape_builder.create_axis2_placement_3d utility method and docs
2024-03-06 17:30:55 +05:00
Andrej730
51b5a507cf
shape builder docs
2024-01-25 16:46:38 +05:00
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