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

45 Commits

Author SHA1 Message Date
kgv
15669413da 0029346: Visualization, TKOpenGl - collect frame statistics
Graphic3d_RenderingParams::ToShowStats - new option displaying rendering statistics.

OpenGl_FrameStats - new class for accumulating frame statistics.
OpenGl_Context::FrameStats() provides an access to the frame stats
used for currently rendered context.
OpenGl_View::Redraw() and OpenGl_View::RedrawImmediate()
resets counters within OpenGl_Context::FrameStats().

OpenGl_Layer::UpdateCulling() - simplified resetting of culling state for cullable structures.
2017-12-01 15:36:55 +03:00
kgv
992ed6b3c0 0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
Graphic3d_CLight is now defined as a class inheriting Standard_Transient,
so that it's fields now should be accessed through methods.
Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere.
Confusing alias OpenGl_Light has been removed.

Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed
since it contradicts to OpenGL specs and does not make sense.

Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer.
When defined, it overrides light sources defined for View/Viewer.
New class Graphic3d_LightSet has been defined to define a set of light sources.

V3d_Light - removed obsolete interface for debug drawing lights sources.
V3d_Light is now an alias to Graphic3d_CLight.
V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
2017-11-30 23:09:23 +03:00
msv
977ad98334 0029234: BRepOffsetAPI_NormalProjection produces INTERNAL edges and vertices
Make the algorithm BRepOffsetAPI_NormalProjection use section operation instead of common to get the edge-result of projection to be in face restrictions.

Correct Boolean operation algorithm to produce correctly oriented result in the case of common between face and edge.

The algorithm ShapeUpgrade_UnifySameDomain has been patched to correctly gather same domain faces in a compound.

The TCL script snowflake.tcl has been corrected to get rid of dependence on the order of edges in the result of Boolean operation.
2017-11-14 16:52:41 +03:00
msv
f16a6cc5aa 0028467: Improve UnifySameDomain performance
This patch turns off some not needed modes of fix in the called ShapeFix_Face algorithm.

It stores pcurves on planes in the edges to avoid repeated computation of the same pcurves many times (it is done only when SafeInputMode is false).

It avoids unnecessary replace/apply actions in the modification context.

It removes the code that makes decomposition of surface of the face on several faces.

The new command buildpcurvesonplane has been added, which builds and stores pcurves of edges on planar faces. This is useful for investigations how presence of pcurves on planes influence performance of algorithms.

Make drawing of dimension line in snowflake test independent on the order of vertices in the result.
2017-11-14 15:56:53 +03:00
kgv
1136702b93 0029075: Configuration - fix TKService linkage errors due to usage of GLX functions while using EGL
Xw_Window, fixed usage of GLX functions for choosing Visual
when building with HAVE_EGL/HAVE_GLES2 options.
2017-09-22 11:51:42 +03:00
dbp
05aa616d6d 0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
supported scattering model. All new parameters are available via 'vbsdf' command.

Location of new sample for few material examples:
samples\tcl\pathtrace_materials.tcl

Fix shader compilation issue.

Fix test case sample_ball_alpha.

Shaders_PathtraceBase_fs.pxx - regenerate resource from origin
2017-03-03 16:11:21 +03:00
dbp
6e728f3b5c 0027974: Visualization, ray tracing - Improve ray tracing engine
* Multiple importance sampling for path tracing
* Improved light sources sampling (better handling several light sources)
* Fixed issues in light source intersection (light distance is taken into account)
* Add new TCL sample - OCCT Ball model for demonstrating physically-based materials
* Fix potential issue on NVIDIA GPUs ("Error: Failed to upload light source buffer")
* Path tracing materials reviewed; directional light source was smoother by default
2016-11-08 16:43:23 +03:00
dbp
3a9b5dc86a 0027607: Visualization - Implement adaptive screen space sampling in path tracing
This commit provides useful functionality for path tracing rendering core.

1) Graphic3d_RenderingParams class was extended with additional AdaptiveScreenSampling option (disabled by default).
   If this option is enabled, path tracing tries to adjust the number of samples for different screen areas.

   In this way, the more complex areas (from the point of light conditions) are sampled more intensively,
   while the simple areas are sampled very rarely.
   For example, caustics and glossy reflections are typical candidates for more precise sampling.

   In general, this allows to equalize image convergence and not to waste resources for already converged areas.
   It is also possible to visualize sampling densities by enabling ShowSamplingTiles option
   (activating and deactivating this option does not affect on the accumulated image).

2) Mixing OpenGL and ray-tracing output has been changed.
   Now blending is performed using OpenGL functionality, while ray-tracing shaders only output correct Z-value.

Test case bugs vis bug27083 has been updated,
since the alpha value is now correctly set by Ray-Tracing to 1, opaque.
2016-09-30 11:17:10 +03:00
kgv
d509e5a43f 0027731: Visualization, OpenGl_AspectMarker - handle fractional marker Scale when sharing resources
OpenGl_AspectMarker::Resources::SpriteKeys() now encodes decimal number of marker scale into resource key,
since built-in markers are defined with 0.5 scale step.
2016-08-04 11:45:38 +03:00
kgv
fd59283a7b 0027633: Visualization, TKOpenGl - point sprites are inconsistent within Core and Compatible Profiles
OpenGl_ShaderManager::pointSpriteAlphaSrc() now does not return alpha from Red channel
for RGBA marker texture in Core profile.
OpenGl_ShaderManager::prepareStdProgramFlat() - restored code for drawing points without texture.

Built-in GLSL programs now flip .y in shaders instead of
relying on GL_POINT_SPRITE_COORD_ORIGIN unavailable on OpenGL ES.

Added sample markers.tcl (moved from test cases).
Sample now includes marker_kr.png for testing marker orientation.
2016-07-07 15:15:50 +03:00
abv
747db83cdd 0027599: Test "demo samples snowflake" does not clear internal data after execution
Useless save command is removed
2016-06-16 12:17:16 +03:00
isk
83da37b115 0026434: Visualization - Textured objects should have priority over the environment mapping.
Add handle on environment texture in OpenGl_Workspace.
Add a new parameter UseEnvironmentTexture to the Graphic3d_ZLayerSettings.
OSD layers don't use environment texture by default.
zbuffertrihedron doesn't use environment texture.
vzlayer can enable/disable environment texture mappping.
Delete unnecessary files Graphic3d_TypeOfSurfaceDetail.hxx and V3d_TypeOfSurface.hxx.
Delete functions SurfaceDetailType and SetSurfaceDetailType functions from Graphic3d_CView.
Delete functions SurfaceDetailState and UpdateSurfaceDetailStateTo from OpenGl_ShaderManager.
Delete class OpenGl_SurfaceDetailState.
Delete functions SurfaceDetailType and SetSurfaceDetailType from OpenGl_View.
Delete functions SetSurfaceDetail and SurfaceDetail() from V3d_View.
Delete functions SetDefaultSurfaceDetail and DefaultSurfaceDetail from V3d_Viewer.
Delete draw command VSetTextureMode.
Add description in dox.
2016-04-22 15:21:32 +03:00
msv
fe1a6e4e54 0027082: UnifySameDomain must add internal edges where appropriate to resolve self-intersections
The new option AllowInternalEdges has been added in the class ShapeUpgrade_UnifySameDomain. It determines how the algorithm treats the situation when two faces can be merged together but they have connection with another face via the common edge.

With this option turned on, merging of such faces is not stopped, but the multiconnected edges are added to the merged face as INTERNAL edges.

By default it is false. In this mode such merging is forbidden, so the result shape will not contain any new INTERNAL edges.

The behavior of the algorithm has been changed so that it does not merge faces from different shells.
2016-04-08 11:42:26 +03:00
abv
63fad07eb4 0027338: Minor corrections in Tcl samples and documentation
In samples:
- Fixed syntax error in DataExchangeDemo.tcl
- MSAA is enabled in some tests to provide better presentation
- Option to build isolines on triangulation is used in some samples to avoid artifacts in selection highlight
- Colors are corrected in cpu.tcl

