View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025656 | Open CASCADE | OCCT:Modeling Data | public | 2014-12-24 14:34 | 2015-05-14 15:31 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.8.0 | ||||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0025656: Specification of semantic of Closed flag of an edge | ||||
Description | There is no clear understanding of what Closed flag of an edge means. 1. Does it mean "the geometric representation of this edge is a closed curve"? 2. Does it mean "the geometric representation of this edge has its end points near to each other in some tolerance"? 3. Does it mean "the topological boundaries of this edge are presented by the same vertex"? Looking at the methods of the class BRep_Builder, I encountered inconsistency in this regard. The method UpdateEdge(edge, curve3d) sets the flag Closed according to the flag IsClosed of the curve. It is the closeness of the 1st kind. The method UpdateEdge(edge, pcurve, surface) does not take care of the flag Closed at all. The method UpdateEdge(edge, pcurve1, pcurve2, surface) sets the flag Closed when both pcurves are closed. This will correspond to the case of closed seam edge, e.g. on a torus. It is the closeness also of the 1st kind. The method Range(edge, first, last) sets the flag Closed if there is a 3D curve for which first and last points are distanced not more than on the edge tolerance. It is the closeness of the 2nd kind. The method Range(edge, surface, first, last) sets the flag Closed if there is a 2D curve on the given surface for which first and last points in 3D space are distanced not more than on the edge tolerance. It is the closeness of the 2nd kind. Note that this method provides Closed flag for the cases for which the method UpdateEdge(edge, pcurve, surface) does not. These inconsistencies lead to various indefinite behaviors of algorithms that deal with such edges. For example, there is a bug #20040, in which thrusections algorithm suffers due to absence of Closed flag on the edge, which is constructed on a closed 2D curve on surface. The goal of this investigation is to analyze all places in OCCT when the flag Closed of an edge is used, classify them in order to elaborate common consistent approach, and update the source code of OCCT according to this approach. | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
has duplicate | 0025345 | closed | Open CASCADE | Revise and document usage of flag Closed in TopoDS_Shape | |
related to | 0025741 | closed | bugmaster | Open CASCADE | Specification of semantic of Closed flag of a shape |
related to | 0026027 | closed | bugmaster | Open CASCADE | Visualization, AIS_TexturedShape - back face culling option should not be overridden by texturing aspect |
|
Note that depending on the result of analysis, the setting of the flag Closed by the methods of BRep_Builder UpdateEdge and Range may be deprecated. |
|
In the last assumption will be the case, this flag must be set by procedure that sets the same vertex as boundaries of the edge. |
|
The result of investigation is following: The Closed flag of TopoDS_Shape should be used to identify that a shape bounds a volume or an area. According this concept, this flag should affect on shells and wires only, because a closed shell determines a volume in 3D space, and a closed wire determines an area on a face. As far as, edges are used as a part of wire, no need to worry about Closed flag on edges. As a result, the closedness of an edge should be determined by coincidence of its vertices. It should not use any geometric representations. The verification of the closedness will be moved to BRep_Tool::IsClosed(const TopoDS_Shape&) method. |
|
Artem, please make necessary modifications. |
|
I suggest we agree that flag Closed should not be used for faces, edges, solids, and compounds. This will allow to exclude processing of these types of shapes in BRep_Tool::IsClosed(), thus saving some processing time. |
|
Branch CR25656 has been created by azv. SHA-1: 747b32a7998052531e1c7a8923452adf59c5357a Detailed log of new commits: Author: azv Date: Tue Dec 30 07:37:51 2014 +0300 0025656: Specification of semantic of Closed flag of an edge 1. Using of the "Closed" flag was unified: a) this flag is applicable for TopoDS_Wire and TopoDS_Shell only, because these entities may hedge an area in 2D space or a volume in 3D space correspondingly; b) other types of TopoDS shapes are passing over this flag; c) changing of this flag should be controlled by high-level algorithms (not BRep_Builder). 2. Implemented verification of the closedness of edges. An edge is closed if and only if its first and last vertices are the same. 3. Test cases were changed according to new behavior. |
|
Dear Mikhail, Please review branch CR25656. |
|
Branch CR25656_1 has been created by azv. SHA-1: f65b5512b7013bda6975246bfa4e6869d8c61833 Detailed log of new commits: Author: azv Date: Tue Dec 30 07:37:51 2014 +0300 0025656: Specification of semantic of Closed flag of an edge 1. Using of the "Closed" flag was unified: a) this flag is applicable for TopoDS_Wire and TopoDS_Shell only, because these entities may hedge an area in 2D space or a volume in 3D space correspondingly; b) other types of TopoDS shapes are passing over this flag; c) changing of this flag should be controlled by high-level algorithms (not BRep_Builder). 2. Implemented verification of the closedness of edges. An edge is closed if and only if its first and last vertices are the same. 3. Test cases were changed according to new behavior. |
|
Dear Mikhail, I've taken into account all your remarks. The updated branch is CR25656_1. Please, review. |
|
Please avoid replacing simple checks by complex ones even if they are equivalent, like here: --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx @@ -582,8 +582,8 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs //check that edges merged valid way (for edges having length less than specified //tolerance // Check if edges are closed - Standard_Boolean isClosed1 = V11.IsSame(V12); - Standard_Boolean isClosed2 = V21.IsSame(V22); + Standard_Boolean isClosed1 = BRep_Tool::IsClosed(edge1); + Standard_Boolean isClosed2 = BRep_Tool::IsClosed(edge2); |
|
Branch CR25656_1 has been updated forcibly by azv. SHA-1: cf384692d3fd5d2a0f4cccf87e466c756341280b |
|
Dear Andrey, Mikhail, I have changed the code according to your remarks. Please, review once again. |
|
Remarks. 1) BRepSweep_NumLinearRegularSweep.cxx::Shape(const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) check the flag sepwires, if it is true than newWire is not used, WireSeq is used instead. 2) IGESToBRep_BRepEntity::TransferEdge The condition dist1f + dist2l + Precision::Confusion() <= dist1l + dist2f will lead to that we will reverse the edge even in equal case, but it is not what we want for this case. Instead, dist1f + dist2l - dist1l - dist2f < Precision::Confusion() must be used. |
|
Branch CR25656_1 has been updated forcibly by azv. SHA-1: 5ea829200db6c064ea8dcf08a0ee979ddb0de9cc |
|
Dear Mikhail, I have made changes according to your remarks. Please, review branch CR25656_1 once again. |
|
In line 327 of BRepSweep_NumLinearRegularSweep.cxx, the wire WireSeq.Value(ij) is used with uninitialized Closed flag. |
|
Branch CR25656_1 has been updated forcibly by azv. SHA-1: a98ca96cbc582cd02a9ff331b56358e374ef35b6 |
|
I've checked the code of BRepSweep_NumLinearRegularSweep::Shape(const TopoDS_Shape&, const Sweep_NumShape&) once again, and found that it is not necessary to assign the Closed flag for newWire and newShell, because these shapes are used for construction of myShapes(iGenS, iDirS), which Closed flag is assigned in the line 398. |
|
There are still cases when Closed flag for wire and shell can be left unset. |
|
Branch CR25656_1 has been updated forcibly by azv. SHA-1: 9d580cf717dd1e04909f5c895c17e45e827b8041 |
|
Dear, Mikhail, Please, review current state of file BRepSweep_NumLinearRegularSweep.cxx on branch CR25656_1. |
|
OK. |
|
Branch CR25656_1 has been updated forcibly by mkv. SHA-1: 6b18aebe71763e962989c84561ad952b2ce91496 |
|
Branch CR25656_1 will be tested with CR20040_1. |
|
Branch CR25656_1 has been deleted by inv. SHA-1: 6b18aebe71763e962989c84561ad952b2ce91496 |
|
Branch CR25656 has been deleted by inv. SHA-1: 747b32a7998052531e1c7a8923452adf59c5357a |
occt: master da72a17c 2014-12-30 04:37:51
Committer: bugmaster Details Diff |
0025656: Specification of semantic of Closed flag of an edge 1. Using of the "Closed" flag was unified: a) this flag is applicable for TopoDS_Wire and TopoDS_Shell only, because these entities may hedge an area in 2D space or a volume in 3D space correspondingly; b) other types of TopoDS shapes are passing over this flag; c) changing of this flag should be controlled by high-level algorithms (not BRep_Builder). 2. Implemented verification of the closedness of edges. An edge is closed if and only if its first and last vertices are the same. 3. Test cases were changed according to new behavior. |
Affected Issues 0025656 |
|
mod - src/BRep/BRep_Builder.cxx | Diff File | ||
mod - src/BRep/BRep_Tool.cdl | Diff File | ||
mod - src/BRep/BRep_Tool.cxx | Diff File | ||
mod - src/BRepAlgo/BRepAlgo_Loop.cxx | Diff File | ||
mod - src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx | Diff File | ||
mod - src/BRepFill/BRepFill.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_Evolved.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_Filling.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_Generator.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_NSections.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_OffsetWire.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_Pipe.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_Section.cxx | Diff File | ||
mod - src/BRepFill/BRepFill_ShapeLaw.cxx | Diff File | ||
mod - src/BRepLib/BRepLib.cxx | Diff File | ||
mod - src/BRepLib/BRepLib_MakeWire.cxx | Diff File | ||
mod - src/BRepLib/BRepLib_MakeWire_1.cxx | Diff File | ||
mod - src/BRepOffset/BRepOffset_Offset.cxx | Diff File | ||
mod - src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx | Diff File | ||
mod - src/BRepPrim/BRepPrim_Builder.cxx | Diff File | ||
mod - src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx | Diff File | ||
mod - src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx | Diff File | ||
mod - src/BRepProj/BRepProj_Projection.cxx | Diff File | ||
mod - src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx | Diff File | ||
mod - src/BRepSweep/BRepSweep_Rotation.cxx | Diff File | ||
mod - src/BRepTools/BRepTools_ReShape.cxx | Diff File | ||
mod - src/ChFi3d/ChFi3d_Builder_1.cxx | Diff File | ||
mod - src/IGESToBRep/IGESToBRep_BRepEntity.cxx | Diff File | ||
mod - src/LocOpe/LocOpe_SplitShape.cxx | Diff File | ||
mod - src/ShapeBuild/ShapeBuild_ReShape.cxx | Diff File | ||
mod - src/ShapeFix/ShapeFix_Edge.cxx | Diff File | ||
mod - src/ShapeFix/ShapeFix_Solid.cxx | Diff File | ||
mod - src/ShapeProcess/ShapeProcess_ShapeContext.cxx | Diff File | ||
mod - src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx | Diff File | ||
mod - src/TopoDS/TopoDS_TShape.cdl | Diff File | ||
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx | Diff File | ||
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx | Diff File | ||
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_2.cxx | Diff File | ||
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx | Diff File | ||
mod - src/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx | Diff File | ||
mod - tests/bugs/moddata_3/bug25202_1 | Diff File | ||
mod - tests/bugs/moddata_3/bug25202_3 | Diff File | ||
mod - tests/bugs/moddata_3/bug25202_4 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-24 14:34 |
|
New Issue | |
2014-12-24 14:34 |
|
Assigned To | => msv |
2014-12-24 14:37 |
|
Summary | Investigation of semantic of Closed flag of an edge => Specification of semantic of Closed flag of an edge |
2014-12-24 14:40 |
|
Summary | Specification of semantic of Closed flag of an edge => Investigation of semantic of Closed flag of an edge |
2014-12-24 14:40 |
|
Description Updated | |
2014-12-24 14:40 |
|
Assigned To | msv => azv |
2014-12-24 14:40 |
|
Status | new => assigned |
2014-12-24 14:41 |
|
Summary | Investigation of semantic of Closed flag of an edge => Specification of semantic of Closed flag of an edge |
2014-12-24 14:44 |
|
Note Added: 0035678 | |
2014-12-24 14:46 |
|
Note Added: 0035679 | |
2014-12-26 17:22 |
|
Note Added: 0035773 | |
2014-12-26 17:27 |
|
Note Added: 0035776 | |
2014-12-26 17:50 |
|
Note Added: 0035778 | |
2014-12-30 08:06 | git | Note Added: 0035856 | |
2014-12-30 08:08 |
|
Note Added: 0035857 | |
2014-12-30 08:08 |
|
Assigned To | azv => msv |
2014-12-30 08:08 |
|
Status | assigned => resolved |
2014-12-30 08:08 |
|
Steps to Reproduce Updated | |
2014-12-30 09:33 |
|
Relationship added | has duplicate 0025345 |
2014-12-30 13:25 |
|
Assigned To | msv => azv |
2014-12-30 13:25 |
|
Status | resolved => assigned |
2014-12-30 13:45 | git | Note Added: 0035883 | |
2014-12-30 13:47 |
|
Note Added: 0035884 | |
2014-12-30 13:47 |
|
Assigned To | azv => msv |
2014-12-30 13:47 |
|
Status | assigned => resolved |
2014-12-30 14:33 |
|
Note Added: 0035889 | |
2014-12-30 14:33 |
|
Assigned To | msv => azv |
2014-12-30 14:33 |
|
Status | resolved => assigned |
2014-12-30 14:51 | git | Note Added: 0035892 | |
2014-12-30 14:54 |
|
Note Added: 0035893 | |
2014-12-30 14:54 |
|
Assigned To | azv => msv |
2014-12-30 14:54 |
|
Status | assigned => resolved |
2014-12-30 17:43 |
|
Note Added: 0035908 | |
2014-12-30 17:43 |
|
Assigned To | msv => azv |
2014-12-30 17:43 |
|
Status | resolved => assigned |
2015-01-12 08:51 | git | Note Added: 0035942 | |
2015-01-12 08:53 |
|
Note Added: 0035943 | |
2015-01-12 08:53 |
|
Assigned To | azv => msv |
2015-01-12 08:53 |
|
Status | assigned => resolved |
2015-01-12 12:35 |
|
Note Added: 0035950 | |
2015-01-12 12:35 |
|
Assigned To | msv => azv |
2015-01-12 12:35 |
|
Status | resolved => assigned |
2015-01-12 13:44 | git | Note Added: 0035953 | |
2015-01-12 13:50 |
|
Note Added: 0035954 | |
2015-01-12 13:50 |
|
Assigned To | azv => msv |
2015-01-12 13:50 |
|
Status | assigned => resolved |
2015-01-12 16:10 |
|
Note Added: 0035961 | |
2015-01-12 16:10 |
|
Assigned To | msv => azv |
2015-01-12 16:10 |
|
Status | resolved => assigned |
2015-01-12 16:25 | git | Note Added: 0035966 | |
2015-01-12 16:26 |
|
Note Added: 0035967 | |
2015-01-12 16:26 |
|
Assigned To | azv => msv |
2015-01-12 16:26 |
|
Status | assigned => resolved |
2015-01-12 16:45 |
|
Note Added: 0035969 | |
2015-01-12 16:45 |
|
Assigned To | msv => bugmaster |
2015-01-12 16:45 |
|
Status | resolved => reviewed |
2015-01-16 15:33 | git | Note Added: 0036148 | |
2015-01-16 15:48 |
|
Assigned To | bugmaster => mkv |
2015-01-21 12:00 | apn | Note Added: 0036303 | |
2015-01-21 20:20 | apn | Test case number | => Not needed |
2015-01-21 20:20 | apn | Assigned To | mkv => apn |
2015-01-22 16:34 | apn | Assigned To | apn => bugmaster |
2015-01-22 16:34 | apn | Status | reviewed => tested |
2015-01-22 17:03 |
|
Relationship added | related to 0025741 |
2015-01-23 16:19 | bugmaster | Changeset attached | => occt master da72a17c |
2015-01-23 16:19 | bugmaster | Status | tested => verified |
2015-01-23 16:19 | bugmaster | Resolution | open => fixed |
2015-01-26 12:31 | git | Note Added: 0036517 | |
2015-01-26 12:32 | git | Note Added: 0036533 | |
2015-04-07 12:31 | kgv | Relationship added | related to 0026027 |
2015-05-14 15:28 |
|
Status | verified => closed |
2015-05-14 15:31 |
|
Fixed in Version | => 6.9.0 |