Archived issue #0024313
BRepAlgoAPI_Section and IntTools_FaceFace aren't written to handle Geom_SurfaceOfLinearExtrusion
Description
Executing the code below results in a Standard_ConstructionError. It appears that any Geom_SurfaceOfLinearExtrusion has the same result.
Steps to reproduce
1.
gp_Ax2 axes1(gp_Pnt(0, 0, 0),
gp_Dir(0, 0, 1),
gp_Dir(1, 0, 0));
Handle(Geom_Circle) curve1(new Geom_Circle(axes1, 100));
Handle(Geom_SurfaceOfLinearExtrusion) surface1(new Geom_SurfaceOfLinearExtrusion(curve1, gp_Dir(0, 0, 1)));
Handle_Geom_Plane surface2(new Geom_Plane(gp_Ax3(gp_Pnt(0, 0, 0),
gp_Dir(1, 0, 0),
gp_Dir(0, 1, 0))));
TopoDS_Shape section = BRepAlgoAPI_Section(surface1, surface2);
2. draw script:
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 1 0 0 0 1 0
intersect i s1 s2
mkface b1 s1
mkface b2 s2
bopcurves b1 b2
bsection r b1 b2
gp_Ax2 axes1(gp_Pnt(0, 0, 0),
gp_Dir(0, 0, 1),
gp_Dir(1, 0, 0));
Handle(Geom_Circle) curve1(new Geom_Circle(axes1, 100));
Handle(Geom_SurfaceOfLinearExtrusion) surface1(new Geom_SurfaceOfLinearExtrusion(curve1, gp_Dir(0, 0, 1)));
Handle_Geom_Plane surface2(new Geom_Plane(gp_Ax3(gp_Pnt(0, 0, 0),
gp_Dir(1, 0, 0),
gp_Dir(0, 1, 0))));
TopoDS_Shape section = BRepAlgoAPI_Section(surface1, surface2);
2. draw script:
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 1 0 0 0 1 0
intersect i s1 s2
mkface b1 s1
mkface b2 s2
bopcurves b1 b2
bsection r b1 b2
Public activity
9 archived notes
Participants are labeled by their role within this record.
Dear Eugene,
you can have a look at branch CR24313, pushed in repository.
This fix removes exception only, but problem remains:
command bopcurves now produces intersection curves,
but bsection does not produce result.
you can have a look at branch CR24313, pushed in repository.
This fix removes exception only, but problem remains:
command bopcurves now produces intersection curves,
but bsection does not produce result.
1. To create the section between faces we need to put at least two vertices (one vertex for closed curves) on the intersection curve. In the described case the result of intersection is two infinite lines. But there is no vertices, neither existing nor created in the result of intersection, in these faces. Thus, section cannot be created for these faces.
For example:
a.little modification of the described case:
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 0 0 1
intersect i s1 s2
mkface b1 s1
mkface b2 s2
bsection r b1 b2
#section is created
b. planes
plane p1 0 0 0 0 0 1
plane p2 0 0 0 1 0 0
intersect i p1 p2
mkface b1 p1
mkface b2 p2
bopcurves b1 b2
bsection r b1 b2
#no section
2. Even if these infinite edges are created, what is the practical use of them?
For example:
a.little modification of the described case:
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 0 0 1
intersect i s1 s2
mkface b1 s1
mkface b2 s2
bsection r b1 b2
#section is created
b. planes
plane p1 0 0 0 0 0 1
plane p2 0 0 0 1 0 0
intersect i p1 p2
mkface b1 p1
mkface b2 p2
bopcurves b1 b2
bsection r b1 b2
#no section
2. Even if these infinite edges are created, what is the practical use of them?
If we can create and operate by infinite faces made from unrestricted planes, for example, why we cannot to create and operate infinite edges without vertices?
Infinite edges without vertices can be created from infinite curves:
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 1 0 0 0 1 0
intersect i s1 s2
mkedge e1 i_1
mkedge e2 i_2
But the Boolean Operation algorithm does not produce such edges. This is the limitation of the algorithm.
What is the practical use of these infinite shapes?
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 1 0 0 0 1 0
intersect i s1 s2
mkedge e1 i_1
mkedge e2 i_2
But the Boolean Operation algorithm does not produce such edges. This is the limitation of the algorithm.
What is the practical use of these infinite shapes?
Ok
Please review my fix: branch CR24313.
Please review my fix: branch CR24313.
Dear Igor,
There is a problem with formating in the fix (two additional space at the beginning of most lines in MakeCurve function).
There is a problem with formating in the fix (two additional space at the beginning of most lines in MakeCurve function).
Try to review again CR24313
No remarks. Please test.
Dear Commenter 1,
Branch CR24313 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 102 (103 on master)
Windows: 0 (0 on master)
products component :
Linux: 188 (188 on master)
Windows: 237 (237 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR24313-master-occt/Debian60-64/bugs/modalg_5/bug24313.html
http://occt-tests/CR24313-master-occt/Windows-32-VC9/bugs/modalg_5/bug24313.html
bugs modalg_5(010) bug24313: OK
Testing on Linux:
Total MEMORY difference: 358750024 / 358750932
Total CPU difference: 42295.630000000136 / 45679.480000000185
Testing on Windows:
Total MEMORY difference: 413271596 / 412514556
Total CPU difference: 31311.796875 / 33995.90625
There are not differences in images found by testdiff.
Branch CR24313 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 102 (103 on master)
Windows: 0 (0 on master)
products component :
Linux: 188 (188 on master)
Windows: 237 (237 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests/CR24313-master-occt/Debian60-64/bugs/modalg_5/bug24313.html
http://occt-tests/CR24313-master-occt/Windows-32-VC9/bugs/modalg_5/bug24313.html
bugs modalg_5(010) bug24313: OK
Testing on Linux:
Total MEMORY difference: 358750024 / 358750932
Total CPU difference: 42295.630000000136 / 45679.480000000185
Testing on Windows:
Total MEMORY difference: 413271596 / 412514556
Total CPU difference: 31311.796875 / 33995.90625
There are not differences in images found by testdiff.