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

4357 Commits

Author SHA1 Message Date
kgv
9f013fee98 0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with Graphic3d_TOSM_UNLIT shading model
Prs3d_ShadingAspect::SetTransparency() now sets transparency also to interior color.
AIS_RubberBand now uses Graphic3d_TOSM_UNLIT.
2020-07-23 16:14:57 +03:00
akaftasev
6d8f9f4a49 0031353: TDocStd_Application does not have api to set progress indicator
Add support of Message_ProgressIndicator in BinTools classes.

Add support of Message_ProgressIndicator with possibility of user break in methods of opening and saving TDocStd_Application.

Add tests of ProgressIndicator in TDocStd_Applacation.
2020-07-23 16:08:23 +03:00
mkrylova
b011420f28 0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
Added a check for non-empty mesh and new warning
that notifies about skipping an empty node
2020-07-23 16:08:22 +03:00
mkrylova
d533dafb56 0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
Added initialization of fields that had not initialization
Added default constructors to classes without constructors
2020-07-23 16:08:20 +03:00
jgv
c28d4a89d4 0031617: Export STEP in nonmanifold mode corrupts the shape
Modify method XSControl_TransferWriter::TransferWriteShape: add removal of locations before writing the shape.
2020-07-23 16:08:19 +03:00
Benjamin Bihler
6531dfeacd 0031680: Configuration - Compilation Fails With G++ 10.1, LD 2.34 and Link-Time Optimization
Added a non-inline empty virtual destructor to LDOM_OSStream to force vtable generation in one
translation unit only.
2020-07-23 16:08:18 +03:00
kgv
dbc8becff4 0031673: Draw Harness, ViewerTest - command vlocation applies transformation in opposite order
gp_Trsf::SetRotationPart() - added method replacing rotation matrix without reseting other components,
similar to existing SetTraslationPart() and SetScaleFactor().

Transformation multiplication order has been fixed
for vlocation arguments -rotate, -translate, -mirror and -scale.
Added -prerotate, -pretranslate, -premirror and -prescale options following previous behavior.

vlocation -setRotation now uses new method gp_Trsf::SetRotationPart()
for consistency with methods -setLocation and -setScale.
2020-07-23 16:08:17 +03:00
kgv
99ee8f1a83 0031671: Coding Rules - eliminate warnings issued by clang 11
Fixed -Wdeprecated-copy warning by removing trivial operator=.
Fixed formatting issues in places producing -Wmisleading-indentation warning.
2020-07-23 16:08:17 +03:00
kgv
7465bfa65e 0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
OpenGl_Context now skips loading functions related to mapping buffer,
which are required by OpenGL ES 3.0 specs but not provided by WebGL 2.0.
Message_PrinterSystemLog does not use a broken emscripten_log() anymore, which corrupted UNICODE strings.

WasmOcctView::initWindow() - callbacks now set using EMSCRIPTEN_EVENT_TARGET_WINDOW
instead of 0 used by older Emscripten API.

Mouse callbacks now track canvas element and use
EmscriptenMouseEvent::targetX/targetY instead of ::canvasX/canvasY
as the latter was broken.

Added emscripten_set_main_loop() setup to shut up eglSwapInterval() error message.
Fixed missing \0 at the end of string converted by toUtf8Array().
2020-07-22 19:24:38 +03:00
azv
b939a13923 0031016: Projection of an ellipse is a B-spline in some cases
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
2020-07-20 16:57:29 +03:00
emv
529444be92 0031655: Modeling Algorithms - Invalid result of General Fuse operation
IntTools_BeanFaceIntersector: Perform exact intersection range search in case there are few intersection points.
2020-07-11 11:26:31 +03:00
mkrylova
210914d562 0030277: Coding Rules - avoid extremely long class names in STEP packages
Has changed the names of classes that are too long
and fixed names in files where these classes are used
2020-07-11 11:26:30 +03:00
akaftasev
3e85dfc5e5 0026555: Modeling Algorithms - Exception-safe status reporting in BRepOffset_MakeOffset
Set safe exit status for:
Standard_NullObject exception,
Standard_NullObject: BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt,
BRep_Tool: no parameter on edge,
BRepOffset_MakeOffset::TrimEdge no projection
2020-07-11 11:26:29 +03:00
akaftasev
3f54cc41a8 0027909: Modeling Algorithms - Exception during offset computation
Added function ChFi3d::IsTangentFaces for more accurate definition of connection type.
Test cases have been changed according to the current behavior.
2020-07-08 16:03:42 +03:00
ifv
e8e8b273bb 0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added;
Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added
Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added

BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved
ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero
math_PSOParticlesPool.cxx : initialization of array is added
2020-07-08 16:03:10 +03:00
emv
2a6b7c2306 0031604: Wrong result of Boolean Operation Cut
BOPAlgo_WireSplitter::Path - continue building the next loop with the last edge not included into found loop.
2020-07-08 16:03:10 +03:00
kgv
cdc54fb017 0031649: Visualization, TKOpenGL - broken skybox in VR output
OpenGl_ShaderManager::GetBgCubeMapProgram() and OpenGl_BackgroundArray::createCubeMapArray()
have been corrected to draw cube in straightforward way instead of a screen-quad.

Graphic3d_Camera::SetCustomStereoProjection() now recieves decomposed projection + head-to-eye matrices.
Added method Graphic3d_Camera::StereoProjection() returning projection matrix without translation part.
OpenGl_BackgroundArray::Render() now applies stereoscopic projection matrix in case of VR output,
but keeps using mono projection matrix in case of common 3D displays.
2020-07-08 15:53:32 +03:00
kgv
6d1d35e4b8 0031652: Visualization - crash on highlighting HLR Computed presentation displayed with Shaded display mode
PrsMgr_PresentationManager::displayImmediate() now uses proper ZLayer for a shadow presentation
of computed presentation (fixes dynamic highlighting on mouse move).
Graphic3d_CView::SetComputedMode() - added invalidation of bounding box on turning OFF compute mode.
AIS_ViewController::contextLazyMoveTo() now ignores MoveTo() while rotating
view with temporary disabled compute mode (leading to undefined results and crashes).

Graphic3d_Structure::Graphic3d_Structure() - do not copy Graphic3d_TOS_COMPUTED visual
from linked structure, as Graphic3d_CView::SetComputedMode() does not compute such structures.
2020-07-08 15:53:31 +03:00
kgv
72e9e86732 0031650: Visualization - invalid picking of object with local transformation and per-object clipping plane
SelectMgr_SelectingVolumeManager::SetViewClipping() now updates clipping range
using picking ray in world coordinates, as clipping planes are always defined in world space.
2020-07-06 18:31:14 +03:00
mzernova
3e9c1d1e5a 0029993: Visualization - AIS_TextLabel computes selection primitive only for attachment point
The text label is selected as a rectangle (adds a sensitive object - Select3D_SensitiveFace).
The bounding box has been resized to fit the sensitive rectangle.
Transform persistent has been added to AIS_TextLabel to correctly position the sensitive rectangle.
The findConnectedObject function has also been changed to correctly set transform persistence.
2020-07-06 18:31:13 +03:00
kgv
8f5760bc16 0031588: Visualization, TKOpenGl - display immediate updates in brackets within frame stats 2020-07-03 17:34:54 +03:00
emv
bea1065693 0031639: Modeling Algorithms - Offset algorithm incorrectly fills one of the holes
Check if unclassified edge may be added as neutral (invalid in one split, valid in other) by checking the SD faces in which the edge was classified.
2020-07-03 11:03:08 +03:00
kgv
dad7fede39 0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying edge in AIS_Shape
Fixed unexpected calling of PrsMgr_Presentation::Erase() from Graphic3d_Structure::SetVisual().
2020-07-03 11:03:07 +03:00
kgv
7e251883e1 0031643: Visualization - Graphic3d_Camera::Copy() raises exception on copying ZNear < 0.0
Graphic3d_Camera::CopyMappingData() now copies ProjectionType at first.
2020-07-03 11:03:06 +03:00
kgv
d6fbb2aba4 0031632: Draw Harness - handle 3d mouse Raw HID input on Windows
WNT_HIDSpaceMouse - added auxiliary class for processing 3d mouse Raw HID input.
AIS_ViewController::Update3dMouse() - added default processor for 3d mouse input event.
ViewerTest now redirects WM_INPUT to AIS_ViewController::Update3dMouse().
Aspect_VKey enumeration has been extended by 3D view buttons.
WNT_Window::RegisterRawInputDevices() has beend added as a small wrapper
over WinAPI RegisterRawInputDevices() for common HID input devices.

AIS_ViewCube now stores animation duration within AIS_AnimationCamera instead of dedicated duplicating class property.
2020-07-03 11:03:05 +03:00
ifv
79e9ba31d2 0031616: Modeling algorithm - Section between two shells returns wire with gaps (720)
Adaptor3d_TopolTool.cxx, IntTools_TopolTool.cxx:

