1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

..

28 Commits

Author SHA1 Message Date
vpa
af989e9d1d Draft implementation of LOD API in OCCT:
- implemented interfaces for LOD at OpenGl, Graphic3d and MeshVS levels;
- added LOD managers at Graphic3d and OpenGl levels;
- simple mechanism of LOD switching is implemented in LOD manager;
- distance to COG metric is temporarily used;
- the metric could be redefined using custom LOD selectors;
- LODs are added to MeshVS_Mesh in Compute method and are listed as its data sources;
- added commands meshgenlod and meshlod to generate LODs for mesh and its topological representation
  and bind them to its OpenGl structures.
2015-12-08 10:18:27 +03:00
abv
92efcf78a6 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
2015-12-04 14:15:06 +03:00
abv
f5f4ebd07b 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
Restored possibility to have out-of-line implementation of DynamicCast() and STANDART_TYPE():
- Macro STANDARD_TYPE() now resolves to function get_type_descriptor() of the class
- Macro DEFINE_STANDARD_RTTI is replaced by two variants:
  - DEFINE_STANDARD_RTTI_INLINE works as before, defining DynamicCast() and get_type_descriptor() as inline functions
  - DEFINE_STANDARD_RTTIEXT declares DynamicCast() and get_type_descriptor() as exported
- Macro IMPLEMENT_STANDARD_RTTIEXT provides definition of DynamicCast() and get_type_descriptor() for a class

Upgrade script amended to replace DEFINE_STANDARD_RTTI by pair of DEFINE_STANDARD_RTTIEXT / IMPLEMENT_STANDARD_RTTIEXT if source file with the same name as header is found in the same folder, and by DEFINE_STANDARD_RTTI_INLINE if either source is not found or class is defined in the source (i.e. not in header)

Upgrade tool improved to recognize include statements with path prefix, like #include <occt/gp_Pnt.hxx>
Code corrected to eliminate warnings reported by upgrade tool.
Template of CXX file for testing upgrade tool added.

Documentation of upgrade procedure updated.
2015-12-04 13:57:58 +03:00
ika
6595eee796 0026859: Export of GDT from XCAF to STEP
Export/Import:
Add export of dimensions, geometric tolerances and datums, according to AP242.
Add missing STEP entities.
Corrections.

XCAF:
Add new attributes to Datum object: DatumTargetNumber.
Supplement enum XCAFDimTolObjects_GeomToleranceZoneModif.
Corrections.

Test cases:
gdt export A1
gdt export A2
gdt export A3
gdt export A4
gdt export A5
2015-12-04 13:16:58 +03:00
nbv
4e14c88f77 0026431: Can't cut a sphere from a cylinder
This branch contains fixes for 26675 and 26431 bugs.

1. Normalization has been eliminated.
2. Interfaces of AppDef_Compute::Parametrization(...) and BRepAlgo_BooleanOperations::SetApproxParameters() methods have been changed.
3. Overloaded methods for ApproxInt_Approx::SetParameters(...), TopOpeBRepTool_GeomTool::GetTolerances(...) and TopOpeBRepTool_GeomTool::SetTolerances(...) have been removed (because some fields of these classes are not used more).
4. Comments for some methods have been changed in BRepApprox_TheMultiLineOfApprox.hxx and GeomInt_TheMultiLineOfWLApprox.hxx files.
5. Some fields have been deleted from ApproxInt_MultiLine class. Kept members have become constant.
6. Interface of ksection DRAW-command has been changed.
7. Now, 2dintersect DRAW-command prints information about found segments.
8. Some code fragments have been rewritten to make them easier.
9. Algorithm of splitting WLine, which goes through pole of sphere has been improved.
10. Improve approximation algorithm in order to it will compute correct 2D- and 3D-tangent at the end of bezier constraints (including case when curve goes through or finishes on singular points).
11. Interface of IntPatch_WLine::Dump(...) method has been corrected.
12. Some methods for working with Walking-line are made more universal (available for both GeomInt and IntTools packages).
13. Problem in BRepLib::SameParameter(...) method has been fixed (see corresponding comment).
14. Small correction in Draft package.
15. Any outputs in IntPatch_Intersection::Dump(...) method have become disabled because they are useless. If anybody need in this outputs he/she will correct this method himself/herself.

Adjusting some test cases according to their new behavior.
Creation of new test cases.

----------------------------------------------------------------------------------------------------------------------------

Some explanation of new behavior of some test cases:

 1. Regressions:

a) blend simple X4
The problem is described in the issue #0026740. According to this description,  the result on the current MASTER seems to be wrong indeed.

b) boolean bcommon_complex C7 and boolean bcut_complex Q1
These test case use same shapes with different Boolean operation (COMMON and CUT). They are already BAD (on the MASTER). Now, some sub-shapes have become not-shared, simply. In my opinion, we shall apply new behavior of these tests.

c) boolean bsection M3
The problem described in the issue #0026777 exists even on the current MASTER.

d) boolean bsection M9
The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=26815#c47546. Here, we have really regression in the picture.

e) boolean bsection N2

The problem is described in issue #0026814.

f) boolean volumemaker G1

The problem is described in issue #26020.

g) bugs modalg_1 bug1255 (and bug1255_1)

The problem is described in issue #26815.

h) bugs modalg_2 bug5805_18, bugs modalg_2 bug5805_42, bugs modalg_2 bug5805_46

The problem is described in issue #25925.

i) bugs modalg_3 bug602

The problem is describes in issue #602.

j) bugs modalg_5 bug24915

The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=25929#c48565. It is not fixed by this issue.

k) bugs modalg_5 bug25838

The main reason is described in issue #0026816.

----------------------------------------------------------------------------
2. Improvements:

a) boolean volumemaker F9
b) bugs modalg_1 bug10160_3
c) bugs modalg_2 bug22557
d) bugs modalg_5 bug25319_1 (_2)
e) draft angle G2
f) offset shape A1
g) offset with_intersect_80 N7
2015-12-04 13:15:04 +03:00
aml
f44aa19760 0025929: Make Approx_ComputeLine algorithm adaptive
Adaptive partition algorithm of WLine is implemented and used in ApproxInt_Approx.gxx file.
Refactoring of ApproxInt_Approx class.
Test cases are updated to the new behaviour.

Filtering algorithm improved.
2015-12-04 13:12:09 +03:00
abv
600f8c7f47 CSF_TBB added for toolkits that need to link to TBB 2015-12-04 13:03:51 +03:00
ski
0e617b05e7 0026902: Configuration, CMake - tests is not installed after definition INSTALL_OCCT_TEST_CASES option
Variables responsible for installation of tests and samples were renamed
2015-12-04 13:03:47 +03:00
mgn
586db386eb 0026922: Huge performance issue writing data to the output stream
Test case for issue CR26922

Correction of literal (char to string)
2015-12-04 13:03:41 +03:00
kgv
cc6852f3e9 0026940: Visualization, TKOpenGl - capping plane should be applied to connected structures
OpenGl_Structure::Render(), OpenGl_CappingAlgo::RenderCapping() - render
groups of instanced and this structure in the same manner
using ::renderGeometry() and ::renderClosedGeometry() instead of ::DrawGroups().
Skip capping algo for structures without groups of closed primitives.
2015-12-04 13:03:28 +03:00
azv
d660a72aca 0026838: Using GeomEvaluators for calculation of values of curves
1. Implemented evaluators for 2D and 3D offset curves
2. Removed obsolete namespace CSLib_Offset

Update of UDLIST (adding no-cdl-pack Geom2dEvaluator)

Update TKG2d/CMakeLists.txt after rebase

Correction compilation in debug mode
2015-11-27 11:49:40 +03:00
apl
badc9305ae 0026658: Unexpected selection in the context using a selection filter.
Method AIS_LocalContext::ClearOutdatedSelection() fixed. Now it chooses "mylastindex" value from list of filtered detected owners. The topmost detected owner will be highlighted if the current detected owner was cleared as outdated.

BUC26658 command to check the bug fix in DRAW.

append a test script to automatically check the bug in DRAW.

warnings correction.
2015-11-27 10:20:34 +03:00
apl
97f937cc55 0026792: Visualization, Graphic3d - Z-fit support for transform persistence is missing after removing Visual3d_View
Add missing code for z-fit support for zoom, rotate persistent object.
Fixed wrong statement that should enable frustum culling optimization for zoom, rotate persistent object.
Fixed BVH_LinearBuilder.lxx to correctly control number of items in leaf node for a case of items with equal bounding boxes.
Added non-regression test case for z-clipping of transform persistent objects.
2015-11-27 10:18:12 +03:00
azv
c8b5b3d89e 0023620: Follow up of 0022939 - make Bezier curve/surface evaluation thread-safe
1. Remove cache from Geom_BezierCurve, Geom2d_BezierCurve and Geom_BezierSurface
2. Add cache for Bezier curves into GeomAdaptor_Curve, Geom2dAdaptor_Curve and GeomAdaptor_Surface
3. Update comments in corresponding cache classes
4. Avoid frequent down-casting to B-splines in adaptors
2015-11-27 10:08:50 +03:00
azv
525ec87c53 0026914: [Regression 7.0alpha] Hang in surface approximation
Change a constructor of evaluator for offset surfaces

