1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

4301 Commits

Author SHA1 Message Date
kgv
6194ee76fb 0029262: Visualization - AIS_InteractiveContext::Load() does not register Object in the Viewer
AIS_InteractiveContext::Load() now loads the object regardless specified selection mode and decomposition flag.
AIS_InteractiveContext::Load() and ::KeepTemporary() now register object in the Viewer
in the same way as ::Display() does.

Draw Harness command vdisplay has been extended with new flag -erased to load object into context in erased state.
2017-10-26 12:53:38 +03:00
apn
4f26118e3b 0029250: Configuration, TKIVtk - build failure with VTK 6.3+ due to vtkRenderingFreeTypeOpenGL being removed
Remove vtkRenderingFreeTypeOpenGL from EXTERNLIB if used vtk version is 6.3.0 and above
2017-10-25 18:41:32 +03:00
kgv
59e353b75d 0029251: Configuration - problem compiling OCCT 7.2 with glibc 2.26
Standard_CLocaleSentry does not include xlocale.h when using glibc anymore.
HAVE_XLOCALE_H has been renamed to OCCT_CLOCALE_POSIX2008 to avoid confusion.

Renamed macros OCC_CHECK_BASE_CLASS -> OCCT_CHECK_BASE_CLASS.
2017-10-24 18:32:01 +03:00
kgv
ab8566c904 0029255: Configuration, .gitignore - do not track generated files with extensions VC.db, VC.opendb 2017-10-24 18:29:42 +03:00
kgv
65ada1f174 0029252: Coding rules - eliminate GCC compiler warnings -Wformat-overflow
OSD_DirectoryIterator and OSD_FileIterator now uses TCollection_AsciiString instead of unsafe sprintf.
2017-10-24 18:27:00 +03:00
abv
cf0786daf1 0024574: ICC compiler warnings on Windows
NCollection_UtfString and NCollection_UtfIterator classes are refactored to use methods overloading instead of switches to dispatch implementation depending on character (Unicode code unit) size.

ICC-specific preprocessor directives are added to avoid warnings.
Unused local functions and variables, class methods, unreachable statements, and extra throw() declarations reported by ICC are removed.
Usage of "expl" for name of local variable is avoided as it conflicts with standard C function "expl" defined in math.h as preprocessor macro.

Non-standard (MS-specific) argument envp is removed in definition of main() function on Windows.
Functions _main_ and _WinMain_ are renamed to Draw_Main and Draw_WinMain, respectively, to avoid using names reserved in C++.

Doxygen warning is fixed in XDE User's Guide.
2017-10-23 16:54:48 +03:00
kgv
f6c2b39aac 0029214: Application Framework - TPrsStd_AISPresentation::AISUpdate() should not implicitly redraw 3D Viewer 2017-10-23 16:53:32 +03:00
apn
72bcf3c7be 0029247: Tests, CheckCommands.tcl - Tcl exception "expected integer but got 3dviewer" in test cases on macOS
Test cases on macOS (using native tcl from /usr/lib) fail when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar.
The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer".
2017-10-19 12:27:45 +03:00
ifv
47a2717138 0029183: Result of general fuse of shell and edge produces a shape with too large tolerance
Adjusting parameters on approximation (boundary condition) for case when projected curve is far from surface
Test case is created
2017-10-19 12:26:52 +03:00
msv
6da5b3004c 0029157: Modeling - suspicious pass-through of case labels in switch statements
Suspicious passes through case labels have been resolved either by using Standard_FALLTHROUGH macro or by redesigning the code.
2017-10-19 12:26:50 +03:00
msv
56c62737ee 0029182: BOPAlgo_PaveFiller sometimes raises exception in parallel mode
Data races have been prevented in the code of BOPAlgo_PaveFiller that makes pcurves of edges on faces. For that:
- Put into treatment only unique edge-face pairs.
- If the same edge is treated with different faces in different threads simultaneously this also causes data races. To avoid this make the edge's copy in each thread and update the copy. The original edge is updated only after finishing parallel processing.

The new method BOPTools_AlgoTools::CopyEdge has been added to make a copy of an edge with vertices.

