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

2466 Commits

Author SHA1 Message Date
iko
c8bead4752 0031293: Visualization, TKOpenGl - broken capping when PBR shading is ON
Division by 'w' component has been added in texture coordinates calculations in PBR functions.
2020-01-13 16:21:56 +03:00
msv
ef59b5e064 0031292: Data Exchange - SIGSEGV on reading STEP file with references to invalid entities
Changes:

- in StepData_StepReaderData::ReadEntity, make sure that entity handle is not null before calling IsKind() of it.

- in StepData_StepReaderData::SetEntityNumbers, do not invert the sign of entity number of referenced parameter if the second pass is not required. Otherwise, the number -1 (obviously invalid) becomes 1 (invalid, but not obviously) without further correction of it.

- in StepData_UndefinedEntity::ReadRecord, consider the case when the entity number is positive but refers to non-existing entity. In this case literal value will be used instead of null entity for the problematic parameter.
2020-01-13 16:16:48 +03:00
oan
0c061f3d9d 0025287: BRepMesh_IncrementalMesh produces (way) out of tolerance mesh Added test case 2020-01-13 16:13:24 +03:00
iko
88b312d3a4 0031099: Visualization, TKOpenGl - support Point light source with artistic full cut-off distance
"Range" parameter of point light sources (positional and spot) concidering in PBR has been added.
Angular attenuation parameter of spot light in PBR has been reimplemented based on existing "concentration" parameter.
2020-01-13 16:07:19 +03:00
kgv
0858125fd4 0031284: Visualization - XCAFDoc_VisMaterialPBR lacks Index of Refraction
Added missing parameter.
2019-12-27 16:35:31 +03:00
mzernova
89d855ba58 0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
Ray-Tracing now handles IBL and background cubemaps in similar way as PBR.
Ambient light source is handled by Ray-Tracing in similar way as PBR,
e.g. as coefficient for environment map (IBL) or as constant light source.

Test script generating PBR spheres has been moved to Samples
and now shared by PBR and Path-Tracing tests.
2019-12-27 16:26:48 +03:00
kgv
d415125a68 0031274: Data Exchange - RWObj_Reader ignores usemtl with empty name
Fixed out of range access within pushMaterial().
2019-12-26 17:19:31 +03:00
razmyslovich
0da2ecac41 0031251: Add a new meshing parameter to enforce face linear deflection
Parameter has been renamed to ForceFaceDeflection. Added test case.

New parameter -force_face_def has been added to incmesh command.
2019-12-25 15:25:43 +03:00
ifv
bdd09cfaf4 0031242: Scaling with different coefficients along axes produces invalid shape
GeomConvert_1.cxx:
Creation periodic BSpline surfaces from trimmed periodic surface if trim is boundaries of periodic domain is allowed

BRepTools_NurbsConvertModification.cxx:
Checking domain of 2dCurves if surfaces are periodic is added

Test case tests/bugs/mesh/bug30008_2 is modified according to current behavior

Test case tests/bugs/modalg_7/bug31242 is added
2019-12-23 11:49:04 +03:00
jgv
9a1701fbcb 0030597: Result of BRepOffsetAPI_MakePipeShell doesn't match the given profiles
Modify the local function EdgeToBSpline of BRepFill_NSections to build a BSpline curve of general type for each curve of profile.
2019-12-19 16:53:36 +03:00
ifv
e2447a80ea 0031203: Test harness command "bsection" on the planar faces return only one vertex instead edge representing intersection line
BRepClass/BRepClass_FaceExplorer.cxx:
Protection against intersection of test ray with almost parallel edges is added.

SWDRAW/SWDRAW_ShapeFix.cxx: add tolerance as parameter in command checkfclass2d

