View Issue Details

IDProjectCategoryView StatusLast Update
0033880CommunityOCCT:Modeling Algorithmspublic2025-03-20 13:21
ReporterNickZ Assigned Toakaftasev  
PrioritynormalSeveritymajor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2022 
Product Version7.7.0 
Summary0033880: Scaling with BRepBuilderAPI_GTransform crashes when the shape has triangulation
DescriptionThe code in the next box crashes in the end. It works OK if you comment out the
BRepMesh_IncrementalMesh(shape0, 0.5, Standard_False, hPi);
line

BTW this form has problems. It crashes when I click submit
Steps To Reproducevoid BRepBuilderAPI_GTransformTst::Test0()
{
    // Rectange
    double width = 2;
    double height = 1;
    gp_Pnt P0(0, 0, 0), P1(width, 0, 0), P2(width, height, 0), P3(0, height, 0);

    gp_Pln plane = gce_MakePln(P0, P1, P2); // On first three

    BRepBuilderAPI_MakeFace MF(plane);

    TopoDS_Wire W = BRepBuilderAPI_MakePolygon(P0, P1, P2, P3, Standard_True);

    MF.Add(W);
    TopoDS_Face F = MF;

    double factor = 1.5;

    gp_GTrsf gTrsf0;
    gTrsf0.SetValue(1, 1, factor);
    gTrsf0.SetValue(2, 2, factor);
    gTrsf0.SetValue(3, 3, factor);

    BRepBuilderAPI_GTransform gBRepTrsf(F, gTrsf0);

    TopoDS_Shape shape0 = gBRepTrsf.Shape();

    BRepCheck_Analyzer analyser(shape0); ASSERT(analyser.IsValid());

    // The critical line. The exception does not happen without it:
    BRepMesh_IncrementalMesh(shape0, 0.5, Standard_False, hPi);

    gp_GTrsf gTrsf1;
    gTrsf1.SetValue(1, 1, factor);
    gTrsf1.SetValue(2, 2, factor);
    gTrsf1.SetValue(3, 3, factor);

    BRepBuilderAPI_GTransform gBRepTrsf1(shape0, gTrsf1);

    TopoDS_Shape shape1 = gBRepTrsf1.Shape();

    BRepCheck_Analyzer analyser1(shape1); // An exception inside the constructor
    ASSERT(analyser1.IsValid());
}
TagsNo tags attached.
Test case number

Activities

NickZ

2025-03-20 11:35

reporter   ~0116991

Submitting works if I just repeat. This also happened last time two weeks ago with the previous my bug

dpasukhi

2025-03-20 13:20

administrator   ~0116992

Last edited: 2025-03-20 13:21

Dear @NickZ the issue must to be resolved on latest version.
If not - please let me know.
The main bug tracker migrated to https://github.com/Open-Cascade-SAS/OCCT
The issue from current BT are moved manually when started to fix. No global migration is planned.

Issue History

Date Modified Username Field Change
2025-03-20 11:33 NickZ New Issue
2025-03-20 11:33 NickZ Assigned To => akaftasev
2025-03-20 11:35 NickZ Note Added: 0116991
2025-03-20 13:20 dpasukhi Note Added: 0116992
2025-03-20 13:21 dpasukhi Note Edited: 0116992