Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull upstream changes #13

Open
wants to merge 639 commits into
base: autoBuildLibrary
Choose a base branch
from

Conversation

Rjvs
Copy link

@Rjvs Rjvs commented Feb 24, 2022

No description provided.

gkv311 and others added 30 commits October 31, 2022 18:08
IntStart_SearchOnBoundaries.gxx - improving tangent criteria
…nner wire and without natural bound not correctly read

Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.
…B "Directory is not set".

Previous approach do not taking into account, that oneTBB library may be installed in the system folder
on Linux. So, solve the problem it is proposed to employ find_package utility, that works great
as on Windows, as on Linux.
…t symbol `TT_RunIns' can not be used.

After emploing intel oneTBB of version 2021.5 on NEXT platforms arises error on OCC Pr.:

`
*/ld: */libfreetype.a(truetype.o): relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used when making a shared object; recompile with -fPIC
*/ld: final link failed: bad value
`

Proposed solution: linking with shared object of libfreetype, rather than with archive library.
Despite that error occurred only in OCC Pr., it is worth to accept changes for OCCT too.
…2022 x64.

With enabled flag BUILD_USE_PCH we get an error of compilation of TKService:

1>Image_VideoRecorder.obj :
  error LNK2019:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)"
      (?av_strerror@@YAHHPEAD_K@Z) referenced in function
      "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const "
      (?formatAvError@Image_VideoRecorder@@ieba?AVTCollection_AsciiString@@h@Z)
1>Media_FormatContext.obj :
  error LNK2001:
    unresolved external symbol
      "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z)

And many other similar errors. Similar errors occures in some other projects too:

TKService
TKOpenGl
TKOpenGles
TKXCAF
TKXDEDRAW
TKDFBrowser
TKMessageModel
TKMessageView
TKShapeView
TKTInspector
TKTreeModel
TKVInspector
TKView

Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool.
In this ticket migration to cotire 1.8.1 (from 1.7.9) is done.

COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing
causes some errors in 3rdparty libraries (for example, in TKService project).

Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView)
which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire:

https://gitlab.kitware.com/cmake/cmake/-/issues/18353

0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt.

Solution is proposed in:
https://gitlab.kitware.com/cmake/cmake/-/issues/18353
…ze a torus case

Fixed the Toroidal surface recognition;
The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI];
The test case bugs/modalg_5/bug23954: BAD -> OK.
…e default block size

Set default memory block size for IncAllocator to 12KB to make sure the Low Fragmentation Heap is used for memory allocations on Windows platform.
Increase minimum number of discretization points by one explicitly on each iteration of model healer to cover cases degenerated to line (for cases when face consists of 2 edges only).
…ep file

Instance name is saved also with identity location transformation
…uring sweep algorithm

Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status.
Method IntWalk_PWalking::ExtendLineInCommonZone(...) now is not called if the already found intersection point is on surface boundary.
As result, the intersection line going along any boundary will never be extended. It is appropriate for high-level OCCT-algorithm because they will take the boundary (not computed line) as intersection result.
…reached

Add parameter EnableControlSurfaceDeflectionAllSurfaces to IMeshTools_Parameters enabling possibility to optimize mesh even on analytical surfaces;
Add corresponding parameter -surf_def_all to incmesh Draw command.
…eration element always to be a wire causing skipping of primal one

ShapeAnalysis::OuterWire(): fixed missed logic when TopoDS_Iterator notifies about more objects to iterate, but there are only vertices and no additional wires at all.
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.
Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
Removing provider.VRML.OCC.read.memory.limit from the test because this parameter doesn't exist inside the Vrml_ConfigurationNode class
Added new CMake variables to build using DRACO
Windows OS works with Debug and Release configuration DRACO
Linux works with Release configuration DRACO
Avoid unification of the faces belonging to the different shells.
… label, but v6.8 can

- color overriding mechanism is implemented for assembles, parts and instances
… detection problems

GeomLib_IsPlanarSurface.cxx - using poles for checking BSpline, Bezier curves and surface changed
                              on checking by curve, surface points.

BRepOffset_MakeOffset.cxx - set normal of plane surface according to normal of initial face surface

tests/cr/bugs/bug33170 - new test case added
Added step of refinement the coarser of the two shapes meshes to produce two meshes with approximately the same density.
Added tests lowalgos/proximity.

Fixed accounting of parameters to adjust number of initial sample points
Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and
 GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then
 array is created and second fills the array. In some cases the size of array
 is less than need for filling.

Change:
1. Added function BSplCLib::Intervals that calculates number of interval and fills
 the array with its (if needed).
2. Simplified the algorithm of intervals calculation.
3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals
 use BSplCLib::Intervals.
4. When creating an adapter for the base curve, the boundaries of the adapter for the offset curve are applied.
5. Test for problem shape was created: bugs modalg_8 bug33187.

Result: The new approach eliminates the problem of writing outside the array bounds.
dpasukhi and others added 30 commits September 14, 2024 20:26
…r cache

Curve list should be not unique, list is recommended.
One curve can be used by multiple edges.
After rework Precision.hxx some local
  variables can be marked as constexpr
…id STEP files

Fixed exception in RWStepShape_RWEdgeCurve::Check() thrown when trying
    to access step entity in Interface_EntityIterator with zero entities.
Fixed a crash in StepToTopoDS_TranslateFace::Init() caused by
    dereferencing nullptr.
RWStepShape_RWEdgeCurve and RWStepShape_RWEdgeCurve are refactored.
Test bug33665 is added to check the fixed behavior.
Windows, Linux builds now starts checking the warning.
  In warning case the job will be failed.
MacOS having too much warnings related with sprintf.
Linux Clang having a problem with Flex and Bison.

TODO: Fix the warnings for MacOS and Linux Clang.
Fixed crash in STEPConstruct_Styles::GetColors() due to nullptr
  dereferencing when source step file has missing
  FILL_AREA_STYLE_COLOUR entities.
Cleaning repo from not maintaining functionality - genproj and wok
Only 'gendoc' functionality kept.
TODO: migrate gendoc to cmake
…sing an invalid file

fclose() call is added before early return statement in igesread() function.
… Write procedure

Implementation of common logic for OCCT formats.
…very different results under small change in deflection
ReadMe was moved to markdown format.
Updated a links to the resources
…is skipped on write

Processing of complex_triangulated_surface_set is added to
  STEPCAFControl_GDTProperty::GetTessellation().
Processing of tessellated_curve_set is refactored and moved to a
  separate function.

Problems related to normals list are fixed in
RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep():
  Normals list is now checked for nullptr. It is a valid situation that
  occurs when complex_triangulated_surface_set in STEP file has no
  normals.
  Traversing of normals list is performed in correct order. Previously
  rows and columns were switched, which led to crashes or incorrect data.
Crash in TopoDSToStep_MakeStepFace::Init() that occured due to attempt
to copy null Geom2d_Curve is fixed.
… Write procedure

Fixed inconsistency of tests.
'IGES.OCC.write.unit no more' used.
Add supporting of metadata key-value export into extras section of each node.
Continue rework Precision.hxx and Standard type definitions
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.
Removed cotire PCH
Integrated native PCH by CMake with the same BUILD_USE_PCH flag
Added new option to avoid extra files in 'build/include' folder and replace it by symlink
  Symlink creates link to the origin file, it has some benefits from debug and build side.
The CMake parameter for symlink is 'BUILD_INCLUDE_SYMLINK'
Fixed issue when  custom.bat/sh not regeneration in build directory
  in case when exists in install directory.
Migration to PCH breaks some VTK search functionality.
Fixed non-unique package name caching
Update compiler flags and env.bat to work with clang-cl
After enabling PCH it was not possible to disable back.
New CMake feature used for disabling
Add GitHub Actions workflow for building OCCT refman documentation
Fixed issue with jemalloc from ubuntu, debian and etc default packages
Fixed problem with not relevant flags and missed C language flags.
Compilation failed with Clang on OpenVR module
Introduced a comprehensive multi-platform build and
  test workflow for OCCT, supporting Windows, macOS, and Linux.
Added a new workflow for automated documentation building.
Reorganized a code analysis workflow using CodeQL
  and Microsoft C++ Code Analysis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.