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

5769 Commits

Author SHA1 Message Date
mkrylova
9dd8af261f 0032281: Visualization - add Select3D_SensitiveCylinder
- implemented Select3D_SensitiveCylinder class performing an analytical intersection with an untriangulated cone/cylinder
- added tests
2021-08-27 19:09:09 +03:00
kgv
8a77384b0c 0032403: Visualization - RayTracing renders all object as white color in view with white background
OpenGl_Caps::buffersOpaqueAlpha is now set to TRUE by default.
OpenGl_View::runPathtrace - fixed higlighting with PathTracing turned on and buffersOpaqueAlpha=true.
2021-08-27 19:08:14 +03:00
msv
45d498ef1f 0031514: Foundation Classes - Add Base64 encoding function
The class FSD_Base64Decoder has been renamed to FSD_Base64.
The new method FSD_Base64::Encode has been added.
The method Decode has been improved for performance.
2021-08-27 19:08:14 +03:00
dpasukhi
da80ff68f1 0031382: Data Exchange - BinXCAF should preserve length unit information
Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
2021-08-20 20:30:11 +03:00
ifv
9592ae247b 0027457: Modeling - Raise exception if scaled transformation is used for shape location
Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.
2021-08-20 20:18:06 +03:00
kgv
91428b468b 0032536: Configuration - extend adm/scripts with USE_DRACO option 2021-08-14 18:00:19 +03:00
knosulko
7b5f784419 0026979: Parabola curve intersection with variety of surfaces produces incorrect results.
Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola.
Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method.
2021-08-13 20:43:47 +03:00
abulyche
715fcb5a92 0027884: Modeling Algorithms - Possible improvement for 2d classifier
Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d
Added the speedup for 2d classification to BRepClass_Intersector.cxx
Added the test for our improvement
2021-08-13 20:22:41 +03:00
kgv
fceeb82917 0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to OpenGL 4.5 specs violation
OpenGl_GlCore45 - removed a couple of FFP-related functions introduced by OpenGL 4.5 Compatible Profile, but not Core Profile.

OpenGl_GlFunctions::load() now tries to load a set of functions
from GL_ARB_robustness extension (having ARB suffix) to fill OpenGL 4.5 function table,
and from GL_ARB_indirect_parameters extension to fill missing items in OpenGL 4.6 function table on Intel drivers.
Warning message (trace level) is now reported instead of error in case of fallback usage.
2021-08-12 19:15:44 +03:00
kgv
11c23250dc 0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part
Added RWGltf_CafWriter::ToMergeFaces() property disabled by default.
RWMesh_MaterialMap - fixed creation of texture folder within working dir ".".
XCAFDoc_VisMaterial::FillMaterialAspect() - added clamping of too small shininess values.

Added options -mergefaces and -splitindices16 to WriteGltf for new feature.
Added -systemCoordSys option to WriteGltf for consistency with WriteObj.
2021-08-12 19:12:23 +03:00
kgv
fd42e7645d 0032527: Data Exchange, RWGltf_CafWriter - make name format configurable
Added properties RWGltf_CafWriter::NodeNameFormat() and ::MeshNameFormat().
2021-08-12 19:07:52 +03:00
kgv
d9d75a845f 0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression
Added new optional dependency - Draco library.
RWGltf_GltfJsonParser now detects KHR_draco_mesh_compression extension,
marks accessor being compressed and redirects to compressed buffer view.
RWGltf_TriangulationReader now handles decoding of buffer view compressed using Draco.

env.bat template for genproj has been modified to allow specifying dedicated folders
with debug versions of libraries (CSF_OPT_LIB64D / CSF_OPT_BIN64D) within custom.bat.
Removed unused CSF_FREETYPE from TKOpenGl.
2021-08-12 19:03:55 +03:00
kgv
aeef9e2c13 0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials
RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial()
now reset matallic factor to 0.0f in case of transparent color.
2021-08-12 18:59:54 +03:00
achesnok
45fc824bac 0031220: Visualization - remove internal field of viewer selector in context
- Removed myMainSel field from AIS_InteractiveContext and obtained this value from mgrSelector.
- Moved SelectMgr_ViewerSelector3d implementation into SelectMgr_ViewerSelector to get rid of redundant separation and extra DownCast's.
- Declared SelectMgr_ViewerSelector3d as deprecated.
2021-08-12 18:57:05 +03:00
kgv
f227f3dc96 0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect
ViewerTest_ContinuousRedrawer now explicitly invalidates V3d_View content
in addition to emitting window content redrawing request.

