Compare commits
73 Commits
CR0_extern
...
CR25936CAF
Author | SHA1 | Date | |
---|---|---|---|
|
7786f8f8cb | ||
|
2f77210497 | ||
|
6ca259e871 | ||
|
d677b21418 | ||
|
20aeeb7be3 | ||
|
e9312c0fc2 | ||
|
4ff92abe44 | ||
|
77dbd1f155 | ||
|
4f99f761b1 | ||
|
4d6554d142 | ||
|
f4264b5adb | ||
|
9d99d3c16d | ||
|
3667907665 | ||
|
47e3009da9 | ||
|
c9e1d810ab | ||
|
905db76982 | ||
|
1ff072271f | ||
|
c785481848 | ||
|
795be040eb | ||
|
a0218ba1c5 | ||
|
325e442bce | ||
|
16420da1d4 | ||
|
a2ff7810d8 | ||
|
64b470617f | ||
|
5b70cbe8c1 | ||
|
74fb257d6c | ||
|
ad2a55b2f3 | ||
|
702ef49f22 | ||
|
3da62e0ec3 | ||
|
e1312bce25 | ||
|
6b13d5288e | ||
|
c8f62d27b0 | ||
|
ed9ce6777f | ||
|
8d27a37d80 | ||
|
2f9dedc5fe | ||
|
6e2cb64d8f | ||
|
d376db7a1e | ||
|
58cf74e0c0 | ||
|
5fb5b5c432 | ||
|
acb81c8314 | ||
|
f47afe531d | ||
|
d0fc16452d | ||
|
593f18f8ec | ||
|
f1eca450db | ||
|
a84c3447ad | ||
|
3b25c0e867 | ||
|
92efcf78a6 | ||
|
f5f4ebd07b | ||
|
6595eee796 | ||
|
4e14c88f77 | ||
|
f44aa19760 | ||
|
600f8c7f47 | ||
|
0e617b05e7 | ||
|
586db386eb | ||
|
cc6852f3e9 | ||
|
d660a72aca | ||
|
badc9305ae | ||
|
97f937cc55 | ||
|
c8b5b3d89e | ||
|
525ec87c53 | ||
|
5371131494 | ||
|
b128c89231 | ||
|
6bd94e0de9 | ||
|
f486f64d86 | ||
|
8156ddddc7 | ||
|
fbef84f9eb | ||
|
95081657f1 | ||
|
6a2ee09493 | ||
|
ce48b00930 | ||
|
c16915c713 | ||
|
4d147bf2a7 | ||
|
bd485d9691 | ||
|
31dfc19fcb |
@@ -34,7 +34,7 @@ project (OCCT)
|
||||
# Solution folder property
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
set (INSTALL_OCCT_TEST_CASES OFF CACHE BOOL "${INSTALL_OCCT_TEST_CASES_DESCR}")
|
||||
set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}")
|
||||
# a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
|
||||
# check this variable and set if it's required
|
||||
if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
|
||||
@@ -48,7 +48,7 @@ if (OCCT_ALGO_EXTENDED_OUTPUT)
|
||||
endif()
|
||||
|
||||
# copy samples to install directory
|
||||
set (INSTALL_OCCT_SAMPLES OFF CACHE BOOL "${INSTALL_OCCT_SAMPLES_DESCR}")
|
||||
set (INSTALL_SAMPLES OFF CACHE BOOL "${INSTALL_SAMPLES_DESCR}")
|
||||
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
|
||||
@@ -375,11 +375,11 @@ message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
||||
|
||||
if (INSTALL_OCCT_SAMPLES)
|
||||
if (INSTALL_SAMPLES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
if (INSTALL_OCCT_TEST_CASES)
|
||||
if (INSTALL_TEST_CASES)
|
||||
OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
|
@@ -2,6 +2,6 @@ FoundationClasses TKernel TKMath
|
||||
ModelingData TKG2d TKG3d TKGeomBase TKBRep
|
||||
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
|
||||
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml FWOSPlugin TKTObj TKBinTObj TKXmlTObj
|
||||
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml FWOSPlugin TKTObj TKBinTObj TKXmlTObj TKVCAF
|
||||
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
||||
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
|
||||
|
@@ -237,7 +237,6 @@ n BinMDataXtd
|
||||
n BinMDocStd
|
||||
n BinMFunction
|
||||
n BinMNaming
|
||||
n BinMPrsStd
|
||||
n BinObjMgt
|
||||
n BinTools
|
||||
n CDF
|
||||
@@ -260,7 +259,6 @@ n XmlMDataXtd
|
||||
n XmlMDocStd
|
||||
n XmlMFunction
|
||||
n XmlMNaming
|
||||
n XmlMPrsStd
|
||||
n XmlObjMgt
|
||||
r StdResource
|
||||
r XmlOcafResource
|
||||
@@ -431,3 +429,5 @@ n IVtkTools
|
||||
t TKIVtk
|
||||
n IVtkDraw
|
||||
t TKIVtkDraw
|
||||
n Geom2dEvaluator
|
||||
t TKVCAF
|
||||
|
@@ -24,8 +24,8 @@ These include messages on internal errors and special cases encountered, timing
|
||||
|
||||
# install variables
|
||||
set (INSTALL_DIR_DESCR
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_OCCT_TEST_CASES variable),
|
||||
samples (INSTALL_OCCT_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
"The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable),
|
||||
samples (INSTALL_SAMPLES_DESCR variable) and certain 3rdparties (INSTALL_GL2PS, INSTALL_TBB and
|
||||
other similar variables) will be placed during the installation process (building INSTALL project)")
|
||||
|
||||
macro (INSTALL_MESSAGE INSTALL_TARGET_VARIABLE INSTALL_TARGET_STRING)
|
||||
@@ -34,8 +34,8 @@ set (${INSTALL_TARGET_VARIABLE}_DESCR
|
||||
project) into the installation directory (INSTALL_DIR variable)")
|
||||
endmacro()
|
||||
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_OCCT_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_SAMPLES "OCCT samples")
|
||||
INSTALL_MESSAGE (INSTALL_TEST_CASES "non-regression OCCT test scripts")
|
||||
INSTALL_MESSAGE (INSTALL_DOC_OcctOverview "OCCT overview documentation (HTML format)")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGE "FreeImage binaries")
|
||||
INSTALL_MESSAGE (INSTALL_FREEIMAGEPLUS "FreeImagePlus binaries")
|
||||
|
@@ -731,7 +731,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
|
||||
|
||||
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
|
||||
puts $doxyFile "DOT_PATH = $graphvizPath"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
|
||||
puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
|
||||
|
||||
# list of files to generate
|
||||
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]
|
||||
|
@@ -502,7 +502,7 @@ proc DefineExplicitRtti {hxxfile class base theSourceExtensions} {
|
||||
# try to find existing macro IMPLEMENT_STANDARD_RTTIEXT and check that
|
||||
# it is consistent
|
||||
foreach line $aFileContent {
|
||||
if { [regexp {^\s*IMPLEMENT_STANDARD_RTTIEXT\s*\(\s*$class\s*,\s*([A-Za-z]+)\s*\)} $line res impl_base] } {
|
||||
if { [regexp "^\\s*IMPLEMENT_STANDARD_RTTIEXT\\s*\\(\\s*$class\\s*,\\s*(\[A-Za-z0-9_\]+)\\s*\\)" $line res impl_base] } {
|
||||
# implementation is in place, just report warning if second argument
|
||||
# is different
|
||||
if { $base != $impl_base } {
|
||||
@@ -592,13 +592,14 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all instances of DEFINE_STANDARD_RTTI with single or two arguments
|
||||
set index 0
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)([_A-Z]+)?\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)}
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_rtti \
|
||||
$aProcessedFileContent location start clist] } {
|
||||
$aProcessedFileContent location start suffix clist] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
set start [eval string range \$aProcessedFileContent $start]
|
||||
set suffix [eval string range \$aProcessedFileContent $suffix]
|
||||
set clist [split [eval string range \$aProcessedFileContent $clist] ,]
|
||||
|
||||
if { [llength $clist] == 1 } {
|
||||
set class [string trim [lindex $clist 0]]
|
||||
@@ -609,12 +610,8 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!"
|
||||
}
|
||||
set change_flag 1
|
||||
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
|
||||
# corresponding source file (or check it already present),
|
||||
# and depending on this, use either inline or out-of-line variant
|
||||
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $inherits($class) $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}${rtti_suffix}($class,$inherits($class))" index
|
||||
"${start}EXT($class,$inherits($class))" index
|
||||
}
|
||||
} else {
|
||||
logwarn "Error in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file, cannot fix"
|
||||
@@ -624,14 +621,16 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
set base [string trim [lindex $clist 1]]
|
||||
if { ! [info exists inherits($class)] } {
|
||||
logwarn "Warning in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file"
|
||||
} elseif { $base != $inherits($class) } {
|
||||
} elseif { $base != $inherits($class) && ! [info exists inherits($class,multiple)] } {
|
||||
logwarn "Warning in $aProcessedFile: Second argument in macro DEFINE_STANDARD_RTTI for class $class is $base while $class seems to inherit from $inherits($class)"
|
||||
if { ! [info exists inherits($class,multiple)] } {
|
||||
set base $inherits($class)
|
||||
}
|
||||
}
|
||||
if { ! $theCheckMode } {
|
||||
# convert intermediate version of macro DEFINE_STANDARD_RTTI
|
||||
# with two arguments to either _INLINE or EXT variant
|
||||
if { ! $theCheckMode && "$suffix" == "" } {
|
||||
set change_flag 1
|
||||
# try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the
|
||||
# corresponding source file (or check it already present),
|
||||
# and depending on this, use either inline or out-of-line variant
|
||||
set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $base $theSourceExtensions]
|
||||
ReplaceSubString aProcessedFileContent $location \
|
||||
"${start}${rtti_suffix}($class,$base)" index
|
||||
@@ -679,7 +678,7 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
|
||||
# find all uses of macro STANDARD_TYPE and method DownCast and ensure that
|
||||
# argument class is explicitly included
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*}
|
||||
set pattern_incbeg {\s*#\s*include\s*[\"<]\s*([A-Za-z0-9_/]*/)?}
|
||||
set pattern_incend {[.][a-zA-Z]+\s*[\">]}
|
||||
set index 0
|
||||
set addtype {}
|
||||
@@ -707,7 +706,9 @@ proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \
|
||||
if { ! $theCheckMode } {
|
||||
set addinc ""
|
||||
foreach type $addtype {
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
if { "$aProcessedFileName" != "$type.hxx" } {
|
||||
append addinc "\n#include <$type.hxx>"
|
||||
}
|
||||
}
|
||||
if { [regexp -indices ".*\n${pattern_incbeg}\[A-Za-z0-9_/\]+${pattern_incend}" $aProcessedFileContent location] } {
|
||||
set change_flag 1
|
||||
@@ -734,6 +735,7 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
|
||||
# iterate by header files
|
||||
foreach aHeader [glob -nocomplain -type f -directory $theTargetPath *.{$theExtensions}] {
|
||||
set aCurrentHeaderName [file tail $aHeader]
|
||||
|
||||
# skip gxx files, as names Handle_xxx used there are in most cases
|
||||
# placeholders of the argument types substituted by #define
|
||||
@@ -767,8 +769,9 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
set anUpdatedHeaderContent {}
|
||||
set pattern_handle {\mHandle_([A-Za-z0-9_]+)}
|
||||
foreach line $aHeaderContent {
|
||||
# do not touch #include and #if... statements
|
||||
if { [regexp {\s*\#\s*include} $line] || [regexp {\s*\#\s*if} $line] } {
|
||||
# do not touch typedefs, #include, and #if... statements
|
||||
if { [regexp {^\s*typedef} $line] ||
|
||||
[regexp {^\s*\#\s*include} $line] || [regexp {^\s*\#\s*if} $line] } {
|
||||
lappend anUpdatedHeaderContent $line
|
||||
continue
|
||||
}
|
||||
@@ -848,8 +851,8 @@ proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} {
|
||||
} else {
|
||||
# replace by forward declaration of a class or its include unless
|
||||
# it is already declared or included
|
||||
if { ! [regexp "^\s*\#\s*include\s*\[\<\"\]\s*$aForwardDeclHandledClass\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject } {
|
||||
if { ! [regexp "\#\\s*include\\s*\[\<\"\]\\s*(\[A-Za-z0-9_/\]*/)?$aForwardDeclHandledClass\[.\]hxx\\s*\[\>\"\]" $aHeaderContent] } {
|
||||
if { $isQObject && "$aCurrentHeaderName" != "${aForwardDeclHandledClass}.hxx" } {
|
||||
lappend anUpdatedHeaderContent "#include <${aForwardDeclHandledClass}.hxx>"
|
||||
if { ! [SearchForFile $theIncPaths ${aForwardDeclHandledClass}.hxx] } {
|
||||
loginfo "Warning: include ${aForwardDeclHandledClass}.hxx added in $aHeader, assuming it exists and defines Handle_$aForwardDeclHandledClass"
|
||||
@@ -1031,7 +1034,10 @@ proc ConvertCStyleHandleCast {pkpath theExtensions theCheckMode} {
|
||||
while { [regexp -start $index -indices -lineanchor $pattern_refcast0 $hxx location class var] } {
|
||||
set index [lindex $location 1]
|
||||
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
set var [eval string range \$hxx $var]
|
||||
if { "$var" != "const" && "$var" != "Standard_OVERRIDE" } {
|
||||
logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]"
|
||||
}
|
||||
}
|
||||
|
||||
# replace const Handle(A)& a = Handle(B)::DownCast (b); by
|
||||
|
67
adm/upgrade_sample_orig.dat
Normal file
@@ -0,0 +1,67 @@
|
||||
// This is sample C++ file intended for testing and verifyig automatic upgrade
|
||||
// script. Copy it with extension .cxx and apply upgrade procedure to see
|
||||
// the result, as follows:
|
||||
// > upgrade.bat -src=./adm -inc=./src -recurse -all
|
||||
|
||||
// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below
|
||||
#include <gp.hxx>
|
||||
|
||||
//========================================================================
|
||||
// OCCT 7.0
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -rtti
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Should be replaced by <Standard_Type.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
|
||||
class A_0
|
||||
{
|
||||
}
|
||||
|
||||
class B_1 :
|
||||
public A_0
|
||||
{
|
||||
// second argument "A_0" should be added
|
||||
DEFINE_STANDARD_RTTI(B_1)
|
||||
};
|
||||
|
||||
class C_2 : public Standard_Transient, B_1
|
||||
{
|
||||
// second argument "Standard_Transient" should be added
|
||||
DEFINE_STANDARD_RTTI(C_2)
|
||||
};
|
||||
|
||||
void for_rtti ()
|
||||
{
|
||||
Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ());
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve);
|
||||
}
|
||||
|
||||
// should be removed
|
||||
IMPLEMENT_DOWNCAST(A)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(A, B)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Option -fwd
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// force safe mode used for Qt objects
|
||||
Q_OBJECT
|
||||
slots:
|
||||
|
||||
// these includes should be recognized as corresponding to forward declarations
|
||||
#include <occt/TColStd_HArray1OfReal.hxx>
|
||||
|
||||
// these declarations should be just removed
|
||||
class Handle(TColStd_HArray1OfReal);
|
||||
|
||||
// should be replaced by include of corresponding header
|
||||
class TColStd_Array1OfReal;
|
||||
class Handle(Geom_Curve);
|
||||
|
||||
// check that trailing spaces at the following line are preserved
|
||||
void ff();
|
||||
|
@@ -102,7 +102,7 @@ The following table enumerates the full list of environment variables used at co
|
||||
| 3RDPARTY_GL2PS_* | Path | Path to GL2PS binaries |
|
||||
| 3RDPARTY_TBB* | Path | Path to TBB binaries |
|
||||
| 3RDPARTY_VTK_* | Path | Path to VTK binaries |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref occt_user_guides |
|
||||
| BUILD_MODULE_<MODULE>| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides |
|
||||
| BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files for use when linking other targets |
|
||||
| BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\<MODULE\>* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically |
|
||||
| REBUILD_PLATFORM_DEPENDENT_CODE | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this options leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files |
|
||||
@@ -117,8 +117,8 @@ The following table enumerates the full list of environment variables used at co
|
||||
| INSTALL_TBB | Boolean flag | Indicates whether TBB binaries should be installed into the installation directory |
|
||||
| INSTALL_VTK | Boolean flag | Indicates whether VTK binaries should be installed into the installation directory |
|
||||
| INSTALL_TCL | Boolean flag | Indicates whether TCL binaries should be installed into the installation directory |
|
||||
| INSTALL_OCCT_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_OCCT_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory |
|
||||
| INSTALL_SAMPLES | Boolean flag | Indicates whether OCCT samples should be installed into the installation directory |
|
||||
| INSTALL_DOC_OcctOverview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory |
|
||||
|
||||
**Note:** In those CMake options defining paths only the forward slashes ("/") are acceptable.
|
||||
|
@@ -3,9 +3,9 @@ Using WOK {#occt_dev_guides__building_wok}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
\ref occt_dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
|
||||
WOK is a legacy build environment for Open CASCADE Technology.
|
||||
It is required for generation of header files for classes defined with
|
||||
@ref occt_dev_guides__cdl "CDL" ("Cascade Definition Language").
|
||||
CDL ("Cascade Definition Language").
|
||||
Also tools for generation of project files for other build systems, and OCCT
|
||||
documentation, are integrated to WOK.
|
||||
|
||||
@@ -105,7 +105,7 @@ and third-party components required for building OCCT.
|
||||
|
||||
Note that <i>$CASROOT</i> is equal to *D:/occt* now.
|
||||
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.; see @ref occt_dev_guides__wok "WOK User's Guide" for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
Then you can work with this workbench using normal WOK functionality (*wprocess, umake*, etc.) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or *make* command on Linux, as described below.
|
||||
|
||||
@section wok3 Generation of building projects
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="gp_XY">
|
||||
<Type Name="gp_XY">
|
||||
<DisplayString>[{(float)x} {(float)y}]</DisplayString>
|
||||
</Type>
|
||||
<Type Name="gp_Pnt2d">
|
||||
@@ -40,18 +40,25 @@
|
||||
</Type>
|
||||
<Type Name="Handle_Standard_Transient">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[cnt={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">[count={entity->count}]</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*((NCollection_Handle<$T1>::Ptr*)entity)->myPtr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="opencascade::handle<*>">
|
||||
<DisplayString Condition="entity==0x00000000">NULL</DisplayString>
|
||||
<DisplayString Condition="entity!=0x00000000">{(void*)entity} [cnt={entity->count} {*entity}]</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>(opencascade::handle<$T1>::element_type*)entity</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="TCollection_AsciiString">
|
||||
<DisplayString>{mylength}: {mystring,s}</DisplayString>
|
||||
</Type>
|
||||
@@ -101,6 +108,17 @@
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="NCollection_Sequence<*>">
|
||||
<DisplayString>NCollection_Sequence [{mySize}]</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<Size>mySize</Size>
|
||||
<HeadPointer>myFirstItem</HeadPointer>
|
||||
<NextPointer>myNext</NextPointer>
|
||||
<ValueNode>*($T1*)(sizeof(NCollection_SeqNode) + ((char *)this))</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="Bnd_B2f">
|
||||
<AlternativeType Name="Bnd_B2d"></AlternativeType>
|
||||
<DisplayString Condition="myCenter[0] > 1000000000000000000.">VOID</DisplayString>
|
||||
@@ -143,4 +161,97 @@
|
||||
<Type Name="OpenGl_Context">
|
||||
<DisplayString>[{myGlVerMajor}.{myGlVerMinor}]</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!--ArrayItems Expansion-->
|
||||
<Type Name="TColStd_Array1OfInteger">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Integer*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_Array1OfReal">
|
||||
<DisplayString Condition="isAllocated != 1">empty</DisplayString>
|
||||
<DisplayString>{{size = {myUpperBound - myLowerBound + 1}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="isAllocated == 1" Name="[size]">myUpperBound - myLowerBound + 1</Item>
|
||||
<ArrayItems Condition="isAllocated == 1">
|
||||
<Size>myUpperBound - myLowerBound + 1</Size>
|
||||
<ValuePointer>(Standard_Real*)(myStart) + myLowerBound</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!--Multi-dimensional Arrays-->
|
||||
<Type Name="TColStd_Array2OfInteger">
|
||||
<DisplayString Condition="(myUpperColumn == myLowerColumn) && (myUpperRow == myLowerRow)">empty</DisplayString>
|
||||
<DisplayString>extent = {(myUpperColumn-myLowerColumn+1) * (myUpperRow-myLowerRow+1)}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!--LinkedListItems Expansion-->
|
||||
<Type Name="TColStd_ListNodeOfListOfInteger">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfInteger*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfInteger">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfInteger*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListNodeOfListOfReal">
|
||||
<DisplayString>{{current = {myValue}}}</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>(TColStd_ListNodeOfListOfReal*)myNext</NextPointer>
|
||||
<ValueNode>this->myValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TColStd_ListOfReal">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(TColStd_ListNodeOfListOfReal*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="BRep_ListOfCurveRepresentation">
|
||||
<DisplayString Condition="myFirst == 0">empty</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="values">(BRep_ListNodeOfListOfCurveRepresentation*)(myFirst)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_Shape">
|
||||
<DisplayString>{myOrient} {myTShape} loc={myLocation}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="TopoDS_TShape">
|
||||
<DisplayString>subshapes={myShapes} flags={myFlags}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_Pave">
|
||||
<DisplayString>{{{myIndex} {myParameter}}}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="BOPDS_PaveBlock">
|
||||
<DisplayString>edge={myEdge} orig={myOriginalEdge} pave1={myPave1} pave2={myPave2} extpaves={myExtPaves}</DisplayString>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
|
@@ -97,25 +97,14 @@ The official repository contains:
|
||||
|
||||
@subsubsection occt_gitguide_2_1_1 Installation of Git for Windows
|
||||
|
||||
Download Git for Windows distributive from http://code.google.com/p/msysgit/downloads/list.
|
||||
Download Git for Windows distributive from https://git-for-windows.github.io/
|
||||
During the installation:
|
||||
|
||||
* Select Windows Explorer integration options:
|
||||
* Git Bash Here
|
||||
* Git GUI Here
|
||||
|
||||
@image html OCCT_GitGuide_V2_image001.png
|
||||
@image latex OCCT_GitGuide_V2_image001.png
|
||||
|
||||
* To avoid a mess in your PATH, we recommend selecting ‘Run Git from Windows Prompt’ in the environment settings dialog:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image002.png
|
||||
@image latex OCCT_GitGuide_V2_image002.png
|
||||
|
||||
* Check-in "Windows Explorer integration" options:
|
||||
* "Git Bash Here";
|
||||
* "Git GUI Here".
|
||||
* To avoid a mess in your PATH, we recommend selecting "Run Git from Windows Prompt" in the environment settings dialog:
|
||||
* In "Configuring the line ending conversions" dialog, select "Checkout Windows-style, commit Unix style endings".
|
||||
|
||||
@image html OCCT_GitGuide_V2_image003.png
|
||||
@image latex OCCT_GitGuide_V2_image003.png
|
||||
|
||||
Note that by default Git user interface is localized to the system default language.
|
||||
If you prefer to work with the English interface, remove or rename .msg localization file
|
||||
@@ -128,15 +117,12 @@ The official repository contains:
|
||||
Download TortoiseGit distributive from http://code.google.com/p/tortoisegit/downloads/list.
|
||||
Launch the installation.
|
||||
|
||||
* Select your SSH client. Choose OpenSSH if you prefer to use command-line tools
|
||||
for SSH keys generation, or TortoisePLink if you prefer to use GUI tool (PuttyGen, see 3.2):
|
||||
|
||||
@image html OCCT_GitGuide_V2_image004.png
|
||||
@image latex OCCT_GitGuide_V2_image004.png
|
||||
|
||||
* Complete the installation.
|
||||
* Select your SSH client. Choose option
|
||||
* "OpenSSH, Git default SSH Client" if you prefer to use command-line tools for SSH keys generation, or
|
||||
* "TortoisePLink, coming from Putty, integrates with Windows better" if you prefer to use GUI tool (PuttyGen, see 3.2).
|
||||
* Complete the installation.
|
||||
|
||||
TortoiseGit integrates to Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
TortoiseGit integrates into Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image005.png
|
||||
@image latex OCCT_GitGuide_V2_image005.png
|
||||
@@ -250,11 +236,10 @@ The official repository contains:
|
||||
@subsection occt_gitguide_3_3 Adding public key in your account
|
||||
|
||||
Log in on the portal http://dev.opencascade.org and click on **My account** link to the right. If you have a Contributor status, you will see **SSH keys** tab to the right.
|
||||
|
||||
Click on that tab, then click **Add a public key**, and paste the text of the public key (see above sections on how to generate the key) into the text box.
|
||||
Click **Save** to input the key to the system.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image008.png
|
||||
@image latex OCCT_GitGuide_V2_image008.png
|
||||
|
||||
Click **Save** to input the key to the system.
|
||||
|
||||
Note that a user can have several SSH keys.
|
||||
You can distinguish between these keys by the Title field ID; by default it is taken from SSH key comment.
|
||||
@@ -335,10 +320,6 @@ In the console:
|
||||
In TortoiseGit:
|
||||
* Go to the local copy of the repository.
|
||||
* Right-click in the Explorer window, then choose **Git Create Branch**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image011.png
|
||||
@image latex OCCT_GitGuide_V2_image011.png
|
||||
|
||||
* Select **Base On** Branch *remotes/origin/master*.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image012.png
|
||||
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 16 KiB |
@@ -11,7 +11,7 @@ Reading the Introduction should be sufficient for developers to use the test sys
|
||||
|
||||
@subsection testmanual_1_1 Basic Information
|
||||
|
||||
OCCT automatic testing system is organized around DRAW Test Harness @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
OCCT automatic testing system is organized around @ref occt_user_guides__test_harness "DRAW Test Harness", a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
|
||||
|
||||
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests* of the OCCT root folder. Other test folders can be included in the test system, e.g. for testing applications based on OCCT.
|
||||
|
||||
|
@@ -86,7 +86,7 @@ Alternative solution is to use legacy generator of project files (extracted from
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_auto Automatic upgrade
|
||||
|
||||
Most of typical changes required for upgrading code to use OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
Most of typical changes required for upgrading code for OCCT 7.0 can be done automatically using the *upgrade* tool included in OCCT 7.0.
|
||||
This tool is a Tcl script, thus Tcl should be available on your workstation to run it.
|
||||
|
||||
Example:
|
||||
@@ -106,11 +106,16 @@ Run upgrade tool without arguments to see the list of available options.
|
||||
|
||||
Upgrade tool performs the following changes in the code.
|
||||
|
||||
1. Adds second argument to macro DEFINE_STANDARD_RTTI indicating base class for its argument class (if inheritance is recognized by the script):
|
||||
1. Replaces macro DEFINE_STANDARD_RTTI by DEFINE_STANDARD_RTTIEXT, with second argument indicating base class for the main argument class (if inheritance is recognized by the script):
|
||||
~~~~~
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTI(Class, Base)
|
||||
DEFINE_STANDARD_RTTI(Class) -> DEFINE_STANDARD_RTTIEXT(Class, Base)
|
||||
~~~~~
|
||||
|
||||
@note If macro DEFINE_STANDARD_RTTI with two arguments (used in intermediate development versions of OCCT 7.0) is found, the script will convert it to either DEFINE_STANDARD_RTTIEXT or DEFINE_STANDARD_RTTI_INLINE.
|
||||
The former case is used if current file is header and source file with the same name is found in the same folder.
|
||||
In this case, macro IMPLEMENT_STANDARD_RTTI is injected in the corresponding source file.
|
||||
The latter variant defines all methods for RTTI as inline, and does not require IMPLEMENT_STANDARD_RTTIEXT macro.
|
||||
|
||||
2. Replaces forward declarations of collection classes previously generated from CDL generics (defined in TCollection package) by \#include of corresponding header:
|
||||
~~~~~
|
||||
class TColStd_Array1OfReal; -> #include <TColStd_Array1OfReal.hxx>
|
||||
@@ -159,9 +164,11 @@ Namespace::Handle(Class) -> Handle(Namespace::Class)
|
||||
|
||||
10. Adds \#include for all classes used as argument to macro STANDARD_TYPE(), except of already included ones;
|
||||
|
||||
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*().
|
||||
11. Removes uses of obsolete macros IMPLEMENT_DOWNCAST and IMPLEMENT_STANDARD_*, except IMPLEMENT_STANDARD_RTTIEXT.
|
||||
|
||||
> If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
|
||||
@note If you plan to keep compatibility of your code with older versions of OCCT, add option "-compat" to avoid the latter change. See also @ref upgrade_occt700_cdl_compat.
|
||||
|
||||
.
|
||||
|
||||
As long as the upgrade routine runs, some information messages are sent to the standard output.
|
||||
In some cases the warnings or errors like the following may appear:
|
||||
@@ -171,7 +178,7 @@ In some cases the warnings or errors like the following may appear:
|
||||
~~~~~
|
||||
|
||||
Be sure to check carefully all reported errors and warnings, as corresponding places likely will require manual corrections.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro passes invalid class name as an argument.
|
||||
In some cases these messages may help you to detect errors in your code, for instance, cases where DEFINE_STANDARD_RTTI macro is used with incorrect class name as an argument.
|
||||
|
||||
@subsubsection upgrade_occt700_cdl_compiler Possible compiler errors
|
||||
|
||||
@@ -323,16 +330,17 @@ aBC->Transform (T); // access violation in OCCT 7.0
|
||||
|
||||
If you like to preserve compatibility of your application code with OCCT versions 6.x even after upgrade to 7.0, consider the following suggestions:
|
||||
|
||||
1. When running automatic upgrade tool, add option *-compat*.
|
||||
1. If your code used sequences of macros IMPLEMENT_STANDARD_... generated by WOK, replace them by single macro IMPLEMENT_STANDARD_RTTIEXT
|
||||
|
||||
2. In order to overcome incompatibility of macro DEFINE_STANDARD_RTTI which has additional argument in OCCT 7.0, you can replace (after upgrade) its use in your code by your own version-dependent macro, which resolves to either 6.x or 7.x version.
|
||||
2. When running automatic upgrade tool, add option *-compat*.
|
||||
|
||||
3. Define macros DEFINE_STANDARD_RTTIEXT and DEFINE_STANDARD_RTTI_INLINE when building with previous versions of OCCT, resolving to DEFINE_STANDARD_RTTI with single argument
|
||||
|
||||
Example:
|
||||
~~~~~
|
||||
#if OCC_VERSION_HEX < 0x070000
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#else
|
||||
#define DEFINE_STANDARD_RTTI_COMPAT(C1,C2) DEFINE_STANDARD_RTTI(C1,C2)
|
||||
#define DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#define DEFINE_STANDARD_RTTI_INLINE(C1,C2) DEFINE_STANDARD_RTTI(C1)
|
||||
#endif
|
||||
~~~~~
|
||||
|
||||
@@ -560,3 +568,13 @@ Conception of Local Context has been deprecated.
|
||||
Related classes (AIS_LocalContext) and methods (AIS_InteractiveContext::OpenLocalContext() and others) will be removed within some future OCCT release.
|
||||
|
||||
The main functionality provided by Local Context - selection of object subparts - can be now used within Neutral Point without opening any Local Context.
|
||||
|
||||
@subsection upgrade_occt700_separate_caf_visualisation Separation of visualization part from TKCAF
|
||||
|
||||
Visualization CAF attributes moved into new toolkit TKVCAF.
|
||||
If your application uses the classes from TPrsStd package then add link to TKVCAF library.
|
||||
|
||||
Verson numbers of BinOCAF and XmlOCAF formats are incremented; new files cannot be read by previous versions of OCCT.
|
||||
|
||||
For loading OCAF files saved by previous versions and containing attribute TPrsStd_AISPresentation it is necessary that environment variable CSF_MIGRATION_TYPES should be defined, pointing to file src/StdResources/MigrationSheet.txt.
|
||||
When using documents loaded from a file, make sure to call method TPrsStd_AISViewer::New() prior to accessing TPrsStd_AISPresentation attributes in this document (that method will create them).
|
||||
|
@@ -232,7 +232,7 @@ The example record is interpreted as a line which passes through a point *P*=(1
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 2> = "2" <_> <3D circle center> <_> <3D circle N> <_> <3D circle Dx> <_> <3D circle Dy> <_> <3D circle radius> <_\n>;
|
||||
|
||||
<3D circle center> = <3D point>;
|
||||
@@ -244,7 +244,7 @@ The example record is interpreted as a line which passes through a point *P*=(1
|
||||
<3D circle Dy> = <3D direction>;
|
||||
|
||||
<3D circle radius> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -265,7 +265,7 @@ The example record is interpreted as a circle which has its center *P*=(1, 2, 3
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 3> = "3" <_> <3D ellipse center> <_> <3D ellipse N> <_> <3D ellipse Dmaj> <_> <3D ellipse Dmin> <_> <3D ellipse Rmaj> <_> <3D ellipse Rmin> <_\n>;
|
||||
|
||||
<3D ellipse center> = <3D point>;
|
||||
@@ -279,7 +279,7 @@ The example record is interpreted as a circle which has its center *P*=(1, 2, 3
|
||||
<3D ellipse Rmaj> = <real>;
|
||||
|
||||
<3D ellipse Rmin> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -300,7 +300,7 @@ The example record is interpreted as an ellipse which has its center *P*=(1, 2,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 4> = "4" <_> <3D parabola origin> <_> <3D parabola N> <_> <3D parabola Dx> <_> <3D parabola Dy> <_> <3D parabola focal length> <_\n>;
|
||||
|
||||
<3D parabola origin> = <3D point>;
|
||||
@@ -312,7 +312,7 @@ The example record is interpreted as an ellipse which has its center *P*=(1, 2,
|
||||
<3D parabola Dy> = <3D direction>;
|
||||
|
||||
<3D parabola focal length> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -334,7 +334,7 @@ The example record is interpreted as a parabola in plane which passes through a
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 5> = "5" <_> <3D hyperbola origin> <_> <3D hyperbola N> <_> <3D hyperbola Dx> <_> <3D hyperbola Dy> <_> <3D hyperbola Kx> <_> <3D hyperbola Ky> <_\n>;
|
||||
|
||||
<3D hyperbola origin> = <3D point>;
|
||||
@@ -348,7 +348,7 @@ The example record is interpreted as a parabola in plane which passes through a
|
||||
<3D hyperbola Kx> = <real>;
|
||||
|
||||
<3D hyperbola Ky> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Descripton**
|
||||
|
||||
@@ -410,7 +410,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 7> = "7" <_> <3D B-spline rational flag> <_> "0" <_> <3D B-spline degree> <_>
|
||||
<3D B-spline pole count> <_> <3D B-spline multiplicity knot count> <3D B-spline weight poles>
|
||||
<_\n> <3D B-spline multiplicity knots> <_\n>;
|
||||
@@ -430,7 +430,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
<3D B-spline multiplicity knots> = (<_> <3D B-spline multiplicity knot>) ^ <3D B-spline multiplicity knot count>;
|
||||
|
||||
<3D B-spline multiplicity knot> = <real> <_> <int>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -474,13 +474,13 @@ The example record is interpreted as a B-spline curve with a rational flag *r*=
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<3D curve record 8> = "8" <_> <3D trimmed curve u min> <_> <3D trimmed curve u max> <_\n> <3D curve record>;
|
||||
|
||||
<3D trimmed curve u min> = <real>;
|
||||
|
||||
<3D trimmed curve u max> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -746,7 +746,7 @@ where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<surface record 8> = "8" <_> <Bezier surface u rational flag> <_> <Bezier surface v rational flag> <_> <Bezier surface u degree> <_> <Bezier surface v degree> <_>
|
||||
<Bezier surface weight poles>;
|
||||
|
||||
@@ -765,7 +765,7 @@ where @f$ V(v)=(5,2,0)+4 \cdot (cos(v) \cdot (1,0,0)+sin(v) \cdot (0,1,0)), V_{D
|
||||
(<_> <Bezier surface weight pole>) ^ <Bezier surface v degree>;
|
||||
|
||||
<Bezier surface weight pole> = <3D point> [<_> <real>];
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -781,12 +781,13 @@ where @f$ 0^{0} \equiv 1 @f$.
|
||||
|
||||
The example record is interpreted as a Bezier surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=2, v degree *m<sub>v</sub>*=1, weight poles *B<sub>0,0</sub>*=(0, 0, 1), *h<sub>0,0</sub>*=7, *B<sub>0,1</sub>*=(1, 0, -4), *h<sub>0,1</sub>*=10, *B<sub>1,0</sub>*=(0, 1, -2), *h<sub>1,0</sub>*=8, *B<sub>1,1</sub>*=(1, 1, 5), *h<sub>1,1</sub>*=11, *B<sub>2,0</sub>*=(0, 2, 3), *h<sub>2,0</sub>*=9 and *B<sub>2,1</sub>*=(1, 2, 6), *h<sub>2,1</sub>*=12. The surface is defined by the following parametric equation:
|
||||
|
||||
@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ \\
|
||||
(0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
|
||||
(0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div \\
|
||||
[7 \cdot (1-u)^{2} \cdot (1-v)+10 \cdot (1-u)^{2} \cdot v+ \\
|
||||
8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ \\
|
||||
9 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ] @f]
|
||||
@f[
|
||||
\begin{align}
|
||||
S(u,v)= [ (0,0,1) \cdot 7 \cdot (1-u)^{2} \cdot (1-v)+(1,0,-4) \cdot 10 \cdot (1-u)^{2} \cdot v+ (0,1,-2) \cdot 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v) + \\
|
||||
(1,1,5) \cdot 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ (0,2,3) \cdot 9 \cdot u^{2} \cdot (1-v)+(1,2,6) \cdot 12 \cdot u^{2} \cdot v] \div [7 \cdot (1-u)^{2} \cdot (1-v)+ \\
|
||||
10 \cdot (1-u)^{2} \cdot v+ 8 \cdot 2 \cdot u \cdot (1-u) \cdot (1-v)+ 11 \cdot 2 \cdot u \cdot (1-u) \cdot v+ 9 \cdot u^{2} \cdot (1-v)+12 \cdot u^{2} \cdot v ]
|
||||
\end{align}
|
||||
@f]
|
||||
|
||||
|
||||
@subsubsection occt_brep_format_4_2_9 B-spline Surface - \< surface record 9 \>
|
||||
@@ -877,14 +878,19 @@ The B-spline surface is defined by the following parametric equation:
|
||||
|
||||
where functions *N<sub>i,j</sub>* and *M<sub>i,j</sub>* have the following recursion definition by *j*:
|
||||
|
||||
@f[ N_{i,1}(u)=\left\{\begin{matrix}
|
||||
1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}\\
|
||||
0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\;
|
||||
N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+ \frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1); \\
|
||||
@f[
|
||||
\begin{align}
|
||||
N_{i,1}(u)= \left\{\begin{matrix}
|
||||
1\Leftarrow \bar{u}_{i} \leq u \leq \bar{u}_{i+1}
|
||||
0\Leftarrow u < \bar{u}_{i} \vee \bar{u}_{i+1} \leq u \end{matrix} \right.,\; \\
|
||||
N_{i,j}(u)=\frac{(u-\bar{u}_{i}) \cdot N_{i,j-1}(u) }{\bar{u}_{i+j-1}-\bar{u}_{i}}+
|
||||
\frac{(\bar{u}_{i+j}-u) \cdot N_{i+1,j-1}(u)}{\bar{u}_{i+j}-\bar{u}_{i+1}},\;(2 \leq j \leq m_{u}+1), \; \\
|
||||
M_{i,1}(v)=\left\{\begin{matrix}
|
||||
1\Leftarrow \bar{v}_{i} \leq v \leq \bar{v}_{i+1}\\
|
||||
0\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\;
|
||||
M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1); @f]
|
||||
0\Leftarrow v < \bar{v}_{i} \vee \bar{v}_{i+1} \leq v \end{matrix} \right.,\; \\
|
||||
M_{i,j}(v)=\frac{(v-\bar{v}_{i}) \cdot M_{i,j-1}(v) }{\bar{v}_{i+j-1}-\bar{v}_{i}}+ \frac{(\bar{v}_{i+j}-v) \cdot M_{i+1,j-1}(v)}{\bar{v}_{i+j}-\bar{v}_{i+1}},\;(2 \leq j \leq m_{v}+1);
|
||||
\end{align}
|
||||
@f]
|
||||
|
||||
where
|
||||
@f[ \bar{u}_{i}=u_{j}\; (1 \leq j \leq k_{u},\; \sum_{l=1}^{j-1}q_{l} \leq i \leq \sum_{l=1}^{j}q_{l}), \\
|
||||
@@ -892,13 +898,15 @@ where
|
||||
|
||||
The example record is interpreted as a B-spline surface with a u rational flag *r<sub>u</sub>*=1, v rational flag *r<sub>v</sub>*=1, u degree *m<sub>u</sub>*=1, v degree *m<sub>v</sub>*=1, u pole count *n<sub>u</sub>*=3, v pole count *n<sub>v</sub>*=2, u multiplicity knot count *k<sub>u</sub>*=5, v multiplicity knot count *k<sub>v</sub>*=4, weight poles *B<sub>1,1</sub>*=(0, 0, 1), *h<sub>1,1</sub>*=7, *B<sub>1,2</sub>*=(1, 0, -4), *h<sub>1,2</sub>*=10, *B<sub>2,1</sub>*=(0, 1, -2), *h<sub>2,1</sub>*=8, *B<sub>2,2</sub>*=(1, 1, 5), *h<sub>2,2</sub>*=11, *B<sub>3,1</sub>*=(0, 2, 3), *h<sub>3,1</sub>*=9 and *B<sub>3,2</sub>*=(1, 2, 6), *h<sub>3,2</sub>*=12, u multiplicity knots *u<sub>1</sub>*=0, *q<sub>1</sub>*=1, *u<sub>2</sub>*=0.25, *q<sub>2</sub>*=1, *u<sub>3</sub>*=0.5, *q<sub>3</sub>*=1, *u<sub>4</sub>*=0.75, *q<sub>4</sub>*=1 and *u<sub>5</sub>*=1, *q<sub>5</sub>*=1, v multiplicity knots *v<sub>1</sub>*=0, *r<sub>1</sub>*=1, *v<sub>2</sub>*=0.3, *r<sub>2</sub>*=1, *v<sub>3</sub>*=0.7, *r<sub>3</sub>*=1 and *v<sub>4</sub>*=1, *r<sub>4</sub>*=1. The B-spline surface is defined by the following parametric equation:
|
||||
|
||||
@f[ S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
@f[
|
||||
\begin{align}
|
||||
S(u,v)= [ (0,0,1) \cdot 7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+(1,0,-4) \cdot 10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
(0,1,-2) \cdot 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+(1,1,5) \cdot 11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
(0,2,3) \cdot 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+(1,2,6) \cdot 12 \cdot N_{3,2}(u) \cdot M_{2,2}(v)] \div \\
|
||||
[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ \\
|
||||
9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ] @f]
|
||||
|
||||
[7 \cdot N_{1,2}(u) \cdot M_{1,2}(v)+10 \cdot N_{1,2}(u) \cdot M_{2,2}(v)+ 8 \cdot N_{2,2}(u) \cdot M_{1,2}(v)+ \\
|
||||
11 \cdot N_{2,2}(u) \cdot M_{2,2}(v)+ 9 \cdot N_{3,2}(u) \cdot M_{1,2}(v)+12 \cdot N_{3,2}(u) \cdot M_{2,2}(v) ]
|
||||
\end{align}
|
||||
@f]
|
||||
|
||||
@subsubsection occt_brep_format_4_2_10 Rectangular Trim Surface - \< surface record 10 \>
|
||||
|
||||
@@ -1050,7 +1058,7 @@ The example record is interpreted as a line which passes through a point *P*=(3
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<2D curve record 2> = "2" <_> <2D circle center> <_> <2D circle Dx> <_> <2D circle Dy> <_> <2D circle radius> <_\n>;
|
||||
|
||||
<2D circle center> = <2D point>;
|
||||
@@ -1060,7 +1068,7 @@ The example record is interpreted as a line which passes through a point *P*=(3
|
||||
<2D circle Dy> = <2D direction>;
|
||||
|
||||
<2D circle radius> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1221,7 +1229,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<2D curve record 7> = "7" <_> <2D B-spline rational flag> <_> "0" <_> <2D B-spline degree> <_> <2D B-spline pole count> <_> <2D B-spline multiplicity knot count> <2D B-spline weight poles> <_\n> <2D B-spline multiplicity knots> <_\n>;
|
||||
|
||||
<2D B-spline rational flag> = <flag>;
|
||||
@@ -1240,7 +1248,7 @@ The example record is interpreted as a Bezier curve with a rational flag *r*=1,
|
||||
<2D B-spline multiplicity knot> ^ <2D B-spline multiplicity knot count>;
|
||||
|
||||
<2D B-spline multiplicity knot> = <_> <real> <_> <int>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1404,7 +1412,7 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<triangulations> = <triangulation header> <_\n> <triangulation records>;
|
||||
|
||||
<triangulation header> = "Triangulations" <_> <triangulation count>;
|
||||
@@ -1434,7 +1442,7 @@ The example record describes a polyline from *m*=2 nodes with a parameter prese
|
||||
<triangulation triangles> = (<triangulation triangle> <_>) ^ <triangulation triangle count>;
|
||||
|
||||
<triangulation triangle> = <int> <_> <int> <_> <int>.
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1750,7 +1758,7 @@ The usage of \<vertex data representation u parameter\> *U* is described belo
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<edge data> = <_> <edge data tolerance> <_> <edge data same parameter flag> <_> edge data same range flag> <_> <edge data degenerated flag> <_\n> <edge data representations>;
|
||||
|
||||
<edge data tolerance> = <real>;
|
||||
@@ -1793,7 +1801,7 @@ The usage of \<vertex data representation u parameter\> *U* is described belo
|
||||
|
||||
<edge data representation data 7> = (<polygon on triangulation number> <_>) ^ 2
|
||||
<triangulation number> <_> <location number>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -1820,13 +1828,13 @@ Flags \<edge data same parameter flag\>, \<edge data same range flag\> and \<edg
|
||||
|
||||
**BNF-like Definition**
|
||||
|
||||
@verbatim
|
||||
~~~~
|
||||
<face data> = <face data natural restriction flag> <_> <face data tolerance> <_> <surface number> <_> <location number> <\n> ["2" <_> <triangulation number>];
|
||||
|
||||
<face data natural restriction flag> = <flag>;
|
||||
|
||||
<face data tolerance> = <real>;
|
||||
@endverbatim
|
||||
~~~~
|
||||
|
||||
**Description**
|
||||
|
||||
|
@@ -2970,11 +2970,13 @@ Makes a list of documents handled during the session of the application.
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
Open path docname
|
||||
Open path docname [-stream]
|
||||
~~~~~
|
||||
|
||||
Retrieves the document of file **docname** in the path **path**. Overwrites the document, if it is already in session.
|
||||
|
||||
option <i>-stream</i> activates usage of alternative interface of OCAF persistence working with C++ streams instead of file names.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
Open /myPath/myFile.std D
|
||||
@@ -3012,10 +3014,12 @@ Save D
|
||||
|
||||
Syntax:
|
||||
~~~~~
|
||||
SaveAs docname path
|
||||
SaveAs docname path [-stream]
|
||||
~~~~~
|
||||
|
||||
Saves the active document in the file **docname** in the path **path**. Overwrites the file if it already exists.
|
||||
Saves the active document in the file **docname** in the path **path**. Overwrites the file if it already exists.
|
||||
|
||||
option <i>-stream</i> activates usage of alternative interface of OCAF persistence working with C++ streams instead of file names.
|
||||
|
||||
**Example:**
|
||||
~~~~~
|
||||
|
@@ -811,7 +811,7 @@ void f(1)
|
||||
|
||||
Here, the first handler will catch exceptions of *Overflow* type and the second one - exceptions of *NumericError* type and all exceptions derived from it, including *Underflow* and *ZeroDivide*.
|
||||
|
||||
The handlers are checked in order of appearance, from the nearest to the most distant try block, until one matches the raise expression. For a try block, it would be a mistake to place a handler for a base exception type ahead of a handler for its derived type since that would ensure that the handler for the derived exception would never be invoked.
|
||||
The handlers are checked in order of appearance, from the nearest to the try block to the most distant from it, until one matches the raise expression. For a try block, it would be a mistake to place a handler for a base exception type ahead of a handler for its derived type since that would ensure that the handler for the derived exception would never be invoked.
|
||||
|
||||
~~~~~
|
||||
void f(1)
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 42 KiB |
BIN
dox/user_guides/ocaf_wp/images/ocaf_wp_image007.png
Normal file
After Width: | Height: | Size: 23 KiB |
@@ -315,8 +315,11 @@ ad696002-5b34-11d1-b5ba-00a0c9064368.Location: PAppStdPlugin
|
||||
Later on, you can modify the handle's geometry without changing its color —
|
||||
both remain attached to the same label.
|
||||
|
||||
@image html ocaf_wp_image005.png "Figure 3. The data structure of the coffee machine"
|
||||
@image latex ocaf_wp_image005.png "Figure 3. The data structure of the coffee machine"
|
||||
@image html ocaf_wp_image007.png "Figure 3. The coffee machine"
|
||||
@image latex ocaf_wp_image007.png "Figure 3. The coffee machine"
|
||||
|
||||
@image html ocaf_wp_image005.png "Figure 4. The data structure of the coffee machine"
|
||||
@image latex ocaf_wp_image005.png "Figure 4. The data structure of the coffee machine"
|
||||
|
||||
The nesting of labels is key to OCAF. This allows a label to have its own structure
|
||||
with its local addressing scheme which can be reused in a more complex structure.
|
||||
@@ -339,8 +342,8 @@ ad696002-5b34-11d1-b5ba-00a0c9064368.Location: PAppStdPlugin
|
||||
which references the coffee pot of the first document
|
||||
(the XLink contains the relative path of the coffee pot document and the entry of the coffee pot data [0:1] ).
|
||||
|
||||
@image html ocaf_wp_image006.png "The coffee machine compound document"
|
||||
@image latex ocaf_wp_image006.png "The coffee machine compound document"
|
||||
@image html ocaf_wp_image006.png "Figure 5. The coffee machine compound document"
|
||||
@image latex ocaf_wp_image006.png "Figure 5. The coffee machine compound document"
|
||||
|
||||
In this context, the end-user of the coffee machine application can open the coffee pot document,
|
||||
modify the geometry of, for example, the reservoir, and overwrite the document without worrying
|
||||
|
Before Width: | Height: | Size: 22 KiB |
152
dox/user_guides/vis/images/vis_image007.svg
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- 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.51703"
|
||||
height="62.516983"
|
||||
id="svg4916"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="vis_image007.svg">
|
||||
<defs
|
||||
id="defs4918" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="199.2585"
|
||||
inkscape:cy="34.120675"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1202"
|
||||
inkscape:window-height="813"
|
||||
inkscape:window-x="43"
|
||||
inkscape:window-y="80"
|
||||
inkscape:window-maximized="0"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata4921">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-105.7415,-304.10369)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="373.58167"
|
||||
y="326.15771"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030">IShapeData </text>
|
||||
<text
|
||||
transform="scale(0.7861951,1.2719489)"
|
||||
id="text6803"
|
||||
xml:space="preserve"
|
||||
x="146.32727"
|
||||
y="269.49332"
|
||||
style="font-size:27.75222969px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">IShape </text>
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.23895466;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect5880"
|
||||
width="95.278046"
|
||||
height="59.278049"
|
||||
x="106.36098"
|
||||
y="305.72314"
|
||||
ry="17.124769" />
|
||||
<path
|
||||
id="path4102"
|
||||
d="m 223.52817,321.64549 0,6.35835 -16.58451,0 0,12.71669 16.58451,0 0,6.35835 5.52817,-12.7167 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.65600133px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.23895466;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect5880-4"
|
||||
width="95.278046"
|
||||
height="59.278049"
|
||||
x="232.36096"
|
||||
y="306.72314"
|
||||
ry="17.124769" />
|
||||
<text
|
||||
transform="scale(0.88816375,1.1259185)"
|
||||
id="text6805-8"
|
||||
xml:space="preserve"
|
||||
x="276.47144"
|
||||
y="290.76089"
|
||||
style="font-size:20.63711739px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">IShape</text>
|
||||
<text
|
||||
transform="scale(0.8743505,1.1437061)"
|
||||
id="text6805-82"
|
||||
xml:space="preserve"
|
||||
x="283.47748"
|
||||
y="307.15155"
|
||||
style="font-size:20.20298386px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Mesher</text>
|
||||
<path
|
||||
id="path4102-4"
|
||||
d="m 348.52817,321.64549 0,6.35835 -16.58451,0 0,12.71669 16.58451,0 0,6.35835 5.52817,-12.7167 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.65600133px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.39507556;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect5880-4-5"
|
||||
width="121.12193"
|
||||
height="59.121929"
|
||||
x="357.43903"
|
||||
y="306.80121"
|
||||
ry="17.079668" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="361.1011"
|
||||
y="342.28717"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030-5">Implementation</text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="382.74277"
|
||||
y="357.28717"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030-5-1">for VTK</text>
|
||||
<path
|
||||
id="path4102-4-7"
|
||||
d="m 500.52817,321.64549 0,6.35835 -16.58451,0 0,12.71669 16.58451,0 0,6.35835 5.52817,-12.7167 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.65600133px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:#00ffff;stroke:#000000;stroke-width:1.19996607;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect5880-4-5-1"
|
||||
width="89.317047"
|
||||
height="59.317039"
|
||||
x="508.34149"
|
||||
y="304.70367"
|
||||
ry="17.136032" />
|
||||
<text
|
||||
transform="scale(0.83864381,1.1924013)"
|
||||
id="text6805-8-1"
|
||||
xml:space="preserve"
|
||||
x="607.78577"
|
||||
y="285.37732"
|
||||
style="font-size:15.50377846px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">vtkPolyData</text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.0 KiB |
@@ -281,7 +281,7 @@ The usage of low-level tools is justified in cases when the utilities from *IVtk
|
||||
|
||||
The low-level scenario of VIS usage in VTK pipeline is shown in the figure below. The Mesher component produces shape facet (VTK polygonal data) using implementation of *IShapeData* interface. Then result can be retrieved from this implementation as a *vtkPolyData* instance.
|
||||
|
||||
@figure{/user_guides/vis/images/vis_image007.png "Low-level VIS usage with VTK"}
|
||||
@figure{/user_guides/vis/images/vis_image007.svg "Low-level VIS usage with VTK"}
|
||||
|
||||
The visualization pipeline for OCCT shape presentation can be initialized as follows:
|
||||
1. Create an instance of *IShape* class initialized by OCCT topological shape:
|
||||
|
Before Width: | Height: | Size: 68 KiB |
388
dox/user_guides/visualization/images/visualization_image004.svg
Normal file
@@ -0,0 +1,388 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- 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="642.85785"
|
||||
height="522.1217"
|
||||
id="svg4656"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="visualization_image004.svg">
|
||||
<defs
|
||||
id="defs4658">
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7116"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="matrix(1.1,0,0,1.1,1.1,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Lstart-2"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7116-1"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="matrix(1.1,0,0,1.1,1.1,0)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Lstart-7"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7116-9"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="matrix(1.1,0,0,1.1,1.1,0)" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="310.01454"
|
||||
inkscape:cy="256.97846"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g9010"
|
||||
showgrid="false"
|
||||
inkscape:window-width="964"
|
||||
inkscape:window-height="869"
|
||||
inkscape:window-x="110"
|
||||
inkscape:window-y="110"
|
||||
inkscape:window-maximized="0"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata4661">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-87.454854,-473.93551)">
|
||||
<g
|
||||
id="g9010">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.14259863px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
|
||||
clip-path="url(#clipEmfPath0)"
|
||||
d="m 144.5394,804.00145 c -30.36322,0 -54.967887,15.2339 -54.967887,34.03321 0,18.7993 24.604667,34.03319 54.967887,34.03319 30.3632,0 54.96788,-15.23389 54.96788,-34.03319 0,-18.79931 -24.60468,-34.03321 -54.96788,-34.03321"
|
||||
id="path3298-1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.21930075px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:none"
|
||||
clip-path="url(#clipEmfPath0)"
|
||||
d="m 144,919.27681 c -30.89771,0 -55.935496,17.04774 -55.935496,38.08539 0,21.03765 25.037786,38.08539 55.935496,38.08539 30.89769,0 55.93549,-17.04774 55.93549,-38.08539 0,-21.03765 -25.0378,-38.08539 -55.93549,-38.08539"
|
||||
id="path3298-1-7" />
|
||||
<g
|
||||
transform="translate(-3,-4)"
|
||||
id="g7007">
|
||||
<path
|
||||
id="path3028"
|
||||
d="m 221.70549,791.45369 0,102.81698 236.58902,0 0,-102.81698 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.03636551px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
id="text3030"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="855.65771"
|
||||
x="240.58167"
|
||||
xml:space="preserve">uses algorithms of Prs3D </text>
|
||||
<text
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="868.65771"
|
||||
x="246.58167"
|
||||
xml:space="preserve"
|
||||
id="text6807">and StdPrs packages to </text>
|
||||
<text
|
||||
style="font-size:15.67667294px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="752.18933"
|
||||
x="296.65607"
|
||||
xml:space="preserve"
|
||||
id="text6803"
|
||||
transform="scale(0.92214786,1.0844248)">Class AIS_Shape </text>
|
||||
<text
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="757.59094"
|
||||
x="330.80762"
|
||||
xml:space="preserve"
|
||||
id="text6805"
|
||||
transform="scale(0.90547757,1.1043896)">Compute()</text>
|
||||
<text
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="882.28711"
|
||||
x="229.76691"
|
||||
xml:space="preserve"
|
||||
id="text6807-9">create Graphics3d structure </text>
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.11899135px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 199.62164,835.29171 14.20318,-0.59253 c 0.2177,0 0.39421,0.27272 0.40004,0.61131 0.007,0.34803 -0.16469,0.63953 -0.3824,0.64897 l -14.19727,0.5831 c -0.21769,0.01 -0.39419,-0.2634 -0.4001,-0.60198 -0.007,-0.34793 0.16477,-0.63943 0.37655,-0.64887 z m 13.36769,-3.68664 4.76573,3.56434 -4.64222,3.95002 z"
|
||||
id="path3010" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.40559888px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 217.3901,936.6383 0,48.44779 239.2198,0 0,-48.44779 z"
|
||||
id="path3028-4" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.12212796px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 199.64351,958.2917 14.96808,-0.59231 c 0.22942,0 0.41543,0.27262 0.42158,0.61102 0.007,0.34795 -0.17356,0.63928 -0.40299,0.64873 l -14.96187,0.58287 c -0.22941,0.01 -0.41542,-0.26328 -0.42164,-0.60177 -0.007,-0.34775 0.17364,-0.63908 0.39684,-0.64854 z m 14.0876,-3.68514 5.02238,3.56286 -4.89222,3.94842 z"
|
||||
id="path3010-8" />
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8"
|
||||
xml:space="preserve"
|
||||
x="282.51627"
|
||||
y="872.30591"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Topological Object</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.12761998px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 470.75112,864.99932 0,102.72572 258.49776,0 0,-102.72572 z"
|
||||
id="path3028-2" />
|
||||
<text
|
||||
transform="scale(0.92214786,1.0844248)"
|
||||
id="text6803-4"
|
||||
xml:space="preserve"
|
||||
x="530.02728"
|
||||
y="824.57794"
|
||||
style="font-size:15.67667294px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">StdPrs and Prs3d packages </text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="493.69882"
|
||||
y="920.38812"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030-5">Contain various algorithms </text>
|
||||
<text
|
||||
id="text6807-1"
|
||||
xml:space="preserve"
|
||||
x="476.76691"
|
||||
y="936.28711"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">to transform object structures </text>
|
||||
<text
|
||||
id="text6807-9-7"
|
||||
xml:space="preserve"
|
||||
x="492.01605"
|
||||
y="951.38818"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">into Graphics3d structures </text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.09031779px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 336.80311,932.90806 0.0571,-40.42973 c 0,-0.12142 0.28555,-0.22261 0.63772,-0.22261 0.35218,0 0.63773,0.10119 0.63773,0.22598 l -0.0572,40.42636 c 0,0.12477 -0.28555,0.22599 -0.63772,0.22599 -0.35218,0 -0.63773,-0.10122 -0.63773,-0.22599 z m 4.44506,-0.44857 -3.80733,2.69823 -3.80734,-2.69823 z m -7.55756,-39.52921 3.80734,-2.69824 3.80734,2.69824 z"
|
||||
id="path7377" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path21911"
|
||||
d="m 219,707.54039 0,75.64359"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.7003088;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2.10092636, 2.10092636;stroke-dashoffset:0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path21911-1"
|
||||
d="m 453.5,707.46465 0,77.79507"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.58958817;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.76876451, 1.76876451;stroke-dashoffset:0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.24281454px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 165.30872,475.05692 0,72.61052 406.38256,0 0,-72.61052 z"
|
||||
id="path3028-2-1" />
|
||||
<g
|
||||
transform="translate(-5,-185.5)"
|
||||
id="g7007-5">
|
||||
<path
|
||||
id="path3028-27"
|
||||
d="m 221.70549,791.45369 0,102.81698 236.58902,0 0,-102.81698 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.03636551px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
inkscape:connector-curvature="0" />
|
||||
<text
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="868.65771"
|
||||
x="231.58167"
|
||||
xml:space="preserve"
|
||||
id="text6807-14">Declares Compute() method </text>
|
||||
<text
|
||||
style="font-size:15.67667294px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="752.18933"
|
||||
x="296.65607"
|
||||
xml:space="preserve"
|
||||
id="text6803-2"
|
||||
transform="scale(0.92214786,1.0844248)">Deferred class </text>
|
||||
<text
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
y="756.68549"
|
||||
x="270.06619"
|
||||
xml:space="preserve"
|
||||
id="text6805-3"
|
||||
transform="scale(0.90547756,1.1043896)">AIS_InteractiveObject</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path13459"
|
||||
d="m 368.70052,894.03606 -47.83744,77.21358"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.27159095px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:none" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path13459-6"
|
||||
d="M 535.32214,863.39163 454.93725,806.09542"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.41992795px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:none" />
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-8"
|
||||
xml:space="preserve"
|
||||
x="543.32458"
|
||||
y="749.08734"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">uses</text>
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-8-5"
|
||||
xml:space="preserve"
|
||||
x="385.70276"
|
||||
y="682.21692"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">inherits</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.2751534px;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 479.32488,631.07307 0,48.57823 196.35024,0 0,-48.57823 z"
|
||||
id="path3028-4-7" />
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-6"
|
||||
xml:space="preserve"
|
||||
x="544.42902"
|
||||
y="597.87256"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Object presentation</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.14474645px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 452.8172,658.29188 21.08928,-0.5905 c 0.32324,0 0.58532,0.27179 0.59399,0.60922 0.01,0.34683 -0.24455,0.63734 -0.5678,0.64674 l -21.08051,0.5811 c -0.32323,0.01 -0.58531,-0.26249 -0.59408,-0.59991 -0.01,-0.34674 0.24465,-0.63724 0.55912,-0.64665 z m 19.84871,-3.674 7.07629,3.55212 -6.8929,3.93648 z"
|
||||
id="path3010-1" />
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-6-8"
|
||||
xml:space="preserve"
|
||||
x="269.14154"
|
||||
y="446.65784"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Class PresentationManager3d</text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="175.31769"
|
||||
y="514.28717"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030-5-9">calls Compute() method of AIS_InteractiveObject</text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
x="174.40979"
|
||||
y="530.71832"
|
||||
style="font-size:13.78678322px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New"
|
||||
id="text3030-5-9-2">to obtain Graphics3d structure</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path13459-6-5"
|
||||
d="M 561.27709,629.42121 457.63979,547.78428"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.92449844px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Lstart);marker-end:none" />
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-8-4"
|
||||
xml:space="preserve"
|
||||
x="571.24023"
|
||||
y="521.04193"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">deals with</text>
|
||||
<text
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-8-4-3"
|
||||
xml:space="preserve"
|
||||
x="398.07434"
|
||||
y="519.80078"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">calls</text>
|
||||
<text
|
||||
inkscape:transform-center-y="94"
|
||||
inkscape:transform-center-x="-61"
|
||||
transform="scale(0.90547756,1.1043896)"
|
||||
id="text6805-8-8-4-1"
|
||||
xml:space="preserve"
|
||||
x="398.07431"
|
||||
y="535.19385"
|
||||
style="font-size:16.73931694px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Compute()</text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.210106px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 339.06968,549.84169 0.58535,44.82599 c 0,0.68706 -0.26941,1.24411 -0.6039,1.26254 -0.3438,0.0212 -0.63178,-0.5198 -0.64109,-1.20688 l -0.57603,-44.80735 c -0.01,-0.68703 0.26019,-1.24409 0.59467,-1.26273 0.34371,-0.0213 0.63168,0.52001 0.641,1.18843 z m 3.64194,42.18911 -3.52112,15.0409 -3.90212,-14.6511 z"
|
||||
id="path3010-2" />
|
||||
<text
|
||||
transform="scale(0.88347213,1.1318976)"
|
||||
id="text6805-8-8-5-1"
|
||||
xml:space="preserve"
|
||||
x="112.37634"
|
||||
y="733.97705"
|
||||
style="font-size:14.97209454px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Creation of</text>
|
||||
<text
|
||||
transform="scale(0.88347214,1.1318976)"
|
||||
id="text6805-8-8-5-1-7"
|
||||
xml:space="preserve"
|
||||
x="119.76624"
|
||||
y="746.78375"
|
||||
style="font-size:14.97209454px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">AIS_Shape</text>
|
||||
<text
|
||||
transform="scale(0.88347214,1.1318976)"
|
||||
id="text6805-8-8-5-1-4"
|
||||
xml:space="preserve"
|
||||
x="112.97488"
|
||||
y="839.54834"
|
||||
style="font-size:14.97209454px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">Creation of</text>
|
||||
<text
|
||||
transform="scale(0.88347214,1.1318976)"
|
||||
id="text6805-8-8-5-1-0"
|
||||
xml:space="preserve"
|
||||
x="112.99133"
|
||||
y="853.70294"
|
||||
style="font-size:14.97209454px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">topological</text>
|
||||
<text
|
||||
transform="scale(0.88347214,1.1318976)"
|
||||
id="text6805-8-8-5-1-9"
|
||||
xml:space="preserve"
|
||||
x="132.23358"
|
||||
y="867.8385"
|
||||
style="font-size:14.97209454px;font-style:normal;font-weight:bold;text-align:start;text-anchor:start;fill:#000000;font-family:Courier New">object</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 20 KiB |
@@ -7,6 +7,8 @@ SET "OLD_PATH=%PATH%"
|
||||
|
||||
if exist "%~dp0env.bat" (
|
||||
call "%~dp0env.bat"
|
||||
) else (
|
||||
type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
|
||||
)
|
||||
|
||||
set "TCL_EXEC=tclsh.exe"
|
||||
|
@@ -9,6 +9,9 @@ anOldDyLd="$DYLD_LIBRARY_PATH"
|
||||
|
||||
# go to the script directory
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
if [ ! -e "${aScriptPath}/env.sh" ]; then
|
||||
cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh
|
||||
fi
|
||||
|
||||
aSystem=`uname -s`
|
||||
aTarget="$1"
|
||||
|
@@ -530,7 +530,7 @@ public:
|
||||
theRed=255;
|
||||
theGreen=255;
|
||||
theBlue=255;
|
||||
Handle_AIS_InteractiveObject aCurrent ;
|
||||
Handle(AIS_InteractiveObject) aCurrent ;
|
||||
Quantity_Color anObjCol;
|
||||
myAISContext()->InitCurrent();
|
||||
if (!myAISContext()->MoreCurrent())
|
||||
@@ -716,7 +716,7 @@ public:
|
||||
/// <summary>
|
||||
///Get AISContext
|
||||
/// </summary>
|
||||
Handle_AIS_InteractiveContext GetContext(void)
|
||||
Handle(AIS_InteractiveContext) GetContext(void)
|
||||
{
|
||||
return myAISContext();
|
||||
}
|
||||
@@ -841,8 +841,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
|
||||
Handle_AIS_Shape anIS = Handle_AIS_Shape::DownCast(anIO);
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast(anIO);
|
||||
return BRepTools::Write (anIS->Shape(), (Standard_CString)theFileName) != Standard_False;
|
||||
}
|
||||
|
||||
@@ -857,8 +857,8 @@ public:
|
||||
STEPControl_Writer aWriter;
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
{
|
||||
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
|
||||
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
aStatus = aWriter.Transfer( aShape , aType );
|
||||
if ( aStatus != IFSelect_RetDone )
|
||||
@@ -888,8 +888,8 @@ public:
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
{
|
||||
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
|
||||
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
aWriter.AddShape ( aShape );
|
||||
}
|
||||
@@ -910,8 +910,8 @@ public:
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
{
|
||||
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
|
||||
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
if ( aShape.IsNull() )
|
||||
{
|
||||
@@ -939,8 +939,8 @@ public:
|
||||
|
||||
for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
|
||||
{
|
||||
Handle_AIS_InteractiveObject anIO = myAISContext()->Current();
|
||||
Handle_AIS_Shape anIS=Handle_AIS_Shape::DownCast(anIO);
|
||||
Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
|
||||
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
|
||||
TopoDS_Shape aShape = anIS->Shape();
|
||||
if ( aShape.IsNull() )
|
||||
{
|
||||
@@ -1030,8 +1030,8 @@ public:
|
||||
|
||||
private:
|
||||
// fields
|
||||
NCollection_Haft<Handle_V3d_Viewer> myViewer;
|
||||
NCollection_Haft<Handle_V3d_View> myView;
|
||||
NCollection_Haft<Handle_AIS_InteractiveContext> myAISContext;
|
||||
NCollection_Haft<Handle_OpenGl_GraphicDriver> myGraphicDriver;
|
||||
NCollection_Haft<Handle(V3d_Viewer)> myViewer;
|
||||
NCollection_Haft<Handle(V3d_View)> myView;
|
||||
NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;
|
||||
NCollection_Haft<Handle(OpenGl_GraphicDriver)> myGraphicDriver;
|
||||
};
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="..\win32\bind"
|
||||
OutputDirectory="..\win32\$(VCVER)\bind"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -101,7 +101,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="..\win64\bind"
|
||||
OutputDirectory="..\win64\$(VCVER)\bind"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -182,7 +182,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\win32\bin"
|
||||
OutputDirectory="..\win32\$(VCVER)\bin"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -259,7 +259,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="..\win64\bin"
|
||||
OutputDirectory="..\win64\$(VCVER)\bin"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
|
@@ -66,16 +66,16 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\bind\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\$(VCVER)\bind\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\bind\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\$(VCVER)\bind\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\bin\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\$(VCVER)\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\bin\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\$(VCVER)\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
|
@@ -693,7 +693,7 @@ public:
|
||||
/// <summary>
|
||||
///Get AISContext
|
||||
/// </summary>
|
||||
Handle_AIS_InteractiveContext GetContext()
|
||||
Handle(AIS_InteractiveContext) GetContext()
|
||||
{
|
||||
return myAISContext();
|
||||
}
|
||||
@@ -965,9 +965,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
NCollection_Haft<Handle_V3d_Viewer> myViewer;
|
||||
NCollection_Haft<Handle_V3d_View> myView;
|
||||
NCollection_Haft<Handle_AIS_InteractiveContext> myAISContext;
|
||||
NCollection_Haft<Handle_D3DHost_GraphicDriver> myGraphicDriver;
|
||||
NCollection_Haft<Handle(V3d_Viewer)> myViewer;
|
||||
NCollection_Haft<Handle(V3d_View)> myView;
|
||||
NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;
|
||||
NCollection_Haft<Handle(D3DHost_GraphicDriver)> myGraphicDriver;
|
||||
|
||||
};
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="..\win32\bind"
|
||||
OutputDirectory="..\win32\$(VCVER)\bind"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -102,7 +102,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="..\win64\bind"
|
||||
OutputDirectory="..\win64\$(VCVER)\bind"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -184,7 +184,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\win32\bin"
|
||||
OutputDirectory="..\win32\$(VCVER)\bin"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
@@ -261,7 +261,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="..\win64\bin"
|
||||
OutputDirectory="..\win64\$(VCVER)\bin"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
|
@@ -67,16 +67,16 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\bind\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\win32\$(VCVER)\bind\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\bind\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\win64\$(VCVER)\bind\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\bin\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\win32\$(VCVER)\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\bin\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\win64\$(VCVER)\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">obj\$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
|
@@ -55,14 +55,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win32\bind\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>..\win32\bin\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -71,14 +71,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win64\bind\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>..\win64\bin\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
@@ -402,6 +402,7 @@ namespace IE_WPF_D3D
|
||||
public void Delete ()
|
||||
{
|
||||
View.EraseObjects ();
|
||||
SelectionChanged ();
|
||||
}
|
||||
|
||||
protected void MultiDragEvent (int x, int y, int theState)
|
||||
|
@@ -55,14 +55,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win32\bind\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>..\win32\bin\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -71,14 +71,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win64\bind\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>..\win64\bin\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
@@ -481,6 +481,7 @@ namespace IE_WPF_WinForms
|
||||
public void Delete()
|
||||
{
|
||||
View.EraseObjects();
|
||||
SelectionChanged();
|
||||
}
|
||||
|
||||
public void OnKeyDown( System.Windows.Input.Key theKey )
|
||||
|
@@ -638,6 +638,8 @@ namespace IE_WinForms
|
||||
public void DeleteObjects()
|
||||
{
|
||||
myOCCTProxy.EraseObjects();
|
||||
IE_WinForms.Form1 parent = (IE_WinForms.Form1)this.ParentForm;
|
||||
parent.SelectionChanged();
|
||||
}
|
||||
public void ImportModel(IE_WinForms.ModelFormat format)
|
||||
{
|
||||
|
@@ -95,7 +95,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win32\bind\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<DebugType>full</DebugType>
|
||||
@@ -104,7 +104,7 @@
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>..\win32\bin\</OutputPath>
|
||||
<OutputPath>..\win32\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<Optimize>true</Optimize>
|
||||
@@ -116,7 +116,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\win64\bind\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bind\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
@@ -125,7 +125,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>..\win64\bin\</OutputPath>
|
||||
<OutputPath>..\win64\$(VCVER)\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<Optimize>true</Optimize>
|
||||
|
11
samples/CSharp/env.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
call "%~dp0..\..\env.bat" %1 %2 %3
|
||||
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bind"
|
||||
set "LIB_DIR=win%ARCH%\%VCVER%\libd"
|
||||
|
||||
if ["%CASDEB%"] == [""] (
|
||||
set "BIN_DIR=win%ARCH%\%VCVER%\bin"
|
||||
set "LIB_DIR=win%ARCH%\%VCVER%\lib"
|
||||
)
|
||||
|
||||
set "PATH=%~dp0%LIB_DIR%;%~dp0%BIN_DIR%;%PATH%"
|
38
samples/CSharp/run.bat
Normal file
@@ -0,0 +1,38 @@
|
||||
@echo off
|
||||
|
||||
if "%1" == "-h" (
|
||||
goto err_bat
|
||||
)
|
||||
|
||||
if not ["%4"] == [""] (
|
||||
set "SampleName=%4"
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
) else if not ["%1"] == [""] (
|
||||
set "SampleName=%1"
|
||||
call "%~dp0env.bat"
|
||||
) else (
|
||||
goto err_bat
|
||||
)
|
||||
|
||||
if not exist "%~dp0%BIN_DIR%\IE_%SampleName%.exe" goto err_exe
|
||||
|
||||
"%~dp0%BIN_DIR%\IE_%SampleName%.exe"
|
||||
|
||||
goto eof
|
||||
|
||||
:err_bat
|
||||
echo Possible names of samples: WinForms, WPF_D3D, WPF_WinForms
|
||||
echo Launch selected sample as follows:
|
||||
echo %~n0.bat [^vc8^|^vc9^|^vc10^|^vc11^|vc12] [^win32^|^win64^] [^Release^|^Debug^] [^SampleName^]
|
||||
echo or
|
||||
echo %~n0.bat [^SampleName^]
|
||||
echo Run %~n0.bat -h to get this help
|
||||
exit /B
|
||||
|
||||
:err_exe
|
||||
echo Executable %~dp0%BIN_DIR%\IE_%SampleName%.exe not found.
|
||||
echo Check that OCCT and sample are built with the selected configuration:
|
||||
echo compiler=%VCVER% platform=win%ARCH% %3
|
||||
exit /B
|
||||
|
||||
:eof
|
@@ -1,27 +1,3 @@
|
||||
@echo off
|
||||
|
||||
if "%1" == "-h" (
|
||||
echo Launch WinForms sample as follows:
|
||||
echo %~n0 ^[vc9^] ^[win32^|win64^] ^[Debug^|Release^]
|
||||
echo By default configuration set in ..\..\custom.bat is used
|
||||
echo Run %~n0 -h to get this help
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0..\..\env.bat" %1 %2 %3
|
||||
|
||||
set "EXEC=%~dp0\win%ARCH%\bin%CASDEB%\IE_WinForms.exe"
|
||||
|
||||
if not exist "%EXEC%" goto err_exe
|
||||
|
||||
"%EXEC%"
|
||||
|
||||
goto eof
|
||||
|
||||
:err_exe
|
||||
echo Executable %EXEC% not found.
|
||||
echo Check that OCCT and sample are built with the selected configuration:
|
||||
echo compiler=%VCVER% platform=win%ARCH% %3
|
||||
exit /B
|
||||
|
||||
:eof
|
||||
call "%~dp0run.bat" WinForms
|
||||
|
@@ -1,27 +1,3 @@
|
||||
@echo off
|
||||
|
||||
if "%1" == "-h" (
|
||||
echo Launch WPF sample as follows:
|
||||
echo %~n0 ^[vc9^] ^[win32^|win64^] ^[Debug^|Release^]
|
||||
echo By default configuration set in ..\..\custom.bat is used
|
||||
echo Run %~n0 -h to get this help
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0..\..\env.bat" %1 %2 %3
|
||||
|
||||
set "EXEC=%~dp0\win%ARCH%\bin%CASDEB%\IE_WPF_WinForms.exe"
|
||||
|
||||
if not exist "%EXEC%" goto err_exe
|
||||
|
||||
"%EXEC%"
|
||||
|
||||
goto eof
|
||||
|
||||
:err_exe
|
||||
echo Executable %EXEC% not found.
|
||||
echo Check that OCCT and sample are built with the selected configuration:
|
||||
echo compiler=%VCVER% platform=win%ARCH% %3
|
||||
exit /B
|
||||
|
||||
:eof
|
||||
call "%~dp0run.bat" WPF_WinForms
|
||||
|
@@ -1,27 +1,3 @@
|
||||
@echo off
|
||||
|
||||
if "%1" == "-h" (
|
||||
echo Launch WPF sample as follows:
|
||||
echo %~n0 ^[vc9^] ^[win32^|win64^] ^[Debug^|Release^]
|
||||
echo By default configuration set in ..\..\custom.bat is used
|
||||
echo Run %~n0 -h to get this help
|
||||
exit /B
|
||||
)
|
||||
|
||||
call "%~dp0..\..\env.bat" %1 %2 %3
|
||||
|
||||
set "EXEC=%~dp0\win%ARCH%\bin%CASDEB%\IE_WPF_D3D.exe"
|
||||
|
||||
if not exist "%EXEC%" goto err_exe
|
||||
|
||||
"%EXEC%"
|
||||
|
||||
goto eof
|
||||
|
||||
:err_exe
|
||||
echo Executable %EXEC% not found.
|
||||
echo Check that OCCT and sample are built with the selected configuration:
|
||||
echo compiler=%VCVER% platform=win%ARCH% %3
|
||||
exit /B
|
||||
|
||||
:eof
|
||||
call "%~dp0run.bat" WPF_D3D
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (OcctJni_MsgPrinter, Message_Printer)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_MsgPrinter, Message_Printer)
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -53,7 +53,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI(OcctJni_MsgPrinter)
|
||||
DEFINE_STANDARD_RTTIEXT(OcctJni_MsgPrinter,Message_Printer)
|
||||
|
||||
};
|
||||
|
||||
|
@@ -13,5 +13,4 @@
|
||||
|
||||
#include <OcctJni_Window.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (OcctJni_Window, Aspect_Window)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_Window, Aspect_Window)
|
||||
|
@@ -97,7 +97,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI(OcctJni_Window)
|
||||
DEFINE_STANDARD_RTTIEXT(OcctJni_Window,Aspect_Window)
|
||||
|
||||
};
|
||||
|
||||
|
@@ -153,7 +153,7 @@ static TCollection_AsciiString Comment(Standard_Real Step,
|
||||
"GeomAPI_PointsToBSplineSurface aPTBS;" EOL
|
||||
"aPTBS.Init(aZPoints,aX0,aXStep,aY0,aYStep," EOL
|
||||
" DegMin,DegMax,Continuity,Tolerance);" EOL
|
||||
"Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();" EOL EOL EOL
|
||||
"Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();" EOL EOL EOL
|
||||
);
|
||||
|
||||
return aText;
|
||||
@@ -165,7 +165,7 @@ static TCollection_AsciiString Comment(Standard_Real Step,
|
||||
// Purpose :
|
||||
//================================================================
|
||||
|
||||
Handle_Geom_BSplineSurface Approx_Presentation::CreateBSplineSurface(TColStd_Array2OfReal& aZPoints,
|
||||
Handle(Geom_BSplineSurface) Approx_Presentation::CreateBSplineSurface(TColStd_Array2OfReal& aZPoints,
|
||||
Standard_Real theXStep,
|
||||
Standard_Real theYStep,
|
||||
Standard_Integer Count)
|
||||
@@ -175,7 +175,7 @@ Handle_Geom_BSplineSurface Approx_Presentation::CreateBSplineSurface(TColStd_Arr
|
||||
GeomAPI_PointsToBSplineSurface aPTBS;
|
||||
aPTBS.Init(aZPoints,aX0,theXStep,aY0,theYStep,
|
||||
DegMin[Count],DegMax[Count],Continuity[Count],Tol[Count]);
|
||||
Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();
|
||||
Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();
|
||||
|
||||
return aSurface;
|
||||
}
|
||||
@@ -192,12 +192,12 @@ Standard_Boolean Approx_Presentation::DrawModifyBSplineSurface(TColStd_Array2OfR
|
||||
Standard_Integer theIndexX,
|
||||
Standard_Integer theIndexY,
|
||||
Standard_Real theDeflection,
|
||||
Handle_AIS_InteractiveObject& aMovePnt,
|
||||
Handle_AIS_InteractiveObject& aObj,
|
||||
Handle(AIS_InteractiveObject)& aMovePnt,
|
||||
Handle(AIS_InteractiveObject)& aObj,
|
||||
Standard_Integer Count)
|
||||
|
||||
{
|
||||
Handle_AIS_InteractiveObject auxObj;
|
||||
Handle(AIS_InteractiveObject) auxObj;
|
||||
Standard_Real aX0 = -300, aY0 = -200;
|
||||
Standard_Real aLastZ = aZPoints(theIndexX,theIndexY);
|
||||
aZPoints(theIndexX,theIndexY) += 100*theDeflection;
|
||||
@@ -216,7 +216,7 @@ Standard_Boolean Approx_Presentation::DrawModifyBSplineSurface(TColStd_Array2OfR
|
||||
|
||||
aZPoints(theIndexX,theIndexY) = aLastZ;
|
||||
|
||||
Handle_Geom_BSplineSurface aSurface = aPTBS.Surface();
|
||||
Handle(Geom_BSplineSurface) aSurface = aPTBS.Surface();
|
||||
|
||||
auxObj = drawSurface(aSurface);
|
||||
getAISContext()->Erase(aObj);
|
||||
@@ -275,7 +275,7 @@ void Approx_Presentation::sample1()
|
||||
|
||||
aText += (
|
||||
"aPTB.Init(aCurvePoint,DegMin,DegMax,Continuity,Tolerance);" EOL
|
||||
"Handle_Geom_BSplineCurve aCurve = aPTB.Curve();" EOL
|
||||
"Handle(Geom_BSplineCurve) aCurve = aPTB.Curve();" EOL
|
||||
);
|
||||
|
||||
setResultTitle("Creating approximations of curves");
|
||||
@@ -295,7 +295,7 @@ void Approx_Presentation::sample1()
|
||||
|
||||
GeomAPI_PointsToBSpline aPTB;
|
||||
|
||||
Handle_AIS_InteractiveObject aIndexPnt [2],aObj;
|
||||
Handle(AIS_InteractiveObject) aIndexPnt [2],aObj;
|
||||
Standard_Integer aIndex[2] = {9,13};
|
||||
Standard_Real aDeflection[2] = {-1.5,2};
|
||||
|
||||
@@ -313,7 +313,7 @@ void Approx_Presentation::sample1()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
aPTB.Init(aCurvePoint,DegMin[Count],DegMax[Count],Continuity[Count],Tol[Count]);
|
||||
Handle_Geom_BSplineCurve aCurve = aPTB.Curve();
|
||||
Handle(Geom_BSplineCurve) aCurve = aPTB.Curve();
|
||||
aObj = drawCurve(aCurve);
|
||||
|
||||
for( i = 0 ; i < 2 ; i++)
|
||||
@@ -367,7 +367,7 @@ void Approx_Presentation::sample2()
|
||||
|
||||
|
||||
TColgp_Array2OfPnt aPnt(1,4,1,4);
|
||||
Handle_AIS_InteractiveObject aShowPnt[4][4],aObj,aMovePnt;
|
||||
Handle(AIS_InteractiveObject) aShowPnt[4][4],aObj,aMovePnt;
|
||||
|
||||
Standard_Integer aColLength = aZPoints.ColLength();
|
||||
Standard_Integer aRowLength = aZPoints.RowLength();
|
||||
@@ -404,7 +404,7 @@ void Approx_Presentation::sample2()
|
||||
aText = Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
|
||||
setResultText(aText.ToCString());
|
||||
|
||||
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
aObj = drawSurface(aSurface);
|
||||
Standard_Boolean aBool;
|
||||
if(WAIT_A_LITTLE) return ;
|
||||
@@ -452,7 +452,7 @@ void Approx_Presentation::sample3()
|
||||
|
||||
|
||||
TColgp_Array2OfPnt aPnt(1,4,1,4);
|
||||
Handle_AIS_InteractiveObject aShowPnt[4][4],aObj,aMovePnt;
|
||||
Handle(AIS_InteractiveObject) aShowPnt[4][4],aObj,aMovePnt;
|
||||
|
||||
Standard_Integer aColLength = aZPoints.ColLength();
|
||||
Standard_Integer aRowLength = aZPoints.RowLength();
|
||||
@@ -491,7 +491,7 @@ void Approx_Presentation::sample3()
|
||||
aText += Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
|
||||
setResultText(aText.ToCString());
|
||||
|
||||
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
aObj = drawSurface(aSurface);
|
||||
Standard_Boolean aBool;
|
||||
if(WAIT_A_LITTLE) return ;
|
||||
@@ -540,7 +540,7 @@ void Approx_Presentation::sample4()
|
||||
|
||||
|
||||
TColgp_Array2OfPnt aPnt(1,5,1,5);
|
||||
Handle_AIS_InteractiveObject aShowPnt[5][5],aObj,aMovePnt;
|
||||
Handle(AIS_InteractiveObject) aShowPnt[5][5],aObj,aMovePnt;
|
||||
|
||||
Standard_Integer aColLength = aZPoints.ColLength();
|
||||
Standard_Integer aRowLength = aZPoints.RowLength();
|
||||
@@ -579,7 +579,7 @@ void Approx_Presentation::sample4()
|
||||
aText += Comment(aXStep,anUpper,DegMin[Count],DegMax[Count],Count+1,Tol[Count]);
|
||||
setResultText(aText.ToCString());
|
||||
|
||||
Handle_Geom_BSplineSurface aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
Handle(Geom_BSplineSurface) aSurface = CreateBSplineSurface(aZPoints,aXStep,aYStep,Count);
|
||||
aObj = drawSurface(aSurface);
|
||||
Standard_Boolean aBool;
|
||||
if(WAIT_A_LITTLE) return ;
|
||||
|
@@ -32,11 +32,11 @@ private:
|
||||
Standard_Boolean DrawModifyBSplineSurface(TColStd_Array2OfReal& ,
|
||||
Standard_Real ,Standard_Real ,
|
||||
Standard_Integer ,Standard_Integer ,
|
||||
Standard_Real,Handle_AIS_InteractiveObject&,
|
||||
Handle_AIS_InteractiveObject&,
|
||||
Standard_Real,Handle(AIS_InteractiveObject)&,
|
||||
Handle(AIS_InteractiveObject)&,
|
||||
Standard_Integer);
|
||||
|
||||
Handle_Geom_BSplineSurface CreateBSplineSurface(TColStd_Array2OfReal& ,
|
||||
Handle(Geom_BSplineSurface) CreateBSplineSurface(TColStd_Array2OfReal& ,
|
||||
Standard_Real ,Standard_Real,
|
||||
Standard_Integer);
|
||||
|
||||
|
@@ -84,7 +84,7 @@ Standard_Boolean Chamfers_Presentation::createDiverseChamferOnBox(
|
||||
Standard_Real d1, // chamfer on edge 1
|
||||
Standard_Real d2, // chamfer on edge 2
|
||||
Standard_Real d3, // chamfer on edge 3
|
||||
Handle_AIS_InteractiveObject& thePrevShape)// for smoth drawing
|
||||
Handle(AIS_InteractiveObject)& thePrevShape)// for smoth drawing
|
||||
// we display the new shape first, then erase the previous one
|
||||
{
|
||||
// initializing a class that builds chamfer
|
||||
@@ -202,7 +202,7 @@ Standard_Boolean Chamfers_Presentation::createChamferOnBox(
|
||||
TopoDS_Solid& aBox,
|
||||
Standard_Real theDistA, // distance along first face
|
||||
Standard_Real theDistB, // distance along second face
|
||||
Handle_AIS_InteractiveObject& thePrevShape)// for smoth drawing
|
||||
Handle(AIS_InteractiveObject)& thePrevShape)// for smoth drawing
|
||||
// we display the new shape first, then erase the previous one
|
||||
{
|
||||
// initializing a class that builds chamfer
|
||||
@@ -287,7 +287,7 @@ Standard_Boolean Chamfers_Presentation::createFilletOnBox(
|
||||
TopoDS_Solid& aBox,
|
||||
Standard_Real theRad, // radius of fillet
|
||||
ChFi3d_FilletShape theFShape, // shape of fillet
|
||||
Handle_AIS_InteractiveObject& thePrevObj) // to erase
|
||||
Handle(AIS_InteractiveObject)& thePrevObj) // to erase
|
||||
// the previous shape
|
||||
{
|
||||
// initializing a class that builds fillet
|
||||
@@ -612,7 +612,7 @@ void Chamfers_Presentation::sampleBoxFillet()
|
||||
Standard_Real a = BOX_SIDE_LEN;
|
||||
TopoDS_Solid aBox = BRepPrimAPI_MakeBox(gp_Pnt(-a/2, -a/2, -a/2), a, a, a);
|
||||
|
||||
Handle_AIS_InteractiveObject aPrevObj = new AIS_Shape(aBox);
|
||||
Handle(AIS_InteractiveObject) aPrevObj = new AIS_Shape(aBox);
|
||||
getAISContext()->Display(aPrevObj, Standard_False);
|
||||
COCCDemoDoc::Fit();
|
||||
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#include <OCCDemo_Presentation.h>
|
||||
#include <ChFi3d_FilletShape.hxx>
|
||||
|
||||
class Handle_AIS_InteractiveObject;
|
||||
class AIS_InteractiveObject;
|
||||
class TopoDS_Solid;
|
||||
|
||||
class Chamfers_Presentation : public OCCDemo_Presentation
|
||||
@@ -29,15 +29,15 @@ public:
|
||||
private:
|
||||
Standard_Boolean createChamferOnBox(
|
||||
TopoDS_Solid&, Standard_Real, Standard_Real,
|
||||
Handle_AIS_InteractiveObject&);
|
||||
Handle(AIS_InteractiveObject)&);
|
||||
|
||||
Standard_Boolean createDiverseChamferOnBox(
|
||||
TopoDS_Solid&, Standard_Real, Standard_Real,
|
||||
Standard_Real, Handle_AIS_InteractiveObject&);
|
||||
Standard_Real, Handle(AIS_InteractiveObject)&);
|
||||
|
||||
Standard_Boolean createFilletOnBox(
|
||||
TopoDS_Solid&, Standard_Real, ChFi3d_FilletShape,
|
||||
Handle_AIS_InteractiveObject&);
|
||||
Handle(AIS_InteractiveObject)&);
|
||||
|
||||
// Sample functions
|
||||
void sampleBoxChamfer();
|
||||
|
@@ -11,28 +11,25 @@
|
||||
#include <Prs3d_ArrowAspect.hxx>
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
|
||||
//
|
||||
// Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and
|
||||
// a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
|
||||
// We must respect the order: from the direct ancestor class
|
||||
// to the base class.
|
||||
//
|
||||
IMPLEMENT_STANDARD_TYPE(ISession_Curve)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(SelectMgr_SelectableObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(PrsMgr_PresentableObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(SelectMgr_SelectableObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(PrsMgr_PresentableObject)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
|
||||
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||
IMPLEMENT_STANDARD_TYPE_END(ISession_Curve)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
|
@@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject
|
||||
public:
|
||||
ISession_Curve(const Handle(Geom_Curve)& aCurve);
|
||||
virtual ~ISession_Curve();
|
||||
DEFINE_STANDARD_RTTI(ISession_Curve)
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
private:
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
|
||||
|
@@ -77,8 +77,8 @@ static Standard_Boolean fixParam(Standard_Real& theParam)
|
||||
// Purpose : displays a given geometric surface in 3d viewer
|
||||
// (creates a finite face and displays it)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
(const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
(const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
fixParam(v1);
|
||||
fixParam(v2);
|
||||
|
||||
Handle_AIS_Shape aGraphicSurface =
|
||||
Handle(AIS_Shape) aGraphicSurface =
|
||||
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2));
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
@@ -110,8 +110,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 3d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -135,8 +135,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 2d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay,
|
||||
const gp_Ax2& aPosition)
|
||||
@@ -163,7 +163,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : drawPoint
|
||||
// Purpose : displays a given point
|
||||
//================================================================
|
||||
Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
(const gp_Pnt& aPnt,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
@@ -185,7 +185,7 @@ Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
// (segment of line starting at thePnt with the arrow at the end,
|
||||
// the length of segment is the length of the vector)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
(const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor,
|
||||
@@ -217,11 +217,11 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
}
|
||||
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
getAISContext()->SetColor (aGraphicShape, theColor, toDisplay);
|
||||
@@ -237,12 +237,12 @@ Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
return aGraphicShape;
|
||||
}
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay);
|
||||
if (toDisplay) {
|
||||
|
@@ -14,10 +14,10 @@
|
||||
#define WAIT_A_SECOND WaitForInput(1000)
|
||||
|
||||
#include <OCCDemoDoc.h>
|
||||
class Handle_AIS_InteractiveObject;
|
||||
class Handle_Geom_Surface;
|
||||
class Handle_Geom_Curve;
|
||||
class Handle_Geom2d_Curve;
|
||||
class AIS_InteractiveObject;
|
||||
class Geom_Surface;
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
class Quantity_Color;
|
||||
|
||||
class OCCDemo_Presentation
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
protected:
|
||||
// Methods to call from a derivable class
|
||||
void setName (const char* theName) {myName = CString(theName);}
|
||||
Handle_AIS_InteractiveContext getAISContext() const {return myDoc->GetAISContext();}
|
||||
Handle_V3d_Viewer getViewer() const {return myDoc->GetViewer();}
|
||||
Handle(AIS_InteractiveContext) getAISContext() const {return myDoc->GetAISContext();}
|
||||
Handle(V3d_Viewer) getViewer() const {return myDoc->GetViewer();}
|
||||
void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);}
|
||||
void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);}
|
||||
Standard_CString GetDataDir() {return myDoc->GetDataDir();}
|
||||
@@ -72,45 +72,45 @@ protected:
|
||||
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
|
||||
// Waits for a user input or a period of time has been elapsed
|
||||
|
||||
Handle_AIS_InteractiveObject drawSurface (const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a finite face based on the given geometric surface
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates an ISession_Curve based on the given geometric curve
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True,
|
||||
const gp_Ax2& aPosition = gp::XOY());
|
||||
// converts a given curve to 3d using aPosition and calls the previous method
|
||||
|
||||
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
|
||||
Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given point
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawVector (const gp_Pnt& thePnt,
|
||||
Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given vector
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape
|
||||
// with material PLASTIC and a given color
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape with the given material
|
||||
|
@@ -23,7 +23,7 @@ class COCCDemoApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
COCCDemoApp();
|
||||
Handle_Graphic3d_WNTGraphicDevice GetGraphicDevice() const
|
||||
Handle(Graphic3d_WNTGraphicDevice) GetGraphicDevice() const
|
||||
{ return myGraphicDevice; } ;
|
||||
|
||||
// Overrides
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
|
||||
Handle(Graphic3d_WNTGraphicDevice) myGraphicDevice;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -15,8 +15,8 @@ class OCCDemo_Presentation;
|
||||
class COCCDemoDoc : public CDocument
|
||||
{
|
||||
public:
|
||||
Handle_V3d_Viewer GetViewer() const { return myViewer; };
|
||||
Handle_AIS_InteractiveContext GetAISContext() const { return myAISContext; };
|
||||
Handle(V3d_Viewer) GetViewer() const { return myViewer; };
|
||||
Handle(AIS_InteractiveContext) GetAISContext() const { return myAISContext; };
|
||||
CResultDialog* GetResultDialog () {return &myCResultDialog;}
|
||||
Standard_CString GetDataDir() {return myDataDir;}
|
||||
|
||||
@@ -71,8 +71,8 @@ protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
Handle(V3d_Viewer) myViewer;
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
OCCDemo_Presentation *myPresentation;
|
||||
CResultDialog myCResultDialog;
|
||||
BOOL myShowResult;
|
||||
|
@@ -103,8 +103,8 @@ private:
|
||||
|
||||
private:
|
||||
enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
|
||||
Handle_V3d_View myView;
|
||||
Handle_Graphic3d_GraphicDriver myGraphicDriver;
|
||||
Handle(V3d_View) myView;
|
||||
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
|
||||
View3D_CurrentAction myCurrentMode;
|
||||
VisMode myVisMode;
|
||||
Standard_Integer myXmin;
|
||||
|
@@ -88,7 +88,7 @@ void Convert_Presentation::DoSample()
|
||||
// Function : Convert_Presentation::drawSurfaceAndItsBSpline
|
||||
// Purpose :
|
||||
//================================================================
|
||||
void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurface,
|
||||
void Convert_Presentation::drawSurfaceAndItsBSpline(Handle(Geom_Surface) theSurface,
|
||||
const Standard_CString theName,
|
||||
TCollection_AsciiString& theText)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurfa
|
||||
aTitle += " to BSpline surface";
|
||||
|
||||
theText += EOL
|
||||
" Handle_Geom_BSplineSurface aBSplineSurface = " EOL
|
||||
" Handle(Geom_BSplineSurface) aBSplineSurface = " EOL
|
||||
" GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL;
|
||||
|
||||
setResultTitle (aTitle.ToCString());
|
||||
@@ -107,7 +107,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurfa
|
||||
|
||||
if (WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_BSplineSurface aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
|
||||
Handle(Geom_BSplineSurface) aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
|
||||
|
||||
_ASSERTE(!aBSplineSurface.IsNull());
|
||||
|
||||
@@ -118,7 +118,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurfa
|
||||
// Function : Convert_Presentation::drawCurveAndItsBSpline
|
||||
// Purpose :
|
||||
//================================================================
|
||||
void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve,
|
||||
const Standard_CString theName,
|
||||
TCollection_AsciiString& theText)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
aTitle += " to BSpline curve";
|
||||
|
||||
theText += EOL
|
||||
" Handle_Geom_BSplineCurve aBSpline = " EOL
|
||||
" Handle(Geom_BSplineCurve) aBSpline = " EOL
|
||||
" GeomConvert::CurveToBSplineCurve(aCurve);" EOL;
|
||||
|
||||
setResultTitle (aTitle.ToCString());
|
||||
@@ -137,7 +137,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
|
||||
if (WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_BSplineCurve aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
|
||||
Handle(Geom_BSplineCurve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
|
||||
|
||||
drawCurve (aBSpline, BSplineColor);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void Convert_Presentation::sampleCircle()
|
||||
gp_Dir aDir (1,0,0);
|
||||
gp_Ax2 aAxis (aOrigin, aDir);
|
||||
Standard_Real aRadius = 300;
|
||||
Handle_Geom_Circle aCurve = new Geom_Circle (aAxis, aRadius);
|
||||
Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius);
|
||||
|
||||
TCollection_AsciiString aText (
|
||||
" gp_Pnt aOrigin (0,0,0);" EOL
|
||||
|
@@ -10,8 +10,8 @@
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <OCCDemo_Presentation.h>
|
||||
class Handle_Geom_Curve;
|
||||
class Handle_Geom_Surface;
|
||||
class Geom_Curve;
|
||||
class Geom_Surface;
|
||||
|
||||
class Quantity_Color;
|
||||
|
||||
@@ -38,10 +38,10 @@ private:
|
||||
void sampleConicalSurface();
|
||||
void sampleSphericalSurface();
|
||||
|
||||
void drawCurveAndItsBSpline (Handle_Geom_Curve theCurve,
|
||||
void drawCurveAndItsBSpline (Handle(Geom_Curve) theCurve,
|
||||
const Standard_CString theName, TCollection_AsciiString& theText);
|
||||
|
||||
void drawSurfaceAndItsBSpline (Handle_Geom_Surface theSurface,
|
||||
void drawSurfaceAndItsBSpline (Handle(Geom_Surface) theSurface,
|
||||
const Standard_CString theName, TCollection_AsciiString& theText);
|
||||
|
||||
private:
|
||||
|
@@ -196,14 +196,14 @@ void DCA_Presentation::sampleParabola()
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Line aFocalLenLin = new Geom_Line(gce_MakeLin(aPointParab, gp_Dir(0,0,1)));
|
||||
Handle_Geom_TrimmedCurve aTrim = new Geom_TrimmedCurve(aFocalLenLin, -aFocalLength/2, aFocalLength/2);
|
||||
Handle(Geom_Line) aFocalLenLin = new Geom_Line(gce_MakeLin(aPointParab, gp_Dir(0,0,1)));
|
||||
Handle(Geom_TrimmedCurve) aTrim = new Geom_TrimmedCurve(aFocalLenLin, -aFocalLength/2, aFocalLength/2);
|
||||
drawCurve(aTrim);
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Parabola aParabola = new Geom_Parabola(aParab);
|
||||
Handle_Geom_TrimmedCurve aParabTrimmed =
|
||||
Handle(Geom_Parabola) aParabola = new Geom_Parabola(aParab);
|
||||
Handle(Geom_TrimmedCurve) aParabTrimmed =
|
||||
new Geom_TrimmedCurve(aParabola,-300,300,Standard_True);
|
||||
drawCurve(aParabTrimmed);
|
||||
|
||||
@@ -218,8 +218,8 @@ void DCA_Presentation::sampleParabola()
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Parabola aParabola1 = new Geom_Parabola(aParab1);
|
||||
Handle_Geom_TrimmedCurve aParabTrimmed1 = new Geom_TrimmedCurve(aParabola1,-300,300,Standard_True);
|
||||
Handle(Geom_Parabola) aParabola1 = new Geom_Parabola(aParab1);
|
||||
Handle(Geom_TrimmedCurve) aParabTrimmed1 = new Geom_TrimmedCurve(aParabola1,-300,300,Standard_True);
|
||||
drawCurve(aParabTrimmed1);
|
||||
}
|
||||
//================================================================
|
||||
@@ -283,8 +283,8 @@ void DCA_Presentation::sampleHyperbola()
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Hyperbola aHyperbola1 = new Geom_Hyperbola(aHypr1);
|
||||
Handle_Geom_TrimmedCurve aHyprTrimmed =
|
||||
Handle(Geom_Hyperbola) aHyperbola1 = new Geom_Hyperbola(aHypr1);
|
||||
Handle(Geom_TrimmedCurve) aHyprTrimmed =
|
||||
new Geom_TrimmedCurve(aHyperbola1,-3,4,Standard_True);
|
||||
drawCurve(aHyprTrimmed);
|
||||
|
||||
@@ -305,23 +305,23 @@ void DCA_Presentation::sampleHyperbola()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output of display MajorRadius (yellow color)
|
||||
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin(aPointHypr1,aPointHypr2));
|
||||
Handle_Geom_TrimmedCurve aTrimmed1 =
|
||||
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin(aPointHypr1,aPointHypr2));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed1 =
|
||||
new Geom_TrimmedCurve(aLine, 0, aPointHypr1.Distance(aPointHypr2));
|
||||
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_YELLOW));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output of display MinorRadius (yellow color)
|
||||
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aPointHypr3, gp_Dir(0,-1,0)));
|
||||
Handle_Geom_TrimmedCurve aTrimmed2 = new Geom_TrimmedCurve(aLine1, 0,100);
|
||||
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aPointHypr3, gp_Dir(0,-1,0)));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed2 = new Geom_TrimmedCurve(aLine1, 0,100);
|
||||
drawCurve(aTrimmed2,Quantity_Color(Quantity_NOC_YELLOW));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output hyperbola
|
||||
Handle_Geom_Hyperbola aHyperbola2 = new Geom_Hyperbola(aHypr2);
|
||||
Handle_Geom_TrimmedCurve aHyprTrimmed1 =
|
||||
Handle(Geom_Hyperbola) aHyperbola2 = new Geom_Hyperbola(aHypr2);
|
||||
Handle(Geom_TrimmedCurve) aHyprTrimmed1 =
|
||||
new Geom_TrimmedCurve(aHyperbola2,-2,2,Standard_True);
|
||||
drawCurve(aHyprTrimmed1);
|
||||
}
|
||||
@@ -396,8 +396,8 @@ void DCA_Presentation::sampleCircle()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output radius
|
||||
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin (aCenterPoint,gp_Dir(0,0,1)));
|
||||
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,0,300);
|
||||
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin (aCenterPoint,gp_Dir(0,0,1)));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,0,300);
|
||||
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
@@ -519,16 +519,16 @@ void DCA_Presentation::sampleEllipse()
|
||||
gp_Lin aLine1 = aMakeLin1.Value();
|
||||
|
||||
//output MajorRadius
|
||||
Handle_Geom_Line aLineMajorRadius = new Geom_Line(aLine);
|
||||
Handle_Geom_TrimmedCurve aTrimmed =
|
||||
Handle(Geom_Line) aLineMajorRadius = new Geom_Line(aLine);
|
||||
Handle(Geom_TrimmedCurve) aTrimmed =
|
||||
new Geom_TrimmedCurve(aLineMajorRadius,0,120);
|
||||
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output MinorRadius
|
||||
Handle_Geom_Line aLineMinorrRadius = new Geom_Line(aLine1);
|
||||
Handle_Geom_TrimmedCurve aTrimmed1 =
|
||||
Handle(Geom_Line) aLineMinorrRadius = new Geom_Line(aLine1);
|
||||
Handle(Geom_TrimmedCurve) aTrimmed1 =
|
||||
new Geom_TrimmedCurve(aLineMinorrRadius,0,300);
|
||||
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
@@ -588,8 +588,8 @@ void DCA_Presentation::samplePlane()
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Plane aPln = new Geom_Plane(aPlane);
|
||||
Handle_Geom_RectangularTrimmedSurface aPlnTrimmed =
|
||||
Handle(Geom_Plane) aPln = new Geom_Plane(aPlane);
|
||||
Handle(Geom_RectangularTrimmedSurface) aPlnTrimmed =
|
||||
new Geom_RectangularTrimmedSurface(aPln,-300,300,-300,300,Standard_True,Standard_True);
|
||||
drawSurface(aPlnTrimmed);
|
||||
|
||||
@@ -604,8 +604,8 @@ void DCA_Presentation::samplePlane()
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_Plane aPln1 = new Geom_Plane(aPlane1);
|
||||
Handle_Geom_RectangularTrimmedSurface aPlnTrimmed1 =
|
||||
Handle(Geom_Plane) aPln1 = new Geom_Plane(aPlane1);
|
||||
Handle(Geom_RectangularTrimmedSurface) aPlnTrimmed1 =
|
||||
new Geom_RectangularTrimmedSurface(aPln1,-200,300,-200,300,Standard_True,Standard_True);
|
||||
drawSurface(aPlnTrimmed1);
|
||||
|
||||
@@ -693,14 +693,14 @@ void DCA_Presentation::sampleCylindricalSurface()
|
||||
gp_Dir aDir1(0,0,1);
|
||||
gce_MakeLin aMakeLin(aCenterPoint,aDir1);
|
||||
gp_Lin aLin = aMakeLin.Value();
|
||||
Handle_Geom_Line aLine = new Geom_Line(aLin);
|
||||
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,-100,0);
|
||||
Handle(Geom_Line) aLine = new Geom_Line(aLin);
|
||||
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,-100,0);
|
||||
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
|
||||
if(WAIT_A_LITTLE) return;
|
||||
// output cylinder
|
||||
Handle_Geom_CylindricalSurface aCylSurface =
|
||||
Handle(Geom_CylindricalSurface) aCylSurface =
|
||||
new Geom_CylindricalSurface(aCyl);
|
||||
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
|
||||
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
|
||||
new Geom_RectangularTrimmedSurface(aCylSurface,0,2*PI,-200,300,Standard_True,Standard_True);
|
||||
drawSurface(aCylTrimmed);
|
||||
if(WAIT_A_LITTLE) return;
|
||||
@@ -716,14 +716,14 @@ void DCA_Presentation::sampleCylindricalSurface()
|
||||
drawVector(aCylinderPoint2,gp_Vec(aCylinderPoint2,aCylinderPoint3)*3,Quantity_Color(Quantity_NOC_WHITE));
|
||||
if(WAIT_A_LITTLE) return;
|
||||
//output radius
|
||||
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aCylinderPoint1,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed1 = new Geom_TrimmedCurve(aLine1,-80,0);
|
||||
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aCylinderPoint1,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed1 = new Geom_TrimmedCurve(aLine1,-80,0);
|
||||
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
|
||||
if(WAIT_A_LITTLE) return;
|
||||
//output cylinder
|
||||
Handle_Geom_CylindricalSurface aCylSurface1 =
|
||||
Handle(Geom_CylindricalSurface) aCylSurface1 =
|
||||
new Geom_CylindricalSurface(aCyl1);
|
||||
Handle_Geom_RectangularTrimmedSurface aCylTrimmed1 =
|
||||
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed1 =
|
||||
new Geom_RectangularTrimmedSurface(aCylSurface1,0,2*PI,-300,100,Standard_True,Standard_True);
|
||||
drawSurface(aCylTrimmed1);
|
||||
if(WAIT_A_LITTLE) return;
|
||||
@@ -731,17 +731,17 @@ void DCA_Presentation::sampleCylindricalSurface()
|
||||
|
||||
//METHOD 3.(output of dispay)
|
||||
//output base cylinder
|
||||
Handle_Geom_CylindricalSurface aCylSurf = new Geom_CylindricalSurface(aCylinder);
|
||||
Handle_Geom_RectangularTrimmedSurface aCylTrimmed2 =
|
||||
Handle(Geom_CylindricalSurface) aCylSurf = new Geom_CylindricalSurface(aCylinder);
|
||||
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed2 =
|
||||
new Geom_RectangularTrimmedSurface(aCylSurf,0,2*PI,-200,200,Standard_True,Standard_True);
|
||||
drawSurface(aCylTrimmed2 ,Quantity_Color(Quantity_NOC_WHITE));
|
||||
//output point
|
||||
drawPoint(aCylinderPoint4);
|
||||
if(WAIT_A_LITTLE) return;
|
||||
//output cylinder
|
||||
Handle_Geom_CylindricalSurface aCylSurface2 =
|
||||
Handle(Geom_CylindricalSurface) aCylSurface2 =
|
||||
new Geom_CylindricalSurface(aCyl2);
|
||||
Handle_Geom_RectangularTrimmedSurface aCylTrimmed3 =
|
||||
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed3 =
|
||||
new Geom_RectangularTrimmedSurface(aCylSurface2,0,2*PI,-200,200,Standard_True,Standard_True);
|
||||
drawSurface(aCylTrimmed3);
|
||||
if(WAIT_A_LITTLE) return;
|
||||
@@ -753,9 +753,9 @@ void DCA_Presentation::sampleCylindricalSurface()
|
||||
drawCurve(new Geom_Circle(aCirc),Quantity_Color(Quantity_NOC_WHITE));
|
||||
if(WAIT_A_LITTLE) return;
|
||||
//output cylinder
|
||||
Handle_Geom_CylindricalSurface aCylSurface3 =
|
||||
Handle(Geom_CylindricalSurface) aCylSurface3 =
|
||||
new Geom_CylindricalSurface(aCyl3);
|
||||
Handle_Geom_RectangularTrimmedSurface aCylTrimmed4 =
|
||||
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed4 =
|
||||
new Geom_RectangularTrimmedSurface(aCylSurface3,0,2*PI,-200,200,Standard_True,Standard_True);
|
||||
drawSurface(aCylTrimmed4);
|
||||
}
|
||||
@@ -800,8 +800,8 @@ void DCA_Presentation::sampleToroidalSurface()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output MajorRadius
|
||||
Handle_Geom_Line R1 = new Geom_Line(gce_MakeLin(aCenterPoint, gp_Dir(0,1,0)));
|
||||
Handle_Geom_TrimmedCurve aTrimmedR1 = new Geom_TrimmedCurve(R1,0,MajorRadius);
|
||||
Handle(Geom_Line) R1 = new Geom_Line(gce_MakeLin(aCenterPoint, gp_Dir(0,1,0)));
|
||||
Handle(Geom_TrimmedCurve) aTrimmedR1 = new Geom_TrimmedCurve(R1,0,MajorRadius);
|
||||
drawCurve(aTrimmedR1, Quantity_Color(Quantity_NOC_WHITE));
|
||||
drawCurve(new Geom_Circle(anAx3.Ax2(), MajorRadius));
|
||||
|
||||
@@ -809,7 +809,7 @@ void DCA_Presentation::sampleToroidalSurface()
|
||||
|
||||
// output MinorRadius as a circle
|
||||
gp_Ax2 aMinorRadAx(aTrimmedR1->EndPoint(), gp_Dir(0,0,1));
|
||||
Handle_Geom_Circle aMinorRadCirc = new Geom_Circle(aMinorRadAx, MinorRadius);
|
||||
Handle(Geom_Circle) aMinorRadCirc = new Geom_Circle(aMinorRadAx, MinorRadius);
|
||||
drawCurve(aMinorRadCirc);
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
@@ -915,28 +915,28 @@ void DCA_Presentation::sampleConicalSurface()
|
||||
|
||||
gp_Dir aDir1(0,1,0);
|
||||
//output first radius
|
||||
Handle_Geom_Line aLine = new Geom_Line(gce_MakeLin(aConePnt,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed = new Geom_TrimmedCurve(aLine,0,100);
|
||||
Handle(Geom_Line) aLine = new Geom_Line(gce_MakeLin(aConePnt,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed = new Geom_TrimmedCurve(aLine,0,100);
|
||||
drawCurve(aTrimmed,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
//output second radius
|
||||
Handle_Geom_Line aLine1 = new Geom_Line(gce_MakeLin(aConePnt1,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed1 = new Geom_TrimmedCurve(aLine1,0,50);
|
||||
Handle(Geom_Line) aLine1 = new Geom_Line(gce_MakeLin(aConePnt1,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed1 = new Geom_TrimmedCurve(aLine1,0,50);
|
||||
drawCurve(aTrimmed1,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output ruling of cone
|
||||
Handle_Geom_Line aLine2 = new Geom_Line(gce_MakeLin(aConePnt,aConePnt1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed2 =
|
||||
Handle(Geom_Line) aLine2 = new Geom_Line(gce_MakeLin(aConePnt,aConePnt1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed2 =
|
||||
new Geom_TrimmedCurve(aLine2,0,aConePnt.Distance(aConePnt1));
|
||||
drawCurve(aTrimmed2,Quantity_Color(Quantity_NOC_RED));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output cone
|
||||
Handle_Geom_ConicalSurface aConSurface1 = new Geom_ConicalSurface(aCone1);
|
||||
Handle_Geom_RectangularTrimmedSurface aConTrimmed1 =
|
||||
Handle(Geom_ConicalSurface) aConSurface1 = new Geom_ConicalSurface(aCone1);
|
||||
Handle(Geom_RectangularTrimmedSurface) aConTrimmed1 =
|
||||
new Geom_RectangularTrimmedSurface(aConSurface1,0,2*PI,-50,450,Standard_True,Standard_True);
|
||||
drawSurface(aConTrimmed1);
|
||||
|
||||
@@ -955,18 +955,18 @@ void DCA_Presentation::sampleConicalSurface()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output of first radius
|
||||
Handle_Geom_Line aLineR1 = new Geom_Line(gce_MakeLin (aConePnt,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmedR1 = new Geom_TrimmedCurve(aLineR1,0,Radius1);
|
||||
Handle(Geom_Line) aLineR1 = new Geom_Line(gce_MakeLin (aConePnt,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmedR1 = new Geom_TrimmedCurve(aLineR1,0,Radius1);
|
||||
drawCurve(aTrimmedR1,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
//output of second radius
|
||||
Handle_Geom_Line aLineR2 = new Geom_Line(gce_MakeLin (aConePnt2,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmedR2 = new Geom_TrimmedCurve(aLineR2,0,Radius2);
|
||||
Handle(Geom_Line) aLineR2 = new Geom_Line(gce_MakeLin (aConePnt2,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmedR2 = new Geom_TrimmedCurve(aLineR2,0,Radius2);
|
||||
drawCurve(aTrimmedR2,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
//output cone
|
||||
Handle_Geom_ConicalSurface aConSurface2 = new Geom_ConicalSurface(aCone2);
|
||||
Handle_Geom_RectangularTrimmedSurface aConTrimmed2 =
|
||||
Handle(Geom_ConicalSurface) aConSurface2 = new Geom_ConicalSurface(aCone2);
|
||||
Handle(Geom_RectangularTrimmedSurface) aConTrimmed2 =
|
||||
new Geom_RectangularTrimmedSurface(aConSurface2,0,2*PI,-120,400,Standard_True,Standard_True);
|
||||
drawSurface(aConTrimmed2);
|
||||
|
||||
@@ -981,13 +981,13 @@ void DCA_Presentation::sampleConicalSurface()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output radius
|
||||
Handle_Geom_Line aLine3 = new Geom_Line(gce_MakeLin (aCenterPoint,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed3 = new Geom_TrimmedCurve(aLine3,0,70);
|
||||
Handle(Geom_Line) aLine3 = new Geom_Line(gce_MakeLin (aCenterPoint,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed3 = new Geom_TrimmedCurve(aLine3,0,70);
|
||||
drawCurve(aTrimmed3 ,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
//output cone
|
||||
Handle_Geom_ConicalSurface aConSurface3 = new Geom_ConicalSurface(aCone3);
|
||||
Handle_Geom_RectangularTrimmedSurface aConTrimmed =
|
||||
Handle(Geom_ConicalSurface) aConSurface3 = new Geom_ConicalSurface(aCone3);
|
||||
Handle(Geom_RectangularTrimmedSurface) aConTrimmed =
|
||||
new Geom_RectangularTrimmedSurface(aConSurface3,0,2*PI,-300,300,Standard_True,Standard_True);
|
||||
drawSurface(aConTrimmed);
|
||||
|
||||
@@ -1011,30 +1011,30 @@ void DCA_Presentation::sampleConicalSurface()
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output ruling of cone
|
||||
Handle_Geom_Line aLine4 = new Geom_Line(gce_MakeLin (aPoint_3,aPoint_4));
|
||||
Handle_Geom_TrimmedCurve aTrimmed4 =
|
||||
Handle(Geom_Line) aLine4 = new Geom_Line(gce_MakeLin (aPoint_3,aPoint_4));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed4 =
|
||||
new Geom_TrimmedCurve(aLine4,0,aPoint_3.Distance(aPoint_4));
|
||||
drawCurve(aTrimmed4 ,Quantity_Color(Quantity_NOC_RED));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output first radius
|
||||
Handle_Geom_Line aLine5 = new Geom_Line(gce_MakeLin (aPoint_3,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed5 = new Geom_TrimmedCurve(aLine5,0,50);
|
||||
Handle(Geom_Line) aLine5 = new Geom_Line(gce_MakeLin (aPoint_3,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed5 = new Geom_TrimmedCurve(aLine5,0,50);
|
||||
drawCurve(aTrimmed5 ,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output second radius
|
||||
Handle_Geom_Line aLine6 = new Geom_Line(gce_MakeLin (aPoint_4,aDir1));
|
||||
Handle_Geom_TrimmedCurve aTrimmed6 = new Geom_TrimmedCurve(aLine6,0,60);
|
||||
Handle(Geom_Line) aLine6 = new Geom_Line(gce_MakeLin (aPoint_4,aDir1));
|
||||
Handle(Geom_TrimmedCurve) aTrimmed6 = new Geom_TrimmedCurve(aLine6,0,60);
|
||||
drawCurve(aTrimmed6 ,Quantity_Color(Quantity_NOC_WHITE));
|
||||
|
||||
if(WAIT_A_LITTLE) return;
|
||||
|
||||
//output cone
|
||||
Handle_Geom_ConicalSurface aConSurface4 = new Geom_ConicalSurface(aCone4);
|
||||
Handle_Geom_RectangularTrimmedSurface aConTrimmed4 =
|
||||
Handle(Geom_ConicalSurface) aConSurface4 = new Geom_ConicalSurface(aCone4);
|
||||
Handle(Geom_RectangularTrimmedSurface) aConTrimmed4 =
|
||||
new Geom_RectangularTrimmedSurface(aConSurface4,0,2*PI,-300,300,Standard_True,Standard_True);
|
||||
drawSurface(aConTrimmed4);
|
||||
|
||||
|
@@ -199,7 +199,7 @@ void Extrema_Presentation::sampleCurveSur()
|
||||
TCollection_AsciiString aText(
|
||||
" // the curve - first object for finding the extrema." EOL
|
||||
" Handle(Geom_Curve) aCurve;" EOL
|
||||
" Handle_TColgp_HArray1OfPnt aPoles = new TColgp_HArray1OfPnt(1, 4);" EOL EOL
|
||||
" Handle(TColgp_HArray1OfPnt) aPoles = new TColgp_HArray1OfPnt(1, 4);" EOL EOL
|
||||
|
||||
" // points to build the curves" EOL
|
||||
" Standard_Real a[][3] = {{2,1,10},{0,12,0},{5,6,0},{0,10,11}}; " EOL EOL
|
||||
@@ -239,7 +239,7 @@ void Extrema_Presentation::sampleCurveSur()
|
||||
|
||||
// the curve - first object for finding the extrema.
|
||||
Handle(Geom_Curve) aCurve;
|
||||
Handle_TColgp_HArray1OfPnt aPoles = new TColgp_HArray1OfPnt(1, 4);
|
||||
Handle(TColgp_HArray1OfPnt) aPoles = new TColgp_HArray1OfPnt(1, 4);
|
||||
|
||||
// points to build the curves
|
||||
Standard_Real a[][3] = {{2,1,10},{0,12,0},{5,6,0},{0,10,11}};
|
||||
@@ -429,7 +429,7 @@ void Extrema_Presentation::sampleShellShell()
|
||||
" for (Standard_Integer j=0; j < 3; j++)" EOL
|
||||
" aSurPoles(i+1,j+1) = gp_Pnt (aSurCoords[i*3+j][0]*10-250, aSurCoords[i*3+j][1]*10-250, aSurCoords[i*3+j][2]*10-350);" EOL EOL
|
||||
|
||||
" Handle_Geom_BezierSurface aSurface = new Geom_BezierSurface(aSurPoles);" EOL EOL
|
||||
" Handle(Geom_BezierSurface) aSurface = new Geom_BezierSurface(aSurPoles);" EOL EOL
|
||||
|
||||
" // creating a TopoDS_Shell from Geom_Surface" EOL
|
||||
" TopoDS_Shell aShape2 = BRepBuilderAPI_MakeShell(aSurface);" EOL EOL
|
||||
@@ -473,7 +473,7 @@ void Extrema_Presentation::sampleShellShell()
|
||||
for (Standard_Integer j=0; j < 3; j++)
|
||||
aSurPoles(i+1,j+1) = gp_Pnt (aSurCoords[i*3+j][0]*10-250, aSurCoords[i*3+j][1]*10-250, aSurCoords[i*3+j][2]*10-350);
|
||||
|
||||
Handle_Geom_BezierSurface aSurface = new Geom_BezierSurface(aSurPoles);
|
||||
Handle(Geom_BezierSurface) aSurface = new Geom_BezierSurface(aSurPoles);
|
||||
|
||||
// creating a TopoDS_Shell from Geom_Surface
|
||||
TopoDS_Shell aShape2 = BRepBuilderAPI_MakeShell(aSurface);
|
||||
@@ -535,10 +535,10 @@ void Extrema_Presentation::doShapeShapeExtrema(const TopoDS_Shape& theShape1,
|
||||
{
|
||||
displayExtemaEdge(anExtrema.PointOnShape1(i), anExtrema.PointOnShape2(i));
|
||||
|
||||
Handle_AIS_Shape aSupportShape1 = new AIS_Shape(anExtrema.SupportOnShape1(i));
|
||||
Handle(AIS_Shape) aSupportShape1 = new AIS_Shape(anExtrema.SupportOnShape1(i));
|
||||
aSupportShape1->SetMaterial(Graphic3d_NOM_PLASTIC);
|
||||
aSupportShape1->SetColor(Quantity_NOC_GRAY97);
|
||||
Handle_AIS_Shape aSupportShape2 = new AIS_Shape(anExtrema.SupportOnShape2(i));
|
||||
Handle(AIS_Shape) aSupportShape2 = new AIS_Shape(anExtrema.SupportOnShape2(i));
|
||||
aSupportShape2->SetMaterial(Graphic3d_NOM_PLASTIC);
|
||||
aSupportShape2->SetColor(Quantity_NOC_GRAY97);
|
||||
getAISContext()->Display(aSupportShape1, Standard_False);
|
||||
|
@@ -241,7 +241,7 @@ Standard_Boolean GProps_Presentation::GProps(GProp_GProps& aProps,
|
||||
|
||||
if (WAIT_A_SECOND) return Standard_False;
|
||||
|
||||
Handle_AIS_Point aPointIO = drawPoint(
|
||||
Handle(AIS_Point) aPointIO = drawPoint(
|
||||
aCenterOfMass, MAIN_ELEMS_COLOR, Standard_False);
|
||||
aPointIO->UnsetMarker();
|
||||
aPointIO->SetMarker(Aspect_TOM_O);
|
||||
@@ -265,7 +265,7 @@ Standard_Boolean GProps_Presentation::GProps(GProp_GProps& aProps,
|
||||
}
|
||||
|
||||
// display the cirle with radius = aRadiusOfGyration
|
||||
Handle_Geom_Circle aCirc = new Geom_Circle(anInertialCoordSys, aRadiusOfGyration);
|
||||
Handle(Geom_Circle) aCirc = new Geom_Circle(anInertialCoordSys, aRadiusOfGyration);
|
||||
drawCurve(aCirc, CUSTOM_INERTIAL_ELEMS_COLOR);
|
||||
|
||||
return Standard_True;
|
||||
@@ -327,7 +327,7 @@ void GProps_Presentation::samplePoints()
|
||||
|
||||
//if (WAIT_A_SECOND) return;
|
||||
|
||||
Handle_AIS_Point aPointIO = drawPoint(
|
||||
Handle(AIS_Point) aPointIO = drawPoint(
|
||||
aBaryCentre, MAIN_ELEMS_COLOR, Standard_False);
|
||||
aPointIO->SetMarker(Aspect_TOM_STAR);
|
||||
getAISContext()->Display(aPointIO);
|
||||
@@ -373,7 +373,7 @@ void GProps_Presentation::sampleCurves()
|
||||
aPoints(i+1) = gp_Pnt (aCoords[i][0]*k, aCoords[i][1]*k, aCoords[i][2]*k);
|
||||
|
||||
// edge 2 is a bezier curve that starts in edge1's end point
|
||||
Handle_Geom_BezierCurve aCurve = new Geom_BezierCurve(aPoints);
|
||||
Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve(aPoints);
|
||||
TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge(aCurve);
|
||||
|
||||
// edge 1 is a linear edge between 2 points
|
||||
@@ -575,9 +575,9 @@ void GProps_Presentation::sampleSystem()
|
||||
for (Standard_Integer i=0; i < nPoints; i++)
|
||||
aPoints(i+1) = gp_Pnt (aCoords[i][0]*k, aCoords[i][1]*k, aCoords[i][2]*k);
|
||||
|
||||
Handle_Geom_BezierCurve aCurve = new Geom_BezierCurve(aPoints);
|
||||
Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve(aPoints);
|
||||
gp_Ax1 anAxis(aPoints(1), gp_Dir(0,1,0));
|
||||
Handle_Geom_SurfaceOfRevolution aSurface = new Geom_SurfaceOfRevolution(aCurve, anAxis);
|
||||
Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aCurve, anAxis);
|
||||
TopoDS_Solid aSolid = BRepBuilderAPI_MakeSolid(BRepBuilderAPI_MakeShell(aSurface));
|
||||
|
||||
TopoDS_Edge e1 = BRepBuilderAPI_MakeEdge(gp_Pnt(5*k, 2*k, 0), gp_Pnt(12*k, 7*k, 0));
|
||||
@@ -595,8 +595,8 @@ void GProps_Presentation::sampleSystem()
|
||||
aBuilder.Perform(aWing1, Standard_True);
|
||||
TopoDS_Face aWing2 = TopoDS::Face(aBuilder.Shape());
|
||||
|
||||
Handle_Geom_Circle aCirc = new Geom_Circle(gp_Ax2(gp_Pnt(3*k, 11*k, 0), gp_Dir(0,-0.2,0.8)), (12-3)*k);
|
||||
Handle_Geom_TrimmedCurve aTrimCirc = new Geom_TrimmedCurve(aCirc, -PI/2, PI/2);
|
||||
Handle(Geom_Circle) aCirc = new Geom_Circle(gp_Ax2(gp_Pnt(3*k, 11*k, 0), gp_Dir(0,-0.2,0.8)), (12-3)*k);
|
||||
Handle(Geom_TrimmedCurve) aTrimCirc = new Geom_TrimmedCurve(aCirc, -PI/2, PI/2);
|
||||
TopoDS_Edge aSpoiler = BRepBuilderAPI_MakeEdge(aTrimCirc);
|
||||
|
||||
TopoDS_Edge anArrow = BRepBuilderAPI_MakeEdge(gp_Pnt(3*k, 0, 0), gp_Pnt(3*k, -5*k, 0));
|
||||
|
@@ -95,7 +95,7 @@ void GeomConstraints_Presentation::DoSample()
|
||||
// Function creating Surface,BSPline,Bezier and 2dBSpline Curves
|
||||
//=========================================================================================
|
||||
|
||||
static Handle_Geom_BSplineCurve createBSplineCurve(const Standard_Integer nPoles,
|
||||
static Handle(Geom_BSplineCurve) createBSplineCurve(const Standard_Integer nPoles,
|
||||
const Standard_Real theCoords[][3])
|
||||
{
|
||||
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
|
||||
@@ -111,7 +111,7 @@ static Handle_Geom_BSplineCurve createBSplineCurve(const Standard_Integer nPoles
|
||||
}
|
||||
|
||||
|
||||
static Handle_Geom_BezierCurve createBezierCurve(const Standard_Integer nPoles,
|
||||
static Handle(Geom_BezierCurve) createBezierCurve(const Standard_Integer nPoles,
|
||||
const Standard_Real theCoords[][3])
|
||||
{
|
||||
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
|
||||
@@ -123,7 +123,7 @@ static Handle_Geom_BezierCurve createBezierCurve(const Standard_Integer nPoles,
|
||||
return aBCurve;
|
||||
}
|
||||
|
||||
static Handle_Geom2d_BSplineCurve battenCurve(const Standard_Real& theAngle1,
|
||||
static Handle(Geom2d_BSplineCurve) battenCurve(const Standard_Real& theAngle1,
|
||||
const Standard_Real& theAngle2)
|
||||
{
|
||||
//define points
|
||||
@@ -149,10 +149,10 @@ static Handle_Geom2d_BSplineCurve battenCurve(const Standard_Real& theAngle1,
|
||||
}
|
||||
|
||||
|
||||
static Handle_Geom_Surface createSurface(
|
||||
static Handle(Geom_Surface) createSurface(
|
||||
const Standard_Integer endBound,
|
||||
TColgp_Array1OfPnt& thePoint,
|
||||
const Handle_Geom_Plane& thePlane)
|
||||
const Handle(Geom_Plane)& thePlane)
|
||||
{
|
||||
Standard_Integer Degree = 3;
|
||||
Standard_Integer NbPtsOnCur = 10;
|
||||
@@ -630,7 +630,7 @@ void GeomConstraints_Presentation::sample3()
|
||||
}
|
||||
aFile.close();
|
||||
|
||||
Handle_AIS_InteractiveObject anIO,aNewIO;
|
||||
Handle(AIS_InteractiveObject) anIO,aNewIO;
|
||||
|
||||
for(Standard_Integer j = 1; j <= int(aSize / 20); j++)
|
||||
{
|
||||
|
@@ -168,9 +168,9 @@ void Glue_Presentation::sampleCylinder()
|
||||
TopoDS_Edge e4 = BRepBuilderAPI_MakeEdge(gp_Pnt(24,0,0),gp_Pnt(24,15,0));
|
||||
TopoDS_Edge e5 = BRepBuilderAPI_MakeEdge(gp_Pnt(24,15,0),gp_Pnt(0,15,0));
|
||||
TopoDS_Edge e6 = BRepBuilderAPI_MakeEdge(gp_Pnt(0,15,0),gp_Pnt(0,0,0));
|
||||
Handle_Geom_Circle e2C = new Geom_Circle(gp_Ax2(gp_Pnt(12,0,0), gp_Dir(0,0,1)), 7);
|
||||
Handle(Geom_Circle) e2C = new Geom_Circle(gp_Ax2(gp_Pnt(12,0,0), gp_Dir(0,0,1)), 7);
|
||||
e2C->Rotate(gp_Ax1(gp_Pnt(12,0,0),gp_Dir(0,0,1)),PI);
|
||||
Handle_Geom_TrimmedCurve e2A = new Geom_TrimmedCurve(e2C, PI, 2*PI);
|
||||
Handle(Geom_TrimmedCurve) e2A = new Geom_TrimmedCurve(e2C, PI, 2*PI);
|
||||
TopoDS_Edge e2 = BRepBuilderAPI_MakeEdge(e2A);
|
||||
|
||||
BRepBuilderAPI_MakeWire wireMaker(e1,e2,e3,e4);
|
||||
@@ -311,7 +311,7 @@ void Glue_Presentation::sampleMoreBoxes()
|
||||
// Purpose : display a shape in wire frame mode
|
||||
//================================================================
|
||||
Standard_Boolean Glue_Presentation::drawShapeWf(TopoDS_Shape& aShape,
|
||||
Handle_AIS_InteractiveObject& io)
|
||||
Handle(AIS_InteractiveObject)& io)
|
||||
{
|
||||
io = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
|
||||
getAISContext()->SetDisplayMode(io, AIS_WireFrame, Standard_False);
|
||||
@@ -325,7 +325,7 @@ Standard_Boolean Glue_Presentation::drawShapeWf(TopoDS_Shape& aShape,
|
||||
// Purpose : display a shape in shaded mode
|
||||
//================================================================
|
||||
Standard_Boolean Glue_Presentation::drawShapeSh(TopoDS_Shape& aShape,
|
||||
Handle_AIS_InteractiveObject& io)
|
||||
Handle(AIS_InteractiveObject)& io)
|
||||
{
|
||||
io = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
|
||||
getAISContext()->SetDisplayMode(io, AIS_Shaded, Standard_False);
|
||||
@@ -346,7 +346,7 @@ Standard_Boolean Glue_Presentation::displayShapesFaces(TopoDS_Shape& aShape1,
|
||||
TopTools_ListOfShape& aEdges1,
|
||||
TopTools_ListOfShape& aEdges2)
|
||||
{
|
||||
Handle_AIS_Shape io1,io2,io3,io4,io5,io6;
|
||||
Handle(AIS_Shape) io1,io2,io3,io4,io5,io6;
|
||||
if (!drawShapeSh(aShape1, io1)) return Standard_False;
|
||||
if (!drawShapeSh(aShape2, io2)) return Standard_False;
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
class GProp_Glue;
|
||||
class TCollection_AsciiString;
|
||||
class TopoDS_Shape;
|
||||
class Handle_AIS_InteractiveObject;
|
||||
class TopTools_ListOfShape;
|
||||
class AIS_InteractiveObject;
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
|
||||
class Glue_Presentation : public OCCDemo_Presentation
|
||||
{
|
||||
@@ -37,10 +37,10 @@ private:
|
||||
TopTools_ListOfShape&, TopTools_ListOfShape&);
|
||||
|
||||
// display a given shape in wire frame mode
|
||||
Standard_Boolean drawShapeWf(TopoDS_Shape&,Handle_AIS_InteractiveObject&);
|
||||
Standard_Boolean drawShapeWf(TopoDS_Shape&,Handle(AIS_InteractiveObject)&);
|
||||
|
||||
// display a given shape in shaded mode
|
||||
Standard_Boolean drawShapeSh(TopoDS_Shape&,Handle_AIS_InteractiveObject&);
|
||||
Standard_Boolean drawShapeSh(TopoDS_Shape&,Handle(AIS_InteractiveObject)&);
|
||||
|
||||
void sampleBoxes();
|
||||
void sampleCylinder();
|
||||
|
@@ -78,11 +78,11 @@ void HLR_Presentation::DoSample()
|
||||
// Purpose : returns Prs3d_Projector object created corresponding
|
||||
// to the current view parameters
|
||||
//================================================================
|
||||
Handle_Prs3d_Projector HLR_Presentation::Projector(gp_Trsf& theTrsf)
|
||||
Handle(Prs3d_Projector) HLR_Presentation::Projector(gp_Trsf& theTrsf)
|
||||
{
|
||||
// retrieve view parameters for creation of Prs3d_Projector object
|
||||
getViewer()->InitActiveViews();
|
||||
Handle_V3d_View aView = getViewer()->ActiveView();
|
||||
Handle(V3d_View) aView = getViewer()->ActiveView();
|
||||
|
||||
Standard_Real aProjVecX, aProjVecY, aProjVecZ;
|
||||
aView->Proj(aProjVecX, aProjVecY, aProjVecZ);
|
||||
@@ -93,7 +93,7 @@ Handle_Prs3d_Projector HLR_Presentation::Projector(gp_Trsf& theTrsf)
|
||||
Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;
|
||||
|
||||
// create a projector object
|
||||
Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0,
|
||||
Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0,
|
||||
aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);
|
||||
|
||||
gp_Pnt At (aPntX,aPntY,aPntZ);
|
||||
@@ -122,14 +122,14 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
|
||||
" // initializing aShape ..." EOL
|
||||
"" EOL
|
||||
" // Build The algorithm object" EOL
|
||||
" Handle_HLRBRep_Algo myAlgo = new HLRBRep_Algo();" EOL
|
||||
" Handle(HLRBRep_Algo) myAlgo = new HLRBRep_Algo();" EOL
|
||||
" " EOL
|
||||
" // Add Shapes into the algorithm" EOL
|
||||
" Standard_Real nbIso = 5; // number of isolines to display" EOL
|
||||
" myAlgo->Add(aShape, nbIso);" EOL
|
||||
"" EOL
|
||||
" // create a projector object" EOL
|
||||
" Handle_V3d_View aView;" EOL
|
||||
" Handle(V3d_View) aView;" EOL
|
||||
" // initializing V3d_View ..." EOL
|
||||
" " EOL
|
||||
" Standard_Real aProjVecX, aProjVecY, aProjVecZ;" EOL
|
||||
@@ -141,7 +141,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
|
||||
" Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;" EOL
|
||||
"" EOL
|
||||
" // create a projector object" EOL
|
||||
" Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
|
||||
" Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
|
||||
" aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);" EOL
|
||||
" " EOL
|
||||
" // Set The Projector" EOL
|
||||
@@ -189,7 +189,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
|
||||
" Isolines - YELLOW" EOL);
|
||||
|
||||
// Build The algorithm object
|
||||
Handle_HLRBRep_Algo myAlgo = new HLRBRep_Algo();
|
||||
Handle(HLRBRep_Algo) myAlgo = new HLRBRep_Algo();
|
||||
|
||||
// Add Shapes into the algorithm
|
||||
myAlgo->Add(aShape, nbIso);
|
||||
@@ -234,7 +234,7 @@ Standard_Boolean HLR_Presentation::HLR(const TopoDS_Shape& aShape, const Standar
|
||||
TopoDS_Shape OutLineHCompound = aHLRToShape.OutLineHCompound();
|
||||
TopoDS_Shape IsoLineHCompound = aHLRToShape.IsoLineHCompound();
|
||||
|
||||
Handle_AIS_Shape aShapeIO = drawShape(aShape);
|
||||
Handle(AIS_Shape) aShapeIO = drawShape(aShape);
|
||||
|
||||
if (WAIT_A_SECOND) return Standard_False;
|
||||
|
||||
@@ -268,13 +268,13 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
|
||||
" // triangulating aShape with BRepMesh::Mesh" EOL
|
||||
"" EOL
|
||||
" // Build The algorithm object" EOL
|
||||
" Handle_HLRBRep_PolyAlgo myPolyAlgo = new HLRBRep_PolyAlgo();" EOL
|
||||
" Handle(HLRBRep_PolyAlgo) myPolyAlgo = new HLRBRep_PolyAlgo();" EOL
|
||||
" " EOL
|
||||
" // Add Shapes into the algorithm" EOL
|
||||
" myPolyAlgo->Load(aShape);" EOL
|
||||
"" EOL
|
||||
" // create a projector object" EOL
|
||||
" Handle_V3d_View aView;" EOL
|
||||
" Handle(V3d_View) aView;" EOL
|
||||
" // initializing V3d_View ..." EOL
|
||||
" " EOL
|
||||
" Standard_Real aProjVecX, aProjVecY, aProjVecZ;" EOL
|
||||
@@ -286,7 +286,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
|
||||
" Standard_Real aPntX = 0.0, aPntY = 0.0, aPntZ = 0.0;" EOL
|
||||
"" EOL
|
||||
" // create a projector object" EOL
|
||||
" Handle_Prs3d_Projector aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
|
||||
" Handle(Prs3d_Projector) aProjector = new Prs3d_Projector(Standard_False, 0.0, " EOL
|
||||
" aProjVecX, aProjVecY, aProjVecZ, aPntX, aPntY, aPntZ, aUpX, aUpY, aUpZ);" EOL
|
||||
" " EOL
|
||||
" // Set The Projector" EOL
|
||||
@@ -328,7 +328,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
|
||||
" Isolines - YELLOW" EOL);
|
||||
|
||||
// Build The algorithm object
|
||||
Handle_HLRBRep_PolyAlgo myPolyAlgo = new HLRBRep_PolyAlgo();
|
||||
Handle(HLRBRep_PolyAlgo) myPolyAlgo = new HLRBRep_PolyAlgo();
|
||||
|
||||
// Add Shapes into the algorithm
|
||||
myPolyAlgo->Load(aShape);
|
||||
@@ -367,7 +367,7 @@ Standard_Boolean HLR_Presentation::PolyHLR(const TopoDS_Shape& aShape)
|
||||
TopoDS_Shape RgNLineHCompound = aPolyHLRToShape.RgNLineHCompound();
|
||||
TopoDS_Shape OutLineHCompound = aPolyHLRToShape.OutLineHCompound();
|
||||
|
||||
Handle_AIS_Shape aShapeIO = drawShape(aShape);
|
||||
Handle(AIS_Shape) aShapeIO = drawShape(aShape);
|
||||
|
||||
if (WAIT_A_SECOND) return Standard_False;
|
||||
|
||||
@@ -409,7 +409,7 @@ Standard_Boolean HLR_Presentation::drawHLR(TopoDS_Shape& aVShape,
|
||||
aVShape.Location(aLoc);
|
||||
|
||||
// create a look for a line according to aColor and aLineType
|
||||
Handle_AIS_Shape anIO = drawShape(aVShape, aColor, Standard_False);
|
||||
Handle(AIS_Shape) anIO = drawShape(aVShape, aColor, Standard_False);
|
||||
anIO->Attributes()->WireAspect()->SetTypeOfLine(Aspect_TOL_SOLID);
|
||||
|
||||
getAISContext()->Display(anIO, HShapeIsNull);
|
||||
@@ -420,7 +420,7 @@ Standard_Boolean HLR_Presentation::drawHLR(TopoDS_Shape& aVShape,
|
||||
aHShape.Location(aLoc);
|
||||
|
||||
// create a look for a line according to aColor and aLineType
|
||||
Handle_AIS_Shape anIO = drawShape(aHShape, aColor, Standard_False);
|
||||
Handle(AIS_Shape) anIO = drawShape(aHShape, aColor, Standard_False);
|
||||
anIO->Attributes()->WireAspect()->SetTypeOfLine(Aspect_TOL_DASH);
|
||||
|
||||
getAISContext()->Display(anIO);
|
||||
@@ -464,7 +464,7 @@ void HLR_Presentation::sampleTorus()
|
||||
Standard_Real MinorRadius = 10;
|
||||
|
||||
//make torus
|
||||
Handle_Geom_ToroidalSurface aTorSurface = new Geom_ToroidalSurface(anAx3, MajorRadius, MinorRadius);
|
||||
Handle(Geom_ToroidalSurface) aTorSurface = new Geom_ToroidalSurface(anAx3, MajorRadius, MinorRadius);
|
||||
TopoDS_Shell aShape = BRepBuilderAPI_MakeShell(aTorSurface);
|
||||
|
||||
Standard_Integer nbIso = 3;
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <OCCDemo_Presentation.h>
|
||||
class TopoDS_Shape;
|
||||
class Handle_Prs3d_Projector;
|
||||
class Prs3d_Projector;
|
||||
class gp_Trsf;
|
||||
class TopLoc_Location;
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
// one phase of iterations
|
||||
|
||||
private:
|
||||
Handle_Prs3d_Projector Projector(gp_Trsf& theTrsf);
|
||||
Handle(Prs3d_Projector) Projector(gp_Trsf& theTrsf);
|
||||
Standard_Boolean HLR(const TopoDS_Shape&, const Standard_Integer nbIso);
|
||||
Standard_Boolean PolyHLR(const TopoDS_Shape&);
|
||||
Standard_Boolean drawHLR(TopoDS_Shape&, TopoDS_Shape&, const TopLoc_Location&,
|
||||
|
@@ -70,7 +70,7 @@ void Interpol_Presentation::DoSample()
|
||||
// Output : vectors theTan, theNewTan.
|
||||
// Returns : false if failed, true if ok.
|
||||
//================================================================
|
||||
static Standard_Boolean calculateNewTangent(const Handle_Geom_BSplineCurve& anInterpolationCurve,
|
||||
static Standard_Boolean calculateNewTangent(const Handle(Geom_BSplineCurve)& anInterpolationCurve,
|
||||
gp_Pnt aPointOnCurve, gp_Vec& theTan, gp_Vec& theNewTan,
|
||||
Standard_Real angle)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
|
||||
" aNoPeriodInterpolate.Perform();" EOL
|
||||
" // check results" EOL
|
||||
" if (!aNoPeriodInterpolate.IsDone()) return;" EOL
|
||||
" Handle_Geom_BSplineCurve anInterpolationCurve = aNoPeriodInterpolate.Curve();" EOL EOL
|
||||
" Handle(Geom_BSplineCurve) anInterpolationCurve = aNoPeriodInterpolate.Curve();" EOL EOL
|
||||
|
||||
" //===================================" EOL
|
||||
" // Creating a constrained interpolation curve" EOL
|
||||
@@ -183,9 +183,9 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
|
||||
aNoPeriodInterpolate.Perform();
|
||||
// check results
|
||||
if (!aNoPeriodInterpolate.IsDone()) return;
|
||||
Handle_Geom_BSplineCurve anInterpolationCurve = aNoPeriodInterpolate.Curve();
|
||||
Handle(Geom_BSplineCurve) anInterpolationCurve = aNoPeriodInterpolate.Curve();
|
||||
|
||||
Handle_AIS_InteractiveObject aShowCurve = drawCurve(anInterpolationCurve);
|
||||
Handle(AIS_InteractiveObject) aShowCurve = drawCurve(anInterpolationCurve);
|
||||
if (WAIT_A_SECOND) return;
|
||||
|
||||
//===================================
|
||||
@@ -197,7 +197,7 @@ void Interpol_Presentation::interpolate (Standard_Real aCoords[][3],
|
||||
Standard_Real scaleVec = 1;
|
||||
aCopyFlags->Init(Standard_False);
|
||||
|
||||
Handle_AIS_InteractiveObject aShowTan;
|
||||
Handle(AIS_InteractiveObject) aShowTan;
|
||||
for (i = indexes.Lower(); i <= indexes.Upper(); i++)
|
||||
{
|
||||
gp_Pnt aPoint = aPnts->Value(indexes(i));
|
||||
|
@@ -11,10 +11,10 @@
|
||||
|
||||
#include <OCCDemo_Presentation.h>
|
||||
|
||||
class Handle_Geom_BSplineCurve;
|
||||
class Handle_TColgp_HArray1OfPnt;
|
||||
class TColStd_Array1OfInteger;
|
||||
class TColStd_Array1OfReal;
|
||||
class Geom_BSplineCurve;
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
class Interpol_Presentation : public OCCDemo_Presentation
|
||||
{
|
||||
|
@@ -70,7 +70,7 @@ void Intersections_Presentation::DoSample()
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
static Handle_Geom2d_BSplineCurve create2dBSplineCurve(const Standard_Integer thePoles,
|
||||
static Handle(Geom2d_BSplineCurve) create2dBSplineCurve(const Standard_Integer thePoles,
|
||||
const Standard_Real theCoords[][2])
|
||||
{
|
||||
TColgp_Array1OfPnt2d thePoints(1, thePoles);
|
||||
@@ -86,7 +86,7 @@ static Handle_Geom2d_BSplineCurve create2dBSplineCurve(const Standard_Integer th
|
||||
}
|
||||
|
||||
|
||||
static Handle_Geom_BSplineSurface createBSplineSurface(const Standard_Real theZCoords[],
|
||||
static Handle(Geom_BSplineSurface) createBSplineSurface(const Standard_Real theZCoords[],
|
||||
const Standard_Real theXStep,
|
||||
const Standard_Real theYStep,
|
||||
const Standard_Real theXBound,
|
||||
|