Method BRepLib_MakeFace::CheckInside() is not called for open wire. So, if the input wire is open its orientation is not changed in the result face.
// Error processing
}
~~~~
+
+@subsection upgrade_720_Change_In_BRepLib_MakeFace_Algo Change in BRepLib_MakeFace algorithm
+
+ Previously, BRepLib_MakeFace algorithm changed orientation of the source wire in order to avoid creation of face as a hole (i.e. it is impossible to create single face as hole; hole can be created in context of another face only). New algorithm does not reverse the wire if it is open. Material of the face for open wire will be located on the left side from the source wire.
+
+@subsection upgrade_720_Change_In_BRepFill_OffsetWire Change in BRepFill_OffsetWire algorithm
+
+ Now, offset direction will always be to outer region in case of positive offset value and to inner region in case of negative offset value.
+ Inner/Outer region for open wire is defined by the following rule:
+ when we go along the wire (taking into account edges orientation) then outer region will be on the right side, inner region will be on the left side.
+ In case of closed wire, inner region will always be inside the wire (at that, edges orientation is not taken into account).
\ No newline at end of file
class BRepFill_TrimEdgeTool;
-//! Constructs a Offset Wire to a spine (wire or face)
-//! on the left of spine.
-//! The Wire or the Face must be planar.
+//! Constructs a Offset Wire to a spine (wire or face).
+//! Offset direction will be to outer region in case of
+//! positive offset value and to inner region in case of
+//! negative offset value.
+//! Inner/Outer region for open wire is defined by the
+//! following rule: when we go along the wire (taking into
+//! account of edges orientation) then outer region will be
+//! on the right side, inner region will be on the left side.
+//! In case of closed wire, inner region will always be
+//! inside the wire (at that, edges orientation is not taken
+//! into account).
+//! The Wire or the Face must be planar and oriented correctly.
class BRepFill_OffsetWire
{
public:
//
BRepLib::SameParameter(myShape, tol, Standard_True);
//
- CheckInside();
+ if (BRep_Tool::IsClosed(W))
+ CheckInside();
}
Handle(Geom_Plane) Pl = new Geom_Plane(P);
Init(Pl, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
Handle(Geom_CylindricalSurface) GC = new Geom_CylindricalSurface(C);
Init(GC, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
Handle(Geom_ConicalSurface) GC = new Geom_ConicalSurface(C);
Init(GC, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
Handle(Geom_SphericalSurface) GS = new Geom_SphericalSurface(S);
Init(GS, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
Handle(Geom_ToroidalSurface) GT = new Geom_ToroidalSurface(T);
Init(GT, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
{
Init(S, Standard_False, Precision::Confusion());
Add(W);
- if (Inside) CheckInside();
+ if (Inside && BRep_Tool::IsClosed(W)) CheckInside();
}
display a
fit
-if [catch { openoffset resoffset a 1 10 i } ] {
+if [catch { openoffset resoffset a 1 -10 i } ] {
puts "Error : mkoffset is wrong"
} else {
renamevar resoffset_1 result
display a
fit
-if [catch { openoffset resoffset a 1 -10 i } ] {
+if [catch { openoffset resoffset a 1 10 i } ] {
puts "Error : mkoffset is wrong"
} else {
renamevar resoffset_1 result
donly ww
-openoffset res ww 1 -10
+openoffset res ww 1 10
renamevar res_1 result
fit
donly ww
-openoffset res ww 1 10
+openoffset res ww 1 -10
renamevar res_1 result
fit
donly ww
-openoffset res ww 1 -10
+openoffset res ww 1 10
renamevar res_1 result
fit
donly ww
-openoffset res ww 1 10
+openoffset res ww 1 -10
renamevar res_1 result
fit
display a
fit
-if [catch { openoffset resoffset a 1 6. i } ] {
+if [catch { openoffset resoffset a 1 -6. i } ] {
puts "Error : openoffset is wrong"
} else {
renamevar resoffset_1 result
restore [locate_data_file bug26296_linesarc.brep] a
fit
-openoffset r a 4 10.
+openoffset r a 4 -10.
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
foreach s {co_1 co_2 co_3 co_4} {
puts "\n*** make offset of wire r$s\n"
-mkoffset r${s} ${s} 1 1
+mkoffset r${s} ${s} 1 -1
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection r${s}_1] full nbv
restore [locate_data_file offset_wire_058.brep] s
+set off_param -$off_param
+
set length 3316.27
set nbsh_v 62
set nbsh_e 62
-set nbsh_w 1
-
+set nbsh_w 1
\ No newline at end of file
restore [locate_data_file offset_wire_058.brep] s
+set off_param -$off_param
+
set length 2582.56
set nbsh_v 47
set nbsh_e 47
puts "TODO OCC24156 MacOS: Error : The resulting shape is WRONG"
restore [locate_data_file offset_wire_001.brep] s
+
+set off_param -$off_param
+
set length 11.6898
set nbsh_v 23
set nbsh_e 23
restore [locate_data_file offset_wire_058.brep] s
+set off_param -$off_param
+
set length 3127.75
set nbsh_v 39
set nbsh_e 39