Commit Graph

66 Commits

Author SHA1 Message Date
Andrej730 8b9790822e setup_pytest to find site-packages folder near sys.executable
Used to get errors running setup_pytest.py having python 3.10 installed on my pc (`sys_paths[-1]` was the system's python folder, not the blender's python).
2024-04-16 11:05:23 +02:00
Dion Moult 1a7b95bf1e Minor fix to Uniclass classification 2024-04-16 11:05:23 +02:00
Dion Moult 11eefab4fc Add support for latest uniclass and add Uniclass July 2023 2024-04-16 11:05:23 +02:00
Andrej730 959f05d154 shapebuilder - replace y extrusion args with shortcut for readibility 2024-04-16 10:37:15 +02:00
Dion Moult c4eed78ca1 Update documentation with new selector keys. 2024-04-16 10:34:29 +02:00
Dion Moult 59c8326c51 See #3682. You can now add symbols and multisymbols (i.e. one vertex per symbol) annotations. New default symbols for setout points in demo library. 2024-04-16 10:30:32 +02:00
Andrej730 2808715406 Rename IFC AU Library to IFC Furniture library
Just thought watching BIM Voice last video that some people may overlook it like something Australia specific with "IFC AU Library" name.
2024-04-16 10:26:51 +02:00
Dion Moult feec0e2437 Fix more failing tests. 2024-04-16 10:25:01 +02:00
rileywong311 26b6bc2b3c Merge Brick classification
https://github.com/rileywong311/BrickIfcClassification
2024-04-16 10:24:56 +02:00
rileywong311 0e685f6fb2 Merge IfcClassification
https://github.com/Moult/IfcClassification/tree/master
2024-04-16 10:24:56 +02:00
Andrej730 60d62c2dd4 sort keys in the entity to type mapping 2024-04-16 10:10:50 +02:00
Andrej730 871902de12 More general solution for #3466 2024-04-16 10:10:50 +02:00
Dion Moult 418a3feb6c Fix #3453. Hidden annotation type removed, and demo library now comes with linetypes for dashed, fine, thin, medium, thick, and strong. 2024-04-16 10:10:50 +02:00
Dion Moult e4063f8de5 Demo library now ships with example text annotation types (door tag, window tag, etc) 2024-04-16 10:05:51 +02:00
Andrej730 4b03cace3e moving code to shape builder 2024-04-16 10:05:50 +02:00
Gorgious56 7aab0ccfd7 Fix Ifc modifier error after #3393064 because of legacy context.object
For some reason in the scene properties context.object returns None even if an object is active  in the viewport, so ifc modifiers would randomly throw errors. AFAIK functionally they are supposed to point to the same thing, but active_object seems to be the superior one and context.object deprecated and kept for legacy reasons. Couldn't find dev quote but I'm sure I saw it at some point
2024-04-16 10:05:49 +02:00
Andrej730 01ebb649d9 Library for US AISC15 Steel Profiles #3203 2024-04-16 10:05:08 +02:00
Dion Moult d29f0f171c Override Ctrl-N new file menu to make it easier to start new projects and new IFC icon. 2024-04-16 10:05:08 +02:00
Andrej730 236581baa3 w-type US steel profiles #3203 2024-04-15 13:30:41 +02:00
Dion Moult ef98bd5120 Convert Ifc2Sql script to IfcPatch recipe and add geometry support 2024-04-15 12:04:43 +02:00
Dion Moult ada978ed1f Toggle between full schema (i.e. all tables for every declaration) and partial schema dump into SQL 2024-04-15 11:44:55 +02:00
Dion Moult a4224b104d Experimental support for storage of IFC in MySQL and SQLite 2024-04-15 11:44:55 +02:00
Massimo Fabbro f7c83df793 Move the recipe into the blenderbim script folder and rewrite it as a script 2024-04-15 10:34:41 +02:00
Andrej730 83f5241694 Fixed couple bugs in furniture library
1) last polyline point was failing on Consecutive rule causing validation errors
2) Fixed wrong ifc class for dishwasher (was used occurence class instead of type)
2024-04-15 09:49:53 +02:00
Ryan Schultz 5c301da21e Library - changed to correct class 2024-04-15 09:37:49 +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 7f058ab8bf removed redundant parts from generate_steel_profiles_library.py
removed never used methods and contexts
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 75d3da9908 Fixed all unit.add_si_unit uses after fd87747
Now they were causing `TypeError: Usecase.__init__() got an unexpected keyword argument 'name'`
2024-04-15 09:25:48 +02:00
Andrej730 31f6baaf67 small refactor for Ifc.edit and tool.Ifc
1) replaced IfcStore.edited_objs.add with tool.Ifc.edit
2) updated interface in tool.py
3) removed unlink from tool.Ifc - it was declared there twice
2023-03-17 17:50:56 +05:00
Dion Moult 363ddc2a9b Minor fix 2023-02-27 20:49:45 +11:00
Dion Moult 2fe2c349fd Fix #2743. obj2ifc scripts updated to support multiple OBJ files. 2023-02-23 22:17:34 +11:00
Andrej730 d52618277e Ifc4x3 - entity-types mapping
- added mapping entity-types mapping based on iso release of ifc4x3