tests/bugs/modalg_7/bug31203:
test case is added
2019-12-19 16:45:54 +03:00
oan
936ce1f273 0031199: BRepMesh fails on thin faces
Use real tolerance of a face to define threshold for tolerance of discrete model instead of empirical values based on discrete model itself
2019-12-19 16:30:06 +03:00
jgv
6ef7a1f9e5 0031187: Modeling Algorithms - Regression relatively 7.3.0. Unify same domain algorithm produces invalid shape.
Modify the local function ReconstructMissedSeam to build new seam edges correctly.
2019-12-18 19:42:50 +03:00
msv
23c2ae55c7 0031120: Memory leak in BRepOffsetAPI_MakeOffset
Add destructor of MAT2d_Mat2d - full removal of edges and bisectors.
2019-12-17 15:51:06 +03:00
anv
552a74d829 0030889: ACIS Import - Incorrect result reading SAT and SAB files
Adapting CR30932 fix for a GeomLib approximator.
2019-12-06 19:32:36 +03:00
anv
4e8c1d8666 0031202: Shape Healing - FixMissingSeam creates degenerated edge
Adding tolerance to prevent degenerated cuts in cases where all vertex tolerance is covered by distance of the edge curve from vertex point.
2019-12-06 19:32:34 +03:00
iko
72f6dc612c 0031096: Visualization, TKOpenGl - support metallic-roughness texture mapping
OpenGl_ShaderManager - metallic-roughness, emissive, occlusion
and normal texture maps are now supported by PBR.
Emissive, occlusion and normal texture maps are now supported by Phong shading model.
Path-Tracing now handles metallic-roughness and emissive texture maps.

Graphic3d_TextureUnit enumeration has been extended by
new values corresponding to supported texture maps.

OpenGl_TextureSet and OpenGl_ShaderProgram have been extended with
bitmask Graphic3d_TextureSetBits identifying texture slots read from GLSL Program
and slots defined within Texture Set to avoid undefined behavior by binding mock textures.

OpenGl_TextureSet now duplicates texture unit information to handle
textures shared across multiple slots (like Occlusion [R] + Metallic-Roughness [GB]).

OpenGl_Context::BindTextures() has been extended with active GLSL program paramter
to set mock textures to texture units used by program but undefined by texture set.
OpenGl_Workspace::ApplyAspects() has been extended with parameter to avoid bining texture set.
2019-11-29 20:36:23 +03:00
emv
420b38fde9 0031148: Modeling Algorithms - Offset adjacent co-planar faces with different offset values
Extend the Offset operation (Join Type "Intersection", mode "Complete") to allow different offset values on adjacent co-planar faces.
The gap between adjacent faces is closed by creating artificial face perpendicular to the face.

Adding test cases.
2019-11-29 10:06:22 +03:00
emv
34e7ac6817 0031201: Modeling Algorithms - Result of a section operation is incomplete
Fixing misprint - use the boundaries of the cylinder for Plane/Cylinder intersection.
Test cases for the issue.
2019-11-29 09:59:01 +03:00
mzernova
caee80f39f 0030697: Draw Harness - Draw_Printer should not be set to Message::DefaultMessenger() by default
Fixed bugs that occurred when using the default std::cout from Message::DefaultMessenger() instead of Draw_Printer

A dedicated option was added to Draw_ProgressIndicator, for outputting data to the tcl when performing tests

Added -tclOutput parameter to XProgress command
2019-11-23 16:09:07 +03:00
kgv
01b2f506d6 0030953: Data Exchange - implement export of mesh data into glTF 2.0 format
Added new class RWGltf_CafWriter for exporting XCAF document into glTF file
as well as Draw Harness command WriteGltf.

Added auxiliary method OSD_Path::FileNameAndExtension() splitting file name into Name and Extension.
2019-11-23 16:03:19 +03:00
kgv
3f1675c941 0031174: Visualization - support user-provided stipple line patterns 2019-11-21 17:40:58 +03:00
mzernova
51ee6a7dbb 0030964: Data Exchange - use Standard_ReadLineBuffer within OBJ reader
Standard_ReadLineBuffer now supports a processing of the special multi-line case with \ at the end of the line.

Standard_RedLineBuffer was used to load Stl files
2019-11-20 17:08:31 +03:00
abv
8f00325d73 0031171: Draw - support Unicode input / output in console on Windows
System console is configured at DRAW start to use UTF-8 encoding, for cout and cin to deal correctly with Unicode symbols.
Use of std::wcout is avoided as it leads to corrupted output.

Command testgrid is improved to enforce UTF-8 encoding in child DRAW processes to preserve Unicode symbols in captured output.

Test bugs fclasses bug22125 is refactored:
- avoid dependency on external data file
- avoid producing snapshot
- check that Unicode name of the file created by OCCT procedure matches the name interpreted by Tcl functions
2019-11-17 17:52:38 +03:00
abv
31a5a359bb 0031144: Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC
Implementation of ShapeAnalysis::OuterWire() is revised to avoid infinite cycle if face contains internal vertex.
2019-11-15 16:37:25 +03:00
jgv
bf97419a18 0030958: BRepOffsetAPI_ThruSections operation raises an exception while building history
Correct methods Build and Generated:
use BRepTools_WireExplorer instead of TopExp_Explorer or TopoDS_Iterator, for compatibility with previous computations.
2019-11-14 22:40:01 +03:00
gka
4c26106f76 0031140: Draw command "cirtang" raises exception on the parallel curves
Exception in the algorithm Geom2dGcc_Circ2dTanOnRadGeo raised because the number of solutions exceeded the size of reserved array for solutions. A check has been added to forbid adding solutions outside of allocated place.

The similar protection has been done in other algorithms of this package.
2019-11-13 18:38:28 +03:00
kgv
15e4e6a23e 0031118: Visualization - Font_FontMgr skips fonts with unknown styles like Narrow or Black
Extended Style name is now appended to Family name for unique identification of the font.
vfont -find now accepts mask to search the font and returns family name.
2019-11-13 18:34:33 +03:00
kgv
a1a9b24952 0031135: Visualization, TKOpenGl - texture sRGB -> linear conversion is applied twice by Path Tracer
Removed from PathtraceBase.fs redundant gamma correction applied to texture.
2019-11-06 19:33:36 +03:00
abv
f979709590 0031038: Draw - adaptations for running tests with CLang address sanitizer
New optional environment variable CSF_CPULIMIT_FACTOR is introduced, allowing scaling the argument given to DRAW command cpulimit by specified factor.

Command testgrid is extended by two new options:
- -skipped: to re-run tests skipped in specified log
- -skip: to skip specified number of tests in the beginning of test sequence

Temporary Tcl scripts generated by test system are now removed from the test log directories immediately after the test execution, to save disk space.

Advises on use of CLang sanitizers are added in guide "Debugging hints and tips".
2019-11-06 19:22:33 +03:00
oan
e9d05765c2 0031131: [REGRESSION] Mesh - location of Wire affects Poly_Polygon3D
Use TopoDS_Edge without location in case of free edges to produce Poly_Polygon3D without offset.
2019-11-06 19:19:47 +03:00
oan
7756fc599d 0031125: BRepMesh_IncrementalMesh crash in constructor for empty compound shape
Added check for cases of empty shapes producing null models.
NoError status is returned as far as empty compounds are generally coorect shapes.
2019-11-06 19:17:24 +03:00
iko
67312b7991 0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
Metallic-Roughness shading model Graphic3d_TOSM_PBR has been implemented.
New materials descriptors Graphic3d_PBRMaterial have been added to Graphic3d_MaterialAspect.
PBR shading model requires OpenGL 3.0+ or OpenGL ES 3.0+ hardware.
Environment cubemap is expected to be provided for realistic look of metallic materials.

occLight_IsHeadlight() now returns bool instead of int.
Avoid using lowp for enumerations to workaround occLight_IsHeadlight()
ignorance on Adreno 308 caused by some GLSL optimizator bugs.

OpenGl_Texture::EstimatedDataSize() - fixed estimation for Cubemap textures.
OpenGl_Sampler::applySamplerParams() - fixed uninitialized GL_TEXTURE_WRAP_R in case of GL_TEXTURE_CUBE_MAP target.
2019-11-01 18:25:28 +03:00
abv
53d770b3a2 0031092: Foundation Classes - incorrect last output value for Infinite progress indicator
DRAW implementation of progress indicator is corrected to print "finished" instead of 1e100 for the end of infinite range.
Added test bugs fclasses bug31092
2019-10-30 23:23:55 +03:00
abv
7ed6e985e2 0013175: XCAF document with one vertex is exported to an incorrect STEP file
Added non-regression test case
2019-10-30 23:23:54 +03:00
oan
da6b95a075 0031043: GCPnts_TangentialDeflection generates points which number is inconsistent with MinimumOfPoints Parameter
Updated crvtpoints command API to reproduce reported problem
Generate number of points according to the specified minimum value
2019-10-29 11:04:53 +03:00
kgv
36e28f96f6 0031079: Visualization - embed minimal fallback font
Font_FTFont::FindAndCreate() now loads embedded fallback font within Font_StrictLevel_Any level.
Font_FontMgr::FindFont() - fixed misprint in message, and customized message for range fallback error.
Font_FontMgr - added one more fallback Korean font for Linux.

