mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0025443: Documentation - update packages names in Building 3rd-party libraries on Linux
Update README files for samples
This commit is contained in:
parent
18006a0f10
commit
f3fb84ce21
@ -224,3 +224,21 @@ Download the necessary archive from http://www.vtk.org/VTK/resources/software.ht
|
||||
4. Start the installation of gl2ps. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option.
|
||||
|
||||
make install
|
||||
|
||||
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
|
||||
|
||||
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
|
||||
|
||||
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 libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev libgl2ps-dev
|
||||
|
||||
To launch binaries built with WOK you need to install C shell and 32-bit libraries on x86_64 distributives:
|
||||
|
||||
# you may need to add i386 if not done already by command "dpkg --add-architecture i386"
|
||||
sudo apt-get install csh libstdc++6:i386 libxt6:i386 libxext6:i386 libxmu6:i386
|
||||
|
||||
Building is possible with C++ compliant compiler:
|
||||
|
||||
sudo apt-get install g++
|
||||
|
@ -296,19 +296,19 @@ Each descriptive block should contain at least a function name and purpose descr
|
||||
See the following example:
|
||||
|
||||
~~~~~{.cpp}
|
||||
// ----------------------------------------------
|
||||
// =======================================================================
|
||||
// function : TellMeSmthGood
|
||||
// purpose : Gives me good news
|
||||
// ----------------------------------------------
|
||||
// =======================================================================
|
||||
void TellMeSmthGood()
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// ----------------------------------------------
|
||||
// =======================================================================
|
||||
// function : TellMeSmthBad
|
||||
// purpose : Gives me bad news
|
||||
// ----------------------------------------------
|
||||
// =======================================================================
|
||||
void TellMeSmthBad()
|
||||
{
|
||||
...
|
||||
|
@ -1,54 +1,51 @@
|
||||
OCCT CSharp sample {#samples_csharp_occt}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT libraries in .Net application
|
||||
whitten using CSharp and Windows Forms or Windows Presentation Foundation (WPF).
|
||||
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 connection between .Net and OCCT (C++) level is provided by proxy library,
|
||||
OCCProxy, written in C++/CLI. The proxy library contains single ref class
|
||||
encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
and to import / export OCCT shapes from / to several supported formats of CAD
|
||||
files (IGES, STEP, BREP).
|
||||
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
|
||||
encapsulating OCCT viewer and providing the functionality to manipulate this viewer
|
||||
and to import / export OCCT shapes from / to several supported CAD file formats (IGES, STEP, BREP).
|
||||
|
||||
The sample implements two approaches for organizing user interface with C#.
|
||||
Both applications provide the same functionality as the standard OCCT
|
||||
Import/Export sample.
|
||||
First project is called "IE_WinForms" and uses Windows Forms for GUI.
|
||||
Second application is called "IE_WPF_WinForms" and uses Windows Presentation Foundation.
|
||||
The sample implements two approaches to the development of a user interface with C#.
|
||||
Both applications provide the same functionality as the standard OCCT Import/Export sample.
|
||||
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.
|
||||
|
||||
Note a few important details:
|
||||
|
||||
- to encapsulate C++ class into a field of ref class, template class
|
||||
NCollection_Haft provided by OCCT is used
|
||||
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;
|
||||
|
||||
- in order to work consistently on 64-bit systems with OCCT libraries built in
|
||||
32-bit mode, C# assemblies need to have platform target explicitly set to "x86"
|
||||
(in project Properties / Build)
|
||||
- It is necessary to explicitly set the target platform for C# assemblies to *x86*
|
||||
in project **Properties - Build** to work consistently on 64-bit systems with OCCT libraries built in 32-bit mode;
|
||||
|
||||
- this sample demonstrates indirect method of wrapping C++ to C# using manually
|
||||
created proxy library. Alternative method is available, wrapping individual
|
||||
OCCT classes to C# equivalents so that their full API is available to C# user
|
||||
and the code can be programmed on C# level similarly to C++ one. See desciption
|
||||
of OCCT C# Wrapper in Advanced Samples and Tools on OCCT web site at
|
||||
- this sample demonstrates indirect method of wrapping C++ to C# using a manually
|
||||
created proxy library. There is an alternative method of wrapping individual
|
||||
OCCT classes to C# equivalents to make their full API available to a C# user
|
||||
and to let the code be programmed on C# level similarly to C++ one. See the description
|
||||
of **OCCT C# Wrapper** in **Advanced Samples and Tools** at
|
||||
http://www.opencascade.org/support/products/advsamples
|
||||
|
||||
- in WPF sample, WinForms control is used to encapsulate OCC viewer since WPF
|
||||
does not provide necessary interface to embed OpenGl view. Other possible
|
||||
solution could be to render OpenGl scene in off-screen buffer and map it
|
||||
to WPF control as image. That approach would allow using all WPF features in
|
||||
control embedding OCCT viewer.
|
||||
- in WPF sample, **WinForms** control is used to encapsulate OCC viewer since WPF
|
||||
does not provide the necessary interface to embed OpenGl view. Other possible
|
||||
solution could be to render OpenGl scene in an off-screen buffer and to map it
|
||||
to WPF control as an image. That approach would allow using all WPF features to
|
||||
control the OCCT viewer.
|
||||
|
||||
Run msvc.bat to start MS Visual Studio for building the sample.
|
||||
Run *msvc.bat* to start MS Visual Studio for building the sample.
|
||||
Note that project files are provided only for VS 2010, you can open them in
|
||||
newer versions of Visual Studio using automatic converter.
|
||||
After conversion check option "Target framework" in properties of C# projects
|
||||
(tab "Application") to ensure that it corresponds to the version set in
|
||||
the properties of the C++ projects (e.g. ".Net Framework 4.0" for VS 2010).
|
||||
newer versions of Visual Studio the using automatic converter.
|
||||
|
||||
Run run_winforms.bat or run_wpf.bat to launch the corresponding sample.
|
||||
After conversion check option **Target framework** in the properties of C# projects
|
||||
(tab **Application**) to make sure that it corresponds to the version set in
|
||||
the properties of C++ projects (e.g. <b>.Net Framework 4.0</b> for VS 2010).
|
||||
|
||||
Note that all batch scripts use configuration defined in OCCT custom.bat file
|
||||
Run *run_winforms.bat* or *run_wpf.bat* to launch the corresponding sample.
|
||||
|
||||
Note that all batch scripts use the configuration defined in OCCT *custom.bat* file
|
||||
as default; you can provide arguments specifying VS version, bitness, and mode
|
||||
to override these settings, e.g.:
|
||||
|
||||
> msvc.bat vc10 win64 Debug
|
||||
> msvc.bat vc10 win64 Debug
|
||||
|
@ -1,56 +1,54 @@
|
||||
Direct3D CSharp sample {#samples_csharp_direct3d}
|
||||
==================
|
||||
|
||||
This sample demonstrates simple way of using OCCT and DirectX libraries in .Net application
|
||||
whitten using CSharp and Windows Presentation Foundation (WPF).
|
||||
This sample demonstrates how to use OCCT and DirectX libraries in <b>.Net</b> application
|
||||
written using **CSharp** and **Windows Presentation Foundation** (WPF).
|
||||
|
||||
The connection between .Net, OCCT (C++) and DirectX level is provided by proxy libraies,
|
||||
OCCProxy and D3DProxy, written in C++/CLI. The proxy OCCProxy library contains single ref class
|
||||
encapsulating OCCT viewer and providing functionality to manipulate this viewer
|
||||
and to import / export OCCT shapes from / to several supported formats of CAD
|
||||
files (IGES, STEP, BREP). And the proxy D3DProxy library contains helper methods for rendering
|
||||
via DirectX.
|
||||
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
|
||||
*ref* class encapsulating OCCT viewer and providing the functionality to manipulate this viewer
|
||||
and to import / export OCCT shapes from / to several supported CAD file formats (IGES, STEP,
|
||||
BREP). The proxy library **D3DProxy** contains helper methods for rendering via DirectX.
|
||||
|
||||
Organizing of user interface in this sample is provided by Windows Presentation Foundation (WPF).
|
||||
And it has the same functionality as the standard OCCT Import/Export sample. The project is
|
||||
called "IE_WPF_D3D".
|
||||
The user interface in this sample is based on Windows Presentation Foundation (WPF).
|
||||
It has the same functionality as the standard OCCT Import/Export sample. The project is
|
||||
called *IE_WPF_D3D*.
|
||||
|
||||
Note a few important details:
|
||||
|
||||
- to build this sample you should to download and install DirectX SDK
|
||||
http://www.microsoft.com/en-us/download/details.aspx?id=6812
|
||||
|
||||
- to encapsulate C++ class into a field of ref class, template class
|
||||
NCollection_Haft provided by OCCT is used
|
||||
- OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class;
|
||||
|
||||
- in order to work consistently on 64-bit systems with OCCT libraries built in
|
||||
32-bit mode, C# assemblies need to have platform target explicitly set to "x86"
|
||||
(in project Properties / Build)
|
||||
- It is necessary to explicitly set the target platform for C# assemblies to *x86*
|
||||
in project **Properties - Build** to work consistently on 64-bit systems with OCCT libraries built in 32-bit mode;
|
||||
|
||||
- this sample demonstrates indirect method of wrapping C++ to C# using manually
|
||||
created proxy library. Alternative method is available, wrapping individual
|
||||
OCCT classes to C# equivalents so that their full API is available to C# user
|
||||
and the code can be programmed on C# level similarly to C++ one. See desciption
|
||||
of OCCT C# Wrapper in Advanced Samples and Tools on OCCT web site at
|
||||
- this sample demonstrates indirect method of wrapping C++ to C# using a manually
|
||||
created proxy library. There is an alternative method of wrapping individual
|
||||
OCCT classes to C# equivalents to make their full API available to a C# user
|
||||
and to let the code be programmed on C# level similarly to C++ one. See the description
|
||||
of **OCCT C# Wrapper** in **Advanced Samples and Tools** at
|
||||
http://www.opencascade.org/support/products/advsamples
|
||||
|
||||
- in WPF sample, WinForms control is used to encapsulate OCC viewer since WPF
|
||||
does not provide necessary interface to embed OpenGl view. Other possible
|
||||
solution could be to render OpenGl scene in off-screen buffer and map it
|
||||
to WPF control as image. That approach would allow using all WPF features in
|
||||
control embedding OCCT viewer.
|
||||
- in WPF sample, **WinForms** control is used to encapsulate OCC viewer since WPF
|
||||
does not provide the necessary interface to embed OpenGl view. Other possible
|
||||
solution could be to render OpenGl scene in an off-screen buffer and to map it
|
||||
to WPF control as an image. That approach would allow using all WPF features to
|
||||
control the OCCT viewer.
|
||||
|
||||
Run msvc.bat to start MS Visual Studio for building the sample.
|
||||
Run *msvc.bat* to start MS Visual Studio for building the sample.
|
||||
Note that project files are provided only for VS 2010, you can open them in
|
||||
newer versions of Visual Studio using automatic converter.
|
||||
After conversion check option "Target framework" in properties of C# projects
|
||||
(tab "Application") to ensure that it corresponds to the version set in
|
||||
the properties of the C++ projects (e.g. ".Net Framework 4.0" for VS 2010).
|
||||
newer versions of Visual Studio using an automatic converter.
|
||||
|
||||
Run run_wpf-D3D.bat to launch the corresponding sample.
|
||||
After conversion check option **Target framework** in the properties of C# projects
|
||||
(tab **Application**) to make sure that it corresponds to the version set in
|
||||
the properties of C++ projects (e.g. <b>.Net Framework 4.0</b> for VS 2010).
|
||||
|
||||
Note that all batch scripts use configuration defined in OCCT custom.bat file
|
||||
Run *run_wpf-D3D.bat* to launch the corresponding sample.
|
||||
|
||||
Note that all batch scripts use the configuration defined in OCCT *custom.bat* file
|
||||
as default; you can provide arguments specifying VS version, bitness, and mode
|
||||
to override these settings, e.g.:
|
||||
|
||||
> msvc.bat vc10 win64 Debug
|
||||
> msvc.bat vc10 win64 Debug
|
||||
|
@ -1,60 +1,49 @@
|
||||
MFC samples {#samples_mfc_standard}
|
||||
==========
|
||||
|
||||
1. Description of the tree structure:
|
||||
---------------------------------------------
|
||||
1. Contents
|
||||
-----------------------
|
||||
|
||||
The directory <i> samples/mfc/standard </i> contains the following packages and files:
|
||||
|
||||
* Numbered packages: **01_Geometry**, **02_Modeling**, etc. provide projects and sources of samples;
|
||||
* Files **All-vc(number).sln** are auxiliary utility projects depending on all other sample
|
||||
projects. When such project is rebuilt, all samples and *mfcsample* library are also rebuilt.
|
||||
* **Common** directory provides common source and header files for samples and dynamic-link library *mfcsample.dll.*
|
||||
* **Data** directory stores data files.
|
||||
* **mfcsample** directory contains project for *mfcsample.dll* library providing basic functionality used by all OCC samples.
|
||||
* File **env.bat** is called from *msvc.bat.*
|
||||
|
||||
|
|
||||
|-- 01_Geometry
|
||||
|-- 02_Modeling
|
||||
|-- 03_Viewer2d
|
||||
|-- 04_Viewer3d Projects and sources of samples
|
||||
|-- 05_ImportExport
|
||||
|-- 06_Ocaf
|
||||
|-- 07_Triangulation
|
||||
|-- 08_HLR
|
||||
|-- 09_Animation
|
||||
|-- 10_Convert
|
||||
|
|
||||
|-- All-vc"number".sln Auxilary utility project. It depends on all other sample
|
||||
| projects, so when rebuilded it rebuilds all samples and
|
||||
| mfcsample library.
|
||||
|
|
||||
|-- Common Common source and header files for samples and
|
||||
| dynamic-link library mfcsample.dll.
|
||||
|
|
||||
|-- Data Data files.
|
||||
|
|
||||
|-- mfcsample Project for mfcsample.dll. This library is used by all
|
||||
| samples. It contains basic funcionality that commonly
|
||||
| needed in every OCC sample.
|
||||
|
|
||||
|
|
||||
|-- env.bat This file is called from msvc.bat.
|
||||
|
||||
|
||||
2. Launching Open CASCADE Technology samples:
|
||||
---------------------------------
|
||||
|
||||
To run the Open CASCADE Technology samples:
|
||||
|
||||
execute run.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug] [SampleName]
|
||||
To run the Open CASCADE Technology samples, use command:
|
||||
|
||||
To run the Animation sample:
|
||||
~~~~
|
||||
execute run.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug] [SampleName]
|
||||
~~~~
|
||||
|
||||
To run the **Animation** sample, use command:
|
||||
|
||||
~~~~
|
||||
execute run.bat vc8 win32 Debug Animation
|
||||
~~~~
|
||||
|
||||
execute run.bat vc8 win32 Debug Animation
|
||||
|
||||
3. Modifying and rebuilding samples:
|
||||
--------------------------------------------
|
||||
|
||||
You can modify, compile and launch all sample projects in MS Visual C++ at once:
|
||||
|
||||
execute msvc.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug]
|
||||
You can modify, compile and launch all sample projects in MS Visual C++ at once with command:
|
||||
|
||||
To run all sample projects in MS Visual C++ at once:
|
||||
|
||||
execute msvc.bat vc8 win32 Debug
|
||||
~~~~
|
||||
execute msvc.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug]
|
||||
~~~~
|
||||
|
||||
To run all sample projects in MS Visual C++ at once, use command:
|
||||
|
||||
Note: make sure your PATH environment variable contains a directory,
|
||||
msdev.exe is located in.
|
||||
~~~~
|
||||
execute msvc.bat vc8 win32 Debug
|
||||
~~~~
|
||||
|
||||
Note: make sure that your *PATH* environment variable contains a directory, where *msdev.exe* is located.
|
Loading…
x
Reference in New Issue
Block a user