Big screenshot in the test script tests/bugs/modalg_7/bug28200 has been replaced with a small one.
2017-10-19 12:26:47 +03:00
oan
5fbe3d01e6 0029186: Move AddTool(), SetTools(), Tools() and other common methods of BOP tools to separate interface class
Methods AddTool(), SetTools(), Tools() have been moved to BOPAlgo_ToolsProvider class;
BOPAlgo_BOP and BOPAlgo_Splitter are now successors of BOPAlgo_ToolsProvider
2017-10-19 12:26:45 +03:00
kgv
744d9c0d22 0029228: Coding Rules - define rule for avoiding header inclusion list pollution 2017-10-19 12:26:43 +03:00
dbv
4ea76aea75 0029229: Crash at Poly_Triangulation::Normal
Fixed creation of returning gp_Dir
2017-10-19 12:26:41 +03:00
emv
4b1a240135 0028763: Projection of a short line segment on a polar surface causes exception
Test case for the issue.
The problem has been fixed by the fix for the issue 0028150
2017-10-19 12:26:39 +03:00
kgv
82be4141b6 0029225: Visualization - Font_FTFont::AdvanceX() retrieves kerning value for incorrect characters pair
Fixed FT_Get_Kerning misuse within Font_FTFont::AdvanceX()/Font_FTFont::AdvanceY().
Font_FTFont::loadGlyph() has been corrected to not return TRUE
in case if method called with 0 argument second+ time.
2017-10-16 17:56:14 +03:00
emv
bc4a38670e 0029188: Null shape is produced by 3D offset algorithm (mode="Complete", Join Type="Intersection")
The following improvements have been made in the 3D offset algorithm for mode "Complete" and Join type "Intersection":
- RemoveInsideFaces() - Removal of the invalid parts outside of the solids built from the splits of offset faces is now performed. It helps to avoid their rebuilding and speed-up the computation.
- FindVerticesToAvoid() - Strengthening the criteria for the vertices to be avoided in the new splits.

Test cases for the issue.
Adjustment of the test cases to current behavior.
2017-10-16 17:54:42 +03:00
apv
dfc3f102e6 Update of tests database
Test for 0021134: checkshape command does not return faulty shapes.
Test for 0021494: Intersection between cone and sphere fails
Test for 0022642: Refactoring of ShapeFix_Wire::FixIntersectingEdges
Test for 0022732: Reading a STEP file produces invalid shape
2017-10-12 12:23:55 +03:00
abv
7f83633f7e 0029196: Tests - some test cases fail with Intel HD graphics
Test bugs vis bug26357 is revised to check colors in more robust way.
In tests bugs vis bug29091_*, size of produced file is checked to be within range of known valid sizes, rather than hard-coded (per-platform) exact sizes.
FPE signals are disabled for test bugs vis bug29127 to prevent exceptions cause by software OpenGl driver.

File data/occ/Box.brep is removed to avoid confusion with file box.brep in public data files used in tests.

Two additional non-alphabetic-order combinations of complex types are handled in RWStepAP214_ReadWriteModule.cxx
2017-10-12 12:23:18 +03:00
abv
9e4791171c 0029171: Foundation Classes - C signal handler does not work on MinGW
Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).

Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
2017-10-11 17:13:32 +03:00
kgv
022d142b24 0029158: Visualization - suspicious pass-through of case labels in switch statements
MeshVS_Mesh::ComputeSelection() - fixed incorrect fall-through
from MeshVS_SMF_Mesh to MeshVS_SMF_Group.
2017-10-11 17:11:59 +03:00
kgv
fc8918ad91 0029081: With Mingw-w64 Unicode Paths Do Not Work
OSD_OpenStream() now uses __gnu_cxx::stdio_filebuf extension for opening UNICODE files on MinGW when using C++ file streams.
Variant accepting filebuf returns bool (true if succeeded and false otherwise).

Checks of ofstream to be opened made via calls to low-level ofstream::rdbuf() are replaced by calls to ofstream::is_open(); state of the stream is also checked (to be good).
Unicode name used for test file in test bugs fclasses bug22125 is described (for possibility to check it).
2017-10-06 20:49:14 +03:00
kgv
cda06ac0e3 0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
OSD_File::myFileHandle/myIO pair is now switched within class definition
instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.

OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
has been merged within .cxx file and reformatted.
Resolved several inconsistences on handling invalid input
between WinAPI/non-WinAPI implementations.
NCollection_Array1 is now used in several places instead of
raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
TCollection_ExtendedString is used instead of StringCchCopyW.

Unused field OSD_Disk::myQuotaSize and not implemented methods OSD_Disk::*Quota*() have been removed.

Obsolete code fragment "for Visual Age compiler" is removed.
Macro __try is undefined before redefinition on MinGW to avoid warning.
2017-10-06 10:29:10 +03:00
apv
9026dea8d2 Update of tests database
Test for 0028167: Fillet has strange form at its end
Test for 0028168: Exception is raised during Boolean operation
Test for 0028194: BRepMesh - Standard_OutOfRange exception on valid shape
Test for 0028200: Invalid topology of the general fuse result
Test for 0028216: Intersection of a face and a solid is broken up leading to empty result of Boolean common operation
Test for 0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
Test for 0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong
Test for 0028274: BOPAlgo_MakerVolume fails to create solid
Test for 0028279: Greater oscillations and higher degree of resulting B-Spline in cylinder-cylinder intersections in 7.1.0
Test for 0028354: Filleting destroys shape if the filleted edge touches a seam edge
Test for 0028366: BOP Common fails with solid and planar face
Test for 0028379: BRepMesh produces mangled mesh for a cone
Test for 0028388: Boolean common of simple face and solid results in empty compound
Test for 0028393: Boolean cut produce wrong result.
Test for 0028402: Modeling - calculation of properties of complex compounds is slow
Test for 0028406: High tolerances after boolean operation on OCCT 6.9.1
Test for 0028694: IGES reader produces too small edge covered by its vertices
Test for 0028719: Mesh - Display issue for special model
Test for 0028108: Sweep fails in "Right Corner" mode
Test for 0028696: Offset 2D algorithm produces micro edges
Test for 0028700: BRepBuilderAPI_Sewing produces too small edge covered by its vertices
Test for 0028722: Conversion of a spherical face to a spline produces an invalid shape
Test for 0028739: Draft on face fails
Test for 0028662: Data Exchange - Exception during reading large STEP file.
Test for 0028768: ShapeFix slighly corrupts the source face
Test for 0028485: Fuse of two shapes using gluing and non-destructive options gives invalid result
Test for 0028500: Artifact in shaded view of the shape
Test for 0028523: Fixshape reverses the orientation of the face
Test for 0028544: Big tolerance value is returned by Implicit-parametric algorithm
Test for 0028571: BRepOffsetAPI_MakeOffset build invalid wire
Test for 0028572: Wrong result of the mkface command
Test for 0028595: Shifting 2d curves for non-periodic surfaces leads to incorrect result.
Test for 0028596: Erroneous fillet
Test for 0028640: BRepBuilderAPI_Transform build invalid shape
Test for 0028656: 3d offset modifies the input shape
Test for 0000077: BUC60866. The BRepFill_Pipe fails.
Test for 0000078: BUC60875. Pipe is created incorrectly on two wires.
Test for 0000082: BUC60908. Incomplete section of shell by plane.
Test for 0000083: BUC60912. Section of simple BSpline surfaces is performed too slow.
Test for 0000862: GeomAPI_ExtremaCurveCurve fails on given curves
Test for 0002442: Error in BRepClass3d_SolidClassifier
Test for 0003936: Face on a surface of extrusion is extended after import to IGES
Test for 0005081: BRepOffset_MakeOffsetShape algorithm does not return valid result.
Test for 0005145: Wrong result of projection of a circle on a sphere.
Test for 0014846: ShapeFix_Wireframe::FixWireGaps() works wrong on a shape with seam edge
Test for 0016424: Exception in reading of attached IGES file
Test for 0010377: Incorrect fuse result when objects tangent by planar face
Test for 0013565: Incorrect result of Common operation
Test for 0013566: Incorrect result of Extrema between a large circle and a line
Test for 0024632: Artifacts during Boolean cut operation on neighboring parts
Test for 0005582: Impossible to make offset on the shape with degenerated edge
2017-10-06 10:28:34 +03:00
emv
dcba2e5ce3 0029135: 3D Offset algorithm produces a NULL shape
UpdateValidEdges in BRepOffset_MakeOffset_1 - Perform the filtering of splits of the edges in two stages:
1. Separate filtering of the connected blocks using localized bounding edges taken only from the splits of offset faces from the block;
2. Combined treatment of the remaining splits using bounding edges from the splits of all offset faces.
2017-10-06 10:28:32 +03:00
abv
68beaa3c57 0029124: Visualization, Tests - failures when tests are executed via Remote Desktop connection
Protection against accessing null pointer is added in OpenGl_VertexBuffer::Create().
In command vreadpixel OpenGl-related warnings are redirected to cout so that they do not contaminate the command output.
Test grid caf presentation is configured to ignore OpenGl-related warning messages.
Tests in grid tools are configured to report status SKIPPED if tools are not available (OCCT is built without Qt).
2017-10-06 10:28:30 +03:00
anv
151da08bbe 0029117: Adding translation of Multileader entity
Scaling of width of glyphs is added om Font_FTFont class.
Font "SimSan" is specified as fallback alias for font "NSimSan" (contains Chinese hieroglyphs).
2017-10-06 10:28:28 +03:00
gka
2c25cc04e0 0029029: Exception Raised with no Result during reading file 2033zsh1_1.stp
Static function stepstrcmp() in StepData_StepReaderData.cxx is replaced by plain strcmp() to have the full strings compared (stepstrcmp() returned true if one of strings was longer than the other but common part was equal).
Protection is added to avoid exception for cases when representation entities are NULL
2017-10-06 10:28:25 +03:00
imn
385d47dde7 0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
When removing internal boundaries between faces of the same material do it once for the whole shape, and at this keep boundaries between areas with different material.
2017-10-06 10:28:23 +03:00
kgv
7c4ce93bab 0029184: Visualization - DrawWindow::Save() fails when using WinCodec with PNG codec
DrawWindow::Save() now uses Image_Format_BGR instead of Image_Format_BGR32
for better compatibility with image encoders when dumping WinAPI bitmap.
2017-10-06 10:28:21 +03:00
Zia ul Azam
fae1ae1182 0029109: Visualization, AIS_Trihedron - add option hiding arrows tips
Prs3d_DatumAspect::DrawDatumPart() now handles new flag ToDrawArrows().

