fougue / mayo

3D CAD viewer and converter based on Qt + OpenCascade
BSD 2-Clause "Simplified" License
1.45k stars 276 forks source link

IGS File is breaking on debian build #254

Closed nikhil-convrseai closed 9 months ago

nikhil-convrseai commented 9 months ago

WhatsApp Image 2024-02-02 at 17 47 11

Hi, when i'm converting iges file from debian build to glb it is breaking it like this whereas when i'm trying it in macos build it is working fine.

on ubuntu i'm doing it via command line on a server in aws.

here is the view of file on macos the original and correct file:

image

nikhil-convrseai commented 9 months ago

also when i'm using step of the same file

it is removing the material

image

whereas original is perfectly fine

image

HuguesDelorme commented 9 months ago

Hello can you attach the igs and step files so I can try to reproduce the issues?

nikhil-convrseai commented 9 months ago

Hi

Please find the attached files Montratec Log.igs https://drive.google.com/file/d/1NFc8hirZ2rlgZuov4kerbRu2dAuIMksH/view?usp=drive_web MontratecLogistik.step https://drive.google.com/file/d/1CYaOv29jPVTnpjuCYbUK0t6fdUWFsost/view?usp=drive_web

On Mon, Feb 5, 2024 at 1:39 PM Hugues Delorme @.***> wrote:

Hello can you attach the igs and step files so I can try to reproduce the issues?

— Reply to this email directly, view it on GitHub https://github.com/fougue/mayo/issues/254#issuecomment-1926424922, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3PDGFHXIZAY2ZNCWQATGHTYSCHUFAVCNFSM6AAAAABCWTDMZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRWGQZDIOJSGI . You are receiving this because you authored the thread.Message ID: @.***>

nikhil-convrseai commented 9 months ago

Hi @HuguesDelorme could you reproduce the issue?

HuguesDelorme commented 9 months ago

Yes and I think the colors(materials) seem correct in the step->gltf case. It's just that the gltf rendering in Mayo has an issue with lighting(too much intensity)

nikhil-convrseai commented 9 months ago

And what about iges to gltf?

On Tue, 6 Feb, 2024, 13:41 Hugues Delorme, @.***> wrote:

Yes and I think the colors(materials) seem correct in the step->gltf case. It's just that the gltf rendering in Mayo has an issue with lighting(too much intensity)

— Reply to this email directly, view it on GitHub https://github.com/fougue/mayo/issues/254#issuecomment-1928981484, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3PDGFF3ZU4N6WFLFOYX7B3YSHQSLAVCNFSM6AAAAABCWTDMZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYHE4DCNBYGQ . You are receiving this because you authored the thread.Message ID: @.***>

nikhil-convrseai commented 9 months ago

hi @HuguesDelorme were you able to find the issue with IGES? it is a bit critical for us to solve this.

HuguesDelorme commented 9 months ago

I'm getting different imports(for the IGES file) when Mayo is built with OpenCascade 7.6 and 7.8 With OpenCascade 7.6: image

With OpenCascade 7.8: image

When trying to load the gltf export I'm getting a crash in Mayo Is that what you'r experiencing as well?

nikhil-convrseai commented 9 months ago

no my issue is that when on ubuntu i pass the igs file through mayo it breaks the file into small pieces it is not coming inact like you are getting.

I'm using ubuntu 22.04, which has opencascade 7.5 can that be the issue?

nikhil-convrseai commented 9 months ago

Hi @HuguesDelorme I upadted my Opencascade to 7.6 on ubuntu and was built mayo with the same and now i'm also facing same issue of export i.e. it is crashing while exporting gltf. how can i solve that ?

HuguesDelorme commented 9 months ago

After investigation it happens that there's a data race in Mayo when creating a model tree(just after file import) that contains many root entities. This is the case for this IGES file I'm currently implementing a fix, will let you know when it's ready in develop branch

HuguesDelorme commented 9 months ago

@nikhil-convrseai The crash should be fixed with latest changes in develop branch Let me know if it works also on your side

nikhil-convrseai commented 9 months ago

@HuguesDelorme I tried but it still failing while exporting glb,

my environment is ubuntu 22.04 and opencascade version 7.6.0

HuguesDelorme commented 9 months ago

I've tested in virtual machine running ubuntu 20.04 and Mayo was built in debug with OpenCascade 7.7.0 Exporting the "Montratec Log.igs" file to glTF works fine:

ubuntu_gltf_export

nikhil-convrseai commented 9 months ago

@HuguesDelorme I'm using mayo with CMD only and I'm getting

DEBUG: OpenCascade settings file doesn't exist or is not readable [path=opencascade.conf]
 32% Importing..

Error during export to '/home/ubuntu/convrse/meshes/high/QEGozO0Y6EgZa7Jy0uoS9/TK_ymQDis5hw/high/OJZCJpwgl0Vj/montratec_log.glb' File
 write problem
100% Imported

error when exporting gltf now opencascade version is 7.7.0 only and ubuntu is 22.04

nikhil-convrseai commented 9 months ago

Hi @HuguesDelorme I tried on a separate new instance and build opencascade from OCCT github repo and using version 7.7.0 and built mayo with that opencascade .

And i also installed ubuntu desktop onto it to look deeper and found that i'm getting following error when exporting gltf.

Screenshot 2024-02-13 at 18 10 51

please let me know to fix this?

HuguesDelorme commented 9 months ago

You need to install RapidJSON library for glTF output with OpenCascascade Install it with eg sudo apt-get install rapidjson-dev and run cmake step for OpenCascade. You probably need to rebuild OpenCascade again, not sure

nikhil-convrseai commented 9 months ago

hi @HuguesDelorme thanks for the continuous support it is working at my end as well, let me know when you merge develop branch into main

HuguesDelorme commented 9 months ago

Good to know it works for you! develop branch is merged into master only on new release. It will happen next time when releasing 0.9.0 version or (0.8.1 if any)