- added some manual corrections for `generate_util_type_json.py` if someone would regenerate the map for ifc4.

- manual correction in ifc4x3 mapping for IfcCivilElement. It could be removed in the future releases of IFC if https://github.com/buildingSMART/IFC4.3.x-development/issues/583 is resolved

If curious to look what were the changes for mapping between ifc4 and ifc4x3:
https://github.com/IfcOpenShell/IfcOpenShell/commit/da51253fb0a9d08aa93f5fe3c074d3592b3aa997#diff-98f525c91bb47b9820e603fba61cc015d3e6ae7261593d727c51114e3ff73aa7
2023-02-17 17:57:16 +05:00
Andrej730 a8400ec963 geonodes prototype copyright 2023-02-06 18:44:09 +05:00
Dion Moult a7cc58fb50 Update libraries to use Plan/Body/PLAN_VIEW instead of annotations. 2023-02-04 14:09:35 +11:00
Andrej730 f9bff64f0d ifc geonodes modifier prototype 2023-01-30 13:45:52 +05:00
Andrej730 9f0ad9be3c Black formatting window modifier 2023-01-25 11:13:41 +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
Andrej730 c29048ecfb Furniture library bug fixes 2023-01-08 19:47:18 +05:00
Andrej730 23c7bc3f56 Added ShapeBuilder class and library for non structural assets (
`ShapeBuilder` class is used to programmatically create 2d and 3d ifc shapes and representations. It's inspired by the way OpenSCAD language is designed - the goal was to create a readable and easy way to create new shapes. The class can be imported from `ifcopenshell.util.representation` module.

Examples of things created with `ShapeBuilder` can be found in `shape_builder_examples.py` or `generate_furniture_library.py` / `Non_structural_assets_library.ifc`.

Also added ifc library of non structual assets (furniture etc) - `Non_structural_assets_library.ifc`. All assets are using most common dimensions for them - it makes it good for prototyping. Related to https://community.osarch.org/discussion/1192
2023-01-06 16:35:55 +05:00
Andrej730 f850bd5741 documented create_simple_2dcurve() 2022-11-17 12:03:28 +06:00
Andrej730 ff2714d991 Added c-, z-profiles with lips to AU steel library
Added c- and z-profiles with lips to IFC AU Steel profile library (based on data from https://github.com/boltsparts/boltsparts/pull/15).

For z-profiles I've created simple 2D curve generation function that can be reused later - it requires list of points and list of points with fillets and the results are list of curve points, segments and IfcIndexedPolyCurve.

Example:

    points, segments, ifc_curve = create_simple_curve_from_coords(coords,
        fillets =     (0,   1,   4, 5, 6,   7,   10, 11),
        fillet_radius=(r+t, r+t, r, r, r+t, r+t, r, r),
        closed=True, ifc_file=ifc_file)
2022-11-15 13:35:44 +06:00
Andrej730 03781bdf9b Updated EU, AU steel profiles libraries
1) Updated AU profiles based on more correct data (https://github.com/boltsparts/boltsparts/pull/4) - also added welded i-beam profiles
2) Added inner and outer fillet radius to hollow profiles since this data was added to https://github.com/boltsparts/boltsparts
3) Added more data to ifc profiles that was available on bolts: FilletRadius for I-beams, C-beams; FilletRadius and EdgeRadius for I-beams. Sovles #2556
4) Set names IfcProfileDef names too. Solves #2556
2022-11-08 11:29:43 +06:00
Andrej730 c0909dace0 black.py formatting 2022-11-02 17:35:51 +06:00
Andrej730 ebf3cd8909 Added IFC libraries for AU and EU profiles
Also added script that was used to generate those libraries (the script is using data from https://github.com/boltsparts/BOLTS).

Types of steel profiles included:
I profiles, Z profiles, C profiles (known as U profiles in IFC), L profiles (both equal and unequal), hollow profiles (circle, square and rectangular).
2022-10-29 10:32:26 +06:00
Dion Moult a34c0cb35c Fix a variety of IFC validation errors in entity creation and asset appending 2022-10-14 18:19:35 +11:00
Martin15135215 6aa4ca89fe Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2022-09-04 09:22:58 +00:00
Martin15135215 f11f648630 From append methode to do with numpy 2022-09-04 10:25:02 +10:00
Martin15135215 248ac71215 From append methode to use numpy 2022-09-03 19:13:55 +02:00