"vrepaint -continuous" now tries to avoid creation of dedicated thread
on Windows platform and relies on AIS_ViewController::SetContinuousRedraw().
2021-08-12 18:53:12 +03:00
achesnok
1b5eb2be23 0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron
- Made class Graphic3d_AxisAspect publicly nested in Graphic3d_GraduatedTrihedron.
- Removed public PtrView field from trihedron and obtained it from OpenGL_Workspace while rendering.
- Made CubicAxesCallback protected and provided corresponding getter/setter.
- Renamed AxisAspect() to AxisAspectAt().
2021-08-09 19:14:26 +03:00
mkrylova
27e64adb38 0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams
- provided OSD_FileSystem::OpenOStream() for output streams
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-08-04 20:13:20 +03:00
kgv
e93008abdd 0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer() 2021-08-04 20:11:27 +03:00
jgv
1a75fcddae 0032470: Modeling Algorithms - BOP wrong result on sphere and box
Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point.
2021-08-04 20:08:52 +03:00
kgv
286e9f13f3 0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrapping textured FBO
OpenGl_FrameBuffer::InitWrapper() now reads viewport from GL_VIEWPORT
and doesn't return error on GL_TEXTURE attachments.
OpenGl_FrameBuffer::Release() assertion is now skipped for wrapped FBOs.
2021-08-01 12:34:41 +03:00
kgv
32f86ef5a3 0032506: Visualization - add AIS_InteractiveContext::ObjectIterator() for iterating over objects in context 2021-07-31 13:14:05 +03:00
kgv
6054db8a29 0032482: Visualization - Object owner isn't removed from picked owner when object is removed
SelectMgr_ViewerSelector::RemoveSelectableObject() now removes object from picking results.
2021-07-31 13:11:27 +03:00
asuraven
bec59435e0 0032492: Coding - New warnings after integration fix for 27814 2021-07-27 14:51:05 +03:00
nds
4e993e4d0d 0027919: Visualization - support multiple transformation persistence groups within single presentation
Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
2021-07-23 18:31:51 +03:00
mkrylova
ad3f20c684 0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
2021-07-23 18:28:23 +03:00
asuraven
000c21fa0c 0027814: Parallelize BRepCheck_Analyzer
Change BRepCheck_Analyzer::Perform algorithm from recursion to 'for' loop
Add parallelization to BRepCheck_Analyzer::Perform
Add '-parallel' option to checkshape command to use parallelization. Default mode is single-thread.

mutex as Handle
2021-07-23 18:15:55 +03:00
oan
f1c034f905 0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.
2021-07-23 18:15:55 +03:00
mkrylova
a3b2aaefac 0032183: Visualization - implement AIS_LightSource::ProcessDragging() for rotating directional light
- Added sensitive sphere for a light source
- Implemented AIS_LightSource::ProcessDragging() interface for rotating directional light source
- Added possibility to turn on/off directional light source dragging
- Added test
2021-07-23 11:28:42 +03:00
emv
b7344f5d72 0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to decrease number of static methods
Refactoring of the BRepOffset_MakeOffset_1.cxx - Introduce local class BRepOffset_BuildOffsetFaces to compute splits of offset faces.

Change of tests is caused by the correction of the misprint in the code (incorrect input parameter for CheckEdgesCreatedByVertex method).
2021-07-23 11:28:42 +03:00
kgv
acab849d30 0032479: Application Framework - unnecessary API break within TDocStd_Application::Open()
Added aliases to Open() without theFilter argument for compatibility with old API.
2021-07-15 20:09:58 +03:00
oan
9ee9e5ec34 0032424: [Regression] Mesh - Slow triangulation of a simple shape.
Check links produced by splitting of an initial link by the middle point for MinSize requirement.
2021-07-15 20:05:10 +03:00
kgv
06d40093b7 0032121: Draw Harness, ViewerTest - implement -reset option for vlight command
vlight command has been revised to provide more friendly syntax.
Command now accepts light index or name as first argument.
Added arguments -enable/-disable for managing enabled state.
Added argument -reset to reset light parameters to default values.

V3d_Viewer::SetDefaultLights() now sets names "headlight" and "ambient" to created lights.
Graphic3d_TypeOfLightSource enumeration values have been renamed to avoid shortcuts.
Draw::Atof(), applied corrections to avoid explicit new/delete calls.
2021-07-12 20:50:25 +03:00
abulyche
cb7f92396f 0031047: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result
Added map of edges to BrepClass_Edge
Added searching of vertices with high tolerance to BrepClass_Intersector.cxx
Added check for hitting a vertex with high tolerance
Added the creation of a segment for the correct work of the classifier
2021-07-09 19:16:14 +03:00
kgv
7b17aba789 0032473: Visualization, WNT_Window::ProcessMessage() - handle WM_TOUCH
WNT_Window::ProcessMessage() now redirects WM_TOUCH events to AIS_ViewController,
so that it is possible to use multitouch displays in Draw Harness on Windows platform.

