Commit Graph

46 Commits

Author SHA1 Message Date
Thomas Krijnen cc49b0efdc Don't fail on unmapped attribute types (IFC4.4) 2023-04-10 20:17:26 +02:00
Thomas Krijnen 785d2e601c Fix after 31cf1127a6 2023-02-15 09:52:21 +01:00
Thomas Krijnen 97385efbca entity_instance.get_info(scalar_only=) 2023-02-14 20:11:24 +01:00
Thomas Krijnen e87524ba11 ifcopenshell.settings.unpack_non_aggregate_inverses 2023-02-14 10:04:44 +01:00
Thomas Krijnen 6b7aeb90c7 Express rules: allow comparison of instances to instances and values 2023-02-05 13:08:55 +01:00
Dion Moult c8ba96cde8 Make syntax highlighting explicit in docs 2023-01-10 10:16:28 +11:00
Thomas Krijnen 0f9c84c1ce Feature: express rules (#2662)
* temp reasonable state, missing rule_head contents

* better state, with init() and rule_id, but some missing parameters

* performance; embed root in dict; fix lookup

* Add ast_utils

* Fixes related to listnode and typo

* First steps with code gen

* Finalize first steps towards working code generation

* Backwards compat

* Rule execution, error formatting, test cases

* Where rule: support indexing, more expressions, test plane angle measure

* positive length measure test cases

* Venture into entity rules, test actor role

* Fixed for not unary op and address test cases

* Test group qualifier and air terminal type

* typeof() implementation and test annotation curve occ

* Flexible handling of expression, type set intersection, IfcAnnotationSurface test cases

* Functions, derived attrs, fix branch order, allow to terminate branches, apply -1 to index

* Implement express query(), test cases for 2x3 bspline curve

* Function args, if-else, repeat, entity instance construction, cshape test cases

* Multiple function call arguments and other small but influential changes. IfcDotProject() almost working except for variable case

* Make lowercase and fix assignment to qualified lhs

* Entity instance schema without file, aggregate assignment workaround, range fix, lowercase instance locals, extruded area direction test cases

* Enumeration item handling, query() robustness, arbitrary profile test cases

* Empty aggregate_initializer, xor and instance equality, nested expression fix in IfcCrossProduct, axis2-3d test cases

* Numeric stable sort with indices greater then 10, get ast node parent, redeclared derived support, nested expression robustness, define entity functions, case statements, xor, mod, bool literals, nvl, unknown, conversion based unit test cases

* Safeguard for schema name case norm, case norm query variable_id

* free instance comparison, supertype serialization fix, include inherited attributes in locals, proper elif-else in case stmt, loindex, shape rep test cases

* Union operator on set, retain general_aggr_types in parse tree, test cases for property set

* Escape stmt, rule locals and statements

* Return calculated values for redeclared derived attributes

* fix for rules without stmt, add derived and inverse attributes to locals, filter unused locals, wrap exists() arg with lambda to catch indexerror, support repeated aggr init element, typeof() none check, enum namespace uppercase

* Regen 2x3 rules

* Rule test filter only on basename

* Update fixtures for compliance with full body of rules

* Add rule support to ifcopenshell.validate

* Implement usedin() function, test cases for IfcWallSC MLS

* blength

* Run code generation on all schemas

* Try to eliminate runtime pyparsing dep

* Try to eliminate runtime pyparsing dep
2022-12-26 11:29:32 +01:00
Thomas Krijnen cd27d48701 #2482 entity_instance.to_string() 2022-10-08 17:18:47 +02:00
Thomas Krijnen f41ad0d5de #2471 work around file gc with instance refs 2022-10-04 10:23:08 +02:00
Thomas Krijnen 5c7cf4469f Compute meaningful hash and eq on simple type instances 2022-09-04 14:23:35 +02:00
Dion Moult f0a00cbc94 #2185 Set up auto generated API reference documentation via sphinx-autoapi 2022-05-09 15:35:52 +10:00
Dion Moult 810c71dfa2 IfcOpenShell-python licensing and black. See #1082. 2022-01-19 12:18:33 +11:00
Thomas Krijnen be286c4d9d #1974 populate attribute map upon schema registration 2022-01-12 15:09:22 +01:00
Dion Moult 666e484b2b Run black on IfcOpenShell-python. 2022-01-10 15:42:24 +11:00
Thomas Krijnen dbc6f521fe #1912 apply also on types 2021-12-14 09:57:31 +01:00
Thomas Krijnen c52f851d79 #1807 method mapping proposal 2021-12-14 09:57:31 +01:00
Thomas Krijnen 0d49c89943 logical handling in python and small fixes 2021-07-29 16:32:45 +02:00
Thomas Krijnen d320c1dac1 Some quick and dirty #1560 2021-07-10 21:43:27 +02:00
Dion Moult 549bc0e1a9 Minor fix. See #1475. 2021-07-04 20:22:20 +10:00
Dion Moult 6b0a58db7d Experimental undo and redo Python prototype (#1539)
* Experimental undo and redo Python prototype

* Simplify history, use transaction jargon, use walk for more robust serialisation

* Black file, set history size, add file reference to entity_instance constructor

* Ensure that files are always passed when entities are wrapped

* Add support for undo/redo of all project module operations

* Minor fix

* Blender to IFC mappings are now managed by Blender RNA, so they don't break on undo operations. See #1475.

* Implement undo for all attribute operations. See #1475.

* Update documentation for installation of add-on

* Revert Blender RNA approach for Blender-IFC mappings, because it didn't scale, but still fix the undo/redo object memory corruption with new "reload_linked_elements" method.
2021-06-30 18:34:12 +10:00
Thomas Krijnen e1b68dafa4 #841 cpp implementation of get_info() 2021-01-10 12:36:47 +01:00
htlcnn 286c77e3b0 black ifcopenshell-python 2020-11-02 08:28:02 +11:00
Dion Moult 295b2fb56b More documentation 2020-05-22 11:30:45 +02:00
Dion Moult d62bbd995f Add sphinx docstrings to ifcopenshell python binding 2020-05-22 11:30:45 +02:00
Thomas Krijnen 0016256f57 Merge branch 'master' into v0.6.0 2018-11-19 17:13:28 +01:00
Thomas Krijnen 0018224da7 Handle python positional arguments in case of derived fields more explicitly 2018-11-19 16:38:52 +01:00
Thomas Krijnen 54d96fe167 Merge branch 'master' into v0.6.0
# Conflicts:
#	src/ifcconvert/IfcConvert.cpp
#	src/ifcgeom/IfcGeom.h
2018-09-07 14:42:15 +02:00
luz.paz d78c9171db Misc. typos
Found via `codespell -q 3`
2018-09-07 11:52:01 +02:00
Thomas Krijnen e2f79ec1ba Work on python wrapper 2017-12-31 12:20:13 +01:00
tymokvo e06105e878 added some documentation/examples 2017-12-06 12:20:22 +01:00
thorade 6cd59aa121 autopep8 aggressive
autopep8 --in-place --recursive  --max-line-length=200 --aggressive --aggressive --aggressive ifcopenshell
2017-11-07 15:28:45 +01:00
thorade 8439e5b46d autopep8
autopep8 --in-place --recursive  --max-line-length=200 ifcopenshell
2017-11-07 15:28:45 +01:00
thorade 6bffee83fe identical from __future__ import in ALL py files 2017-11-05 16:17:27 +01:00
Thomas Krijnen f3b3e2a441 More meaningful error message setting attributes in python 2017-10-06 16:02:34 +02:00
Thomas Krijnen 85524170dd More advanced entity_instance.get_info() 2017-08-04 16:30:43 +02:00
Thomas Krijnen a58f23fae2 Missing introspection methods in Python 2017-08-02 16:08:07 +02:00
Thomas Krijnen 94224411a9 Recursive get_info() 2017-08-02 16:06:27 +02:00
Thomas Krijnen 5c7e7cab1a Raise IndexError 2017-08-02 16:05:56 +02:00
Thomas Krijnen 04e3018f3c Use default logger 2017-07-17 18:09:49 +02:00
Thomas Krijnen 5e0da9725a ifcparse refactoring (#190)
Unify attribute containers, provide latebound attribute access on IfcBaseEntity, more basic tests on Travis
2017-06-05 17:26:58 +02:00
Thomas Krijnen 4faa66f9b8 Fix for python 2.7 2017-03-09 12:04:07 +01:00
Thomas Krijnen 5705f24f3e python: make logging import conditional in case time is not built 2017-03-09 11:47:54 +01:00
Jelle Feringa 5d6160b47a log exceptions on get_info method
these exceptions currently are actively being hidden, which is
intransparent / could make debugging challenging

improved formatting tot pep8
2017-01-04 10:26:04 +01:00
aahoo 99bde93af5 adds get_info method for class #resolves #175 2017-01-01 18:15:55 +01:00
Thomas Krijnen 240133515a Unify usage of spaces in Python library code 2016-07-18 15:53:20 +02:00
Thomas Krijnen aebb9e324b Geometry serialization (#71)
Serialize geometry to IFC instances directly from a TopoDS_Shape
2016-06-22 15:03:18 +02:00