MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026410Community[OCCT] OCCT:Shape Healingpublic2015-07-09 09:552017-07-27 09:33
ReporterVico Liang 
Assigned Togka 
PrioritynormalSeveritymajor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
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? file icon 2RectangleFuse.brep (4,574 bytes) 2015-07-09 09:56

- Relationships

-  Notes
(0042870)
Vico Liang (developer)
2015-07-09 15:40

ShapeUpgrade_UnifySameDomain::Generated should return the compatible shape otherwise it's impossible to track the modification history for topology naming in parametric modeling.
(0042944)
Vico Liang (developer)
2015-07-12 05:49

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?
(0042945)
Vico Liang (developer)
2015-07-12 05:51

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*


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker