1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

..

41 Commits

Author SHA1 Message Date
kgv
0b48d1fa36 0032708: Visualization, V3d_View::SetImmediateUpdate() - deprecate and disable by default implicit View redraws 2021-12-02 17:02:47 +03:00
kgv
fec3e2b9f6 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters
Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects.
Added missing initialization of default properties in AIS_InteractiveContext.
AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations.
2021-12-01 20:18:50 +03:00
Dzmitry Razmyslovich
4a837ecec2 0031087: Configuration - make FreeType dependency optional [part 2] 2021-11-26 18:51:36 +03:00
isn
58c0958b50 0029406: Foundation Classes - gp_Ax3 fails setting direction
Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction.
2021-11-26 18:50:18 +03:00
nbv
323e88ada7 0030365: Modeling Algorithms - Create tool to compute deviation between any 2D-curve and some its segment
Adds two new overloaded 'ComputeDeviation()' function (approx & exact) to GeomLib_Tool class to calculates the parameter in the curve where the maximum deviation is obtained between the curve and the line segment connecting its points with the specified parameters

Adds new '2ddeviation' DRAW command for 'ComputeDeviation()' functional testing
2021-11-26 18:49:17 +03:00
kgv
d0cf7e8f3c 0032684: Draw Harness - fix Draw_Interpretor::Add() misuse due to overloaded syntax 2021-11-25 19:56:06 +03:00
kgv
4e69a6ac05 0032685: Draw Harness - help output smashes command names without delimiter
"help" procedure now ensures to put space between listed commands.
2021-11-25 19:54:46 +03:00
kgv
b6b55c3d96 0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events
Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events.
Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux.
2021-11-25 19:51:15 +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
kgv
e1aa4ee31f 0032682: Draw Harness, ViewerTest - add -rotationMode and -navigationMode to vcamera 2021-11-25 00:35:25 +03:00
kgv
120dec9fb3 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined 2021-11-22 19:05:31 +03:00
kgv
3bbcf114f0 0032680: Visualization, AIS_TextLabel - Bold FontAspect doesn't work
Prs3d_TextAspect now sets Font_NOF_SERIF as default font
instead of confusig Font_NOF_ASCII_TRIPLEX (Times-Bold).
Therefore, default font now uses regular aspect, not bold.

Command vdrawtext does no more set "Courier" font by default.
2021-11-22 19:04:09 +03:00
kgv
d62df471b2 0032677: Coding Rules, Geom_BezierSurface - eliminate GCC warning -Wmaybe-uninitialized -fsanitize=undefined
Fixed initialization of TColStd_Array1OfReal for weights.
2021-11-22 19:02:55 +03:00
kgv
7ac3f543c7 0032675: Draw Harness, ViewerTest - remove command vr
Removed unused commands vr and Draft.
2021-11-22 19:01:19 +03:00
kgv
7c3daf20d1 0032676: Draw Harness, ViewerTest - fix NULL dereference on vanim -remove 2021-11-22 18:59:53 +03:00
aml
a81bd74a38 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] 2021-11-22 18:58:00 +03:00
kgv
c1e15aa538 0023398: Documentation, Shape Healing User's Guide - example does not compile
Fixed some misprints in the documentation.
Removed description of non-existing Message_TraceFile.
2021-11-21 12:42:10 +03:00
msv
519c84b43e 0030054: BRepOffset_MakeOffset fails to build joints in intersection mode
Test case has been added.
2021-11-21 12:42:10 +03:00
kgv
794b3d8936 0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape
SelectMgr_RectangularFrustum::OverlapsCylinder() - added missing 3D point transformation.
StdSelect_BRepSelectionTool::ComputeSensitive() - fixed cylinder height computation on TopoDS_Shape with scale transformation.
SelectMgr_AxisIntersector::OverlapsCylinder(),::OverlapsSphere() - added missing computations of surface normal.
2021-11-21 12:42:10 +03:00
kgv
c8365a1c28 0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported.
In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content
and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0.

env.bat.in has been corrected to include path to custom ANGLE (GLES2_DIR)
in front of Qt which might include its own older ANGLE build.
2021-11-21 12:42:10 +03:00
dipts
45143b7a24 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx
Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx.
Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus,
AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive.
2021-11-21 12:42:09 +03:00
dipts
9eab1511b0 0032661: Coding - Forward class declaration in ProjLib collides with typeref
Removed redundant forward declarations from ProjLib.hxx.
2021-11-21 12:42:09 +03:00
akaftasev
0ffecc2fc7 0032448: Modeling Algorithms - Provide exact validating (as option) using GeomLib_CheckCurveOnSurface
Add '-exact' option to checkshape command to use exact method to validate edges using BRepLib_ValidateEdge class. Default mode is calculating in finite number of points.
2021-11-21 12:42:09 +03:00
kgv
6eddc28410 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md 2021-11-21 12:42:09 +03:00
Xu Zhongxing
97e80b8c30 0032649: Bug in BRepLib::EnsureNormalConsistency()
Fix a typo in variable name.
2021-11-21 12:42:08 +03:00
rkv
57c5e9e895 0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings 2021-11-21 12:42:08 +03:00
kgv
2b40ee81d1 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer()
Added missing break.
Fixes reading of glTF files with Normal attributes preceding Position
(and eliminates redundant / erroneous copy when Position attributes precede Normal).
2021-11-21 12:42:08 +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
kgv
e77bcb6b57 0032655: Configuration, qmake - add missing CSF_Draco
Added CSF_Draco to OccToolkit.pri.
Removed libXmu.so search from genconf.
2021-11-21 12:42:07 +03:00
inv
d4edeaed31 Increment OCCT version up to 7.7.0dev 2021-11-21 12:42:07 +03:00
inv
80ffc5f84d Update version up to 7.6.0 2021-11-01 18:12:14 +03:00
kgv
d1069cad4b 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option
Fixed handling of -s=<search_mode> option.
Fixed handling of -mathjax=<path> option.
2021-11-01 18:12:14 +03:00
akaftasev
0c4931e873 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection()
2021-10-29 17:18:18 +03:00
btokarev
3ea347e562 0032551: Documentation - Novice user guide for OCCT Documentation
Added novice guide.
Improved structure of Tutorials & Samples.
2021-10-29 17:08:16 +03:00
dpasukhi
510d099d15 0028104: Data Exchange - Extract sub-assembly (XDE)
- Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
- Added XCAFDoc_Editor::Extract to transfer part to a new location
  - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
- Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
- Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
- Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
- Protected against creating a new label for non-existent tools via extract or expand process
2021-10-28 22:04:04 +03:00
ski
5bd54bef32 0024975: Improve of preprocessor directives in header files to be equal to the file name
Preprocessor directives were changed or created by function "check_headers" from script adm/upgrade.tcl (CR24816)
2021-10-27 21:00:02 +03:00
kgv
4f7ad5fb76 0032640: Coding Rules - fix misprints in GeomliteTest_API2dCommands.cxx 2021-10-27 20:58:18 +03:00
aml
f706c128c2 0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM] 2021-10-27 20:57:19 +03:00
asuraven
209ae313a5 0032031: Analyze Precise HLR behaviour in Draw/AIS
- Set "Algo" as default HLR algorithm in MFC HLR sample
2021-10-26 23:12:30 +03:00
knosulko
81f57d1135 0030046: Modeling Algorithms - Cannot find necessary projection of the curve
move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform;
fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve;
new treatment of myMaxDist;
use extend bounds in approximation;
add test;
test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior.
2021-10-26 23:10:34 +03:00
ifv
9923f08703 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps
GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries
bug32557 - test is updated by new cases
2021-10-25 11:18:27 +03:00
1034 changed files with 5993 additions and 6565 deletions

View File

@@ -115,6 +115,9 @@ if (MSVC)
endif()
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
endif()
if (BUILD_SHARED_LIBS)
if (APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}")

View File

@@ -1251,13 +1251,13 @@ proc wokdep:SearchX11 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
return "$isFound"
}
set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH"]
if { "$aXmuLibPath" == "" } {
set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH" "/usr/X11/lib"]
if { "$aXmuLibPath" != "" } {
set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH"]
if { "$aX11LibPath" == "" } {
set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH" "/usr/X11/lib"]
if { "$aX11LibPath" != "" } {
#lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib"
} else {
lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}Xmu.${::SYS_LIB_SUFFIX}' not found (X11)"
lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}X11.${::SYS_LIB_SUFFIX}' not found (X11)"
set isFound "false"
}
}

View File

