mvaerle / python-ifc Goto Github PK
View Code? Open in Web Editor NEWAn IFC file parser in python
License: GNU Lesser General Public License v3.0
An IFC file parser in python
License: GNU Lesser General Public License v3.0
python-ifc is an interesting project, i really like it, and it saves me much time.
But the python performance is low, loading a large file (~ 10M) takes 50 seconds, is there any possibility to improve it?
Also as I knew, there are some tools to do that, e.g. pypy, python, etc. Is there any possibility to translate this project to cython ? thanks.
mvaerle,
Thanks for kicking off this effort, I see good things happening in the BIM world opening up through Python.
I am new to Python so I am slowly getting my way through the file slowly, and the three comments I have are:
Again, kudos and thanks, I don't want to mess your code but if I would like to contribute as I gain confidence in Python.
Kind regards,
William.
Can you slap a license on this code please? I've forked your repo and would like to know what I am allowed to do with the code. Anything standard like Apache 2 or GPL is great. :)
Heads up for those interested, schema attribute assertion fails for python 3 (ifcfilereader.py:~76) suppose this is a regex flag problem as it seems very greedy for PY3..
PYTHON 2
[('GlobalId', 'IfcGloballyUniqueId'), ('OwnerHistory', 'IfcOwnerHistory'), ('Name', 'OPTIONAL IfcLabel'), ('Description', 'OPTIONAL IfcText'), ('ObjectType', 'OPTIONAL IfcLabel'), ('LongName', 'OPTIONAL IfcLabel'), ('Phase', 'OPTIONAL IfcLabel'), ('RepresentationContexts', 'SET [1:?] OF IfcRepresentationContext'), ('UnitsInContext', 'IfcUnitAssignment')]
PYTHON 3
[('\n\tGlobalId', 'IfcGloballyUniqueId'), ('\n\tOwnerHistory', 'IfcOwnerHistory'), ('\n\tName', 'OPTIONAL IfcLabel'), ('\n\tDescription', 'OPTIONAL IfcText'), ('\n UNIQUE\n\tUR1', 'GlobalId'), ('\n INVERSE\n\tHasAssignments', 'SET [0:?] OF IfcRelAssigns FOR RelatedObjects'), ('\n\tIsDecomposedBy', 'SET [0:?] OF IfcRelDecomposes FOR RelatingObject'), ('\n\tDecomposes', 'SET [0:1] OF IfcRelDecomposes FOR RelatedObjects'), ('\n\tHasAssociations', 'SET [0:?] OF IfcRelAssociates FOR RelatedObjects'), ('\n\tObjectType', 'OPTIONAL IfcLabel'), ('\n INVERSE\n\tIsDefinedBy', 'SET [0:?] OF IfcRelDefines FOR RelatedObjects'), ('\n WHERE\n\tWR1', "SIZEOF(QUERY(temp <* IsDefinedBy | 'IFC2X3.IFCRELDEFINESBYTYPE' IN TYPEOF(temp))) <= 1"), ('\n\tLongName', 'OPTIONAL IfcLabel'), ('\n\tPhase', 'OPTIONAL IfcLabel'), ('\n\tRepresentationContexts', 'SET [1:?] OF IfcRepresentationContext'), ('\n\tUnitsInContext', 'IfcUnitAssignment'), ('\n WHERE\n\tWR31', 'EXISTS(SELF\IfcRoot.Name)'), ('\n\tWR32', "SIZEOF(QUERY(Temp <* RepresentationContexts |\n 'IFC2X3.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(Temp)\n )) = 0"), ('\n\tWR33', 'SIZEOF(SELF\IfcObjectDefinition.Decomposes) = 0')]
seems line 38 of ifcfilereader.py
ids = e.get(e["name"],[])
should read
ids = entsByName.get(e["name"],[])
just saying...
When I try to run "ifcfreecad.py" It returns error ImportError: No module named FreeCADGui
it's a little easier to use this if values are returned as ints:
ie. line 39 ids.append(e["id"])
to
ie. line 39 ids.append( int(e["id"]) )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.