View Issue Details

IDProjectCategoryView StatusLast Update
0026410CommunityOCCT:Shape Healingpublic2021-11-01 18:13
ReporterVico Liang Assigned Togka  
PrioritynormalSeveritymajor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2013 
Product Version6.9.0 
Target Version7.7.0 
Summary0026410: ShapeUpgrade_UnifySameDomain::Generated method returns mismatched shape.
DescriptionTopoDS_Shape ShapeUpgrade_UnifySameDomain::Generated (const TopoDS_Shape& aShape) const method has two issues:

1. The generated shape type is mismatched with the input shape type aShape.
 E.g. aShape with type FACE will generate a shape with type SHELL.

2. The generated shape type is matched but the shape doen't exist in final shape.
 E.g. aShape with type Wire will generate a Wire shape but the wire shape can't be found in result shape.

Code snipped as below:

    TopoDS_Shape a2RectangleFuse = // load from uploaded brep file.
    ShapeUpgrade_UnifySameDomain aUSD(a2RectangleFuse);
    aUSD.Build();
    TopoDS_Shape aShapeMerged = aUSD.Shape();

    TopTools_IndexedMapOfShape aShapeMap;
    TopExp::MapShapes(aShapeMerged, aShapeMap);

    TopTools_IndexedMapOfShape aOriginalMap;
    TopExp::MapShapes(a2RectangleFuse, aOriginalMap);

    for (Standard_Integer aIndex = 1; aIndex <= aOriginalMap.Extent(); ++aIndex)
    {
        TopoDS_Shape aShape0 = aOriginalMap.FindKey(aIndex);
        TopoDS_Shape aShape1 = aUSD.Generated(aShape0);
        if (aShape1.IsNull())
            continue;
        if (aShape0.ShapeType() != aShape1.ShapeType())
        {
            std::cout << "ShapeType is diff.";
        }
        if (!aShapeMap.Contains(aShape1))
        {
            std::cout << "Shape is out of scope.";
            TopTools_IndexedMapOfShape aSubShapes;
            TopExp::MapShapes(aShape1, aShape0.ShapeType(), aSubShapes);
            aShape1 = aSubShapes.FindKey(1);
            if (!aShapeMap.Contains(aShape1))
            {
                std::cout << "Sub Shape is out of scope.";
            }
        }
    }
TagsNo tags attached.
Test case number

Attached Files

  • 2RectangleFuse.brep (4,574 bytes)

Activities

Vico Liang

2015-07-09 09:56

developer  

2RectangleFuse.brep (4,574 bytes)

Vico Liang

2015-07-09 15:40

developer   ~0042870

ShapeUpgrade_UnifySameDomain::Generated should return the compatible shape otherwise it's impossible to track the modification history for topology naming in parametric modeling.

Vico Liang

2015-07-12 05:49

developer   ~0042944

Another issue is that all the faces are modified after unifing even if the faces are not merged at all. This causes no necessary memory data copy. Why not share the faces which not need to be touched?

Vico Liang

2015-07-12 05:51

developer   ~0042945

Upgrade the severity to Major.

Issue History

Date Modified Username Field Change
2015-07-09 09:55 Vico Liang New Issue
2015-07-09 09:55 Vico Liang Assigned To => gka
2015-07-09 09:56 Vico Liang File Added: 2RectangleFuse.brep
2015-07-09 15:40 Vico Liang Note Added: 0042870
2015-07-12 05:49 Vico Liang Note Added: 0042944
2015-07-12 05:51 Vico Liang Note Added: 0042945
2015-07-12 05:51 Vico Liang Severity minor => major
2015-12-18 11:50 abv Target Version 7.0.0 => 7.1.0
2016-10-26 11:57 gka Target Version 7.1.0 => 7.2.0
2017-07-27 09:33 abv Target Version 7.2.0 => 7.4.0
2019-09-04 12:58 abv Target Version 7.4.0 => 7.5.0
2020-09-11 16:48 utverdov Target Version 7.5.0 => 7.6.0
2021-11-01 18:13 szy Target Version 7.6.0 => 7.7.0