In documentation:
- Reference to automake tools is removed
- Standard_OVERRIDE is expanded to "override"
2016-04-04 16:46:09 +03:00
ski
4b3541c68b 0027176: Configuration, CMake - INSTALL_DIR is a common prefix for all other install variables
Possibility to customize layout of installation of OCCT is introduced by:
- variable INSTALL_DIR_LAYOUT - select one of the two predefined layouts: either Windows (classic OCCT layout) or Unix (Linux standard)
- variables INSTALL_DIR_* (BIN, LIB, INCLUDE, RESOURCE, DOC, TESTS, SCRIPT, SAMPLES, DATA) - specify locations of relevant components
- variable INSTALL_DIR_WITH_VERSION (bool) - specifies whether full version of OCCT should be used in paths in Unix layout

Files LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt are always installed.

Environment is extended to support non-default layouts.
For that, environment variables "CSF_OCCT*Path" are defined, corresponding to CMake variables INSTALL_DIR_* described above.
Visual Studio environment, DRAW, tests, samples are amended to use these variables instead of (or as alternative to) CASROOT.

Settings of Products-specific vars are removed from environment scripts.

File genconf.bat was corrected to avoid error message for the case when path to TCL contains spaces.

Product name in rc files changed to "Open CASCADE Technology".
2016-03-18 09:44:11 +03:00
kgv
d8d342451d 0027250: Samples - define proper file header for pathtrace.tcl
Sample "Path tracing" is corrected to be shown in Visualization section, and to explain what it does during execution
2016-03-12 09:18:10 +03:00
kgv
2674244cde 0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
Use std::mt19937 random number generator instead of rand() in NCollection_UBTreeFiller.

