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

80 Commits

Author SHA1 Message Date
Pasukhin Dmitry
bd77f8af4a
Coding - Refactor ShapeHealingMap to NCollection #346
Update container type to OCCT to avoid allocation on creating.
Refactor shape processing parameter handling to use XSAlgo_ShapeProcessor for consistency.
2025-02-08 21:01:14 +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
dpasukhi
a0401c7872 Data Exchange - Clear up Step from Static_Interface #283
Remove unused Interface_Static includes
Update SchemaName method signatures
2025-01-24 09:51:15 +00:00
dpasukhi
1e0d8c3f1e Data Exchange - DE Wrapper Shape Healing Parameters #282
Propagate shape healing parameters to STP and IGES nodes.
Update naming to avoid misunderstanding.
2025-01-24 00:20:14 +00:00
dkulikov
f5a02d2b0c Data Exchange - Update Readers with ShapeHealing parameters #247
All instances of using XSAlgo_AlgoContainer are replaced with
XSAlgo_ShapeProcessor.

Parameters for XSAlgo_ShapeProcessor operations are now can be passes
via the updated interface of respective classes.

Staqtic function to read processing parameters from file is added to
XSAlgo_ShapeProcessor.
2025-01-23 22:51:31 +01:00
dpasukhi
6222d1b1f0 Coding - Move StepData_ConfParameters to DESTEP package #261
Replace StepData_ConfParameters with DESTEP_Parameters across multiple files.
New location will help to keep any translate related stuff in one place for high level usage.
2025-01-17 15:48:38 +00:00
abv
5939991070 0025415: Data Exchange - Invalid result of loading a STEP file
Handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system):
edge curve is line displaced from its true position but with correct direction;
we shift the line in this case so that it passes through vertices correcty.

Protection against possible exception in writing XDE.
2024-03-13 17:17:45 +00:00
ichesnok
b9fbc699b5 0033483: Data Exchange - Static_Interface local instance for the model
StepData_StepParameters class created and used instead of Interface_Static
2023-12-04 15:53:06 +00:00
anv
2b5ee7c791 0033484: Data Exchange, Step Import - Pretessellated geometry is translated incompletely
Added proper translation for TessellatedCurveSet and ComplexTriangulatedSurfaceSet.
2023-09-22 05:57:01 +01:00
ichesnok
28b505b27b 0033351: Data Exchange, Step - Improvement for thread safety of the STEP translator
Local StepData_Factors object usage for each session
Static variables isolated
2023-09-08 11:28:53 +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
47263fa6a3 0033317: Data Exchange, Step Export - Ignoring color attached to the reference shape label
Fixed problem with pure referencing.
  To export reference label to step we convert it to the assembly with one part.
  All attributes attached to the label should be moved to the new part.
  For working with it new map contains only pure reference labels, that converted to the part
  was implemented to the STEPCAFControl_Writer.
Updated code style of the STEPCAFControl_Writer
Improved ability to export labels from different documents
Removed OCCT_Debug macros to print in Trace gravity
2023-02-04 09:18:29 +00:00
mahaidong
3e06b70623 0032350: Data Exchange - STEPControl_Writer.writeStream(std::ostream)
STEPCAFControl_Writer::WriteStream(), STEPControl_Writer::WriteStream() - added interface for writing into stream.
STEPCAFControl_Reader::ReadStream() - added stream reading method (similar to STEPControl_Reader::ReadStream()).

Added option -stream to commands ReadStep, WriteStep, and testwritestep.
2022-10-31 19:18:08 +03:00
aml
b1970c8a47 0033022: Coding - get rid of unused headers [ShapeBuild to STEPControl] 2022-06-22 19:26:41 +03:00
aml
034d1403b1 0032953: Coding - add missing references where applicable 2022-05-04 21:08:16 +03:00
msv
87b7b496ec 0032679: Data Exchange - STEP writer loses assembly instance name
In STEPCAFControl_Writer::WriteNames, write the names of components
even if the name of the assembly is absent.

In STEPControl_ActorWrite::TransferSubShape, move assembly structure
information to the beginning of the list of results, so that CDSR
information of this assembly became preceding CDSR of any sub shapes.
2021-11-25 00:35:25 +03:00
ichesnok
62874fa199 0032096: Data Exchange - Extension for XCAFDimTolObjects_DimensionQualifier
Added XCAFDimTolObjects_AngularQualifier for angles. And added field and methods for dimensions.
2021-11-21 12:42:08 +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
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +03:00
dpasukhi
692decba26 0031825: Data Exchange, STEP - NULL dereference while re-exporting model with empty Datum description
Fix adding name and description of the datum
2020-10-23 19:54:58 +03:00
abv
ae9f4b64ca 0031851: Data Exchange, STEP - enable Unicode symbols in STEP export
Class STEPCAFControl_Writer is corrected to avoid replacing non-Ascii symbols by question marks, and spaces by underscores, on export to STEP.