Anisotropy of BSpline surface along U and V direction is taken in account for calculation of numbers of sample points;

bug31616: test case added
2020-07-01 17:50:56 +03:00
mzernova
832a6f4412 0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing
Fixed problem with misplacing background texture in Ray-Tracing.

An environment background is always drawn using a perspective matrix.
2020-06-26 15:07:40 +03:00
kgv
d22962e4e0 0031621: Draw Harness - handle navigation keys
AIS_ViewController::handleNavigationKeys() - added an interface for processing navigation keys.
ViewerTest_EventManager now maps WASD+Arrows navigation keys.
Axonometric view hotkey A has been replaced by Backspace.
Shaded/Wireframe are now mapped with hotkeys W+Ctrl/S+Ctrl.
Hotkey D (reset view to undefined default state) has been removed.
2020-06-25 19:24:58 +03:00
mzernova
2ff1d580f1 0031412: Visualization - entity behind is returned as topmost at the edges
SelectMgr_RectangularFrustum now handles degenerated triangle as a segment or a point.
Triangle orthogonal to view direction is now handled as a segment.
myViewRayDir field is now defined as normalized vector to avoid confusing math.

For the case when the segment and myViewRayDir are almost parallel,
the segmentSegmentDistance function may set the depth to zero, although this will not
be the correct value, therefore it is better to pass a segment that will not
be parallel to myViewRayDir as an argument to the function.

vpoint command has been extended by arguments -2d and -nosel
for displaying picking mouse position as on-screen point in pixels.
Fixed double-binding-map error in case of displaying point with already used name.

bugs/vis/bug31412: test case added.
2020-06-25 19:09:04 +03:00
kgv
08b7a39f75 0030939: Draw Harness, ViewerTest - AIS_ViewCube animation does not work on Linux and macOS
ViewerTest_EventManager::handleViewRedraw() now starts ViewerTest_ContinuousRedrawer
working thread to workaround Tcl event loop invalidation issue.
2020-06-25 19:09:02 +03:00
mpv
ef779ae0da 0031075: Application Framework - reading STEP file into TDocStd_Document leads to memory leaks
In the TDocStd_Owner keep simple pointer to TDocStd_Document instead of Handle. This causes automatic destruction of the document without explicit call of Close.
In Standard_Type added a static variable theType that initializes theRegistry map earlier. Otherwise exit from Draw interpreter crashes in many test-cases because not-closed transactions are aborted on document handle release from Draw theVariables map.

Corrected method for test OCC159bug due to the fact that Owner does not add a ref count now
Close the document in the end of bugs xde bug22776 otherwise double remove of visualization objects (on library exit and on visualization attributes remove from the document) causes crash on exit from draw
Added a new test bugs caf bug31075
2020-06-19 19:08:46 +03:00
ifv
003c363cf4 0031615: Coding - New warnings after integration fix for 0031552 2020-06-18 20:00:39 +03:00
ifv
dccf867561 0031602: [Regression vs 7.0.0] Modeling Algorithms - Invalid result of boolean operation
IntPatch/IntPatch_ImpImpIntersection_4.gxx : adding tolerance in comparison surface range and surface period
bug31602: test case added
2020-06-18 19:59:49 +03:00
ifv
5d904c3454 0031611: Modeling Algorithms - BRepOffsetAPI_NormalProjection - can't build wire in 720 but it was possible in 691
BRepLib_MakeWire.cxx:
in method BRepLib_BndBoxVertexSelector::Accept() accepting tolerance criterion is changed

BRepLib_MakeWire.hxx:
correctionof class field name

