-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for more types #5
base: master
Are you sure you want to change the base?
Conversation
Added support for around 40 IfcEntity types and subtypes
Hey, a little more detailed explanation of what's been done. We've added support for around 40 types and all of its subtypes (if any). You can view the list in the file ElementType.cs. There are over 200 cases now for the integer input for type. To make the process of choosing the correct type from Grasshopper easy, I have made another component that takes your input in text form of which type you wish to choose and sends the correct number for it to the respective component. You can see the picture below to see how it works. |
Hey! Thank you for contribution! Could you also Commit this additional component for choosing proper enum? |
Sure, I'd love to share that component as well. But there was a small issue we faced. In this code in the repository, we are only able to make changes to the backend. Building the solution in Visual Studio does not generate a gha file. Hence, I had to make the component separately. |
Have you changed the .csproj post-built events, so it fits your machine? This way you should be able to compile also .gha. I'm using Rider, but I don't think it makes any difference there. |
I'll have a look at it and see what I can do |
Added a custom component to choose the IfcEntity type and its subtype. Also added a button to enable Ifc file generation only when pressed.
Hey, I've tried it, and it looks great. I will need some time to read it more, and reorganize some stuff there, functionality itself is really good. Do you have some kind of a list of these types somewhere, so I can attach it inside documentation? |
Modified MeshToElements and ProfileToElements components to directly accept IfcEntity type as string to choose the types in an easier way.
Hey, Yes, here is a text file with all the types mentioned. I've also modified the MeshToElements and ProfileToElements components to directly take in the strings of the type and subtype to avoid having any extra component for this. |
Hey, it is better right now, cause there is no redundant integers in between, but still there is too much logic there. Totally this pull request has something like 2000 new lines of code (while the whole project is 1000) just to properly attach the type and subtype, so xBim will recognize it. I think we should find a way to do it without these if statements, I hope we can make it less than 200 lines. One idea is to insist that the user will need to input correct enum for Element Type, so he will need to input a string, for example: "ElementAssembly_AccessoryAssembly" - we will only convert this string to enum automatically. That will remove many lines of code. If you have any other ideas to simplify whole code let me know. |
Added support for around 40 IfcEntity types and subtypes