mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-26 10:19:45 +03:00
0028468: Sweep with different sections raises Standard_NoSuchObject: BRep_Tool:: no parameter on edge
Method BRepFill_SectionPlacement::Perform is modified to operate vertices and edges of path correct. Add two test cases. Minor correction.
This commit is contained in:
parent
4954e4970c
commit
6c4c45b0f9
@ -283,9 +283,8 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
|
|||||||
|
|
||||||
// In the general case : Localisation via concatenation of the spine
|
// In the general case : Localisation via concatenation of the spine
|
||||||
TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1);
|
TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1);
|
||||||
TColStd_Array1OfInteger Index(1, myLaw->NbLaw());
|
|
||||||
for (ii=1; ii<=myLaw->NbLaw(); ii++) {
|
for (ii=1; ii<=myLaw->NbLaw(); ii++) {
|
||||||
SuperKnot(ii+1) = Index(ii) = ii;
|
SuperKnot(ii+1) = ii;
|
||||||
}
|
}
|
||||||
SuperKnot(1) = 0;
|
SuperKnot(1) = 0;
|
||||||
|
|
||||||
@ -318,8 +317,17 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Bof) throw Standard_ConstructionError("Interval non trouve !!");
|
if (Bof) throw Standard_ConstructionError("Interval non trouve !!");
|
||||||
Ind1 = Index(Ind1);
|
//Search of the <Ind1> by vertex <TheV>
|
||||||
if (Ind2) Ind2 = Index(Ind2);
|
if (!TheV.IsNull())
|
||||||
|
for (Ind1 = 1; Ind1 <= myLaw->NbLaw(); Ind1++)
|
||||||
|
{
|
||||||
|
TopoDS_Edge anEdge = myLaw->Edge(Ind1);
|
||||||
|
TopoDS_Vertex V1, V2;
|
||||||
|
TopExp::Vertices(anEdge, V1, V2);
|
||||||
|
if (V1.IsSame(TheV) || V2.IsSame(TheV))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
////////////////////
|
||||||
|
|
||||||
// Positioning on the localized edge (or 2 Edges)
|
// Positioning on the localized edge (or 2 Edges)
|
||||||
Standard_Real Angle;
|
Standard_Real Angle;
|
||||||
|
30
tests/bugs/modalg_6/bug28468_1
Normal file
30
tests/bugs/modalg_6/bug28468_1
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC28468"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
##############################################################################################
|
||||||
|
# Sweep with different sections raises Standard_NoSuchObject: BRep_Tool:: no parameter on edge
|
||||||
|
##############################################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug28468_wire3.brep] sp
|
||||||
|
restore [locate_data_file bug28468_section_entree.brep] pr1
|
||||||
|
restore [locate_data_file bug28468_section_passage1.brep] pr2
|
||||||
|
restore [locate_data_file bug28468_section_passage2.brep] pr3
|
||||||
|
restore [locate_data_file bug28468_section_sortie.brep] pr4
|
||||||
|
|
||||||
|
wire pr1 pr1
|
||||||
|
wire pr4 pr4
|
||||||
|
|
||||||
|
explode sp V
|
||||||
|
|
||||||
|
mksweep sp
|
||||||
|
addsweep pr1 sp_1
|
||||||
|
addsweep pr2 sp_2
|
||||||
|
addsweep pr3 sp_3
|
||||||
|
addsweep pr4 sp_4
|
||||||
|
buildsweep r
|
||||||
|
|
||||||
|
checkshape r
|
||||||
|
|
||||||
|
checknbshapes r -shell 1 -face 3 -wire 3 -edge 7 -vertex 4
|
||||||
|
checkprops r -s 222710
|
29
tests/bugs/modalg_6/bug28468_2
Normal file
29
tests/bugs/modalg_6/bug28468_2
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC28468"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
##############################################################################################
|
||||||
|
# Sweep with different sections raises Standard_NoSuchObject: BRep_Tool:: no parameter on edge
|
||||||
|
##############################################################################################
|
||||||
|
|
||||||
|
beziercurve bc1 3 100 0 0 1 0 100 0 3 -100 0 0 1
|
||||||
|
beziercurve bc2 3 -100 0 0 1 0 -100 0 3 100 0 0 1
|
||||||
|
mkedge e1 bc1
|
||||||
|
mkedge e2 bc2
|
||||||
|
wire sp e1 e2
|
||||||
|
polyline pr1 110 0 10 90 0 10 90 0 -10 110 0 -10 110 0 10
|
||||||
|
circle pr2 -100 0 0 0 1 0 10
|
||||||
|
mkedge pr2 pr2
|
||||||
|
wire pr2 pr2
|
||||||
|
donly sp pr1 pr2
|
||||||
|
explode sp v
|
||||||
|
|
||||||
|
mksweep sp
|
||||||
|
addsweep pr1 sp_1
|
||||||
|
addsweep pr2 sp_2
|
||||||
|
buildsweep r
|
||||||
|
|
||||||
|
checkshape r
|
||||||
|
|
||||||
|
checknbshapes r -shell 1 -face 10 -wire 10 -edge 25 -vertex 15
|
||||||
|
checkprops r -s 28569.4
|
Loading…
x
Reference in New Issue
Block a user