MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031234Community[OCCT] OCCT:Shape Healingpublic2019-12-12 07:322019-12-17 11:46
ReporterKAT1003 
Assigned Togka 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformWindowsOSWindows 10 ProOS Version32 bit
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0031234: Shape Healing - Shell orientation is not fixed by ShapeFix_Shell class.
DescriptionShell orientation is not fixed by ShapeFix_Shell class.
Steps To ReproduceI checked by below code.

TopExp_Explorer expFace;
BRepBuilderAPI_MakeWire makeCheckWire;
TopoDS_Edge edgeArc1 = BRepBuilderAPI_MakeEdge(
                        GC_MakeArcOfCircle( gp_Circ( gp_Ax2(gp_Pnt(0.0,0.0,0.0), gp_Dir(1.0,0.0,0.0)), 5.0 ),
                                            gp_Pnt( 0.0, -5.0, 0.0 ),
                                            gp_Pnt( 0.0, 5.0, 0.0 ),
                                            Standard_False ).Value() );
makeCheckWire.Add( edgeArc1 );
makeCheckWire.Add( BRepBuilderAPI_MakeEdge( gp_Pnt( 0.0, -5.0, 0.0 ), gp_Pnt( 0.0, 5.0, 0.0 ) ) );
BRepBuilderAPI_MakeFace makerFace1( makeCheckWire.Wire() );
TopoDS_Face face1 = makerFace1.Face();
TopoDS_Shape shape1 = BRepPrimAPI_MakePrism( face1, gp_Vec( 20.0, 0.0, 0.0 ) ).Shape();
expFace.Init( shape1, TopAbs_FACE );
for( ; expFace.More(); expFace.Next() ){
    TopoDS_Face face = TopoDS::Face( expFace.Current() );
    BRepAdaptor_Surface adapetrSurface( face );
    if( adapetrSurface.GetType() == GeomAbs_Cylinder ){
        face1 = face;
        break;
    }
}

BRepBuilderAPI_MakeWire makeCheckWire2;
TopoDS_Edge edgeArc2 = BRepBuilderAPI_MakeEdge(
                        GC_MakeArcOfCircle( gp_Circ( gp_Ax2(gp_Pnt(0.0,0.0,0.0), gp_Dir(1.0,0.0,0.0)), 5.0 ),
                                            gp_Pnt( 0.0, 5.0, 0.0 ),
                                            gp_Pnt( 0.0, -5.0, 0.0 ),
                                            Standard_False ).Value() );

makeCheckWire2.Add( edgeArc2 );
makeCheckWire2.Add( BRepBuilderAPI_MakeEdge( gp_Pnt( 0.0, -5.0, 0.0 ), gp_Pnt( 0.0, 5.0, 0.0 ) ) );
BRepBuilderAPI_MakeFace makerFace2( makeCheckWire2.Wire() );
TopoDS_Face face2 = makerFace2.Face();
TopoDS_Shape shape2 = BRepPrimAPI_MakePrism( face2, gp_Vec( 20.0, 0.0, 0.0 ) ).Shape();
expFace.Init( shape2, TopAbs_FACE );
for( ; expFace.More(); expFace.Next() ){
    TopoDS_Face face = TopoDS::Face( expFace.Current() );
    BRepAdaptor_Surface adapetrSurface( face );
    if( adapetrSurface.GetType() == GeomAbs_Cylinder ){
        face2 = face;
        break;
    }
}
face2.Reverse(); // for test, reverse face.

BRepAlgoAPI_Fuse fuseShape( face1, face2 );
fuseShape.Build();
TopoDS_Shell shell;
BRep_Builder builder;
builder.MakeShell( shell );
TopExp_Explorer exFace( fuseShape.Shape(), TopAbs_FACE );
for( ; exFace.More(); exFace.Next() ){
    builder.Add( shell, exFace.Current() );
}

ShapeFix_Shell fixShell;
fixShell.FixFaceOrientation( shell, Standard_True, Standard_False );
ShapeUpgrade_UnifySameDomain unif( shell, Standard_True, Standard_True, Standard_False );
unif.Build();
TopoDS_Shape shape = unif.Shape(); // cylinder faces are divied.
TagsNo tags attached.
Test case number
Attached Filespng file icon cylinder_faces_are_not_connected.png (13,881 bytes) 2019-12-12 07:32

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-12-12 07:32 KAT1003 New Issue
2019-12-12 07:32 KAT1003 Assigned To => gka
2019-12-12 07:32 KAT1003 File Added: cylinder_faces_are_not_connected.png
2019-12-17 11:46 kgv Summary Shell orientation is not fixed by ShapeFix_Shell class. => Shape Healing - Shell orientation is not fixed by ShapeFix_Shell class.


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker