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

4764 Commits

Author SHA1 Message Date
emv
d84b49c743 0030522: Modeling Algorithms - BRepBuilderAPI_MakeWire produces different wires depending on the order of parameters
The following improvements have been implemented in BRepLib_MakeWire class to make it more reliable:
1. Quit adding edges of a wire into result if the current edges have not been added. Return NotDone status.
2. Allow merging not only bounding vertices (connected to only one edge) but also the middle ones, so the multi-connected vertices may appear in the result.

Test case for the issue.
2019-03-22 17:21:01 +03:00
kgv
aff73fd598 0030582: Coding - avoid defining references to properties of NULL objects
Approx_SweepApproximation::Perform() now creates empty arrays.
GeomAdaptor_SurfaceOfRevolution::UTrim() - fixed No_Exception misuse.
StdPrs_ShadedShape - fixed defining an invalid reference to Poly_Triangulation::UVNodes().

BSplCLib::MovePoint() and BSplCLib::MovePointAndTangent() now take optional
weights parameter as pointer consistent to other methods like BSplCLib::BuildEval().
2019-03-22 17:21:01 +03:00
ifv
afb3647b34 0030489: Modeling Algorithms - BRepBuilderAPI_GTransform hangs
Approx_ComputeCLine.gxx - criterium to stop interval cutting is increased.
ProjLib_ProjectedCurve.cxx - fix regression for bugs modalg_5 bug25886
Other tests are modified according to current state of algorithm
2019-03-22 17:21:00 +03:00
kgv
2328cae25d 0030593: Modeling Algorithms - ShapeUpgrade_ShapeDivide::Perform() throws Standard_NoMoreObject
Added missing TopExp_Explorer::More() checks to ShapeUpgrade_ShapeDivide::Perform() and BRepCheck_Analyzer::Perform().
2019-03-21 13:16:11 +03:00
kgv
85831628d6 0027316: Draw Harness - access violation on passing non-existing shape to XAddShape
Add NULL check to XAddShape command.
Removed broken test case bugs/step/bug27316.
2019-03-21 13:15:15 +03:00
kgv
667b5eb81b 0030583: Draw Harness - ignore cpulimit when Debugger is attached on Windows platform
cpulimit now omits ExitProcess() when IsDebuggerPresent() returns TRUE.
2019-03-20 19:00:48 +03:00
kgv
de07af824b 0030594: Data Exchange - access violation within IGESGeom_BSplineCurve constructor
Added NULL check.
2019-03-20 18:11:41 +03:00
kgv
cb6cad7df1 0023838: Modeling Data - Standard_OutOfRange in Geom_OffsetSurface::LocalDN (called by BRepFill_PipeShell)
Fixed incorrect array allocation within GeomEvaluator_OffsetSurface::CalculateDN()
and protection against assigning out-of-range values in case of non-square
number of U and V derivatives on surface.
2019-03-20 11:25:06 +03:00
kgv
ad67e36766 0030588: Coding - avoid calling operator->() on NULL Handle
Use .get() method instead of operator->() where result can be NULL.
STEPCAFControl_Reader::ReadLayers(), XCAFDoc_ColorTool,
XCAFDoc_LayerTool::SetVisibility() - fixed static functions syntax.
2019-03-20 11:23:45 +03:00
kgv
18434846a3 0030558: Coding - replace math_SingleTab with NCollection_LocalArray
math_Vector::Multiplied() - fixed modification of original array.

math_SVD::Solve(), math_SVD::PseudoInverse(), GeomFill_LocationGuide::InitX() - removed incorrect constness.