vfont command has been extended with options to clear Font Manager content.
2019-10-27 00:43:06 +03:00
emv
5646c90e87 0030878: Modeling Algorithms - BRepLib_MakeFace produces face with abnormal surface
When collecting the points to build plane use the points on the curve instead of poles (in case of BSpline and Bezier curves).

Side effect changes:
Changes in Geom2dHatch_Elements are to increase the chance of correct 2d classification (by the means of Geom2dHatch_Classifier) by taking more than just one point on the edge to construct the classification ray and by checking if this ray is not tangent to the edge itself.
2019-10-24 17:47:28 +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
kgv
aaf8d6a98d 0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
The table of named colors has been compressed and moved out
from Quantity_Color.cxx into Quantity_ColorTable.pxx.

Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity.
Duplicating colors has been merged within enumeration:
  CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1,
  ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1.
Added aliases to several other common colors:
  BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1.

Quantity_Color class definition has been cleaned to follow OCCT coding style.
Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components.
Removed unused class Quantity_ColorDefinitionError.

New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB()
converting RGB components from linear to non-linear sRGB colorspace and vice versa.
Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.

Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
2019-10-22 15:15:51 +03:00
jgv
b008226203 0031023: Fillet regression in OCCT 7.4 from 7.3
Modify local static function ReorderFaces to be able to process multiple-faces-connecting vertices.
2019-10-22 15:15:50 +03:00
jgv
eff3eff916 0030940: BRepFilletAPI_MakeFillet algorithm fails on closed shell
1. Add check of configuration of corner in the end of spine.
2. Correct treatment of "smooth corners".
2019-10-22 15:15:49 +03:00
jgv
bf327822d6 0026071: BRepOffsetAPI_MakePipeShell produces rough result
1. Correct building history: the case of closed spine.
2. Rollback method GeomFill_CorrectedFrenet::InitInterval - correct processing singularities on spine.
3. Correct test cases.
2019-10-22 15:15:48 +03:00
jgv
63da0df9c2 0031066: Infinite loop in ShapeUpgrade_UnifySameDomain
Modification in local static method TransformPCurves - compute real U And V bounds of a face and use them in further computations.
2019-10-22 15:15:47 +03:00
skl
13a44c4b7f 0029068: Data Exchange - Invalid rotation of result shape after import attached STEP file
Changes for using Axis Placement(not used during creation of assembly) as transformation for root Shape Representation.
Test for bug 29068 and auxilary command are added.
2019-10-22 15:15:46 +03:00
aml
f04de1335c 0030932: Modeling Algorithms - Invalid result on 2d curve on surface approximation
New method generating 3D curve is added when 2D curve is linear isoline.
2019-10-22 15:15:46 +03:00
emv
c08fd12706 0029843: Modeling Algorithms - Boolean FUSE produces incorrect result
When splitting the shell/face with internal faces/edges use the 'internal' criteria of the face to choose the way to create loops.

Side effect changes:
- When performing Boolean operation - move the objects located far from Origin to the Origin to increase the accuracy of intersections.
2019-10-22 15:15:45 +03:00
ifv
d7992a77f6 0031029: BRepLib::SameParameter regression in OCCT 7.4 from OCCT 7.3
1. BRepLib.cxx: calculation of 2d tolerance is changed in method BRepLib::SameParameter(Edge..)
2. Geom2dConvert.cxx: incorrect comparing
"SquareDistance < tolerance"
is replaced by
"SquareDistance < tolerance*tolerance"
because tolerance is linear value.
2019-10-22 15:15:44 +03:00
kgv
8c787b5fa9 0031050: Data Exchange - XmlXCAF persistence stores triangulation-only Faces without any geometry
BRepTools_ShapeSet now ignores myWithTriangles flag in case if triangulation is the only geometry representation.
2019-10-22 15:15:43 +03:00
ifv
44fafc477f 0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()
1. src\BRepSweep\BRepSweep_NumLinearRegularSweep.cxx

Fix bug by adding result in list of generated shapes, if initial shape is vertex, edge or face.

2. src\BRepLib\BRepLib.cxx

Add protection against treatment not geometric edge in BRepLib::UpdateInnerTolerances(...)

3. Add test case for bug and correct test for bug 30346 according to new behavior of algorithm
2019-10-22 15:15:43 +03:00