1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

81 Commits

Author SHA1 Message Date
luzpaz
f423143109
Documentation - Fix various typos found in codebase #361
Found via `codespell -q 3 -S "*.fr" -L aadd,abnd,abord,acount,adn,afile,aline,alo,alocation,alog,als,anc,ane,anid,anormal,anout,ans,anumber,aother,aparent,apoints,aprogram,asender,asign,asnd,ba,bbuild,bloc,bord,bu,caf,cas,childrens,childs,classe,clen,commun,cylindre,don,dout,dum,ede,entites,fo,fonction,guid,hist,identic,ii,indx,inout,invalide,ist,iterm,llength,lod,mape,modeling,methode,mye,myu,nam,nd,nin,normale,normales,ons,parametre,parametres,periode,pres,reste,resul,secont,serie,shs,slin,som,somme,syntaxe,sur,te,thei,theis,ther,theres,thes,thev,thex,thet,tol,transfert,va,vas,verifie,vertexes,weight`
2025-02-11 12:38:56 +00:00
luzpaz
7e3d063cae
Documentation - Fix various typos found in codebase #350 2025-02-08 09:44:51 +00:00
Zernova Marina
a1d887e0c4
Data Exchange - Fix GLTF Export for vertices and edges #348
Only free vertices and edges are exported now
2025-02-07 16:06:47 +00:00
Zernova Marina
85b40aba2a
Data Exchange, GLTF Import - Fix visualization of colors #347
Fixed issue with material color space
2025-02-07 10:13:54 +00:00
Zernova Marina
6c77143364
Data Exchange - Fix GLTF Export Materials for edges #341
Fixed issue with edge colors
2025-02-04 09:22:45 +00:00
Pasukhin Dmitry
1f386af59f
Coding - Update method guards for consistency #333
Apply new regex replacement with method's guards in .cxx
Update GH workflow with style checking
2025-02-03 11:16:00 +00:00
mzernova
b9429d0708 GLTF Import - Edge and Vertex support #242
Added functionality to import Points and Lines from GLTF format
2025-02-02 21:30:21 +00:00
mzernova
174b985fd5 GLTF Export - Edge and Vertex support #243
Added functionality to export TopoDS_Vertex and TopoDS_Edge to GLTF format
2025-02-02 21:25:53 +00:00
dpasukhi
a5a7b3185b Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
  It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
2025-01-26 00:43:57 +00:00
Elias Cohenca
bb84ecf5c6
Coding - Fix draco buffer index out of bounds
Fixed an exception where the bufferIndex is out of bounds.
Happens when Draco compression is combined with SetMergeFaces.
2025-01-23 00:25:08 +00:00
dpasukhi
1083052cc2 Coding - Separate DE Wrapper's plugins to own packages #260
Reorganize DE Wrapper classes to have single style and logic.
Each TKDE* will have own DE*_Provider and DE*_ConfigurationNode
DE* package will have all necessary classes and enums inside instead of another places.
2025-01-17 15:29:17 +00:00
dpasukhi
f91655b0c5 Coding - Isolate long attached comments for clang-format #259
Automatically update code with clang-format disabling for avoiding formatting.
You can check the python script in GitHub PR
2025-01-16 20:15:29 +00:00
dpasukhi
25906563a3 Coding, GLTF - Isolate RapidJSon part #192
Regression after #184 where some methods are not isolated.
2024-12-14 13:06:32 +00:00
dkulikov
bbbb8ea79d GLTF Import - Metadata support #184
Limited support of metadata import is added to RWGltf_GltfJsonParser.
Following Json data types are currently supported: int32, double, string,
array of int32, array of double, array of strings, Json object.
Notable unsupported types are: binary data, array of Json objects.
Metadata is processed for nodes and meshes.
Tests "gltf_export" are updated with import testing and renamed to "gltf".

