1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

Compare commits

..

7 Commits

55 changed files with 208 additions and 1354 deletions

View File

@@ -2865,7 +2865,7 @@ static Standard_Boolean EnlargeGeometry(Handle(Geom_Surface)& S,
const Standard_Boolean GlobalEnlargeVfirst,
const Standard_Boolean GlobalEnlargeVlast)
{
const Standard_Real coeff = 2.; //4.;
const Standard_Real coeff = 4.;
const Standard_Real TolApex = 1.e-5;
Standard_Boolean SurfaceChange = Standard_False;
@@ -3248,8 +3248,7 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
const Standard_Boolean UpdatePCurve,
const Standard_Boolean enlargeU,
const Standard_Boolean enlargeVfirst,
const Standard_Boolean enlargeVlast,
const Standard_Boolean UseInfini)
const Standard_Boolean enlargeVlast)
{
//---------------------------
// extension de la geometrie.
@@ -3271,20 +3270,8 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
}
S->Bounds (US1,US2,VS1,VS2);
if (UseInfini)
{
UU1 = VV1 = - TheInfini;
UU2 = VV2 = TheInfini;
}
else
{
Standard_Real FaceDU = UF2 - UF1;
Standard_Real FaceDV = VF2 - VF1;
UU1 = UF1 - FaceDU;
UU2 = UF2 + FaceDU;
VV1 = VF1 - FaceDV;
VV2 = VF2 + FaceDV;
}
UU1 = VV1 = - TheInfini;
UU2 = VV2 = TheInfini;
if (CanExtentSurface) {
SurfaceChange = EnlargeGeometry( S, UU1, UU2, VV1, VV2, isVV1degen, isVV2degen, UF1, UF2, VF1, VF2,

View File

@@ -104,14 +104,7 @@ public:
//! if <UpdatePCurve> is TRUE, update the pcurves of the
//! edges of <F> on the new surface.if the surface has been changed,
//! Returns True if The Surface of <NF> has changed.
Standard_EXPORT static Standard_Boolean EnLargeFace (const TopoDS_Face& F,
TopoDS_Face& NF,
const Standard_Boolean ChangeGeom,
const Standard_Boolean UpDatePCurve = Standard_False,
const Standard_Boolean enlargeU = Standard_True,
const Standard_Boolean enlargeVfirst = Standard_True,
const Standard_Boolean enlargeVlast = Standard_True,
const Standard_Boolean UseInfini = Standard_True);
Standard_EXPORT static Standard_Boolean EnLargeFace (const TopoDS_Face& F, TopoDS_Face& NF, const Standard_Boolean ChangeGeom, const Standard_Boolean UpDatePCurve = Standard_False, const Standard_Boolean enlargeU = Standard_True, const Standard_Boolean enlargeVfirst = Standard_True, const Standard_Boolean enlargeVlast = Standard_True);
Standard_EXPORT static void ExtentFace (const TopoDS_Face& F, TopTools_DataMapOfShapeShape& ConstShapes, TopTools_DataMapOfShapeShape& ToBuild, const TopAbs_State Side, const Standard_Real TolConf, TopoDS_Face& NF);

File diff suppressed because it is too large Load Diff

View File

@@ -1,111 +0,0 @@
// Created on: 2012-08-06
// Created by: jgv@ROLEX
// Copyright (c) 2012-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffsetAPI_PatchFaces_HeaderFile
#define _BRepOffsetAPI_PatchFaces_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_DataMapOfOrientedShapeShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
class TopoDS_Shape;
//! Describes functions to replace some faces in a shape
//! by patches
class BRepOffsetAPI_PatchFaces : public BRepBuilderAPI_MakeShape
{
public:
DEFINE_STANDARD_ALLOC
//! General constructor.
Standard_EXPORT BRepOffsetAPI_PatchFaces(const TopoDS_Shape& aShape);
//! Adds the patch face for the face in the shape.
Standard_EXPORT void AddPatchFace (const TopoDS_Face& theFace, const TopoDS_Face& thePatchFace);
Standard_EXPORT virtual void Build() Standard_OVERRIDE;
protected:
private:
Standard_EXPORT void UpdateEdgesAndVertex(const TopoDS_Edge& thePrevEdge,
TopoDS_Edge& thePrevNewEdge,
const TopoDS_Edge& theCurEdge,
TopoDS_Edge& theCurNewEdge,
TopoDS_Vertex& theCurVertex,
const TopoDS_Face& theFace,
const TopoDS_Face& theNewFace,
TopoDS_Face& theBoundedNewFace);
Standard_EXPORT void PutVertexToEdge(const TopoDS_Vertex& theVertex,
const TopoDS_Vertex& theProVertex,
TopoDS_Edge& theEdge,
const TopoDS_Edge& theProEdge,
const Standard_Real theParamOnEdge);
Standard_EXPORT void ProjectVertexOnNewEdge_2d(const TopoDS_Vertex& theVertex,
const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
const TopoDS_Edge& theNewEdge,
const TopoDS_Face& theNewFace,
Standard_Real& theParam,
gp_Pnt& thePnt,
gp_Pnt2d& thePnt2d,
Standard_Real& theTolReached);
TopoDS_Shape myInitialShape;
TopTools_IndexedDataMapOfShapeShape myFacePatchFace;
TopTools_IndexedDataMapOfShapeShape myFaceNewFace;
TopTools_DataMapOfShapeShape myNewFaceBoundedFace;
TopTools_DataMapOfShapeShape myEdgeNewEdge;
//TopTools_DataMapOfOrientedShapeShape myOrientedEdgeNewEdge;
TopTools_DataMapOfShapeShape myVertexNewVertex;
TopTools_MapOfShape myTangentEdges;
TopTools_IndexedDataMapOfShapeListOfShape myEFmap;
};
#endif // _BRepOffsetAPI_PatchFaces_HeaderFile

View File

@@ -27,5 +27,3 @@ BRepOffsetAPI_SequenceOfSequenceOfShape.hxx
BRepOffsetAPI_Sewing.hxx
BRepOffsetAPI_ThruSections.cxx
BRepOffsetAPI_ThruSections.hxx
BRepOffsetAPI_PatchFaces.cxx
BRepOffsetAPI_PatchFaces.hxx

View File

@@ -62,8 +62,6 @@
#include <DBRep_DrawableShape.hxx>
#include <BRepTest.hxx>
#include <BRepOffsetAPI_PatchFaces.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>
#include <ChFi3d_FilletShape.hxx>
@@ -2289,36 +2287,6 @@ static Standard_Integer ComputeSimpleOffset(Draw_Interpretor& theCommands,
return 0;
}
//=======================================================================
//function : patchfaces
//purpose :
//=======================================================================
static Standard_Integer patchfaces(Draw_Interpretor& /*di*/,
Standard_Integer n, const char** a)
{
if (n < 5) return 1;
TopoDS_Shape aShape = DBRep::Get(a[2]);
if (aShape.IsNull()) return 1;
TopoDS_Shape aLocalFace = DBRep::Get(a[3], TopAbs_FACE);
if (aLocalFace.IsNull()) return 1;
TopoDS_Face aFace = TopoDS::Face(aLocalFace);
TopoDS_Shape aLocalNewFace = DBRep::Get(a[4], TopAbs_FACE);
if (aLocalNewFace.IsNull()) return 1;
TopoDS_Face aNewFace = TopoDS::Face(aLocalNewFace);
BRepOffsetAPI_PatchFaces Builder(aShape);
Builder.AddPatchFace(aFace, aNewFace);
Builder.Build();
TopoDS_Shape Result = Builder.Shape();
DBRep::Set(a[1], Result);
return 0;
}
//=======================================================================
//function : FeatureCommands
//purpose :
@@ -2467,7 +2435,4 @@ void BRepTest::FeatureCommands (Draw_Interpretor& theCommands)
theCommands.Add("offsetshapesimple",
"offsetshapesimple result shape offsetvalue [solid] [tolerance=1e-7]",
__FILE__, ComputeSimpleOffset);
theCommands.Add("patchfaces", "patchfaces res shape face newface",
__FILE__,patchfaces,g);
}

View File

@@ -0,0 +1,28 @@
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
puts "TODO OCC24909 ALL: An exception was caught"
puts "TODO OCC24909 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC24909"
puts "========"
puts ""
##################################
# 0024909: SIGSEGV in buildsweep
##################################
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-spine.brep] Sweep-0-spine
mksweep Sweep-0-spine
setsweep -CF
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-section-00-Sketch.brep] Sweep-0-section-00-Sketch
addsweep Sweep-0-section-00-Sketch
restore [locate_data_file bug24909_sweep3-draw-Sweep-0-section-01-Sketch001.brep] Sweep-0-section-01-Sketch001
addsweep Sweep-0-section-01-Sketch001
buildsweep Sweep

