View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029264 | Open CASCADE | OCCT:Modeling Data | public | 2017-10-26 17:25 | 2023-08-01 15:06 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 7.2.0 | ||||
Target Version | Unscheduled | ||||
Summary | 0029264: BRep_Builder affects orientation of sub-shape, why? | ||||
Description | Imagine you add REVERSED wire to REVERSED face via BRep_Builder. Which orientation of wire do you expect as a result? Personally, I think that the orientation should be REVERSED as it could be set intentionally and there is no explicit reason for BRep_Builder to modify the user's intent. However, the orientation will be FORWARD (reproducer C++ code is provided). This issue complicates working with OCCT topological structures at low level, i.e. when full control over the topological structures and their orientations is needed. The problem is complicated by the fact that you're obligated to use BRep_Builder, because you cannot affect sub-shapes collection directly (it is a private field of TShape). Or, if BRep_Builder is a "high-level" tool to decide on orientation, then what is the alternative low-level tool? Do we have any? In the scope of this issue, I propose at least to introduce some flag in BRep_Builder in order to make it stay away from the user's data and not touch orientation. | ||||
Steps To Reproduce | BRep_Builder BB; // Construct any face TopoDS_Face face; BB.MakeFace(face); face.Orientation(TopAbs_REVERSED); // Construct any wire TopoDS_Wire wire; BB.MakeWire(wire); wire.Orientation(TopAbs_REVERSED); // Add wire to face BB.Add(face, wire); // Problem: wire loses its REVERSED orientation for ( TopoDS_Iterator it(face, false, false); it.More(); it.Next() ) { // We don't care of internal/external here std::cout << "Orientation of sub-shape is " << (it.Value().Orientation() == TopAbs_FORWARD ? "forward" : "reversed"); } | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
To be more specific, I am speaking about lines 101-103 in TopoDS_Builder.cxx: // compute the relative Orientation if (aShape.Orientation() == TopAbs_REVERSED) S.Reverse(); |
|
I think the problem here is that TopoDS_Builder::Add() method does not have a flag "CumOri" like TopoDS_Iterator has. We can introduce such flag in this method. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-26 17:25 |
|
New Issue | |
2017-10-26 17:25 |
|
Assigned To | => msv |
2017-10-26 17:27 |
|
Note Added: 0071808 | |
2017-10-26 18:00 |
|
Category | OCCT:Modeling Algorithms => OCCT:Modeling Data |
2017-10-26 18:00 |
|
Product Version | => 7.2.0 |
2017-10-26 18:02 |
|
Note Added: 0071809 | |
2019-08-12 16:43 |
|
Target Version | 7.4.0 => 7.5.0 |
2020-09-14 22:55 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-08-29 18:52 |
|
Target Version | 7.6.0 => 7.7.0 |
2022-10-24 10:43 |
|
Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:06 | dpasukhi | Target Version | 7.8.0 => Unscheduled |