Method RWGltf_GltfJsonParser::gltfParseSceneNode() is slightly
refactored: parsing of transformations and transformation matrices is
moved into separate functions.
2024-12-10 17:05:38 +00:00
dpasukhi
604c3b890c Documentation - Update parameter annotations for consistency #161
Reorganized style for param to the next templates:
 - "@param theParameter description ..."
 - "@param[in] theParameter description ..."
 - "@param[out] theParameter description ..."
 - "@param[in][out] theParameter description ..."
 The replacement was with keeping spacing, no removing of extra spaces.
In some files '/' was used instead of '@', that was not updated yet.
2024-11-17 20:22:51 +00:00
dpasukhi
858709699a Coding - Non-dependency include update #89
Removed or reorganized include that are not a part of the project dependency.
The new file for typedef is added because Select is not direct dependency.
2024-10-07 21:57:14 +00:00
ika
5cc7cbea8b Data Exchange, Gltf Export - Metadata support #79
Add supporting of metadata key-value export into extras section of each node.
2024-09-30 16:04:12 +00:00
anv
d8a26498d2 0033813: Data Exchange - Implementing common logic for scaling during Write procedure
Implementation of common logic for OCCT formats.
2024-09-26 11:28:15 +00:00
ichesnok
0435edfe54 0033474: Data Exchange - Implement stream reading into RWMesh interface
Stream usage as parameter
2023-12-04 15:53:05 +00:00
dpasukhi
bd651bbbd9 0033531: Configuration - Rework DataExchange ToolKits organization
Integrated DE plugin functionality.
Reworked DE components:
 - TKDESTEP: Handling STEP file format.
 - TKDEOBJ: Handling OBJ file format.
 - TKDEIGES: Handling IGES file format.
 - TKDEGLTF: Handling GLTF file format.
 - TKDEVRML: Handling VRML file format.
 - TKDEPLY: Handling PLY file format.
 - TKDESTL: Handling STL file format.
Reworked DE DRAW components:
  TKXSDRAWSTEP: Container for DE command to work with STEP.
  TKXSDRAWOBJ: Container for DE command to work with OBJ.
  TKXSDRAWIGES: Container for DE command to work with IGES.
  TKXSDRAWGLTF: Container for DE command to work with GLTF.
  TKXSDRAWVRML: Container for DE command to work with VRML.
  TKXSDRAWPLY: Container for DE command to work with PLY.
  TKXSDRAWSTL: Container for DE command to work with STL.
TKXSDRAW rework to be base DRAW plugin to keep DE session and utils.
Updated documentation
Updated samples
2023-12-04 15:52:47 +00:00
dpasukhi
1103eb60af 0033370: Foundation Classes - Moving into STL and Boost functionality
NCollection containers update:
  - NCollection_Array1 - updated functionality
  - NCollection_Array2 - NCollection_Array1 as a wrapper for 2array
  - NCollection_Vector -> NCollection_DynamicArray was renamed and reworked.
TCollection:
  - Use static empty string to avoid allocations on empty string
 NCollection allocators update:
  - NCollection_Allocator - allocator that used Standard::Allocate
  - NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects
  - NCollection_IncAllocator - rework to increase performance
Standard:
  - Rework functionality to use different allocation libs
  - Implement basic of new way to wrap allocations tools
  - Define 4 ways to allocation (defines in configure stage)
 Additional changes:
  - Hash function uses std::hash functionality
   - size_t as a hash value
  - New HashUtils with Murmur and FVN hash algo for x32 and x64
  - Deprecated _0.cxx and .gxx DE classes reorganized
  - Create own utility for std memory
  - Update Standard_Transient to be more platform-independent
 Math TK changes:
  - math_Vector -> match_BaseVector<>
    - Buffer decreased to cash 32 elements instead of 512
