View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030998 | Community | OCCT:Data Exchange | public | 2019-09-25 15:41 | 2020-12-01 17:38 |
Reporter | Vico Liang | Assigned To | |||
Priority | normal | Severity | block | ||
Status | acknowledged | Resolution | suspended | ||
Product Version | 7.4.0 | ||||
Target Version | Unscheduled | ||||
Summary | 0030998: STEPCAFControl_Writer will not export shape with Identity Location if there are other partner shapes with diff Location. | ||||
Description | const Handle(ADVOCCT_OCAFApplication)& aApplication = getGlobalApplication(); Handle(TDocStd_Document) aXCAFDocument; aApplication->NewDocument("BinXCAF", aXCAFDocument); XCAFDoc_DocumentTool::Set(aXCAFDocument->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aXCAFDocument->Main()); Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(aXCAFDocument->Main()); for(auto aIter= theGlobalObjectList; aIter->More(); aIter->Next()) { TDF_Label aNewShape = aShapeTool->AddShape(aIter->Shape(), Standard_False, Standard_False); Quantity_Color aColor(Quantity_NameOfColor(aIter->ColorLive())); aColorTool->SetColor(aNewShape, aColor, XCAFDoc_ColorGen); TDataStd_Name::Set(aNewShape, aIter->Name()); } // Write out STEPCAFControl_Writer aXCAFWriter; aXCAFWriter.SetNameMode(Standard_True); aXCAFWriter.SetColorMode(Standard_True); aXCAFWriter.Transfer(aXCAFDocument); aXCAFWriter.Write(theFilePath); aApplication->Close(aXCAFDocument); The uploaded files contain input file: "export missing origin object.brep" and output file: "export missing origin object.step" NOTE: IGESCAFControl_Writer has the same issue. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
export missing origin object.brep (15,284 bytes) |
|
export missing origin object.step (7,826 bytes) |
|
before export in brep.jpg (404,490 bytes) |
|
after export in step.jpg (558,869 bytes) |
|
For processing. |
|
In order to reproduce mentioned problem I have prepared Draw command with following code: Handle(TDocStd_Document) aXCAFDocument = new TDocStd_Document("dummy"); XCAFDoc_DocumentTool::Set(aXCAFDocument->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aXCAFDocument->Main()); TopoDS_Shape aSh; BRep_Builder aB; BRepTools::Read(aSh, "export missing origin object.brep", aB); TDF_Label aNewShape = aShapeTool->AddShape(aSh, Standard_False, Standard_False); TDataStd_Name::Set(aNewShape, "TestSh"); STEPCAFControl_Writer aXCAFWriter; aXCAFWriter.SetNameMode(Standard_True); aXCAFWriter.Transfer(aXCAFDocument); aXCAFWriter.Write("testres.stp"); After import a written STEP file ("testres.stp") we receive a good result (see attached image testres.png). |
2020-10-29 08:51 developer |
testres.png (20,672 bytes) |
|
We can not reproduce this bug. Please see our last comment and describe how we can reproduce mentioned problem. |
|
Dear skl, To reproduce the issue, you have to add sub-shapes using iterator. There are two shapes in the top one. get two shapes: aSh1,aSha2 TDF_Label aNewShape = aShapeTool->AddShape(aSh1, Standard_False, Standard_False); TDF_Label aNewShape = aShapeTool->AddShape(aSh2, Standard_False, Standard_False); |
2020-11-03 14:55 developer |
bug30998.brep (15,284 bytes) |
|
Dear bugmaster, please add attached file bug30998.brep to repository. |
|
Branch CR30998 has been created by skl. SHA-1: f3b842cc4deea9beeeed38a028208efca8645a6d Detailed log of new commits: Author: skl Date: Tue Nov 3 15:18:44 2020 +0300 0030998: STEPCAFControl_Writer will not export shape with Identity Location if there are other partner shapes with diff Location. Fix + 2 Draw tests. |
|
is it possible to add this patch to version 7.5? |
|
Branch CR30998 has been updated forcibly by skl. SHA-1: 53cc0fa3fbec9a309ba2e2b8062df4664130715c |
|
Branch CR30998 has been updated forcibly by skl. SHA-1: 6777872d829cda997906c702c185c3cf461338a6 |
|
Branch CR30998 has been updated forcibly by skl. SHA-1: e8774137e467df1eaa5628a9b15a676a3aca1b86 |
|
Branch CR30998 has been updated forcibly by skl. SHA-1: 2dc0f60638595233a3533c5b2b1ea27d2cc08529 |
|
Branch CR30998_2 has been created by skl. SHA-1: 5dbc1e9d3908417098af358dc3a3c1135e56f275 Detailed log of new commits: Author: skl Date: Sat Nov 7 16:42:27 2020 +0300 0030998: STEPCAFControl_Writer will not export shape with Identity Location if there are other partner shapes with diff Location. Fix + 2 tests. |
|
Branch CR30998_2 has been updated forcibly by skl. SHA-1: ebc6291664a0b07751b354e424d6f6800e066093 |
|
Branch CR30998_2 has been updated forcibly by skl. SHA-1: 0aa42bb3efb6fe8c29a7f068b589ec468f6c2b18 |
|
Dear Vico Liang, At present mentioned problem cannot be correctly solved within the existing structure of XCAF document. The satisfactory solution needs a change in conceptual approaches and cannot be implemented at this moment. As workaround we can to suggest you to add whole compound to XCAF document or, if you needs to use iterator, check each shape before adding to the XCAF document and set location with default gp_Trsf if current shape hasn`t location. We will not close this bug - we will simply postpone it until such fundamental changes becomes possible. |
|
Dear skl, Thanks for your suggesion. We did as the workaround with default gp_Trsf. Thanks for your hard working on this. |
|
Branch CR30998_2 has been updated forcibly by skl. SHA-1: e6055b109a875e8332995c64365b83209c262af2 |
|
Branch CR30998_2 has been updated forcibly by skl. SHA-1: 3c76a1a31811a3430d1b061f6c9aa3df2f04e352 |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-09-25 15:41 | Vico Liang | New Issue | |
2019-09-25 15:41 | Vico Liang | Assigned To | => gka |
2019-09-25 15:42 | Vico Liang | File Added: export missing origin object.brep | |
2019-09-25 15:42 | Vico Liang | File Added: export missing origin object.step | |
2019-09-25 15:46 | Vico Liang | File Added: before export in brep.jpg | |
2019-09-25 15:46 | Vico Liang | File Added: after export in step.jpg | |
2019-09-25 15:48 | Vico Liang | Description Updated | |
2019-09-25 15:52 | Vico Liang | Description Updated | |
2019-09-25 15:52 | Vico Liang | Product Version | => 7.4.0 |
2019-09-25 15:52 | Vico Liang | Target Version | 7.5.0 => 7.4.0 |
2019-09-25 15:52 | Vico Liang | Description Updated | |
2019-09-25 22:08 |
|
Target Version | 7.4.0 => 7.5.0 |
2020-09-11 17:48 |
|
Target Version | 7.5.0 => 7.6.0 |
2020-10-22 17:32 |
|
Note Added: 0096145 | |
2020-10-22 17:32 |
|
Assigned To | gka => skl |
2020-10-22 17:32 |
|
Status | new => assigned |
2020-10-29 08:50 |
|
Note Added: 0096354 | |
2020-10-29 08:51 |
|
File Added: testres.png | |
2020-10-29 08:53 |
|
Assigned To | skl => Vico Liang |
2020-10-29 08:56 |
|
Note Added: 0096355 | |
2020-10-29 08:56 |
|
Status | assigned => feedback |
2020-10-30 17:41 | Vico Liang | Note Added: 0096411 | |
2020-10-30 17:41 | Vico Liang | Assigned To | Vico Liang => skl |
2020-11-02 13:57 | Vico Liang | Note Edited: 0096411 | |
2020-11-03 14:55 |
|
File Added: bug30998.brep | |
2020-11-03 14:56 |
|
Status | feedback => assigned |
2020-11-03 14:57 |
|
Note Added: 0096497 | |
2020-11-03 15:19 | git | Note Added: 0096500 | |
2020-11-03 19:23 | Vico Liang | Note Added: 0096523 | |
2020-11-05 13:05 | git | Note Added: 0096536 | |
2020-11-05 18:29 | git | Note Added: 0096570 | |
2020-11-06 10:34 | git | Note Added: 0096574 | |
2020-11-06 13:28 | git | Note Added: 0096586 | |
2020-11-07 16:42 | git | Note Added: 0096603 | |
2020-11-08 08:36 | git | Note Added: 0096604 | |
2020-11-08 14:22 | git | Note Added: 0096605 | |
2020-11-09 15:24 |
|
Note Added: 0096624 | |
2020-11-09 15:24 |
|
Status | assigned => feedback |
2020-11-10 07:28 |
|
Assigned To | skl => Vico Liang |
2020-11-11 11:10 | Vico Liang | Note Added: 0096653 | |
2020-11-11 11:10 | Vico Liang | Assigned To | Vico Liang => skl |
2020-11-11 11:21 |
|
Assigned To | skl => szy |
2020-11-16 06:53 | git | Note Added: 0096781 | |
2020-11-16 10:52 | kgv | Description Updated | |
2020-11-24 09:36 | git | Note Added: 0097020 | |
2020-11-24 17:06 |
|
Assigned To | szy => gka |
2020-11-24 17:06 |
|
Status | feedback => acknowledged |
2020-11-24 17:06 |
|
Resolution | open => suspended |
2020-12-01 17:38 |
|
Target Version | 7.6.0 => Unscheduled |