Related: DRAW commands dealing with strings in OCAF documents are corrected to pass Unicode symbols as UTF-8.

Off-topic: code saving names of external STEP files in XDE and fetching them back is corrected to preserve Unicode symbols as UTF-8.

Added test bugs xde bug31851

Test de step_4 E7 corrected (no more replacement of spaces by underscores in names of layers)
2020-10-14 19:28:58 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
kgv
148820b2a9 0031689: Coding Rules - including STEPCAFControl_Writer.hxx produces compilation error
Added missing #include <NCollection_Vector.hxx>.
2020-08-07 15:08:55 +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
abv
0ebe5b0a7f 0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- preparation
Operators << for Handle(Message_Messenger) are removed; their use is replaced by use of Message_Messenger::StreamBuffer
Message_Messenger has been replaced by Standard_OStream within Interface_InterfaceModel,IFSelect,IGES,STEP dump interfaces.
2020-05-09 17:22:13 +03:00
kgv
a4815d5509 0029902: Data Exchange, XCAF - provide extended Material definition for visualization purposes
Introduced new attribute XCAFDoc_VisMaterial storing visualization material definition.

XCAFPrs_Style has been exteneded Material() property.
XCAFPrs_AISObject::DispatchStyles() maps new XCAFPrs_Style::Material() property onto graphics aspects.

RWGltf_GltfJsonParser and RWObj_CafReader now put Material definition into XCAF document instead of a color label.
RWGltf_MaterialMetallicRoughness - added missing properties AlphaMode, AlphaCutOff and IsDoubleSided;
fixed default values in constructor for Metallic and Roughness.

Added commands XGetAllVisMaterials, XGetVisMaterial, XAddVisMaterial,
XRemoveVisMaterial, XSetVisMaterial, XUnsetVisMaterial for working with
new visualization materials table in the document.
2019-10-22 15:15:53 +03:00
kgv
ba00aab7a0 0029528: Visualization, TKOpenGl - allow defining sRGB textures
OpenGL rendering is now done into sRGB framebuffer.
OpenGl_ShaderManager::prepareStdProgramFboBlit() has been extended
by programs resolving MSAA texture and applying gamma correction as fallbacks.

Quantity_Color definition has been modified to store RGB components
in linear color space within Quantity_TOC_RGB type.
Standard colors defined by Quantity_NameOfColor enumeration has been updated accordingly.
New Quantity_TOC_sRGB type has been introduced to handle RGB components in non-linear sRGB color space.

OpenGl_TextureFormat class definition has been moved to dedicated files.
New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat().
New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat()
and OpenGl_FrameBuffer::getDepthDataFormat().

Graphic3d_TextureRoot::IsColorMap() - introduced new property defining
if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures.
OpenGl_Texture initialization methods have been extended with new theIsColorMap argument.

vreadpixel - added argument -sRGB printing color in sRGB color space.

Test cases have been updated to new sRGB rendered results.
2019-10-22 15:15:52 +03:00
tiv
0423218095 0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
2019-08-16 12:16:38 +03:00
kgv
a738b534ca 0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
2019-03-31 23:39:50 +03:00
ika
5290fb106f 0030362: Data Exchange - Writing dimensions with inches produced invalid file.
Writing dimensions into STEP files in inches not produce invalid references between STEP entities.
2018-11-15 17:34:43 +03:00
ika
87efa821fa 0030189: Data Exchange - Wrong export to STEP of located root.
Now roots-references in XCAF Document can be exported to STEP without losing structure of assembly/sharing/metadata of this root. New auxiliary root assembly with each root-reference is created to save all necessary data.
2018-10-04 17:57:13 +03:00
msv
63cdf48ec1 0029830: STEPCAFControl_Reader poor performance - quadratic dependence
Various performance improvements in STEP read/write algorithms:
- Search for the  label of a shape or component shape is improved using map mechanism instead of brute force iteration.
- Invariant FindEntities() is moved out of the loop in the method getStyledItem in STEPCAFControl/STEPCAFControl_Writer.cxx.
- A pointer to the end of binders chain is added in Transfer_Binder class to speed up adding a binder to the chain.
- Small fixes are added  to eliminate excess copying of handles, calls of handle DownCasts and so on.

Stack overflow is removed during destruction of STEP model with long chains of Transfer_Binder.
It is possible to use the Draw commands ReadStep and WriteStep to read/write from the session without accessing the disk file (use '.' for the file name).

