fel88 / DeepNestPort

DeepNest C# Port
MIT License
78 stars 34 forks source link

SEH exception in Minkowski.dll while calling CalculateNFP() #3

Closed dharani811 closed 5 years ago

dharani811 commented 5 years ago

@fel88 : Thank you man, it works like a charm.

But sometimes on my other PC it produces SEH exception while Calling MinKowski.CalculateNFP() , i clearly know that the exception happens in Minkowski.dll but i dunno how to solve this. It works perfectly fine in one PC but on the other it throws this exception. Can you help, If Possible!

petrasvestartas commented 5 years ago

I just installed fresh copy of DeepNestPort library another computer, on my own it works perfectly, but on another that has totally the same architecture and produces an error:

Solution exception:An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

I believe it simply cannot find minkowski.dll

What can cause this problem? Would it work on computers that has no boost and no visual studio installed (I assume all functions of boost are placed within minkowski.dll)?

fel88 commented 5 years ago

@dharani811 , try to simplify compile command and then recompile dll

cl /Ox -I <boost_1.62_path> /LD minkowski.cc
fel88 commented 5 years ago

@petrasvestartas ,

Would it work on computers that has no boost and no visual studio installed (I assume all functions of boost are placed within minkowski.dll)?

Yes, it would work. Boost and Visual studio are not required (.NET 4.0 only or higher).

Did you switch platrofrm target of all (DeepNestPort, MinkowskiWrapper, DeepNestLib) visual studio projects to x64?

image

petrasvestartas commented 5 years ago

Yes it is all x64, the only thing that is different is the .net framework which is 4.5, I will try to lower it to 4.0

fel88 commented 5 years ago

Actually, I think you don't need to downgrade the .net framework. Can you give me zip archive with your files (where exception appear)?

petrasvestartas commented 5 years ago

Solved it. It was not minkowski.dll and not even the library as console application was running well on three computers. There was a stupid option marked on Rhino Software that does not allow to load unsafe native code. Now it runs perfectly. I will upload the project to GitHub so it would be easier to communicate and post direct link to this repository. This library is so good... Thank you.

fel88 commented 5 years ago

Ok, glad to help.

dharani811 commented 5 years ago

@dharani811 , try to simplify compile command and then recompile dll

cl /Ox -I <boost_1.62_path> /LD minkowski.cc

@fel88 : It worked, Though there are few bugs but compared to my project this is awesome.Anyhow i will share my work here once i upload to github. Once again thank you and much appreciated.

fel88 commented 5 years ago

Thank @Jack000 for his great project. My code is just line-by-line translation :)

dharani811 commented 5 years ago

@fel88 : Here is my version of Nesting that currently am developing.

https://github.com/dharani811/NestingCShaprt

petrasvestartas commented 5 years ago

Dear @fel88 I uploaded Rhino implementation and posted the link of your repository in my github page since the code is made by you and I just implemented it in Rhino: https://github.com/petrasvestartas/OpenNest

I would like to ask if there any way to nest not to rectangle shape but arbitrary polyline? And is there a possibility to nest objects with holes?

fel88 commented 5 years ago

I would like to ask if there any way to nest not to rectangle shape but arbitrary polyline?

Yes, it is possible (but there are some bugs now). Just add not rectangle part and then choose 'move to sheets' image

And is there a possibility to nest objects with holes?

Yes. But my svg files are without holes.

I'll add svg samples with holes and fix bugs about not rectangle shapes soon.