_WIN32_WINNT in CMake configuration for MinGW has been raised from 0x0501 to 0x0601.
2021-07-09 19:14:39 +03:00
kgv
0f04bd99d0 0032475: Configuration, qmake - drop "-z defs" linker flag on macOS 2021-07-09 19:14:00 +03:00
jgv
d1b591e580 0031890: Modeling Algorithms - Invalid result of common fuse BOP. Intersection has failed.
Modify the method BOPTools_AlgoTools3D::DoSplitSEAMOnFace: correct processing closed non-periodic surfaces.
2021-07-09 19:14:00 +03:00
mpv
d5c71e2057 0031918: Application Framework - New binary format for fast reading part of OCAF document
Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version.

Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read:
- into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite
- only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead)
- only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example
- to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example

The current limitations:
- only in Bin format
- if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore

Modifications:
BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class.
PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings.
TDocStd, CDF and some other packages are changed for supporting reading filters API and options.

Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.
2021-07-09 19:13:59 +03:00
kgv
9e5e4c0c84 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON - part 2 2021-07-06 16:46:31 +03:00
mkrylova
1f3c5058f2 0032389: Visualization, AIS_Axis - simple ray creation and displaying
- Added constructor to create axis by gp_Ax1
- Added possibility to display axis as ray
- Added function SetDisplayAspect to set required visualization parameters
2021-07-01 22:27:46 +03:00
mkrylova
9749af25ae 0032441: Draw Harness - command readstl doesn't print error message on failure
- added producing error message when passing an invalid file path
2021-07-01 22:26:10 +03:00
kgv
0770d850d6 0032465: Visualization, TKOpenGles - invalid enum on GL_RGBA16F initialization in Edge 92
GL_HALF_FLOAT_OES from OpenGL ES 2.0 extension
is now avoided within OpenGL ES 3.0+ context in favor of GL_HALF_FLOAT.

emscripten_webgl_enable_extension() is now called for all extensions
checked by OpenGl_Context::CheckExtension().
So far this doesn't solve any problem, but looks more logical and provisional.
2021-06-28 23:01:11 +03:00
kgv
16222b8cd2 0032463: Visualization - implement Image_AlienPixMap::Load() via emscripten_get_preloaded_image_data() 2021-06-27 17:32:27 +03:00
kgv
73dee81133 0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
2021-06-24 23:47:45 +03:00
mkrylova
503374ad84 0032182: Visualization - add Select3D_SensitiveSphere
- created Select3D_SensitiveSphere class
- implemented interfaces for intersection methods
- added tests
2021-06-24 19:52:25 +03:00
kgv
c123c310df 0032459: Draw Harness, ViewerTest - fix description of vrenderparams -oit 2021-06-24 19:50:48 +03:00
kgv
91836c86eb 0032458: Draw Harness, ViewerTest - fix misprint in vaspects -drawSilhouette 2021-06-24 19:49:35 +03:00
asuraven
c9337e33a6 0029059: It is necessary to have a unique way of checking of the validity of the edge and its 2D curves
Add new class BRepLib_ValidateEdge to use for edge checking instead of functions:
- Validate() from BOPTools_AlgoTools.cxx
- Validate() from BRepCheck_Edge.cxx
- ShapeAnalysis_Edge::ComputeDeviation()
2021-06-24 19:47:49 +03:00
osa
51d4a4f9d0 0032390: Visualization, SelectMgr_FrustumBuilder - use camera instead of duplicated methods
Fix incorrect value of axis intersection with segment inside of SelectMgr_AxisIntersector::raySegmentDistance().
Move camera definition to base intersector (it is not possible to set it for axis intersector, is is not applicable).
Add method Graphic3d_Camera::SetIdentityOrientation() to set camera parameters to make current orientation matrix identity one.
Remove all matrices from selection intersectors and frustum builder and use camera instead of them.
Fix missed axis tests in vselect grid.
2021-06-22 11:17:39 +03:00
kgv
4db6d89bc6 0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspector:BOOL=ON 2021-06-18 18:36:57 +03:00
kgv
690757a382 0032453: Documentation - nested multiline comments within BOPAlgo_CellsBuilder.hxx destroy Java wrapping 2021-06-18 18:35:43 +03:00