View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033133 | Community | OCCT:Modeling Algorithms | public | 2022-09-06 08:56 | 2023-08-01 15:08 |
Reporter | Oliver R | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Product Version | 7.6.3 | ||||
Target Version | Unscheduled | ||||
Summary | 0033133: BRepPrimAPI_MakeTorus does not return a torus | ||||
Description | when a1 is not 0 and a2 is not 2 Pi and angle is not 2 Pi things go south: BRepPrimAPI_MakeTorus(axis, r1, r2, a1, a2, angle) Other combination of values may also be problematic. See discussion in forum. | ||||
Steps To Reproduce | #include <iostream> #include <gp_Ax2.hxx> #include <TopoDS_Shape.hxx> #include <BRepPrimAPI_MakeTorus.hxx> #include <StlAPI_Writer.hxx> #include <BRepMesh_IncrementalMesh.hxx> void Generate_Shape(TopoDS_Shape * store) { gp_Ax2 axis = gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)); Standard_Real r1 = 1.0; Standard_Real r2 = 0.1; Standard_Real a1 = -1.5708; Standard_Real a2 = 1.5708; Standard_Real angle = 2.094; TopoDS_Shape shape = BRepPrimAPI_MakeTorus(axis, r1, r2, a1, a2, angle).Shape(); *store = shape; } void Write_STL(TopoDS_Shape * store) { StlAPI_Writer stl_writer; BRepMesh_IncrementalMesh Mesh( *store, 0.01 ); Mesh.Perform(); if (stl_writer.Write(*store, "demo1.stl")) { std::cout << std::endl << "True "; } else { std::cout << std::endl << "False "; } } int main() { TopoDS_Shape *store = new TopoDS_Shape(); Generate_Shape(store); Write_STL(store); return 0; } g++ -I ~/builds/build/include/opencascade -L ~/builds/build/lin64/gcc/lib demo_simple_13.cpp -lTKBin -lTKBinL -lTKBinTObj -lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKDCAF -lTKDraw -lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKLCAF -lTKMath -lTKMesh -lTKMeshVS -lTKOffset -lTKOpenGl -lTKPrim -lTKQADraw -lTKRWMesh -lTKService -lTKShHealing -lTKStd -lTKStdL -lTKSTEP209 -lTKSTEP -lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKTObj -lTKTObjDRAW -lTKTopAlgo -lTKTopTest -lTKV3d -lTKVCAF -lTKViewerTest -lTKVRML -lTKXCAF -lTKXDEDRAW -lTKXDEIGES -lTKXDESTEP -lTKXMesh -lTKXml -lTKXmlL -lTKXmlTObj -lTKXmlXCAF -lTKXSBase -lTKXSDRA | ||||
Additional information and documentation updates | Discussed here: https://dev.opencascade.org/content/brepprimapimaketorus-does-not-return-torus | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-09-06 08:56 | Oliver R | New Issue | |
2022-09-06 08:56 | Oliver R | Assigned To | => msv |
2022-09-06 08:56 | Oliver R | File Added: WrongTorus.jpeg | |
2022-09-06 09:05 | Oliver R | Note Added: 0110698 | |
2022-09-06 10:00 | kgv | Target Version | => 7.7.0 |
2022-09-06 10:00 | kgv | Steps to Reproduce Updated | |
2022-09-06 10:00 | kgv | Steps to Reproduce Updated | |
2022-09-06 10:01 | kgv | Steps to Reproduce Updated | |
2022-09-06 11:30 |
|
Relationship added | has duplicate 0033134 |
2022-10-24 10:40 |
|
Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:08 | dpasukhi | Target Version | 7.8.0 => Unscheduled |