vtrihedron - added new option -arrowTip.
Fixed misprint in command description -arrowscolor -> -arrowcolor.
2017-10-06 10:28:19 +03:00
ifv
f998596a10 0028909: Algorithm of BO is stuck while fusing shell and edges
Approximation parameters: degmin, degmax, max number of segments, boundary condition, maximal distance of projecting are added in interface of classes ProjLib_ProjectedCurve, ProjLib_ComputeApprox,
ProjLib_ComputeApproxOnPolarSurface
Algorithm of Approx/Approx_ComputeCLine is modified in order to treat maximal number of segments allowed for cutting.
Algorithm of method BOPTools_AlgoTools2D::MakePCurveOnFace(...) is modified in order to manage cases with big edge tolerances.
Test case added
Some test cases were modified according to new behavior of algorithms
2017-10-06 10:28:17 +03:00
nbv
23e8067c74 0029176: Exception while projection 2D-point on 2D-line
DRAW-command "2dproj" has been changed. Now, it can return not only 2D-line as extrema but 2D-point.

Test case has been updated.
2017-10-06 10:28:14 +03:00
abv
8157aa285b 0029160: Coding - AppleCLang 9 compiler warning "binding dereferenced null pointer to reference has undefined behavior"
Avoid returning reference to null in AppDef_MyLineTool
2017-10-06 10:28:12 +03:00
oan
00af0ebb9d 0028931: Eliminate dependency from TBB in OSD_Parallel header
Implementation of methods OSD_Parallel::For() and ForEach() is moved to CXX files to avoid direct dependency of client code that uses OSD_Parallel on TBB headers, and necessity to link with TBB explicitly.
Runtime polymorphism (virtual methods) is used to hide implementation (TBB or threads-based).
2017-10-06 10:28:10 +03:00
msv
b92bc5ab7c 0029159: Sewing fail when using a maximum tolerance
Force setting truly computed tolerance of the edge if BRepLib::SameParameter has put too large tolerance.
2017-10-06 10:28:08 +03:00
kgv
da2a6aee19 0029147: Visualization - D3DHost_FrameBuffer::BindBuffer() fails on some Intel drivers
D3DHost_FrameBuffer::BindBuffer() now implicitly detaches Depth+Stencil texture in case of driver failure.
D3DHost_View::d3dCreateRenderTarget() now does not request Depth+Stencil texture by default.
2017-10-06 10:28:06 +03:00
kgv
6cde53c431 0029138: Visualization - D3DHost_FrameBuffer should provide software fallback when WGL_NV_DX_interop is unavailable
D3DHost_FrameBuffer now provides fallback code copying OpenGL FBO content into D3D surface (slow).
OpenGl_FrameBuffer::BufferDump() - FBO dump implementation has been moved from OpenGl_Workspace::BufferDump().
2017-10-06 10:28:04 +03:00
kgv
c98fcb6456 0029137: Visualization - D3DHost_FrameBuffer does not release Depth texture and FBO index 2017-10-06 10:28:01 +03:00
abv
6a657c9247 0029170: GCC 7.1 warnings -Wstrict-aliasing in Graphic3d_ArrayOfPrimitives.hxx
Methods Graphic3d_ArrayOfPrimitives::SetVertexColor() accepting color as three double rgb values and Graphic3d_Vec4ub object are refactored to avoid using reinterpret_cast between pointers to complex types.

