View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033398 | Community | OCCT:Modeling Algorithms | public | 2023-05-25 11:48 | 2023-05-25 20:15 |
Reporter | Lyndon Alcock | Assigned To | akaftasev | ||
Priority | normal | Severity | crash | ||
Status | new | Resolution | open | ||
Platform | Windows | OS | VC++ 2022 | ||
Product Version | 7.7.1 | ||||
Summary | 0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model | ||||
Description | I have code that appears to throw error ```Unhandled exception at 0x00007FFAA0BFE468 (TKG2d.dll) in quad-remeshing-algorithm.exe: 0xC0000005: Access violation reading location 0x0000000000000000.``` along with this there should be a method on ShapeUpgrade_UnifySameDomain to check whether an operation is completed successfully. | ||||
Steps To Reproduce | Step file in upload files, this is my code:#include <iostream> #include <fstream> #include <ShapeUpgrade_UnifySameDomain.hxx> #include <STEPControl_Reader.hxx> #include <STEPControl_Writer.hxx> #include <TopoDS.hxx> int main() { const char* inputPath = "ball-valve.step"; const char* outputPath = "output.step"; // Initialize the STEP reader STEPControl_Reader reader; if (reader.ReadFile(inputPath) != IFSelect_RetDone) { std::cout << "Error: cannot read file." << std::endl; return 1; } // Check the load status reader.PrintCheckLoad(true, IFSelect_ItemsByEntity); if (reader.TransferRoots() != reader.NbRootsForTransfer()) { std::cout << "Error: roots transferred unsuccessfully." << std::endl; return 1; } // Get the shape from the reader TopoDS_Shape shape = reader.Shape(); // Perform "unify domains" algorithm ShapeUpgrade_UnifySameDomain unifyDomains(shape); unifyDomains.Build(); TopoDS_Shape unifiedShape = unifyDomains.Shape(); // Write the unified shape to STEP file STEPControl_Writer writer; writer.Transfer(unifiedShape, STEPControl_AsIs); if (!writer.Write(outputPath)) { std::cout << "Error: failed to write output file." << std::endl; return 1; } return 0; } | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2023-05-25 11:48 | Lyndon Alcock | New Issue | |
2023-05-25 11:48 | Lyndon Alcock | Assigned To | => akaftasev |
2023-05-25 11:48 | Lyndon Alcock | Note Added: 0113586 | |
2023-05-25 11:48 | Lyndon Alcock | File Added: ball-valve.step | |
2023-05-25 19:14 | dpasukhi | Category | PRODUCTS:Mesh Tools => OCCT:Modeling Algorithms |
2023-05-25 19:14 | dpasukhi | Summary | ShapeUpgrade_UnifySameDomain throws exception on specific STEP model => Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model |
2023-05-25 20:15 | dpasukhi | Steps to Reproduce Updated |