Performance test cases for STEP reading/writing have been added.
2018-07-20 17:15:53 +03:00
ika
44f2982356 0029403: Data Exchange - subshapes names are not imported from step
Fix processing of subshape names in STEP in reading and writing.
Replace creating subshapes in Document as tree (invalid) with plain subshapes structure.
Update test cases.
2017-12-27 19:13:08 +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
ika
5b83cdb642 0028332: Unstable tests in group gdt export
Add initialization of variable GDTMode in STEP writer.
2017-08-24 19:12:53 +03:00
ika
1603a49799 0028790: Data Exchange - Wrong orientation of Annotation Plane in GD&T (Writing)
Fix building of Axis2Placement3d.
2017-06-01 10:14:34 +03:00
kgv
c48e2889cd 0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation 2017-04-14 13:04:04 +03:00
ika
1209c1b923 0028315: Data Exchange - Import/Export GD&Ts without semantic
Implement import/export of Dimensions without semantic.
Add new type of dimension for GDTs with presentation and connecting to shapes.
Update test cases.

Small corrections for issue CR28315
2017-01-19 16:05:25 +03:00
ika
400af1bcf6 0028235: Data Exchange - DG&T datum XCAF object has incomplete list of shape references
Update STEP import and export of datums.
Update test cases.
2016-12-29 14:57:05 +03:00
ika
51663cb434 0028250: Data Exchange - Wrong number of geometric tolerance modifiers.
fix some copy paste mistakes,
update test cases.
2016-12-22 17:24:30 +03:00
kgv
aff1875311 0028147: Data Exchange - NULL dereference while reading color from STEP file
StepVisual_StyledItem::Item() now does not call IsKind() on NULL object.
Add several checks for NULL to import/export.

Add test case bugs/step/bug28147
2016-11-23 15:54:55 +03:00
gka
72523826de 0027575: Reading STEP file gives an empty result
Exception is raised during translation BSpline curve having only one unique knot.
Protection for such case was added
Added protection against exception during reading BSpline curve with number of control points equal to 0
Added protection against exception due to using null binder during writing XDE document

Test case for issue #27575
2016-11-17 14:45:16 +03:00
ski
997e128f88 0024788: Foundation Classes - remove Dico_Dictionary
Class Dico_Dictionary was replaced by NCollection_DataMap/NCollection_IndexedDataMap classes.
Changed argument name in template class NCollection_Datamap to eliminate redefinitions of static members in dependent code.
2016-11-08 15:15:22 +03:00
ika
43d3f6d8d8 0027975: Data Exchange - Add possibility to connect DGTs to vertices.
Implement new function to find Product_Definition_Shape entity.
Modify Reader to add possibility of import DGTs, connected to some geometry items.
Update test cases.
2016-11-03 14:15:34 +03:00
ika
0b622d670d 0027934: Data Exchange - implement STEP common labels
implement import/export
update test cases
2016-10-27 17:08:04 +03:00
ika
c10703215e 0027313: Exception during WriteStep with PMI
Add check for datum position during export of datum_system
Add Draw commands for set/get datum position
update test cases

Correction of case bugs/step/bug27313
2016-09-15 11:30:46 +03:00
kgv
dde6883382 0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean.

Places of inproper use of Standard_Boolean instead of Standard_Integer
have been corrected:
- Bnd_Box, Bnd_Box2d
  Bit flags are now defined as private enum
- HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData
  Bit flags are now defined as enum
- HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint
  Bit flags are now defined as bool fields
- HLRAlgo_PolyData
  Bit flags are now defined as Standard_Integer
- OSD_DirectoryIterator, OSD_FileIterator
  Boolean flag is now defined as Standard_Boolean
- ShapeAnalysis_Surface::SurfaceNewton()
  now returns Standard_Integer (values 0, 1 or 3)
- ChFi2d_FilletAlgo
  now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger
  for storing boolean flags

Method IFSelect_Dispatch::PacketsCount() has been dropped from interface.

ShapeFix_Solid::Status() has been fixed to decode requested status
instead of returning integer value.

TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values
instead of Standard_Integer.

Persistence for Standard_Boolean type has been corrected
to keep backward compatibility:
- BinMDataStd, BinTools, FSD_BinaryFile

Broken Draw Harness commands vdisplaymode and verasemode have been removed.

BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations

BRepMesh_IncrementalMesh::clear() - avoid ambiguity
2016-08-26 10:16:17 +03:00
ika
f3ec3b372c 0027645: Data Exchange - access violation when reading STEP AP242 file
Fix exceptions, add test cases.

Small correction of test cases for issue CR27645
2016-08-25 15:10:51 +03:00
ika
b7b2f85ac1 0027455: Implementation of connection points
Add Import/Export connection points.
Make some improvements in STEP reading in collections shapes, to which dimension is attached.
Update tests.
2016-05-12 10:30:09 +03:00
anv
7f56eba8cd 0027349: XtControl_Reader is not thread-safe
Support of profiles for norms is removed
Getting rid of thread-unsafe static variables.
Sequence is not thread-safe. Replacing it with Vector.
Updating samples due to previous changes.
Resolving conflict with system environment.
2016-04-22 15:22:10 +03:00