bug31611: test case added
2020-06-18 19:57:46 +03:00
jgv
36cc58f85d 0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE.
2020-06-10 20:41:40 +03:00
emv
09543c2d99 0031587: Modeling Data - add BRepTools::RemoveInternals() removing internal sub-shapes from the shape 2020-06-09 20:01:06 +03:00
kgv
a7400019ce 0031599: Visualization - when using AIS_Manipulator, the scene rotates at the same time
AIS_ViewController::HandleViewEvents() - reverted order of handleMoveTo() and handleCameraActions() events.
2020-06-09 19:53:08 +03:00
akaftasev
1fc1a207b0 0031504: Data Exchange - Wrong output of progress indicator when writing to stl
Added new condition for first indicated element at Draw_ProgressIndicator::Show(),
because it’s more logical that at start progress starts at 0
Changed usage of Next() to Next(step) for increment progress to IND_THRESHOLD in RWStl::writeASCII() and RWStl::writeBinary()
Changed condition for continuation of writing and add interrupt to this function
Added possibility to use Progress indicator in writestl
Changed paremeter in constructor Message_ProgressSentry aPS() IND_THRESHOLD to 1
Changed test
2020-06-09 19:53:08 +03:00
kgv
59ec2ccec9 0031596: Visualization, OpenGl_Context - take GL_OES_texture_float extension into account for arbTexFloat flag 2020-06-09 19:53:07 +03:00
kgv
d4cefcc0da 0031477: Visualization, TKOpenGl - fetch/wrap getBufferSubData() function from WebGL 2.0
Added OpenGl_Context::GetBufferSubData() implementing getBufferSubData() based on capabilities of various APIs.
Added OpenGl_VertexBuffer::GetSubData() similar to OpenGl_VertexBuffer::SubData().
2020-05-29 19:40:57 +03:00
kgv
872f98d9ef 0031583: Visualization, OpenGl_Context - load OpenGL ES 3.0 functions
OpenGl_Context now retrieves complete functions sets of OpenGL ES 3.0, 3.1 and 3.2.
2020-05-28 10:24:35 +03:00
vsv
2ba1172b73 0031573: Visualization - Do not show seam edge for shading presentation with boundary edges in VTK 2020-05-28 10:22:54 +03:00
kgv
e4e3254a35 0031580: Visualization, TKOpenGl - cubemap initialization error on OpenGL ES 2.0
OpenGl_Texture::InitCubeMap() now avoids using sized internal format in case of GLES2.
OpenGl_Sampler::applySamplerParams() now checks OpenGL version before setting GL_TEXTURE_WRAP_R.
2020-05-28 10:21:03 +03:00
mkrylova
04c5a696e4 0029917: Foundation Classes - OSD_FileNode AccessMoment and CreationMoment return the same date on Windows
fAccess in CreationMoment() function for Windows has been modified from TRUE to FALSE
2020-05-28 10:18:56 +03:00
ika
ae58f70718 0031568: Data Exchange - invalid model produced after STEP import
Add protection against reference to reference in STEP import.
2020-05-22 19:32:21 +03:00
kgv
faff37677c 0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format when supported by GPU
Graphic3d_TextureRoot::GetCompressedImage() - added new interface for fetching compressed texture image.
Default implementation detects DDS image files using Image_DDSParser parser.

Graphic3d_TextureRoot::GetImage() has been extended with new parameter
- the list of image formats supported by OpenGL driver.
Graphic3d_TextureRoot::convertToCompatible() implicitly converts
BGRA image to RGBA on OpenGL ES, which normally does not support BGR formats.

OpenGl_Caps::isTopDownTextureUV - new property defines how application defines
UV texture coordinates in primitive arrays.
OpenGl_Context::SetTextureMatrix() compares this flag with OpenGl_Texture::IsTopDown()
and automatically flips V coordinate in case of mismatch.

OpenGl_Texture now holds exact number of mipmap levels
instead of Boolean flag indicating that they are defined.
This allows loading DDS files with incomplete mipmap level set
by setting GL_TEXTURE_MAX_LEVEL to appropriate value instead of default 1000
(causing black textures in case if mipmap levels are not defined till 1x1).

Fixed order of texture coordinates transformation within GLSL program to match FFP matrix:
Rotate -> Translate -> Scale (previously Rotation was applied afterwards).
2020-05-22 11:08:34 +03:00
Igor Khozhanov
691711cd3e 0031550: Data Exchange, STEP Import - surface transparency is ignored (SURFACE_STYLE_TRANSPARENT)
Implemented reading and writing transparency to/from step files
2020-05-22 11:07:37 +03:00
ifv
8189cc72d0 0028229: BRep_Builder::Transfert must not raise exception if the input edge is Locked
BRep/BRep_Builder.cxx : raising exception is removed
2020-05-22 11:07:36 +03:00
jgv
c6f14a5213 0031558: BRepOffsetAPI_MakeFilling algorithm makes turned inside out face
1. Modification in method BRepFill_Filling::Build - correction of building the wire.
2. Create new subgroup "filling" in the group "bugs".
2020-05-22 11:07:35 +03:00
vsv
4db6748cc5 0031544: Visualization - show boundaries of faces in shading mode of VTK presentation 2020-05-15 18:39:31 +03:00