Archived issue #0024954
BRepBuilderAPI_MakeFace adds wire with aribitary orientation
Description
When creating simple faces (triagles, rectangles) I would assume that orientation is kept straight forward. This works fine for edges and vertices.
But when i call BRepBuilderAPI_MakeFace with a single wire, the orientation of the wire is sometimes reversed, which results in an face normal which has the wrong direction compared to the cross product of the edges used (and the face normal intended for the surface creation)
But when i call BRepBuilderAPI_MakeFace with a single wire, the orientation of the wire is sometimes reversed, which results in an face normal which has the wrong direction compared to the cross product of the edges used (and the face normal intended for the surface creation)
Steps to reproduce
#Example for correct face normal
polyline pf1 5.24 1.49 0.69 5.93 3.99 2.61 -0.21 2.53 3.15 5.24 1.49 0.69
wire wf1 pf1
mkplane ff1 wf1
#ff1 has the wire in face Forward:
#TShape # 1 : FACE 1111000
# +2
#Example for incorrect face normal
polyline pr1 9.08 8.62 3.75 1.87 3.04 9. 4.26 1.37 -0.08 9.08 8.62 3.75
wire wr1 pr1
mkplane fr1 wr1
#fr1 has the wire in face Reversed:
#TShape # 1 : FACE 1101000
# -2
#further polylines that lead to wrong face normals
polyline p3 -1.15 3.42 1.95 4.54 3.13 1.36 2.97 -3.14 2.08 -1.15 3.42 1.95
polyline p4 -4.62 0.1 0.75 -4.12 4.64 -2.91 -1.55 -1.07 4.48 -4.62 0.1 0.75
polyline p5 -2.92 -4.7 -2.87 4.73 1.75 1.76 3.14 -1.23 2.74 -2.92 -4.7 -2.87
polyline p6 -4.05 3.84 0.17 4.22 3.55 3.19 -1.32 -1.44 -1.57 -4.05 3.84 0.17
polyline p7 -2.36 -1.62 0.17 3.26 -1.05 -3.8 2.75 -4.01 4.95 -2.36 -1.62 0.17
polyline p8 4.72 2.03 -2.52 -4.78 1.89 -3.82 -1.42 4.56 1.55 4.72 2.03 -2.52
polyline p9 2.02 -1.4 -3.75 -2.93 -1.87 1.72 -5. -0.18 0.39 2.02 -1.4 -3.75
polyline p10 1.21 0.16 4.2 3.12 4.16 0.93 -2.33 -2.55 2.41 1.21 0.16 4.2
polyline p11 3.99 -3.09 -1.37 2.33 -3.18 2.35 -3.06 0.9 -3.08 3.99 -3.09 -1.37
polyline p12 0.29 4.98 3.68 2.13 3.02 2.84 1.61 0.34 4.46 0.29 4.98 3.68
polyline pf1 5.24 1.49 0.69 5.93 3.99 2.61 -0.21 2.53 3.15 5.24 1.49 0.69
wire wf1 pf1
mkplane ff1 wf1
#ff1 has the wire in face Forward:
#TShape # 1 : FACE 1111000
# +2
#Example for incorrect face normal
polyline pr1 9.08 8.62 3.75 1.87 3.04 9. 4.26 1.37 -0.08 9.08 8.62 3.75
wire wr1 pr1
mkplane fr1 wr1
#fr1 has the wire in face Reversed:
#TShape # 1 : FACE 1101000
# -2
#further polylines that lead to wrong face normals
polyline p3 -1.15 3.42 1.95 4.54 3.13 1.36 2.97 -3.14 2.08 -1.15 3.42 1.95
polyline p4 -4.62 0.1 0.75 -4.12 4.64 -2.91 -1.55 -1.07 4.48 -4.62 0.1 0.75
polyline p5 -2.92 -4.7 -2.87 4.73 1.75 1.76 3.14 -1.23 2.74 -2.92 -4.7 -2.87
polyline p6 -4.05 3.84 0.17 4.22 3.55 3.19 -1.32 -1.44 -1.57 -4.05 3.84 0.17
polyline p7 -2.36 -1.62 0.17 3.26 -1.05 -3.8 2.75 -4.01 4.95 -2.36 -1.62 0.17
polyline p8 4.72 2.03 -2.52 -4.78 1.89 -3.82 -1.42 4.56 1.55 4.72 2.03 -2.52
polyline p9 2.02 -1.4 -3.75 -2.93 -1.87 1.72 -5. -0.18 0.39 2.02 -1.4 -3.75
polyline p10 1.21 0.16 4.2 3.12 4.16 0.93 -2.33 -2.55 2.41 1.21 0.16 4.2
polyline p11 3.99 -3.09 -1.37 2.33 -3.18 2.35 -3.06 0.9 -3.08 3.99 -3.09 -1.37
polyline p12 0.29 4.98 3.68 2.13 3.02 2.84 1.61 0.34 4.46 0.29 4.98 3.68
Public activity
4 archived notes
Participants are labeled by their role within this record.
I understand that there is a relation between wire and surface. But from that point of view the surface is chosen badly (by BRepLib_FindSurface )
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: apv
Date: Tue Aug 1 14:45:03 2017 +0300
Test for 0024954: BRepBuilderAPI_MakeFace adds wire with aribitary orientation
[revision removed]
Detailed log of new commits:
Author: apv
Date: Tue Aug 1 14:45:03 2017 +0300
Test for 0024954: BRepBuilderAPI_MakeFace adds wire with aribitary orientation
Dear Commenter 1,
Problem described in issue is not reproduced on current state of OCCT.
Problem has been solved in OCCT6.9.0.
Please integrate branch CR24954 into the occt git-repository master.
Problem described in issue is not reproduced on current state of OCCT.
Problem has been solved in OCCT6.9.0.
Please integrate branch CR24954 into the occt git-repository master.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records