View File

@@ -0,0 +1,31 @@
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
puts "TODO OCC24909 ALL: An exception was caught"
puts "TODO OCC24909 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC24909"
puts "========"
puts ""
##################################
# 0024909: SIGSEGV in buildsweep
##################################
circle c1 0 0 0 40
mkedge e1 c1
wire w1 e1
tcopy w1 Sketch002
tcopy w1 Sketch001
renamevar w1 Sketch
trotate Sketch 0 0 0 0. 1. 0. 90
ttranslate Sketch 0. 0. 75.
trotate Sketch001 0 0 0 0. 1. 0. 90
ttranslate Sketch001 0. 0. -75.
ttranslate Sketch002 50. 0. 0.
mksweep Sketch002
setsweep -CF
addsweep Sketch001
addsweep Sketch
buildsweep Sweep

View File

@@ -0,0 +1,32 @@
puts "TODO OCC24909 ALL: Tcl Exception: Buildsweep : Not Done"
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC24909"
puts "========"
puts ""
##################################
# 0024909: SIGSEGV in buildsweep
##################################
restore [locate_data_file bug24909_minihyd-draw-BezCurve.brep] BezCurve
ttranslate BezCurve 0 -8 0
explode BezCurve E
wire Sweep001-0-spine BezCurve_1
mksweep Sweep001-0-spine
setsweep -CF
circle Circle-curve 0 0 0 18
mkedge Circle-edge Circle-curve 0 0
wire Circle Circle-edge
trotate Circle 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
ttranslate Circle 0 -71 203.5
addsweep Circle
circle Circle001-curve 0 0 0 16
mkedge Circle001-edge Circle001-curve 0 0
wire Circle001 Circle001-edge
trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120
ttranslate Circle001 0 -71 203.5
addsweep Circle001
buildsweep Sweep001 -C -S