math_Vector, math_IntegerVector - math_SingleTab has been replaced by NCollection_LocalArray+NCollection_Array1.
Added accessors returning const value.
2019-03-20 11:23:08 +03:00
vro
43c8661e5e 0030536: Foundation Classes - TCollection_ExtendedString::StartsWith() and EndsWith() have a mistake
Draw-commands StartsWith and EndsWith are renamed to QAStartsWith and QAEndsWith.
The test script bug30536 was corrected.
2019-03-18 19:46:00 +03:00
abv
404504b234 0030544: Data Exchange - IGES import fails on specific file
Method IGESToBRep_BRepEntity::TransferEdge() is fixed to record result even if it is wire rather than edge.
This allows translation of EdgeLoop entities referring to CompositeCurve items in EdgeList entities.
Curves that fail to translate are recorded in result as Null shapes (rather than skipping them) to keep indexation of curves in EdgeList valid for remaining ones.

Method IGESToBRep_BRepEntity::TransferLoop() is improved to skip failed edges thus avoiding exception and allowing translation to complete for transferable entities.

Warning messages are corrected to be more meaningful.
Added test bugs iges bug30544
2019-03-18 19:45:07 +03:00
kgv
d65f9183fd 0030569: Foundation Classes - NCollection_Shared lacks inclusion of NCollection_DefineAlloc.hxx
Add missing includes.
2019-03-18 19:43:55 +03:00
kgv
6b121e2b48 0030584: Modeling Algorithms, BRepFill_OffsetWire - access violation on Face having no boundaries
Added missing NULL and empty result checks.
Updated test cases using offset_wire_092.brep shape containing all Edges
with TopAbs_INTERNAL orientation (hense no boundary to make offset).
2019-03-18 19:42:47 +03:00
kgv
437ef7713e 0030581: Modeling Data - Standard_OutOfRange within Geom_BSplineSurface::LocateV()
Geom2d_BSplineCurve::LocateU(),Geom_BSplineCurve::LocateU, Law_BSpline::LocateU()
Geom_BSplineSurface::LocateU() and Geom_BSplineSurface::LocateV()
have been corrected with missing range checks.
BSplCLib::Hunt() documentation has been corrected to reflect its actual implementation.
2019-03-18 19:41:40 +03:00
kgv
737e9a8da4 0030571: Visualization, TKOpenGl - mapped texture is ignored while drawing points
OpenGl_AspectsTextureSet now appends Sprite texture to the end of texture set.
OpenGl_Context::init() - fixed usage of GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS on too old GL context.

Default sampler names occSampler0, occActiveSampler and occSamplerBaseColor
are now excluded from header with common declarations for build-in GLSL programs.

OpenGl_ShaderObject::LoadAndCompile() and OpenGl_ShaderProgram::Link()
now includes program Id within error log.

OpenGl_ShaderManager now supports mapping texture onto point primitive within built-in programs
(texture transformation is ignored).
2019-03-16 16:48:21 +03:00
oan
ad4b04291f 0030511: Mesh - too long meshing of assembly containing single solid (shared)
Added test case.
2019-03-16 16:46:53 +03:00
oan
e9fb0cba58 0030573: OSD_Parallel_TBB: limit number of execution threads using settings of OSD_ThreadPool::DefaultPool()
Add tbb::task_scheduler_init to OSD_Parallel::forEach().
2019-03-16 16:46:53 +03:00
kgv
f2b42160f4 0030575: Tests - v3d/materials unstable image screenshots of alpha-blending on GeForce with MSAA
testdiff now looks for "IMAGE_COLOR_TOLERANCE: Tol" statements in log
to execute diffimage with -toleranceOfColor Tol parameter.

Image difference is first performed with 0 tolerance and then optionally with non-zero tolerance,
so that the log always includes information that some images are different,
but with two different messages:
- "IMAGE differs" for images failed comparison;
- "IMAGE is similar" for images passed comparison only with non-zero tolerance.

