-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix typo corrections and signature mismatches in Pascal binding (also helpful for Delphi users) #385
Comments
@alexanderoster Perhaps you can comment on this as I am not familiar with the Pascal bindings. |
I actually have a unit that I am now testing I think I resolved my issues but not sure... Here is what I have so far. But the other challenge is since I am ne to 3MF the documentation is not easy to follow, I just want to render the model in a Viewport and build a list of objects and use the object names. |
@GridLogicMichigan Have you seen our examples? This would be the perfect example for you. If you still have difficulty, share your script, and I will ensure you get the help needed. Unfortunately, I have never written Pascal, but I can get someone to help you. |
Well originally, I just created my own custom Lib3MF unit (see attached Delphi project), I was able to render the models in my viewport but then I broke the code when I tried to get Object Names... so then I decided to take the Pascal unit and make it into a Delphis specific unit... which I attached in a previous comment. Now I want to take the app that I made in the attached zip of the delphi project and use the proper unit so I can have access to the full features of the dll. |
I made some typo corrections, which originated in the Pascal version some of the dll function exports did not match the names in the Pascal unit... by the way.. this one attached is Delphi specific,,, but likely you will need to correct your Pascal one too. [ |
@GridLogicMichigan Thanks. I will check it out. These are all autogenerated, by the way. Currently, the confident bindings are C, C++, Python, and to some extent, Golang. |
Also this: function GetPrereleaseInformation(out APrereleaseInfo: String): Boolean; for whatever the reason their was a pointer exception, but changing the string to widestring allowed me to build a basic app:
|
I am getting: 3MF Read example
|
Did you use 3mf as the type for reader ? |
yes:
and
|
The problem seems to be in identifying ClassTypeId maybe?? But my Delphi class function TLib3MFPolymorphicFactory.Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): T; method pretty much matches the Cpp version, but the class type id seems to be the $5A8164ECEDB03F09 value (0x5A8164ECEDB03F09UL in cpp), seems like it should be the reader case... but I am new to this library... |
I figured it out. the Pascal and Delphi versions should use AnsiString (instead of String) everywhere in those units.. Stilll looking through the unit for other flaws. |
@GridLogicMichigan Really appreciate the amount of time you have put into this binding. Kindly share the final working version and I will try to patch the bindings based on your work in the very next release. |
you're welcome. I had to work on another project so I have set this aside a few days, but I hope to finished up soon. |
I think this should work for Delphi. I am working on a FireMonkey (Delphi) that is similar to the C++ test app (in fact I had one that worked , but adding a Viewport to allow for viewing the models). |
Unit_Lib3MF.zip
to this:
end;` also I can share my new Delphi/FireMoney app that renders the model in a Viewport. |
@GridLogicMichigan It will definitely help fix the issue. I have already asked someone to look into these bindings. |
Unit_Lib3MF.zip |
We have looked through your changes, and they look really reasonable. Best, Alex |
Hi,
Yes we can schedule a time later this week. I tested with Delphi 11.3. The unit (for Delphi) I submitted has not been verified for FreePascal. I am currently working on three projects so this was a bitlower on my priority list but still a priority as we intent on using the lib3MF in our applications.
Regards,
David Moore.
From: Alexander Oster ***@***.***>
Sent: Wednesday, September 4, 2024 11:39 AM
To: 3MFConsortium/lib3mf ***@***.***>
Cc: GL Information Technology ***@***.***>; Mention ***@***.***>
Subject: Re: [3MFConsortium/lib3mf] Fix typo corrections and signature mismatches in Pascal binding (also helpful for Delphi users) (Issue #385)
Hi @GridLogicMichigan<https://github.com/GridLogicMichigan>:
We have looked through your changes, and they look really reasonable.
As we only have FreePascal available for testing a new version, would you be able to come on a live video call to check the implementation against your setup?
Best,
Alex
—
Reply to this email directly, view it on GitHub<#385 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOH3NU4B5BAQHF7JVAK6WNLZU4SQ3AVCNFSM6AAAAABMEO3H5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGQYDCMZRGY>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@GridLogicMichigan Send me an email at github@kaditham.meshing.engineer and we will schedule a call based on everyone's availability. |
I tried to convert the Pascal binding unit to work in Delphi, but I cannot seem to resolve the circular dependencies of the many classes. Will this be provided as another option?
The text was updated successfully, but these errors were encountered: