Method BRepFill_SectionPlacement::Perform is modified to operate vertices and edges of path correct.
Add two test cases.
Minor correction.
// In the general case : Localisation via concatenation of the spine
TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1);
- TColStd_Array1OfInteger Index(1, myLaw->NbLaw());
for (ii=1; ii<=myLaw->NbLaw(); ii++) {
- SuperKnot(ii+1) = Index(ii) = ii;
+ SuperKnot(ii+1) = ii;
}
SuperKnot(1) = 0;
}
if (Bof) throw Standard_ConstructionError("Interval non trouve !!");
- Ind1 = Index(Ind1);
- if (Ind2) Ind2 = Index(Ind2);
+ //Search of the <Ind1> by vertex <TheV>
+ 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)
Standard_Real Angle;
--- /dev/null
+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
--- /dev/null
+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