I get incorrect shape in the process of importing step file

Hello Everyone: When I read the step file, What I got just like picture 1; What CAD Assistant got just like picture 2;

there are two differences between the shapes I get and those obtained by the CAD Assistant: 1. There's an extra piece in the shape. Just like picture 3; 2. A solid reads and becomes half a sphere. Just like picture 4;

I have attached the step file, just like "rock.step_.txt", and due to file restrictions, I have replaced its suffix with ".txt ".

To read the name of manifold shapes, So I read the corresponding shapes in this way. The code for reading the shapes is as follows:

        typedef StepShape_ManifoldSolidBrep type1;
        typedef StepShape_ShellBasedSurfaceModel type2;
        typedef StepGeom_Curve type3;

        Handle(XSControl_WorkSession) WS = aStepReader.ChangeReader().WS();
        const Handle(Interface_InterfaceModel)& Model = WS->Model();
        const Handle(XSControl_TransferReader)& TR = WS->TransferReader();
        const Handle(Transfer_TransientProcess)& TP = TR->TransientProcess();
        if (myAssembly.IsNull()) return Standard_False;

        Standard_Integer nb = Model->NbEntities();

        for (Standard_Integer i = 1; i <= nb; i++) {
                Handle(Standard_Transient) enti = Model->Value(i);
                QString typeNameFile = Model->TypeName(enti);
                if (!enti->IsKind(STANDARD_TYPE(type1))
                    && !enti->IsKind(STANDARD_TYPE(type2))
                    && !enti->IsKind(STANDARD_TYPE(type3))
                    ) continue;

                TopAbs_ShapeEnum typei = TopAbs_SHAPE;
                TDF_Label labeli;
                QString namei = "";
                TopoDS_Shape shapei;

                bool hasRead = false;
                Handle(type1) enty1 = Handle(type1)::DownCast(enti);

                Handle(Transfer_Binder) binder = TP->Find(enti);
                if (binder.IsNull() || !binder->HasResult()) continue;

                ///////////////////////////////get shape//////////////////////////
            /////////////////////this shape has problem/////////////////////
                shapei = TransferBRep::ShapeResult(TP, binder);
                if (shapei.IsNull()) continue;
        }


Thank you very much for your advice. I really need help. Thank you very much.

Best wishes.

Dmitrii Pasukhin's picture

Hello. Please share your OCCT version. CAD Assistent based on 7.6.3 and have some differences with latest version.

In case of special bugs -please report them in GitHub: Issues · Open-Cascade-SAS/OCCT (in case if you can reproduce it on latest master)

Best regards, Dmitrii.

Zeping Li's picture

Dear Dmitrii, Thank you for reply, my CAD Assistent is based on 7.7.0.
In my opinion, the result of CAD Assistent is right (pic2). The error happened in my code(result in pic 1), but I don't know how it happened.
I've really been troubled by this question for a long time, and I really want to know how to solve him

Best wishes.

Dmitrii Pasukhin's picture

Additionally, CAD Assistent has problem with meshing related to the size of the model (volume less then mm).

I didn't understand your issue or problem. Some elements are missed? Or moved? can you read using a native transfer process?

 

Zeping Li's picture

In other words my problem is: I want to get the result just like what CAD Assistant got. but I don't know how to modify my code.
Best wishes.