aNewParamsVec (aNodesCount) = aEAttr.FirstParam;
++aNodesCount;
+ Standard_Integer aPrevNodeId = ivf;
Standard_Integer aLastPointId = myAttribute->LastPointId();
for (Standard_Integer i = 2; i < aNodesNb; ++i)
{
if (!aEdgeTool->Value(i, aParam, aPnt, aUV))
continue;
- myBoundaryPoints->Bind(++aLastPointId, aPnt);
-
+ // Imitate index of 3d point in order to not to add points to map without necessity.
Standard_Integer iv2, isv;
- myAttribute->AddNode(aLastPointId, aUV.Coord(), BRepMesh_Frontier, iv2, isv);
+ myAttribute->AddNode(aLastPointId + 1, aUV.Coord(), BRepMesh_Frontier, iv2, isv);
+ if (aPrevNodeId == iv2)
+ continue;
+
+ // Ok, now we can add point to the map.
+ myBoundaryPoints->Bind (++aLastPointId, aPnt);
aNewNodesInStructVec(aNodesCount) = aLastPointId;
aNewNodesVec (aNodesCount) = isv;
aNewParamsVec (aNodesCount) = aParam;
+
++aNodesCount;
+ aPrevNodeId = iv2;
}
aNewNodesInStructVec(aNodesCount) = ipl;
--- /dev/null
+puts "========="
+puts "OCC27239"
+puts "========="
+puts ""
+#################################
+# Meshing algorithm creates wrong triangulation
+#################################
+pload ALL
+restore [locate_data_file bug27239_f1.brep] result
+
+set bug_info [incmesh result 0.1]
+if {[regexp "NoError" $bug_info] != 1} {
+ puts "Error: failure during triangulation"
+}
+
+set log [tricheck result]
+if { [llength $log] != 0 } {
+ puts "Error : Some faces has failed to mesh"
+}
+
+checkshape result
+
+explode result e
+set edge_dump [dump result_4]
+if {[regexp "5 5" $edge_dump] != 0} {
+ puts "Error: there are duplicating nodes in polygon on triangulation"
+}
+
+checkview -display result -3d -path ${imagedir}/${test_image}.png