mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
1 Commits
CR670_FixS
...
CR23731_6
Author | SHA1 | Date | |
---|---|---|---|
|
6e8ab7b8af |
@@ -300,11 +300,8 @@ INCLUDE(adm/templates/tcl.cmake)
|
||||
|
||||
#install tcltk
|
||||
IF(INSTALL_TCL)
|
||||
SET(3RDPARTY_TCL_DLL_DIR "")
|
||||
SET(3RDPARTY_TCL_LIB_DIR "")
|
||||
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR_INSIDE "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR_INSIDE "${3RDPARTY_TCL_DLL}" PATH)
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
|
||||
|
||||
IF (IS_TCL_VERSION_FOUND)
|
||||
SET (TCL_VERSION ${TCL_MAJOR_VERSION}${TCL_SEP}${TCL_MINOR_VERSION})
|
||||
@@ -316,20 +313,17 @@ IF(INSTALL_TCL)
|
||||
SET (TCL_FOLDER_VERSION "")
|
||||
ENDIF()
|
||||
|
||||
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR_INSIDE}/${DLL_SO_PREFIX}tcl${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
|
||||
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR_INSIDE}/${DLL_SO_PREFIX}tk${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
|
||||
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR}/${DLL_SO_PREFIX}tcl${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
|
||||
INSTALL(FILES "${3RDPARTY_TCL_DLL_DIR}/${DLL_SO_PREFIX}tk${TCL_VERSION}.${DLL_SO}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
|
||||
|
||||
IF (IS_TCL_VERSION_FOUND)
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tcl8" DESTINATION "${INSTALL_DIR}/lib")
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tcl${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR_INSIDE}/tk${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/lib")
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR}/tcl${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
|
||||
INSTALL(DIRECTORY "${3RDPARTY_TCL_LIB_DIR}/tk${TCL_FOLDER_VERSION}" DESTINATION "${INSTALL_DIR}/lib")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
|
||||
MESSAGE(STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
ENDIF()
|
||||
|
||||
# GLX
|
||||
@@ -458,6 +452,12 @@ string( REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIB
|
||||
MESSAGE(STATUS "3RDPARTY_LIBRARY_DIRS: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
|
||||
link_directories( ${3RDPARTY_LIBRARY_DIRS} )
|
||||
|
||||
#
|
||||
SET(RUN_PROJECT "")
|
||||
SET(CASROOT_DEFINITION "set \"CASROOT=${CMAKE_SOURCE_DIR}\"")
|
||||
SET(BIN_DIR_POSTFIX "bin")
|
||||
SET(RESOURCE_DIR_PREFIX "%SCRIPTROOT%\\src")
|
||||
|
||||
IF("${INSTALL_DIR}" STREQUAL "")
|
||||
MESSAGE(FATAL_ERROR "INSTALL_DIR is empty")
|
||||
ELSE()
|
||||
@@ -480,6 +480,13 @@ ELSE()
|
||||
install(FILES "${OCCT_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" )
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC AND "${BUILD_CONFIGURATION}" STREQUAL "Debug")
|
||||
SET(RUN_PROJECT "start OCCT.sln")
|
||||
SET(BIN_DIR_POSTFIX "out\\bin\\Debug")
|
||||
SET(RESOURCE_DIR_PREFIX "%CASROOT%\\src")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/adm/cmake/env.bat.in" OCCT.bat @ONLY)
|
||||
ENDIF()
|
||||
|
||||
include(adm/cmake/CMakeToolKitsDeps.txt)
|
||||
|
||||
IF (BUILD_Samples)
|
||||
|
153
LICENSE
Normal file
153
LICENSE
Normal file
@@ -0,0 +1,153 @@
|
||||
Open CASCADE Technology Public License
|
||||
License version: 6.6 March, 2013
|
||||
|
||||
Open CASCADE S.A.S. releases and makes publicly available the source code of the software Open CASCADE Technology to the free software development community under the terms and conditions of this license.
|
||||
|
||||
It is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this license has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
|
||||
Please read this license carefully and completely before downloading this software. By downloading, using, modifying, distributing and sublicensing this software, you indicate your acceptance to be bound by the terms and conditions of this license. If you do not want to accept or cannot accept for any reasons the terms and conditions of this license, please do not download or use in any manner this software.
|
||||
|
||||
1. Definitions
|
||||
|
||||
Unless there is something in the subject matter or in the context inconsistent therewith, the capitalized terms used in this License shall have the following meaning.
|
||||
|
||||
"Applicable Intellectual Property Rights" means (a) with respect to the Initial Developer, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to the Initial Developer and that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce, modify, distribute or sublicense the Original Code without infringement; and (b) with respect to You or any Contributor, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to You or to such Contributor and that cover subject matter contained in Your Modifications or in such Contributor's Modifications, taken alone or in combination with Original Code.
|
||||
|
||||
"Contributor" means each individual or legal entity that creates or contributes to the creation of any Modification, including the Initial Developer.
|
||||
|
||||
"Derivative Program": means a new program combining the Software or portions thereof with other source code not governed by the terms of this License.
|
||||
|
||||
"Initial Developer": means Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France.
|
||||
|
||||
"Modifications": mean any addition to, deletion from or change to the substance or the structure of the Software. When source code of the Software is released as a series of files, a Modification is: (a) any addition to, deletion from or change to the contents of a file containing the Software or (b) any new file or other representation of computer program statements that contains any part of the Software. By way of example, Modifications include any debug of, or improvement to, the Original Code or any of its components or portions as well as its next versions or releases thereof.
|
||||
|
||||
"Original Code": means (a) the source code of the software Open CASCADE Technology originally made available by the Initial Developer under this License, including the source code of any updates or upgrades of the Original Code and (b) the object code compiled from such source code and originally made available by Initial Developer under this License.
|
||||
|
||||
"Software": means the Original Code, the Modifications, the combination of Original Code and any Modifications or any respective portions thereof.
|
||||
|
||||
"You" or "Your": means an individual or a legal entity exercising rights under this License.
|
||||
|
||||
|
||||
2. Acceptance of license
|
||||
|
||||
By using, reproducing, modifying, distributing or sublicensing the Software or any portion thereof, You expressly indicate Your acceptance of the terms and conditions of this License and undertake to act in accordance with all the provisions of this License applicable to You.
|
||||
|
||||
|
||||
3. Scope and purpose
|
||||
|
||||
This License applies to the Software and You may not use, reproduce, modify, distribute, sublicense or circulate the Software, or any portion thereof, except as expressly provided under this License. Any attempt to otherwise use, reproduce, modify, distribute or sublicense the Software is void and will automatically terminate Your rights under this License.
|
||||
|
||||
|
||||
4. Contributor license
|
||||
|
||||
Subject to the terms and conditions of this License, the Initial Developer and each of the Contributors hereby grant You a world-wide, royalty-free, irrevocable and non-exclusive license under the Applicable Intellectual Property Rights they own or control, to use, reproduce, modify, distribute and sublicense the Software provided that:
|
||||
|
||||
You reproduce in all copies of the Software the copyright and other proprietary notices and disclaimers of the Initial Developer as they appear in the Original Code and attached hereto as Schedule "A" and any other notices or disclaimers attached to the Software and keep intact all notices in the Original Code that refer to this License and to the absence of any warranty;
|
||||
You include a copy of this License with every copy of the Software You distribute;
|
||||
If you distribute or sublicense the Software (as modified by You or on Your behalf as the case may be), You cause such Software to be licensed as a whole, at no charge, to all third parties, under the terms and conditions of the License, making in particular available to all third parties the source code of the Software;
|
||||
You document all Your Modifications, indicate the date of each such Modifications, designate the version of the Software You used, prominently include a file carrying such information with respect to the Modifications and duplicate the copyright and other proprietary notices and disclaimers attached hereto as Schedule "B" or any other notices or disclaimers attached to the Software with your Modifications.
|
||||
|
||||
For greater certainty, it is expressly understood that You may freely create Derivative Programs (without any obligation to publish such Derivative Program) and distribute same as a single product. In such case, You must ensure that all the requirements of this License are fulfilled for the Software or any portion thereof.
|
||||
|
||||
|
||||
5. Your license
|
||||
|
||||
You hereby grant all Contributors and anyone who becomes a party under this License a world-wide, non-exclusive, royalty-free and irrevocable license under the Applicable Intellectual Property Rights owned or controlled by You, to use, reproduce, modify, distribute and sublicense all Your Modifications under the terms and conditions of this License.
|
||||
|
||||
|
||||
6. Software subject to license
|
||||
|
||||
Your Modifications shall be governed by the terms and conditions of this License. You are not authorized to impose any other terms or conditions than those prevailing under this License when You distribute and/or sublicense the Software, save and except as permitted under Section 7 hereof.
|
||||
|
||||
|
||||
7. Additional terms
|
||||
|
||||
You may choose to offer, on a non-exclusive basis, and to charge a fee for any warranty, support, maintenance, liability obligations or other rights consistent with the scope of this License with respect to the Software (the "Additional Terms") to the recipients of the Software. However, You may do so only on Your own behalf and on Your sole and exclusive responsibility. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold the Initial Developer and any Contributor harmless for any liability incurred by or claims asserted against the Initial Developer or any Contributors with respect to any such Additional Terms.
|
||||
|
||||
|
||||
8. Disclaimer of warranty
|
||||
|
||||
The Software is provided under this License on an "as is" basis, without warranty of any kind, including without limitation, warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Software is with You.
|
||||
|
||||
|
||||
9. Liability
|
||||
|
||||
Under no circumstances shall You, the Initial Developer or any Contributor be liable to any person for any direct or indirect damages of any kind including, without limitation, damages for loss of goodwill, loss of data, work stoppage, computer failure or malfunction or any and all other commercial damages or losses resulting from or relating to this License or indirectly to the use of the Software.
|
||||
|
||||
|
||||
10. Trademark
|
||||
|
||||
This License does not grant any rights to use the trademarks, trade names and domain names "MATRA", "EADS Matra Datavision", "CAS.CADE", "Open CASCADE", "opencascade.com" and "opencascade.org" or any other trademarks, trade names or domain names used or owned by the Initial Developer.
|
||||
|
||||
|
||||
11. Copyright
|
||||
|
||||
The Initial Developer retains all rights, title and interest in and to the Original Code. You may not remove the copyright <20> notice which appears when You download the Software.
|
||||
|
||||
|
||||
12. Term
|
||||
|
||||
This License is granted to You for a term equal to the remaining period of protection covered by the intellectual property rights applicable to the Original Code.
|
||||
|
||||
|
||||
13. Termination
|
||||
|
||||
In case of termination, as provided in Section 3 above, You agree to immediately stop any further use, reproduction, modification, distribution and sublicensing of the Software and to destroy all copies of the Software that are in Your possession or control. All sublicenses of the Software which have been properly granted prior to termination shall survive any termination of this License. In addition, Sections 5, 8 to 11, 13.2 and 15.2 of this License, in reason of their nature, shall survive the termination of this License for a period of fifteen (15) years.
|
||||
|
||||
|
||||
14. Versions of the license
|
||||
|
||||
The Initial Developer may publish new versions of this License from time to time. Once Original Code has been published under a particular version of this License, You may choose to continue to use it under the terms and conditions of that version or use the Original Code under the terms of any subsequent version of this License published by the Initial Developer.
|
||||
|
||||
|
||||
15. Miscellaneous
|
||||
|
||||
15.1 Relationship of Parties
|
||||
|
||||
This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and the Initial Developer, and You will not represent to the contrary, whether expressly, by implication or otherwise.
|
||||
|
||||
15.2 Independent Development
|
||||
|
||||
Nothing in this License will impair the Initial Developer's right to acquire, license, develop, have others develop for it, market or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Derivative Programs, technology or products that You may develop, produce, market or distribute.
|
||||
|
||||
15.3 Severability
|
||||
|
||||
If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and extent.
|
||||
|
||||
|
||||
END OF THE TERMS AND
|
||||
CONDITIONS OF THIS LICENSE
|
||||
|
||||
|
||||
Open CASCADE S.A.S. is a French soci<63>t<EFBFBD> par actions simplifi<66>e having its main offices at 1, place in Fr<46>res Montgolfier, 78280 Guyancourt, France. Its web site is located at the following address www.opencascade.com
|
||||
|
||||
|
||||
Open CASCADE Technology Public License
|
||||
|
||||
Schedule "A"
|
||||
|
||||
The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License").
|
||||
You may not use the content of this file except in compliance with the License.
|
||||
Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file.
|
||||
|
||||
The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France. The Original Code is copyright <20> Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
"The Original Code and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
End of Schedule "A"
|
||||
|
||||
|
||||
Open CASCADE Technology Public License
|
||||
|
||||
Schedule "B"
|
||||
|
||||
"The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file.
|
||||
|
||||
The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Fr<46>res Montgolfier, 78280 Guyancourt, France. The Original Code is copyright <20> Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
Modifications to the Original Code have been made by ________________________. Modifications are copyright <20> [Year to be included]. All rights reserved.
|
||||
|
||||
The software Open CASCADE Technology and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
End of Schedule "B"
|
@@ -1,502 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@@ -1,10 +0,0 @@
|
||||
Open CASCADE exception (version 1.0) to GNU LGPL version 2.1.
|
||||
|
||||
The object code (i.e. not a source) form of a "work that uses the Library"
|
||||
can incorporate material from a header file that is part of the Library.
|
||||
As a special exception to the GNU Lesser General Public License version 2.1,
|
||||
you may distribute such object code incorporating material from header files
|
||||
provided with the Open CASCADE Technology libraries (including code of CDL
|
||||
generic classes) under terms of your choice, provided that you give
|
||||
prominent notice in supporting documentation to this code that it makes use
|
||||
of or is based on facilities provided by the Open CASCADE Technology software.
|
@@ -1,28 +1,20 @@
|
||||
Open CASCADE Technology
|
||||
=======================
|
||||
|
||||
This directory contains sources of Open CASCADE Technology (OCCT), a software
|
||||
development platform providing services for 3D surface and solid modeling, CAD
|
||||
data exchange, and visualization. Most of OCCT functionality is available in
|
||||
the form of C++ libraries. OCCT can be best applied in development of software
|
||||
dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical
|
||||
simulation (CAE).
|
||||
This directory contains sources of Open CASCADE Technology (OCCT), a collection
|
||||
of C++ libraries providing services for 3D surface and solid modeling, CAD data
|
||||
exchange, and visualization. OCCT can be best applied in development of
|
||||
software dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or
|
||||
numerical simulation (CAE).
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Open CASCADE Technology is free software; you can redistribute it and / or
|
||||
modify it under the terms of the GNU Lesser General Public version 2.1 as
|
||||
published by the Free Software Foundation, with special exception defined in
|
||||
the file OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included
|
||||
in OCCT distribution for complete text of the license.
|
||||
|
||||
Alternatively, Open CASCADE Technology may be used under the terms of Open
|
||||
CASCADE commercial license or contractual agreement.
|
||||
|
||||
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
|
||||
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
|
||||
materials is on you. See the license text for formal disclaimer.
|
||||
The OCCT code is subject to the Open CASCADE Technology Public License
|
||||
(the "License"). You may not use the content of the relevant files except
|
||||
in compliance with the License. Please see the LICENSE file or obtain a copy
|
||||
of the License at http://www.opencascade.org and read it completely before
|
||||
using this software.
|
||||
|
||||
Packaging
|
||||
---------
|
||||
@@ -38,7 +30,7 @@ You can receive certified version of OCCT code in different packages.
|
||||
building on all officially supported platforms.
|
||||
|
||||
- Binary package (platform-specific): in addition to complete source archive,
|
||||
it includes binaries of OCCT and third-party libraries built on one platform.
|
||||
includes binaries of OCCT and third-party libraries built on one platform.
|
||||
This package allows using OCCT immediately after installation.
|
||||
|
||||
Certified versions of OCCT can be downloaded from http://www.opencascade.org
|
||||
@@ -56,11 +48,9 @@ Open file doc/html/index.html to browse HTML documentation.
|
||||
If HTML documentation is not available in your package, you can:
|
||||
|
||||
- Generate it from sources.
|
||||
|
||||
You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system.
|
||||
and accessible in your environment (check environment variable PATH).
|
||||
Run batch file *gendoc.bat* on Windows or Bash scriot *gendoc.sh* on Linux
|
||||
or Mac OS X to (re)generate documentation.
|
||||
You need to have Tcl and Doxygen 1.8.4 (or above) in PATH.
|
||||
In Tcl prompt, cd to OCCT root folder and run "source dox/start.tcl".
|
||||
On Windows you can also run shortcut batch file *gendoc.bat*.
|
||||
|
||||
- Read documentation in source plain text (MarkDown) format found in
|
||||
subfolder *dox*
|
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
|
||||
rem Setup environment and launch DRAWEXE
|
||||
call "%~dp0env.bat"
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
echo Hint: use "pload ALL" command to load standard commands
|
||||
DRAWEXE.exe
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
source "${aScriptPath}/env.sh"
|
||||
source "${aScriptPath}/env.sh" "$1" "$2"
|
||||
|
||||
echo 'Hint: use "pload ALL" command to load standard commands'
|
||||
DRAWEXE
|
||||
|
@@ -3,57 +3,54 @@ echo off
|
||||
set "SCRIPTROOT=%~dp0"
|
||||
set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
||||
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
|
||||
if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%"
|
||||
@CASROOT_DEFINITION@
|
||||
|
||||
set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%"
|
||||
|
||||
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
|
||||
|
||||
set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
|
||||
if not ["%GL2PS_DIR%"] == [""] set "PATH=%GL2PS_DIR%;%PATH%"
|
||||
|
||||
set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
|
||||
if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%"
|
||||
set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
|
||||
set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
|
||||
|
||||
set "PATH=%FREETYPE_DIR%;%GL2PS_DIR%;%FREEIMAGE_DIR%;%TBB_DIR%;%TCL_DIR%;%PATH%"
|
||||
|
||||
rem ----- Set path to 3rd party and OCCT libraries -----
|
||||
set "PATH=%CASROOT%\bin;%PATH%"
|
||||
set "PATH=%SCRIPTROOT%\@BIN_DIR_POSTFIX@;%PATH%"
|
||||
|
||||
rem ----- Set envoronment variables used by OCCT -----
|
||||
set CSF_LANGUAGE=us
|
||||
set MMGT_CLEAR=1
|
||||
set CSF_EXCEPTION_PROMPT=1
|
||||
set "CSF_SHMessage=%CASROOT%\src\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
|
||||
set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
|
||||
set "CSF_XSMessage=%CASROOT%\src\XSMessage"
|
||||
set "CSF_TObjMessage=%CASROOT%\src\TObj"
|
||||
set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
|
||||
set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
|
||||
set "CSF_SHMessage=@RESOURCE_DIR_PREFIX@\SHMessage"
|
||||
set "CSF_MDTVTexturesDirectory=@RESOURCE_DIR_PREFIX@\Textures"
|
||||
set "CSF_ShadersDirectory=@RESOURCE_DIR_PREFIX@\Shaders"
|
||||
set "CSF_XSMessage=@RESOURCE_DIR_PREFIX@\XSMessage"
|
||||
set "CSF_TObjMessage=@RESOURCE_DIR_PREFIX@\TObj"
|
||||
set "CSF_StandardDefaults=@RESOURCE_DIR_PREFIX@\StdResource"
|
||||
set "CSF_PluginDefaults=@RESOURCE_DIR_PREFIX@\StdResource"
|
||||
set "CSF_XCAFDefaults=@RESOURCE_DIR_PREFIX@\StdResource"
|
||||
set "CSF_TObjDefaults=@RESOURCE_DIR_PREFIX@\StdResource"
|
||||
set "CSF_StandardLiteDefaults=@RESOURCE_DIR_PREFIX@\StdResource"
|
||||
set "CSF_UnitsLexicon=@RESOURCE_DIR_PREFIX@\UnitsAPI\Lexi_Expr.dat"
|
||||
set "CSF_UnitsDefinition=@RESOURCE_DIR_PREFIX@\UnitsAPI\Units.dat"
|
||||
set "CSF_IGESDefaults=@RESOURCE_DIR_PREFIX@\XSTEPResource"
|
||||
set "CSF_STEPDefaults=@RESOURCE_DIR_PREFIX@\XSTEPResource"
|
||||
set "CSF_XmlOcafResource=@RESOURCE_DIR_PREFIX@\XmlOcafResource"
|
||||
set "CSF_MIGRATION_TYPES=@RESOURCE_DIR_PREFIX@\StdResource\MigrationSheet.txt"
|
||||
|
||||
rem Draw Harness special stuff
|
||||
if exist "%CASROOT%\src\DrawResources" (
|
||||
set "DRAWHOME=%CASROOT%\src\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
|
||||
|
||||
if exist "%CASROOT%\src\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
|
||||
if exist "@RESOURCE_DIR_PREFIX@\DrawResources" (
|
||||
set "DRAWHOME=@RESOURCE_DIR_PREFIX@\DrawResources"
|
||||
set "CSF_DrawPluginDefaults=@RESOURCE_DIR_PREFIX@\DrawResources"
|
||||
|
||||
if exist "@RESOURCE_DIR_PREFIX@\DrawResources\DrawDefault" (
|
||||
set "DRAWDEFAULT=@RESOURCE_DIR_PREFIX@\DrawResources\DrawDefault"
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%CASROOT%\src\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
|
||||
)
|
||||
if exist "@RESOURCE_DIR_PREFIX@\DrawResourcesProducts" (
|
||||
set "CSF_DrawPluginProductsDefaults=@RESOURCE_DIR_PREFIX@\DrawResourcesProducts"
|
||||
)
|
||||
|
||||
@RUN_PROJECT@
|
@@ -1,36 +1,30 @@
|
||||
#!/bin/bash
|
||||
echo off
|
||||
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
GL2PS_DIR="@3RDPARTY_GL2PS_DLL_DIR@"
|
||||
|
||||
aLibPath="${CASROOT}/lib"
|
||||
TBB_DIR="@3RDPARTY_TBB_DLL_DIR@"
|
||||
FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
|
||||
TCL_DIR="@3RDPARTY_TCL_DLL_DIR@"
|
||||
|
||||
aLibPath="$aScriptPath/lib"
|
||||
if [ "$TCL_DIR" != "" ]; then
|
||||
aLibPath="${TCL_DIR}:${aLibPath}"
|
||||
fi
|
||||
|
||||
FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
|
||||
if [ "$FREETYPE_DIR" != "" ]; then
|
||||
aLibPath="${FREETYPE_DIR}:${aLibPath}"
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
aLibPath="${TBB_DIR}:${aLibPath}"
|
||||
fi
|
||||
|
||||
FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
||||
if [ "$FREEIMAGE_DIR" != "" ]; then
|
||||
aLibPath="${FREEIMAGE_DIR}:${aLibPath}"
|
||||
fi
|
||||
|
||||
GL2PS_DIR="@3RDPARTY_GL2PS_DLL_DIR@"
|
||||
if [ "$GL2PS_DIR" != "" ]; then
|
||||
aLibPath="${GL2PS_DIR}:${aLibPath}"
|
||||
fi
|
||||
|
||||
TBB_DIR="@3RDPARTY_TBB_DLL_DIR@"
|
||||
if [ "$TBB_DIR" != "" ]; then
|
||||
aLibPath="${TBB_DIR}:${aLibPath}"
|
||||
if [ "$FREETYPE_DIR" != "" ]; then
|
||||
aLibPath="${FREETYPE_DIR}:${aLibPath}"
|
||||
fi
|
||||
|
||||
# ----- Set path to 3rd party and OCCT libraries -----
|
||||
@@ -52,7 +46,7 @@ else
|
||||
fi
|
||||
|
||||
# ----- Set path to OCCT executables -----
|
||||
PATH="${PATH}:${CASROOT}/bin"
|
||||
PATH="${PATH}:$aScriptPath/bin"
|
||||
|
||||
# ----- Setup Environment Variables -----
|
||||
anArch=`uname -m`
|
||||
@@ -69,33 +63,33 @@ fi
|
||||
export CSF_LANGUAGE=us
|
||||
export MMGT_CLEAR=1
|
||||
export CSF_EXCEPTION_PROMPT=1
|
||||
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
||||
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
||||
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
||||
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
||||
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
||||
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
||||
export CSF_SHMessage="${aScriptPath}/res/SHMessage"
|
||||
export CSF_MDTVTexturesDirectory="${aScriptPath}/res/Textures"
|
||||
export CSF_ShadersDirectory="${aScriptPath}/res/Shaders"
|
||||
export CSF_XSMessage="SCRIPTROOT/res/XSMessage"
|
||||
export CSF_TObjMessage="SCRIPTROOT/res/TObj"
|
||||
export CSF_StandardDefaults="${aScriptPath}/res/StdResource"
|
||||
export CSF_PluginDefaults="${aScriptPath}/res/StdResource"
|
||||
export CSF_XCAFDefaults="${aScriptPath}/res/StdResource"
|
||||
export CSF_TObjDefaults="${aScriptPath}/res/StdResource"
|
||||
export CSF_StandardLiteDefaults="${aScriptPath}/res/StdResource"
|
||||
export CSF_UnitsLexicon="${aScriptPath}/res/UnitsAPI/Lexi_Expr.dat"
|
||||
export CSF_UnitsDefinition="${aScriptPath}/res/UnitsAPI/Units.dat"
|
||||
export CSF_IGESDefaults="${aScriptPath}/res/XSTEPResource"
|
||||
export CSF_STEPDefaults="${aScriptPath}/res/XSTEPResource"
|
||||
export CSF_XmlOcafResource="${aScriptPath}/res/XmlOcafResource"
|
||||
export CSF_MIGRATION_TYPES="${aScriptPath}/res/StdResource/MigrationSheet.txt"
|
||||
|
||||
# Draw Harness special stuff
|
||||
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
||||
export DRAWHOME="${CASROOT}/src/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
||||
if [ -e "${aScriptPath}/res/DrawResources" ]; then
|
||||
export DRAWHOME="${aScriptPath}/res/DrawResources"
|
||||
export CSF_DrawPluginDefaults="${aScriptPath}/res/DrawResources"
|
||||
|
||||
if [ -e "${aScriptPath}/res/DrawResources/DrawDefault" ]; then
|
||||
export DRAWDEFAULT="${aScriptPath}/res/DrawResources/DrawDefault"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
||||
if [ -e "${aScriptPath}/res/DrawResourcesProducts" ]; then
|
||||
export CSF_DrawPluginProductsDefaults="${aScriptPath}/res/DrawResourcesProducts"
|
||||
fi
|
@@ -30,7 +30,7 @@
|
||||
|
||||
SET(TBB_DEBUG_POSTFIX "")
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
SET(TBB_DEBUG_POSTFIX "_debug")
|
||||
SET(TBB_DEBUG_POSTFIX "") # _debug postfix removed
|
||||
ENDIF()
|
||||
|
||||
IF("${3RDPARTY_TBB_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TBB_LIBRARY}" STREQUAL "3RDPARTY_TBB_LIBRARY-NOTFOUND")
|
||||
|
@@ -160,4 +160,12 @@ ENDIF()
|
||||
IF(3RDPARTY_TCL_DLL)
|
||||
ELSE()
|
||||
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL)
|
||||
ENDIF()
|
||||
|
||||
IF(INSTALL_TCL)
|
||||
SET(3RDPARTY_TCL_DLL_DIR "")
|
||||
SET(3RDPARTY_TCL_LIB_DIR "")
|
||||
ELSE()
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_DLL_DIR "${3RDPARTY_TCL_DLL}" PATH)
|
||||
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIB_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
|
||||
ENDIF()
|
157
dox/LICENSE.md
Normal file
157
dox/LICENSE.md
Normal file
@@ -0,0 +1,157 @@
|
||||
License {#occt_pubic_license}
|
||||
=======
|
||||
|
||||
## Open CASCADE Technology Public License
|
||||
|
||||
*License version: 6.6* @htmlonly<br />@endhtmlonly
|
||||
*March, 2013*
|
||||
|
||||
Open CASCADE S.A.S. releases and makes publicly available the source code of the software Open CASCADE Technology to the free software development community under the terms and conditions of this license.
|
||||
|
||||
It is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this license has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
|
||||
Please read this license carefully and completely before downloading this software. By downloading, using, modifying, distributing and sublicensing this software, you indicate your acceptance to be bound by the terms and conditions of this license. If you do not want to accept or cannot accept for any reasons the terms and conditions of this license, please do not download or use in any manner this software.
|
||||
|
||||
### 1. Definitions
|
||||
|
||||
Unless there is something in the subject matter or in the context inconsistent therewith, the capitalized terms used in this License shall have the following meaning.
|
||||
|
||||
"Applicable Intellectual Property Rights" means (a) with respect to the Initial Developer, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to the Initial Developer and that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce, modify, distribute or sublicense the Original Code without infringement; and (b) with respect to You or any Contributor, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to You or to such Contributor and that cover subject matter contained in Your Modifications or in such Contributor's Modifications, taken alone or in combination with Original Code.
|
||||
|
||||
"Contributor" means each individual or legal entity that creates or contributes to the creation of any Modification, including the Initial Developer.
|
||||
|
||||
"Derivative Program": means a new program combining the Software or portions thereof with other source code not governed by the terms of this License.
|
||||
|
||||
"Initial Developer": means Open CASCADE S.A.S., with main offices at 1, place des Frères Montgolfier, 78280 Guyancourt, France.
|
||||
|
||||
"Modifications": mean any addition to, deletion from or change to the substance or the structure of the Software. When source code of the Software is released as a series of files, a Modification is: (a) any addition to, deletion from or change to the contents of a file containing the Software or (b) any new file or other representation of computer program statements that contains any part of the Software. By way of example, Modifications include any debug of, or improvement to, the Original Code or any of its components or portions as well as its next versions or releases thereof.
|
||||
|
||||
"Original Code": means (a) the source code of the software Open CASCADE Technology originally made available by the Initial Developer under this License, including the source code of any updates or upgrades of the Original Code and (b) the object code compiled from such source code and originally made available by Initial Developer under this License.
|
||||
|
||||
"Software": means the Original Code, the Modifications, the combination of Original Code and any Modifications or any respective portions thereof.
|
||||
|
||||
"You" or "Your": means an individual or a legal entity exercising rights under this License.
|
||||
|
||||
|
||||
### 2. Acceptance of license
|
||||
|
||||
By using, reproducing, modifying, distributing or sublicensing the Software or any portion thereof, You expressly indicate Your acceptance of the terms and conditions of this License and undertake to act in accordance with all the provisions of this License applicable to You.
|
||||
|
||||
|
||||
### 3. Scope and purpose
|
||||
|
||||
This License applies to the Software and You may not use, reproduce, modify, distribute, sublicense or circulate the Software, or any portion thereof, except as expressly provided under this License. Any attempt to otherwise use, reproduce, modify, distribute or sublicense the Software is void and will automatically terminate Your rights under this License.
|
||||
|
||||
|
||||
### 4. Contributor license
|
||||
|
||||
Subject to the terms and conditions of this License, the Initial Developer and each of the Contributors hereby grant You a world-wide, royalty-free, irrevocable and non-exclusive license under the Applicable Intellectual Property Rights they own or control, to use, reproduce, modify, distribute and sublicense the Software provided that:
|
||||
|
||||
You reproduce in all copies of the Software the copyright and other proprietary notices and disclaimers of the Initial Developer as they appear in the Original Code and attached hereto as Schedule "A" and any other notices or disclaimers attached to the Software and keep intact all notices in the Original Code that refer to this License and to the absence of any warranty;
|
||||
You include a copy of this License with every copy of the Software You distribute;
|
||||
If you distribute or sublicense the Software (as modified by You or on Your behalf as the case may be), You cause such Software to be licensed as a whole, at no charge, to all third parties, under the terms and conditions of the License, making in particular available to all third parties the source code of the Software;
|
||||
You document all Your Modifications, indicate the date of each such Modifications, designate the version of the Software You used, prominently include a file carrying such information with respect to the Modifications and duplicate the copyright and other proprietary notices and disclaimers attached hereto as Schedule "B" or any other notices or disclaimers attached to the Software with your Modifications.
|
||||
|
||||
For greater certainty, it is expressly understood that You may freely create Derivative Programs (without any obligation to publish such Derivative Program) and distribute same as a single product. In such case, You must ensure that all the requirements of this License are fulfilled for the Software or any portion thereof.
|
||||
|
||||
|
||||
### 5. Your license
|
||||
|
||||
You hereby grant all Contributors and anyone who becomes a party under this License a world-wide, non-exclusive, royalty-free and irrevocable license under the Applicable Intellectual Property Rights owned or controlled by You, to use, reproduce, modify, distribute and sublicense all Your Modifications under the terms and conditions of this License.
|
||||
|
||||
|
||||
### 6. Software subject to license
|
||||
|
||||
Your Modifications shall be governed by the terms and conditions of this License. You are not authorized to impose any other terms or conditions than those prevailing under this License when You distribute and/or sublicense the Software, save and except as permitted under Section 7 hereof.
|
||||
|
||||
|
||||
### 7. Additional terms
|
||||
|
||||
You may choose to offer, on a non-exclusive basis, and to charge a fee for any warranty, support, maintenance, liability obligations or other rights consistent with the scope of this License with respect to the Software (the "Additional Terms") to the recipients of the Software. However, You may do so only on Your own behalf and on Your sole and exclusive responsibility. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold the Initial Developer and any Contributor harmless for any liability incurred by or claims asserted against the Initial Developer or any Contributors with respect to any such Additional Terms.
|
||||
|
||||
|
||||
### 8. Disclaimer of warranty
|
||||
|
||||
The Software is provided under this License on an "as is" basis, without warranty of any kind, including without limitation, warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Software is with You.
|
||||
|
||||
|
||||
### 9. Liability
|
||||
|
||||
Under no circumstances shall You, the Initial Developer or any Contributor be liable to any person for any direct or indirect damages of any kind including, without limitation, damages for loss of goodwill, loss of data, work stoppage, computer failure or malfunction or any and all other commercial damages or losses resulting from or relating to this License or indirectly to the use of the Software.
|
||||
|
||||
|
||||
### 10. Trademark
|
||||
|
||||
This License does not grant any rights to use the trademarks, trade names and domain names "MATRA", "EADS Matra Datavision", "CAS.CADE", "Open CASCADE", "opencascade.com" and "opencascade.org" or any other trademarks, trade names or domain names used or owned by the Initial Developer.
|
||||
|
||||
|
||||
### 11. Copyright
|
||||
|
||||
The Initial Developer retains all rights, title and interest in and to the Original Code. You may not remove the copyright (c) notice which appears when You download the Software.
|
||||
|
||||
|
||||
### 12. Term
|
||||
|
||||
This License is granted to You for a term equal to the remaining period of protection covered by the intellectual property rights applicable to the Original Code.
|
||||
|
||||
|
||||
### 13. Termination
|
||||
|
||||
In case of termination, as provided in Section 3 above, You agree to immediately stop any further use, reproduction, modification, distribution and sublicensing of the Software and to destroy all copies of the Software that are in Your possession or control. All sublicenses of the Software which have been properly granted prior to termination shall survive any termination of this License. In addition, Sections 5, 8 to 11, 13.2 and 15.2 of this License, in reason of their nature, shall survive the termination of this License for a period of fifteen (15) years.
|
||||
|
||||
|
||||
### 14. Versions of the license
|
||||
|
||||
The Initial Developer may publish new versions of this License from time to time. Once Original Code has been published under a particular version of this License, You may choose to continue to use it under the terms and conditions of that version or use the Original Code under the terms of any subsequent version of this License published by the Initial Developer.
|
||||
|
||||
|
||||
### 15. Miscellaneous
|
||||
|
||||
#### 15.1 Relationship of Parties
|
||||
|
||||
This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and the Initial Developer, and You will not represent to the contrary, whether expressly, by implication or otherwise.
|
||||
|
||||
#### 15.2 Independent Development
|
||||
|
||||
Nothing in this License will impair the Initial Developer's right to acquire, license, develop, have others develop for it, market or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Derivative Programs, technology or products that You may develop, produce, market or distribute.
|
||||
|
||||
#### 15.3 Severability
|
||||
|
||||
If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and extent.
|
||||
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
#### END OF THE TERMS AND CONDITIONS OF THIS LICENSE
|
||||
|
||||
Open CASCADE S.A.S. is a French société par actions simplifiée having its main offices at 1, place in Frères Montgolfier, 78280 Guyancourt, France. Its web site is located at the following address http://www.opencascade.com
|
||||
|
||||
|
||||
#### Open CASCADE Technology Public License
|
||||
|
||||
#### Schedule "A"
|
||||
|
||||
The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License").
|
||||
You may not use the content of this file except in compliance with the License.
|
||||
Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file. The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Frères Montgolfier, 78280 Guyancourt, France. The Original Code is copyright (c) Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
"The Original Code and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement.
|
||||
|
||||
Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
#### End of Schedule "A"
|
||||
|
||||
|
||||
#### Open CASCADE Technology Public License
|
||||
|
||||
#### Schedule "B"
|
||||
|
||||
"The content of this file is subject to the Open CASCADE Technology Public License Version 6.5 (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at http://www.opencascade.org and read it completely before using this file. The Initial Developer of the Original Code is Open CASCADE S.A.S., with main offices at 1, place des Frères Montgolfier, 78280 Guyancourt, France. The Original Code is copyright (c) Open CASCADE S.A.S., 2001. All rights reserved.
|
||||
|
||||
Modifications to the Original Code have been made by ________________________. Modifications are copyright (c) [Year to be included]. All rights reserved.
|
||||
|
||||
The software Open CASCADE Technology and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. Please see the License for the specific terms and conditions governing rights and limitations under the License".
|
||||
|
||||
#### End of Schedule "B"
|
||||
|
||||
@htmlonly</center>@endhtmlonly
|
@@ -13,7 +13,7 @@ proc OverviewDoc_DetectCasVersion {theCasRoot} {
|
||||
set fh_loaded [read $fh]
|
||||
close $fh
|
||||
regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver
|
||||
regexp {^\s*#\s*define\s+OCC_VERSION_DEVELOPMENT\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver_add
|
||||
regexp {#\s*define\s+OCC_VERSION_DEVELOPMENT\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver_add
|
||||
if { "$occt_ver_add" != "" } { set occt_ver ${occt_ver}.$occt_ver_add }
|
||||
}
|
||||
return $occt_ver
|
||||
@@ -435,7 +435,7 @@ proc OverviewDoc_MakeRefmanTex {fileName latexDir docLabel verboseMode} {
|
||||
puts $texfile "\\vspace*{1cm}"
|
||||
puts $texfile "{\\Large $docLabel}\\\\"
|
||||
puts $texfile "\\vspace*{1cm}"
|
||||
# puts $texfile "{\\large Generated by Doxygen 1.8.4}\\\\"
|
||||
puts $texfile "{\\large Generated by Doxygen 1.8.4}\\\\"
|
||||
puts $texfile "\\vspace*{0.5cm}"
|
||||
puts $texfile "{\\small \\today}\\"
|
||||
puts $texfile "\\end{center}"
|
||||
|
@@ -5,11 +5,11 @@ Overview {#mainpage}
|
||||
|
||||
@section OCCT_OVW_SECTION_1 Welcome
|
||||
|
||||
Welcome to Open CASCADE Technology (OCCT), a software development platform
|
||||
providing services for 3D surface and solid modeling, CAD data exchange, and
|
||||
visualization. Most of OCCT functionality is available in the form of C++
|
||||
libraries. OCCT can be best applied in development of software dealing with 3D
|
||||
modeling (CAD), manufacturing / measuring (CAM) or numerical simulation (CAE).
|
||||
Welcome to Open CASCADE Technology (OCCT), a collection
|
||||
of C++ libraries providing services for 3D surface and solid modeling, CAD data
|
||||
exchange, and visualization. OCCT can be best applied in development of
|
||||
software dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or
|
||||
numerical simulation (CAE).
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
http://www.opencascade.org
|
||||
@@ -19,8 +19,7 @@ http://www.opencascade.org
|
||||
|
||||
@section OCCT_OVW_SECTION_2 Copyrights
|
||||
|
||||
Open CASCADE Technology and all materials, including this documentation, is
|
||||
Copyright (c) 1999-2013 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
Copyright(c) 2001-2013 by OPEN CASCADE S.A.S. All rights reserved.
|
||||
|
||||
@htmlonly<center>@endhtmlonly
|
||||
http://www.opencascade.com
|
||||
@@ -28,22 +27,6 @@ http://www.opencascade.com
|
||||
@image latex /resources/occ_logo.png
|
||||
@htmlonly</center>@endhtmlonly
|
||||
|
||||
License
|
||||
--------
|
||||
|
||||
Open CASCADE Technology is free software; you can redistribute it and / or
|
||||
modify it under the terms of the
|
||||
@ref license_lgpl_21 "GNU Lesser General Public License (LGPL) version 2.1",
|
||||
with additional @ref occt_lgpl_exception "exception".
|
||||
|
||||
Alternatively, Open CASCADE Technology may be used under the terms of Open
|
||||
CASCADE commercial license or contractual agreement.
|
||||
|
||||
Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT
|
||||
WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and
|
||||
materials is on you. See the @ref occt_public_license "license" text for formal
|
||||
disclaimer.
|
||||
|
||||
Trademark information
|
||||
----------------------
|
||||
|
||||
|
@@ -36,4 +36,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
@@ -75,9 +75,9 @@ install (TARGETS Geometry RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${Geometry_SRC_DIR}
|
||||
${Geometry_ISESSION2D_DIR}
|
||||
${Geometry_RESOURCE_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Geometry_RESOURCE_DIR})
|
||||
|
||||
target_link_libraries (Geometry mfcsample)
|
BIN
samples/mfc/standard/01_Geometry/res/Geometry.aps
Executable file
BIN
samples/mfc/standard/01_Geometry/res/Geometry.aps
Executable file
Binary file not shown.
@@ -17,8 +17,7 @@
|
||||
|
||||
CGeometryApp::CGeometryApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Geometry"; //for about dialog
|
||||
SetSamplePath ("..\\..\\01_Geometry");
|
||||
SampleName = "Geometry"; //for about dialog
|
||||
}
|
||||
|
||||
CGeometryApp::~CGeometryApp()
|
||||
|
@@ -9,12 +9,11 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "OCC_BaseDoc.h"
|
||||
#include "ResultDialog.h"
|
||||
|
||||
class Handle_AIS_Point;
|
||||
|
||||
class CGeometryDoc : public OCC_BaseDoc
|
||||
class CGeometryDoc : public CDocument
|
||||
{
|
||||
public:
|
||||
void Put2DOnTop(bool isMax = true);
|
||||
@@ -211,16 +210,26 @@ protected:
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_V3d_Viewer myViewerCollector;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
public :
|
||||
Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };
|
||||
Handle_V3d_Viewer GetViewer() { return myViewer; };
|
||||
Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; };
|
||||
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer2D;
|
||||
Handle_AIS_InteractiveContext myAISContext2D;
|
||||
|
||||
public:
|
||||
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 :
|
||||
|
@@ -79,7 +79,23 @@ CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline
|
||||
|
||||
void CGeometryView::OnFileExportImage()
|
||||
{
|
||||
GetDocument()->ExportView (myView);
|
||||
CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPG)|*.jpg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||", NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
myView->Dump (aDlg.GetPathName());
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
|
||||
void CGeometryView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
|
||||
|
@@ -43,8 +43,8 @@ install (TARGETS Modeling RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${MFC_STANDARD_SAMPLES_DIR}/02_Modeling
|
||||
${Modeling_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Modeling_SRC_DIR})
|
||||
|
||||
target_link_libraries (Modeling mfcsample TKSTEP209 TKSTEPAttr TKSTEPBase TKBO)
|
||||
|
BIN
samples/mfc/standard/02_Modeling/res/Modeling.aps
Executable file
BIN
samples/mfc/standard/02_Modeling/res/Modeling.aps
Executable file
Binary file not shown.
@@ -18,7 +18,6 @@
|
||||
CModelingApp::CModelingApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Modeling"; //for about dialog
|
||||
SetSamplePath ("..\\..\\02_Modeling");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -3,4 +3,4 @@ enum STATE {
|
||||
SELECT_EDGE_PLATE_TGTES_1,
|
||||
SELECT_EDGE_PLATE_TGTES_2,
|
||||
SELECT_EDGE_PLATE_TGTES_3
|
||||
};
|
||||
};
|
@@ -39,8 +39,8 @@ install (TARGETS Viewer2d RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d
|
||||
${Viewer2d_SOURCE_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Viewer2d_SOURCE_DIR})
|
||||
|
||||
target_link_libraries (Viewer2d mfcsample)
|
@@ -1,9 +1,9 @@
|
||||
Viewer2d sample demonstrates how the functionality of TKV3d package can be
|
||||
used for 2D visualization. It provides samples of 2D objects visualization,
|
||||
Viewer2d sample demonstrates how the functionality of TKV3d package can be used
|
||||
for 2D visualization. It provides samples of 2D objects visualization,
|
||||
dynamic selection and highlighting.
|
||||
It illustrates how to:
|
||||
1) implement 2D view behavior with V3d_View class, with interactive zooming
|
||||
and panning of the 2D scene;
|
||||
It illustratea how to:
|
||||
1) implement 2D view behavior with V3d_View class, with interactive zooming and
|
||||
panning of the 2D scene;
|
||||
2) draw 2D primitives like rectangles, lines, curves;
|
||||
3) draw different types of markers;
|
||||
4) draw text defined by its font, height, style, angle;
|
||||
|
BIN
samples/mfc/standard/03_Viewer2d/res/Viewer2d.aps
Executable file
BIN
samples/mfc/standard/03_Viewer2d/res/Viewer2d.aps
Executable file
Binary file not shown.
@@ -22,7 +22,6 @@ static char THIS_FILE[] = __FILE__;
|
||||
CViewer2dApp::CViewer2dApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Viewer2d"; //for about dialog
|
||||
SetSamplePath ("..\\..\\03_Viewer2d");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -27,4 +27,4 @@ public:
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif //(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_)
|
||||
#endif //(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_)
|
@@ -317,110 +317,114 @@ void CViewer2dDoc::OnBUTTONTestCurve()
|
||||
|
||||
void CViewer2dDoc::OnBUTTONTestImage()
|
||||
{
|
||||
CFileDialog anOpenImageDlg (TRUE,
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
SupportedImageFormats() + "| all files (*.*)|*.*;||",
|
||||
NULL);
|
||||
CFileDialog dlg(TRUE,
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"image Files (*.bmp , *.gif , *.jpeg, *.bmp, *.ppm, *.exr, *.tga, *.tiff, *.pgf, *.pdf)"
|
||||
"|*.bmp; *.gif; *.jpeg; *.bmp; *.ppm; *.exr; *.tga; *.tiff; *.pgf; *.pdf;"
|
||||
"| all files (*.*)|*.*;||",
|
||||
NULL );
|
||||
|
||||
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
anInitDir += "\\Data";
|
||||
CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
initdir += "\\Data";
|
||||
|
||||
anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir;
|
||||
if(anOpenImageDlg.DoModal() == IDOK)
|
||||
dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
if(dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
CString aFilePath = anOpenImageDlg.GetPathName();
|
||||
TCollection_AsciiString aFileName (aFilePath);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
CString filename = dlg.GetPathName();
|
||||
TCollection_AsciiString aFileName(filename);
|
||||
|
||||
//erase viewer
|
||||
if(myAISContext->HasOpenedContext())
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->EraseAll();
|
||||
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40,50) ;
|
||||
anImage->SetScale (1.0);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage,3,Standard_False);
|
||||
FitAll2DViews (Standard_True);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(40,50) ;
|
||||
anImage->SetScale(1.0);
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
FitAll2DViews(Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
{
|
||||
CFileDialog anOpenImageDlg (TRUE,
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
SupportedImageFormats() + "| all files (*.*)|*.*;||",
|
||||
NULL);
|
||||
CFileDialog dlg(TRUE,
|
||||
NULL,
|
||||
NULL,
|
||||
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"image Files (*.bmp , *.gif , *.jpeg, *.bmp, *.ppm, *.exr, *.tga, *.tiff, *.pgf, *.pdf)"
|
||||
"|*.bmp; *.gif; *.jpeg; *.bmp; *.ppm; *.exr; *.tga; *.tiff; *.pgf; *.pdf;"
|
||||
"| all files (*.*)|*.*;||",
|
||||
NULL );
|
||||
|
||||
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
anInitDir += "\\Data";
|
||||
CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
initdir += "\\Data";
|
||||
|
||||
anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir;
|
||||
dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
||||
|
||||
if (anOpenImageDlg.DoModal() == IDOK)
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
CString aFilePath = anOpenImageDlg.GetPathName();
|
||||
TCollection_AsciiString aFileName (aFilePath);
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
CString filename = dlg.GetPathName();
|
||||
TCollection_AsciiString aFileName(filename);
|
||||
//erase viewer
|
||||
if(myAISContext->HasOpenedContext())
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->EraseAll();
|
||||
|
||||
//create images
|
||||
{ // 1
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 50);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(40,50) ;
|
||||
anImage->SetScale(0.5);
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 2
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (100, 50);
|
||||
anImage->SetScale (0.9);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
|
||||
anImage->SetCoord(100,50) ;
|
||||
anImage->SetScale(0.9);
|
||||
myAISContext->Display(anImage,Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 3
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (40, 40);
|
||||
anImage->SetScale (0.3);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(40,40) ;
|
||||
anImage->SetScale(0.3);
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 4
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (50, 40);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(50,40) ;
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 5
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (80, 45);
|
||||
anImage->SetScale (2);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(80,45) ;
|
||||
anImage->SetScale(2);
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 6
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (20, -20);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(20,-20) ;
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
{ // 7
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
|
||||
anImage->SetCoord (0, 0);
|
||||
anImage->SetScale (0.5);
|
||||
myAISContext->Display (anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode (anImage, 3, Standard_False);
|
||||
Handle(Sample2D_Image) anImage = new Sample2D_Image(aFileName);
|
||||
anImage->SetCoord(0,0) ;
|
||||
anImage->SetScale(0.5);
|
||||
myAISContext->Display(anImage, Standard_False);
|
||||
myAISContext->SetDisplayMode(anImage,3,Standard_False);
|
||||
}
|
||||
FitAll2DViews (Standard_True); // Update Viewer
|
||||
FitAll2DViews(Standard_True); // Update Viewer
|
||||
}
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ install (TARGETS Viewer3d RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${Viewer3d_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${Viewer3d_SRC_DIR})
|
||||
|
||||
target_link_libraries (Viewer3d mfcsample)
|
@@ -120,18 +120,7 @@ BOOL CModelClippingDlg::OnInitDialog()
|
||||
if (m_ModelClippingONOFF)
|
||||
{
|
||||
// register and activate clipping plane
|
||||
Standard_Boolean toAddPlane = Standard_True;
|
||||
Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (myView->GetClipPlanes());
|
||||
for (; aPlaneIt.More(); aPlaneIt.Next())
|
||||
{
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (toAddPlane)
|
||||
if (!myView->GetClipPlanes().Contains (myClippingPlane))
|
||||
{
|
||||
myView->AddClipPlane (myClippingPlane);
|
||||
}
|
||||
@@ -199,18 +188,7 @@ void CModelClippingDlg::OnCheckModelclippingonoff()
|
||||
if (m_ModelClippingONOFF)
|
||||
{
|
||||
// register and activate clipping plane
|
||||
Standard_Boolean toAddPlane = Standard_True;
|
||||
Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (myView->GetClipPlanes());
|
||||
for (; aPlaneIt.More(); aPlaneIt.Next())
|
||||
{
|
||||
if (aPlaneIt.Value() == myClippingPlane)
|
||||
{
|
||||
toAddPlane = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (toAddPlane)
|
||||
if (!myView->GetClipPlanes().Contains (myClippingPlane))
|
||||
{
|
||||
myView->AddClipPlane (myClippingPlane);
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
enum STATE {
|
||||
FACE_COLOR
|
||||
};
|
||||
};
|
@@ -59,7 +59,7 @@ TexturesExt_Presentation::TexturesExt_Presentation()
|
||||
void TexturesExt_Presentation::DoSample()
|
||||
{
|
||||
((CViewer3dApp*) AfxGetApp())->SetSampleName("Viewer3d");
|
||||
((CViewer3dApp*) AfxGetApp())->SetSamplePath ("..\\..\\04_Viewer3d");
|
||||
((CViewer3dApp*) AfxGetApp())->SetSamplePath("..\\..\\04_Viewer3d");
|
||||
getAISContext()->EraseAll();
|
||||
if (myIndex >=0 && myIndex < myNbSamples)
|
||||
{
|
||||
|
@@ -511,7 +511,7 @@ END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)"
|
||||
ID_DUMP_VIEW "Save current frame into a GIF file\nExport view to GIF (F12)"
|
||||
ID_TEXTURE_ON "Run texture example\nRun texture example"
|
||||
END
|
||||
|
||||
|
@@ -29,7 +29,6 @@ END_MESSAGE_MAP()
|
||||
CViewer3dApp::CViewer3dApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Viewer3d"; //for about dialog
|
||||
SetSamplePath ("..\\..\\03_Viewer3d");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -1057,17 +1057,30 @@ void CViewer3dDoc::OnUpdateBUTTONEnd(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (isTextureSampleStarted);
|
||||
}
|
||||
|
||||
void CViewer3dDoc::OnDumpView()
|
||||
void CViewer3dDoc::OnDumpView()
|
||||
{
|
||||
CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPG)|*.jpg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||", NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;)
|
||||
{
|
||||
CViewer3dView* pView = (CViewer3dView* )GetNextView (aPos);
|
||||
pView->UpdateWindow();
|
||||
}
|
||||
|
||||
myViewer->InitActiveViews();
|
||||
Handle(V3d_View) aView = myViewer->ActiveView();
|
||||
ExportView (aView);
|
||||
aView->Dump (aDlg.GetPathName());
|
||||
}
|
||||
|
||||
void CViewer3dDoc::Start()
|
||||
|
@@ -43,8 +43,8 @@ install (TARGETS ImportExport RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport
|
||||
${ImportExport_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${ImportExport_SRC_DIR})
|
||||
|
||||
target_link_libraries (ImportExport mfcsample)
|
BIN
samples/mfc/standard/05_ImportExport/res/ImportExport.aps
Executable file
BIN
samples/mfc/standard/05_ImportExport/res/ImportExport.aps
Executable file
Binary file not shown.
@@ -1692,4 +1692,4 @@ Storage_Error FSD_Archive::EndReadDataSection()
|
||||
Storage_Position FSD_Archive::Tell()
|
||||
{
|
||||
return 0; //just a stub
|
||||
}
|
||||
}
|
@@ -33,7 +33,6 @@ CImportExportApp::CImportExportApp() : OCC_App()
|
||||
}
|
||||
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
SetSamplePath ("..\\..\\05_ImportExport");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -59,8 +59,8 @@ install (TARGETS Ocaf RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf
|
||||
${Ocaf_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Ocaf_SRC_DIR})
|
||||
|
||||
target_link_libraries (Ocaf mfcsample TKLCAF TKBO)
|
BIN
samples/mfc/standard/06_Ocaf/res/Ocaf.aps
Executable file
BIN
samples/mfc/standard/06_Ocaf/res/Ocaf.aps
Executable file
Binary file not shown.
@@ -35,9 +35,9 @@ END_MESSAGE_MAP()
|
||||
|
||||
COcafApp::COcafApp() : OCC_App()
|
||||
{
|
||||
SetSamplePath("06_Ocaf");
|
||||
myApp = new TOcaf_Application();
|
||||
SampleName = "OCAF"; //for about dialog
|
||||
SetSamplePath ("..\\..\\06_Ocaf");
|
||||
|
||||
try
|
||||
{
|
||||
|
@@ -45,8 +45,8 @@ install (TARGETS Triangulation RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation
|
||||
${Triangulation_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Triangulation_SRC_DIR})
|
||||
|
||||
target_link_libraries (Triangulation mfcsample TKSTEP209 TKSTEPAttr TKBO)
|
BIN
samples/mfc/standard/07_Triangulation/res/Triangulation.aps
Normal file
BIN
samples/mfc/standard/07_Triangulation/res/Triangulation.aps
Normal file
Binary file not shown.
@@ -202,7 +202,7 @@ BEGIN
|
||||
ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)"
|
||||
ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)"
|
||||
ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)"
|
||||
ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)"
|
||||
ID_DUMP_VIEW "Save current frame into a GIF file\nExport view to GIF (F12)"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
@@ -16,7 +16,6 @@
|
||||
CTriangulationApp::CTriangulationApp() : OCC_App()
|
||||
{
|
||||
SampleName = "TopologyTriangulation"; //for about dialog
|
||||
SetSamplePath("..\\..\\07_Triangulation");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -405,17 +405,30 @@ void CTriangulationDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI)
|
||||
pCmdUI->Enable (!myPresentation->AtFirstSample());
|
||||
}
|
||||
|
||||
void CTriangulationDoc::OnDumpView()
|
||||
void CTriangulationDoc::OnDumpView()
|
||||
{
|
||||
CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPEG)|*.jpeg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||", NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;)
|
||||
{
|
||||
OCC_3dView* pView = (OCC_3dView* )GetNextView (aPos);
|
||||
pView->UpdateWindow();
|
||||
}
|
||||
|
||||
myViewer->InitActiveViews();
|
||||
Handle(V3d_View) aView = myViewer->ActiveView();
|
||||
ExportView (aView);
|
||||
aView->Dump (aDlg.GetPathName());
|
||||
}
|
||||
|
||||
void CTriangulationDoc::Fit()
|
||||
|
@@ -67,8 +67,8 @@ install (TARGETS HLR RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${HLR_RESOURCE_DIR}
|
||||
${HLR_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${HLR_SRC_DIR})
|
||||
|
||||
target_link_libraries (HLR mfcsample)
|
@@ -1,12 +0,0 @@
|
||||
HLR sample demonstrates hidden line removal algorithm.
|
||||
It supports exact and polygonal HLR algorihms.
|
||||
|
||||
To try HLR you need to follow some steps:
|
||||
1) to import model, which will displayed in 3d view.
|
||||
2) to choose "File->Process HLR" or press "HLR' button in the toolbar.
|
||||
Dialog with options of HLR will be opened.
|
||||
3) to press "Get shapes" button of the HLR dialog to
|
||||
display results in the 2d view.
|
||||
Optionally, this dialog allow to view chosen shapes
|
||||
in his own view. Here you can choose needed direction
|
||||
of view and press "Update 2d" button to update shapes HLR 2d view.
|
BIN
samples/mfc/standard/08_HLR/res/HLR.APS
Executable file
BIN
samples/mfc/standard/08_HLR/res/HLR.APS
Executable file
Binary file not shown.
@@ -343,7 +343,6 @@ BEGIN
|
||||
MENUITEM "&New\tCtrl+N", ID_FILE_NEW
|
||||
MENUITEM "&Close", ID_FILE_CLOSE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Process HLR", ID_FILE_HLR
|
||||
POPUP "Import"
|
||||
BEGIN
|
||||
MENUITEM "BRep...", ID_FILE_IMPORT_BREP
|
||||
@@ -444,8 +443,7 @@ END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
ID_BUTTON_HLRDialog "Open the HLR dialog \nHLR dialog"
|
||||
ID_FILE_HLR "Open the HLR dialog \nHLR dialog"
|
||||
ID_BUTTON_HLRDialog "Display The HLR Dialog \nHLR Dialog"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
@@ -111,8 +111,7 @@
|
||||
#define IDC_BackView 1534
|
||||
#define IDC_FrontView 1535
|
||||
#define IDC_AxoView 1536
|
||||
#define ID_BUTTON_HLRDialog 1537
|
||||
#define ID_FILE_HLR 1539
|
||||
#define ID_BUTTON_HLRDialog 32795
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
@@ -120,7 +119,7 @@
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 173
|
||||
#define _APS_NEXT_COMMAND_VALUE 32797
|
||||
#define _APS_NEXT_COMMAND_VALUE 32796
|
||||
#define _APS_NEXT_CONTROL_VALUE 1538
|
||||
#define _APS_NEXT_SYMED_VALUE 170
|
||||
#endif
|
||||
|
@@ -28,7 +28,6 @@ static char THIS_FILE[] = __FILE__;
|
||||
CHLRApp::CHLRApp() : OCC_App()
|
||||
{
|
||||
SampleName = "HLR"; //for about dialog
|
||||
SetSamplePath ("..\\..\\08_HLR");
|
||||
}
|
||||
|
||||
CHLRApp::~CHLRApp()
|
||||
|
@@ -30,10 +30,8 @@ BEGIN_MESSAGE_MAP(CHLRDoc, OCC_3dBaseDoc)
|
||||
//{{AFX_MSG_MAP(CHLRDoc)
|
||||
ON_COMMAND(ID_WINDOW_NEW3D, OnWindowNew3d)
|
||||
ON_COMMAND(ID_WINDOW_NEW2D, OnWindowNew2d)
|
||||
ON_COMMAND(ID_FILE_HLR, OnBUTTONHLRDialog)
|
||||
ON_COMMAND(ID_FILE_IMPORT_BREP, OnFileImportBrep)
|
||||
ON_COMMAND(ID_BUTTON_HLRDialog, OnBUTTONHLRDialog)
|
||||
ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase)
|
||||
//}}AFX_MSG_MAP
|
||||
|
||||
|
||||
@@ -85,17 +83,17 @@ CHLRDoc::~CHLRDoc()
|
||||
}
|
||||
}
|
||||
|
||||
void CHLRDoc::OnWindowNew2d()
|
||||
void CHLRDoc::OnWindowNew2d()
|
||||
{
|
||||
((CHLRApp*)AfxGetApp())->CreateView2D(this);
|
||||
((CHLRApp*)AfxGetApp())->CreateView2D(this);
|
||||
}
|
||||
|
||||
void CHLRDoc::OnWindowNew3d()
|
||||
void CHLRDoc::OnWindowNew3d()
|
||||
{
|
||||
((CHLRApp*)AfxGetApp())->CreateView3D(this);
|
||||
((CHLRApp*)AfxGetApp())->CreateView3D(this);
|
||||
}
|
||||
|
||||
// nCmdShow could be : ( default is SW_RESTORE )
|
||||
// nCmdShow could be : ( default is SW_RESTORE )
|
||||
// SW_HIDE SW_SHOWNORMAL SW_NORMAL
|
||||
// SW_SHOWMINIMIZED SW_SHOWMAXIMIZED
|
||||
// SW_MAXIMIZE SW_SHOWNOACTIVATE
|
||||
@@ -156,7 +154,7 @@ void CHLRDoc::Dump(CDumpContext& dc) const
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CHLRDoc commands
|
||||
void CHLRDoc::OnBUTTONHLRDialog()
|
||||
void CHLRDoc::OnBUTTONHLRDialog()
|
||||
{
|
||||
if (!myCSelectionDialogIsCreated)
|
||||
{
|
||||
@@ -164,7 +162,7 @@ void CHLRDoc::OnBUTTONHLRDialog()
|
||||
myCSelectionDialog->Create(CSelectionDialog::IDD, AfxGetMainWnd());
|
||||
myCSelectionDialogIsCreated = true;
|
||||
}
|
||||
myCSelectionDialog->ShowWindow(SW_RESTORE);
|
||||
myCSelectionDialog->ShowWindow(SW_RESTORE);
|
||||
}
|
||||
|
||||
void CHLRDoc::OnFileImportBrep()
|
||||
@@ -183,25 +181,3 @@ void CHLRDoc::Fit()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CHLRDoc::OnObjectErase()
|
||||
{
|
||||
Standard_Boolean toUpdateDisplayable = Standard_False;
|
||||
for (myAISContext->InitCurrent(); myAISContext->MoreCurrent(); myAISContext->NextCurrent())
|
||||
{
|
||||
myAISContext->Erase (myAISContext->Current(), Standard_True);
|
||||
if (myAISContext->Current()->Type() == AIS_KOI_Shape && myCSelectionDialogIsCreated)
|
||||
{
|
||||
myCSelectionDialog->DiplayableShape()->Remove (Handle(AIS_Shape)::DownCast (myAISContext->Current())->Shape());
|
||||
toUpdateDisplayable = Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
myAISContext->ClearCurrents();
|
||||
|
||||
if (toUpdateDisplayable)
|
||||
{
|
||||
// Update view in the HLR dialog if list of displayable shapes has been changed.
|
||||
myCSelectionDialog->UpdateViews();
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,6 @@ protected:
|
||||
afx_msg void OnWindowNew2d();
|
||||
afx_msg void OnFileImportBrep();
|
||||
afx_msg void OnBUTTONHLRDialog();
|
||||
afx_msg void OnObjectErase();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
@@ -22,11 +22,11 @@ static char THIS_FILE[] = __FILE__;
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSelectionDialog dialog
|
||||
|
||||
CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
|
||||
CSelectionDialog::CSelectionDialog(CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CSelectionDialog::IDD, pParent)
|
||||
{
|
||||
myDoc = aDoc;
|
||||
myIsDisplayed = false;
|
||||
myDisplay = false;
|
||||
//{{AFX_DATA_INIT(CSelectionDialog)
|
||||
m_Algo = 0;
|
||||
m_DisplayMode = 0;
|
||||
@@ -36,7 +36,7 @@ CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
void CSelectionDialog::DoDataExchange (CDataExchange* pDX)
|
||||
void CSelectionDialog::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CSelectionDialog)
|
||||
@@ -51,7 +51,7 @@ void CSelectionDialog::DoDataExchange (CDataExchange* pDX)
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSelectionDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(CSelectionDialog)
|
||||
ON_BN_CLICKED(ID_GetShape, OnGetSelectedShapes)
|
||||
ON_BN_CLICKED(ID_GetShape, OnGetShape)
|
||||
ON_BN_CLICKED(IDC_DisplayDefault, OnDisplayDefault)
|
||||
ON_BN_CLICKED(IDC_VIsoParametrics, OnVIsoParametrics)
|
||||
ON_BN_CLICKED(IDC_VApparentContour, OnVApparentContour)
|
||||
@@ -89,172 +89,136 @@ END_MESSAGE_MAP()
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSelectionDialog message handlers
|
||||
|
||||
BOOL CSelectionDialog::OnInitDialog()
|
||||
BOOL CSelectionDialog::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
VERIFY(TopView.AutoLoad (IDC_TopView, this));
|
||||
VERIFY(BottomView.AutoLoad (IDC_BottomView, this)) ;
|
||||
VERIFY(LeftView .AutoLoad (IDC_LeftView , this)) ;
|
||||
VERIFY(RightView .AutoLoad (IDC_RightView , this)) ;
|
||||
VERIFY(FrontView .AutoLoad (IDC_FrontView , this)) ;
|
||||
VERIFY(BackView .AutoLoad (IDC_BackView , this)) ;
|
||||
VERIFY(AxoView .AutoLoad (IDC_AxoView , this)) ;
|
||||
VERIFY(TopView.AutoLoad(IDC_TopView, this));
|
||||
VERIFY(BottomView.AutoLoad(IDC_BottomView, this)) ;
|
||||
VERIFY(LeftView .AutoLoad(IDC_LeftView , this)) ;
|
||||
VERIFY(RightView .AutoLoad(IDC_RightView , this)) ;
|
||||
VERIFY(FrontView .AutoLoad(IDC_FrontView , this)) ;
|
||||
VERIFY(BackView .AutoLoad(IDC_BackView , this)) ;
|
||||
VERIFY(AxoView .AutoLoad(IDC_AxoView , this)) ;
|
||||
|
||||
// get the View Window position to managed mouse move
|
||||
CRect BoxRect,ViewRect;
|
||||
GetWindowRect (BoxRect);
|
||||
CWnd * TheViewerWindow = GetDlgItem (IDC_DUMMYBUTTON);
|
||||
TheViewerWindow->GetWindowRect (ViewRect);
|
||||
GetWindowRect(BoxRect);
|
||||
CWnd * TheViewerWindow = GetDlgItem(IDC_DUMMYBUTTON);
|
||||
TheViewerWindow->GetWindowRect(ViewRect);
|
||||
myPosMinX = ViewRect.TopLeft().x - BoxRect.TopLeft().x;
|
||||
myPosMaxX = ViewRect.Width()+myPosMinX;
|
||||
myPosMinY = ViewRect.TopLeft().y - BoxRect.TopLeft().y;
|
||||
myPosMaxY = myPosMinY + ViewRect.Height();
|
||||
|
||||
ShowHideButton (Standard_False);
|
||||
OnDisplay (true);
|
||||
ShowHideButton(Standard_False);
|
||||
OnDisplay(true);
|
||||
|
||||
// return TRUE unless you set the focus to a control
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CSelectionDialog::OnDisplay (bool isFit)
|
||||
void CSelectionDialog::OnDisplay(bool isFit)
|
||||
{
|
||||
GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw (true);
|
||||
if (!myIsDisplayed)
|
||||
{
|
||||
GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw(true);
|
||||
if(!myDisplay) {
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
myActiveViewer = new V3d_Viewer (aGraphicDriver, (short *) "Visu3D");
|
||||
myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
|
||||
myActiveViewer->SetDefaultLights();
|
||||
myActiveViewer->SetLightOn();
|
||||
myActiveView = myActiveViewer->CreateView();
|
||||
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem (IDC_DUMMYBUTTON)->GetSafeHwnd(),
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(),
|
||||
Quantity_NOC_GRAY);
|
||||
myActiveView->SetComputedMode (m_HlrModeIsOn);
|
||||
myActiveView->SetWindow(aWNTWindow);
|
||||
|
||||
myInteractiveContext = new AIS_InteractiveContext (myActiveViewer);
|
||||
myInteractiveContext = new AIS_InteractiveContext(myActiveViewer);
|
||||
|
||||
// TRIHEDRON
|
||||
Handle(Geom_Axis2Placement) aTrihedronAxis = new Geom_Axis2Placement (gp::XOY());
|
||||
myTrihedron = new AIS_Trihedron (aTrihedronAxis);
|
||||
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
||||
myTrihedron=new AIS_Trihedron(aTrihedronAxis);
|
||||
|
||||
myInteractiveContext->Display (myTrihedron);
|
||||
myInteractiveContext->Display(myTrihedron);
|
||||
}
|
||||
if(isFit)
|
||||
{
|
||||
if(isFit) {
|
||||
myActiveView->ZFitAll();
|
||||
myActiveView->FitAll();
|
||||
}
|
||||
|
||||
myActiveView->Redraw();
|
||||
myIsDisplayed = Standard_True;
|
||||
GetDlgItem (IDC_DUMMYBUTTON)->SetRedraw (false);
|
||||
myDisplay = Standard_True;
|
||||
GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw(false);
|
||||
}
|
||||
|
||||
|
||||
void CSelectionDialog::SetTitle (const CString & aTitle)
|
||||
void CSelectionDialog::SetTitle(CString & aTitle)
|
||||
{
|
||||
SetWindowText (aTitle);
|
||||
SetWindowText(aTitle);
|
||||
}
|
||||
|
||||
void CSelectionDialog::UpdateViews()
|
||||
void CSelectionDialog::OnGetShape()
|
||||
{
|
||||
// Clear HLR dialog view
|
||||
myInteractiveContext->RemoveAll();
|
||||
myInteractiveContext->Display (myTrihedron);
|
||||
|
||||
UpdateProjector();
|
||||
|
||||
// Display chosen shapes in the HLR dialog view.
|
||||
Standard_Boolean OneOrMoreFound = Standard_False;
|
||||
for (myDoc->GetAISContext()->InitCurrent();
|
||||
myDoc->GetAISContext()->MoreCurrent();
|
||||
myDoc->GetAISContext()->NextCurrent())
|
||||
{
|
||||
Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast (myDoc->GetAISContext()->Current());
|
||||
if (!anAISShape.IsNull())
|
||||
{
|
||||
OneOrMoreFound = Standard_True;
|
||||
myInteractiveContext->Display (anAISShape);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply HLR to chosen shapes and display result into the 2d view.
|
||||
Apply();
|
||||
// Update viewer
|
||||
myDoc->FitAll2DViews (Standard_False);
|
||||
// Check the selection: if no object : disable all possiblity.
|
||||
ShowHideButton (OneOrMoreFound);
|
||||
OnDisplay (true);
|
||||
}
|
||||
|
||||
void CSelectionDialog::OnGetSelectedShapes()
|
||||
{
|
||||
// Create new displayable shape.
|
||||
myDisplayableShape = new ISession2D_Shape();
|
||||
UpdateProjector();
|
||||
myDisplayableShape->SetNbIsos (m_NbIsos);
|
||||
|
||||
// Clear HLR dialog view
|
||||
myInteractiveContext->RemoveAll();
|
||||
myInteractiveContext->Display (myTrihedron);
|
||||
|
||||
Standard_Boolean OneOrMoreFound = Standard_False;
|
||||
for (myDoc->GetAISContext()->InitCurrent();
|
||||
myDoc->GetAISContext()->MoreCurrent();
|
||||
myDoc->GetAISContext()->NextCurrent())
|
||||
{
|
||||
Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast (myDoc->GetAISContext()->Current());
|
||||
|
||||
if (!anAISShape.IsNull())
|
||||
{
|
||||
OneOrMoreFound = Standard_True;
|
||||
TopoDS_Shape aShape = anAISShape->Shape();
|
||||
myDisplayableShape->Add (aShape);
|
||||
Handle(AIS_Shape) aSelectedShape = new AIS_Shape (aShape);
|
||||
myInteractiveContext->Display (aSelectedShape);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply HLR to chosen shapes and display result into the 2d view.
|
||||
Apply();
|
||||
// Update viewer
|
||||
myDoc->FitAll2DViews (Standard_False);
|
||||
|
||||
// Check the selection: if no object : disable all possiblity.
|
||||
ShowHideButton (OneOrMoreFound);
|
||||
OnDisplay (true);
|
||||
}
|
||||
|
||||
void CSelectionDialog::Apply()
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
UpdateData(true);
|
||||
myDoc->GetInteractiveContext2D()->RemoveAll();
|
||||
UpdateData (true);
|
||||
myDisplayableShape = new ISession2D_Shape( );
|
||||
UpdateProjector();
|
||||
myDisplayableShape->SetNbIsos(m_NbIsos);
|
||||
|
||||
Standard_Integer aDisplayMode = m_DisplayMode;
|
||||
myInteractiveContext->EraseAll();
|
||||
myInteractiveContext->Display(myTrihedron);
|
||||
|
||||
if (m_Algo == 1)
|
||||
Standard_Boolean OneOrMoreFound = Standard_False;
|
||||
for (myDoc->GetAISContext()->InitCurrent();
|
||||
myDoc->GetAISContext()->MoreCurrent ();
|
||||
myDoc->GetAISContext()->NextCurrent ())
|
||||
{
|
||||
aDisplayMode += 100;
|
||||
Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast(myDoc->GetAISContext()->Current());
|
||||
|
||||
if (!anAISShape.IsNull())
|
||||
{
|
||||
OneOrMoreFound = Standard_True;
|
||||
TopoDS_Shape aShape = anAISShape->Shape();
|
||||
myDisplayableShape->Add( aShape );
|
||||
myInteractiveContext->Display(anAISShape);
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_DrawHiddenLine)
|
||||
{
|
||||
aDisplayMode += 1000;
|
||||
}
|
||||
Standard_Integer DisplayMode = m_DisplayMode;
|
||||
if (m_Algo == 1) DisplayMode+=100;
|
||||
if (!m_DrawHiddenLine) DisplayMode+=1000;
|
||||
|
||||
myDoc->GetInteractiveContext2D()->Display (myDisplayableShape, // object
|
||||
aDisplayMode,
|
||||
aDisplayMode,
|
||||
Standard_True); // Redraw
|
||||
myDoc->GetInteractiveContext2D()->Display(myDisplayableShape, // object
|
||||
DisplayMode, // display mode
|
||||
DisplayMode, // selection mode
|
||||
Standard_True); // Redraw
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_ARROW));
|
||||
myDoc->FitAll2DViews(Standard_False); // Update Viewer
|
||||
|
||||
// check the selection :
|
||||
// if no object : disable all possiblity!!
|
||||
ShowHideButton(OneOrMoreFound);
|
||||
OnDisplay(true);
|
||||
}
|
||||
|
||||
void CSelectionDialog::Apply()
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
myDoc->GetInteractiveContext2D()->RemoveAll();
|
||||
UpdateData(true);
|
||||
|
||||
Standard_Integer DisplayMode = m_DisplayMode;
|
||||
if (m_Algo == 1) DisplayMode+=100;
|
||||
|
||||
if (!m_DrawHiddenLine) DisplayMode+=1000;
|
||||
|
||||
myDoc->GetInteractiveContext2D()->Display(myDisplayableShape, // object
|
||||
DisplayMode,
|
||||
DisplayMode,
|
||||
Standard_True); // Redraw
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
|
||||
void CSelectionDialog::UpdateProjector()
|
||||
@@ -301,10 +265,8 @@ void CSelectionDialog::ShowHideButton(Standard_Boolean EnableButton)
|
||||
|
||||
if(m_Algo == 0)
|
||||
{
|
||||
if (m_DisplayMode == 5 || m_DisplayMode == 10)
|
||||
{
|
||||
m_DisplayMode=0;
|
||||
}
|
||||
if (m_DisplayMode == 5) m_DisplayMode=0;
|
||||
if (m_DisplayMode == 10) m_DisplayMode=0;
|
||||
|
||||
GetDlgItem(IDC_VIsoParametrics)->EnableWindow(false);
|
||||
GetDlgItem(IDC_HIsoParametrics)->EnableWindow(false);
|
||||
@@ -496,7 +458,7 @@ void CSelectionDialog::OnRButtonUp(UINT nFlags, CPoint point)
|
||||
}
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
// reset the good HLR mode according to the stored one
|
||||
// reset tyhe good HLR mode according to the strored one
|
||||
// --> dynamic rotation may have change it
|
||||
myActiveView->SetComputedMode (m_HlrModeIsOn);
|
||||
OnDisplay(false);
|
||||
|
@@ -18,26 +18,18 @@ class CSelectionDialog : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
// standard constructor
|
||||
CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent = NULL);
|
||||
|
||||
void SetTitle (const CString& aTitle);
|
||||
|
||||
void OnDisplay (bool isFit);
|
||||
|
||||
const Handle(ISession2D_Shape) DiplayableShape() { return myDisplayableShape; }
|
||||
|
||||
// Updates in dialog view and main 2d nad 3d views shapes for which HLR presentations are going to be displayed in 2d view.
|
||||
void UpdateViews();
|
||||
void SetTitle(CString& aTitle);
|
||||
CSelectionDialog(CHLRDoc* aDoc,CWnd* pParent = NULL); // standard constructor
|
||||
void OnDisplay(bool isfit);
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CSelectionDialog)
|
||||
enum { IDD = IDD_SelectionDialog };
|
||||
int m_Algo;
|
||||
int m_DisplayMode;
|
||||
int m_NbIsos;
|
||||
BOOL m_DrawHiddenLine;
|
||||
BOOL m_HlrModeIsOn;
|
||||
int m_Algo;
|
||||
int m_DisplayMode;
|
||||
int m_NbIsos;
|
||||
BOOL m_DrawHiddenLine;
|
||||
BOOL m_HlrModeIsOn;
|
||||
//}}AFX_DATA
|
||||
|
||||
// Overrides
|
||||
@@ -53,7 +45,7 @@ protected:
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CSelectionDialog)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnGetSelectedShapes();
|
||||
afx_msg void OnGetShape();
|
||||
afx_msg void OnDisplayDefault();
|
||||
afx_msg void OnVIsoParametrics();
|
||||
afx_msg void OnVApparentContour();
|
||||
@@ -93,32 +85,26 @@ private :
|
||||
void Apply();
|
||||
CHLRDoc* myDoc;
|
||||
|
||||
Handle(AIS_InteractiveContext) myInteractiveContext;
|
||||
Handle(V3d_Viewer) myActiveViewer;
|
||||
Handle(V3d_View) myActiveView;
|
||||
Handle(AIS_Trihedron) myTrihedron;
|
||||
Handle(ISession2D_Shape) myDisplayableShape;
|
||||
|
||||
Standard_Integer myPosMaxX;
|
||||
Standard_Integer myPosMinX;
|
||||
Standard_Integer myBoxX;
|
||||
|
||||
Standard_Integer myPosMinY;
|
||||
Standard_Integer myPosMaxY;
|
||||
Standard_Integer myBoxY;
|
||||
|
||||
Standard_Integer myPosMaxX, myPosMinX ,myBoxX;
|
||||
Standard_Integer myPosMinY, myPosMaxY ,myBoxY;
|
||||
Standard_Integer myXmax;
|
||||
Standard_Integer myYmax;
|
||||
|
||||
Handle(AIS_InteractiveContext) myInteractiveContext;
|
||||
Handle(AIS_Trihedron) myTrihedron;
|
||||
Handle(ISession2D_Shape) myDisplayableShape;
|
||||
|
||||
protected:
|
||||
CBitmapButton TopView;
|
||||
CBitmapButton BottomView;
|
||||
CBitmapButton LeftView;
|
||||
CBitmapButton RightView;
|
||||
CBitmapButton FrontView;
|
||||
CBitmapButton BackView;
|
||||
CBitmapButton AxoView;
|
||||
bool myIsDisplayed;
|
||||
CBitmapButton TopView ;
|
||||
CBitmapButton BottomView ;
|
||||
CBitmapButton LeftView ;
|
||||
CBitmapButton RightView ;
|
||||
CBitmapButton FrontView ;
|
||||
CBitmapButton BackView ;
|
||||
CBitmapButton AxoView ;
|
||||
bool myDisplay;
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
@@ -50,8 +50,8 @@ install (TARGETS Animation RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${Animation_RESOURCE_DIR}
|
||||
${Animation_SRC_DIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${Animation_SRC_DIR})
|
||||
|
||||
target_link_libraries (Animation mfcsample TKBO)
|
BIN
samples/mfc/standard/09_Animation/res/Animation.aps
Executable file
BIN
samples/mfc/standard/09_Animation/res/Animation.aps
Executable file
Binary file not shown.
@@ -26,7 +26,6 @@ END_MESSAGE_MAP()
|
||||
CAnimationApp::CAnimationApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Animation"; //for about dialog
|
||||
SetSamplePath ("..\\..\\09_Animation");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -360,7 +360,7 @@ void CAnimationDoc::OnFileLoadgrid()
|
||||
NULL );
|
||||
|
||||
CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
initdir += "\\Data\\";
|
||||
initdir += "\\..\\..\\Data\\";
|
||||
|
||||
dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
||||
|
@@ -9,83 +9,103 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "OCC_BaseDoc.h"
|
||||
|
||||
#include "AIS_ConnectedInteractive.hxx"
|
||||
#include "Geom_Transformation.hxx"
|
||||
|
||||
|
||||
class CAnimationDoc : public OCC_BaseDoc
|
||||
class CAnimationDoc : public CDocument
|
||||
{
|
||||
public:
|
||||
|
||||
void DragEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Standard_Integer TheState,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void InputEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void MoveEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void ShiftMoveEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void ShiftDragEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Standard_Integer TheState,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void ShiftInputEvent (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Handle(V3d_View)& aView);
|
||||
|
||||
void Popup (const Standard_Integer x,
|
||||
const Standard_Integer y,
|
||||
const Handle(V3d_View)& aView);
|
||||
void DragEvent (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Standard_Integer TheState,
|
||||
const Handle(V3d_View)& aView );
|
||||
void InputEvent (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView );
|
||||
void MoveEvent (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView );
|
||||
void ShiftMoveEvent (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView );
|
||||
void ShiftDragEvent (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Standard_Integer TheState,
|
||||
const Handle(V3d_View)& aView );
|
||||
void ShiftInputEvent(const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView );
|
||||
void Popup (const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView );
|
||||
|
||||
protected: // create from serialization only
|
||||
CAnimationDoc();
|
||||
DECLARE_DYNCREATE(CAnimationDoc)
|
||||
CAnimationDoc();
|
||||
DECLARE_DYNCREATE(CAnimationDoc)
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CAnimationDoc)
|
||||
public:
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
virtual ~CAnimationDoc();
|
||||
virtual ~CAnimationDoc();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
protected:
|
||||
//{{AFX_MSG(CAnimationDoc)
|
||||
afx_msg void OnShading();
|
||||
afx_msg void OnThread();
|
||||
afx_msg void OnFileLoadgrid();
|
||||
afx_msg void OnUpdateWalkWalkthru(CCmdUI* pCmdUI);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
//{{AFX_MSG(CAnimationDoc)
|
||||
afx_msg void OnShading();
|
||||
afx_msg void OnThread();
|
||||
afx_msg void OnFileLoadgrid();
|
||||
afx_msg void OnUpdateWalkWalkthru(CCmdUI* pCmdUI);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public :
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Handle_AIS_Shape myAisCrankArm ;
|
||||
Handle_AIS_Shape myAisCylinderHead ;
|
||||
Handle_AIS_Shape myAisPropeller ;
|
||||
Handle_AIS_Shape myAisPiston ;
|
||||
Handle_AIS_Shape myAisEngineBlock ;
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
public :
|
||||
Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };
|
||||
Handle_V3d_Viewer GetViewer() { return myViewer; };
|
||||
|
||||
Standard_Real myDeviation;
|
||||
Standard_Integer myAngle;
|
||||
|
||||
public:
|
||||
void OnMyTimer();
|
||||
Standard_Integer myCount;
|
||||
Standard_Integer thread;
|
||||
double m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax;
|
||||
BOOL m_bIsGridLoaded;
|
||||
|
||||
private :
|
||||
Handle_AIS_Shape myAisCrankArm ;
|
||||
Handle_AIS_Shape myAisCylinderHead ;
|
||||
Handle_AIS_Shape myAisPropeller ;
|
||||
Handle_AIS_Shape myAisPiston ;
|
||||
Handle_AIS_Shape myAisEngineBlock ;
|
||||
|
||||
Standard_Real myDeviation;
|
||||
Standard_Integer myAngle;
|
||||
|
||||
public :
|
||||
void OnMyTimer();
|
||||
Standard_Integer myCount;
|
||||
Standard_Integer thread;
|
||||
double m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax;
|
||||
BOOL m_bIsGridLoaded;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -225,7 +225,24 @@ CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline
|
||||
// CAnimationView3D message handlers
|
||||
void CAnimationView3D::OnFileExportImage()
|
||||
{
|
||||
GetDocument()->ExportView (myView);
|
||||
CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPEG)|*.jpeg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||",
|
||||
NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
myView->Dump (aDlg.GetPathName());
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
|
||||
void CAnimationView3D::OnSize(UINT /*nType*/, int cx, int cy)
|
||||
|
@@ -67,9 +67,9 @@ install (TARGETS Convert RUNTIME DESTINATION "${INSTALL_DIR}/bin"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/lib")
|
||||
|
||||
include_directories (${OCCT_ROOT}/inc
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common
|
||||
${Convert_SRC_DIR}
|
||||
${ISESSION_SUBDIR}
|
||||
${WNT_SUBDIR}
|
||||
${MFC_STANDARD_SAMPLES_DIR}/Common)
|
||||
${WNT_SUBDIR})
|
||||
|
||||
target_link_libraries (Convert mfcsample)
|
@@ -78,7 +78,6 @@ Convert_Presentation::Convert_Presentation()
|
||||
void Convert_Presentation::DoSample()
|
||||
{
|
||||
((COCCDemoApp*) AfxGetApp())->SetSampleName("Convert");
|
||||
((COCCDemoApp*) AfxGetApp())->SetSamplePath("..\\..\\10_Convert");
|
||||
getAISContext()->EraseAll();
|
||||
if (myIndex >=0 && myIndex < myNbFuncs)
|
||||
(this->*SampleFuncs[myIndex])();
|
||||
|
@@ -352,7 +352,7 @@ BEGIN
|
||||
ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)"
|
||||
ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)"
|
||||
ID_BUTTONShowResult "Press to toggle show of source code on/off\nSource code (F11)"
|
||||
ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)"
|
||||
ID_DUMP_VIEW "Save current frame into a GIF file\nExport view to GIF (F12)"
|
||||
ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)"
|
||||
ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)"
|
||||
ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)"
|
||||
|
@@ -225,15 +225,28 @@ void COCCDemoDoc::OnUpdateBUTTONShowResult(CCmdUI* pCmdUI)
|
||||
|
||||
void COCCDemoDoc::OnDumpView()
|
||||
{
|
||||
CFileDialog aDlg (false, "gif", "OCCView.gif", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPEG)|*.jpeg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||", NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;)
|
||||
{
|
||||
COCCDemoView* pView = (COCCDemoView* )GetNextView (aPos);
|
||||
pView->UpdateWindow();
|
||||
}
|
||||
|
||||
myViewer->InitActiveViews();
|
||||
Handle(V3d_View) aView = myViewer->ActiveView();
|
||||
ExportView (aView);
|
||||
aView->Dump (aDlg.GetPathName());
|
||||
}
|
||||
|
||||
void COCCDemoDoc::Fit()
|
||||
|
@@ -9,13 +9,14 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <OCC_BaseDoc.h>
|
||||
#include "ResultDialog.h"
|
||||
class OCCDemo_Presentation;
|
||||
|
||||
class COCCDemoDoc : public OCC_BaseDoc
|
||||
class COCCDemoDoc : public CDocument
|
||||
{
|
||||
public:
|
||||
Handle_V3d_Viewer GetViewer() const { return myViewer; };
|
||||
Handle_AIS_InteractiveContext GetAISContext() const { return myAISContext; };
|
||||
CResultDialog* GetResultDialog () {return &myCResultDialog;}
|
||||
Standard_CString GetDataDir() {return myDataDir;}
|
||||
|
||||
@@ -71,6 +72,8 @@ protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
OCCDemo_Presentation *myPresentation;
|
||||
CResultDialog myCResultDialog;
|
||||
BOOL myShowResult;
|
||||
|
@@ -142,13 +142,13 @@ void CAngleParamsVerticesPage::OnBnClickedVertex3Btn()
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
anAngleDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (anAngleDim->IsUnitsDisplayed())
|
||||
{
|
||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
if ((anAngleDim->GetDisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
if ((anAngleDim->DisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
{
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (Standard_False);
|
||||
anAngleDim->MakeUnitsDisplayed (Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
0
samples/mfc/standard/Common/AngleParamsVerticesPage.h
Executable file → Normal file
0
samples/mfc/standard/Common/AngleParamsVerticesPage.h
Executable file → Normal file
@@ -9,7 +9,6 @@
|
||||
#include "LengthParamsEdgesPage.h"
|
||||
#include "AngleParamsVerticesPage.h"
|
||||
#include "RadiusParamsPage.h"
|
||||
#include "ParamsFacesPage.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
@@ -31,7 +30,6 @@ BEGIN_MESSAGE_MAP(CDimensionDlg, CDialog)
|
||||
ON_BN_CLICKED(IDC_2DText, &CDimensionDlg::OnBnClicked2dText)
|
||||
ON_BN_CLICKED(IDC_3DText, &CDimensionDlg::OnBnClicked3dText)
|
||||
ON_BN_CLICKED(IDC_DimensionColor, &CDimensionDlg::OnBnClickedDimensionColor)
|
||||
ON_WM_CLOSE()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//=======================================================================
|
||||
@@ -173,8 +171,6 @@ void CDimensionDlg::CreateLengthParamsTab()
|
||||
myLengthParams->InsertItem (1, &aTabItem);
|
||||
aTabItem.pszText = "Parallel edges";
|
||||
myLengthParams->InsertItem (2, &aTabItem);
|
||||
aTabItem.pszText = "Parallel faces";
|
||||
myLengthParams->InsertItem (3, &aTabItem);
|
||||
|
||||
CLengthParamsEdgePage *aPage1 = new CLengthParamsEdgePage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
@@ -190,7 +186,6 @@ void CDimensionDlg::CreateLengthParamsTab()
|
||||
myLengthParams->SetItem (1, &aTabItem);
|
||||
VERIFY (aPage2->Create (CLengthParamsVerticesPage::IDD,myLengthParams));
|
||||
aPage2->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage2->ShowWindow (SW_HIDE);
|
||||
|
||||
CLengthParamsEdgesPage *aPage3 = new CLengthParamsEdgesPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
@@ -198,15 +193,6 @@ void CDimensionDlg::CreateLengthParamsTab()
|
||||
myLengthParams->SetItem (2, &aTabItem);
|
||||
VERIFY (aPage3->Create (CLengthParamsEdgesPage::IDD,myLengthParams));
|
||||
aPage3->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage3->ShowWindow (SW_HIDE);
|
||||
|
||||
CParamsFacesPage *aPage4 = new CParamsFacesPage (myAISContext);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage4;
|
||||
myLengthParams->SetItem (3, &aTabItem);
|
||||
VERIFY (aPage4->Create (CParamsFacesPage::IDD,myLengthParams));
|
||||
aPage4->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage4->ShowWindow (SW_HIDE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -222,8 +208,6 @@ void CDimensionDlg::CreateAngleParamsTab()
|
||||
myAngleParams->InsertItem (0, &aTabItem);
|
||||
aTabItem.pszText = "Three vertices";
|
||||
myAngleParams->InsertItem (1, &aTabItem);
|
||||
aTabItem.pszText = "Two faces";
|
||||
myAngleParams->InsertItem (2, &aTabItem);
|
||||
|
||||
CLengthParamsEdgesPage *aPage1 = new CLengthParamsEdgesPage (myAISContext, true);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
@@ -239,15 +223,6 @@ void CDimensionDlg::CreateAngleParamsTab()
|
||||
myAngleParams->SetItem (1, &aTabItem);
|
||||
VERIFY (aPage2->Create (CAngleParamsVerticesPage::IDD,myAngleParams));
|
||||
aPage2->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage2->ShowWindow (SW_HIDE);
|
||||
|
||||
CParamsFacesPage *aPage3 = new CParamsFacesPage (myAISContext, true);
|
||||
aTabItem.mask = TCIF_PARAM;
|
||||
aTabItem.lParam = (LPARAM)aPage3;
|
||||
myAngleParams->SetItem (2, &aTabItem);
|
||||
VERIFY (aPage3->Create (CParamsFacesPage::IDD,myAngleParams));
|
||||
aPage3->SetWindowPos (NULL,10,30,0,0,SWP_NOSIZE | SWP_NOZORDER);
|
||||
aPage3->ShowWindow (SW_HIDE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -300,22 +275,7 @@ void CDimensionDlg::UpdateStandardModeForAngle()
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetCurSel();
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
TopAbs_ShapeEnum aMode;
|
||||
|
||||
if (aTabNum == 1)
|
||||
{
|
||||
aMode = TopAbs_VERTEX;
|
||||
}
|
||||
else if (aTabNum == 2)
|
||||
{
|
||||
aMode = TopAbs_FACE;
|
||||
}
|
||||
else
|
||||
{
|
||||
aMode = TopAbs_EDGE;
|
||||
}
|
||||
|
||||
myAISContext->ActivateStandardMode (aMode);
|
||||
myAISContext->ActivateStandardMode (aTabNum == 1 ? TopAbs_VERTEX : TopAbs_EDGE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -328,21 +288,7 @@ void CDimensionDlg::UpdateStandardModeForLength()
|
||||
int aTabNum = ((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetCurSel();
|
||||
myAISContext->CloseAllContexts();
|
||||
myAISContext->OpenLocalContext();
|
||||
TopAbs_ShapeEnum aMode;
|
||||
|
||||
if (aTabNum == 1)
|
||||
{
|
||||
aMode = TopAbs_VERTEX;
|
||||
}
|
||||
else if (aTabNum == 3)
|
||||
{
|
||||
aMode = TopAbs_FACE;
|
||||
}
|
||||
else
|
||||
{
|
||||
aMode = TopAbs_EDGE;
|
||||
}
|
||||
myAISContext->ActivateStandardMode (aMode);
|
||||
myAISContext->ActivateStandardMode (aTabNum == 1 ? TopAbs_VERTEX : TopAbs_EDGE);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -554,12 +500,11 @@ void CDimensionDlg::OnDestroy()
|
||||
{
|
||||
myAISContext->CloseAllContexts();
|
||||
}
|
||||
// Destroy length tab
|
||||
CWnd *aWnd;
|
||||
TC_ITEM anItem;
|
||||
anItem.mask = TCIF_PARAM;
|
||||
|
||||
// Destroy length tab
|
||||
for (int i = 3; i >= 0; --i)
|
||||
for (int i = 2; i >= 0; --i)
|
||||
{
|
||||
((CTabCtrl*) GetDlgItem (IDC_LengthTab))->GetItem (i, &anItem);
|
||||
ASSERT (anItem.lParam);
|
||||
@@ -568,7 +513,7 @@ void CDimensionDlg::OnDestroy()
|
||||
delete aWnd;
|
||||
}
|
||||
// Destroy angle tab
|
||||
for (int i = 2; i >= 0; --i)
|
||||
for (int i = 1; i >= 0; --i)
|
||||
{
|
||||
((CTabCtrl*) GetDlgItem (IDC_AngleTab))->GetItem (i, &anItem);
|
||||
ASSERT(anItem.lParam);
|
||||
@@ -577,20 +522,6 @@ void CDimensionDlg::OnDestroy()
|
||||
delete aWnd;
|
||||
}
|
||||
|
||||
// Destroy radius tab
|
||||
((CTabCtrl*) GetDlgItem (IDC_RadiusTab))->GetItem (0, &anItem);
|
||||
ASSERT(anItem.lParam);
|
||||
aWnd = (CWnd*) anItem.lParam;
|
||||
aWnd->DestroyWindow();
|
||||
delete aWnd;
|
||||
|
||||
// Destroy diameter tab
|
||||
((CTabCtrl*) GetDlgItem (IDC_DiameterTab))->GetItem (0, &anItem);
|
||||
ASSERT(anItem.lParam);
|
||||
aWnd = (CWnd*) anItem.lParam;
|
||||
aWnd->DestroyWindow();
|
||||
delete aWnd;
|
||||
|
||||
CDialog::OnDestroy();
|
||||
}
|
||||
|
||||
@@ -753,12 +684,3 @@ const Quantity_Color CDimensionDlg::GetDimensionColor() const
|
||||
{
|
||||
return myDimensionColor;
|
||||
}
|
||||
|
||||
void CDimensionDlg::OnClose()
|
||||
{
|
||||
if (myAISContext->HasOpenedContext())
|
||||
{
|
||||
myAISContext->CloseAllContexts();
|
||||
}
|
||||
CDialog::OnClose();
|
||||
}
|
||||
|
1
samples/mfc/standard/Common/DimensionDlg.h
Executable file → Normal file
1
samples/mfc/standard/Common/DimensionDlg.h
Executable file → Normal file
@@ -76,5 +76,4 @@ public:
|
||||
afx_msg void OnBnClicked2dText();
|
||||
afx_msg void OnBnClicked3dText();
|
||||
afx_msg void OnBnClickedDimensionColor();
|
||||
afx_msg void OnClose();
|
||||
};
|
||||
|
@@ -21,24 +21,7 @@ void ISession2D_Shape::Add(const TopoDS_Shape& aShape)
|
||||
Update(); // protected method used to specify that the presentation are not up to date
|
||||
}
|
||||
|
||||
void ISession2D_Shape::Remove (const TopoDS_Shape& theShape)
|
||||
{
|
||||
if (myListOfShape.Size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (NCollection_List<TopoDS_Shape>::Iterator anIt (myListOfShape); anIt.More(); anIt.Next())
|
||||
{
|
||||
if (anIt.Value() == theShape)
|
||||
{
|
||||
myListOfShape.Remove (anIt);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ISession2D_Shape::SetProjector (HLRAlgo_Projector& aProjector)
|
||||
void ISession2D_Shape::SetProjector(HLRAlgo_Projector& aProjector)
|
||||
{
|
||||
myProjector= aProjector;
|
||||
myAlgo.Nullify();
|
||||
@@ -65,7 +48,7 @@ void ISession2D_Shape::SetNbIsos(Standard_Integer& aNbIsos)
|
||||
void ISession2D_Shape::BuildAlgo()
|
||||
{
|
||||
myAlgo = new HLRBRep_Algo();
|
||||
NCollection_List<TopoDS_Shape>::Iterator anIterator(myListOfShape);
|
||||
TopTools_ListIteratorOfListOfShape anIterator(myListOfShape);
|
||||
for (;anIterator.More();anIterator.Next()) myAlgo->Add(anIterator.Value(),myNbIsos);
|
||||
myAlgo->Projector(myProjector);
|
||||
myAlgo->Update();
|
||||
@@ -75,7 +58,7 @@ void ISession2D_Shape::BuildAlgo()
|
||||
void ISession2D_Shape::BuildPolyAlgo()
|
||||
{
|
||||
myPolyAlgo = new HLRBRep_PolyAlgo();
|
||||
NCollection_List<TopoDS_Shape>::Iterator anIterator(myListOfShape);
|
||||
TopTools_ListIteratorOfListOfShape anIterator(myListOfShape);
|
||||
for (;anIterator.More();anIterator.Next()) myPolyAlgo->Load(anIterator.Value());
|
||||
myPolyAlgo->Projector(myProjector);
|
||||
myPolyAlgo->Update();
|
||||
|
@@ -1,71 +1,65 @@
|
||||
#ifndef _ISession2D_Shape_HeaderFile
|
||||
#define _ISession2D_Shape_HeaderFile
|
||||
|
||||
#include "AIS_InteractiveObject.hxx"
|
||||
#include "Graphic3d_ArrayOfPolylines.hxx"
|
||||
#include <HLRAlgo_Projector.hxx>
|
||||
#include <HLRBRep_Algo.hxx>
|
||||
#include <HLRBRep_PolyAlgo.hxx>
|
||||
#include <NCollection_List.hxx>
|
||||
#include "SelectMgr_SelectableObject.hxx"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_DefineHandle.hxx>
|
||||
#include "TopoDS_Shape.hxx"
|
||||
|
||||
#include "SelectMgr_SelectableObject.hxx"
|
||||
#include "Graphic3d_ArrayOfPolylines.hxx"
|
||||
#include "AIS_InteractiveObject.hxx"
|
||||
|
||||
#include <HLRAlgo_Projector.hxx>
|
||||
#include <HLRBRep_Algo.hxx>
|
||||
#include <HLRBRep_PolyAlgo.hxx>
|
||||
|
||||
DEFINE_STANDARD_HANDLE(ISession2D_Shape,AIS_InteractiveObject)
|
||||
|
||||
class ISession2D_Shape : public AIS_InteractiveObject
|
||||
{
|
||||
public:
|
||||
Standard_EXPORT ISession2D_Shape ();
|
||||
|
||||
// Adds shape to the list of topological shapes
|
||||
void Standard_EXPORT Add (const TopoDS_Shape& aShape);
|
||||
|
||||
// Removes shape from the list of shapes.
|
||||
// It is used in case of shapes erasing.
|
||||
void Standard_EXPORT Remove (const TopoDS_Shape& theShape);
|
||||
// Returns myProjector
|
||||
HLRAlgo_Projector& Projector() { return myProjector;};
|
||||
|
||||
Standard_EXPORT void SetProjector (HLRAlgo_Projector& aProjector);
|
||||
|
||||
|
||||
Standard_Integer& NbIsos() { return myNbIsos;};
|
||||
|
||||
Standard_EXPORT void SetNbIsos (Standard_Integer& aNbIsos);
|
||||
|
||||
Standard_Boolean AcceptShapeDecomposition() {return Standard_True;}
|
||||
|
||||
virtual Standard_Boolean AcceptSelectionMode (const Standard_Integer /*aMode*/) const
|
||||
{ return Standard_True; }
|
||||
class ISession2D_Shape : public AIS_InteractiveObject {
|
||||
|
||||
public:
|
||||
DEFINE_STANDARD_RTTI(ISession2D_Shape)
|
||||
Standard_EXPORT ISession2D_Shape ();
|
||||
void Standard_EXPORT Add(const TopoDS_Shape& aShape);
|
||||
|
||||
HLRAlgo_Projector& Projector() { return myProjector; }
|
||||
Standard_EXPORT void SetProjector(HLRAlgo_Projector& aProjector);
|
||||
|
||||
private:
|
||||
void BuildAlgo();
|
||||
void BuildPolyAlgo();
|
||||
Standard_Integer myNbIsos;
|
||||
|
||||
void DrawCompound (const Handle(Prs3d_Presentation)& thePresentation,
|
||||
const TopoDS_Shape& theCompound,
|
||||
const Handle(Prs3d_LineAspect) theAspect);
|
||||
public :
|
||||
Standard_Integer& NbIsos() { return myNbIsos;};
|
||||
Standard_EXPORT void SetNbIsos(Standard_Integer& aNbIsos) ;
|
||||
|
||||
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
|
||||
const Handle(Prs3d_Presentation)& thePresentation,
|
||||
const Standard_Integer theMode = 0);
|
||||
Standard_Boolean AcceptShapeDecomposition() {return Standard_True;}
|
||||
|
||||
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection,
|
||||
const Standard_Integer aMode);
|
||||
virtual Standard_Boolean AcceptSelectionMode(const Standard_Integer /*aMode*/) const
|
||||
{return Standard_True; }
|
||||
|
||||
private:
|
||||
DEFINE_STANDARD_RTTI(ISession2D_Shape)
|
||||
|
||||
Standard_Integer myNbIsos;
|
||||
NCollection_List<TopoDS_Shape> myListOfShape;
|
||||
HLRAlgo_Projector myProjector;
|
||||
Handle(HLRBRep_Algo) myAlgo;
|
||||
Handle(HLRBRep_PolyAlgo) myPolyAlgo;
|
||||
private:
|
||||
void BuildAlgo();
|
||||
void BuildPolyAlgo();
|
||||
|
||||
void DrawCompound(const Handle(Prs3d_Presentation)& thePresentation,
|
||||
const TopoDS_Shape& theCompound,
|
||||
const Handle(Prs3d_LineAspect) theAspect);
|
||||
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
|
||||
const Handle(Prs3d_Presentation)& thePresentation,
|
||||
const Standard_Integer theMode = 0);
|
||||
|
||||
virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
|
||||
|
||||
private :
|
||||
TopTools_ListOfShape myListOfShape;
|
||||
HLRAlgo_Projector myProjector;
|
||||
Handle(HLRBRep_Algo) myAlgo;
|
||||
Handle(HLRBRep_PolyAlgo) myPolyAlgo;
|
||||
};
|
||||
|
||||
|
||||
// other inCurve functions and methods (like "C++: function call" methods)
|
||||
//
|
||||
|
||||
|
@@ -96,8 +96,8 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
0
samples/mfc/standard/Common/LengthParamsEdgePage.h
Executable file → Normal file
0
samples/mfc/standard/Common/LengthParamsEdgePage.h
Executable file → Normal file
@@ -127,13 +127,13 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
// Build an angle dimension between two non-parallel edges
|
||||
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (myFirstEdge, mySecondEdge);
|
||||
anAngleDim->SetDimensionAspect (anAspect);
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
anAngleDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (anAngleDim->IsUnitsDisplayed())
|
||||
{
|
||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||
if ((anAngleDim->GetDisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
if ((anAngleDim->DisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
{
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (Standard_False);
|
||||
anAngleDim->MakeUnitsDisplayed (Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -148,8 +148,8 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
{
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstEdge, mySecondEdge, aPlane->Pln());
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
|
0
samples/mfc/standard/Common/LengthParamsEdgesPage.h
Executable file → Normal file
0
samples/mfc/standard/Common/LengthParamsEdgesPage.h
Executable file → Normal file
@@ -117,8 +117,8 @@ void CLengthParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
aLenDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->IsUnitsDisplayed ())
|
||||
{
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||
}
|
||||
|
0
samples/mfc/standard/Common/LengthParamsVerticesPage.h
Executable file → Normal file
0
samples/mfc/standard/Common/LengthParamsVerticesPage.h
Executable file → Normal file
@@ -121,7 +121,36 @@ void OCC_2dView::OnInitialUpdate()
|
||||
|
||||
void OCC_2dView::OnFileExportImage()
|
||||
{
|
||||
GetDocument()->ExportView (myV2dView);
|
||||
LPCTSTR filter;
|
||||
filter = _T("EXR Files (*.EXR)|*.exr|TGA Files (*.TGA)|*.tga|TIFF Files (*.TIFF)|*.tiff|"
|
||||
"PPM Files (*.PPM)|*.ppm|JPEG Files(*.JPEG)|*.jpeg|PNG Files (*.PNG)|*.png|"
|
||||
"GIF Files (*.GIF)|*.gif|BMP Files (*.BMP)|*.bmp|PS Files (*.PS)|*.ps|"
|
||||
"EPS Files (*.EPS)|*.eps|TEX Files (*.TEX)|*.tex|PDF Files (*.PDF)|*.pdf"
|
||||
"|SVG Files (*.SVG)|*.svg|PGF Files (*.PGF)|*.pgf|EMF Files (*.EMF)|*.emf||");
|
||||
CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
filter,
|
||||
NULL );
|
||||
|
||||
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
CString aFileName = dlg.GetPathName();
|
||||
CString ext = dlg.GetFileExt();
|
||||
if (!(ext.CompareNoCase("ps")) || !(ext.CompareNoCase("emf"))
|
||||
|| !(ext.CompareNoCase("pdf")) || !(ext.CompareNoCase("eps"))
|
||||
|| !(ext.CompareNoCase("tex")) || !(ext.CompareNoCase("svg"))
|
||||
|| !(ext.CompareNoCase("pgf")))
|
||||
{
|
||||
Graphic3d_ExportFormat exFormat;
|
||||
if (!(ext.CompareNoCase("ps"))) exFormat = Graphic3d_EF_PostScript;
|
||||
else exFormat = Graphic3d_EF_EnhPostScript;
|
||||
myV2dView->View()->Export( aFileName, exFormat );
|
||||
return;
|
||||
}
|
||||
myV2dView->Dump(aFileName);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -274,26 +274,21 @@ void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI)
|
||||
if (myAISContext->IsDisplayed(myAISContext->Current(),0)
|
||||
||myAISContext->IsDisplayed(myAISContext->Current(),1))
|
||||
OneOrMoreIsShadingOrWireframe=true;
|
||||
pCmdUI->Enable (OneOrMoreIsShadingOrWireframe);
|
||||
pCmdUI->Enable (OneOrMoreIsShadingOrWireframe);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectErase()
|
||||
{
|
||||
for (myAISContext->InitCurrent(); myAISContext->MoreCurrent(); myAISContext->NextCurrent())
|
||||
{
|
||||
myAISContext->Erase (myAISContext->Current(), Standard_True);
|
||||
}
|
||||
myAISContext->ClearCurrents();
|
||||
for(myAISContext->InitCurrent();myAISContext->MoreCurrent();myAISContext->NextCurrent())
|
||||
myAISContext->Erase(myAISContext->Current(),Standard_True);
|
||||
myAISContext->ClearCurrents();
|
||||
}
|
||||
void OCC_3dBaseDoc::OnUpdateObjectErase(CCmdUI* pCmdUI)
|
||||
{
|
||||
bool OneOrMoreIsDisplayed = false;
|
||||
for (myAISContext->InitCurrent(); myAISContext->MoreCurrent(); myAISContext->NextCurrent())
|
||||
{
|
||||
if (myAISContext->IsDisplayed (myAISContext->Current()))
|
||||
OneOrMoreIsDisplayed = true;
|
||||
}
|
||||
pCmdUI->Enable (OneOrMoreIsDisplayed);
|
||||
for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ())
|
||||
if (myAISContext->IsDisplayed(myAISContext->Current())) OneOrMoreIsDisplayed=true;
|
||||
pCmdUI->Enable (OneOrMoreIsDisplayed);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectWireframe()
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include "DimensionDlg.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
|
||||
class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc
|
||||
class AFX_EXT_CLASS OCC_3dBaseDoc : public OCC_BaseDoc
|
||||
{
|
||||
protected:
|
||||
CDimensionDlg myDimensionDlg;
|
||||
|
@@ -146,7 +146,33 @@ OCC_3dDoc* OCC_3dView::GetDocument() // non-debug version is inline
|
||||
// OCC_3dView message handlers
|
||||
void OCC_3dView::OnFileExportImage()
|
||||
{
|
||||
GetDocument()->ExportView (myView);
|
||||
LPCTSTR filter;
|
||||
filter = _T("EXR Files (*.EXR)|*.exr|TGA Files (*.TGA)|*.tga|TIFF Files (*.TIFF)|*.tiff|"
|
||||
"PPM Files (*.PPM)|*.ppm|JPEG Files(*.JPEG)|*.jpeg|PNG Files (*.PNG)|*.png|"
|
||||
"GIF Files (*.GIF)|*.gif|BMP Files (*.BMP)|*.bmp|PS Files (*.PS)|*.ps|"
|
||||
"EPS Files (*.EPS)|*.eps|TEX Files (*.TEX)|*.tex|PDF Files (*.PDF)|*.pdf"
|
||||
"|SVG Files (*.SVG)|*.svg|PGF Files (*.PGF)|*.pgf|EMF Files (*.EMF)|*.emf||");
|
||||
CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
filter,
|
||||
NULL );
|
||||
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
CString aFileName = dlg.GetPathName();
|
||||
CString ext = dlg.GetFileExt();
|
||||
if (!(ext.CompareNoCase("ps")) || !(ext.CompareNoCase("emf"))
|
||||
|| !(ext.CompareNoCase("pdf")) || !(ext.CompareNoCase("eps"))
|
||||
|| !(ext.CompareNoCase("tex")) || !(ext.CompareNoCase("svg"))
|
||||
|| !(ext.CompareNoCase("pgf")))
|
||||
{
|
||||
Graphic3d_ExportFormat exFormat;
|
||||
if (!(ext.CompareNoCase("ps"))) exFormat = Graphic3d_EF_PostScript;
|
||||
else exFormat = Graphic3d_EF_EnhPostScript;
|
||||
myView->View()->Export( aFileName, exFormat );
|
||||
return;
|
||||
}
|
||||
myView->Dump(aFileName);
|
||||
}
|
||||
}
|
||||
|
||||
void OCC_3dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
|
||||
|
@@ -129,24 +129,24 @@ BOOL CAboutDlgStd::OnInitDialog(){
|
||||
|
||||
Title->SetWindowText(strTitle);
|
||||
SetWindowText(dlgTitle);
|
||||
|
||||
CWnd* aReadmeEdit = GetDlgItem(IDC_README);
|
||||
CFile aFile;
|
||||
CString aHelpFilePath = CString (((OCC_App*)AfxGetApp())->GetInitDataDir()) + "\\README.txt";
|
||||
if(aFile.Open (aHelpFilePath, CFile::modeRead))
|
||||
if(SampleName.Find("Viewer2d")==-1)
|
||||
{
|
||||
aReadmeEdit->ShowWindow(TRUE);
|
||||
UINT aFileLength = (UINT)aFile.GetLength();
|
||||
char* buffer=new char[aFileLength];
|
||||
aFile.Read(buffer,aFileLength);
|
||||
ReadmeText.SetString(buffer);
|
||||
ReadmeText.SetAt(aFileLength,'\0');
|
||||
ReadmeText.Replace("\n","\r\n");
|
||||
UpdateData(FALSE);
|
||||
CWnd* aReadmeEdit = GetDlgItem(IDC_README);
|
||||
aReadmeEdit->ShowWindow(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
aReadmeEdit->ShowWindow(FALSE);
|
||||
CFile aFile;
|
||||
if(aFile.Open("..//..//..//README.txt",CFile::modeRead))
|
||||
{
|
||||
UINT aFileLength = (UINT)aFile.GetLength();
|
||||
char* buffer=new char[aFileLength];
|
||||
aFile.Read(buffer,aFileLength);
|
||||
ReadmeText.SetString(buffer);
|
||||
ReadmeText.SetAt(aFileLength,'\0');
|
||||
ReadmeText.Replace("\n","\r\n");
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
CenterWindow();
|
||||
|
0
samples/mfc/standard/Common/OCC_App.h
Executable file → Normal file
0
samples/mfc/standard/Common/OCC_App.h
Executable file → Normal file
@@ -5,55 +5,6 @@
|
||||
#include <stdafx.h>
|
||||
#include "OCC_BaseDoc.h"
|
||||
|
||||
const CString OCC_BaseDoc::SupportedImageFormats() const
|
||||
{
|
||||
return ("BMP Files (*.BMP)|*.bmp|GIF Files (*.GIF)|*.gif|TIFF Files (*.TIFF)|*.tiff|"
|
||||
"PPM Files (*.PPM)|*.ppm|JPEG Files(*.JPEG)|*.jpeg|PNG Files (*.PNG)|*.png|"
|
||||
"EXR Files (*.EXR)|*.exr|TGA Files (*.TGA)|*.tga|PS Files (*.PS)|*.ps|"
|
||||
"EPS Files (*.EPS)|*.eps|TEX Files (*.TEX)|*.tex|PDF Files (*.PDF)|*.pdf"
|
||||
"|SVG Files (*.SVG)|*.svg|PGF Files (*.PGF)|*.pgf");
|
||||
}
|
||||
|
||||
void OCC_BaseDoc::ExportView (const Handle(V3d_View)& theView) const
|
||||
{
|
||||
CFileDialog anExportDlg (FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
SupportedImageFormats() + "||", NULL );
|
||||
|
||||
if (anExportDlg.DoModal() == IDOK)
|
||||
{
|
||||
// Set waiting cursor
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
|
||||
CString aFileName = anExportDlg.GetPathName();
|
||||
CString aFileExt = anExportDlg.GetFileExt();
|
||||
|
||||
// For vector formats use V3d_View::Export() method
|
||||
if (!(aFileExt.CompareNoCase ("ps")) || !(aFileExt.CompareNoCase ("pdf"))
|
||||
|| !(aFileExt.CompareNoCase ("eps")) || !(aFileExt.CompareNoCase ("tex"))
|
||||
|| !(aFileExt.CompareNoCase ("svg")) || !(aFileExt.CompareNoCase ("pgf")))
|
||||
{
|
||||
Graphic3d_ExportFormat anExportFormat;
|
||||
|
||||
if (!(aFileExt.CompareNoCase ("ps"))) anExportFormat = Graphic3d_EF_PostScript;
|
||||
else if (!(aFileExt.CompareNoCase ("eps"))) anExportFormat = Graphic3d_EF_EnhPostScript;
|
||||
else if (!(aFileExt.CompareNoCase ("pdf"))) anExportFormat = Graphic3d_EF_PDF;
|
||||
else if (!(aFileExt.CompareNoCase ("tex"))) anExportFormat = Graphic3d_EF_TEX;
|
||||
else if (!(aFileExt.CompareNoCase ("svg"))) anExportFormat = Graphic3d_EF_SVG;
|
||||
else anExportFormat = Graphic3d_EF_PGF;
|
||||
|
||||
theView->View()->Export (aFileName, anExportFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For pixel formats use V3d_View:Dump() method
|
||||
theView->Dump (aFileName);
|
||||
}
|
||||
|
||||
// Restore cursor
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@@ -9,18 +9,9 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <stdafx.h>
|
||||
|
||||
// Base class for all documents in the sample.
|
||||
// Declares base functionlaity and interface for the sample documents.
|
||||
// Common properties:
|
||||
// - interactive context
|
||||
// - 3d viewer
|
||||
// Common methods:
|
||||
// - base events
|
||||
// - export into one of supported export formats.
|
||||
class AFX_EXT_CLASS OCC_BaseDoc : public CDocument
|
||||
class OCC_BaseDoc : public CDocument
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -30,13 +21,7 @@ public:
|
||||
|
||||
Handle(AIS_InteractiveContext)& GetAISContext() { return myAISContext; }
|
||||
|
||||
Handle(V3d_Viewer) GetViewer() { return myViewer; }
|
||||
|
||||
// Returns string with supported export pixel and vector images formats.
|
||||
const CString SupportedImageFormats() const;
|
||||
|
||||
// Exports the given view into of the supported formats.
|
||||
void ExportView (const Handle(V3d_View)& theView) const;
|
||||
Handle(V3d_Viewer) GetViewer() { return myViewer; }
|
||||
|
||||
//Events
|
||||
virtual void DragEvent (const Standard_Integer /*theMouseX*/,
|
||||
|
@@ -1,120 +0,0 @@
|
||||
// ParamsFacesPage.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ParamsFacesPage.h"
|
||||
#include "DimensionDlg.h"
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
#include <AIS_AngleDimension.hxx>
|
||||
|
||||
// CParamsFacesPage dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CParamsFacesPage, CDialog)
|
||||
|
||||
CParamsFacesPage::CParamsFacesPage (Handle(AIS_InteractiveContext) theAISContext,
|
||||
bool isAngleDimension /*= false*/,
|
||||
CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CParamsFacesPage::IDD, pParent),
|
||||
myAISContext (theAISContext),
|
||||
myIsAngleDimension (isAngleDimension)
|
||||
{
|
||||
}
|
||||
|
||||
CParamsFacesPage::~CParamsFacesPage()
|
||||
{
|
||||
}
|
||||
|
||||
void CParamsFacesPage::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CParamsFacesPage, CDialog)
|
||||
ON_BN_CLICKED(IDC_FacesBtn1, &CParamsFacesPage::OnBnClickedFacesbtn1)
|
||||
ON_BN_CLICKED(IDC_FacesBtn2, &CParamsFacesPage::OnBnClickedFacesbtn2)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CParamsFacesPage message handlers
|
||||
|
||||
void CParamsFacesPage::OnBnClickedFacesbtn1()
|
||||
{
|
||||
// Check if face is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox(_T("Choose the face and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
myFirstFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
void CParamsFacesPage::OnBnClickedFacesbtn2()
|
||||
{
|
||||
// Check if face is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
{
|
||||
AfxMessageBox(_T("Choose the face and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
mySecondFace = TopoDS::Face (myAISContext->LocalContext()->SelectedShape());
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||
|
||||
myAISContext->CloseAllContexts();
|
||||
|
||||
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
|
||||
anAspect->MakeArrows3d (Standard_False);
|
||||
anAspect->MakeText3d (aDimDlg->GetTextType());
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
if (myIsAngleDimension)
|
||||
{
|
||||
// Build an angle dimension between two non-parallel edges
|
||||
Handle(AIS_AngleDimension) anAngleDim = new AIS_AngleDimension (myFirstFace, mySecondFace);
|
||||
anAngleDim->SetDimensionAspect (anAspect);
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
{
|
||||
anAngleDim->SetDisplayUnits (aDimDlg->GetUnits ());
|
||||
if ((anAngleDim->GetDisplayUnits().IsEqual (TCollection_AsciiString ("deg"))))
|
||||
{
|
||||
anAngleDim->DimensionAspect()->MakeUnitsDisplayed (Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
anAngleDim->SetDisplaySpecialSymbol (AIS_DSS_No);
|
||||
}
|
||||
}
|
||||
|
||||
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
myAISContext->Display (anAngleDim);
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstFace, mySecondFace);
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aLenDim->DimensionAspect()->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
}
|
||||
|
||||
myAISContext->OpenLocalContext();
|
||||
myAISContext->ActivateStandardMode (TopAbs_FACE);
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "res\OCC_Resource.h"
|
||||
// CParamsFacesPage dialog
|
||||
|
||||
class CParamsFacesPage : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CParamsFacesPage)
|
||||
private:
|
||||
Handle(AIS_InteractiveContext) myAISContext;
|
||||
bool myIsAngleDimension;
|
||||
TopoDS_Face myFirstFace;
|
||||
TopoDS_Face mySecondFace;
|
||||
public:
|
||||
CParamsFacesPage (Handle(AIS_InteractiveContext) theAISContext,
|
||||
bool isAngleDimension = false,
|
||||
CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
virtual ~CParamsFacesPage();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_ParamsFacesPage };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedFacesbtn1();
|
||||
afx_msg void OnBnClickedFacesbtn2();
|
||||
};
|
@@ -98,12 +98,14 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
Handle(AIS_Dimension) aDim;
|
||||
if (myIsDiameterDimension)
|
||||
{
|
||||
aDim = new AIS_DiameterDimension (aCircle);
|
||||
aDim = isAttachPoint ? new AIS_DiameterDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_DiameterDimension (aCircle);
|
||||
Handle(AIS_DiameterDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
else
|
||||
{
|
||||
aDim = new AIS_RadiusDimension (aCircle);
|
||||
aDim = isAttachPoint ? new AIS_RadiusDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_RadiusDimension (aCircle);
|
||||
Handle(AIS_RadiusDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
|
||||
@@ -113,8 +115,8 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
aDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
aDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDim->IsUnitsDisplayed())
|
||||
{
|
||||
aDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
0
samples/mfc/standard/Common/RadiusParamsPage.h
Executable file → Normal file
0
samples/mfc/standard/Common/RadiusParamsPage.h
Executable file → Normal file
@@ -80,4 +80,4 @@ private:
|
||||
//Handle_Graphic3d_Texture2Dmanual mytexture;
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
BIN
samples/mfc/standard/Common/res/OCC_Resource.aps
Executable file
BIN
samples/mfc/standard/Common/res/OCC_Resource.aps
Executable file
Binary file not shown.
@@ -2,7 +2,6 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by OCC_Resource.rc
|
||||
//
|
||||
#define IDD_ParamsFacesPage 101
|
||||
#define IDR_POPUP 116
|
||||
#define IDD_Dimension 119
|
||||
#define IDD_LengthParamsEdgePage 122
|
||||
@@ -62,10 +61,6 @@
|
||||
#define IDC_TextDisplayMode 1047
|
||||
#define IDC_TextDisplayModeStatic 1048
|
||||
#define IDC_DimensionColor 1049
|
||||
#define IDC_FacesSt1 1052
|
||||
#define IDC_FacesSt2 1053
|
||||
#define IDC_FacesBtn1 1054
|
||||
#define IDC_FacesBtn2 1055
|
||||
#define ID_WINDOW_NEW3D 1151
|
||||
#define ID_OBJECT_DISPLAYALL 1201
|
||||
#define ID_OBJECT_MATERIAL 1205
|
||||
@@ -181,7 +176,7 @@
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 131
|
||||
#define _APS_NEXT_COMMAND_VALUE 40038
|
||||
#define _APS_NEXT_CONTROL_VALUE 1055
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -129,7 +129,7 @@ BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,101,233,88,14,WS_GROUP
|
||||
CTEXT "http://www.opencascade.com",IDC_STATIC,92,116,98,8,SS_CENTERIMAGE
|
||||
CONTROL 1300,IDC_STATIC,"Static",SS_BITMAP,73,28,132,64,WS_EX_CLIENTEDGE
|
||||
EDITTEXT IDC_README,7,131,270,94,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
|
||||
EDITTEXT IDC_README,7,131,270,94,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL,WS_EX_LEFTSCROLLBAR
|
||||
END
|
||||
|
||||
IDD_ResultDialog DIALOG 0, 0, 212, 202
|
||||
@@ -281,16 +281,6 @@ BEGIN
|
||||
CONTROL "",IDC_Flyout,"msctls_trackbar32",TBS_TOP | TBS_TOOLTIPS | WS_TABSTOP,73,112,100,20
|
||||
END
|
||||
|
||||
IDD_ParamsFacesPage DIALOGEX 0, 0, 134, 73
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Face1",IDC_FacesSt1,18,14,20,8
|
||||
LTEXT "Face2",IDC_FacesSt2,18,35,20,8
|
||||
PUSHBUTTON "Click to set up selected face",IDC_FacesBtn1,63,7,52,24,BS_MULTILINE
|
||||
PUSHBUTTON "Click to set up selected face",IDC_FacesBtn2,64,39,51,24,BS_MULTILINE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -485,14 +475,6 @@ BEGIN
|
||||
BOTTOMMARGIN, 336
|
||||
HORZGUIDE, 336
|
||||
END
|
||||
|
||||
IDD_ParamsFacesPage, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 127
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 66
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
@@ -22,7 +22,6 @@ set (COMMON_SOURCE_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseChildFrame.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseView.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_MainFrame.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.cpp
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.cxx
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.cpp
|
||||
@@ -80,7 +79,6 @@ set (COMMON_HEADER_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseChildFrame.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_BaseView.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_MainFrame.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.hxx
|
||||
${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h
|
||||
|
@@ -296,7 +296,6 @@
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsEdgesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\LengthParamsVerticesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\RadiusParamsPage.cpp" />
|
||||
<ClCompile Include="..\..\..\..\Common\ParamsFacesPage.cpp" />
|
||||
<ClCompile Include="..\..\..\src\mfcsample.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -740,7 +739,6 @@
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_BaseView.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\OCC_MainFrame.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\RadiusParamsPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ParamsFacesPage.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\res\OCC_Resource.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ResultDialog.h" />
|
||||
<ClInclude Include="..\..\..\..\Common\ImportExport\SaveCSFDBDlg.h" />
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user