Test-case for issue #26914
2015-11-27 10:08:45 +03:00
ika
5371131494 0026451: Crash importing STeP file
Add check for NULL.
2015-11-27 10:08:40 +03:00
kgv
b128c89231 0026915: Visualization - return Handle from Graphic3d_CView::FBOCreate() instead of a pointer
OpenGl_View::FBO() - use copy Handle constructor for compatibility.
2015-11-27 10:08:35 +03:00
osa
6bd94e0de9 0026348: Visualization, TKOpenGl - eliminate invalid NULL checks for transformation matrix
Graphic3d_CStructure::Transformation - use Graphic3d_Mat4 instead of plain arrays.
Drop duplicating field OpenGl_Structure::myTransformation (copy of Graphic3d_CStructure::Transformation).
Drop unused property Graphic3d_CStructure::Composition and Graphic3d_Structure::Composition().
2015-11-27 10:08:30 +03:00
vro
f486f64d86 0026005: Problem with transient TFunction_Logbook 2015-11-27 10:08:24 +03:00
azv
8156ddddc7 0026897: BRepBuilderAPI_Copy does not copy polygons
1. Implemented copying for 3D polygons and polygons on surfaces
2. Added test case bugs/modalg_6/bug26897
2015-11-27 10:08:18 +03:00
isk
fbef84f9eb 0026891: Visualization, TKOpenGl - define more texture types within OpenGl_TextureFormatSelector 2015-11-27 10:08:13 +03:00
vpa
95081657f1 0026905: Visualization - cosmetic fixes in selection methods of AIS_InteractiveContext
- selection mode in AIS_InteractiveContext::AddOrRemoveSelected is corrected;
- AIS_InteractiveContext::IsSelected returns object's state instead of global status.
2015-11-27 10:08:08 +03:00
azv
6a2ee09493 0026871: [Regression in 6.9.0] Projecting a curve hangs inside Approx_FitAndDivide2d
Fix checking of B-spline parametrization speed

Test case for issue CR26871
2015-11-27 10:08:03 +03:00
nbv
ce48b00930 0026884: Cylinder/Cylinder intersection algorithm throws an exception
Check, if cylinder axes are parallel is made more carefully.
This check is brought to conformity with check if axes are parallel (see constructor AxeOperator::AxeOperator(...) in IntAna_QuadQuadGeo.cxx file)

Test case for issue CR26884
2015-11-26 12:05:36 +03:00
rkv
c16915c713 0026625: Possible wrong use of vtkSmartPointer<T> in IVtkVTK_ShapeData.cxx
Use vtkSmartPointer<XXX>::New() instead of XXX::New() when initializing fields of vtkSmartPointer<XXX> types.
2015-11-26 12:02:09 +03:00
aba
4d147bf2a7 0025549: Visualization - do not crash on attempt to display the Angle dimension between two parallel lines
- Handle cases of 0 and Pi angle depending on lines in edges and end points

Draw arcs in accordance with input normal for minimum angle, check correctness of input circle parameters
2015-11-26 11:59:30 +03:00
bugmaster
bd485d9691 Redirection of generation reference documentation from source files 2015-11-24 16:36:34 +03:00
bugmaster
31dfc19fcb Copy env.bat file from adm/templates 2015-11-24 16:11:22 +03:00
632 changed files with 20440 additions and 12100 deletions

View File

@@ -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()

View File

@@ -431,3 +431,4 @@ n IVtkTools
t TKIVtk
n IVtkDraw
t TKIVtkDraw
n Geom2dEvaluator

View File

@@ -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")

View File

@@ -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]

View File

@@ -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

View 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();

View File

@@ -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.

View File

@@ -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
~~~~~

View File

@@ -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"

View File

@@ -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"

View File

@@ -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;
};

View File

@@ -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;
};

View File

@@ -18,7 +18,6 @@
#include <android/log.h>
IMPLEMENT_STANDARD_HANDLE (OcctJni_MsgPrinter, Message_Printer)
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_MsgPrinter, Message_Printer)
// =======================================================================

View File

@@ -53,7 +53,7 @@ private:
public:
DEFINE_STANDARD_RTTI(OcctJni_MsgPrinter)
DEFINE_STANDARD_RTTIEXT(OcctJni_MsgPrinter,Message_Printer)
};

View File

@@ -13,5 +13,4 @@
#include <OcctJni_Window.hxx>
IMPLEMENT_STANDARD_HANDLE (OcctJni_Window, Aspect_Window)
IMPLEMENT_STANDARD_RTTIEXT(OcctJni_Window, Aspect_Window)

View File

@@ -97,7 +97,7 @@ private:
public:
DEFINE_STANDARD_RTTI(OcctJni_Window)
DEFINE_STANDARD_RTTIEXT(OcctJni_Window,Aspect_Window)
};

View File

@@ -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 ;

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();

View File

@@ -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

View 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) ;

View File

@@ -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) {

View File

@@ -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

View File

@@ -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;
};

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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:

View File

@@ -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);

View File

@@ -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);

View File

@@ -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));

View File

@@ -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++)
{

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;

View File

@@ -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&,

View File

@@ -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));

View File