@@ -236,9 +236,11 @@ proc gendoc {args} {
return -1
}
} elseif {$arg_n == "s"} {
if { [ lsearch $args_names "pdf" ] == -1 } {
if { [ lsearch $args_names "pdf" ] != -1 } {
puts "Warning: search is not used with PDF and will be ignored."
continue
}
if {$args_values(s) != "NULL"} {
set SEARCH_MODE $args_values(s)
} else {
@@ -247,16 +249,16 @@ proc gendoc {args} {
}
} elseif {$arg_n == "mathjax"} {
if { [ lsearch $args_names "pdf" ] != -1 } {
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
puts "Warning: MathJax is not used with PDF and will be ignored."
}
set possible_mathjax_loc $args_values(mathjax)
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
set MATHJAX_LOCATION $args_values(mathjax)
puts "$MATHJAX_LOCATION"
} else {
puts "Warning: MathJax is not used with pdf and will be ignored."
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
puts " MathJax will be used from $MATHJAX_LOCATION"
}
} else {
puts "\nWrong argument: $arg_n"

View File

@@ -39,6 +39,10 @@ win32 {
DEFINES += _SCL_SECURE_NO_WARNINGS
} else {
CONFIG += c++11
clang {
QMAKE_CFLAGS_WARN_ON += -Wshorten-64-to-32
QMAKE_CXXFLAGS_WARN_ON += -Wshorten-64-to-32
}
QMAKE_CFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fvisibility=default

View File

@@ -26,6 +26,7 @@ HAVE_FFMPEG { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil }
HAVE_TBB { CSF_TBB = -ltbb -ltbbmalloc }
HAVE_ZLIB { CSF_ZLIB = -lzlib }
HAVE_LIBLZMA { CSF_LIBLZMA = -lliblzma }
HAVE_DRACO { CSF_Draco = -ldraco }
win32 {
CSF_kernel32 = -lkernel32
CSF_advapi32 = -ladvapi32

View File

@@ -131,6 +131,10 @@ if exist "%CASROOT%\custom.bat" (
call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB%
)
if not ["%QTDIR%"] == [""] (
set "PATH=%QTDIR%/bin;%PATH%"
set "QT_PLUGIN_PATH=%QTDIR%/plugins"
)
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%"
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
@@ -141,10 +145,6 @@ if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%"
if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%"
if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%"
if not ["%QTDIR%"] == [""] (
set "PATH=%QTDIR%/bin;%PATH%"
set "QT_PLUGIN_PATH=%QTDIR%/plugins"
)
rem ----- Set path to 3rd party and OCCT libraries -----
if not "%CSF_OCCTBinPath%" == "" (

View File

@@ -12,14 +12,18 @@ samples/samples.md
../samples/CSharp/ReadMe.md
../samples/CSharp/ReadMe_D3D.md
../samples/qt/AndroidQt/ReadMe.md
../samples/qt/IESample/ReadMe.md
../samples/qt/OCCTOverview/ReadMe.md
../samples/qt/Tutorial/ReadMe.md
../samples/java/jniviewer/ReadMe.md
../samples/ios/UIKitSample/ReadMe.md
../samples/webgl/ReadMe.md
../samples/glfw/readme.md
samples/ocaf.md
samples/ocaf_func.md
samples/draw_scripts.md
samples/novice_guide.md
tutorial/tutorial.md
build/build_upgrade.md

View File

@@ -6,6 +6,8 @@
tutorial/tutorial.md
samples/novice_guide.md
upgrade/upgrade.md
user_guides/foundation_classes/foundation_classes.md

View File

@@ -272,7 +272,8 @@ There are two types of third-party products, which are necessary to build OCCT:
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev rapidjson-dev
sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev
sudo apt-get install rapidjson-dev libdraco-dev
Building is possible with C++ compliant compiler:

View File

@@ -1,4 +1,4 @@
Draw Demo Scripts {#samples__draw_scripts}
Draw: Demo Scripts {#samples__draw_scripts}
================
All demo scripts are provided with OCCT sources and locate in <i>CASROOT/samples/tcl</i>. To play around them please

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

115
dox/samples/novice_guide.md Normal file
View File

@@ -0,0 +1,115 @@
Novice Guide {#samples__novice_guide}
=======
@tableofcontents
@section diffs Modeling with OCCT: Key differences
Open CASCADE Technology (OCCT) is an object-oriented C++ framework designed for rapid production of sophisticated CAD/CAM/CAE applications.
In other words, it provides endless possibilities for raw 2D and 3D modeling in C++ environment.
Unlike end-user software, it is used by the application developers and therefore strongly differs from the most popular CAD/CAM/CAE software packages.
OCCT provides building blocks enough for modeling, editing, visualization, and data interoperability of 2D and 3D objects.
By using OCCT, users can create the objects of their desire (or edit already existing ones) using raw code commands.
It is a more complicated process than using GUI-based software, but it provides much more flexibility than even script-based manipulations that are available within existing CAD/CAM/CAE applications.
However, to fully grasp the possibilities of OCCT it is best for the user to have previous experience in C++ at least at a basic level.
@section basics Understanding the principles
If you don't have any programming skills, grasping the full magnitude of OCCT workflow is still an option.
The documentation for OCCT contains several entry points for new users.
It will not explain all OCCT classes but will help to comprehend the workflow and help start thinking in terms of Open CASCADE Technology.
The most basic workflow is described in the @ref occt__tutorial "OCCT Tutorial" - this is an excellent starting point for new users.
In this tutorial you will create a solid model step-by-step using different classes and methods.
Each step of the tutorial contains code snippets and images.
The basics involved in the modeling process are explained.
When the basics of OCCT are clear, the next logical step is to check out @ref samples "sample applications" and examine those that suit your needs.
For these, the best starting point is **OCCTOverview** located in /samples/qt subfolder of OCCT installation.
This sample provides code examples for several actions as well as visualization of these code snippets output.
The Overview interface is dynamically changing based on selected **Category** at the menu.
Additional menu buttons will appear, providing users with subcategories and relevant commands to select one of the actions.
The result will appear in the viewer window, the code will appear at the top right, and in several cases the output will be produced at the bottom right window.
@figure{sample_overview_qt_viewers.png,"Comparison of 3D and 2D viewer windows",240} height=420px
The 3D viewer window has a row of preset interface buttons to customize the visual output.
Those buttons can be grouped into three types, left to right:
- View controls: **Fit all** and **Isometric**, will center the view and reset the camera angles respectively;
- Display mode customization: **HLR,** e.g. "Hidden line removal" (works only when shading is disabled) can be turned on and off;
solid models may be displayed either in **Shading** or **Wireframe** modes. **Transparency** level may be set for models in shading mode;
- The last four buttons in a row are beautifiers enabling Ray-tracing engine and configuring it's parameters.
At the bottom left of the screen the orientation cube (trihedron) is located.
The trihedron interactively shows the position of the camera in relation to the XYZ axis of the displayed data.
The sides of the trihedron are labeled to help with orientation.
Click on a side of the box to orient the camera view along the preferred axis.
The 2D viewer window lacks most of these elements and only have **Fit all** button.
The **Geometry** category of the Overview focuses on primitive objects like dots, lines (including vectors) or planes.
These objects will appear in the viewer after the subcategory is selected.
This section will demonstrate these entities both in 2D and 3D view mode and provide basic examples of parametric creation and data analysis.
@figure{sample_overview_qt_geometry.png,"",240} height=440px
The usage of the functions shown in the Overview is described more thoroughly at the @ref occt_user_guides__modeling_data "Modeling data" section of the documentation.
Additionally, @ref occt_user_guides__modeling_algos "Modeling Algorithms" are used in more complex cases.
The **Topology** section of the Overview demonstrates the functions used in 3D operations.
Multiple use cases are provided, including different object intersections, modifying and calculations.
Some of these use cases are described in the documentation, such as @ref occt_user_guides__inspector "Inspector" usage.
@figure{sample_overview_qt_topology.png,"",240} height=440px
The subsections are grouped as shown on the screenshot before.
Most shapes and primitive objects are introduced and then followed by a set of operations and interactions.
The **Triangulation** segment allows computing the number of triangles on a shape.
This may be inspected via [Poly_Triangulation Class Reference](https://dev.opencascade.org/doc/refman/html/class_poly___triangulation.html) -
a part of the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html),
an overall Open CASCADE code guide that may be used to inspect the key points in classes and their connections.
@figure{sample_overview_qt_triangulation.png,"",240} height=440px
The triangulation uses some of Mesh-related classes - see full description at @ref occt_user_guides__mesh "Mesh" documentation section.
The **Data exchange** section provides examples of how to export and import files of several different formats.
@figure{sample_overview_qt_xde.png,"",240} height=440px
The **OCAF** section gives an introduction for the @ref intro_overview_ocaf "Open CASCADE Application Framework" functionality.
To test these functions, create an object first (box or cylinder).
After that, the object may be modified and saved. Actions are recorded and may be undone or redone.
@figure{sample_overview_qt_ocaf.png,"",240} height=440px
**Viewers** section demonstrates examples of the 2D and 3D visualization outputs.
Check @ref occt_user_guides__visualization "Visualization" section of the documentation for a detailed description.
In addition to these two samples, there are much more that might be of use to a new user based on their particular use case.
Check Readme files in the sample directories to learn more about samples compilation.
**Note:** source code for OCCTOverview is stored at 'samples/qt/OCCTOverview/src' folder in your OCCT root,
and the source code files for examples presented in subsections are stored at 'samples/OCCTOverview/code folder'.
Several utility classes that are not presented in the example window may be found in example source code files.
The overall classes introduction may be found in the @ref occt_user_guides__foundation_classes "Foundation Classes" section of the documentation.
The "Introduction" section contains short descriptions of the most massive entries in the documentation.
@section helps Additional assistance
There are several places that may be of use for new users.
The first one is [Training & E-learning](https://dev.opencascade.org/resources/trainings) page that lists available trainings and describes their specifics.
The second one is the Overview documentation (this document is a part of it) - here you can find information that suits most of the use cases.
This may seem overwhelming at first, but if you have the clear understanding of what do you seek, you will most likely find the required information.
Aside from the Overview documentation itself, the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html) is present.
Use it to check classes descriptions, dependencies and examples.
Additionally, there is a [Forum](https://dev.opencascade.org/forums) where you can contact the OCCT community and developers.

View File

@@ -1,4 +1,4 @@
OCAF Usage {#samples__ocaf}
OCAF: Usage Tutorial {#samples__ocaf}
========
## Getting Started

View File

@@ -1,4 +1,4 @@
Function Mechanism Usage {#samples__ocaf_func}
OCAF: Function Mechanism {#samples__ocaf_func}
========================
Let us describe the usage of the "Function Mechanism" of Open CASCADE Application Framework on a simple example.

View File

@@ -1,176 +1,59 @@
Tutorials and Samples {#samples}
=====================
Tutorial: Modelling a Bottle
----------------------------
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
The purpose of the tutorial is not to explain all OCCT classes but
to help start thinking in terms of the Open CASCADE Technology.
- @subpage samples__tutorials
* @ref samples__novice_guide
<br>A document providing an introductory information to newcomers.
* @ref samples__draw_scripts
<br>A set of demo scripts demonstrating OCCT functionality from DRAW.
These scripts can be also considered as a tutorials on **Tcl** usage within @ref occt_user_guides__test_harness "Draw Harness".
* @ref occt__tutorial
<br>A programming tutorial teaching how to use OCCT services to model a 3D object.
See also @ref samples_qt_tutorial
* @ref samples__ocaf
<br>A set of code snippets performing typical actions with @ref occt_user_guides__ocaf "OCAF" services for newcomers.
* @ref samples__ocaf_func
<br>A simple example dedicated to the usage of "Function Mechanism" of @ref occt_user_guides__ocaf "OCCT Application Framework".
- @subpage samples__projects
* @ref samples_qt_iesample
<br>A cross-platform multi-document 3D Viewer sample with CAD import / export functionality based on **Qt Widgets** framework.
* @ref samples_qml_android_occt
<br>A cross-platform 3D Viewer sample with CAD import based on **QtQuick** framework.
* @ref samples_qt_tutorial
<br>A cross-platform sample application based on **Qt Widgets** framework and implementing @ref occt__tutorial.
* @ref samples_qt_overview
<br>A sample application interactively demonstrating OCCT C++ usage with code snippets for newcomers.
* @ref samples_mfc_standard
<br>A set of projects for Windows platform demonstrating OCCT usage based on **Microsoft Foundation Class** (**MFC**) library.
* @ref samples_csharp_occt
<br>A Multi-document 3D Viewer sample with CAD import / export functionality based on .NET and **Windows Forms** or **WPF**.
* @ref samples_csharp_direct3d
<br>3D Viewer sample wrapped into Direct3D context based on .NET and **Windows Presentation Foundation** (**WPF**).
* @ref occt_samples_webgl
<br>3D Viewer sample based on **Emscripten SDK** representing a static HTML page to be opened in Web Browser.
* @ref samples_java_android_occt
<br>3D Viewer sample with CAD import for Android mobile platform based on Android SDK and JNI layer.
* @ref occt_samples_ios_uikit
<br>3D Viewer sample for iOS platform based on Apple **UIKit** framework.
* @ref occt_samples_glfw
<br>A cross-platform 3D Viewer sample using **GLFW** library.
This tutorial assumes that the user has experience in using and setting up C++.
From the viewpoint of programming, Open CASCADE Technology is designed
to enhance user's C++ tools with high performance modeling classes, methods and functions.
The combination of these resources allows creating substantial applications.
@page samples__tutorials Tutorials and Demos
- @subpage samples__novice_guide
- @subpage samples__draw_scripts
- @subpage occt__tutorial
- @subpage samples__ocaf
- @subpage samples__ocaf_func
Read more about @subpage occt__tutorial
MFC
---------
Visual C++ programming samples containing 10 Visual C++ projects
illustrating how to use a particular module or functionality.
The list of MFC samples:
* Geometry
* Modeling
* Viewer2d
* Viewer3d
* ImportExport
* Ocaf
* Triangulation
* HLR
* Animation
* Convert
@figure{/samples/images/samples_mvc.png}
**Remarks:**
* MFC samples are available only on Windows platform;
* To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu;
* Read carefully readme.txt to learn about launching and compilation options.
See @subpage samples_mfc_standard "Readme" for details.
Qt
---
OCCT includes several samples based on Qt application framework.
These samples are available on all supported desktop platforms.
To start a sample on Windows use Open CASCADE Technology\\Samples\\Qt\\ item of the Start\\Programs menu.
Import Export
-------------
Import Export programming sample contains 3D Viewer and Import / Export functionality.
@figure{/samples/images/samples_qt.png}
Tutorial
---------
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
The purpose of the tutorial is not to explain all OCCT classes but
to help start thinking in terms of the Open CASCADE Technology.
This tutorial assumes that the user has experience in using and setting up C++.
From the viewpoint of programming, Open CASCADE Technology is designed
to enhance user's C++ tools with high performance modeling classes, methods and functions.
The combination of these resources allows creating substantial applications.
**See also:** @ref occt__tutorial "OCCT Tutorial"
Overview
---------
The Qt application providing samples for basic usage of C++ API of various OCCT functionality.
The samples are organized in several categories according to relevant module of OCCT:
* Geometry
* Topology,
* Triangulation
* DataExchange
* OCAF
* Viewer 2d
* Viewer 3d
Each sample presents geometry view, C++ code fragment and sample output window.
@figure{/samples/images/sample_overview_qt.png}
See \subpage samples_qt_overview "Readme" for details.
C#
---
C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends).
@figure{/samples/images/samples_c__ie.png}
Import:
* BRep
* Iges
* Step
Export:
* Brep
* Iges
* Step
* Stl
* Vrml
See @subpage samples_csharp_occt "C# sample Readme" for details.
There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end.
See @subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details.
Android
---------
There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml)
jniviewer
@figure{/samples/images/samples_java_android_occt.jpg}
Java -- See @subpage samples_java_android_occt "Android Java sample Readme" for details.
AndroidQt
@figure{/samples/images/samples_qml_android_occt.jpg}
Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details.
iOS
---
There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework.
@figure{/samples/images/sample_ios_uikit.png}
See @subpage occt_samples_ios_uikit "iOS sample Readme" for details.
Web
---------
WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in `samples/webgl`.
@figure{/samples/images/sample_webgl.png}
See @subpage occt_samples_webgl "WebGL sample Readme" for details.
OCAF Usage Sample
------------------
The provided set of samples dedicates to get initial knowledge about typical actions with OCAF services. It may be
useful for newcomers.
Read more about @subpage samples__ocaf
OCAF Function Mechanism Usage
-----------------------------
This simple example dedicates to the usage of "Function Mechanism" of OCCT Application Framework. It represents a "nail"
composed by a cone and two cylinders of different radius and height.
Read more about @subpage samples__ocaf_func
Draw Demo Scripts
------------------
A set of demo scripts demonsrates using OCCT functionality from DRAW. These scripts can be also considered as a
tutorials on tcl usage within Draw.
Read more about @subpage samples__draw_scripts
@page samples__projects Sample Projects
- @subpage samples_qt_iesample
- @subpage samples_qml_android_occt
- @subpage samples_qt_tutorial
- @subpage samples_qt_overview
- @subpage samples_mfc_standard
- @subpage samples_csharp_occt
- @subpage samples_csharp_direct3d
- @subpage occt_samples_webgl
- @subpage samples_java_android_occt
- @subpage occt_samples_ios_uikit
- @subpage occt_samples_glfw

View File

@@ -1,4 +1,4 @@
Tutorial {#occt__tutorial}
Modeling: Bottle Tutorial {#occt__tutorial}
=======
@tableofcontents

View File

@@ -2293,3 +2293,35 @@ void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface,
- *BRepAlgo_Cut*
- *BRepAlgo_Section*
The corresponding classes from the *BRepAlgoAPI* package have to be used instead.
@section upgrade_occt770 Upgrade to OCCT 7.7.0
@subsection upgrade_occt770_parallel_flag_removed Removed parameter theIsParallel from Put/Compute/Perform
theIsParallel parameter has been removed from Put/Compute/Perform from the next classes:
- BRepCheck_Analyzer
- BRepCheck_Edge
- BRepLib_ValidateEdge
- GeomLib_CheckCurveOnSurface
- BRepLib_CheckCurveOnSurface
Now, to set this flag, it is necessary to use method SetParallel()
For example:
~~~~{.cpp}
BRepLib_ValidateEdge aValidateEdge(myHCurve, ACS, SameParameter);
aValidateEdge.SetParallel(toRunParallel);
aValidateEdge.Process();
~~~~
@subsection upgrade_occt770_drawer_aspects Prs3d_Drawer aspects
`Prs3d_Drawer` getters no more implicitly create "default" aspects.
If specific property has not been set before to this drawer instance nor to linked drawer instance, then NULL property will be returned.
Make sure to set property beforehand or to call `SetOwn*` / `SetupOwn*` methods to derive from defaults.
@subsection upgrade_occt770_view_immupdate V3d_View implicit updates
`V3d_View::SetImmediateUpdate()` flag has been deprecated and is now disabled by default.
So that methods like `V3d_View::Rotation()` or `V3d_View::Panning()` will no more automatically redraw View contents.
Application relying on previous behavior still may use `V3d_View::SetImmediateUpdate()` to turn back implicit updates,
but encouraged to update their code and put explicit `V3d_View::Redraw()` where necessary, as this functionality will be removed in future.

View File

@@ -1967,21 +1967,6 @@ vsensera
~~~~
Erases active entities.
@subsubsection occt_draw_4_3_23 vr
Syntax:
~~~~{.php}
vr filename
~~~~
Reads shape from BREP-format file and displays it in the viewer.
**Example:**
~~~~{.php}
vinit
vr myshape.brep
~~~~
@subsubsection occt_draw_4_3_24 vstate
@@ -7545,7 +7530,7 @@ xdistc2dc2dss c2d1_1 c2d2_1 s1 s2 0 1 1000
Syntax:
~~~~{.php}
checkshape [-top] shape [result] [-short] [-parallel]
checkshape [-top] shape [result] [-short] [-parallel] [-exact]
~~~~
Where:
@@ -7554,6 +7539,7 @@ Where:
* *result* -- optional parameter, defines custom prefix for the output shape names.
* *short* -- a short description of the check.
* *parallel* -- run check in multithread mode.
* *exact* -- run check using exact method.
**checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape.

View File

@@ -2,41 +2,21 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="492.48849"
height="306.85541"
width="500"
height="240"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="shape_heal.svg">
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="shape_healing_image009.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<clipPath
id="clipEmfPath1"
clipPathUnits="userSpaceOnUse">
<rect
id="rect3045"
height="188.43307"
width="602.36218"
y="0"
x="0" />
</clipPath>
<clipPath
id="clipEmfPath2"
clipPathUnits="userSpaceOnUse">
<rect
id="rect3048"
height="168.77963"
width="461.37103"
y="13.50237"
x="1.4999058" />
</clipPath>
<clipPath
id="clipEmfPath1-1"
clipPathUnits="userSpaceOnUse">
@@ -115,9 +95,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="346.95854"
inkscape:cy="41.972723"
inkscape:zoom="2.8284271"
inkscape:cx="260.39207"
inkscape:cy="156.2706"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -129,7 +109,9 @@
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
fit-margin-bottom="0"
inkscape:pagecheckerboard="0"
width="500px" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -138,7 +120,6 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -159,240 +140,324 @@
id="g3033" />
<g
id="g3209" />
<text
xml:space="preserve"
x="77.124359"
y="50.336628"
style="font-size:19.95194054px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3245"> </text>
<text
xml:space="preserve"
x="384.65424"
y="50.336628"
style="font-size:19.95194054px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3249"> </text>
<text
xml:space="preserve"
x="384.35422"
y="74.039337"
style="font-size:12.45121098px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3253"> </text>
<text
xml:space="preserve"
x="43.821121"
y="95.941833"
style="font-size:12.45121098px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3255"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
clip-path="url(#clipEmfPath1-1)"
d="m -0.00937591,136.00926 0,21.24618 141.76378591,0 0,-21.24618 -141.76378591,0 z"
d="m -0.00937591,136.00926 v 21.24618 H 141.75441 v -21.24618 z"
id="path3257"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 28.510257,137.89036 0,21.24618 141.763783,0 0,-21.24618 z"
id="path3259" />
transform="translate(32.519633,-72.118896)" />
<g
id="g3196">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 32.510257,63.89036 V 85.13654 H 174.27404 V 63.89036 Z"
id="path3259" />
<text
xml:space="preserve"
x="78.230995"
y="77.499275"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3261">ShapeFix</text>
</g>
<text
xml:space="preserve"
x="74.574112"
y="153.24837"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3261">ShapeFix</text>
<text
xml:space="preserve"
x="124.52896"
y="153.24837"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="128.52896"
y="79.248367"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3263"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
clip-path="url(#clipEmfPath2-7)"
d="m 176.82969,136.00926 0,21.24618 141.76378,0 0,-21.24618 -141.76378,0 z"
d="m 176.82969,136.00926 v 21.24618 h 141.76378 v -21.24618 z"
id="path3265"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 205.34932,137.89036 0,21.24618 141.76378,0 0,-21.24618 z"
id="path3267" />
<g
id="g3188"
transform="translate(-1.45134)">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 208.41918,63.89036 V 85.13654 H 350.18296 V 63.89036 Z"
id="path3267" />
<text
xml:space="preserve"
x="239.62212"
y="77.42511"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3269">ShapeUpgrade</text>
</g>
<text
xml:space="preserve"
x="236.58987"
y="153.24837"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3269">ShapeUpgrade</text>
<text
xml:space="preserve"
x="315.94757"
y="153.24837"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="319.94757"
y="79.248367"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3271"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
clip-path="url(#clipEmfPath3)"
d="m 349.77776,135.82174 0,21.24617 141.76378,0 0,-21.24617 -141.76378,0 z"
d="m 349.77776,135.82174 v 21.24617 h 141.76378 v -21.24617 z"
id="path3273"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 378.29739,137.70284 0,21.24617 141.76378,0 0,-21.24617 z"
id="path3275" />
<g
id="g3192">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 382.29739,63.70284 V 84.94901 H 524.06117 V 63.70284 Z"
id="path3275" />
<text
xml:space="preserve"
x="415.51996"
y="77.311752"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3277">ShapeCustom</text>
</g>
<text
xml:space="preserve"
x="411.35684"
y="152.94833"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3277">ShapeCustom</text>
<text
xml:space="preserve"
x="486.9642"
y="152.94833"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="490.9642"
y="78.948334"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3279"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
clip-path="url(#clipEmfPath4)"
d="m 174.44821,271.3997 0,21.24618 141.76378,0 0,-21.24618 -141.76378,0 z"
d="m 174.44821,271.3997 v 21.24618 H 316.21199 V 271.3997 Z"
id="path3281"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 202.96784,273.2808 0,21.24618 141.76378,0 0,-21.24618 z"
id="path3283" />
<g
id="g3180"
transform="translate(0,-5.3756104)">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 206.96784,199.2808 v 21.24618 H 348.73162 V 199.2808 Z"
id="path3283" />
<text
xml:space="preserve"
x="242.36592"
y="212.88971"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3285">ShapeExtend</text>
</g>
<text
xml:space="preserve"
x="238.39005"
y="288.56381"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3285">ShapeExtend</text>
<text
xml:space="preserve"
x="309.64694"
y="288.56381"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="313.64694"
y="214.56381"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3287"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
clip-path="url(#clipEmfPath5)"
d="m 175.3858,208.95508 0,21.24617 141.76378,0 0,-21.24617 -141.76378,0 z"
d="m 175.3858,208.95508 v 21.24617 h 141.76378 v -21.24617 z"
id="path3289"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 203.90543,210.83618 0,21.24617 141.76378,0 0,-21.24617 z"
id="path3291" />
<g
id="g3184"
transform="translate(-0.93759,-7.9384003)">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 207.90543,136.83618 v 21.24617 h 141.76378 v -21.24617 z"
id="path3291" />
<text
xml:space="preserve"
x="238.83438"
y="150.37093"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3293">ShapeAnalysis</text>
</g>
<text
xml:space="preserve"
x="234.78969"
y="226.15668"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3293">ShapeAnalysis</text>
<text
xml:space="preserve"
x="314.89746"
y="226.15668"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="318.89746"
y="152.15668"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3295"> </text>
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
style="fill:none;stroke:#000000;stroke-width:0.937591px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
clip-path="url(#clipEmfPath6)"
d="m 74.257219,158.83061 0,182.75835"
d="M 74.257219,158.83061 V 341.58896"
id="path3297"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 103.83926,342.96989 92.18396,0 c 0.35629,0 0.63756,0.28128 0.63756,0.63757 0,0.33754 -0.28127,0.61882 -0.63756,0.61882 l -92.18396,0 c -0.35628,0 -0.63756,-0.28128 -0.63756,-0.61882 0,-0.35629 0.28128,-0.63757 0.63756,-0.63757 z m 90.94634,-3.11286 7.50073,3.75043 -7.50073,3.75043 z"
id="path3299" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 103.70507,285.15091 94.06852,0 c 0.3469,0 0.62818,0.28128 0.62818,0.62819 0,0.34692 -0.28128,0.6282 -0.62818,0.6282 l -94.06852,0 c -0.34691,0 -0.62819,-0.28128 -0.62819,-0.6282 0,-0.34691 0.28128,-0.62819 0.62819,-0.62819 z m 92.82152,-3.12223 7.50073,3.75042 -7.50073,3.75043 z"
id="path3301" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 104.38951,221.9562 91.26512,0 c 0.34691,0 0.61881,0.28128 0.61881,0.6282 0,0.34691 -0.2719,0.62819 -0.61881,0.62819 l -91.26512,0 c -0.33753,0 -0.61881,-0.28128 -0.61881,-0.62819 0,-0.34692 0.28128,-0.6282 0.61881,-0.6282 z m 90.00875,-3.12223 7.50073,3.75043 -7.50073,3.75042 z"
id="path3303" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 276.34372,233.58253 0,33.00376 c 0,0.34691 -0.2719,0.6282 -0.61881,0.6282 -0.3469,0 -0.62818,-0.28129 -0.62818,-0.6282 l 0,-33.00376 c 0,-0.33754 0.28128,-0.61882 0.62818,-0.61882 0.34691,0 0.61881,0.28128 0.61881,0.61882 z m 3.13156,31.75674 -3.75037,7.50086 -3.75036,-7.50086 z"
id="path3305" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
d="m 453.74242,160.71171 0,59.06924"
id="path3307" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 452.98619,220.39977 -100.62228,0 c -0.35629,0 -0.63757,-0.28128 -0.63757,-0.61882 0,-0.35629 0.28128,-0.63757 0.63757,-0.63757 l 100.62228,0 c 0.35628,0 0.63756,0.28128 0.63756,0.63757 0,0.33754 -0.28128,0.61882 -0.63756,0.61882 z m -99.38466,3.13161 -7.50073,-3.75043 7.50073,-3.75043 z"
id="path3309" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 275.65928,158.82712 0,47.18976 c 0,0.34692 -0.28127,0.6282 -0.62818,0.6282 -0.33754,0 -0.61881,-0.28128 -0.61881,-0.6282 l 0,-47.18976 c 0,-0.34691 0.28127,-0.62819 0.61881,-0.62819 0.34691,0 0.62818,0.28128 0.62818,0.62819 z m 3.12218,45.94274 -3.75036,7.50086 -3.75037,-7.50086 z"
id="path3311" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 202.03025,332.9126 0,21.24618 141.76378,0 0,-21.24618 -141.76378,0 z"
id="path3313" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.93759114px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 202.03025,332.9126 0,21.24618 141.76378,0 0,-21.24618 z"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 206.03025,258.9126 v 21.24618 H 347.79403 V 258.9126 Z"
id="path3315" />
<g
id="g3176"
transform="translate(0.43759)">
<path
inkscape:connector-curvature="0"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 206.03025,258.9126 v 21.24618 H 347.79403 V 258.9126 Z"
id="path3313" />
<text
xml:space="preserve"
x="252.97264"
y="272.37869"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3317">Message</text>
</g>
<text
xml:space="preserve"
x="249.19109"
y="348.2706"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
id="text3317">Message</text>
<text
xml:space="preserve"
x="296.7457"
y="348.2706"
style="font-size:11.25109386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Arial"
x="300.7457"
y="274.2706"
style="font-style:normal;font-weight:bold;font-size:11.2511px;line-height:0%;font-family:Arial;text-align:start;text-anchor:start;fill:#000000"
id="text3319"> </text>
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.150015px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
clip-path="url(#clipEmfPath7)"
d="m 174.31695,148.19815 -25.62437,0 c -0.34691,0 -0.62818,-0.28128 -0.62818,-0.62819 0,-0.34692 0.28127,-0.6282 0.62818,-0.6282 l 25.62437,0 c 0.34691,0 0.62818,0.28128 0.62818,0.6282 0,0.34691 -0.28127,0.62819 -0.62818,0.62819 z m -24.37737,3.12223 -7.50073,-3.75042 7.50073,-3.75043 z"
d="m 174.31695,148.19815 h -25.62437 c -0.34691,0 -0.62818,-0.28128 -0.62818,-0.62819 0,-0.34692 0.28127,-0.6282 0.62818,-0.6282 h 25.62437 c 0.34691,0 0.62818,0.28128 0.62818,0.6282 0,0.34691 -0.28127,0.62819 -0.62818,0.62819 z m -24.37737,3.12223 -7.50073,-3.75042 7.50073,-3.75043 z"
id="path3321"
transform="translate(28.519633,1.8811043)" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.15001458px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
d="m 277.91888,297.09602 0,33.00376 c 0,0.35629 -0.28128,0.61882 -0.63756,0.61882 -0.33754,0 -0.61881,-0.26253 -0.61881,-0.61882 l 0,-33.00376 c 0,-0.33754 0.28127,-0.61882 0.61881,-0.61882 0.35628,0 0.63756,0.28128 0.63756,0.61882 z m 3.1128,31.74737 -3.75036,7.50086 -3.75037,-7.50086 z"
id="path3323" />
<g
id="g3389"
transform="translate(103.61121,159.85132)">
<text
id="text3391"
style="font-size:21.59645653px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:#000000;font-family:Calibri"
y="197.34073"
x="-0.70423234"
xml:space="preserve"> </text>
id="path2302">
<path
id="path3393"
d="m 0.74824682,0.41458137 0,183.67838863"
style="fill:none;stroke:#000000;stroke-width:1.46715069px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
inkscape:connector-curvature="0" />
id="path1187"
style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none"
d="M 74.851562 35.234375 L 74.851562 219.70703 L 74.894531 219.70703 L 74.894531 219.70898 L 176.75 219.70898 L 176.75 218.70898 L 75.851562 218.70898 L 75.851562 154.70117 L 176.75 154.70117 L 176.75 153.70117 L 75.851562 153.70117 L 75.851562 89.695312 L 176.75 89.695312 L 176.75 88.695312 L 75.851562 88.695312 L 75.851562 35.234375 L 74.851562 35.234375 z "
transform="translate(28.041461,50.336628)" />
<g
id="g1177">
<g
id="path1179">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.56031,267.12506 6.55552,2.41063 -6.55552,2.41063 c 1.0473,-1.42323 1.04126,-3.37047 0,-4.82126 z"
id="path1183" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.625,266.94922 a 0.18751875,0.18751875 0 0 0 -0.2168,0.28515 c 0.99512,1.38651 1.00066,3.24437 0.002,4.60157 a 0.18751875,0.18751875 0 0 0 0.21484,0.28711 l 6.55469,-2.41211 a 0.18751875,0.18751875 0 0 0 0,-0.35157 z m 0.22266,0.48047 5.72461,2.10547 -5.72461,2.10546 c 0.76265,-1.31366 0.76042,-2.88007 0,-4.21093 z"
id="path1185" />
</g>
</g>
</g>
<g
id="path2304">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none"
d="m 278.79102,84.96875 v 43.67969 h 1 V 84.96875 Z"
id="path1113" />
<g
id="g1103">
<g
id="path1105">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.7117,123.41665 -2.41063,6.55552 -2.41063,-6.55552 c 1.42323,1.0473 3.37047,1.04126 4.82126,0 z"
id="path1109" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.75391,123.23438 a 0.18751875,0.18751875 0 0 0 -0.15235,0.0293 c -1.3865,0.99512 -3.24241,1.00066 -4.59961,0.002 a 0.18751875,0.18751875 0 0 0 -0.28711,0.21484 l 2.41016,6.55664 a 0.18751875,0.18751875 0 0 0 0.35156,0 l 2.41016,-6.55664 a 0.18751875,0.18751875 0 0 0 -0.13281,-0.24609 z m -0.34766,0.46875 -2.10547,5.72656 -2.10547,-5.72461 c 1.3136,0.76271 2.88007,0.75835 4.21094,-0.002 z"
id="path1111" />
</g>
</g>
</g>
<g
id="path2820">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none"
d="m 278.79102,149.77148 v 42.79688 h 1 v -42.79688 z"
id="path1127" />
<g
id="g1117">
<g
id="path1119">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.7117,187.3376 -2.41063,6.55552 -2.41063,-6.55552 c 1.42323,1.0473 3.37047,1.04126 4.82126,0 z"
id="path1123" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.75391,187.1543 a 0.18751875,0.18751875 0 0 0 -0.15235,0.0312 c -1.3865,0.99512 -3.24241,1.00066 -4.59961,0.002 a 0.18751875,0.18751875 0 0 0 -0.28711,0.21484 l 2.41016,6.55469 a 0.18751875,0.18751875 0 0 0 0.35156,0 l 2.41016,-6.55469 a 0.18751875,0.18751875 0 0 0 -0.13281,-0.24804 z m -4.5586,0.4707 c 1.31362,0.76277 2.88004,0.76032 4.21094,0 l -2.10547,5.72461 z"
id="path1125" />
</g>
</g>
</g>
<g
id="path3035">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none"
d="m 278.79102,215.0293 v 42.79882 h 1 V 215.0293 Z"
id="path1141" />
<g
id="g1131">
<g
id="path1133">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.7117,252.59679 -2.41063,6.55552 -2.41063,-6.55552 c 1.42323,1.0473 3.37047,1.04126 4.82126,0 z"
id="path1137" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 281.75391,252.41406 a 0.18751875,0.18751875 0 0 0 -0.15235,0.0312 c -1.3865,0.99512 -3.24241,0.99871 -4.59961,0 a 0.18751875,0.18751875 0 0 0 -0.28711,0.2168 l 2.41016,6.55469 a 0.18751875,0.18751875 0 0 0 0.35156,0 l 2.41016,-6.55469 a 0.18751875,0.18751875 0 0 0 -0.13281,-0.24805 z m -4.5586,0.47071 c 1.31358,0.76269 2.88008,0.76025 4.21094,0 l -2.10547,5.7246 z"
id="path1139" />
</g>
</g>
</g>
<g
id="path4154">
<g
id="g1163">
<g
id="path1165">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.56031,202.11765 6.55552,2.41063 -6.55552,2.41063 c 1.0473,-1.42323 1.04126,-3.37047 0,-4.82126 z"
id="path1169" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.625,201.94141 a 0.18751875,0.18751875 0 0 0 -0.2168,0.28515 c 0.99512,1.3865 1.00066,3.24437 0.002,4.60156 a 0.18751875,0.18751875 0 0 0 0.21484,0.28711 l 6.55469,-2.41015 a 0.18751875,0.18751875 0 0 0 0,-0.35352 z m 0.22266,0.48046 5.72265,2.10547 -5.72265,2.10743 c 0.76282,-1.31371 0.76047,-2.88194 0,-4.2129 z"
id="path1171" />
</g>
</g>
</g>
<g
id="path4236">
<g
id="g1145">
<g
id="path1147">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.56031,137.11023 6.55552,2.41063 -6.55552,2.41063 c 1.0473,-1.42323 1.04126,-3.37047 0,-4.82126 z"
id="path1151" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 199.625,136.93359 a 0.18751875,0.18751875 0 0 0 -0.2168,0.28516 c 0.99512,1.3865 1.00066,3.24437 0.002,4.60156 a 0.18751875,0.18751875 0 0 0 0.21484,0.28711 l 6.55469,-2.41015 a 0.18751875,0.18751875 0 0 0 0,-0.35157 z m 0.22266,0.48243 5.72461,2.10546 -5.72461,2.10547 c 0.7625,-1.31316 0.75952,-2.88028 0,-4.21093 z"
id="path1153" />
</g>
</g>
</g>
<g
id="path4396">
<path
id="path958"
style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none"
d="M 424.63867 35.234375 L 424.63867 88.695312 L 321.84375 88.695312 L 321.84375 89.695312 L 425.64453 89.695312 L 425.64453 88.695312 L 425.63867 88.695312 L 425.63867 35.234375 L 424.63867 35.234375 z "
transform="translate(28.041461,50.336628)" />
<g
id="g948">
<g
id="path950">
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-width:0.375;stroke-linejoin:round;-inkscape-stroke:none"
d="m 355.11503,141.95071 -6.55552,-2.41063 6.55552,-2.41063 c -1.0473,1.42323 -1.04126,3.37047 0,4.82126 z"
id="path954" />
<path
style="color:#000000;fill:#000000;fill-rule:evenodd;stroke-linejoin:round;-inkscape-stroke:none"
d="m 355.05078,136.95312 -6.55664,2.41016 a 0.18751875,0.18751875 0 0 0 0,0.35352 l 6.55664,2.41015 a 0.18751875,0.18751875 0 0 0 0.2168,-0.28515 c -0.99512,-1.3865 -1.00066,-3.24437 -0.002,-4.60157 a 0.18751875,0.18751875 0 0 0 -0.21484,-0.28711 z m -0.22266,0.48047 c -0.76281,1.31371 -0.76047,2.88194 0,4.21289 l -5.72265,-2.10742 z"
id="path956" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,9 @@
OCCT CSharp sample {#samples_csharp_occt}
.NET: Import/Export (C#|C++/CLI|WinForms|WPF) {#samples_csharp_occt}
==================
This sample demonstrates how to use OCCT libraries in <b>.Net</b> application
written using **CSharp** and **Windows Forms** or **Windows Presentation Foundation** (WPF).
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
The connection between .Net and OCCT (C++) level is provided by proxy library
**OCCProxy**, written in C++/CLI. The proxy library contains a single *ref* class
@@ -14,6 +15,8 @@ Both applications provide the same functionality as the standard OCCT Import/Exp
The first project is called *IE_WinForms* and uses Windows Forms for GUI.
The second application is called *IE_WPF_WinForms* and uses Windows Presentation Foundation.
@figure{samples_c__ie.png}
Note a few important details:
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;

View File

@@ -1,8 +1,9 @@
Direct3D CSharp sample {#samples_csharp_direct3d}
==================
.NET: D3D/OpenGL Viewer (C#|C++/CLI|WPF) {#samples_csharp_direct3d}
==================
This sample demonstrates how to use OCCT and DirectX libraries in <b>.Net</b> application
written using **CSharp** and **Windows Presentation Foundation** (WPF).
The sample could be found within OCCT repository in folder `/samples/CSharp/`.
The connection between .Net, OCCT (C++) and DirectX level is provided by proxy libraries,
**OCCProxy** and **D3DProxy**, written in C++/CLI. The proxy library **OCCProxy** contains a single

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -311,7 +311,7 @@ void OcafSamples::ModifyBoxOcafSample()
Handle(TFunction_Function) aFunction;
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
{
myResult << "Object cannot be modify.";
myResult << "Object cannot be modified.";
return;
}
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute
@@ -413,7 +413,7 @@ void OcafSamples::ModifyCylinderOcafSample()
Handle(TFunction_Function) aFunction;
if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction))
{
myResult << "Object cannot be modify.";
myResult << "Object cannot be modified.";
return;
}
// Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute

View File

@@ -175,7 +175,6 @@ void GlfwOcctView::initViewer()
aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
aViewer->ActivateGrid (Aspect_GT_Rectangular, Aspect_GDM_Lines);
myView = aViewer->CreateView();
myView->SetImmediateUpdate (false);
myView->SetWindow (myOcctWindow, myOcctWindow->NativeGlContext());
myView->ChangeRenderingParams().ToShowStats = true;
myContext = new AIS_InteractiveContext (aViewer);

View File

@@ -1,4 +1,10 @@
GLFW: 3D Viewer (C++|GLFW) {#occt_samples_glfw}
==================
A sample demonstrating usage of OCCT 3D Viewer within a window created using GLFW.
Use CMake to build the sample.
Platforms: Windows, macOS, Linux
Required: glfw

View File

@@ -1,12 +1,15 @@
OCCT sample for iOS {#occt_samples_ios_uikit}
iOS: 3D Viewer (Objective-C++|UIKit) {#occt_samples_ios_uikit}
==================
UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons.
The sample could be found within OCCT repository in folder `/samples/ios/UIKitSample/`.
The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog.
The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well.
@figure{sample_ios_uikit.png}
Installation and configuration:
1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above.
2. Install Open CASCADE Technology (OCCT) and build static libraries for desired device or/and simulator on your workstation.

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -1,7 +1,8 @@
OCCT JniViewer sample for Android {#samples_java_android_occt}
Android: 3D Viewer (Java|C++|Android SDK|JNI) {#samples_java_android_occt}
==================
This sample demonstrates simple way of using OCCT libraries in Android application written using Java.
The sample could be found within OCCT repository in folder `/samples/java/jniviewer/`.
The connection between Java and OCCT (C++) level is provided by proxy library, libTKJniSample.so, written in C++ with exported JNI methods of Java class OcctJniRenderer.
The proxy library contains single C++ class OcctJni_Viewer encapsulating OCCT viewer and providing functionality to manipulate this viewer
@@ -13,6 +14,8 @@ and the code can be programmed on Java level similarly to C++ one.
See description of OCCT Java Wrapper in Advanced Samples and Tools on OCCT web site at
https://www.opencascade.com/content/advanced-samples-and-tools
@figure{samples_java_android_occt.jpg}
Install Android Studio 4.0+ and install building tools (check Tools -> SDK Manager):
- Android SDK (API level 21 or higher).
- Android SDK build tools.

View File

@@ -259,7 +259,6 @@ bool OcctJni_Viewer::init()
Handle(Aspect_NeutralWindow) aWindow = new Aspect_NeutralWindow();
aWindow->SetSize (aWidth, aHeight);
myView = myViewer->CreateView();
myView->SetImmediateUpdate (false);
myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5);
myView->ChangeRenderingParams().ToShowStats = true;
myView->ChangeRenderingParams().CollectedStats = (Graphic3d_RenderingParams::PerfCounters ) (Graphic3d_RenderingParams::PerfCounters_FrameRate | Graphic3d_RenderingParams::PerfCounters_Triangles);

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -814,18 +814,18 @@ void COcafDoc::OnObjectDelete()
D->NewCommand();
AIS_SequenceOfInteractive aSequence;
for(myAISContext->InitSelected();
myAISContext->MoreSelected();
myAISContext->NextSelected())
aSequence.Append(myAISContext->SelectedInteractive());
for(int iter=1;iter <=aSequence.Length();iter++)
AIS_ListOfInteractive aList;
for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected())
{
aList.Append(myAISContext->SelectedInteractive());
}
for (AIS_ListOfInteractive::Iterator anIter (aList); anIter.More(); anIter.Next())
{
if (myAISContext->DisplayStatus(aSequence(iter)) == AIS_DS_Displayed)
Handle(AIS_InteractiveObject) aPrs = anIter.Value();
if (myAISContext->DisplayStatus (aPrs) == AIS_DS_Displayed)
{
Handle(TPrsStd_AISPresentation) CurrentPrs
= Handle(TPrsStd_AISPresentation)::DownCast(aSequence(iter)->GetOwner());
Handle(TPrsStd_AISPresentation) CurrentPrs = Handle(TPrsStd_AISPresentation)::DownCast(aPrs->GetOwner());
TDataStd_Integer::Set(CurrentPrs->Label(), 0);
CurrentPrs->Erase(1);
}

View File

@@ -28,14 +28,11 @@
# define true TRUE
#endif
#pragma warning( disable : 4244 ) // Issue warning 4244
#include <Standard_ShortReal.hxx>
#pragma warning( default : 4244 ) // Issue warning 4244
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Shape.hxx>
#include <AIS_SequenceOfInteractive.hxx>
#include <AIS_Trihedron.hxx>
#include <Aspect_Background.hxx>

View File

@@ -27,7 +27,7 @@ CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
myDoc = aDoc;
myIsDisplayed = false;
//{{AFX_DATA_INIT(CSelectionDialog)
m_Algo = 0;
m_Algo = 1;
m_DisplayMode = 0;
m_NbIsos = 2;
m_DrawHiddenLine = TRUE;

View File

@@ -171,7 +171,6 @@ void CAnimationView3D::OnInitialUpdate()
aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
myView = aViewer->CreateView();
myView->SetImmediateUpdate (false);
// store for restore state after rotation (witch is in Degenerated mode)
myHlrModeIsOn = myView->ComputedMode();

View File

@@ -87,7 +87,6 @@ void OCC_BaseView::OnInitialUpdate()
}
myView = GetAISContext()->CurrentViewer()->CreateView();
myView->SetImmediateUpdate (false);
myView->SetComputedMode (Standard_False);
Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (myView->Viewer()->Driver());

View File

@@ -1,6 +1,21 @@
MFC samples {#samples_mfc_standard}
MFC: OCCT Samples (C++|MFC) {#samples_mfc_standard}
==========
Visual C++ programming samples for Windows platform containing illustrating how to use a particular module or functionality, including the following MFC samples:
* Geometry
* Modeling
* Viewer2d
* Viewer3d
* ImportExport
* Ocaf
* Triangulation
* HLR
* Animation
* Convert
@figure{samples_mvc.png}
1. Contents
-----------------------

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -1,12 +1,15 @@
OCCT AndroidQt sample for Android {#samples_qml_android_occt}
Qt: 3D Viewer (C++|QtQuick|QML) {#samples_qml_android_occt}
==================
This sample demonstrates a simple way of using OCCT libraries in Android application written using Qt/Qml.
The sample could be found within OCCT repository in folder `/samples/qt/AndroidQt/`.
The connection between Qt/Qml and OCCT (C++) level is provided by proxy library, libAndroidQt.so, written in C++.
The proxy library contains single C++ class AndroidQt encapsulating OCCT viewer and providing functionality to manipulate this viewer
and to import OCCT shapes from supported format of CAD file (BREP).
@figure{samples_qml_android_occt.jpg}
Requirements for building sample:
* Java Development Kit 1.7 or higher
* Qt 5.3 or higher

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -348,7 +348,6 @@ bool AndroidQt::initViewer (Aspect_Drawable theWin)
#endif
myView = myViewer->CreateView();
myView->SetImmediateUpdate (Standard_False);
#ifdef __ANDROID__
myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext);

View File

@@ -0,0 +1,10 @@
Qt: Import/Export (C++|Qt Widgets) {#samples_qt_iesample}
==========
OCCT includes several samples based on Qt application framework.
These samples are available on all supported desktop platforms.
This Import Export programming sample contains 3D Viewer and Import / Export functionality.
The sample could be found within OCCT repository in folder `/samples/qt/IESample/`.
@figure{samples_qt.png}

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -1,6 +1,22 @@
Qt OCCT Overview samples {#samples_qt_overview}
Qt: OCCT Overview (C++|Qt Widgets) {#samples_qt_overview}
==========
The Overview Qt application provides code snippets for basic usage of C++ API of various OCCT functionality.
The samples are organized in several categories according to relevant module of OCCT:
* Geometry
* Topology
* Triangulation
* DataExchange
* OCAF
* Viewer 2d
* Viewer 3d
Each sample presents geometry view, C++ code fragment and sample output window.
This sample is described in the @ref samples__novice_guide "Novice guide" for new users.
@figure{sample_overview_qt.png}
1. Contents
-----------------------

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -0,0 +1,11 @@
Qt: Bottle Tutorial (C++|Qt Widgets) {#samples_qt_tutorial}
==========
The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object.
The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology.
This tutorial assumes that the user has experience in using and setting up C++.
From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions.
The combination of these resources allows creating substantial applications.
**See also:** @ref occt__tutorial "OCCT Tutorial"

View File

@@ -1,4 +1,4 @@
OCCT WebGL Viewer sample {#occt_samples_webgl}
WebGL: 3D Viewer (JavaScript|C++|WebAssembly) {#occt_samples_webgl}
==================
This sample demonstrates simple way of using OCCT libraries in Web application written in C++ and translated into WebAssembly module using Emscripten SDK (emsdk):
@@ -6,6 +6,9 @@ https://emscripten.org/
Sample consists of the Open CASCADE 3D Viewer with a button for opening a model in BREP format.
The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm).
The sample could be found within OCCT repository in folder `/samples/webgl/`.
@figure{sample_webgl.png,"",240} height=408px
Installation and configuration:
1. Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following *emsdk* documentation. Activate also MinGW when building sample on Windows host.

View File

@@ -342,7 +342,6 @@ bool WasmOcctView::initViewer()
myView = new V3d_View (aViewer);
myView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
myView->SetImmediateUpdate (false);
myView->ChangeRenderingParams().IsShadowEnabled = false;
myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5);
myView->ChangeRenderingParams().ToShowStats = true;

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -50,8 +50,14 @@ void AIS_AnimationCamera::update (const AIS_AnimationProgress& theProgress)
Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd);
aCamLerp.Interpolate (HasOwnDuration() ? theProgress.LocalNormalized : 1.0, aCamera);
Standard_DISABLE_DEPRECATION_WARNINGS
const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False);
Standard_ENABLE_DEPRECATION_WARNINGS
myView->SetCamera (aCamera);
myView->SetImmediateUpdate (aPrevImmUpdate);
myView->Invalidate();
Standard_DISABLE_DEPRECATION_WARNINGS
myView->SetImmediateUpdate (aPrevImmUpdate);
Standard_ENABLE_DEPRECATION_WARNINGS
}

View File

@@ -1,35 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _AIS_ClearMode_HeaderFile
#define _AIS_ClearMode_HeaderFile
//! Declares which entities in an opened local context
//! are to be cleared of mode settings. Temporary
//! graphic presentations such as those for sub-shapes,
//! for example, are only created for the selection
//! process. By means of these enumerations, they can
//! be cleared from local context.
enum AIS_ClearMode
{
AIS_CM_All,
AIS_CM_Interactive,
AIS_CM_Filters,
AIS_CM_StandardModes,
AIS_CM_TemporaryShapePrs
};
#endif // _AIS_ClearMode_HeaderFile

View File

@@ -1,38 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _AIS_ConnectStatus_HeaderFile
#define _AIS_ConnectStatus_HeaderFile
//! Gives the status of connection of an Interactive
//! Object. This will be one of the following:
//! - No connection
//! - Connection
//! - Transformation
//! - Both connection and transformation
//! This enumeration is used in
//! AIS_ConnectedInteractive. Transform indicates
//! that the Interactive Object reference geometry has
//! changed location relative to the reference geometry.
enum AIS_ConnectStatus
{
AIS_CS_None,
AIS_CS_Connection,
AIS_CS_Transform,
AIS_CS_Both
};
#endif // _AIS_ConnectStatus_HeaderFile

View File

@@ -1,20 +0,0 @@
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_DataMapIteratorOfDataMapOfSelStat_HeaderFile
#define AIS_DataMapIteratorOfDataMapOfSelStat_HeaderFile
#include <AIS_DataMapOfSelStat.hxx>
#endif

View File

@@ -1,20 +0,0 @@
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive_HeaderFile
#define AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive_HeaderFile
#include <AIS_DataMapofIntegerListOfinteractive.hxx>
#endif

View File

@@ -1,29 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_DataMapOfSelStat_HeaderFile
#define AIS_DataMapOfSelStat_HeaderFile
#include <SelectMgr_SelectableObject.hxx>
#include <AIS_LocalStatus.hxx>
#include <TColStd_MapTransientHasher.hxx>
#include <NCollection_DataMap.hxx>
typedef NCollection_DataMap<Handle(SelectMgr_SelectableObject),Handle(AIS_LocalStatus),TColStd_MapTransientHasher> AIS_DataMapOfSelStat;
typedef NCollection_DataMap<Handle(SelectMgr_SelectableObject),Handle(AIS_LocalStatus),TColStd_MapTransientHasher>::Iterator AIS_DataMapIteratorOfDataMapOfSelStat;
#endif

View File

@@ -1,29 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_DataMapofIntegerListOfinteractive_HeaderFile
#define AIS_DataMapofIntegerListOfinteractive_HeaderFile
#include <Standard_Integer.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <NCollection_DataMap.hxx>
typedef NCollection_DataMap<Standard_Integer,AIS_ListOfInteractive,TColStd_MapIntegerHasher> AIS_DataMapofIntegerListOfinteractive;
typedef NCollection_DataMap<Standard_Integer,AIS_ListOfInteractive,TColStd_MapIntegerHasher>::Iterator AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive;
#endif

View File

@@ -1,28 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_IndexedDataMapOfOwnerPrs_HeaderFile
#define AIS_IndexedDataMapOfOwnerPrs_HeaderFile
#include <SelectMgr_EntityOwner.hxx>
#include <Prs3d_Presentation.hxx>
#include <TColStd_MapTransientHasher.hxx>
#include <NCollection_IndexedDataMap.hxx>
typedef NCollection_IndexedDataMap<Handle(SelectMgr_EntityOwner),Handle(Prs3d_Presentation),TColStd_MapTransientHasher> AIS_IndexedDataMapOfOwnerPrs;
#endif

View File

@@ -128,6 +128,7 @@ myIsAutoActivateSelMode(Standard_True)
myStyles[Prs3d_TypeOfHighlight_LocalDynamic] = new Prs3d_Drawer();
myStyles[Prs3d_TypeOfHighlight_SubIntensity] = new Prs3d_Drawer();
myDefaultDrawer->SetupOwnDefaults();
myDefaultDrawer->SetZLayer(Graphic3d_ZLayerId_Default);
myDefaultDrawer->SetDisplayMode(0);
{
@@ -704,11 +705,15 @@ void AIS_InteractiveContext::HilightWithColor(const Handle(AIS_InteractiveObject
const Standard_Boolean theIsToUpdate)
{
if (theObj.IsNull())
{
return;
}
setContextToObject (theObj);
if (!myObjects.IsBound (theObj))
{
return;
}
const Handle(AIS_GlobalStatus)& aStatus = myObjects (theObj);
aStatus->SetHilightStatus (Standard_True);
@@ -720,7 +725,9 @@ void AIS_InteractiveContext::HilightWithColor(const Handle(AIS_InteractiveObject
}
if (theIsToUpdate)
{
myMainVwr->Update();
}
}
//=======================================================================
@@ -2300,6 +2307,33 @@ gp_Pnt AIS_InteractiveContext::GravityPoint (const Handle(V3d_View)& theView) co
return theView->GravityPoint();
}
//=======================================================================
//function : setContextToObject
//purpose :
//=======================================================================
void AIS_InteractiveContext::setContextToObject (const Handle(AIS_InteractiveObject)& theObj)
{
if (theObj->HasInteractiveContext())
{
if (theObj->myCTXPtr != this)
{
throw Standard_ProgramError("AIS_InteractiveContext - object has been already displayed in another context!");
}
}
else
{
theObj->SetContext (this);
}
for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (theObj->Children()); aPrsIter.More(); aPrsIter.Next())
{
if (Handle(AIS_InteractiveObject) aChild = Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value()))
{
setContextToObject (aChild);
}
}
}
//=======================================================================
//function : setObjectStatus
//purpose :

View File

@@ -20,7 +20,6 @@
#include <AIS_DataMapOfIOStatus.hxx>
#include <AIS_DisplayMode.hxx>
#include <AIS_DisplayStatus.hxx>
#include <AIS_ClearMode.hxx>
#include <AIS_KindOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_Selection.hxx>
@@ -1396,20 +1395,7 @@ protected: //! @name internal methods
}
//! Assign the context to the object or throw exception if object was already assigned to another context.
void setContextToObject (const Handle(AIS_InteractiveObject)& theObj)
{
if (theObj->HasInteractiveContext())
{
if (theObj->myCTXPtr != this)
{
throw Standard_ProgramError("AIS_InteractiveContext - object has been already displayed in another context!");
}
}
else
{
theObj->SetContext (this);
}
}
Standard_EXPORT void setContextToObject (const Handle(AIS_InteractiveObject)& theObj);
//! Return display mode for highlighting.
Standard_Integer getHilightMode (const Handle(AIS_InteractiveObject)& theObj,

View File

@@ -1,28 +0,0 @@
// Created on: 1996-12-11
// Created by: Robert COUBLANC
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef AIS_MapOfInteractive_HeaderFile
#define AIS_MapOfInteractive_HeaderFile
#include <AIS_InteractiveObject.hxx>
#include <TColStd_MapTransientHasher.hxx>
#include <NCollection_Map.hxx>
typedef NCollection_Map<Handle(AIS_InteractiveObject),TColStd_MapTransientHasher> AIS_MapOfInteractive;
typedef NCollection_Map<Handle(AIS_InteractiveObject),TColStd_MapTransientHasher>::Iterator AIS_MapIteratorOfMapOfInteractive;
#endif

View File

@@ -355,16 +355,28 @@ void AIS_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
StdSelect::SetDrawerForBRepOwner(aSelection,myDrawer);
}
void AIS_Shape::Color( Quantity_Color& aColor ) const {
aColor = myDrawer->ShadingAspect()->Color(myCurrentFacingModel);
void AIS_Shape::Color (Quantity_Color& theColor) const
{
if (const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect())
{
theColor = myDrawer->ShadingAspect()->Color(myCurrentFacingModel);
}
}
Graphic3d_NameOfMaterial AIS_Shape::Material() const {
return (myDrawer->ShadingAspect()->Material(myCurrentFacingModel)).Name();
Graphic3d_NameOfMaterial AIS_Shape::Material() const
{
const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect();
return !aShading.IsNull()
? aShading->Material(myCurrentFacingModel).Name()
: Graphic3d_NameOfMaterial_DEFAULT;
}
Standard_Real AIS_Shape::Transparency() const {
return myDrawer->ShadingAspect()->Transparency(myCurrentFacingModel);
Standard_Real AIS_Shape::Transparency() const
{
const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect();
return !aShading.IsNull()
? aShading->Transparency(myCurrentFacingModel)
: 0.0;
}
//=======================================================================
@@ -639,9 +651,10 @@ void AIS_Shape::setMaterial (const Handle(Prs3d_Drawer)& theDrawer,
const Standard_Boolean theToKeepColor,
const Standard_Boolean theToKeepTransp) const
{
theDrawer->SetupOwnShadingAspect();
const Quantity_Color aColor = theDrawer->ShadingAspect()->Color (myCurrentFacingModel);
const Standard_Real aTransp = theDrawer->ShadingAspect()->Transparency (myCurrentFacingModel);
theDrawer->SetupOwnShadingAspect();
theDrawer->ShadingAspect()->SetMaterial (theMaterial, myCurrentFacingModel);
if (theToKeepColor)

View File

@@ -3239,7 +3239,9 @@ void AIS_ViewController::handleXRPresentations (const Handle(AIS_InteractiveCont
void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& theCtx,
const Handle(V3d_View)& theView)
{
Standard_DISABLE_DEPRECATION_WARNINGS
const bool wasImmediateUpdate = theView->SetImmediateUpdate (false);
Standard_ENABLE_DEPRECATION_WARNINGS
handleViewOrientationKeys (theCtx, theView);
const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView);
@@ -3256,7 +3258,9 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)&
handleViewRedraw (theCtx, theView);
theView->View()->UnsetXRPosedCamera();
Standard_DISABLE_DEPRECATION_WARNINGS
theView->SetImmediateUpdate (wasImmediateUpdate);
Standard_ENABLE_DEPRECATION_WARNINGS
// make sure to not process the same events twice
myGL.Reset();

View File

@@ -892,11 +892,17 @@ void AIS_ViewCube::StartAnimation (const Handle(AIS_ViewCubeOwner)& theOwner)
{
{
Handle(Graphic3d_Camera) aBackupCamera = aView->Camera();
Standard_DISABLE_DEPRECATION_WARNINGS
const bool wasImmediateUpdate = aView->SetImmediateUpdate (false);
Standard_ENABLE_DEPRECATION_WARNINGS
aView->SetCamera (myEndState);
aView->SetProj (theOwner->MainOrientation(), myIsYup);
aView->SetCamera (aBackupCamera);
Standard_DISABLE_DEPRECATION_WARNINGS
aView->SetImmediateUpdate (wasImmediateUpdate);
Standard_ENABLE_DEPRECATION_WARNINGS
}
const gp_Dir aNewDir = myEndState->Direction();

View File

@@ -18,7 +18,6 @@ AIS_CameraFrustum.cxx
AIS_CameraFrustum.hxx
AIS_Circle.cxx
AIS_Circle.hxx
AIS_ClearMode.hxx
AIS_ColoredDrawer.hxx
AIS_ColoredShape.cxx
AIS_ColoredShape.hxx
@@ -27,13 +26,8 @@ AIS_ColorScale.cxx
AIS_ColorScale.hxx
AIS_ConnectedInteractive.cxx
AIS_ConnectedInteractive.hxx
AIS_ConnectStatus.hxx
AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx
AIS_DataMapIteratorOfDataMapOfIOStatus.hxx
AIS_DataMapIteratorOfDataMapOfSelStat.hxx
AIS_DataMapofIntegerListOfinteractive.hxx
AIS_DataMapOfIOStatus.hxx
AIS_DataMapOfSelStat.hxx
AIS_DisplayMode.hxx
AIS_DisplayStatus.hxx
AIS_DragAction.hxx
@@ -43,7 +37,6 @@ AIS_GlobalStatus.cxx
AIS_GlobalStatus.hxx
AIS_GraphicTool.cxx
AIS_GraphicTool.hxx
AIS_IndexedDataMapOfOwnerPrs.hxx
AIS_InteractiveContext.cxx
AIS_InteractiveContext.hxx
AIS_InteractiveObject.cxx
@@ -60,8 +53,6 @@ AIS_Manipulator.cxx
AIS_ManipulatorMode.hxx
AIS_ManipulatorOwner.hxx
AIS_ManipulatorOwner.cxx
AIS_MapIteratorOfMapOfInteractive.hxx
AIS_MapOfInteractive.hxx
AIS_MediaPlayer.cxx
AIS_MediaPlayer.hxx
AIS_MouseGesture.hxx

View File

@@ -732,7 +732,6 @@ int mma1fdi_(integer *ndimen,
/* Parameter adjustments */
uvfonc -= 3;
diftab_dim1 = *nbroot / 2 + 1;
diftab_offset = diftab_dim1;
diftab -= diftab_offset;
@@ -778,13 +777,13 @@ int mma1fdi_(integer *ndimen,
if (*isofav == 1) {
ideru = *ideriv;
iderv = 0;
d__1 = (uvfonc[4] - uvfonc[3]) / 2.;
d__1 = (uvfonc[1] - uvfonc[0]) / 2.;
renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv);
/* if Iso-V, derive by V of order IDERIV */
} else {
ideru = 0;
iderv = *ideriv;
d__1 = (uvfonc[6] - uvfonc[5]) / 2.;
d__1 = (uvfonc[3] - uvfonc[2]) / 2.;
renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv);
}
@@ -794,8 +793,8 @@ int mma1fdi_(integer *ndimen,
*/
(*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (ndimen,
&uvfonc[3],
&uvfonc[5],
&uvfonc[0],
&uvfonc[2],
isofav,
tconst,
&nbp,
@@ -862,11 +861,11 @@ int mma1fdi_(integer *ndimen,
/* If Iso-U, derive by V till order IORDRE */
if (*isofav == 1) {
/* --> Factor of normalisation 1st derivative. */
bid1 = (uvfonc[6] - uvfonc[5]) / 2.;
bid1 = (uvfonc[3] - uvfonc[2]) / 2.;
i__1 = *iordre;
for (iderv = 1; iderv <= i__1; ++iderv) {
(*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, &
nbp, ttable, &ideru, &iderv, &contr1[(iderv + 1) *
contr1_dim1 + 1], iercod);
if (*iercod > 0) {
@@ -877,7 +876,7 @@ int mma1fdi_(integer *ndimen,
i__1 = *iordre;
for (iderv = 1; iderv <= i__1; ++iderv) {
(*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, &
nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
iderv + 1) * contr2_dim1 + 1], iercod);
if (*iercod > 0) {
@@ -888,11 +887,11 @@ int mma1fdi_(integer *ndimen,
/* If Iso-V, derive by U till order IORDRE */
} else {
/* --> Factor of normalization 1st derivative. */
bid1 = (uvfonc[4] - uvfonc[3]) / 2.;
bid1 = (uvfonc[1] - uvfonc[0]) / 2.;
i__1 = *iordre;
for (ideru = 1; ideru <= i__1; ++ideru) {
(*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, &
nbp, ttable, &ideru, &iderv, &contr1[(ideru + 1) *
contr1_dim1 + 1], iercod);
if (*iercod > 0) {
@@ -903,7 +902,7 @@ int mma1fdi_(integer *ndimen,
i__1 = *iordre;
for (ideru = 1; ideru <= i__1; ++ideru) {
(*const_cast <AdvApp2Var_EvaluatorFunc2Var*> (&foncnp)).Evaluate (
ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, &
ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, &
nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[(
ideru + 1) * contr2_dim1 + 1], iercod);
if (*iercod > 0) {

View File

@@ -17,8 +17,8 @@
| de l'approximation a deux variables
| a utiliser dans AdvApp2Var
|--------------------------------------------------------------*/
#ifndef ApproxF2var_HeaderFile
#define ApproxF2var_HeaderFile
#ifndef AdvApp2Var_ApproxF2var_HeaderFile
#define AdvApp2Var_ApproxF2var_HeaderFile
#include <Standard_Macro.hxx>
#include <AdvApp2Var_Data_f2c.hxx>

View File

@@ -12,8 +12,8 @@
// commercial license or contractual agreement.
// AdvApp2Var_Data_f2c.hxx
#ifndef Data_f2c_HeaderFile
#define Data_f2c_HeaderFile
#ifndef AdvApp2Var_Data_f2c_HeaderFile
#define AdvApp2Var_Data_f2c_HeaderFile
#ifndef F2CTYPE_DEFINED
typedef int integer;

View File

@@ -12,8 +12,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef math_ContMatrices_HeaderFile
#define math_ContMatrices_HeaderFile
#ifndef AppCont_ContMatrices_HeaderFile
#define AppCont_ContMatrices_HeaderFile
#include <math_Vector.hxx>
#include <Standard_Real.hxx>

View File

@@ -11,8 +11,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_DisplayConnection_H__
#define _Aspect_DisplayConnection_H__
#ifndef Aspect_DisplayConnection_HeaderFile
#define Aspect_DisplayConnection_HeaderFile
#include <Standard_Transient.hxx>
#include <Aspect_XAtom.hxx>

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef ASPECT_POLYGONOFFSETMODE_HEADER
#define ASPECT_POLYGONOFFSETMODE_HEADER
#ifndef Aspect_PolygonOffsetMode_HeaderFile
#define Aspect_PolygonOffsetMode_HeaderFile
// Enumeration for polygon offset modes

View File

@@ -12,8 +12,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef BOPDS_VectorOfPnt_HeaderFile
#define BOPDS_VectorOfPnt_HeaderFile
#ifndef BOPDS_VectorOfPoint_HeaderFile
#define BOPDS_VectorOfPoint_HeaderFile
#include <NCollection_Vector.hxx>
#include <BOPDS_Point.hxx>

View File

@@ -12,8 +12,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef BOPTest_MapOfShapeSet_HeaderFile
#define BOPTest_MapOfShapeSet_HeaderFile
#ifndef BOPTools_MapOfSet_HeaderFile
#define BOPTools_MapOfSet_HeaderFile
#include <BOPTools_Set.hxx>
#include <BOPTools_SetMapHasher.hxx>

View File

@@ -355,6 +355,10 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
#endif
Approx_CurveOnSurface appr(HPCur, hsur, Udeb, Ufin, myTol3d);
appr.Perform(myMaxSeg, myMaxDegree, myContinuity, Only3d, Only2d);
if (appr.MaxError3d() > 1.e3 * myTol3d)
continue;
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_approx,t_approx);
approx_count++;

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepBuilderAPI_BndBoxTreeSelector_Header
#define _BRepBuilderAPI_BndBoxTreeSelector_Header
#ifndef BRepBuilderAPI_BndBoxTreeSelector_HeaderFile
#define BRepBuilderAPI_BndBoxTreeSelector_HeaderFile
#include <TColStd_ListOfInteger.hxx>
#include <Bnd_Box.hxx>

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepBuilderAPI_VertexInspector_Header
#define _BRepBuilderAPI_VertexInspector_Header
#ifndef BRepBuilderAPI_VertexInspector_HeaderFile
#define BRepBuilderAPI_VertexInspector_HeaderFile
#include <TColStd_ListOfInteger.hxx>
#include <NCollection_Vector.hxx>

View File

@@ -346,8 +346,7 @@ private:
//purpose :
//=======================================================================
void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape,
const Standard_Boolean B,
const Standard_Boolean theIsParallel)
const Standard_Boolean B)
{
if (theShape.IsNull())
{
@@ -356,8 +355,8 @@ void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape,
myShape = theShape;
myMap.Clear();
Put (theShape, B, theIsParallel);
Perform (theIsParallel);
Put (theShape, B);
Perform();
}
//=======================================================================
@@ -365,8 +364,7 @@ void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape,
//purpose :
//=======================================================================
void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape,
const Standard_Boolean B,
const Standard_Boolean theIsParallel)
const Standard_Boolean B)
{
if (myMap.Contains (theShape))
{
@@ -382,6 +380,7 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape,
case TopAbs_EDGE:
HR = new BRepCheck_Edge (TopoDS::Edge (theShape));
Handle(BRepCheck_Edge)::DownCast(HR)->GeometricControls (B);
Handle(BRepCheck_Edge)::DownCast(HR)->SetExactMethod(myIsExact);
break;
case TopAbs_WIRE:
HR = new BRepCheck_Wire (TopoDS::Wire (theShape));
@@ -406,13 +405,13 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape,
if (!HR.IsNull())
{
HR->SetParallel (theIsParallel);
HR->SetParallel (myIsParallel);
}
myMap.Add (theShape, HR);
for (TopoDS_Iterator theIterator (theShape); theIterator.More(); theIterator.Next())
{
Put (theIterator.Value(), B, theIsParallel); // performs minimum on each shape
Put (theIterator.Value(), B); // performs minimum on each shape
}
}
@@ -420,7 +419,7 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape,
//function : Perform
//purpose :
//=======================================================================
void BRepCheck_Analyzer::Perform (Standard_Boolean theIsParallel)
void BRepCheck_Analyzer::Perform()
{
const Standard_Integer aMapSize = myMap.Size();
const Standard_Integer aMinTaskSize = 10;
@@ -453,7 +452,7 @@ void BRepCheck_Analyzer::Perform (Standard_Boolean theIsParallel)
}
BRepCheck_ParallelAnalyzer aParallelAnalyzer (aArrayOfArray, myMap);
OSD_Parallel::For (0, aArrayOfArray.Size(), aParallelAnalyzer, !theIsParallel);
OSD_Parallel::For (0, aArrayOfArray.Size(), aParallelAnalyzer, !myIsParallel);
}
//=======================================================================

View File

@@ -59,9 +59,12 @@ public:
//! BRepCheck_SelfIntersectingWire
BRepCheck_Analyzer (const TopoDS_Shape& S,
const Standard_Boolean GeomControls = Standard_True,
const Standard_Boolean theIsParallel = Standard_False)
const Standard_Boolean theIsParallel = Standard_False,
const Standard_Boolean theIsExact = Standard_False)
: myIsParallel(theIsParallel),
myIsExact(theIsExact)
{
Init (S, GeomControls, theIsParallel);
Init (S, GeomControls);
}
//! <S> is the shape to control. <GeomControls> If
@@ -81,8 +84,35 @@ public:
//! For a wire :
//! BRepCheck_SelfIntersectingWire
Standard_EXPORT void Init (const TopoDS_Shape& S,
const Standard_Boolean GeomControls = Standard_True,
const Standard_Boolean theIsParallel = Standard_False);
const Standard_Boolean GeomControls = Standard_True);
//! Sets method to calculate distance: Calculating in finite number of points (if theIsExact
//! is false, faster, but possible not correct result) or exact calculating by using
//! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly).
//! Exact method is used only when edge is SameParameter.
//! Default method is calculating in finite number of points
void SetExactMethod(const Standard_Boolean theIsExact)
{
myIsExact = theIsExact;
}
//! Returns true if exact method selected
Standard_Boolean IsExactMethod()
{
return myIsExact;
}
//! Sets parallel flag
void SetParallel(const Standard_Boolean theIsParallel)
{
myIsParallel = theIsParallel;
}
//! Returns true if parallel flag is set
Standard_Boolean IsParallel()
{
return myIsParallel;
}
//! <S> is a subshape of the original shape. Returns
//! <STandard_True> if no default has been detected on
@@ -141,10 +171,9 @@ public:
private:
Standard_EXPORT void Put (const TopoDS_Shape& S,
const Standard_Boolean Gctrl,
const Standard_Boolean theIsParallel);
const Standard_Boolean Gctrl);
Standard_EXPORT void Perform (Standard_Boolean theIsParallel);
Standard_EXPORT void Perform();
Standard_EXPORT Standard_Boolean ValidSub (const TopoDS_Shape& S, const TopAbs_ShapeEnum SubType) const;
@@ -152,6 +181,8 @@ private:
TopoDS_Shape myShape;
BRepCheck_IndexedDataMapOfShapeResult myMap;
Standard_Boolean myIsParallel;
Standard_Boolean myIsExact;
};

View File

@@ -75,6 +75,7 @@ BRepCheck_Edge::BRepCheck_Edge(const TopoDS_Edge& E)
{
Init(E);
myGctrl = Standard_True;
myIsExactMethod = Standard_False;
}
//=======================================================================
@@ -321,6 +322,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
Standard_Real eps = Precision::PConfusion();
Standard_Boolean toRunParallel = !myMutex.IsNull();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
@@ -385,6 +387,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
BRepLib_ValidateEdge aValidateEdge(myHCurve, ACS, SameParameter);
aValidateEdge.SetExitIfToleranceExceeded(Tol);
aValidateEdge.SetExactMethod(myIsExactMethod);
aValidateEdge.SetParallel(toRunParallel);
aValidateEdge.Process();
if (!aValidateEdge.IsDone() || !aValidateEdge.CheckTolerance(Tol))
{
@@ -407,6 +411,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
BRepLib_ValidateEdge aValidateEdgeOnClosedSurf(myHCurve, ACS, SameParameter);
aValidateEdgeOnClosedSurf.SetExitIfToleranceExceeded(Tol);
aValidateEdgeOnClosedSurf.SetExactMethod(myIsExactMethod);
aValidateEdgeOnClosedSurf.SetParallel(toRunParallel);
aValidateEdgeOnClosedSurf.Process();
if (!aValidateEdgeOnClosedSurf.IsDone() || !aValidateEdgeOnClosedSurf.CheckTolerance(Tol))
{
@@ -466,6 +472,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
BRepLib_ValidateEdge aValidateEdgeProj(myHCurve, ACS, SameParameter);
aValidateEdgeProj.SetExitIfToleranceExceeded(Tol);
aValidateEdgeProj.SetExactMethod(myIsExactMethod);
aValidateEdgeProj.SetParallel(toRunParallel);
aValidateEdgeProj.Process();
if (!aValidateEdgeProj.IsDone() || !aValidateEdgeProj.CheckTolerance(Tol))
{

View File

@@ -51,7 +51,23 @@ public:
//! Sets status of Edge;
Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus);
//! Sets method to calculate distance: Calculating in finite number of points (if theIsExact
//! is false, faster, but possible not correct result) or exact calculating by using
//! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly).
//! Exact method is used only when edge is SameParameter.
//! Default method is calculating in finite number of points
void SetExactMethod(Standard_Boolean theIsExact)
{
myIsExactMethod = theIsExact;
}
//! Returns true if exact method selected
Standard_Boolean IsExactMethod()
{
return myIsExactMethod;
}
//! Checks, if polygon on triangulation of heEdge
//! is out of 3D-curve of this edge.
Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation (const TopoDS_Edge& theEdge);
@@ -64,7 +80,7 @@ private:
Handle(BRep_CurveRepresentation) myCref;
Handle(Adaptor3d_Curve) myHCurve;
Standard_Boolean myGctrl;
Standard_Boolean myIsExactMethod;
};
#endif // _BRepCheck_Edge_HeaderFile

View File

@@ -890,6 +890,11 @@ Standard_Boolean BRepFill_TrimShellCorner::ChooseSection(const TopoDS_Shape& Com
if (LastEdge.IsNull())
return Standard_False;
if (FirstEdge.IsNull() || LastEdge.IsNull())
{
return Standard_False;
}
BB.Add(NewWire, FirstEdge);
if (!FirstEdge.IsSame(LastEdge))

View File

@@ -2423,7 +2423,7 @@ Standard_Boolean BRepLib::
gp_Vec3f aNorm1f, aNorm2f;
aPT1->Normal (aFNodF1, aNorm1f);
aPT1->Normal (aFNodF2, aNorm2f);
aPT2->Normal (aFNodF2, aNorm2f);
const gp_XYZ aNorm1 (aNorm1f.x(), aNorm1f.y(), aNorm1f.z());
const gp_XYZ aNorm2 (aNorm2f.x(), aNorm2f.y(), aNorm2f.z());
const Standard_Real aDot = aNorm1 * aNorm2;

View File

@@ -32,6 +32,7 @@
BRepLib_CheckCurveOnSurface::BRepLib_CheckCurveOnSurface
( const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace)
: myIsParallel(Standard_False)
{
Init(theEdge, theFace);
}
@@ -89,10 +90,10 @@ void BRepLib_CheckCurveOnSurface::Init(const TopoDS_Edge& theEdge, const TopoDS_
//function : Perform
//purpose : if isTheMTDisabled == TRUE parallelization is not used
//=======================================================================
void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread)
void BRepLib_CheckCurveOnSurface::Perform()
{
// Compute the max distance
Compute(myAdaptorCurveOnSurface, isMultiThread);
Compute(myAdaptorCurveOnSurface);
if (ErrorStatus())
{
return;
@@ -102,7 +103,7 @@ void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread)
{
// compute max distance for myAdaptorCurveOnSurface2
// (for the second curve on closed surface)
Compute(myAdaptorCurveOnSurface2, isMultiThread);
Compute(myAdaptorCurveOnSurface2);
}
}
@@ -110,8 +111,8 @@ void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread)
//function : Compute
//purpose : if isTheMTDisabled == TRUE parallelization is not used
//=======================================================================
void BRepLib_CheckCurveOnSurface::Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface,
const Standard_Boolean isMultiThread)
void BRepLib_CheckCurveOnSurface::Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface)
{
myCOnSurfGeom.Perform(theCurveOnSurface, isMultiThread);
myCOnSurfGeom.SetParallel(myIsParallel);
myCOnSurfGeom.Perform(theCurveOnSurface);
}

View File

@@ -27,7 +27,10 @@ public:
DEFINE_STANDARD_ALLOC
//! Default constructor
BRepLib_CheckCurveOnSurface() {}
BRepLib_CheckCurveOnSurface()
: myIsParallel(Standard_False)
{
}
//! Constructor
Standard_EXPORT BRepLib_CheckCurveOnSurface(const TopoDS_Edge& theEdge,
@@ -37,8 +40,8 @@ public:
Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
//! Performs the calculation
//! If isMultiThread == Standard_True then computation will be performed in parallel.
Standard_EXPORT void Perform(const Standard_Boolean isMultiThread = Standard_False);
//! If myIsParallel == Standard_True then computation will be performed in parallel.
Standard_EXPORT void Perform();
//! Returns true if the max distance has been found
Standard_Boolean IsDone() const
@@ -46,6 +49,18 @@ public:
return myCOnSurfGeom.ErrorStatus() == 0;
}
//! Sets parallel flag
void SetParallel(const Standard_Boolean theIsParallel)
{
myIsParallel = theIsParallel;
}
//! Returns true if parallel flag is set
Standard_Boolean IsParallel()
{
return myIsParallel;
}
//! Returns error status
//! The possible values are:
//! 0 - OK;
@@ -74,14 +89,14 @@ protected:
//! Computes the max distance for the 3d curve of <myCOnSurfGeom>
//! and 2d curve <theCurveOnSurface>
//! If isMultiThread == Standard_True then computation will be performed in parallel.
Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface,
const Standard_Boolean isMultiThread);
Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface);
private:
GeomLib_CheckCurveOnSurface myCOnSurfGeom;
Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface;
Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface2;
Standard_Boolean myIsParallel;
};
#endif // _BRepLib_CheckCurveOnSurface_HeaderFile

View File

@@ -17,6 +17,7 @@
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRepCheck.hxx>
#include <Extrema_LocateExtPC.hxx>
#include <GeomLib_CheckCurveOnSurface.hxx>
//=============================================================================
//function : BRepLib_ValidateEdge
@@ -32,7 +33,9 @@ BRepLib_ValidateEdge::BRepLib_ValidateEdge(Handle(Adaptor3d_Curve) theReferenceC
myToleranceForChecking(0),
myCalculatedDistance(0),
myExitIfToleranceExceeded(Standard_False),
myIsDone(Standard_False)
myIsDone(Standard_False),
myIsExactMethod(Standard_False),
myIsMultiThread(Standard_False)
{ }
//=============================================================================
@@ -96,6 +99,22 @@ void BRepLib_ValidateEdge::SetExitIfToleranceExceeded(Standard_Real theTolerance
//purpose :
//=============================================================================
void BRepLib_ValidateEdge::Process()
{
if (myIsExactMethod && mySameParameter)
{
processExact();
}
else
{
processApprox();
}
}
//=============================================================================
//function : processApprox
//purpose :
//=============================================================================
void BRepLib_ValidateEdge::processApprox()
{
myIsDone = Standard_True;
Standard_Real aSquareToleranceForChecking = myToleranceForChecking * myToleranceForChecking;
@@ -212,3 +231,20 @@ void BRepLib_ValidateEdge::Process()
}
myCalculatedDistance = Sqrt(aMaxSquareDistance);
}
//=============================================================================
//function : processExact
//purpose :
//=============================================================================
void BRepLib_ValidateEdge::processExact()
{
GeomLib_CheckCurveOnSurface aCheckCurveOnSurface(myReferenceCurve);
aCheckCurveOnSurface.SetParallel(myIsMultiThread);
aCheckCurveOnSurface.Perform(myOtherCurve);
myIsDone = aCheckCurveOnSurface.IsDone();
if (myIsDone)
{
myCalculatedDistance = aCheckCurveOnSurface.MaxDistance();
}
}

View File

@@ -21,8 +21,9 @@
class Adaptor3d_Curve;
class Adaptor3d_CurveOnSurface;
//! Computes the max distance between 3D-curve and curve on
//! surface in fixed points number
//! Computes the max distance between 3D-curve and curve on surface.
//! This class uses 2 methods: approximate using finite
//! number of points (default) and exact
class BRepLib_ValidateEdge
{
public:
@@ -31,25 +32,54 @@ public:
const Handle(Adaptor3d_CurveOnSurface) theOtherCurve,
Standard_Boolean theSameParameter);
//! Sets method to calculate distance: Calculating in finite number of points (if theIsExact
//! is false, faster, but possible not correct result) or exact calculating by using
//! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly).
//! Exact method is used only when edge is SameParameter.
//! Default method is calculating in finite number of points
void SetExactMethod(Standard_Boolean theIsExact)
{
myIsExactMethod = theIsExact;
}
//! Returns true if exact method selected
Standard_Boolean IsExactMethod()
{
return myIsExactMethod;
}
//! Sets parallel flag
void SetParallel(Standard_Boolean theIsMultiThread)
{
myIsMultiThread = theIsMultiThread;
}
//! Returns true if parallel flag is set
Standard_Boolean IsParallel()
{
return myIsMultiThread;
}
//! Set control points number (if you need a value other than 22)
void SetControlPointsNumber(Standard_Integer theControlPointsNumber)
{
myControlPointsNumber = theControlPointsNumber;
}
//! Sets the maximal allowed distance in the Process() function. If the distance greater than
//! theToleranceForChecking the Process() function stops. Use this for best performance
//! in case of checking of tolerance.
Standard_EXPORT void SetExitIfToleranceExceeded(Standard_Real theToleranceForChecking);
//! Sets limit to compute a distance in the Process() function. If the distance greater than
//! theToleranceForChecking the Process() function stopped. Use this in case checking of
//! tolerance for best performcnce. Has no effect in case using exact method.
void SetExitIfToleranceExceeded(Standard_Real theToleranceForChecking);
//! Computes the max distance for the 3d curve <myReferenceCurve>
//! and curve on surface <myOtherCurve>. If the SetExitIfToleranceExceeded()
//! function was called before <myCalculatedDistance> contains first
//! greater than SetExitIfToleranceExceeded() parameter value
//! greater than SetExitIfToleranceExceeded() parameter value. In case
//! using exact method always computes real max distance.
Standard_EXPORT void Process();
//! Returns true if the distance has been found for all points
Standard_Boolean IsDone()
Standard_Boolean IsDone() const
{
return myIsDone;
}
@@ -67,6 +97,12 @@ private:
//! Adds some margin for distance checking
Standard_Real correctTolerance(Standard_Real theTolerance);
//! Calculating in finite number of points
void processApprox();
//! Calculating by using BRepLib_CheckCurveOnSurface class
void processExact();
private:
Handle(Adaptor3d_Curve) myReferenceCurve;
Handle(Adaptor3d_CurveOnSurface) myOtherCurve;
@@ -76,6 +112,8 @@ private:
Standard_Real myCalculatedDistance;
Standard_Boolean myExitIfToleranceExceeded;
Standard_Boolean myIsDone;
Standard_Boolean myIsExactMethod;
Standard_Boolean myIsMultiThread;
};
#endif // _BRepLib_ValidateEdge_HeaderFile
#endif // _BRepLib_ValidateEdge_HeaderFile

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef BRepMesh_CircleInspector_Header
#define BRepMesh_CircleInspector_Header
#ifndef BRepMesh_CircleInspector_HeaderFile
#define BRepMesh_CircleInspector_HeaderFile
#include <IMeshData_Types.hxx>
#include <BRepMesh_Circle.hxx>

View File

@@ -855,19 +855,20 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands,
if (narg == 1)
{
theCommands << "\n";
theCommands << "Usage : checkshape [-top] shape [result] [-short] [-parallel]\n";
theCommands << "Usage : checkshape [-top] shape [result] [-short] [-parallel] [-exact]\n";
theCommands << "\n";
theCommands << "Where :\n";
theCommands << " -top - check topology only.\n";
theCommands << " shape - the name of the shape to test.\n";
theCommands << " result - the prefix of the output shape names. If it is used, structural\n";
theCommands << " output style will be used. Otherwise - contextual one.\n";
theCommands << " -short - short description of check.\n";
theCommands << " -top - check topology only.\n";
theCommands << " shape - the name of the shape to test.\n";
theCommands << " result - the prefix of the output shape names. If it is used, structural\n";
theCommands << " output style will be used. Otherwise - contextual one.\n";
theCommands << " -short - short description of check.\n";
theCommands << " -parallel - run check in parallel.\n";
theCommands << " -exact - run check using exact method.\n";
return 0;
}
if (narg > 6)
if (narg > 7)
{
theCommands << "Invalid number of args!!!\n";
theCommands << "No args to have help.\n";
@@ -901,6 +902,7 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands,
Standard_Boolean IsShortDump = Standard_False;
Standard_Boolean IsContextDump = Standard_True;
Standard_Boolean IsParallel = Standard_False;
Standard_Boolean IsExact = Standard_False;
Standard_CString aPref(NULL);
if (aCurInd < narg && strncmp(a[aCurInd], "-", 1))
{
@@ -921,6 +923,10 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands,
{
IsParallel = Standard_True;
}
else if (anArg == "-exact")
{
IsExact = Standard_True;
}
else
{
theCommands << "Syntax error at '" << anArg << "'";
@@ -931,7 +937,7 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands,
try
{
OCC_CATCH_SIGNALS
BRepCheck_Analyzer anAna (aShape, aGeomCtrl, IsParallel);
BRepCheck_Analyzer anAna (aShape, aGeomCtrl, IsParallel, IsExact);
Standard_Boolean isValid = anAna.IsValid();
if (isValid)

View File

@@ -1915,11 +1915,11 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands)
theCommands.Add("mkoffset",
"mkoffset result face/compound of wires nboffset stepoffset [jointype(a/i) [alt]]",__FILE__,
mkoffset);
mkoffset,g);
theCommands.Add("openoffset",
"openoffset result face/wire nboffset stepoffset [jointype(a/i)]",__FILE__,
openoffset);
openoffset,g);
theCommands.Add("mkedge",
"mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]] ",__FILE__,
@@ -1967,11 +1967,11 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands)
edgeintersector,g);
theCommands.Add("build3d",
"build3d S [tol]",
"build3d S [tol]",__FILE__,
build3d, g);
theCommands.Add("reducepcurves",
"reducepcurves shape1 shape2 ...",
"reducepcurves shape1 shape2 ...",__FILE__,
reducepcurves, g);
theCommands.Add("concatC0wire",

View File

@@ -2502,7 +2502,7 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands)
theCommands.Add("offsetparameter",
"offsetparameter Tol Inter(c/p) JoinType(a/i/t) [RemoveInternalEdges(r/k)]",
__FILE__, offsetparameter);
__FILE__, offsetparameter, g);
theCommands.Add("offsetload",
"offsetload shape offset bouchon1 bouchon2 ...",
@@ -2523,53 +2523,53 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands)
theCommands.Add("featprism",
"Defines the arguments for a prism : featprism shape element skface Dirx Diry Dirz Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("featrevol",
"Defines the arguments for a revol : featrevol shape element skface Ox Oy Oz Dx Dy Dz Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("featpipe",
"Defines the arguments for a pipe : featpipe shape element skface spine Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("featdprism",
"Defines the arguments for a drafted prism : featdprism shape face skface angle Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("featlf",
"Defines the arguments for a linear rib or slot : featlf shape wire plane DirX DirY DirZ DirX DirY DirZ Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("featrf",
"Defines the arguments for a rib or slot of revolution : featrf shape wire plane X Y Z DirX DirY DirZ Size Size Fuse(0/1/2) Modify(0/1)",
__FILE__, DEFIN);
__FILE__, DEFIN, g);
theCommands.Add("addslide",
" Adds sliding elements : addslide prism/revol/pipe edge face [edge face...]",
__FILE__, ADD);
__FILE__, ADD, g);
theCommands.Add("featperform",
" Performs the prism revol dprism linform or pipe :featperform prism/revol/pipe/dprism/lf result [[Ffrom] Funtil]",
__FILE__, PERF);
__FILE__, PERF, g);
theCommands.Add("featperformval",
" Performs the prism revol dprism or linform with a value :featperformval prism/revol/dprism/lf result value",
__FILE__, PERF);
__FILE__, PERF, g);
theCommands.Add("endedges",
" Return top and bottom edges of dprism :endedges dprism shapetop shapebottom First/LastShape (1/2)",
__FILE__, BOSS);
__FILE__, BOSS, g);
theCommands.Add("fillet",
" Perform fillet on compounds of edges :fillet result object rad1 comp1 rad2 comp2 ...",
__FILE__, BOSS);
__FILE__, BOSS, g);
theCommands.Add("bossage",
" Perform fillet on top and bottom edges of dprism :bossage dprism result radtop radbottom First/LastShape (1/2)",
__FILE__, BOSS);
__FILE__, BOSS, g);
theCommands.Add("offsetshapesimple",
"offsetshapesimple result shape offsetvalue [solid] [tolerance=1e-7]",
__FILE__, ComputeSimpleOffset);
__FILE__, ComputeSimpleOffset, g);
}

View File

@@ -757,15 +757,15 @@ void BRepTest::FilletCommands(Draw_Interpretor& theCommands)
theCommands.Add("rollingball",
"rollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
rollingball);
rollingball, g);
theCommands.Add("brollingball",
"brollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
rollingball);
rollingball, g);
theCommands.Add("trollingball",
"trollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]",
__FILE__,
rollingball);
rollingball, g);
}

View File

@@ -504,10 +504,9 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
}
aMinDist *= aMinDist;
//Old domain
Standard_Real t = 0.5 * (f2d + l2d);
gp_Pnt2d aPf = C2d->Value(t);
gp_Pnt2d aPf = C2d->Value(f2d);
//New domain
gp_Pnt2d aNewPf = Curve2d->Value(t);
gp_Pnt2d aNewPf = Curve2d->Value(f2d);
gp_Vec2d aT(aNewPf, aPf);
if (aT.SquareMagnitude() > aMinDist)
{

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BVH_BinnedBuilder_Header
#define _BVH_BinnedBuilder_Header
#ifndef BVH_BinnedBuilder_HeaderFile
#define BVH_BinnedBuilder_HeaderFile
#include <BVH_QueueBuilder.hxx>

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BVH_Box_Header
#define _BVH_Box_Header
#ifndef BVH_Box_HeaderFile
#define BVH_Box_HeaderFile
#include <BVH_Constants.hxx>
#include <BVH_Types.hxx>

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BVH_Builder_Header
#define _BVH_Builder_Header
#ifndef BVH_Builder_HeaderFile
#define BVH_Builder_HeaderFile
#include <BVH_Set.hxx>
#include <BVH_BinaryTree.hxx>

View File

@@ -13,8 +13,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BVH_Geometry_Header
#define _BVH_Geometry_Header
#ifndef BVH_Geometry_HeaderFile
#define BVH_Geometry_HeaderFile
#include <BVH_ObjectSet.hxx>
#include <BVH_Builder.hxx>

Some files were not shown because too many files have changed in this diff Show More