View File

@@ -0,0 +1,15 @@
puts "TODO OCC24997 ALL: An exception was caught"
puts "TODO OCC24997 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24997 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC24997"
puts "========"
puts ""
#########################################
# SIGSEGV in BRepOffsetAPI_ThruSections
#########################################
restore [locate_data_file bug24997_loft3-draw-Loft-00-section.brep] Loft-00-section
restore [locate_data_file bug24997_loft3-draw-Loft-01-section.brep] Loft-01-section
thrusections Loft 0 0 Loft-00-section Loft-01-section

View File

@@ -0,0 +1,22 @@
puts "TODO OCC25081 ALL: TEST INCOMPLETE"
puts "TODO OCC25081 ALL: Process killed by CPU limit"
puts "========"
puts "OCC25081"
puts "========"
puts ""
############################
# bopcheck does not return
############################
cpulimit 1200
restore [locate_data_file bug25081_v1-sweep-draw-Sweep-0-spine.brep] Sweep-0-spine
restore [locate_data_file bug25081_v1-sweep-draw-Sweep-0-section-00-Wire.brep] Sweep-0-section-00-Wire
mksweep Sweep-0-spine
setsweep -FR
addsweep Sweep-0-section-00-Wire
buildsweep Sweep -C -S
bopcheck Sweep

View File

@@ -0,0 +1,20 @@
puts "TODO OCC25110 ALL: An exception was caught"
puts "TODO OCC25110 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC25110 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC25110"
puts "========"
puts ""
########################################################################################
# TCollection_IndexedDataMap::FindFromKey error when sweeping circle along BezierCurve
########################################################################################
restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-spine.brep] Sweep-0-spine
restore [locate_data_file bug25110_unsweepable1-draw-Sweep-0-section-00-Circle.brep] Sweep-0-section-00-Circle
mksweep Sweep-0-spine
setsweep -CF
addsweep Sweep-0-section-00-Circle
buildsweep Sweep -C -S

View File

@@ -0,0 +1,21 @@
puts "TODO OCC26030 ALL: An exception was caught"
puts "TODO OCC26030 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC26030 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC26030"
puts "========"
puts ""
#################################################
# Offset of a lofted body fails after long time
#################################################
restore [locate_data_file bug26030_thickness-crash1-tcl-Loft001-00-section.brep] Loft001-00-section
restore [locate_data_file bug26030_thickness-crash1-tcl-Loft001-01-section.brep] Loft001-01-section
thrusections Loft001 1 0 Loft001-00-section Loft001-01-section
explode Loft001 F
offsetparameter 1e-7 p i
offsetload Loft001 1
offsetperform Offset