boolean gdml_private ZI7 ZJ7 - TODO "bopcheck failed" is only for Linux now, checkshape faulty is unstable (issue #27052)
boolean volumemaker B6 - Added TODO (bopcheck and checkshape faulties)
boolean volumemaker C9 - Added TODO (checkprops and checkshape faulties)
boolean volumemaker D2 - Added TODO (checkshape faulty)
boolean volumemaker H4 - Added TODO (checkprops and checkshape faulties Linux only)
boolean volumemaker D5 - IMVPROVEMENT, TODOs were deleted (bopcheck and checkshape faulties)
bugs modalg_1 buc60462_2 - modified TODOs according to new behavior
boolean gdml_private ZI7 ZJ7 - unstable case, added check for surface area and TODO

samples/tcl/ANC101.tcl - amended due to changed order of edges in BOP result
2016-02-20 10:09:42 +03:00
ssv
ba3d7cdfbb 0026260: Tcl scripts for MBB Gehause Rohteil and ANC101 to be added to Samples
Two new sample scripts added, modeling classic shapes from used for comparing modeling systems in 1979 and again in 1983 by Computer Aided Manufacturing International (CAM-I).
2016-02-12 00:06:04 +03:00
mkv
4d4b43db21 Update test cases after integration fix for 26607 2015-10-02 14:53:55 +03:00
emv
9526aa6a8a 0026565: Compsolid after cut becomes compound of solids
Changed the rules for the types of the arguments for different operations:
1. FUSE:   All arguments and tools should have the same dimension;
2. CUT:    The MAXIMAL dimension of the ARGUMENTS should be less
           or equal to the MINIMAL dimension of the TOOLS;
3. CUT21:  The MINIMAL dimension of ARGUMENTS should be grater
           or equal to the MAXIMAL dimension of the TOOLS;
4. COMMON: The arguments and tools could have any dimensions.

For the arguments of collection type (WIRE, SHELL, COMPSOLID)
the type will be passed into the result of the operation.

The documentation should be updated according to new behavior.

Documentation has been updated.

Implemented suggestions by MSV and some grammar changes.

Test cases for issue CR26565

Correction of test cases for issue CR26565

Correction of test cases for issue CR26565
2015-10-01 14:49:29 +03:00
isk
27af30526d 0025777: the standard views are defined incorrectly and mismatch the old display.
Old vright equals new vfront, old vfront equals new vright, old vleft equals new vback, old vback equals new vleft.
2015-09-10 16:36:40 +03:00
isk
ac84fcf602 0024272: Provide basic text formatting routines for Font_BRepFont
Add new class Font_BRepTextBuilder for generation of formatted BRep text.
Delete method Font_BRepFont::RenderText(), which should be replaced by Font_BRepTextBuilder::Perform().
2015-08-27 15:30:11 +03:00
mkv
a0e30f8422 Adjusting testing case 2015-08-21 13:19:25 +03:00
dbp
8c820969cc 0026437: Visualization - Improve path tracing rendering engine
Fix compile warnings.
2015-07-30 12:50:41 +03:00
abv
031224c91c 0026307: Minor improvements in snowflake sample
- background is set to while, and lines are black
- dimension line added
- category is corrected
2015-06-04 14:40:14 +03:00
isk
29e2c6d247 0022785: Draw Harness - add possibility to remove a text drawn by the command vdrawtext
AIS_TextLabel - new public class to display simple text labels (based on MyTextClass private class from Draw Harness).
ViewerTest::Display() - add more reliable replacement for VDisplayAISObject() with no viewer update flag.

vdrawtext command redesign:
- Use new AIS_TextLabel class instead of private MyTextClass.
- Take object name and allow to clear labels from the Viewer.
- Use parameter name + parameter value syntax instead of strict list of mandatory arguments.
- Use [0; 1] range for colors and accept names.
- Drop redundant argument "isMultiByte".
- Support argument -noupdate to skip Viewer update.

Update test cases to new syntax of vdrawtext.
2015-05-06 15:06:47 +03:00
apn
7cb899171d Updated script so it creates bottle using fuse operation between body and thread. 2015-04-24 13:25:46 +03:00
ibs
5bffb88282 0025687: Visualization, XCAF - eliminate visual artifacts at the edges of faces
AIS_ColoredShape::Compute() - improve logic to split input shape into Closed and Open volumes
with back-face culling enabled when possible.

Change last argument of method StdPrs_ShadedShape::Add() from boolean to enumeration StdPrs_Volume
which controls parsing of Closed/Open volumes within input shape.
Make method StdPrs_ShadedShape::ExploreSolids() public.

Extend Draw Harness command vaspects with option -setvisibility to hide subshape (using AIS_ColoredShape).
Add new test cases bugs/bis/bug25687_1 and bugs/bis/bug25687_2.

the logic of bindSubShapes method clarified

Conflicts:

	src/AIS/AIS_ColoredShape.cxx

AIS_ColoredShape::dispatchColors considers the colors of displayed shapes in connection with specific priority

the color of specific shape can be exported from several ways: the color of this shape, the color of a compound containing this shape. The highest priority has the color of shape than the one of the compound. The color with highest priority will be displayed.

This patch accounts for the highest priority of the shape color.

For example: w - wire has GREEN color; e - edge has RED color; "w" contains "e"; all edges of "w" will be displayed in GREEN color except "e" edge, it will be displayed in RED color

Added sample generating model of Intel i7-4790 CPU on which the problem can be reproduced
2015-02-26 12:51:24 +03:00
abv
92ac0eb708 0025570: New Tcl sample scripts created for CAD Assistant
Three new sample scripts created during development of CAD Assistant for Android added in samples/tcl:

- Penrose.tcl: creation of Penrose triangle made of boxes resembling ones from OCC logo
- pencil.tcl: creation of colored pencil model
- snowflake.tcl: creation of 2d drawing of snowflake
2014-12-26 12:26:10 +03:00
aba
7a733b194b 0025430: DRAW Test Harness: dimensions demo fails
- corrected vdimparam help string;
- added section model file to prevent changing of subshapes order after explode call
2014-11-21 13:33:11 +03:00
mkv
2da38dd24c 0025354: Intersection operation
Update dimensions tcl sample due to new order of edges after explode.
2014-10-30 12:58:05 +03:00
isz
ab91ab6fea 0025231: DRAW - make top level menu useful
-Meaningful texts are provided instead of commands in File menu (e.g. restore->Load Shape (restore))
-tk_getOpenFile is used in "open file" dialogs
-tk_chooseDirectory is used in "change directory" dialog
-Added menu "Help" with submenus "System info", "Commands", "About", "User Guide"
-Added menu "Samples" with submenu "View samples"
-Added menu "Load" with submenus "pload <Module>"
2014-10-10 16:08:26 +04:00
aba
0499eb0670 0025235: Draw Harness - improve commands vdimension and vdimparam
Make commands syntax to meet coding rules.
Correct angle dimension initialization to allow ellipse input geometry with equal radii.
Change default value of arrow angle for dimensions (from 20 to 12 degrees).
Add arlength, arangle, textmode, textsize to vdimension and vdimparam Draw commands.
Add color parameter to vdimension and vdimparam.
Display dimensions by default.

Add dimensions demo script samples/tcl/dimensions.tcl.

Add file for test case for issue CR25235
2014-10-02 14:03:02 +04:00
kgv
4e18052b7d 0025198: Draw Harness - add -noupdate option to vsetlocation command
Add sample for demonstrating display of multiple objects, evaluating viewer performance, and scene animation

cosmetics
2014-09-18 15:17:44 +04:00
abv
a347ef35b4 0025236: Sample DRAW script to demonstrate XDE features
New sample added for XDE; test cases added for this and some other samples; description of Tcl samples in Overview updated
2014-09-18 14:30:08 +04:00
dbp
bc8c79bbd5 0024887: Visualization - revise and extend Raytracing controls
Fix material test case.
Fix ray-tracing test case and sample.
2014-05-22 19:00:18 +04:00
dbp
44c7c33eb0 0024855: Revision of parameters of standard materials
Improve consistency and visual appearance of predefined OCCT materials in various rendering modes, including ray-tracing:
- Increase the specular exponents (shininesses) for metallic surfaces: Brass, Bronze, Copper, Gold, Pewter, Silver, Steel, Chrome, Aluminum.
- Revise specular colors for metals: Copper, Gold, Aluminum, Silver (according to "Real-Time Rendering, 3rd Edition", AK Peters 2008).
- Increase diffuse reflection of metals: Silver, Aluminum, Chrome (to make them brighter in OpenGL mode).
- Extend Material definition by Refraction Index.
  Advanced rendering methods based on shaders or ray-tracing can utilize it to produce refraction effects.

In addition:
- Introduce three translucent materials: Water, Glass, and Diamond.
- Add Charcoal for modeling dark diffuse surfaces.

Add new TCL-based sample (materials.tcl) and test case (tests/v3d/materials/bug24855).
2014-05-15 19:59:28 +04:00
dbp
fc73a20256 0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and portability
RayTracing - disable reflections by default
Fix possible compilation issue on Mac OS X.
2014-04-04 14:15:08 +04:00
abv
07b5cb8f23 0024758: Sample DRAW scripts for demonstrating sweeping algorithm
Two scripts added:
samples/tcl/drill.tcl: creates model of a twist drill bit
samples/tcl/cutter.tcl: creates simplified model of a milling cutter
Added test cases bugs/modalg_5/bug24758_1 bug24758_2
2014-03-28 15:55:17 +04:00
abv
124021462e 0024587: Separate TCL samples for ray tracing and creation of bottle
New sample created for ray tracing in DRAW: samples/tcl/raytrace.tcl, rendering OCCT bottle with glass on a rectangular table, with shadows and reflections (if OpenCL is available). Sample bottle.tcl retains only modeling part.
2014-02-06 10:56:16 +04:00
bugmster
480bf81e37 0024428: Implementation of LGPL license
Update of OCCT samples source code due to moving to LGPL license
2013-12-17 12:43:15 +04:00
abv
821edd22a9 Ray tracing activated in bottle sample if available; test bugs vis bug21753 added 2013-11-05 10:19:59 +04:00
isn
b514beda8a 0024181: Text to BRep functionality
Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation.
New text2brep Draw Harness command.

bottle.tcl - draw text on the bottle side using new functionality.
ViewerTest - process Delete key in 3D-Viewer to delete selected presentations.
Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested.

bottle.tcl - use prism instead of pipe

TKViewerTest - add required FreeType dependency

verase - display the list of erase objects

TKViewerTest - add required FreeType dependency for projects generation
2013-10-10 14:12:29 +04:00
vtn
400933675f 0023087: Upgrade of the OCCT test system
Integration of new occt testing system
2012-07-13 11:42:23 +04:00
abv
03392dd2e7 0023136: Increase visibility of DRAW samples
Tcl samples moved from src/DrawResources to samples/tcl.
Scripts VisualisationDemo.tcl and ModelingDemo.tcl fixed to work on Windows.
File wing.brep moved from src/DrawResources to data/occ, and DataExchangeDemo.tcl corrected.
OCAFDemo.tcl removed, as it has little sense and referred data files are lost
Added sample Tcl script creating a model defined on the 'Open CASCADE challenge' web page
2012-05-18 15:05:29 +04:00