@@ -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
{

View File

@@ -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,

View File

@@ -145,7 +145,7 @@ void LProps_Presentation::sampleBezierSurface()
sizeof(aPoints)/(sizeof(Standard_Real)*2), aPoints);
}
void LProps_Presentation::showCurveLProps (Handle_Geom_Curve theCurve,
void LProps_Presentation::showCurveLProps (Handle(Geom_Curve) theCurve,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[])
@@ -283,7 +283,7 @@ void LProps_Presentation::showCurveLProps (Handle_Geom_Curve theCurve,
}
}
void LProps_Presentation::showSurfaceLProps (Handle_Geom_Surface theSurface,
void LProps_Presentation::showSurfaceLProps (Handle(Geom_Surface) theSurface,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[][2])

View File

@@ -31,13 +31,13 @@ private:
void samplePBSpline();
void sampleBezierSurface();
void showCurveLProps (Handle_Geom_Curve theCurve,
void showCurveLProps (Handle(Geom_Curve) theCurve,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[]);
// Draws the curve, shows local properties and updates the result dialog
void showSurfaceLProps (Handle_Geom_Surface theSurface,
void showSurfaceLProps (Handle(Geom_Surface) theSurface,
const Standard_CString theName,
const Standard_Integer theNbPoints,
const Standard_Real thePoints[][2]);

View File

@@ -316,7 +316,7 @@ void Offset2d_Presentation::sampleWire2()
drawAndOffsetWire (aWire, aName, aText);
}
void Offset2d_Presentation::drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
void Offset2d_Presentation::drawAndOffsetCurve2d (Handle(Geom2d_Curve) theCurve,
const Standard_CString theName,
TCollection_AsciiString& theText)
{
@@ -339,7 +339,7 @@ void Offset2d_Presentation::drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
getViewer()->ActiveView()->Update();
// Make offset curves
Handle_AIS_InteractiveObject aObj;
Handle(AIS_InteractiveObject) aObj;
for (int i=1; i <= SampleDescrs[myIndex].nNeg; i++)
{
if (WAIT_A_LITTLE)
@@ -381,7 +381,7 @@ void Offset2d_Presentation::drawAndOffsetWire(const TopoDS_Wire& theWire,
setResultText (theText.ToCString());
// Display theWire
Handle_AIS_InteractiveObject aObj = new AIS_Shape (theWire);
Handle(AIS_InteractiveObject) aObj = new AIS_Shape (theWire);
getAISContext()->SetColor (aObj, CurveColor);
getAISContext()->Display (aObj);
getViewer()->InitActiveViews();

View File

@@ -36,7 +36,7 @@ private:
void sampleWire1();
void sampleWire2();
void drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
void drawAndOffsetCurve2d (Handle(Geom2d_Curve) theCurve,
const Standard_CString theName,
TCollection_AsciiString& theText);
void drawAndOffsetWire (const TopoDS_Wire& theWire,

View File

@@ -78,7 +78,7 @@ void PointOnCurve_Presentation::DoSample()
// Purpose : creating a BSpline Curve
//================================================================
static Handle_Geom_BSplineCurve CreateCurve()
static Handle(Geom_BSplineCurve) CreateCurve()
{
Standard_Real aCoords[][3] =
{
@@ -196,7 +196,7 @@ void PointOnCurve_Presentation::sample1()
gce_MakeLin aLin(aPoint1, aPoint2);
Standard_Real aParam = aPoint1.Distance(aPoint2);
Handle_Geom_TrimmedCurve aSeg = new Geom_TrimmedCurve(new Geom_Line(aLin), 0, aParam);
Handle(Geom_TrimmedCurve) aSeg = new Geom_TrimmedCurve(new Geom_Line(aLin), 0, aParam);
drawCurve(aSeg, Quantity_NOC_GREEN1);
}
if (WAIT_A_LITTLE) return;

View File

@@ -10,7 +10,7 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class Handle_Geom_Curve;
class Geom_Curve;
class PointOnCurve_Presentation : public OCCDemo_Presentation
{
@@ -18,8 +18,8 @@ public:
// Construction
PointOnCurve_Presentation();
private:
Handle_AIS_InteractiveObject PointOnCurve_Presentation::DrawCurve (
Handle_Geom_Curve theCurve, Quantity_NameOfColor theColor);
Handle(AIS_InteractiveObject) PointOnCurve_Presentation::DrawCurve (
Handle(Geom_Curve) theCurve, Quantity_NameOfColor theColor);
public:
// Iteration on samples

View File

@@ -73,7 +73,7 @@ Projection_Presentation::Projection_Presentation()
// Function : createCurve
// Purpose : returns a BSpline curve with 10 poles
//================================================================
static Handle_Geom_BSplineCurve createCurve()
static Handle(Geom_BSplineCurve) createCurve()
{
Standard_Real aCoords[][3] = {{-6,3,0},{-5,1,0},{-4,0,0},{-2,1,0},{-1,-1,0},
{0,-1,0},{1,0,0},{2,2,0},{3,1,0},{4,0,0}};
@@ -95,7 +95,7 @@ static Handle_Geom_BSplineCurve createCurve()
// Function : createSurface
// Purpose : returns a BSpline Surface with 8 poles
//================================================================
static Handle_Geom_BSplineSurface createSurface()
static Handle(Geom_BSplineSurface) createSurface()
{
// define points array
TColgp_Array2OfPnt aPoints (1,2,1,4);
@@ -244,7 +244,7 @@ void Projection_Presentation::sample2()
" gp_Dir aDir(0,0,1);" EOL
" gp_Ax3 anAx3(aCenterPoint, aDir);" EOL
" Standard_Real Radius = 300;" EOL
" Handle_Geom_CylindricalSurface aCylSurface =" EOL
" Handle(Geom_CylindricalSurface) aCylSurface =" EOL
" new Geom_CylindricalSurface(anAx3, Radius);" EOL
"" EOL
" // projection of a point onto a surface" EOL
@@ -277,7 +277,7 @@ void Projection_Presentation::sample2()
gp_Dir aDir(0,0,1);
gp_Ax3 anAx3(aCenterPoint, aDir);
Standard_Real Radius = 300;
Handle_Geom_CylindricalSurface aCylSurface =
Handle(Geom_CylindricalSurface) aCylSurface =
new Geom_CylindricalSurface(anAx3, Radius);
// projection of a point onto a surface
@@ -314,7 +314,7 @@ void Projection_Presentation::sample2()
if(WAIT_A_LITTLE) return;
// output cylindrical surface
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
new Geom_RectangularTrimmedSurface(aCylSurface,0,2*PI,-200,300,Standard_True,Standard_True);
drawSurface(aCylTrimmed);
@@ -352,21 +352,21 @@ void Projection_Presentation::sample3()
" // define a planar surface" EOL
" gp_Pnt aPlanePnt(0,0,-100);" EOL
" gp_Dir aPlaneDir(0,0,1);" EOL
" Handle_Geom_Plane aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);" EOL
" Handle(Geom_Plane) aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);" EOL
"" EOL
" // create a cylindrical surface" EOL
" gp_Pnt aCylPnt(-100,0,550);" EOL
" gp_Dir aCylDir(0,1,0);" EOL
" gp_Ax3 anAx3(aCylPnt, aCylDir);" EOL
" Standard_Real aRadius = 800;" EOL
" Handle_Geom_CylindricalSurface aCylSurface = " EOL
" Handle(Geom_CylindricalSurface) aCylSurface = " EOL
" new Geom_CylindricalSurface(anAx3, aRadius);" EOL
"" EOL
" // Projection of a curve onto a planar surface" EOL
" Handle_Geom_Curve aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);" EOL
" Handle(Geom_Curve) aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);" EOL
"" EOL
" // Projection of a curve onto a cylindrical surface" EOL
" Handle_Geom_Curve aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);" EOL
" Handle(Geom_Curve) aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);" EOL
);
// create BSpline curve
@@ -378,21 +378,21 @@ void Projection_Presentation::sample3()
// define a planar surface
gp_Pnt aPlanePnt(0,0,-100);
gp_Dir aPlaneDir(0,0,1);
Handle_Geom_Plane aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);
Handle(Geom_Plane) aPlane = new Geom_Plane(aPlanePnt, aPlaneDir);
// create a cylindrical surface
gp_Pnt aCylPnt(-100,0,550);
gp_Dir aCylDir(0,1,0);
gp_Ax3 anAx3(aCylPnt, aCylDir);
Standard_Real aRadius = 800;
Handle_Geom_CylindricalSurface aCylSurface =
Handle(Geom_CylindricalSurface) aCylSurface =
new Geom_CylindricalSurface(anAx3, aRadius);
// Projection of a curve onto a planar surface
Handle_Geom_Curve aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);
Handle(Geom_Curve) aPlaneProjCurve = GeomProjLib::Project(aCurve, aPlane);
// Projection of a curve onto a cylindrical surface
Handle_Geom_Curve aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);
Handle(Geom_Curve) aCylProjCurve = GeomProjLib::Project(aCurve, aCylSurface);
// ===== output ===========
// output original curve
@@ -417,7 +417,7 @@ void Projection_Presentation::sample3()
getAISContext()->Erase(aProjCurveIO, Standard_False);
// output the second surface - cylindrical surface
Handle_Geom_RectangularTrimmedSurface aCylTrimmed =
Handle(Geom_RectangularTrimmedSurface) aCylTrimmed =
new Geom_RectangularTrimmedSurface(aCylSurface,PI/2,-PI/2,-450,550,Standard_True,Standard_True);
Handle(AIS_InteractiveObject) aCylIO = drawSurface(
aCylTrimmed, Quantity_Color(Quantity_NOC_YELLOW), Standard_False);

View File

@@ -98,7 +98,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;" EOL
"" EOL
" // takes the triangulation of the face aFace" EOL
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL
"" EOL
" if(!aTr.IsNull())" EOL
" { " EOL
@@ -224,7 +224,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
" TopoDS_Face aFace;" EOL
" B.MakeFace(aFace, aSurf, Precision::Confusion());" EOL
" B.Add(aFace, aWire);" EOL
" Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);" EOL
" Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);" EOL
" sfs->Perform();" EOL
" TopoDS_Shape aFixedFace = sfs->Shape();" EOL
" if (aFixedFace.IsNull()) " EOL
@@ -251,7 +251,7 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
TopLoc_Location aLocation;
// takes the triangulation of the face aFace
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -377,14 +377,14 @@ void Simplify_Presentation::simplify(const TopoDS_Shape& aShape)
TopoDS_Face aFace;
B.MakeFace(aFace, aSurf, Precision::Confusion());
B.Add(aFace, aWire);
Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);
sfs->Perform();
TopoDS_Shape aFixedFace = sfs->Shape();
if (aFixedFace.IsNull())
return;
// output surface, make it half transparent
Handle_AIS_InteractiveObject aSurfIO = drawSurface(
Handle(AIS_InteractiveObject) aSurfIO = drawSurface(
aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False);
aSurfIO->SetTransparency(0.5);
getAISContext()->Display(aSurfIO, Standard_False);

View File

@@ -76,7 +76,7 @@ void Sweep_Presentation::DoSample()
// Auxiliary functions
//////////////////////////////////////////////////////////////////////
static Handle_Geom_Curve mkBezierCurve(const Standard_Integer nPoles,
static Handle(Geom_Curve) mkBezierCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3],
const Standard_Real aScale = 1,
const gp_XYZ& aShift = gp_XYZ(0,0,0))
@@ -90,7 +90,7 @@ static Handle_Geom_Curve mkBezierCurve(const Standard_Integer nPoles,
return new Geom_BezierCurve (aPoles);
}
static Handle_Geom_Curve mkPBSplineCurve(const Standard_Integer nPoles,
static Handle(Geom_Curve) mkPBSplineCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][3],
const Standard_Real aScale = 1,
const gp_XYZ& aShift = gp_XYZ(0,0,0))
@@ -111,7 +111,7 @@ static Handle_Geom_Curve mkPBSplineCurve(const Standard_Integer nPoles,
return new Geom_BSplineCurve (aPoles, aKnots, aMults, 3, Standard_True);
}
static Handle_Geom2d_Curve mk2dBezierCurve(const Standard_Integer nPoles,
static Handle(Geom2d_Curve) mk2dBezierCurve(const Standard_Integer nPoles,
const Standard_Real theCoords[][2],
const Standard_Real aScale = 1,
const gp_XY& aShift = gp_XY(0,0))
@@ -139,7 +139,7 @@ static TopoDS_Wire mkPolygonWire(const Standard_Integer nPoints,
return aPol.Wire();
}
static Handle_Geom_Curve mkCurve1()
static Handle(Geom_Curve) mkCurve1()
{
Standard_Real aCoords[][3] = {
{0,0,0},{0,0,10},{0,10,10},{0,10,20}
@@ -148,7 +148,7 @@ static Handle_Geom_Curve mkCurve1()
return mkBezierCurve (nPoles, aCoords);
}
static Handle_Geom_Curve mkCurve2()
static Handle(Geom_Curve) mkCurve2()
{
Standard_Real aCoords[][3] = {
{0,0,0},{10,0,0},{20,10,12},{25,30,20},{50,40,50}
@@ -157,7 +157,7 @@ static Handle_Geom_Curve mkCurve2()
return mkBezierCurve (nPoles, aCoords);
}
static Handle_Geom_Curve mkCurve3()
static Handle(Geom_Curve) mkCurve3()
{
Standard_Real aCoords[][3] = {
{50,40,50},{70,30,30},{90,20,20},{100,50,0}
@@ -166,7 +166,7 @@ static Handle_Geom_Curve mkCurve3()
return mkBezierCurve (nPoles, aCoords);
}
static Handle_Geom2d_Curve mk2dCurve1()
static Handle(Geom2d_Curve) mk2dCurve1()
{
Standard_Real aCoords[][2] = {
{0,0},{0.3,0},{0.1,0.5},{0.3,0.6},{0.6,0.5}
@@ -175,7 +175,7 @@ static Handle_Geom2d_Curve mk2dCurve1()
return mk2dBezierCurve (nPoles, aCoords);
}
static Handle_Geom_Surface mkSurface1()
static Handle(Geom_Surface) mkSurface1()
{
Standard_Real aCoords[3][3][3] = {
{{-10,-10,-30},{-10,50,40},{-10,70,-20}},
@@ -292,9 +292,9 @@ static TopoDS_Wire mkWire9()
}
Handle_AIS_InteractiveObject Sweep_Presentation::drawCurveOnSurface
(const Handle_Geom2d_Curve& aC2d,
const Handle_Geom_Surface& aSurf,
Handle(AIS_InteractiveObject) Sweep_Presentation::drawCurveOnSurface
(const Handle(Geom2d_Curve)& aC2d,
const Handle(Geom_Surface)& aSurf,
const Quantity_Color& aColor)
{
Handle(Geom2dAdaptor_HCurve) aHC = new Geom2dAdaptor_HCurve(aC2d);

View File

@@ -10,8 +10,8 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class Handle_Geom2d_Curve;
class Handle_Geom_Surface;
class Geom2d_Curve;
class Geom_Surface;
class Sweep_Presentation : public OCCDemo_Presentation
{
@@ -24,9 +24,9 @@ public:
virtual void DoSample();
// one phase of iterations
Handle_AIS_InteractiveObject drawCurveOnSurface
(const Handle_Geom2d_Curve& aC2d,
const Handle_Geom_Surface& aSurf,
Handle(AIS_InteractiveObject) drawCurveOnSurface
(const Handle(Geom2d_Curve)& aC2d,
const Handle(Geom_Surface)& aSurf,
const Quantity_Color& aColor);
private:

View File

@@ -123,7 +123,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;" EOL EOL
" // takes the triangulation of the face aFace:" EOL
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
" if(!aTr.IsNull()) // if this triangulation is not NULL" EOL
" { " EOL
@@ -161,7 +161,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
" if(!aEdge.IsNull()) // if this edge is not NULL" EOL
" {" EOL
" // takes the polygon associated to the edge aEdge:" EOL
" Handle_Poly_PolygonOnTriangulation aPol = " EOL
" Handle(Poly_PolygonOnTriangulation) aPol = " EOL
" BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());" EOL EOL
" if(!aPol.IsNull()) // if this polygon is not NULL" EOL
@@ -197,7 +197,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
Standard_Integer aNumOfNodes = 0;
Standard_Integer aNumOfTriangles = 0;
Handle_AIS_InteractiveObject aShowEdge,aShowFace,aShowShape;
Handle(AIS_InteractiveObject) aShowEdge,aShowFace,aShowShape;
TopExp_Explorer aExpFace,aExpEdge;
@@ -208,7 +208,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());
TopLoc_Location aLocation;
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -232,7 +232,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
if(!aEdge.IsNull())
{
Handle_Poly_PolygonOnTriangulation aPol =
Handle(Poly_PolygonOnTriangulation) aPol =
BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());
if(!aPol.IsNull())

View File

@@ -83,7 +83,7 @@ void Textures_Presentation::Init()
{
// initialize v3d_view so it displays textures well
getViewer()->InitActiveViews();
Handle_V3d_View aView = getViewer()->ActiveView();
Handle(V3d_View) aView = getViewer()->ActiveView();
aView->SetSurfaceDetail(V3d_TEX_ALL);
aView->SetSize(ZVIEW_SIZE);
@@ -95,7 +95,7 @@ void Textures_Presentation::Init()
" // aShape = ..." EOL
"" EOL
" // create a textured presentation object for aShape" EOL
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
"" EOL
" TCollection_AsciiString aTFileName;" EOL
"" EOL
@@ -142,12 +142,12 @@ void Textures_Presentation::Init()
//================================================================
void Textures_Presentation::lightsOnOff(Standard_Boolean isOn)
{
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
if (isOn)
{
@@ -184,7 +184,7 @@ Standard_Boolean Textures_Presentation::displayTextured(const TopoDS_Shape& aSha
Standard_Integer nRepeat)
{
// create a textured presentation object for aShape
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
// load texture from file if it is not an integer value
// integer value indicates a number of texture in predefined textures enumeration
@@ -209,7 +209,7 @@ Standard_Boolean Textures_Presentation::displayTextured(const TopoDS_Shape& aSha
{
lightsOnOff(Standard_False);
Handle_AIS_Shape aAisShape = drawShape(aShape/*, Quantity_NOC_WHITE*/);
Handle(AIS_Shape) aAisShape = drawShape(aShape/*, Quantity_NOC_WHITE*/);
if (WAIT_A_SECOND) return Standard_False;
getAISContext()->Erase(aAisShape, Standard_False);
}
@@ -391,7 +391,7 @@ void Textures_Presentation::samplePredefTexture2()
Standard_Real aXStep = 250, aYStep = 250;
Standard_Real aXBound = -450, aYBound = -300;
Handle_Geom_BSplineSurface aSurface =
Handle(Geom_BSplineSurface) aSurface =
GeomAPI_PointsToBSplineSurface(aZPoints,aXBound,aXStep,aYBound,aYStep,3,8);
TopoDS_Face aShape = BRepBuilderAPI_MakeFace(aSurface);

View File

@@ -70,7 +70,7 @@ void TexturesExt_Presentation::Init()
{
// initialize v3d_view so it displays TexturesExt well
getViewer()->InitActiveViews();
Handle_V3d_View aView = getViewer()->ActiveView();
Handle(V3d_View) aView = getViewer()->ActiveView();
aView->SetSurfaceDetail(V3d_TEX_ALL);
aView->SetSize(ZVIEW_SIZE);
@@ -82,7 +82,7 @@ void TexturesExt_Presentation::Init()
" // aShape = ..." EOL
"" EOL
" // create a textured presentation object for aShape" EOL
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
"" EOL
" TCollection_AsciiString aTFileName;" EOL
"" EOL
@@ -124,7 +124,7 @@ void TexturesExt_Presentation::Init()
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
//================================================================
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
TCollection_AsciiString aTFileName,
Standard_Real toScaleU,
Standard_Real toScaleV,
@@ -134,7 +134,7 @@ Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape&
Standard_Real originV)
{
// create a textured presentation object for aShape
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
// load texture from file if it is not an integer value
// integer value indicates a number of texture in predefined TexturesExt enumeration
@@ -190,12 +190,12 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
//================================================================
void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn)
{
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
if (isOn)
{
@@ -238,14 +238,14 @@ void TexturesExt_Presentation::sampleBottle()
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// display original shape in shaded display mode
Handle_AIS_Shape aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False);
DISP(aShapeIO);
Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
Handle(AIS_TexturedShape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace1);
Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
Handle(AIS_TexturedShape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace2);
getViewer()->Update();
@@ -267,7 +267,7 @@ void TexturesExt_Presentation::sampleTerrain()
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// TopLoc_Location aLoc;
// Handle_Geom_Surface aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Standard_Real u1,u2,v1,v2;
// aSur->Bounds(u1,u2,v1,v2);
// gp_Pnt aPnt = aSur->Value(u1, v1);

View File

@@ -12,7 +12,7 @@
#include <OCCDemo_Presentation.h>
class TopoDS_Shape;
class TCollection_AsciiString;
class Handle_AIS_TexturedShape;
class AIS_TexturedShape;
class TexturesExt_Presentation : public OCCDemo_Presentation
{
@@ -32,7 +32,7 @@ private:
// filename can also be an integer value ("2", "5", etc.), in this case
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
Handle_AIS_TexturedShape Texturize(
Handle(AIS_TexturedShape) Texturize(
const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName,
Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0,
Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0,

View File

@@ -77,7 +77,7 @@ void ThruSections_Presentation::DoSample()
// purpose:
//////////////////////////////////////////////////////////////////////
static Handle_Geom_BSplineCurve CreateCurve(Standard_Real aCoords[][3],Standard_Integer nPoles)
static Handle(Geom_BSplineCurve) CreateCurve(Standard_Real aCoords[][3],Standard_Integer nPoles)
{
TColgp_Array1OfPnt aCurvePoint (1, nPoles);
@@ -192,7 +192,7 @@ void ThruSections_Presentation::sample1()
//====================================================================
Handle_AIS_InteractiveObject aShow1,aShow2,aShowWire;
Handle(AIS_InteractiveObject) aShow1,aShow2,aShowWire;
// this data used for building a shape through sections:
Standard_Boolean IsSolid,IsRuled;
@@ -374,7 +374,7 @@ void ThruSections_Presentation::sample2()
//====================================================================
Handle_AIS_InteractiveObject aShow1,aShow2,aShowWire1,aShowWire2,aShowWire3;
Handle(AIS_InteractiveObject) aShow1,aShow2,aShowWire1,aShowWire2,aShowWire3;
// this data used for building a shape through sections:
const Standard_Boolean IsSolid = Standard_False;
@@ -403,8 +403,8 @@ void ThruSections_Presentation::sample2()
Standard_Integer aSize3 = sizeof(aCoords3)/(sizeof(Standard_Real)*3);
// creates curves:
Handle_Geom_BSplineCurve aCurve1 = CreateCurve(aCoords1,aSize1);
Handle_Geom_BSplineCurve aCurve2 = CreateCurve(aCoords2,aSize2);
Handle(Geom_BSplineCurve) aCurve1 = CreateCurve(aCoords1,aSize1);
Handle(Geom_BSplineCurve) aCurve2 = CreateCurve(aCoords2,aSize2);
// creates wires based on the curves:
TopoDS_Wire aW1 = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(aCurve1));

View File

@@ -10,7 +10,7 @@
#endif // _MSC_VER > 1000
#include <OCCDemo_Presentation.h>
class TopTools_SequenceOfShape;
#include <TopTools_SequenceOfShape.hxx>
//class TCollection_AsciiString;
class ThruSections_Presentation : public OCCDemo_Presentation

View File

@@ -126,10 +126,10 @@ static TopoDS_Shape CreateRevolShape()
gp_Ax1 anAxis = gp_Ax1(gp_Pnt(0,0,0),gp::DY());
GC_MakeSegment aSegment(gp_Pnt(0,-8*SCALE,0),gp_Pnt(0,-8*SCALE,2*SCALE));
Handle_Geom_TrimmedCurve aLine = aSegment.Value();
Handle_Geom_SurfaceOfRevolution aSurface1 = new Geom_SurfaceOfRevolution(aLine, anAxis);
Handle_Geom_SurfaceOfRevolution aSurface2 = new Geom_SurfaceOfRevolution(aCurve1, anAxis);
Handle_Geom_SurfaceOfRevolution aSurface3 = new Geom_SurfaceOfRevolution(aCurve2, anAxis);
Handle(Geom_TrimmedCurve) aLine = aSegment.Value();
Handle(Geom_SurfaceOfRevolution) aSurface1 = new Geom_SurfaceOfRevolution(aLine, anAxis);
Handle(Geom_SurfaceOfRevolution) aSurface2 = new Geom_SurfaceOfRevolution(aCurve1, anAxis);
Handle(Geom_SurfaceOfRevolution) aSurface3 = new Geom_SurfaceOfRevolution(aCurve2, anAxis);
BRep_Builder aBuilder;
TopoDS_Compound aShape;
@@ -214,10 +214,10 @@ static TopoDS_Shape CreateBSplnShape()
GeomAPI_PointsToBSplineSurface aPTBS;
aPTBS.Init(aZPoints1,aX0,aXStep,aY0,aYStep,3,10,GeomAbs_C3,0.3*SCALE);
Handle_Geom_BSplineSurface aSurface1 = aPTBS.Surface();
Handle(Geom_BSplineSurface) aSurface1 = aPTBS.Surface();
aPTBS.Init(aZPoints2,aX0,aXStep,aY0,aYStep,3,10,GeomAbs_C3,0.3*SCALE);
Handle_Geom_BSplineSurface aSurface2 = aPTBS.Surface();
Handle(Geom_BSplineSurface) aSurface2 = aPTBS.Surface();
TopoDS_Face aFace1,aFace2;
aFace1 = BRepBuilderAPI_MakeFace (aSurface1);
@@ -251,7 +251,7 @@ void TopLProps_Presentation::sample1()
if (aEdge.IsNull()) return;
//show:
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
drawShape(aEdge,Quantity_NOC_RED);
if(WAIT_A_SECOND) return;
@@ -281,9 +281,9 @@ void TopLProps_Presentation::sample2()
if (aFace.IsNull()) return;
//show:
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
Handle_AIS_InteractiveObject aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
Handle(AIS_InteractiveObject) aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
getAISContext()->SetDisplayMode(aShowFace,AIS_WireFrame);
getAISContext()->Display(aShowFace);
if(WAIT_A_SECOND) return;
@@ -324,7 +324,7 @@ void TopLProps_Presentation::sample3()
Standard_Integer aNbPoints = sizeof(aPoints)/sizeof(Standard_Real);
//show:
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
drawShape(aEdge,Quantity_NOC_RED);
@@ -367,9 +367,9 @@ void TopLProps_Presentation::sample4()
Standard_Integer aNbPoints = sizeof(aPoints)/(sizeof(Standard_Real)*2);
//show:
Handle_AIS_InteractiveObject aShowShape = drawShape(aShape);
Handle(AIS_InteractiveObject) aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
Handle_AIS_InteractiveObject aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
Handle(AIS_InteractiveObject) aShowFace = drawShape(aFace,Graphic3d_NOM_BRASS,Standard_False);
getAISContext()->SetDisplayMode(aShowFace,AIS_WireFrame);
getAISContext()->Display(aShowFace);
if(WAIT_A_SECOND) return;
@@ -439,7 +439,7 @@ void TopLProps_Presentation::showEdgeLProps(TopoDS_Edge& theEdge,
setResultText (aText.ToCString());
BRepAdaptor_Curve anAdapCurve (theEdge) ;
Handle_AIS_InteractiveObject aObjs[7];
Handle(AIS_InteractiveObject) aObjs[7];
Standard_Integer maxOrder = 3;
Standard_Real aResol = gp::Resolution();
BRepLProp_CLProps aLProps (anAdapCurve,maxOrder,aResol);

View File

@@ -44,18 +44,18 @@ public:
Standard_EXPORT GeoAlgo_Sol(const Standard_CString aGroundName);
Standard_EXPORT void Build(const Standard_CString aGroundName) ;
Standard_EXPORT void Build(const TColgp_SequenceOfXYZ& aSeqofPoints) ;
Standard_EXPORT Handle_Geom_BSplineSurface Surface() const;
Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const;
Standard_EXPORT Standard_Boolean IsDone() const;
private:
// Methods PRIVATE
//
Standard_EXPORT Handle_Geom_BSplineSurface Read(const Standard_CString aGroundName) ;
Standard_EXPORT Handle(Geom_BSplineSurface) Read(const Standard_CString aGroundName) ;
// Fields PRIVATE
//
Handle_Geom_BSplineSurface myGround;
Handle(Geom_BSplineSurface) myGround;
Standard_Boolean myIsDone;
};

View File

@@ -1119,7 +1119,7 @@ void CGeometryDoc::OnCreateSol()
TopoDS_Face aface = BRepBuilderAPI_MakeFace(GeomSol, Precision::Confusion());
if (!BRepAlgo::IsValid(aface))
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate surface is not valid!", L"CasCade Error", MB_ICONERROR);
Handle_AIS_Shape anAISShape=new AIS_Shape(aface);
Handle(AIS_Shape) anAISShape=new AIS_Shape(aface);
myAISContext->Display(anAISShape, Standard_False);
Fit();
}
@@ -1211,7 +1211,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
" TopLoc_Location aLocation;\n"
"\n"
" // takes the triangulation of the face aFace\n"
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);\n"
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);\n"
"\n"
" if(!aTr.IsNull())\n"
" { \n"
@@ -1337,7 +1337,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
" TopoDS_Face aFace;\n"
" B.MakeFace(aFace, aSurf, Precision::Confusion());\n"
" B.Add(aFace, aWire);\n"
" Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);\n"
" Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);\n"
" sfs->Perform();\n"
" TopoDS_Shape aFixedFace = sfs->Shape();\n"
" if (aFixedFace.IsNull()) \n"
@@ -1364,7 +1364,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
TopLoc_Location aLocation;
// takes the triangulation of the face aFace
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
if(!aTr.IsNull())
{
@@ -1492,14 +1492,14 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
TopoDS_Face aFace;
B.MakeFace(aFace, aSurf, Precision::Confusion());
B.Add(aFace, aWire);
Handle_ShapeFix_Shape sfs = new ShapeFix_Shape(aFace);
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(aFace);
sfs->Perform();
TopoDS_Shape aFixedFace = sfs->Shape();
if (aFixedFace.IsNull())
return;
// output surface, make it half transparent
Handle_AIS_InteractiveObject aSurfIO = drawSurface(
Handle(AIS_InteractiveObject) aSurfIO = drawSurface(
aSurf, Quantity_NOC_LEMONCHIFFON3, Standard_False);
aSurfIO->SetTransparency(0.5);
myAISContext->Display(aSurfIO,Standard_False);
@@ -1517,8 +1517,8 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
drawShape(aFixedFace);
}
Handle_AIS_InteractiveObject CGeometryDoc::drawSurface
(const Handle_Geom_Surface& theSurface,
Handle(AIS_InteractiveObject) CGeometryDoc::drawSurface
(const Handle(Geom_Surface)& theSurface,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
{
@@ -1529,7 +1529,7 @@ Handle_AIS_InteractiveObject CGeometryDoc::drawSurface
fixParam(v1);
fixParam(v2);
Handle_AIS_Shape aGraphicSurface =
Handle(AIS_Shape) aGraphicSurface =
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion()));
myAISContext->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
@@ -1569,7 +1569,7 @@ Standard_Boolean CGeometryDoc::WaitForInput (unsigned long aMilliSeconds)
return Standard_False;
}
Handle_AIS_Point CGeometryDoc::drawPoint
Handle(AIS_Point) CGeometryDoc::drawPoint
(const gp_Pnt& aPnt,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay)
@@ -1586,12 +1586,12 @@ Handle_AIS_Point CGeometryDoc::drawPoint
return aGraphicPoint;
}
Handle_AIS_Shape CGeometryDoc::drawShape
Handle(AIS_Shape) CGeometryDoc::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);
myAISContext->SetMaterial(aGraphicShape, theMaterial, toDisplay);
if (toDisplay)

View File

@@ -30,26 +30,26 @@ public:
void DragEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Standard_Integer TheState,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void InputEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void MoveEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void ShiftMoveEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void ShiftDragEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Standard_Integer TheState,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void ShiftInputEvent2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
void Popup2D (const Standard_Integer x ,
const Standard_Integer y ,
const Handle_V3d_View& aView );
const Handle(V3d_View)& aView );
//-------------------- 3D -------------------//
@@ -61,21 +61,21 @@ public:
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView);
Handle_AIS_InteractiveObject drawSurface
(const Handle_Geom_Surface& theSurface,
Handle(AIS_InteractiveObject) drawSurface
(const Handle(Geom_Surface)& theSurface,
const Quantity_Color& theColor,
const Standard_Boolean toDisplay);
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
// Waits for a user input or a period of time has been elapsed
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_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
@@ -224,16 +224,16 @@ public:
int Current;
void Minimize3D();
void Minimize2D();
Handle_V3d_Viewer GetViewer2D() { return myViewer2D; };
Handle_AIS_InteractiveContext& GetISessionContext() { return myAISContext2D; };
Handle(V3d_Viewer) GetViewer2D() { return myViewer2D; };
Handle(AIS_InteractiveContext)& GetISessionContext() { return myAISContext2D; };
BOOL FitMode;
public:
CResultDialog myCResultDialog;
private:
Handle_V3d_Viewer myViewer2D;
Handle_AIS_InteractiveContext myAISContext2D;
Handle(V3d_Viewer) myViewer2D;
Handle(AIS_InteractiveContext) myAISContext2D;
};

View File

@@ -8,11 +8,10 @@
#include <TColStd_Array1OfReal.hxx>
#include <Geom2d_BSplineCurve.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
ISession2D_Curve::ISession2D_Curve(const Handle_Geom2d_Curve aGeom2dCurve,
ISession2D_Curve::ISession2D_Curve(const Handle(Geom2d_Curve) aGeom2dCurve,
const Aspect_TypeOfLine aTypeOfLine,
const Aspect_WidthOfLine aWidthOfLine,
const Standard_Integer aColorIndex)

View File

@@ -15,7 +15,7 @@
#include <Standard_IStream.hxx>
#include <Standard_CString.hxx>
class TColGeom2d_HSequenceOfCurve;
#include <TColGeom2d_HSequenceOfCurve.hxx>
class PrsMgr_PresentationManager2d;
class Graphic2d_GraphicObject;
class SelectMgr_Selection;
@@ -33,7 +33,7 @@ public:
//
ISession2D_Curve
(const Handle_Geom2d_Curve aGeom2dCurve,
(const Handle(Geom2d_Curve) aGeom2dCurve,
const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID,
const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM,
const Standard_Integer aColorIndex = 4);
@@ -59,7 +59,7 @@ public:
inline Standard_Real GetDiscretisation() const;
inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ;
DEFINE_STANDARD_RTTI(ISession2D_Curve,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
private:
@@ -70,7 +70,7 @@ private:
// Fields PRIVATE
//
Handle_Geom2d_Curve myGeom2dCurve;
Handle(Geom2d_Curve) myGeom2dCurve;
Aspect_TypeOfLine myTypeOfLine;
Aspect_WidthOfLine myWidthOfLine;
Standard_Integer myColorIndex;

View File

@@ -7,7 +7,6 @@
#include "ISession_Curve.h"
#include <StdPrs_PoleCurve.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
#ifdef _DEBUG

View File

@@ -20,7 +20,7 @@ public:
ISession_Curve(Handle(Geom_Curve)& aCurve);
virtual ~ISession_Curve();
DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
private:

View File

@@ -13,7 +13,6 @@
static char THIS_FILE[]=__FILE__;
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -26,7 +26,7 @@ public:
ISession_Direction (const gp_Pnt2d& aPnt2d,const gp_Vec2d& aVec2d);
virtual ~ISession_Direction();
DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
private:

View File

@@ -12,7 +12,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Point,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -22,7 +22,7 @@ public:
ISession_Point(const gp_Pnt2d& aPoint,Standard_Real Elevation = 0);
ISession_Point(const gp_Pnt& aPoint);
virtual ~ISession_Point();
DEFINE_STANDARD_RTTI(ISession_Point,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject)
private :

View File

@@ -15,7 +15,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -20,7 +20,7 @@ public:
ISession_Surface(Handle(Geom_Surface)& aSurface);
virtual ~ISession_Surface();
DEFINE_STANDARD_RTTI(ISession_Surface,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
private:
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0);

View File

@@ -11,7 +11,7 @@
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Text,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
//////////////////////////////////////////////////////////////////////

View File

@@ -69,7 +69,7 @@ inline Quantity_Factor GetScale() const;
inline void SetScale (const Quantity_Factor aNewScale) ;
DEFINE_STANDARD_RTTI(ISession_Text,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Text,AIS_InteractiveObject)
private:

View File

@@ -10,7 +10,6 @@
static char THIS_FILE[]=__FILE__;
#endif
IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
#include "DsgPrs_LengthPresentation.hxx"

View File

@@ -24,7 +24,7 @@ public:
ISession_Direction(const gp_Pnt& aPnt,const gp_Pnt& aPnt2);
ISession_Direction(const gp_Pnt& aPnt,const gp_Vec& aVec);
DEFINE_STANDARD_RTTI(ISession_Direction,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
private:

View File

@@ -4721,7 +4721,7 @@ void CModelingDoc::OnStopStop()
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate face is not valid!", L"CasCade Error", MB_ICONERROR);
myAISContext->CloseLocalContext();
myState = -1;
Handle_AIS_Shape anAISShape = new AIS_Shape(aface);
Handle(AIS_Shape) anAISShape = new AIS_Shape(aface);
myAISContext->SetColor(anAISShape,Quantity_NOC_AZURE);
myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
myAISContext->SetDisplayMode(anAISShape,1);
@@ -5017,7 +5017,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate surface is not valid!!!", L"CasCade Error", MB_ICONERROR);
}
Handle_AIS_Shape anAISShape=new AIS_Shape(theFace);
Handle(AIS_Shape) anAISShape=new AIS_Shape(theFace);
myAISContext->SetColor(anAISShape,Quantity_NOC_BLUE1);
myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
myAISContext->SetDisplayMode(anAISShape,1);

View File

@@ -195,7 +195,7 @@ void CViewer2dDoc::OnBUTTONTestLine()
TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j+5,0.), gp_Pnt(10*i,10*j,0.));
TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4);
TopoDS_Face F = BRepBuilderAPI_MakeFace(W);
Handle_AIS_Shape aRect = new AIS_Shape(F);
Handle(AIS_Shape) aRect = new AIS_Shape(F);
//set attributes of boundaries
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer();
Handle(Prs3d_LineAspect) aLineAttrib =
@@ -280,7 +280,7 @@ void CViewer2dDoc::OnBUTTONTestRect()
TopoDS_Edge E13 = BRepBuilderAPI_MakeEdge(gp_Pnt(42.5,93.,0.), gp_Pnt(0.,68.,0.));
TopoDS_Edge E14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,68.,0.), gp_Pnt(40.,0.,0.));
TopoDS_Wire W1 = BRepBuilderAPI_MakeWire(E11,E12,E13,E14);
Handle_AIS_Shape aRect1 = new AIS_Shape(W1);
Handle(AIS_Shape) aRect1 = new AIS_Shape(W1);
myAISContext->Display(aRect1);
myAISContext->SetColor(aRect1,Quantity_NOC_YELLOW);
@@ -290,7 +290,7 @@ void CViewer2dDoc::OnBUTTONTestRect()
TopoDS_Edge E23 = BRepBuilderAPI_MakeEdge(gp_Pnt(112.5,93.,0.), gp_Pnt(70.,68.,0.));
TopoDS_Edge E24 = BRepBuilderAPI_MakeEdge(gp_Pnt(70.,68.,0.), gp_Pnt(110.,0.,0.));
TopoDS_Wire W2 = BRepBuilderAPI_MakeWire(E21,E22,E23,E24);
Handle_AIS_Shape aRect2 = new AIS_Shape(W2);
Handle(AIS_Shape) aRect2 = new AIS_Shape(W2);
myAISContext->Display(aRect2);
myAISContext->SetColor(aRect2,Quantity_NOC_YELLOW);
myAISContext->Activate(aRect2,2);

View File

@@ -76,7 +76,7 @@ END_MESSAGE_MAP()
void DlgAttributes::OnColor()
{
Handle_AIS_InteractiveObject Current ;
Handle(AIS_InteractiveObject) Current ;
Quantity_Color CSFColor ;
COLORREF MSColor ;

View File

@@ -73,7 +73,7 @@ protected:
void SetMaterial (Graphic3d_NameOfMaterial Material);
private:
Handle_AIS_InteractiveContext myAISContext;
Handle(AIS_InteractiveContext) myAISContext;
CResultDialog* myCResultDialog;
};

View File

@@ -10,7 +10,6 @@
#include <Prs3d_Drawer.hxx>
#include <Prs3d_ArrowAspect.hxx>
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
#ifdef _DEBUG

View 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,AIS_InteractiveObject)
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) ;

View File

@@ -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, Precision::Confusion()));
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) {
@@ -313,12 +313,12 @@ void OCCDemo_Presentation::ResetView()
pView->Reset();
}
Handle_AIS_InteractiveContext OCCDemo_Presentation::getAISContext() const
Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const
{
return myDoc->GetAISContext();
}
Handle_V3d_Viewer OCCDemo_Presentation::getViewer() const
Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const
{
return myDoc->GetViewer();
}

View File

@@ -66,8 +66,8 @@ public:
protected:
// Methods to call from a derivable class
void setName (const char* theName) {myName = CString(theName);}
Handle_AIS_InteractiveContext getAISContext() const;
Handle_V3d_Viewer getViewer() const;
Handle(AIS_InteractiveContext) getAISContext() const;
Handle(V3d_Viewer) getViewer() const;
// void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);}
// void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);}
Standard_CString GetDataDir();
@@ -75,45 +75,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

View File

@@ -14,7 +14,7 @@ static char THIS_FILE[] = __FILE__;
// ScaleDlg dialog
ScaleDlg::ScaleDlg(Handle_V3d_View Current_V3d_View, CViewer3dView* pView, CWnd* pParent /*=NULL*/)
ScaleDlg::ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent /*=NULL*/)
: CDialog(ScaleDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(ScaleDlg)

View File

@@ -17,7 +17,7 @@ class ScaleDlg : public CDialog
{
// Construction
public:
ScaleDlg(Handle_V3d_View Current_V3d_View, CViewer3dView* pView, CWnd* pParent = NULL);
ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent = NULL);
// Dialog Data
//{{AFX_DATA(ScaleDlg)
@@ -53,7 +53,7 @@ protected:
private:
Handle_V3d_View myCurrent_V3d_View;
Handle(V3d_View) myCurrent_V3d_View;
CViewer3dView* myView;
};

View File

@@ -15,7 +15,7 @@ static char THIS_FILE[] = __FILE__;
// CShadingModelDlg dialog
CShadingModelDlg::CShadingModelDlg(Handle_V3d_View Current_V3d_View, CWnd* pParent /*=NULL*/)
CShadingModelDlg::CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent /*=NULL*/)
: CDialog(CShadingModelDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CShadingModelDlg)

View File

@@ -16,7 +16,7 @@ class CShadingModelDlg : public CDialog
{
// Construction
public:
CShadingModelDlg(Handle_V3d_View Current_V3d_View, CWnd* pParent = NULL); // standard constructor
CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CShadingModelDlg)
@@ -44,7 +44,7 @@ protected:
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Handle_V3d_View myCurrent_V3d_View;
Handle(V3d_View) myCurrent_V3d_View;
};
//{{AFX_INSERT_LOCATION}}

View File

@@ -69,7 +69,7 @@ void TexturesExt_Presentation::Init()
{
// initialize v3d_view so it displays TexturesExt well
getViewer()->InitActiveViews();
Handle_V3d_View aView = getViewer()->ActiveView();
Handle(V3d_View) aView = getViewer()->ActiveView();
aView->SetSurfaceDetail(V3d_TEX_ALL);
aView->SetSize(ZVIEW_SIZE);
@@ -81,7 +81,7 @@ void TexturesExt_Presentation::Init()
" // aShape = ..." EOL
"" EOL
" // create a textured presentation object for aShape" EOL
" Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);" EOL
" Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);" EOL
"" EOL
" TCollection_AsciiString aTFileName;" EOL
"" EOL
@@ -127,7 +127,7 @@ void TexturesExt_Presentation::Init()
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
//================================================================
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
Handle(AIS_TexturedShape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
TCollection_AsciiString aTFileName,
Standard_Real toScaleU,
Standard_Real toScaleV,
@@ -137,7 +137,7 @@ Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape&
Standard_Real originV)
{
// create a textured presentation object for aShape
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape);
TCollection_AsciiString TFileName;
// load texture from file if it is not an integer value
// integer value indicates a number of texture in predefined TexturesExt enumeration
@@ -204,12 +204,12 @@ Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape,
//================================================================
void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn)
{
static Handle_V3d_Light aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle_V3d_Light aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle_V3d_Light aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle_V3d_Light aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle_V3d_Light aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle_V3d_Light aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZneg);
static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZpos);
static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(getViewer(), V3d_XposYnegZpos);
static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(getViewer(), V3d_XnegYnegZneg);
static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(getViewer(), V3d_XnegYposZpos);
static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(getViewer(), V3d_XposYposZpos);
if (isOn)
{
@@ -254,16 +254,16 @@ aShape = Transformer.Shape();
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// display original shape in shaded display mode
Handle_AIS_Shape aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False);
getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False);
// Set increased polygon offset for the main shape to avoid depth collision with textured faces
aShapeIO->SetPolygonOffsets(Aspect_POM_Fill, 1.5, 0.5);
DISP(aShapeIO);
Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
Handle(AIS_TexturedShape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace1);
Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
Handle(AIS_TexturedShape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace2);
getViewer()->Update();
@@ -285,7 +285,7 @@ void TexturesExt_Presentation::sampleTerrain()
TopExp::MapShapes(aShape, TopAbs_FACE, aFaces);
// TopLoc_Location aLoc;
// Handle_Geom_Surface aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc);
// Standard_Real u1,u2,v1,v2;
// aSur->Bounds(u1,u2,v1,v2);
// gp_Pnt aPnt = aSur->Value(u1, v1);

View File

@@ -32,7 +32,7 @@ private:
// filename can also be an integer value ("2", "5", etc.), in this case
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
Handle_AIS_TexturedShape Texturize(
Handle(AIS_TexturedShape) Texturize(
const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName,
Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0,
Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0,

View File

@@ -35,7 +35,7 @@ value = (value*neg)/inc;
//CTrihedronDlg::CTrihedronDlg(CWnd* pParent /*=NULL*/)
//: CDialog(CTrihedronDlg::IDD, pParent)
CTrihedronDlg::CTrihedronDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
CTrihedronDlg::CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
: CDialog(CTrihedronDlg::IDD, pParent)
{

View File

@@ -21,7 +21,7 @@ class CTrihedronDlg : public CDialog
// Construction
public:
CTrihedronDlg(CWnd* pParent = NULL); // standard constructor
CTrihedronDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor
CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor
// Dialog Data
@@ -63,7 +63,7 @@ protected:
private:
Handle_V3d_View myCurrent_V3d_View;
Handle(V3d_View) myCurrent_V3d_View;
CViewer3dDoc* myDoc;
Quantity_NameOfColor Color ;
Aspect_TypeOfTriedronPosition Position;

View File

@@ -445,34 +445,34 @@ void CViewer3dDoc::OnObjectDisplayall()
myOffsetDlg->UpdateValues();
}
Handle_User_Cylinder CViewer3dDoc::GetCylinder()
Handle(User_Cylinder) CViewer3dDoc::GetCylinder()
{
return myCylinder;
}
Handle_AIS_Shape CViewer3dDoc::GetSphere()
Handle(AIS_Shape) CViewer3dDoc::GetSphere()
{
return mySphere;
}
Handle_AIS_Shape CViewer3dDoc::GetBox()
Handle(AIS_Shape) CViewer3dDoc::GetBox()
{
return myBox;
}
Handle_AIS_Shape CViewer3dDoc::GetOverlappedCylinder()
Handle(AIS_Shape) CViewer3dDoc::GetOverlappedCylinder()
{
return myOverlappedCylinder;
}
Handle_AIS_Shape CViewer3dDoc::GetOverlappedSphere()
Handle(AIS_Shape) CViewer3dDoc::GetOverlappedSphere()
{
return myOverlappedSphere;
}
Handle_AIS_Shape CViewer3dDoc::GetOverlappedBox()
Handle(AIS_Shape) CViewer3dDoc::GetOverlappedBox()
{
return myOverlappedBox;
}
@@ -507,7 +507,7 @@ void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/,
myAISContext->InitSelected();
if (myAISContext->MoreSelected())
{
Handle_AIS_InteractiveObject Current = myAISContext->SelectedInteractive();
Handle(AIS_InteractiveObject) Current = myAISContext->SelectedInteractive();
if (Current->HasColor())
{
CSFColor = myAISContext->Color (Current);
@@ -770,7 +770,7 @@ void CViewer3dDoc::OnFillet3d()
myAISContext->InitSelected();
if (myAISContext->MoreSelected())
{
const Handle(AIS_Shape)& aSelInteractive = Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive());
Handle(AIS_Shape) aSelInteractive (Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive()));
if (aSelInteractive.IsNull())
{
AfxMessageBox (L"It is necessary to activate the edges selection mode\n"

View File

@@ -34,12 +34,12 @@ protected: // create from serialization only
public:
void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed);
Handle_AIS_Shape GetBox();
Handle_AIS_Shape GetSphere();
Handle_User_Cylinder GetCylinder();
Handle_AIS_Shape GetOverlappedBox();
Handle_AIS_Shape GetOverlappedSphere();
Handle_AIS_Shape GetOverlappedCylinder();
Handle(AIS_Shape) GetBox();
Handle(AIS_Shape) GetSphere();
Handle(User_Cylinder) GetCylinder();
Handle(AIS_Shape) GetOverlappedBox();
Handle(AIS_Shape) GetOverlappedSphere();
Handle(AIS_Shape) GetOverlappedCylinder();
void Start();
Standard_CString GetDataDir() {return myDataDir;}
static void Fit();
@@ -137,13 +137,13 @@ protected:
private:
COffsetDlg* myOffsetDlg;
Handle_User_Cylinder myCylinder;
Handle_AIS_Shape mySphere;
Handle_AIS_Shape myBox;
Handle_AIS_Shape myOverlappedCylinder;
Handle_AIS_Shape myOverlappedSphere;
Handle_AIS_Shape myOverlappedBox;
Handle_AIS_Trihedron myTrihedron;
Handle(User_Cylinder) myCylinder;
Handle(AIS_Shape) mySphere;
Handle(AIS_Shape) myBox;
Handle(AIS_Shape) myOverlappedCylinder;
Handle(AIS_Shape) myOverlappedSphere;
Handle(AIS_Shape) myOverlappedBox;
Handle(AIS_Trihedron) myTrihedron;
OCCDemo_Presentation *myPresentation;
char myDataDir[5]; // for "Data\0"

View File

@@ -130,8 +130,8 @@ private:
enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
VisMode myVisMode;
Handle_V3d_View myView;
Handle_Graphic3d_GraphicDriver myGraphicDriver;
Handle(V3d_View) myView;
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
View3D_CurrentAction myCurrentMode;
Standard_Integer myXmin;
Standard_Integer myYmin;

View File

@@ -15,7 +15,7 @@ static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
// ZClippingDlg dialog
ZClippingDlg::ZClippingDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
ZClippingDlg::ZClippingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
: CDialog(ZClippingDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(ZClippingDlg)

View File

@@ -14,7 +14,7 @@ class ZClippingDlg : public CDialog
{
// Construction
public:
ZClippingDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor
ZClippingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(ZClippingDlg)

View File

@@ -16,7 +16,7 @@ static char THIS_FILE[] = __FILE__;
// ZCueingDlg dialog
ZCueingDlg::ZCueingDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
ZCueingDlg::ZCueingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
: CDialog(ZCueingDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(ZCueingDlg)

View File

@@ -14,7 +14,7 @@ class ZCueingDlg : public CDialog
{
// Construction
public:
ZCueingDlg(Handle_V3d_View Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL);
ZCueingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL);
// Dialog Data
//{{AFX_DATA(ZCueingDlg)
enum { IDD = IDD_ZCUEING };
@@ -48,7 +48,7 @@ protected:
private:
Handle_V3d_View myCurrent_V3d_View;
Handle(V3d_View) myCurrent_V3d_View;
CViewer3dDoc* myDoc;
};

View File

@@ -48,7 +48,7 @@ OCAFSample_CommonDriver::OCAFSample_CommonDriver()
//purpose :
//=======================================================================
Standard_Integer OCAFSample_CommonDriver::Execute(TFunction_Logbook& theLogbook) const
Standard_Integer OCAFSample_CommonDriver::Execute(Handle(TFunction_Logbook)& theLogbook) const
{
Handle(TDF_Reference) aReference;
TopoDS_Shape aMaster, aTool;
@@ -77,14 +77,14 @@ Standard_Integer OCAFSample_CommonDriver::Execute(TFunction_Logbook& theLogbook)
TDocStd_Modified::Add(aNode->Father()->Label());
theLogbook.SetImpacted(Label());
theLogbook->SetImpacted(Label());
TDocStd_Modified::Add(Label());
theLogbook.SetImpacted(ResultLabel);
theLogbook->SetImpacted(ResultLabel);
TDF_ChildIterator anIterator(ResultLabel);
for(; anIterator.More(); anIterator.Next()) {
theLogbook.SetImpacted(anIterator.Value());
theLogbook->SetImpacted(anIterator.Value());
}
return OK_OPERATION;

View File

@@ -20,7 +20,6 @@
#include <Standard.hxx>
#endif
#ifndef _Handle_OCAFSample_CommonDriver_HeaderFile
#include <Handle_OCAFSample_CommonDriver.hxx>
#endif
#ifndef _OCAFSample_Driver_HeaderFile
@@ -55,7 +54,7 @@ public:
// Methods PUBLIC
//
Standard_EXPORT OCAFSample_CommonDriver();
Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& theLogbook) const;
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& theLogbook) const;
Standard_EXPORT ~OCAFSample_CommonDriver();
@@ -63,7 +62,7 @@ Standard_EXPORT ~OCAFSample_CommonDriver();
// Type management
//
Standard_EXPORT friend Handle_Standard_Type& OCAFSample_CommonDriver_Type_();
Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_CommonDriver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;

View File

@@ -20,7 +20,6 @@
#include <Standard.hxx>
#endif
#ifndef _Handle_OCAFSample_Driver_HeaderFile
#include <Handle_OCAFSample_Driver.hxx>
#endif
#ifndef _TFunction_Driver_HeaderFile
@@ -33,7 +32,7 @@
#include <Standard_Integer.hxx>
#endif
class TFunction_Logbook;
class TDF_LabelMap;
#include <TDF_LabelMap.hxx>
class OCAFSample_Driver : public TFunction_Driver {
@@ -59,8 +58,8 @@ public:
// Methods PUBLIC
//
Standard_EXPORT void Validate(TFunction_Logbook& log) const;
Standard_EXPORT virtual Standard_Boolean MustExecute(const TFunction_Logbook& log) const;
Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
Standard_EXPORT virtual Standard_Boolean MustExecute(const Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual Standard_Boolean Arguments(TDF_LabelMap& theArgs) const;
Standard_EXPORT virtual Standard_Boolean Results(TDF_LabelMap& theRes) const;
Standard_EXPORT ~OCAFSample_Driver();
@@ -70,7 +69,7 @@ Standard_EXPORT ~OCAFSample_Driver();
// Type management
//
Standard_EXPORT friend Handle_Standard_Type& OCAFSample_Driver_Type_();
Standard_EXPORT friend Handle(Standard_Type)& OCAFSample_Driver_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;

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