2023-12-04 13:37:09 +00:00
dpasukhi
92e0a76a50 0033379: Coding - Processing Clang-15 warnings
Fixed warning generated by Clang++-15
2023-05-19 19:34:37 +01:00
dpasukhi
b2fedee6a1 0033375: Coding - Static Analyzing processing. Performance
Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)
2023-05-19 19:33:59 +01:00
dpasukhi
669e0dfc17 0033246: Data Exchange, DE Wrapper - Checking license leads to performance problem
ReWork UpdateLoad functionality:
UpdateLoad calls only if provider is found.
UpdateLoad calls only for chosen type of translation (read/write)
Add new method to UpdateLoad all registered nodes.
2022-12-10 14:02:56 +00:00
ichesnok
f74f684b16 0032979: Data Exchange, RWGltf_CafWriter - support multi-threaded Draco compression
'MultiThread' field was added to structure RWGltf_DracoParameters for using multithreading.
Class CafWriter_DracoEncodingFunctor was added for multithreaded compression.
2022-08-12 19:04:03 +03:00
kgv
617a2905a9 0033073: Coding Rules, RWGltf_CafWriter - suppress CLang warning coming from Draco library 2022-07-22 20:29:08 +03:00
kgv
9db675b3d6 0033056: Visualization - add front face culling option
Added Graphic3d_TypeOfBackfacingModel_FrontCulled enumeration value.
OpenGl_Context::SetFaceCulling() now supports GL_FRONT in addition to GL_BACK.

Added -faceCulling option to vaspects Draw command.
2022-07-07 19:27:17 +03:00
kgv
dee5eb82b5 0033054: Configuration - link errors due to missing references to new TKXDE toolkit
src/OS/DataExchange.tcl - added missing new toolkits.
TKRWMesh - added missing reference to TKTopAlgo (for using BRepLib_PointCloudShape).
Removed redundant dependency from TKBinXCAF.
DRAWEXE - added missing references for a static build.

THE_CONFIGURATION_SCOPE definition has been corrected to postpoine calling constructor till the first variable usage.
Fixed compiler warning at SelectMgr_Frustum<3>::DumpJson() due to misleading Standard_EXPORT for an inline template method definition.
2022-07-07 19:23:00 +03:00
ichesnok
3a2ca49b6d 0032867: Data Exchange - Implement Draco compression for writing glTF
Draco compression added in RWGltf_CafWriter class.
2022-07-06 19:15:56 +03:00
atychini
6d1a049be7 0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files
Implementing DE_Wrapper and its formats
2022-06-23 20:29:00 +03:00
aml
a1f027b66e 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] 2022-06-15 20:41:12 +03:00
kgv
e9c43fee29 0032989: Data Exchange, RWGltf_CafReader - fill in metadata map from asset.extras 2022-05-31 19:26:25 +03:00
ddzama
e455c54bf0 0032918: Coding Rules - suppress MSVS warnings from 3rdparty rapidjson on VS2019/C++20
Microsoft Visual Studio Professional 2019
Version 16.11.11
std=c++20

Disable warning messages, occures in rapidjson library.
2022-04-08 19:02:14 +03:00
kgv
e3dae4a9f3 0032723: Draw Harness, ViewerTest - sloppy animation in WebGL
Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout().
ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView()
before previous one has been processed (leading to multiplying of pending redraws executed at the same time).
RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings.
2021-12-10 01:23:40 +03:00
kgv
65acdce54c 0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers
Removed usage of std::auto_ptr.
opencascade::std workarounds for VS2008 have been dropped, when possible.
OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
2021-12-03 17:56:37 +03:00
aml
a81bd74a38 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] 2021-11-22 18:58:00 +03:00
kgv
2b40ee81d1 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer()
Added missing break.
Fixes reading of glTF files with Normal attributes preceding Position
(and eliminates redundant / erroneous copy when Position attributes precede Normal).
2021-11-21 12:42:08 +03:00
kgv
16f9b46dbb 0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds
RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes
(allow flattering only of Mesh nodes).

Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming().
Added comparisons with reference Xdump data to glTF tests.
2021-10-12 20:08:57 +03:00
kgv
3be25c1170 0032585: Data Exchange, RWGltf_CafWriter - include OCCT version 2021-09-24 18:34:45 +03:00
kgv
8a17a8bb45 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory
First scene is now loaded when default one is undefined.
2021-09-10 20:24:52 +03:00
kgv
35ad04e78b 0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
RWGltf_CafWriter has been fixed to write shared Faces having a different style.
RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face
from the same primitive array definition.

RWGltf_CafReader - improved name generation.
2021-09-10 20:22:59 +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
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
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