DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0033899

Overlap found/not found depending on translation value

CommunityOCCT:Modeling Algorithmsnew0 public notes

Search issues

Description

From 2 TopoDS_Shape, I perform a BRepAlgoAPI_Common operation and the result shape is empty.
I set an identical translation in Y for the 2 shapes, I do it again and now I have a common shape. I should not.

Steps to reproduce

BRepAlgoAPI_Common lBuilder ;
        lBuilder.SetRunParallel(false) ;
        TopTools_ListOfShape lArgs ;
        TopTools_ListOfShape lTools ;
        TopoDS_Shape arg, tool ;
        BRep_Builder builder ;
        
        gp_Trsf translationArg ;

                // Y = 0 or 100, no overlap, Y = 200, overlap
        translationArg.SetTranslation(gp_Vec(70.0, 200.0, 0.0)) ;

        BRepTools::Read(arg, "C:\\Attachment 1 (BREP)", builder) ;
        arg = BRepBuilderAPI_Transform(arg, translationArg, true).Shape() ;

        lArgs.Append(arg) ;
        lBuilder.SetArguments(lArgs) ;

        gp_Trsf translationTool ;

                // Y = 0 or 100, no overlap, Y = 200, overlap
        translationTool.SetTranslation(gp_Vec(70.0000012207, 200.0, 7.7359410331)) ;
        
        BRepTools::Read(tool, "C:\\Attachment 2 (BREP)", builder) ;
        tool = BRepBuilderAPI_Transform(tool, translationTool, true).Shape() ;

        lTools.Append(tool) ;
        lBuilder.SetTools(lTools) ;

        lBuilder.SetFuzzyValue(1.0e-6) ;

        // Proceed !
        lBuilder.Build() ;

        // Can we work ?
        if (lBuilder.IsDone())
        {
            // No errors ?
            if (!lBuilder.HasErrors())
            {
                // Extract shape
                lShape = lBuilder.Shape() ;
            }
        }

Public activity

No public notes

Participants are labeled by their role within this record.