DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0028640

Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape

CommunityOCCT:Modeling Algorithmsclosed12 public notes

Search issues

Description

BRepBuilderAPI_Transform mirror a shape generates invalid shape

Steps to reproduce

gp_Trsf _mirror_trsf;
_mirror_trsf.SetMirror(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)));

_shape = BRepBuilderAPI_Transform(_origin_shape, _mirror_trsf)


## Draw script ##
restore Attachment 4 (BREP) a
tmirror a 0 0 0 1 0 0
checkshape a

Public activity

12 archived notes

Participants are labeled by their role within this record.

01Author
the origin brep file is lager than the limitation. so i zipped it !

and note the origin brep is about twice large as the mirror brep

02Commenter 2
The size of origin shape is explained by redundant data in edges of the shape. The edges contain pogygons and triangulations not relevant to the faces of this shape. Transformation algorithm creates new edges and takes only relevant data.
The same origin shape without garbage can be got by deep copying it with BRepBuilderAPI_Copy algorithm. The Draw command 'tcopy' does it. I have attached such copy of origin. Now mirror creates a shape with the same file size.

I admit that the bug is reproduced. The mirrored shape does not pass the check by shape checker. I have put the draw script in steps to reproduce.
03Author
dear msv,

after your explain, i understand the difference of size.

so let's fix the mirror bug.
04Commenter 4
Problem described in issue is reproduced on current state of OCCT.
05Commenter 1
Problem was not reproduced (see attached image). It was found, that input shape is not valid. But it mirrors well (without losing its faces). Even if we fix input shape it still mirrors well.
Attachment 2 (PNG) (330,260 bytes)   
06Commenter 2
Commenter 2, then please create a test case for this bug. And please try to find which fix corrected this bug, and make link with it.
07Commenter 3
Branch [archived branch] has been created by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Commenter 1
Date: Tue Sep 27 09:46:43 2022 +0300

    0028640: Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape
    
    Adapt test case, the problem is not reproduced any more.
08Commenter 3
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
09Commenter 3
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
10Commenter 1
11Commenter 11
Reviewed, please integrate branch CR28640 into OCCT.
12Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]