View File

@@ -0,0 +1,16 @@
puts "TODO OCC26088 ALL: An exception was caught"
puts "TODO OCC26088 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC26088 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC26088"
puts "========"
puts ""
###############################
# Exception in pipe algorithm
###############################
restore [locate_data_file bug26088_path0.brep] p
restore [locate_data_file bug26088_profile0.brep] pr
pipe result p pr

View File

@@ -0,0 +1,17 @@
puts "TODO OCC24621 ALL: An exception was caught"
puts "TODO OCC24621 ALL: \\*\\* Exception \\*\\*.*"
puts "TODO OCC24621 ALL: TEST INCOMPLETE"
puts "========"
puts "OCC24621"
puts "========"
puts ""
##################################################
# Failed to build Geom_OffsetSurface on B-Spline
##################################################
restore [locate_data_file bug24621_bs.draw] bs
offset obs bs -2
setunotperiodic bs
offset obs bs -2

View File

@@ -1,23 +0,0 @@
# To prevent loops limit to 10 minutes
cpulimit 900
if { [array get Draw_Groups "TOPOLOGY Feature commands"] == "" } {
pload TOPTEST
}
if { [array get Draw_Groups "Shape Healing"] == "" } {
pload XSDRAW
}
if { [info exists imagedir] == 0 } {
set imagedir .
}
if { [info exists test_image ] == 0 } {
set test_image photo
}
proc PATCHFACES {i} {
uplevel #0 binrestore [locate_data_file shape_3_$i.bin] s
uplevel #0 tclean s
uplevel #0 removeloc s s
uplevel #0 explode s
uplevel #0 tcopy s_1 InitShape
uplevel #0 patchfaces result s_1 s_2 s_3
}

View File

@@ -1 +0,0 @@
puts "TEST COMPLETED"

View File

@@ -1 +0,0 @@
001 replace

View File

@@ -1,2 +0,0 @@
FAILED /\bFaulty\b/ bad shape
OK /Relative error of mass computation/ message from vprops

View File

@@ -1 +0,0 @@
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -1 +0,0 @@
PATCHFACES 1

View File

@@ -1 +0,0 @@
PATCHFACES 10

View File

@@ -1 +0,0 @@
PATCHFACES 11

View File

@@ -1 +0,0 @@
PATCHFACES 12

View File

@@ -1 +0,0 @@
PATCHFACES 13

View File

@@ -1 +0,0 @@
PATCHFACES 14

View File

@@ -1 +0,0 @@
PATCHFACES 15

View File

@@ -1 +0,0 @@
PATCHFACES 16

View File

@@ -1 +0,0 @@
PATCHFACES 17

View File

@@ -1 +0,0 @@
PATCHFACES 18

View File

@@ -1 +0,0 @@
PATCHFACES 19

View File

@@ -1 +0,0 @@
PATCHFACES 2

View File

@@ -1 +0,0 @@
PATCHFACES 20

View File

@@ -1 +0,0 @@
PATCHFACES 21

View File

@@ -1 +0,0 @@
PATCHFACES 22

View File

@@ -1 +0,0 @@
PATCHFACES 23

View File

@@ -1 +0,0 @@
PATCHFACES 24

View File

@@ -1 +0,0 @@
PATCHFACES 25

View File

@@ -1 +0,0 @@
PATCHFACES 26

View File

@@ -1 +0,0 @@
PATCHFACES 27

View File

@@ -1 +0,0 @@
PATCHFACES 28

View File

@@ -1 +0,0 @@
PATCHFACES 29

View File

@@ -1 +0,0 @@
PATCHFACES 3

View File

@@ -1 +0,0 @@
PATCHFACES 30

View File

@@ -1 +0,0 @@
PATCHFACES 31

View File

@@ -1 +0,0 @@
PATCHFACES 32

View File

@@ -1 +0,0 @@
PATCHFACES 33

View File

@@ -1 +0,0 @@
PATCHFACES 34

View File

@@ -1 +0,0 @@
PATCHFACES 35

View File

@@ -1 +0,0 @@
PATCHFACES 4

View File

@@ -1 +0,0 @@
PATCHFACES 5

View File

@@ -1 +0,0 @@
PATCHFACES 6

View File

@@ -1 +0,0 @@
PATCHFACES 7

View File

@@ -1 +0,0 @@
PATCHFACES 8

View File

@@ -1 +0,0 @@
PATCHFACES 9