Similar correction is made in ViewerTest_ObjectCommands.cxx (static function VDrawSphere).
2017-10-06 10:27:59 +03:00
kgv
c85a994a37 0029169: Configuration - fix compilation with undefined UNICODE on Windows
Eliminated usage of TEXT macros, usage of OSVERSIONINFO instead of OSVERSIONINFOW.
LoadIcon/LoadCursor are now used instead of LoadIconW/LoadCursorW
when passing macros to standard resources (which depend on UNICODE flag).
2017-10-06 10:27:57 +03:00
abv
03d960b8de 0029165: Visualization - misuse of enumeration in Prs3d_DatumAspect
Methods SetDrawFirstAndSecondAxis() and SetDrawThirdAxis() of the class Prs3d_DatumAspect are corrected to ensure that myAxis may be set only to valid values of the enum, and avoid unsafe operations.
2017-10-05 13:18:15 +03:00
abv
9b372aa8ba 0029164: GCC 7.1 compiler warnings -Wmaybe-uninitialized in gp_XYZ and siblings
Code is corrected to avoid local variables of reference type pointing to fields of temporary objects.
2017-10-05 13:18:14 +03:00
abv
b1811c1d2b 0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
next label (i.e. does not end with "break" or "return" etc.).
This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.

The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.

Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
2017-10-04 15:28:02 +03:00
kgv
e2b4dea253 0029156: Coding Rules - eliminate deprecation compiler warnings when targeting macOS 10.12 2017-09-29 09:42:14 +03:00
kgv
b1c235dfce 0029062: Visualization, SelectMgr_ViewerSelector - add NULL-check within ::checkOverlap() method 2017-09-29 09:42:13 +03:00
anv
08b183fe0b 0028188: Improving layer color storage mechanism for DXF Import/Export
Attribute ColorByLayer was added for shapes that should be colored by the color of their layer or, if it's absent, by the parent component's layer color.

Fixing inconsistency of iterating through the map of Styles

Improving ColorByLayer mechanism

Fix for Map/IndexedMad differences.

Renaming according to convention of naming collection typedefs
2017-09-29 09:42:12 +03:00
ski
7fbc3bc5a4 0029118: Incorrect generation of reference documentation for modules
Generation of reference documentation for modules was corrected.
2017-09-29 09:42:11 +03:00
snn
a8a3b37c0d 0029119: Documentation for PMI in XCAF
Documentation is added to the XDE part of the User Guide for GD&T, Clipping planes and Saved view components.
2017-09-29 09:42:09 +03:00
nbv
6fd0eb0c1e 0028764: [Regression to 7.0] Intersection of faces gives exception in debug mode
Some point were incorrectly removed from the Walking-line.

In the current fix, new method IntWalk_PWalking::RemoveAPoint(...) has been added and implemented in order to provide safe removing.

So, now methods AddAPoint(...) and RemoveAPoint(...) are recommended to use for work with the Walking-line.
2017-09-29 09:42:08 +03:00