View Issue Details

IDProjectCategoryView StatusLast Update
0028728Open CASCADEOCCT:Modeling Algorithmspublic2022-10-24 10:42
Reporterisn Assigned Toisn  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version7.1.0 
Target Version7.8.0 
Summary0028728: unifysamedomain creates unnecessary copies of the vertices
DescriptionShapeUpgrade_UnifySameDomain class, MergeSubSeq() function:

    if (isSafeInputMode) {
      for (int k = 0; k < 2; k++) {
        if (!theContext->IsRecorded(V[k])) {
          TopoDS_Vertex Vcopy = TopoDS::Vertex(V[k].EmptyCopied());
          theContext->Replace(V[k], Vcopy);
          V[k] = Vcopy;
        }
        else
          V[k] = TopoDS::Vertex(theContext->Apply(V[k]));
      }
    }
    Handle(Geom_Line) L = new Geom_Line(gp_Ax1(PV1,Vec));
    Standard_Real dist = PV1.Distance(PV2);
    Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(L,0.0,dist);
    TopoDS_Edge E;
    B.MakeEdge (E, tc ,Precision::Confusion());
    B.Add (E,V[0]); B.Add (E,V[1]);
    B.UpdateVertex(V[0], 0., E, 0.);
    B.UpdateVertex(V[1], dist, E, 0.);

If isSafeInputMode is true => empty-copies of vertices will be created to prevent modifying of the original shapes. However, UpdateVertex(..) will never modify the vertex properties in this context (0-tolerance + V[0]/V[1] can be only FORWARD/REVERSED).
I guess some of the code (related to the copying/replacing of original vertices) should be dropped. Plus, UpdateVertex(..) should be changed (now it will throw an exception anyway even if a locked vertex is not going to be modified).
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-05-11 12:15 isn New Issue
2017-05-11 12:15 isn Assigned To => msv
2017-05-11 12:15 isn Assigned To msv => isn
2017-05-11 12:16 isn Description Updated
2017-05-11 12:24 msv Status new => assigned
2017-05-11 12:24 msv Product Version => 7.1.0
2017-07-24 09:22 msv Target Version 7.2.0 => 7.3.0
2017-12-05 17:09 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:44 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:55 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:52 msv Target Version 7.6.0 => 7.7.0
2022-10-24 10:42 szy Target Version 7.7.0 => 7.8.0