-
Notifications
You must be signed in to change notification settings - Fork 183
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
New Apis #411
New Apis #411
Conversation
@@ -45,6 +45,7 @@ describe('Test the column example', () => { | |||
count++; | |||
}) | |||
expect(count).toEqual(36); | |||
expect(ifcAPI.GetAndClearErrors(m2).size()).toEqual(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beachtom i suspect the parsing error was that no IfcProject entity is in the model, can you confirm ?
@beachtom, you are right, everything was already there it just needed some tweaking. Couldn't find your comments, sorry, can you point me to them ? |
Not sure if you saw them all - the main one is for me spinning the package.json commands into shell scripts created a cross platform issue - I built on mac M1 - and I am unsure how it will respond on windows. A quick google implied to me using scripts was not a best practice approach for cross platform. The other issue is we now have two Dockerfiles in the repo - can we make it so there is only one? I will need to look at your latest changes later - but thanks in advance |
So I like the changes. Good spot on removing the IDs in the schema file to reduce size (I assume that is the reason). My only thoughts now are: can we have something in the schema gen. Perhaps in schema_aliases (we could perhaps rename that file schema_config) that list objects used in the API This could then generate for each of them a typescript alias i.e. type IfcOwnerHistory = IFC2X3.IfcOwnerHistory | IFC4.IfcOwnerHistory | IFC4X3.IfcOwnerHistory |
Oops, my bad, i didn't intent on pushing the changes in package.json & the build_scripts. I think a huge benefit of removing the ID is that users don't need to care about them anymore, when creating new objects (they really shouldn't in most use-cases).
that was on my mind too! helps a lot with writing schema generic code |
Great - thanks for removing that. I think this will be great once we can merge it. A few other things I noticed:
I think most of these are caused by the fact the CreateModel no longer creates the header. I think this is quite a breaking change and may cause a few people lots of issues. Perahps we should add a boolean parameter here that is default to true to outputs the header - and the ModelAPI can set this to false. Happy to discuss alternative approaches as well |
I will mark this as a real pull request, as soon as i'm ready to merge. The columns test should work now, but i haven't tested the viewer examples. When i reopen the generated columns model i get parsing errors. Are you sure that the code generates valid ifc ? Because if yes, that means there might be a bug somewhere. No all writing is still valid, there is no change in the api. I also fixed the parsing error for empty sets and changed some test case, because they weren't working as expected. |
Sorry I mean to reply to this - I will keep an eye out for you to mark it - but if I don't respind just @ me |
@D4ve-R - I need some of the code from this to be merged to help fixing a bug - do you mind if I extract elements of this and get it merged and you can finish the rest? |
To grab the code I needed to merge I rebased this to main |
@beachtom no problem! |
Added
ModelApi
highlevel model api, accessible inifcApi.modelApi
GeomApi
highlevel geometry api, accessible inifcApi.geomApi
Changes:
CreateModel
does NOT write ifc headers anymore.WriteLine
acceptsType | Type[]
now and returnsnumber | number[]
Example
The following file was written with the new api, see ModelApi & GeomApi tests