v3d/materials - disabled MSAA and removed duplicate.
demo/samples/materials - compare screenshots with 0.8% color tolerance (2/255).
2019-03-16 16:46:52 +03:00
kgv
6072d5975a 0030580: Configuration, CMake - introduce BUILD_RELEASE_DISABLE_EXCEPTIONS option managing No_Exception macros 2019-03-16 16:46:51 +03:00
jgv
85c103d277 0030560: Modeling Algorithms - Improvement of the method BRepTools::DetectClosedness
1. Rewrite the method BRepTools::DetectClosedness.
2. Correct the method BRepOffset_Tool::EnLargeFace to process properly non-periodic but closed faces.
2019-03-16 16:46:50 +03:00
kgv
31fe1f8ec4 0030570: Visualization, TKOpenGl - OpenGl_AspectFace ignores texture revision on recompute
Added revision check to one more branch within OpenGl_AspectsTextureSet::build().
2019-03-15 19:11:45 +03:00
kgv
5716d13b43 0030564: Coding - math_Gauss uninitialized 'Singular' member variable
Removed unused class field Singular.
2019-03-13 16:39:43 +03:00
kgv
a7fd4b1bb0 0030562: Coding - TopOpeBRepBuild_Builder use of null pointer
TopOpeBRepBuild_Builder::Clear() - added NULL check.
2019-03-13 16:39:41 +03:00
mnv
226fce20f0 0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
Removed excess mechanism for invalidating presentations AIS_InteractiveObject::myRecomputeEveryPrs.
PrsMgr_PresentableObject::Update() has been deprecated and replaced by PrsMgr_PresentableObject::UpdatePresentations()
recomputing only explicitly invalidated presentations.
2019-03-13 16:39:40 +03:00
kgv
ac8f17746b 0030554: Coding - ChFiDS_CommonPoint uninitialized member traarc
Added missing initialization to ChFiDS_CommonPoint constructor.
2019-03-13 11:00:23 +03:00
kgv
a98b97f5da 0030553: Coding - TopOpeBRepDS_Surface missing default initalizations
All class fields are now initialized within every TopOpeBRepDS_Surface constructor.
2019-03-13 11:00:22 +03:00
kgv
c3c2b331cd 0030545: Documentation - methods marked with Standard_DEPRECATED has ill-formed Doxygen output
Doxygen option PREDEFINED has been extended by Standard_DEPRECATED declaration.
2019-03-13 11:00:22 +03:00
kgv
af2fa459f1 0030547: Foundation Classes - NCollection_DoubleMap lacks Seek() method
Added Seek1() and Seek2() methods to NCollection_DoubleMap class.
2019-03-13 11:00:21 +03:00
oan
060fc60338 0030149: BRepMesh_Delaun: free triangle is left in the mesh after cleanup of auxiliary items
Remove free triangles connected to triangles over nodes of super triangle.
Modification of improved test case.
2019-03-07 18:11:43 +03:00
kgv
bf5f0ca20a 0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects
Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
preserving different per-aspect defaults.

Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
for replacing existing group aspects.

AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
for updating computed groups with new aspects without presentation recomputation
in places where SynchronizeAspects() is not applicable.

OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
and OpenGl_AspectText have been merged into new class OpenGl_Aspects.

ViewerTest::parseColor() - fix uninitialized alpha component.
Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
Remove getters Values() deprecated since OCCT 7.1.0.
2019-03-07 18:08:36 +03:00
emv
e08a9b0302 0030470: Modeling Algorithms - Invalid result of offset operation in mode "Complete" with join type "Intersection"
The fix is intended to obtain the correct result of offset operation in which the result contained only the small inverse part of the shape, which clearly should not have been included in the result at all.

The fix adds treatment of the inverted edges while removing the inside faces (collapsed ones) - RemoveInsideFaces method:
- Removing the invalid hanging blocks containing the inverted edges.
- Considering the face containing the inverted edges as the invalid one.

Test cases for the issue.
2019-03-07 18:07:29 +03:00
Benjamin Bihler
55c8f0f7a4 0030523: Visualization - Highlighting does not work anymore
Added hints about ZLayer consideration and changing highlight colors to documentation
of AIS_InteractiveContext::SetHighlightStyle() method.

AIS_InteractiveContext::MoveTo() now checks if highlighting style does not use immediate layer
and performs full Redraw() instead of RedrawImmediate().

Improved parsing of ZLayer names within vdisplay, vzlayer and vselprops commands.
vreadpixel now reports syntax errors on wrong input.
2019-03-07 18:06:49 +03:00
vro
799318357c 0030535: Draw Harness - add size argument to vgrid command
vgrid command has been revised and extended with new argument -size.
2019-03-07 18:06:48 +03:00
anv
f522ce50b2 0030532: Visualization - Manipulator for dragging within a plane
Added dragging sectors to Manipulator presentation.
Test added.
2019-03-07 18:06:47 +03:00
emv
5d0038626b 0030490: Modeling Algorithms - Incomplete result of Cut operation
The problem is fixed by the fix for the issue #0027448, thus integrating the test case only.
2019-03-06 20:20:10 +03:00
kgv
88b12b7c05 0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory buffer
Added two new Image_AlienPixMap::Load() methods, taking std::istream
and memory buffer (pointer, length) arguments.
This allows reading image from application memory or from file with non-zero offset.

Added Image_AlienPixMap::IsTopDownDefault() static property allowing to query rows order used by linked image library,
so that application might generate UV texture coordinates accordingly.

Added missing Release() to IWICImagingFactory instance.
2019-03-03 20:59:18 +03:00
ika
7b93ae3c5e 0030533: Data Exchange - Crash during STEP import.
Add Null checks to avoid crash during reading faces without bounds.
2019-03-03 20:58:37 +03:00
asl
6ef0d6f156 0024437: Visualization - silhouette edges based on OpenGL
Added new flag Graphic3d_AspectFillArea3d::ToDrawSilhouette() activating silhouette (outline) rendering.

The new feature can simulate fake HLR look-n-feel,
when combined with Aspect_IS_HIDDENLINE interior style (filling object with background color),
face boundary edges (with most continuity flag set to c2 or lower).

Silhouette GLSL program is very simple - it displaces model alongside vertex normal,
so that it is applicable only to smooth surfaces and closed volumes,
and produces visual artifacts at sharp corners, especially when face boundary is disabled.

OpenGl_SetOfShaderPrograms has been modified so that to reduce
dimensions of the grid of static size based on amount of program combinations.

OpenGl_PrimitiveArray no more allocates VBO resources if primitive array
is marked to be not drawn via interior style / line type / marker type.
2019-02-28 20:25:51 +03:00
nds
967d2f4f30 0030497: [REGRESSION] Mesh - wrong Poly_Polygon3D within local selection of located shape
The previous code has a condition to avoid processing the same faces if the face has a location.
The similar condition should be applied during the edges processing.
If not doing this, in the previous implementation, IMeshData_Edge instances are created for all edges(even located), but edges of faces located are not filled with curves.
As a result we had wrong local selection of edges.

Limit addition of edges to data model by ones with unique TShape and location using edges map already available in BRepMesh_ShapeVisitor.
2019-02-28 20:24:43 +03:00
pdn
4ec8ee66a0 0030356: Data Exchange - IGES model after importing into document has location issues 2019-02-28 20:23:35 +03:00
asl
0493ffd083 0029787: Visualization - Avoid in presentation edges of certain continuity class
A new flag Prs3d_Drawer::FaceBoundaryUpperContinuity() has been introduced
handled by StdPrs_ShadedShape::FillFaceBoundaries() method to exclude edges
of higher continuity class (e.g. to skip seam edges).

Draw Harness command vshowfaceboundary has been replaced by vaspects:
> vaspects -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryType DASH.
2019-02-28 20:20:45 +03:00
Benjamin Bihler
0be7dbe183 0030448: Coding - add typo detection to derivation creation methods using Standard_NODISCARD attribute
Added macro Standard_NODISCARD equivalent to C++17 attribute [[nodiscard]] for compilers that support this.
Using Standard_NODISCARD macro for methods that create new object in gp, math, Geom, Bnd packages.
Marked equivalent operators with Standard_NODISCARD, if they are defined close to relevant methods.

Corrected code where warnings on unused result of calls to methods creating new objects are generated.
In most cases it looks like spelling errors (e.g. Normalised() instead of Normalise())
2019-02-27 19:59:07 +03:00
kgv
1c8fc6bee2 0030493: Draw, ViewerTest - minor improvement of vdisplay command
vdisplay no longer opens BREP file in case if Draw variable is not found.

Draw::Get() unused Complain argument has been removed from method definition.
Added Draw::GetExisting() and DBRep::GetExisting() commands never performing picking.
2019-02-27 19:55:32 +03:00
asl
d95f5ce102 0029810: Visualization - Tool for debugging shaders
A new tool for debugging shaders has been introduced.
The new method OpenGl_ShaderProgram::UpdateDebugDump() allows dynamically
dumping/restoring certain shader program (vertex and fragment shaders) to/from external file.

The file name is generated from the program's name with suffix ".vs" or ".fs" for shader type.
The environment variable CSF_ShadersDirectoryDump specifies the folder for dumps.

If the file does not exist (first frame), then it is automatically saved.
When the file date/time is changed in comparison with recent cached date,
then the file will be automatically loaded from external file,
thus this file can be modified in any editor.

OpenGl_ShaderManager now generates a human-readable resource ids for standard GLSL programs.

Draw Harness command vshader has been extended with arguments -list,-dump and -reload
for debugging shaders within OpenGl_Context.
2019-02-27 19:54:26 +03:00
kgv
1e756cb979 0030520: VIS - IVtkTools_ShapePicker::GetPickPosition() returns incorrect point
vmoveto and ivtkmoveto commands now print topmost picked 3D point.
2019-02-27 19:51:02 +03:00
abv
3bb61eb0fe 0029996: Porting to VC 2017: memory leak reported in visualisation
Tests for memory leaks on display / erase cycles are performed with VBO disabled to avoid false memory leaks reported on NVidia graphics
2019-02-26 15:23:18 +03:00
mnv
2a33274558 0029076: Visualization - implement element shrinking Shader
Aspect_IS_HOLLOW now an alias to Aspect_IS_EMPTY and Aspect_IS_HIDDENLINE does not implicitly enables mesh edges,
so that Graphic3d_AspectFillArea3d::SetDrawEdges() should be set independently.

OpenGl_ShaderManager now provides built-in GLSL programs for drawing mesh edges
in single pass (and on OpenGL ES which does not provide glPolygonMode()).

Graphic3d_RenderingParams::ToEnableAlphaToCoverage is now enabled by default
and properly handled at TKOpenGl level - enables coverage for Graphic3d_AlphaMode_Mask primitives.

OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
when GLSL programs are not supported (Geometry Shaders are required)
or stipple line style is required (not implemented within Face GLSL).

vaspects command has been extended by -setInterior -setDrawEdges -setEdgeColor -setEdgeType -setEdgeWidth
arguments replacing vsetinteriorstyle/vsetedgetype/vunsetedgetype commands.
vaspects now accepts arguments without "set" prefix.
ViewerTest::ParseColor() now parses RGBA color.

Redundant command BUC60738 has been removed.
AIS_ColorScale - fixed usage of uninitialized FillArea aspects.
2019-02-22 16:23:35 +03:00
jfa
4efe27fc4e 0030510: Application Framework - add missing NULL check within TDataStd_RealArray::ChangeArray() 2019-02-21 18:47:04 +03:00
kgv
ea298f59e4 0030384: Visualization - Won't display line with dot and dash style on Android
Fix misprint leading to double semicolon in GLSL code.
2019-02-21 18:44:37 +03:00