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

Compare commits

..

614 Commits

Author SHA1 Message Date
msv
6033b13c29 Make it compilable 2015-02-04 13:10:56 +03:00
gka
ec738c8ff1 New classes for BOPAlgo for patch on boolean operations from OCC version 680 2015-02-03 19:12:57 +03:00
gka
fe7caef6da Fix for regressions for case infinite box ( case 46)
Test cases
2015-02-02 17:03:59 +03:00
gka
097a0cae0f Fix to avoid exception for case46 (regressions) 2014-10-28 19:51:23 +03:00
gka
3054ab58fb Fix for case 52 2014-10-28 12:43:36 +03:00
ifv
75ee56f2df Analyzer for surface normals is added 2014-10-24 12:12:27 +04:00
aml
95ee0712bc 0025380: Intersection curve cannot reach boundary of surface
Changed next point computation in point walker. Now trying to walk over another isoline if new point is too close to previous.
2014-10-23 15:43:31 +04:00
gka
a5a0a4399f Fix for operation "Split shell" 2014-10-21 15:13:54 +04:00
gka
d099845895 Version Open CASCADE 670 with fixes 2014-10-10 15:48:10 +04:00
abv
47d9074abb 0024428: Implementation of LGPL license
OCCT documentation updated to refer to LGPL as applicable license
2013-12-17 12:43:17 +04:00
bugmster
480bf81e37 0024428: Implementation of LGPL license
Update of OCCT samples source code due to moving to LGPL license
2013-12-17 12:43:15 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
vro
3693361422 0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
Turning on the light to display the shapes of the sample.
2013-12-17 12:32:32 +04:00
ibs
4a0c5c25a4 0024469: cmake mfcsample project skippes ParamsFacesPage
add ParamsFacesPage.cpp and ParamsFacesPage.h in mfcsample cmake project

Unrelated changes: common samples include paths have lower priority than specific ones
Unrelated changes: debug tbb cmake seeks with _debug postfix
2013-12-17 12:25:09 +04:00
ibs
a0726e55a7 0024426: CMake ignores 3rd party options; env.sh does not set "CASROOT" environment variable
unrelative changes: #!/bin/bash line was added to env.sh.in
CMake: debug environment was removed for the time being; env.sh and env.bat templates were refactored
possibility of using of redundant command line parameters were removed from env.sh & env.bat scripts
tcl installation corrected;
Removed "echo off" from shell script
2013-12-17 12:25:08 +04:00
aba
38fd051164 0024471: Erasing of the shape in HLR sample leads to sample crash. 2013-12-17 12:18:22 +04:00
abv
243fc66226 Preparation for OCCT 6.7.0 release: 'beta' removed from OCCT version 2013-12-16 12:34:34 +04:00
kgv
5396d9ca17 0024466: Visualization - PrsMgr_Presentation3d::Erase() now leads to incomplete destruction of Graphic3d_Structure 2013-12-15 16:25:16 +04:00
szv
4e7bb26301 0024440: Regressions in products test group sat/doc_1
Check for closed shell is corrected
2013-12-12 19:42:47 +04:00
aba
60bf98ae02 0024425: Improve usage ergonomics of new dimension presentations
- Added format for value string.
- Construction and validness.
- Revise modification of properties and update of presentations.
- Units moved to Drawer; code revisions.
- Length and angle initialization was changed. Type of geometry filed was added to AIS_Dimension.
- Method for test case bugs/vis/buc60915 was corrected. Description of the dimension classes was corrected.
- Fixed initialization of angle and length.
2013-12-12 19:36:55 +04:00
Pawel
e04db19958 0024448: Possible copy-paste bug in IGESGeom_SplineCurve.cxx
Replaced 'allXPolynomials' with 'allYPolynomials' to avoid redundancy.
2013-12-12 19:36:54 +04:00
Pawel
de88958f6e 0024451: Logical conjunction always evaluates to false
As the variable gets casted on Standard_Byte it is checked to be within the range <0; 255>
2013-12-12 19:36:53 +04:00
kgv
7551feda20 0024455: Graphic3d_Group - restore Marker() method to simplify porting 2013-12-12 19:36:52 +04:00
gka
4efafd1f3a 0024283: STEP read failes to read unbound advanced_face
Fix to avoid exception if sphere is written without bounds.
2013-12-12 19:36:51 +04:00
Pawel
0c4033b4d1 0024452: TKOpenGl - Memory leak in OpenGl_ShaderManager 2013-12-12 19:36:50 +04:00
kgv
0adbd30f1d 0024450: TKOpenGl - Fixed pipeline materials update optimization does not distinguish front/back faces 2013-12-12 19:36:49 +04:00
ibs
0794c042bd 0024403: BRepBuilderAPI_Sewing should have get/set Context methods
Methods to get/set context introduced
2013-12-12 19:36:49 +04:00
emv
0929d0ef20 0024434: The result of Boolean FUSE operation is not correct
Small correction in splitting SEAM edge on face.
2013-12-12 19:36:48 +04:00
apl
fe83e1ea69 0024389: Invalid hilight of AIS dimension line in local selection
- Fixed invalid presentation of dimension highlight.
- Fixed bug on switching between selection modes. Individual sensitive entities generated for each selection mode.
- Revised selection: AIS_DimensionSelectionMode enumeration added, redundant AIS_DimensionDisplayMode is removed.
- Revised entity owner usage: used standard SelectMgr_EntityOwner for neutral selection, AIS_DimensionOwner for "line", "text" selection modes.
- Made arrows selectable.
- Got rid of predefined arrow angle. The arrow angle is now taken from dimension aspect.
- The 3D text is now centered by bounding box for better alignment.
2013-12-12 19:36:47 +04:00
nbv
73cd8a8afd 0024422: Wrong result done by FaceClassifier algorithm
Control of out of boundaries by finding circle-point extrema.
2013-12-12 19:36:46 +04:00
dbp
6bf1bdbd22 0024459: Exception during clearing object in test case v3d/raytrace/connected in DEBUG mode 2013-12-12 19:36:45 +04:00
aba
eef7fc6447 0024391: Erased AIS object can not be displayed in AIS_InteractiveContext after AIS_InteractiveContext::Remove(): added presentations removing after presentable object is removed from context.
vremove command was corrected. Test case was corrected.

few mistakes corrected
2013-12-12 19:36:44 +04:00
bugmaster
6c7ddf00ce Adjusting test cases for current state of OCCT
1. Modified test cases to improve using of Japanese characters
bugs vis bug22149
bugs vis bug22796_2

2. Modified test case bugs vis bug23813 to avoid regression caused by using vdump command with non-default parameters on remote PCs
bugs vis bug23813

3. Behavior change of test case de iges_2 B1 in DEBUG mode on Linux and Windows platforms (OCC24442)
de iges_2 B1
2013-12-06 15:41:07 +04:00
gka
44d7c4080a 0024279: bug in Standard_Boolean STEPCAFControl_Reader::Transfer 2013-12-06 13:10:45 +04:00
dbv
9e8804b6db 0024420: Add methods to switch the type of sensitivity in AIS_Circle and AIS_Plane
Added methods to AIS_Circle and AIS_Plane for switching type of sensitivity
By default AIS_Circle and AIS_Plane have boundary sensitivity
2013-12-06 13:10:44 +04:00
aba
b3837d74e0 0024372: HLR Sample: erased objects are shown in HLR
Compilation errors were corrected.
Removed .aps files
Sample paths fields were updated to read help file from sample folder.
2013-12-06 13:10:42 +04:00
ifv
ef2d8af761 0024359: Crash on BRepAlgoAPI_Fuse
Test case for issue CR24359
2013-12-06 13:10:41 +04:00
gka
d4a2c5155a 0023921: IGES reader cannot map subshapes colors inside nested assemblies
Modification to avoid creation of redundant labels in XCAF for any shapes  belonging compound even if colors are not defined for them.
Fix to avoid compiler warning.
Fix for regression for test case de iges_2 A6
Test case for issue CR23921
2013-12-06 13:10:40 +04:00
ifv
94218044fe 0024313: BRepAlgoAPI_Section and IntTools_FaceFace aren't written to handle Geom_SurfaceOfLinearExtrusion
Test case for issue CR24313
2013-12-06 13:10:39 +04:00
aba
12c76beeb0 0023931: Incorrect image export code in MFC sample: Added OCC_BaseDoc::ExportView() method to unify image export procedure in all MFC samples.
Compilation errors were corrected.
2013-12-06 13:10:37 +04:00
ski
89c4bca846 0024304: Eliminate GCC compiler warning about exceeding maximum value for type in case label
Methods OSD::Handler(), OSD::SegvHandler(), OSD::WntHandler() were made static
Type cast were removed when pointer on signal handler function is used
Enumeration OSD_Signal removed
2013-12-06 13:10:36 +04:00
mkv
52e6db9d8a Deleting MSVC compiler warning in BRepBuilderAPI_Sewing.cxx(920) caused integration of fix for 24390 2013-11-29 12:22:01 +04:00
kgv
7470608360 0023813: TKOpenGl, OpenGl_Texture ignores stride image property
Added test case tests/bugs/vis/bug23813
2013-11-28 14:55:51 +04:00
ysn
dd21889ecf 0024336: Content of OCCT documentation should be updated. Iter 2
Minor corrections in documentation (dev guides)

Finalized brep_wp guide (by DLN); entirely removed non-PNG images to provide smooth PDF generation;  Restored cross-guide links in Technical overview; small improvements and editing in GIT guide.

Resized some images to better fit on PDF pages.
2013-11-28 12:18:19 +04:00
gka
2e9fd4bc0d 0024008: ShapeAnalysis_Surface causes exception in Geom_OffsetSurface
Refactoring on current master fix for bug 0024008: ShapeAnalysis_Surface causes exception in Geom_OffsetSurface.
And modified test scripts in order to avoid report regressions
Test cases for issue CR24008
2013-11-28 12:14:17 +04:00
ski
75259fc556 0024399: ICC warnings 3280 "declaration hides..."
Renamed local variables to avoid ICC compiler warnings about repeated names
2013-11-28 11:36:13 +04:00
apl
9f37b47ddd 0024396: "vselmode" - disable auto loading of objects into Local Context
Corrected DRAWEXE "vselmode" command.
Added test case.

corrected test cases

- 24293 failed due to initialization view without "name".
- 24374 adjusted, the test case was initially incorrect.

Modified test cases bugs/vis/bug24293 and bugs/vis/bug24374
2013-11-28 11:33:47 +04:00
aml
32b6a53fd8 0024398: Output of extrema draw-command has various format on optimise and debug modes
Fixed creation of extrema curve in debug mode.
Deleted space between ";" and "V" in debug output to make "llength" DRAW funcion work correctly in debug mode.
Deleted TODOs in tests/bugs/modalg_5/bug24327
Deleted TODOs in test cases with improvement in extrema output. Increased cpulimit in de, boolean and perf.
2013-11-28 11:26:32 +04:00
gka
5cc18856ae 0024383: Access violation during STEP file import
Protection for null magnitude of vector written in file was added.

Test cases for issue CR24383
2013-11-28 11:20:40 +04:00
ski
566f84411f 0024180: Eliminate CLang / GCC compiler warning -Wswitch
Eliminated warnings -Wswitch shown by gcc
Eliminated two new warnings about wrong initialization order
Eliminated warnings about unused functions.
A few more ICC warnings (type conversions) fixed
2013-11-28 11:14:22 +04:00
pdn
ebeff0a2bc 0024400: Wrong result obtained by Section
Changes:
class IntTools_FaceFace
- static function:
void CorrectSurfaceBoundaries(const TopoDS_Face&  theFace,
			       const Standard_Real theTolerance,
			       Standard_Real&      theumin,
			       Standard_Real&      theumax,
			       Standard_Real&      thevmin,
			       Standard_Real&      thevmax)

Remove unnecessary broadening of UV-bounds for the faces based on the sperical surfaces.

Test case for issue CR24400
2013-11-28 11:11:22 +04:00
pdn
c4edd925fd 0024385: Shape fix shape does not correct closed flag for shell
Modified test cases de/step_4/C9 and de/step_4/D1 regarding to new reference data
2013-11-28 11:08:06 +04:00
pdn
941a7a240c 0024380: OSD_MAllocHook - Improvement of malloc hook to follow maximal peack size 2013-11-28 10:42:40 +04:00
kgv
f823def059 0024392: TKService, Image_PixMap - use bottom-up image data storage by default 2013-11-28 10:39:58 +04:00
pdn
b3cb7aa21b 0023708: The correct shape is interpreted as invalid
Added test case bugs/modalg_5/bug23708
Improvements in test case de/step_3/B8 (problem in second TODO is not reproduced)
Modified test case de/iges_2/H1 regarding to new reference data
2013-11-28 10:37:03 +04:00
gka
0221b126ee 0024390: Sewing produces the result with huge tolerance
Test cases for issue CR24390
2013-11-28 10:31:44 +04:00
bugmaster
2bc29cdf9e Correction test cases for adequate behavior for platforms with OpenCL 2013-11-22 14:49:51 +04:00
apn
408e0d5cf1 Adjusting testing cases
boolean bsection M9 N5
Adjusting test cases in DEBUG mode to current state of master (increase cpulimit and modified TODOs)

bugs modalg_5 bug24327
Added TODO in test case to avoid regression in DEBUG mode caused by integration of 24327

perf bop builface
Increase cpulimit of test case (problem in DEBUG mode)
2013-11-22 14:09:02 +04:00
apn
d04f068b7f Correction of test cases due to fix for issue 24130 2013-11-22 12:49:29 +04:00
bugmaster
142a761f11 Correction of testing case for issue 24374 2013-11-21 17:37:12 +04:00
aba
0f8c0fb8c8 0024374: Flipping affects highlight presentation of dimension. Model-view matrix restoring in immediate mode was added in OpenGl_Flipper::Render() method. Test case was added. 2013-11-21 17:35:16 +04:00
apl
1d7ca641c7 0024351: Test cases for AIS dimension presentations to check arrow orientation, text position
- Added test cases to check label and arrows positioning of AIS length, angle, radius, diameter dimensions;
- Added new arguments to "vdim" command to modify "flyout", "arrow orientation", "label position" properties;
- Corrected bug: duplication of text label of linear dimensions for the horizontal-centered text.
- Rename and revise argument interface of "vdimension" (vdim) command.
- Correct test cases for new command name and arguments style.

corrected test cases - check with testdiff instead of "checkcolor"
2013-11-21 17:30:40 +04:00
apl
d7bffd44ea 0024326: Get rid of confusing extension line
1) Removed confusing part of labeled extension for 3d text.
2) Removed unused "TextOffset" property of AIS_Dimension class, revised function of "ExtensionSize" property.
3) Added options to specify automatic or user-defined arrow orientation and value label positioning to dimension aspect enumerations.
4) Use proper naming: Prs3d_DimensionTextVerticalPosition, Prs3d_DimensionTextHorizontalPosition instead of Prs3d_HorizontalTextAlignment, Prs3d_VerticalTextAlignment.
Correction of label length computing method.
2013-11-21 17:28:17 +04:00
aba
938d454409 0024288: Provide flipping text for AIS_Dimensions
- OpenGl_Flipper class added to provide text flipping.
  - Added Graphic3d_Mat4, OpenGl_Mat4 definitions for use with TKOpenGl matrix types.
  - Added flipping parameters for dimensions with 3D text labels at AIS_Dimension class.
  - Test cases.
2013-11-21 17:25:01 +04:00
aba
62b6361a46 0024293: Dimension extensions don't belong to the dimension sensitive entity: computeFlyoutSelection() method was added in AIS_Dimension and AIS_AngleDimension classes. 2013-11-21 17:22:34 +04:00
kgv
725ef85e1e 0024386: Provide high-level API to specify font by user-defined path for AIS (Prs3d) aspects
Add new command vfont to access font manager.
2013-11-21 17:19:33 +04:00
pkv
4889b44e3e 0024384: Wrong result obtained by Fuse
Changes:
1. class BOPTools
   - method:
void BOPTools_AlgoTools::MakeVertex(BOPCol_ListOfShape& aLV,
                                                              TopoDS_Vertex& aVnew)
The function fsqrt that calculates the square root of a real number
has been replaced by the standard sqrt.

2. class BOPAlgo_WireSplitter
- static function:
Standard_Real Angle2D (const TopoDS_Vertex& aV,
                         const TopoDS_Edge& anEdge,
                         const TopoDS_Face& myFace,
                         const GeomAdaptor_Surface& aGAS,
                         const Standard_Boolean aFlag)
The value parametric deltas for computations of 2D-angles
have been changed for Bezier, B-Spline 2D-curves.
2013-11-21 17:19:32 +04:00
jgv
de09d2a2a0 0024360: Hang up trying to intersect two faces
Added test case bugs/modalg_5/bug24360
2013-11-21 17:19:31 +04:00
aba
e5b32824c4 0024339: Vectors not displayed correctly in MFC samples [6.7.0 Beta]: ISession_Direction classes were rewritten without using of DsgPrs_LengthPresentation class.
Corrections to support old results in geometry samples: added ISession_Direction::SetLineAspect(); ISession_Direction class in Modeling sample was corrected.
2013-11-21 17:19:30 +04:00
skv
659b232a7c 0024263: TNaming_CopyShape::CopyTool failure
Test case for issue CR24263
2013-11-21 17:19:29 +04:00
apl
51b10cd466 0024321: Use List collection instead of NCollection_Set for collection of Handle(Graphic3d_ClipPlane)
- The NCollection_Sequence (Graphic3d_SequenceOfHClipPlane) is used for handling ordered lists of clipping planes instead of NCollection_Set (Graphic3d_SetOfHClipPlane).
2013-11-21 17:10:37 +04:00
nbv
28cec2ba3e 0024377: [Regression-like] OCC 6.7.0 beta contaminates log with more unnecessary debug symbols
These "DEBUG outputs" are replace with analogically comments.
2013-11-21 17:10:36 +04:00
pdn
3cb19cf162 0024375: Exception in IntAna on touching circles
Test case for issue CR24375
2013-11-21 17:10:35 +04:00
aml
aa094b3e6e 0024327: Wrong result obtained by Exterma Curve/Curve
Increased number of nodes  in Extrema_CurveCache::Extrema_CurveCache.
Test case for issue CR24327
2013-11-21 13:49:23 +04:00
ibs
5c573e69d3 0024355: Compiler Warning level 4 for MFC samples
Some warnings were removed from MFC samples
All warnings of sample projects with warning level 4 were fixed on VC9
Warnings level increased to -W4 in projects of MFC samples; sample ReadMe files added to documentation
Changes in Viewer2dDoc.cpp and OcafDoc.cpp were restored.
Minor corrections in documentation
2013-11-21 13:45:42 +04:00
apl
95eef64da2 0024315: Use delayed release of resources in OpenGl aspects for consistency
- Do delayed release of face texture resource of OpenGl_AspectFace, point sprite texture of OpenGl_AspectMarker
2013-11-21 13:35:33 +04:00
emv
b92a64cc68 0024328: Revolution of a wire generates two interfered faces.
Correct treatment of cones with collinear axes.

Test case for issue CR24328
2013-11-21 13:34:18 +04:00
kgv
d5af86261d 0024353: TKOpenGl - crash in IsRaytracedStructure when clearing mutli-connected presentation
Correction of test cases for issue CR24353
2013-11-21 13:29:53 +04:00
ysn
bf62b306ab 0024336: Content of OCCT documentation should be updated. Iter 2
CDL guide finalized.
Brep WP added
Added white-papers and 2 dev guides in the generated documentation structure.
White-papers + 2 developer guides + Draw UG finalized.
Visualization guide finalized.
Fixes for bugs 24205, 23737 and 24021
2013-11-21 13:27:41 +04:00
kgv
f6e968a70e 0024346: Documentation - provide Coding Rules document
Keep doxygen comments within code blocks (disable STRIP_CODE_COMMENTS).
2013-11-19 14:13:50 +04:00
bugmaster
10173e7f92 Update type of files 2013-11-14 21:19:34 +04:00
ysn
668c2575c8 0024336: Content of OCCT documentation should be updated. Iter 2
Finalized STEP and IGES
2013-11-14 16:51:52 +04:00
emv
df32346f5f 0024290: BOP Section produces incorrect result.
Smaller coefficients are used for shrunk range definition for the edge with big tolerance value of its vertices.
Test cases for issue CR24290
2013-11-14 16:42:29 +04:00
ibs
bb27b80720 Minor corrections:
- CMakeLists.txt: installation of TclTk fixed so that tests can be run
- StdPrs: compiler warning introduced by fix on #23474 corrected
- Documentation: description of insertion of images into markdown document corrected
2013-11-14 16:31:48 +04:00
ibs
234e52be90 0023874: Converting OCCT MFC samples to CMake build system.
CMake meta-projects for samples were added
launch script for samples was added
unrelated changes: CSF_GraphicShr variable were removed
occt building with cmake article was updated
2013-11-14 15:11:59 +04:00
ibs
ad211ad33b 0024331: CMake scripts improvements
prefix '3RDPARTY' from variables that trigger use of 3rd-party products removed
help strings associated with CMake variables revised
identification of Tcl8.6 libraries enables
invariable cmake files moved from wok to adm/templates folder
RELWITHDEBINFO build configuration added
BUILD_TYPE variable was renamed in BUILD_CONFIGURATION
copy just TObj/TObj.msg instead of TObj folder

Option /fp:precise for Visual Studio projects set

Update of documentation for building with CMake; three warnings appeared in VS projects built by CMake corrected
2013-11-14 15:11:58 +04:00
kgv
01eaf6549b 0024345: TKOpenGl - GLSL compatibility issues on NV40 (GeForce 6xxx/7xxx)
Iterate through maximum light sources in Fragment shader instead of active lights
2013-11-14 12:55:52 +04:00
kgv
64c759f898 0024350: TKOpenGl - non-physical materials are ignored by GLSL program manager
GLSL and Ray Tracing - take into account non-physical materials.
Move Ray Tracing test cases to v3d/raytrace grid.
2013-11-14 12:53:13 +04:00
kgv
f85399e5df 0024348: TKOpenGl - the same GLSL program can not be re-assigned
Reset shader id in OpenGl aspects.
Setup/retrieve shader program within getters/setters of Graphic3d_Group/Graphic3d_Structure (add missing ones).
2013-11-14 12:53:12 +04:00
apl
c90e941f78 0024344: TKOpenGl - only front side is lighted within Phong GLSL program 2013-11-14 12:53:10 +04:00
duv
4fe9ad57df 0024322: TKOpenGl - light sources management inconsistency
Fixed pipeline - accumulate all ambient light sources.

Fix clearing of all light sources.
2013-11-14 12:53:09 +04:00
abv
79d580f2ea 0024341: Document building OpenCL ICD Loader package
- Building OpenCL ICD Loader documented; Acknowledgments section of Overview updated to mention also OpenGL and OpenCL
- Reference to OpenCL updated in Overview: use general statement instead of direct link to AMD SDK.
- GeForce 610, 6600, and Radeon HD 7870 added to list of tested graphic cards
- Minor syntax corrections in DRAW UG to avoid interferences
- Update 3rdparty products up to current state
- Redesign of pages
- Building OpenCL ICD Loader was documented for Linux platform
- Lists reformatted, documentation manual updated to better describe use of lists.
- Updating picture of structure of installed OCCT
- Updating description of Automake procedure
- Updating description of  CMake building procedure
2013-11-14 12:51:25 +04:00
jgv
f9032cf2ee 0024305: New option in BRepOffsetAPI_MakePipeShell algorithm: the swept shell with varying width of section bounded by auxiliary spine
Test case for issue CR24305
2013-11-14 12:38:08 +04:00
dbp
4058ef10a9 0024352: Add Shaders directory to OCCT resources 2013-11-14 12:32:58 +04:00
abv
62afa5c9e0 0024329: Ambiguous graphic cards list in software/hardware requirements
Section Requirements in Overview refactored to have explicit list of graphic cards tested with OCCT. The first version of the list provided; to be completed.
2013-11-14 12:30:59 +04:00
ibs
8b0857f8c0 0024330: Generate Overview documentation in CHM format
chm format (with formulas) of documentation introduced
overview.chm generated directly in doc folder
2013-11-14 12:20:24 +04:00
Pawel
e1b0e44248 0024197: Viewer3d.exe is saved to the wrong directory
Output directory corrected.
2013-11-14 12:15:35 +04:00
dbv
ed8cad74ad 0024343: AIS_DisplayStatus - outdated description
Documentation fix
2013-11-14 11:21:43 +04:00
nbv
74f5f8df5d 0024303: Precision degradation for Geom2dGcc_Circ2d2TanRad in OCCT6.6.0.
1. DRAW-command.
2. Initial point (the center of found circle), which is found by standard algorithm, is precised in function PrecRoot(...). Correction is called, if and only if initial point is in tangent zone.
3. Handling of possible divergences and of possible exceptions in PrecRoot() function is added.

Test cases for issue CR24303
2013-11-14 11:12:40 +04:00
ski
c24d401753 0024275: Cppcheck warnings on uninitialized class members
Removed warning of cppcheck on uninitialized class members for non-array cases
New additional compilation warnings on Windows platform from file OSD_Path.cxx were fixed
Warnings about wrong initialization removed
2013-11-14 11:09:32 +04:00
kgv
e79a94b9a5 0024337: Draw Harness - relax vinit syntax
Support "vinit name w=512 h=512" syntax
2013-11-14 11:06:26 +04:00
aml
23b894f730 0024268: Wrong triangulation on the boundaries of the cones
Added check for cone singularity point, modified isoline checks, deleted check along U and V in GeomLib::NormEstim.
Correction in sign in GeomLib::NormEstim.
2013-11-14 11:02:05 +04:00
Pawel
7893b2faf8 0023474: Changing material/color/transparency of a shaded AIS_Shape requires 'Redisplay'
Getting the current group instead of creating new one. Otherwise the necessary aspect information is lost.
2013-11-14 10:39:14 +04:00
ibs
e5bd0d984c documentation updated
unrelated changes: Unused unit OpenCL removed from UDLIST

All articles revised
README revised
comments are allowed in FILES.txt

Add gendoc.sh for Linux
Added option -s to set search engine of the HTML documents
Added 3rdparty_building docs for different platforms

help message removed from bat&sh scripts (left within tcl script)
tableofcontents added for all huge articles;
gendoc.bat doesn't change PATH variable
jpgs converted to pngs and unused pngs removed
logo displaying of pdf files fixed
Automatic detection of OCCT version number added to occtdoc.tcl
OCCT version within pdfs is got from Standard_Version.hxx; copyright changed
pdf generation process removes latex dir now
GIF images converted to PNG in technical_overview;
references fixed (incorrect reference to wok and cdl didn't touch; redundant latex option removed

Tutorial moved from Overview and made top level page
LICENSE.md moved from dox/overview to dox folder

Section related to OCCT building refactored and simplified.
WOK and CDL explicitly declared as deprecated.
2013-11-07 15:43:00 +04:00
bugmaster
38962ba6f3 Update testing cases due to changes of issue 24130 2013-11-06 10:41:38 +04:00
abv
6a0964c23e 0024316: Make building with different versions of Tcl easier
On Windows with MSVC Tcl library is linked using #pragma statement instead of using project properties, to allow easy switch between Tcl versions. In gendoc.bat, tclsh.exe is called instead of tclsh86.exe, to avoid dependency on hard-coded Tcl version.

Tcl-dependent code (unused functions) removed from QABugs package.
2013-11-05 10:20:00 +04:00
abv
821edd22a9 Ray tracing activated in bottle sample if available; test bugs vis bug21753 added 2013-11-05 10:19:59 +04:00
kgv
1238134135 0024310: TKOpenGl - GLSL compatibility issues
Lights defintion clean up:
- remove duplicated enumeration TLightType (equals to Visual3d_TypeOfLightSource)
- remove unused fields from Graphic3d_CLight
- OpenGl_Light, reuse Graphic3d_CLight definition

Phong GLSL program:
- move out cumulative ambient light intencity from limited list of lights
- compatibility issues, replace array of structures (light sources, materials, clipping planes) with arrays of primitive types

New Draw Harness command vlight to alter light sources definition.

OpenGl_ShaderProgram::Initialize() - add missing Linker log
2013-11-05 10:19:58 +04:00
abv
e91d202a72 Test bugs vis bug24130 should be OK when OpenCL is present, corrected 2013-11-05 10:19:57 +04:00
kgv
262bf46d18 Draw_Window - workaround broken Tk.framework installations in OS X SDKs 2013-11-05 09:19:44 +04:00
kgv
9293178ba0 0024312: Compilation issues on OS X 10.9 Maverics SDK
Update glext.h. Fix compiler errors.
2013-11-05 09:19:42 +04:00
kgv
aa65144716 0024289: Linkage issue on TKViewerTest when built from cbp projects 2013-11-05 09:19:40 +04:00
kgv
543f0db099 0024311: TKOpenGl - desappeared 2D dimension text
OpenGl_Text - correct stecil buffer filling
2013-11-05 09:19:38 +04:00
kgv
05dd08ce63 0024309: TKOpenGl - Delay release of GLSL resources 2013-11-05 09:19:37 +04:00
bugmaster
765b3e07de Renaming overview folder 2013-11-01 17:16:16 +04:00
bugmaster
08060d8851 Update source files of documentation 2013-11-01 17:13:56 +04:00
ysn
dba69de2f0 0024269: Content of occt documentation should be formated
building subsection introduced; wok moved to dev guides section;
Requirements and Installation sections were interchanged;
some Unicode characters removed from .md files; \DeclareUnicodeCharacter{00A0}{ } instruction added into refman file
images insertion rolled back to dual html,latex insertion; mainpage now is processed (index.tex);
surplus part of overview has been removed
foundation_classes.md and technical_overview.md updated;
Reviewed step, tobj, xde and partly iges; Corrections in other guides.
Overview installation and requirements changes updated
2013-11-01 16:50:34 +04:00
bugmaster
4df5470212 Update OCCT version up to 6.7.0 beta 2013-11-01 16:15:11 +04:00
kgv
7ae4a3072a ViewerTest - do not require HAVE_OPENCL for ray-tracing commands
Add OpenCL info to dversion command
2013-11-01 15:46:15 +04:00
kgv
392ac9808e 0024250: TKOpenGl - per-pixel lighting using GLSL program (Phong shading) 2013-11-01 14:05:56 +04:00
kgv
65993a9537 Samples update 2013-11-01 14:03:05 +04:00
kgv
618d8e6135 OpenGl_Workspace_Raytrace.cxx - include OpenGl_Cl.hxx first 2013-11-01 14:03:03 +04:00
ski
47afc36788 0024298: Eliminate GCC compiler warning about unused in linux functions
Eliminated GCC compiler warning about functions for Win platform only.
Illegal function definitions were fixed.
2013-11-01 13:33:21 +04:00
bugmaster
0eb6f69ba3 Update VoxelDemo sample due to changes of issue 0024147 2013-11-01 10:46:27 +04:00
apn
4e3aa6b76e 0024223: Review of unstable test cases
Modified TODOs in unstable test cases
2013-11-01 10:39:46 +04:00
bugmaster
b794b14197 Update Animation sample due to changes of 0024267. 2013-11-01 10:13:07 +04:00
ifv
6a7ca55848 0024292: Testing parallelization of BO
Small correction of test case for issue CR24292
2013-11-01 10:07:36 +04:00
emv
78c66ef1c9 0024286: Wrong result done by General Fuse algorithm.
1. Instead of the tolerance value of the face the resolution of the surface of the face is used in
   the Face Classifier algorithm to define the state of the 2d point relative to that face.
2. Replace the vertices involved in PostTreatFF (treatment of section edges) with their images
   (new vertices created in PostTreatFF) in all pave blocks.
3. New value of the result in the test case boolean bsection L8.

Test cases for issue CR24286
2013-11-01 10:04:04 +04:00
aba
a6eb515f9d 0024133: Development of improvement of dimensions implementation; new length, radius,diameter and angle dimensions.
Some corrections; test cases were added; coding standards in MFC samples & presentations
Request stencil buffer for Linux.
correct test cases; correct compilation errors
compilation warnings (gcc/Linux)
2013-10-31 18:02:17 +04:00
ibs
7c633a3eab 0024153: Adding OpenCL to OCCT prerequisites
OpenCL is supported by CMake OCCT solution
3rdparty directory is changed to <occt root>
3rdparty seeking in additional places if 3rdparty dir isn't defined
2013-10-31 18:02:13 +04:00
dbp
e276548b09 0024130: Implementing ray tracing visualization core
The purpose of this functionality is to bring a basic ray-tracing solution to existing OCCT visualization toolkit (TKOpenGL).
Currently ray-tracing visualization core supports sharp shadows, specular reflections, transparency and adaptive anti-aliasing.
However, the basis for all ray-tracing algorithms is versatile, allowing you to add new ray-tracing features easily (such as ambient occlusion).
All ray-tracing computations are performed on the GPU using OpenCL framework, allowing real-time rendering performance.

It is important to note, that real-time ray-tracing is possible using high-performance GPUs with support of OpenCL 1.1 and higher (such as NVIDIA GeForce 660 or ATI/AMD Radeon 7850).
When using low-end GPUs (such as NVIDIA GeForce 640) the ray-tracing performance may slow down significantly.
Therefore, even with NVIDIA GeForce 640 you can render scenes with the millions of triangles. The support of OpenCL-enabled CPUs and integrated graphics cards is not guaranteed.
2013-10-31 18:02:12 +04:00
abv
008aef40eb 0024234: occt master is not compiled by VC++ 2005 (vc8 32/64 bit TKBO)
Fixed building by VS 2005 and VS 2013 (Express):
- macro _WIN32_WINNT defined in BOPCol_TBB.hxx for building with TBB on VS 2005
- compiler warnings specific for VS 2005 (vc8) fixed (explicit casts added in assignment expressions involving small integer types)
- definition of functions atanh, acosh, asinh is avoided for vc12 and later (they are provided by CRT in vc12)
- math constants (M_PI and similar) are defined by including math.h rather than by custom code
- misuse of stream operator << fixed in a few places
2013-10-31 15:31:05 +04:00
abv
2b3ac0cf2d 0024300: Remove unused class MMgt_StackManager 2013-10-31 13:57:14 +04:00
kgv
06c13a57cf 0024280: Documentation of TObj_Model::GetFile() is incorrect
Do not throw exception when model was not stored yet
2013-10-31 13:55:44 +04:00
ibs
9f6931fb8a 0024277: DRAW command that shows coordinates of a vertex
"getcoords" command added

"getcoords" moved to BRepTest/BRepTest_BasicCommands
2013-10-31 13:53:21 +04:00
kgv
ec2eeb2dfa 0024297: OpenGl_Texture::Release() might call OpenGL functions without active context
Add check to Release() method of OpenGl_Texture, OpenGl_ShaderObject, OpenGl_ShaderProgram
2013-10-31 13:50:05 +04:00
kgv
d0cc1cb7e0 0024295: vclose behavior is inconsistent
Process vclose on active view when executed without arguments
Fix trivial warning
2013-10-31 13:47:48 +04:00
kgv
be6e564e79 0024294: Access violation in AIS_InteractiveContext::MoveTo() 2013-10-31 13:33:04 +04:00
abv
f24125b9e5 0024284: Some trivial warnings produced by ICC 14
Eliminated ICC 14 warnings:
# 82: storage class is not first (e.g. "int static f()"
# 2621: attribute "dllexport" does not apply here (e.g. "Standard_EXPORT typedef int qqint;")
# 2415: variable "..." of static storage duration was declared but never referenced
# 111: statement is unreachable (usually "break" after "return" in cycles)
2013-10-31 13:31:39 +04:00
kgv
9447f91258 0024282: Shaded presentation is not computed due to exception in StdPrs_ToolShadedShape::Normal()
Fix gp_Dir initialization with zero modulus
StdPrs_ToolShadedShape::Normal() - reduce code duplication
Test cases for issue CR24282
2013-10-31 13:30:01 +04:00
mkv
429a6c4d2c Adjusting test unstable testing cases in Debug mode for current state of OCCT 2013-10-25 13:55:51 +04:00
bugmaster
aa4b5679ca Update CSharp sample (issue 0024147) for current state of OCCT 2013-10-25 13:52:07 +04:00
vdn
d1a2fee8ed 0024147: Update of CSharp sample
Overall revision of of CSharp sample code:
- Pure C++ project "OCC" deleted as unnecessary
- C++/CLI project "shell" renamed to OCCTProxy and refactored to implement all required interface to OCCT functionality.
- In About dialog, date corrected in Copyright statement
- CSharp files re-layouted with 2 spaces indentation
- ReadMe converted to MarkDown format and revised
- Generation of names of views refactored to avoid calling C++ level
- Project files corrected to run on 64-bit systems
- Batch scripts refactored to use OCCT default configuration

WPF front-end added to demonstrate usage of OCCT in WPF applications.
WPF sample was modified, operation Export has been fixed
Exception "Cannot create this file", which appeared by export to image format, has been corrected.
Option "Export image to .xwd" removed.
2013-10-25 13:45:47 +04:00
kgv
c4a8a6bb7b Fix cyclic dependency between OpenGl (OpenGl_Vec) and Graphic3d (Graphic3d_ShaderVariable) 2013-10-25 11:23:16 +04:00
abv
bd0b3e6097 Eliminate newly appeared warnings 2013-10-25 06:43:43 +04:00
pkv
796a784d36 0024157: Parallelization of assembly part of BO
New metod was implemented to class BOPAlgo_Builder
   - method:
void BOPAlgo_Builder::SetRunParallel(const Standard_Boolean theFlag)
The method sets the flag of parallel processing
 if <theFlag> is true  the parallel processing is switched on
 if <theFlag> is false the parallel processing is switched off
  - method:
Standard_Boolean BOPAlgo_Builder::RunParallel()const
The method returns the  flag of parallel processing

Class BOPTest was changed
   - static function:
Standard_Integer bbuild(Draw_Interpretor& di, Standard_Integer n, const char** a)
The optional parameters [ -s -t ] have been added to the command line of
the command 'bbuild':
bbuild r [-s -t]
-s : builds the result using serial procesing
-t : show the wall time
2013-10-24 16:09:09 +04:00
san
426dc099e9 0024267: Exception in Visual3d_ViewManager::Redraw() when color scale is displayed
Removing V3d_Viewer::Init() and the default views created internally by the viewer.
2013-10-24 16:03:33 +04:00
apl
bf6acfe656 0024270: Port viewer3d mfc sample to new clipping 2013-10-24 16:03:32 +04:00
szy
bc228f7757 CR24212: Moving OCAF samples from 'DRAW' component to OCCT samples. 2013-10-24 16:03:30 +04:00
abv
61043d3fe7 0024273: Eliminate compiler warnings in lex.ExprIntrp.tab.c generated by flex 2.91
Added #include of missing headers; double opening of C comment fixed; some warnings suppressed
2013-10-24 16:03:29 +04:00
abv
465d1a2c7e 0024264: OCCT 6.6.0: cutting 1600 cylinders from a box leads to out-of-memory on 32-bit system
Added test case (perf bop boxholes)
2013-10-24 16:03:28 +04:00
pkv
6699377892 0024266: Wrong result obtained by 'bopargcheck'
- method:IntTools_EdgeFace has been changed
Standard_Boolean IntTools_EdgeFace::IsProjectable(const Standard_Real aT) const
The checking the distance between the point on the curve projected point has been added.

IntTools packages were modified

Test cases for issue CR24266
2013-10-24 16:03:27 +04:00
apl
30f0ad2866 0024192: Adding support for shaders to OCCT visualization toolkit 2013-10-24 16:03:22 +04:00
vro
30bf45dc70 0024276: Memory leak due to a static variable
Cleaning of selected entities to avoid a memory leak.
2013-10-24 16:03:21 +04:00
apl
fd4a696350 0024228: TKOpenGL - destroy GL context at view close
- OpenGl_Display - release GL resources correctly on closing views
- OpenGl_AspectFace, OpenGl_AspectText, OpenGl_AspectLine, OpenGl_AspectMarker - initialize OpenGl resources on demand, when context is available.
- Graphic3d_TextureRoot - use const modifier for GetId method to avoid asynchronous resource state at OpenGl.
- Do not call OpenGL functions if no active GL context has been left
- Reset thread's context before deletion for Mesa WNT
2013-10-24 16:03:20 +04:00
kgv
ab2db9a59e 0024271: Provide Boolean operations for NCollection_Map
NCollection_Map - add two maps content Exchange operation without data copying
Add Exchange method to NCollection_DataMap, NCollection_DoubleMap, NCollection_IndexedDataMap, NCollection_IndexedMap
Add NCollection_Map::IsEqual() method
Corrections for gcc - use this->myAllocator
2013-10-24 12:13:28 +04:00
vro
14b04bd216 0023846: A crash on reading of a VRML file with wrong indices
A check of indices.
Test cases for issue CR23846
2013-10-24 12:10:45 +04:00
ifv
78fdb3d3fe 0024193: Useless iterations in IntStart_SearchOnBoundaries.gxx 2013-10-24 11:58:32 +04:00
ski
2f6cb3ac69 0024274: Eliminate GCC compiler warning (wrong initialize order)
Eliminated GCC compiler warning about wrong initialize order
2013-10-24 11:56:50 +04:00
aml
84f4830127 0024200: Wrong result obtained by Exterma Curve/Curve
changed number of nodes in case of GeomAbs_Line in Extrema_GExtCC::Perform() function.
changed number of nodes in case of GeomAbs_Line in Extrema_GExtCC::Perform().
fixed incorrect indexes and Coeff check in Extrema_CurveCache::Extrema_CurveCache added to avoid int overflow.
Added test case bugs/modalg_5/bug24200
Added check if (aNbS[i] * Coeff[i]) too big in Extrema_GExtCC::Perform().
2013-10-24 11:55:23 +04:00
gka
62f225930c 0024206: Exception is raised in the STEP loopback tests.
Fixed several cases of potentially uninitialized variables in Shape Healing.
Corrections to avoid warning for unused variable distmini and to avoid regression for case bug22805
2013-10-24 11:51:15 +04:00
apn
8da5fb19a9 0024263: TNaming_CopyShape::CopyTool failure
Problem is not reproduced on current state of master. Test case bugs/caf/bug24263 was added.
2013-10-24 11:41:06 +04:00
abv
37e640d5bd 0024257: Minor corrections for building / testing on VC++ 11
Several corrections coming from building and testing on MSVC++ 11:
- compiler warnings corrected in structiges.c (32-bit mode) and BOPAlgo (64-bit mode)
- DRAW command for testing exceptions (OCC6143) refactored for getting some output even if process fails (problem with stack overflow handling)
- DRAW command readstep removed as it leads to hang-up in Debug mode due to waiting for user input; the only test that used it changed to use testreadstep command
2013-10-24 11:38:16 +04:00
apn
3054a9f4df Improvements IGES and STEP interface in DEBUG mode 2013-10-18 11:51:12 +04:00
kgv
b0bd9ad0c6 .gitignore - ignore generated sh/bat scripts 2013-10-17 14:54:13 +04:00
ibs
72b7576f48 0023962: Moving OCCT documentation to sources
OCCT documentation (Overview and User Guides) has been converted from MS Word files to text-based MarkDown format and added to OCCT sources, in the new subfolder 'dox'. The HTML and PDF articles can be generated from the sources using Doxygen and MiKTeX. See the file OCCT_Docs_HowTo.md for details on the new documentation system.

This branch includes:

- new folder structure for Open CASCADE documentation
- sources of almost all OCCT User Guides and Overview
- tcl and bat scripts, which allow to generate HTML and PDF articles
2013-10-17 14:50:43 +04:00
abv
4d42a1a548 0024227: Enable SSE2 instructions for OCCT building
CMake script changed: SSE2 option is disabled for 64-bit MSVC compilers (redundant)
2013-10-17 12:39:28 +04:00
aml
b70bbe5845 0024144: BRepPrimAPI_MakeWedge wrong
fixed direction computing in gp_Lin Primitives_Wedge::Line.
Test cases for issue CR24144
2013-10-17 12:38:07 +04:00
abv
2bc5e8f1e0 0024244: Command bclear in DRAW does not clear all the data required for BOP re-initialization
In BOPTest_Objects::Clear() added clearing of the objects and tools of the operation.

Test cases for issue CR24244
2013-10-17 12:29:37 +04:00
pkv
199416879d 0024157: Parallelization of assembly part of BO
v0.0

I. New features:
no new features

II. Changes:
II.1. class BRepClass3d
   - method:
Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
	 gp_Lin& L,  Standard_Real& _Par)
The condition to prevent infinite loop has been added.

III. Modified entities:
packages:
BRepClass3d

Added test case bugs/modalg_5/bug24242

The phase 1 : Parallelization Building Faces.
Part 1.2. Building Same Domain Faces
Combined by pkv

Small correction of test case for issue CR24157_3
2013-10-17 12:27:04 +04:00
abv
6ff736d802 0024259: Clean up OSD_File implementation
Field myFileChannel removed from OSD_FileNode and introduced to OSD_File as Linux-only along with Windows-only myFileHandle.
Implementation of OSD_File cleaned from redundant type casts; some missing type cases added.
File mode passed to fdopen() corrected in read-write case ("rw" replaced by "w+").
Method OSD_File::Size() now returns Standard_Size to be able to return correct value for large files (on 64-bit platforms only).
2013-10-17 12:23:02 +04:00
kgv
8fa64b522f 0024256: TKOpenGl - C++/CLI application compilation issue due to namespaces collision 2013-10-17 12:21:27 +04:00
pkv
1da5279e08 0024242: Hang-up during classification a 3D point relative to a solid
v0.0

I. New features:
no new features

II. Changes:
II.1. class BRepClass3d
   - method:
Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
	 gp_Lin& L,  Standard_Real& _Par)
The condition to prevent infinite loop has been added.

III. Modified entities:
packages:
BRepClass3d

Added test case bugs/modalg_5/bug24242
2013-10-17 12:20:17 +04:00
pkv
af4e6dabcb 0024247: Wrong result obtained by General Fuse algorithm
v0.0

I. New features:
no new features

II. Changes:
II.1. class BOPAlgo_PaveFiller
   - method:
void BOPAlgo_PaveFiller::PerformFF()
Prepare data to the filter BOPAlgo_PaveFiller::::CheckPlanes(...).

   - method:
Standard_Boolean
  BOPAlgo_PaveFiller::CheckPlanes(const Standard_Integer nF1,
			  const Standard_Integer nF2)const
1)The contents of the filter has been updated by all vertices of the faces images.
2)The method declared as const

III. Modified entities:
packages:
BOPAlgo

Test cases for issue CR24247
2013-10-17 12:18:23 +04:00
aml
2b21c64155 0023650: Slow mesher: one bspline surface, 80 seconds for 132 triangles
Corrections in GeomLib::NormEstim, added norm computing using GeomLProp_SLProps.
Corrections in GeomLib::NormEstim, normal is computed with CSLib::Normal in case of a null normal.
Modified GeomLib::NormEstim Algo in case of null normal.
Added test case bugs/mesh/bug23650
2013-10-17 12:16:17 +04:00
emv
f933f9cf88 0024246: Draw command stepread given whithout arguments throws an exception
To stepread command added check for the number of arguments.
Minor correction (return 1 to indicate error)
2013-10-17 12:07:51 +04:00
ibs
a55f92813e 0024227: Enable SSE2 instructions for OCCT building
sse2 if used for just vc7, vc8, vc9 and vc10
2013-10-11 11:56:46 +04:00
apl
b859a34d22 0024224: Suspicious logics in changing clipping planes at OpenGl_Structure
1) Resolved buggy situation of shared clip planes between view and structure;
2) Added clipping plane equation space identification - to be used with shaders;
3) Code refactoring to resolve performance issue reported by 0024189;
4) Attachment of stencil buffer to FBO.

Added test case bugs/vis/bug24224
2013-10-10 17:15:53 +04:00
kgv
cbf1862449 0024245: TKOpenGL - use Message_Messenger interface to report issues 2013-10-10 17:09:06 +04:00
apn
8be24f106b Removing test case bugs/vis/buc60547 according to issue 23922 (test is meaningless and it sometimes hang-ups) 2013-10-10 17:09:04 +04:00
dbv
fc73450dcd 0024231: Test case update for bug 23654
Test case update
2013-10-10 17:09:01 +04:00
ski
d20d815bbe 0024236: Eliminate GCC compiler warning (uninitialized variables) 2013-10-10 17:08:58 +04:00
ski
012d92b631 0024239: Eliminate GCC compiler warning (multi-line comment) 2013-10-10 17:08:55 +04:00
aml
617cf08207 0024222: Compiler warnings 'unreacheable code' and 'conditional expression is constant' in MOA
Eliminated MSVS L4 warnings.
fixed incorrect break invoking in edge searching in SplitEdge.
2013-10-10 17:08:53 +04:00
abv
11fca7c177 0024227: Enable SS2 instructions for OCCT building
Test for exceptions corrected to handle FPE when built with with SSE2 option on Windows (NumericError raised instead of specific exceptions)
New test for performance of bspline intersections added

sse2 added; build bitness hardlinked to compiler

"bitness" variable was hidden
2013-10-10 17:08:50 +04:00
kgv
fcdbe2010e 0024230: TKOpenGl - request debug context by default in debug mode
Enable GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB only for debug builds.
2013-10-10 14:33:05 +04:00
kgv
9be3a89476 0024225: TKOpenGL, OpenGl_FrameBuffer - Wrong ID is used for attachement of depth RenderBuffer to FBO 2013-10-10 14:29:19 +04:00
emv
0e09ee8ee5 0024220: bopargcheck returns valid for C0 shape but results of boolean operations are broken with such shapes
Added check for C0 geometries to bopargcheck command.
Test cases for issue CR24220
2013-10-10 14:28:02 +04:00
kgv
eb7c351adf 0024235: BRepBuilderAPI_Sewing - add protection against too small tolerance 2013-10-10 14:24:13 +04:00
kgv
229c0b6a3b 0024233: OpenGl_Window - compilation for Windows NT 4.0 target 2013-10-10 14:20:56 +04:00
isn
b514beda8a 0024181: Text to BRep functionality
Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation.
New text2brep Draw Harness command.

bottle.tcl - draw text on the bottle side using new functionality.
ViewerTest - process Delete key in 3D-Viewer to delete selected presentations.
Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested.

bottle.tcl - use prism instead of pipe

TKViewerTest - add required FreeType dependency

verase - display the list of erase objects

TKViewerTest - add required FreeType dependency for projects generation
2013-10-10 14:12:29 +04:00
nbv
c63628e845 0024211: Definition of Basic Runtime Check parameter causes regression in debug mode
Out of ChoixRef array boundaries.
Uninitialized variable in IntCurve_IntPolyPolyGen::findIntersect(...) function.
Handling of infinity numbers in sprops command is added.
test (CPU-limit)
2013-10-10 13:31:41 +04:00
szy
1c9cffdb4b 0024164: Optimization of OCAF document closing
OCAF document closing redesign.
added 2 test scripts.
removed commented method.
added missed Draw commands.
2013-10-10 13:29:18 +04:00
mkv
830d849f94 0023932: Standard_NoSuchObject thrown computing section between two cylinders - new to 6.6.0
Adding new test cases
2013-10-04 12:43:26 +04:00
bugmaster
f92826ebaa 0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds
Update testing case
2013-10-04 12:39:02 +04:00
bugmaster
8335fd2061 0024140: Endless loop in BRepAlgoAPI_Section
Update testing cases
2013-10-04 12:37:37 +04:00
bugmaster
367988e89c Improvements in test cases bugs/modalg_1/bug13209_1 bug13209_3 bug13211_7 bug13211_9 on MacOS platform after integration fix for 23981 issue 2013-10-04 12:27:00 +04:00
bugmaster
c74961a0e1 Improvements in test cases boolean/bsection/G5 N6 in Debug mode according to integration fix for issue 24140 2013-10-04 12:12:45 +04:00
bugmaster
bcb1adc56d 0023654: Problem with displaying vertices in OCC view after closing all OCC views and opening new one
Update CSharp sample
2013-10-04 11:09:24 +04:00
gka
4798010403 0024174: [regression] BRepBuilderAPI_Sewing returns result with very high tolerance
Fix for bug 0024174: [regression] BRepBuilderAPI_Sewing returns result with very high tolerance
Test script for CR24174
Test cases for issue CR24174
Small correction of test cases for issue CR24174
2013-10-03 16:38:36 +04:00
ifv
1665a85a84 0024195: Use of uninitialized data in IntCurve_IntPolyPolyGen.gxx
Fix for regressions
Modified test cases de/iges_1/R8 and de/iges_2/I7 according to new data
2013-10-03 16:31:43 +04:00
ifv
7c4e9501b4 0023981: Wrong section curves
Test case for issue CR23981
Small correction of test case for issue CR23981
2013-10-03 16:14:55 +04:00
jgv
b1c5c4e6a6 0024140: Endless loop in BRepAlgoAPI_Section
Test cases for issue CR24140
2013-10-03 15:48:51 +04:00
aml
59fcbcaeaa 0024068: Wrong result done by projection algorithm
Corrected number of nodes needed to create tree in case of BSplineSurface on current master.
Test case for issue CR24068
2013-10-03 14:37:38 +04:00
ifv
89d8607f13 0024137: math_FunctionSetRoot returns too rough solution
Test case and new draw command for issue CR24137
Modified test case de/iges_1/G9 according to new data
Small correction of test cases for issue CR24137
2013-10-03 14:34:40 +04:00
nbv
91bb31f35e 0023360: Test cases for command mkoffset produce different results on different versions of OCCT
1. Function QuasiFleche(...) does not call for small edges.
2. Forbid to work with NULL-shapes in OffsetWire::FixHoles(...) function.
3. ProjOnCurve(...) function in Bisector_BisecCC.cxx file returns status (DONE or NOT DONE).
2013-10-03 14:31:09 +04:00
vdn
3cb77da46e 0023459: Update QT samples
Removing Qt3Support layer of Qt 4
Changed all files for Qt4 and added file VoxelDemo.pro
Removed 'static' before the declaration of handling FSD_File.
2013-10-03 14:28:12 +04:00
emv
9d1c5188ae 0024213: bopargcheck complains on sphere
Added check for degenerated edges.
Test case for issue CR24213
2013-10-03 14:23:04 +04:00
szy
b2197f9397 0024172: Compiler warnings 'unreacheable code' and 'unreferenced local function' in OCAF
Files _Sample.cxx containing unused sample code are removed from several OCAF packages.
Cycles for() with body always ending with 'break' are replaced by equivalent if() statements.
2013-10-03 14:18:52 +04:00
dbv
eb4320f2d9 0023654: Problem with displaying vertices in OCC view after closing all OCC views and opening new one
Fixed graphic structure recompute after closing view.
Removed collector and all corresponding logic and methods from AIS_InteractiveContext.
Method AIS_InteractiveContext::Erase() now hide object from viewer without deleting resources.
Erased objects now properly recomputed after closing view.
Samples update
Removed useless method AIS_InteractiveContext::EraseMode()
Documentation update
Warnings fix
Regressions fix
2013-10-03 14:12:16 +04:00
aml
3ed30348aa 0024167: Compiler warnings 'unreacheable code' and 'conditional expression is constant' in MOA
Resolved some C4702 (unreachable code) and C4127 (conditional expression is constant).

small corrections in NoSuchObject invoking.

Macros names changing, deadcode deleting, re-writing "for" loops into equivalent "if" structures.

changed condition in "if" block, deadcode deleted.

Small changes in else statement.
2013-10-03 14:08:10 +04:00
kgv
d9ec7d1d09 0024148: Test case bugs/vis/bug24131_markers works wrong with software MS OpenGL
Fix misprint in OpenGl_Window aGLForma -> aGLFormat
2013-09-30 11:39:12 +04:00
pkv
09126f1631 0024157: Parallelization of assembly part of BO
Providing compatibility with new versions of Linux
2013-09-27 14:39:30 +04:00
azv
aeaf53d5ed 0024134: Wrong result of projection point on the face
Changed Bnd_SphereUBTreeSelector for the Extrema_ExtAlgo_Tree projection algorithm properly work
Test case for issue CR24134
2013-09-27 10:34:04 +04:00
abv
42ff8f5bd3 0024108: Boolean fuse fails
Tolerance of checking distance between vertex and edge in BOPInt_Context::ComputeVE() increased by additional Precision::Confusion() to allow for interference to be detected in this particular case.

Two tests added for this issue: one with original shapes and another in rotated co-ordinates
2013-09-27 10:29:52 +04:00
pkv
acccace3fb 0024157: Parallelization of Assembly part of BO
The Build (Assembly) Part of BO consists of several sub-parts:
1. Building Vertices
2. Building Edges
3. Building Faces
4. Building Solids
5. Building Container Shapes (Wires, Shells, Compsolids, Compounds)

Among the parts above
3.Building Faces
and
4.Building Solids
are the most time-consuming and thus should be parallelized first.

The parallelization process can be divided on three phases:
1. Parallelization Building Faces
2. Parallelization Building Solids
3. Parallelization the rest parts

The phase 1 : Parallelization Building Faces consists of three parts:
1.1. Building Split Faces
1.2. Building Same Domain Faces
1.3. Building Faces with Internal Shapes
The branch deals with the phase 1. chapter 1.1. Building Split Faces
2013-09-27 09:54:29 +04:00
azv
b045e6a40b 0024142: Wrong section curve
Modified intersection of two conical surfaces with almost the same axis of revolution
Test cases for issue CR24142
2013-09-26 20:36:30 +04:00
abv
cccf81ea2a 0024176: Array out-of-bound error in Vrml loader (test bugs moddata_3 bug23023)
Code assigning normals to nodes of triangulation corrected to use correct index of the node and avoid array out-of-bound errors.
2013-09-26 20:28:47 +04:00
emv
b4109929d6 0023958: Section of shell by plane is incomplete.
Modifications 1
1. To avoid creation of micro edges in the class BOPAlgo_PaveFiller added two new functions ForceInterfVE and
   ForceInterfVF which updates tolerance of Vertex to make it interfere with Edge and Face accordingly.
2. In the class BOPInt_Tools added new function IsInRange which checks whether two ranges cross each other.
3. In the class BOPTools_AlgoTools added new function IntersectCurves2d which intersects pcurves of the face
   to check it on the self-interference.
4. In the function IntTools_BeanFaceIntersector::FastComputeExactIntersection() the check on the coincidence of the whole
   edge with the face (BOPTools_AlgoTools::IsBlockInOnFace) replaced  with the check on the coincidence of one intermediate point with that face.
5. Test cases bugs modalg_1 bug1255, bug1255_1 has been updated with more correct value of the result.
6. TODO statement has been removed from the test cases boolean bcut_complex B1,B3,B5,C2,C4,C6,C8 as they are correct.

Adding test case for issue CR23958

Modification 2
1. In class BOPAlgo_PaveFiller added new function CheckPlanes(nF1, nF2) that checks whether two planar faces have common or intersecting sub shapes.
If these two faces do not have such sub shapes there is no need to intersect them.
2. In the function BOPAlgo_PaveFiller::MakeBlocks() added block for reducing the tolerance values to the previous state for the vertices
that were put on the section curve (with increasing of its tolerance value) that was rejected by the algorithm.

Modification 3
Back to Extrema_ExtAlgo_Grad algorithm in extrema computations in Boolean Operations algorithm.
2013-09-26 20:26:50 +04:00
kgv
abe4607711 0024148: Test case bugs/vis/bug24131_markers works wrong on software MS OpenGL
Add pre-rendered images for custom markers.
OpenGl_Window - drop overcomplicated find_pixel_format() function
OpenGl_Caps - add option to force software OpenGL imlementation (MS or Apple)
Remove TODO from test case
Add grayscale custom marker to the test
Correct color bitness in attributes list
2013-09-26 20:22:05 +04:00
abv
e4b1d802ad 0024198: Remove unused stuff in WNT package
Removed several obsolete files in WNT package (win32 and Windows 95 specific)
2013-09-26 20:17:54 +04:00
azv
198753532d 0023863: Wrong distance value between circle and cylinder
The verification of intersection of a circle and a cylinder was added to the calculation of extrema
Test cases for issue CR23863
2013-09-26 20:14:12 +04:00
omy
7dc9e04716 0024186: Eliminate remaining compiler warnings in MSVC++ 2010 64 bit with warning level 4
Eliminated some warnings of type C4267 (conversion from Type1 to Type2: possible loss of data); size_t to int explicit casts added.
Fixed warning C4267 and 4244 in OSD* files

Change in OSD_FileNode and OSD_File reverted since different handle types are needed on Unix and Windows
2013-09-26 17:21:40 +04:00
pkv
b62b3e079f 0024190: Exception raised during topological operation.
v0.0
I. New features:
no new features

II. Changes:
II.1. class BOPAlgo_CheckerSI
   - method:
void BOPAlgo_CheckerSI::Perform()
The contents of the method is encompassed with "try/catch" block.

III. Modified entities:
packages:
BOPAlgo

Test cases for issue CR24190
2013-09-26 17:19:35 +04:00
emv
c884a2681d 0024187: Wrong result of COMMON operation.
In the function
  void BOPAlgo_Builder::FillInternalShapes()
added treatment for the arguments of type COMPOUND.

Adding test case for issue CR24187
2013-09-26 17:17:30 +04:00
omy
8b381bc3a3 0024191: Static assert functionality should be added to Standard_Assert.hxx
Added Standard_STATIC_ASSERT macro for compile-time asserts.
The new macro is used in Standard_MMgrOpt and QANCollection.
2013-09-26 17:10:01 +04:00
omy
0ebaa4dbc9 0024177: Eliminate CLang compiler warning -Wlogical-op-parentheses (&& within ||)
Some fixes to eliminate warning
2013-09-26 17:07:27 +04:00
apn
e97ea58f01 0024201: Remove TODO "Tcl Exception: File aaa.stl could not be found" and similar ones 2013-09-24 12:49:19 +04:00
apl
4269bd1b11 0024070: OpenGL capped object-level clipping planes
Graphical clipping:
- Use "Graphic3d_ClipPlane" to defined clipping for PrsMgr_PresentableObject (local clipping), for V3d_View (global clipping).

Get rid of old implementations:
- Remove Visual3d_ClipPlane.
- Port V3d_Plane to Graphic3d_ClipPlane core.

Selection Sensitives:
- Port "Matches" method to add full set of arguments (SelectBasics_PickArgs), including min-max depth coming from selector.
- Get rid of transient data for pair Matches -> ComputeDepth.
- Extend SelectMgr_ViewerSelector::LoadResult to work with local clipping, add virtual callbacks to compute globa/local depth clipping for picking.

Capping rendering algorithm:
- Recursive rendering algorithm for OpenGl_Groups.
- Introduced Rendering filter for groups.

Clipping plane management in TKOpenGl:
- Added OpenGl_ClippingState to OpenGl_Context.

DRAWEXE commands:
- Ported "vclipplane" command for new approach.
- Added "vsettexturemode" command for changing texture details in views (enable / disable textures).

Correct DownCast syntax (compilation error)

Fix new compiler warnings

tests/bugs/vis/bug22906 migrated to the new vclipplane syntax
2013-09-20 12:09:54 +04:00
nbv
788cbaf4c4 0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds
Checking of possibility of bad result.
Adding test case for issue CR24005
Correction of test case for issue CR24005
2013-09-20 12:09:50 +04:00
emv
bb58e462ad 0024154: Wrong result of CUT operation
Rebuild normal for the face if the method FindPointInFace fails (unable to find point in the face in bi-normal direction).
Adding test case for issue CR24154
2013-09-20 12:09:49 +04:00
apn
c7a422d893 0024182: It's necessary to add TODO in test cases to avoid known regressions and improvements on MacOS 2013-09-20 12:09:48 +04:00
dbp
c7b6656812 0024188: Doubling the number of light sources in Qt samples. 2013-09-20 12:09:46 +04:00
azv
5d99f2c887 0023964: Extrema_ExtXX::Point methods might return constant reference instead of copy
Changed definitions of Point() functions
Removal of floating point exceptions from previous commit
2013-09-20 12:09:45 +04:00
omy
295cb05393 0024168: Eliminate CLang compiler warning -Wunused-variable
Got rid of warning -Wunused-variable

In FSD_File, use template specialization instead of comparison of sizeof() to specific value in if statement, thus eliminating warning "constant value in conditional expression"
2013-09-18 11:27:33 +04:00
omy
74d80fb976 0024170: Eliminate CLang compiler warning -Wunused local functions
Removed unreferenced local functions -Wunused
Removed self assignment
Merged IntStart_SearchOnBoundaries*.gxx files into one file.
2013-09-18 10:29:30 +04:00
omy
b6abaec0c8 0024169: Eliminate CLang compiler warning -Wunused-value
Got rid of warning -Wunused-value
2013-09-18 10:29:29 +04:00
omy
258ff83bb6 0024162: Eliminate CLang compiler warning
Got rid from most cases of appearance '-Wunused-private-field' warning
2013-09-18 09:43:17 +04:00
omy
eafb234bf1 0024171: Eliminate CLang compiler warning -Wreorder
Got rid of -Wreorder warning (wrong fields' initialization order); some warnings -Wdangling-else are also fixed
2013-09-18 09:36:12 +04:00
abv
105aae761e 0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings
- ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources
- ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma
- OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file
- PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned
- Other places: some casts added to avoid warnings
2013-09-18 09:13:42 +04:00
abv
498ce76bde 0024129: Eliminate remaining compiler warnings in MSVC++ 2008 32 bit with warning level 4
List of resolved warnings:

c4063: Aspect.cdl; TObj_Application.cxx; PCDM.cdl; OpenGl_Workspace_5.cxx;
c4100: XDEDRAW.cxx; ViewerTest_ViewerCommands.cxx; TopOpeBRep_FacesFiller_1.cxx; TopClass_Classifier3d.gxx; TDataStd_ReferenceArray.cxx; QABugs_19.cxx; IntPatch_ImpImpIntersection_5.gxx; HLRTopoBRep_DSFiller.cxx; HLRBRep_Data.lxx; DPrsStd_AISPresentationCommands.cxx; BRepMesh_Delaun.cxx;
c4127: BOPTools_AlgoTools2D.cxx; MAT_Mat.gxx; GeomFill_SweepSectionGenerator.cxx; BRepMesh_Delaun.cxx;
c4189: IntCurveSurface_Inter.gxx; IGESToBRep_BRepEntity.cxx; BRepMesh_Delaun.cxx; BRepAlgo_Loop.cxx; IntStart_SearchOnBoundaries_1.gxx;
c4190: Plugin_Macro.hxx;
c4389: Visual3d_View.cxx; TopOpeBRep/TopOpeBRep_vpr.cxx; TDataStd_BooleanArray.cxx; IntPatch_ALine.cxx;
c4701: BRepAlgo.cxx;
c4702: MNaming_NamingRetrievalDriver_1.cxx; MNaming_NamingRetrievalDriver_2.cxx; BRepClass3d_SolidExplorer.cxx;
c4706: TestTopOpe_BOOP.cxx;

Additional fixes:
- old-style declarations of C functions in IGES and STEP parsers
- clean-up of debug code, fixes for building in Debug mode
- in BRepFill_TrimShellCorner.cxx, lines 878-9, wrong use of assignment instead of comparison fixed
- fix for Plugin_Macro reverted; warning 4190 disabled instead
- in IntPatch_ALine.cxx, line 520, wrong comparison of boolean with index fixed
- in InterfaceGraphic_Visual3d.hxx, field IsCustomMatrix made boolean
- in TopOpeBRepBuild_ShapeSet, obsolete (unused) methods removed
2013-09-18 09:13:31 +04:00
bugmaster
39aac5778a Adding UnitsAPI in resources for FoundationClasses.tcl of OS package. 2013-09-17 10:49:54 +04:00
ibs
d5aedb2c6d Setting Warning Level for Windows (MSVC) to /W4 and Linux -Wall 2013-09-16 17:18:33 +04:00
apn
3cdfdc9a2b 0024156: It's necessary to add TODO in test cases to avoid known regressions on MacOS 2013-09-12 14:18:28 +04:00
emv
6dc54e56bf 0024143: bopcheck command throws an exception
Use the tolerance value of the face instead of sum of tolerance values of face and edge to compute grid points on the surface of the face.
Adding test case for issue CR24143
2013-09-12 14:15:03 +04:00
vro
b569f2a3ba 0024115: A draw-command loadvrml fails on non-current folder
A folder is taken from the input file name (if it contains one).
Removed spaces.
Adding test case for issue CR23846
The test for bug 23846 depends on this fix (24115) and the source files of 23846. Therefore the test on 23846 shouldn't participate in the test for 24115.
2013-09-12 14:12:57 +04:00
omy
4552136784 0024135: Result of reading step file is invalid.
Now wrong multiplicity of boundary knots will be set to Degree + 1 (if it is higher).
Adding test case for issue CR24135
2013-09-12 14:09:43 +04:00
kgv
18e8557466 0024158: OpenGl_AspectMarker - debug assert on destruction of Alpha texture shared between multiple RGB texture
In addition - delay marker resources destruction in the similar way as textured fonts
2013-09-12 14:06:50 +04:00
gka
5a29f57e9b 0024036: Regression: sewing is not correct
Adding test case for issue CR24036
Loading Draw plugin containing command "freebounds"
Loading plugin XDEDRDRW was changed on loading plugin XSDRAW
2013-09-12 14:04:59 +04:00
mkv
45e81bbf67 Correction of test that showed regression on IR after integration latest changes 2013-09-06 11:41:50 +04:00
apn
f23d022c2f Correction of testing case due to regression in Debug mode caused integration fix for issue 24131 2013-09-06 11:36:03 +04:00
apn
75262f0647 Correction instable testing case in Debug mode 2013-09-06 11:33:33 +04:00
apn
b58dfc5e92 0024121: It's necessary to add TODO in test cases to avoid known regressions in debug mode 2013-09-05 13:43:39 +04:00
mkv
f01a69c8c7 0023978: BRepCheck reports check failure
Modification test case for issue CR23978
2013-09-05 13:37:11 +04:00
pkv
744511c845 0024122: Hang-up during a topological operation.
I. New features:
no New features.

II. Changes:
II.1. class : BOPAlgo_Builder
   - method:
void BOPAlgo_Builder::FillIn3DParts(BOPCol_DataMapOfShapeListOfShape& ,
				    BOPCol_DataMapOfShapeShape& ,
				    const BOPCol_BaseAllocator& )

The algorithm of finding 3D-parts for solids has ben changed.
To improve the performance the unbalanced binary tree is used.

II.2. class : BOPTools_AlgoTools
   - method:
Standard_Boolean BOPTools_AlgoTools::GetFaceOff
  (const TopoDS_Edge&,
   const TopoDS_Face&
   BOPTools_ListOfCoupleOfShape& ,
   TopoDS_Face&
   Handle(BOPInt_Context& )
The data treatment for tangent cases has been changed

III. Modified entities:
packages:
BOPAlgo
BOPTools

Small corrections of test cases
2013-09-05 13:33:15 +04:00
kgv
a577aaabf9 0024131: TKOpenGL redesign GPU memory management for markers presentation
Introduce Point Sprites usage.
Graphic3d_Group - drop Marker(),MarkerSet() methods - markers should be drawn using AddPrimitiveArray.
Added new Draw Harness commands vcaps, vmarkerstest.
2013-09-05 13:23:03 +04:00
emv
aabe3a17dd 0024138: Exception during projection of the point on the face
Adding test case for issue CR24138
2013-09-05 13:17:50 +04:00
kgv
08398024d0 0024136: Mouse move events from inactive Draw Harness window should not be processed on active window 2013-09-05 13:15:23 +04:00
kgv
e9b037efd2 0024132: Test execution fails due to permission rights issues
Generation of temporary files used for capturing DRAW command output on Windows is improved to use directory specified by environment variable TMP or TEMP (instead of root directory which can be write-protected)
2013-09-05 13:13:10 +04:00
kgv
58655684c0 0024123: Create debug OpenGL context when requested (GL_ARB_debug_output)
Introduce new OpenGl_Caps class for unified graphic driver options access.
New command vgldebug to request debug OpenGL context.
OpenGl_Window  - create debug OpenGL context when requested (WGL-only).
OpenGl_Context - destroy arbTBO, arbIns members.
Workaround namespace collisions with Xlib macros
Eliminate new warning (unused argument in OpenGl_Context::debugCallbackWrap)
2013-08-29 15:46:40 +04:00
kgv
5e1e45fc69 0024128: Prs3d_WFShape - remove debug environment switch DEBUG_TRIANGLES 2013-08-29 13:45:08 +04:00
emv
4355f260b0 0024065: Wrong intersection point
Adding test case for issue CR24065

Small corrections of test cases
2013-08-29 13:32:24 +04:00
emv
0f180c0c18 0024126: Crash on fixing the attached shape
Added the check for an empty list.
Adding test case for issue CR24126
2013-08-29 13:28:51 +04:00
kgv
c151c0f1f5 0024120: Move out StdPrs_WFShape implementation to StdPrs_WFShape.cxx
Small correction of test case
2013-08-29 13:26:13 +04:00
vro
b45c727b8d 0024061: Draw-commands for Voxels are insufficient to test the functionality
Upgrade of draw-commands + a new draw-command calling conversion of a shape into voxels.
Resolved of a problem of failure of non-regression tests on voxels (vis/bug19820).
2013-08-22 13:40:54 +04:00
vro
8b7c5e4715 0023987: 2D fillets
Added test cases in group bugs/modalg_5
Test cases were put to corresponding regular grid fillet2d
2013-08-22 13:40:53 +04:00
vro
22774b6295 0024083: BRepCheck_Wire crashes processing a wire consisting of many edges
A check on 0 is added.
A recursive method Propagate() is replaced by a non-recursive implementation.
Adding test case for issue CR24083
2013-08-22 13:40:52 +04:00
skv
6f005d2afc 0024107: BRepAlgo::ConcatenateWireC0 method doesn't work on a translated wire
Adding test case for issue CR24107
Correction test case for issue CR24107
2013-08-22 12:29:02 +04:00
omy
1d47d8d066 0024059: Eliminate compiler warning C4701 in MSVC++ with warning level 4
Removing pPotentially uninitialized local variable
Got rid of most of warnings C4701: Potentially uninitialized local variable
Removed redundant variable definitions.
Refactored a part of AppParCurves_ResolConstraint CTOR.
Replaced 0. to Precision::Confusion for tolerance vars;
Changed values for min and max parameter vars;
Got rid of redundant variables' initialization.
2013-08-22 12:08:59 +04:00
kgv
99d99a6db2 0024113: Provide missing OpenGl_VertexBuffer::SubData() specializations
remark on doxygen documentation
2013-08-22 11:27:07 +04:00
vsr
29cb310ae9 0011758: TCollection strings are not memory safe as reported by Purify
Custom string handling code enabled by OptJr macro removed from implementation of strings in TCollection and elsewhere.
Functions from string.h are used instead of macros from Standard_String.hxx
File Standard_String.hxx and methods ISSIMILAR and HASHCODE of TCollection*String classes are removed (to be replaced by strcasecmp).
Functions HashCode for strings reimplemented using DJB2 algorithm for C strings and SDBM algorithm for extended strings.
Adding test cases and draw-command for issue CR11758
Fix misprint added with previous integration
Fix misprint in the test command.
Remove compilation warnings (Linux).
Avoid compiler warning "dereferencing type-punned pointer will break strict-aliasing rules" on Linux
2013-08-22 11:22:51 +04:00
vro
80cd454f1d 0023864: An & symbol is read incorrectly from a XML Ocaf file
A line is uncommented. This line sets the successfully read & symbol.
Correction and adding test cases for issue CR23864
2013-08-15 17:24:06 +04:00
emv
d3c5411b48 0024105: ShapeFix algorithm produces not correct result.
Small correction.
Adding test cases for issue CR24105
2013-08-15 17:24:03 +04:00
kgv
cc9d78dbca 0024112: Unused variables are initialized in Extrema package 2013-08-15 17:23:59 +04:00
Roman Lygin
d2d893b809 0024045: Invalid test case for matrix-vector multiplication 2013-08-15 17:23:56 +04:00
Roman Lygin
b28e7cc6d1 0024044: Performance improvements: Foundation Classes (math) 2013-08-15 17:23:53 +04:00
Roman Lygin
6f94f1dff9 0024081: Memory corruption when projecting point on surface of revolution
Adding test cases for issue CR24081
2013-08-15 17:23:50 +04:00
pkv
f4ea2ca675 0024106: Project non-regression test: geom/boolean_operations6/G3 provides incorrect result. 2013-08-15 17:23:46 +04:00
szy
7dcac1dfa0 0023766: Shape orientation processing mechanism redesign
Added missed file.
Added missed MDF_Tool.cxx.
Adding test cases for issue CR23766
2013-08-15 17:23:43 +04:00
ika
602952413f 0022535: Cut sphere: invalid shape after reading from STEP
In cutting sphere it's seam edge was divided into two parts(by cylinder),
but pcurves of  the second were not shifted during shape healing.
Test cases correction
2013-08-15 17:23:40 +04:00
pkv
1da6ad3265 0024089: Missing section edge
Added test case bugs/modalg_5/bug24089
Small correction of test case buc60462_2
2013-08-15 17:23:37 +04:00
omy
d390b16690 0024095: Eliminate compiler warning C4512 in MSVC++ with warning level 4
Removed most of warnings C4512 for non-copyable objects
2013-08-15 17:23:34 +04:00
pkv
128dba6fb7 0024092: Boolean fuse fails
Adding test cases for issue CR24092
2013-08-15 17:23:30 +04:00
omy
4e18e72a22 0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4
Removed obsolete functions from sources.
Some useful debug functions were 'defined' ( put into #ifdef ...#endif )
Removed some redundant code
2013-08-15 17:23:27 +04:00
pkv
7ff8f0197e 0024101: Self-Interference Checker provides results that are inconsistent with the Project requirements. 2013-08-15 17:23:24 +04:00
pkv
72e88cf7a8 0024098: Exception Standard_OutOfMemory raised during topological operation. 2013-08-15 17:23:20 +04:00
szy
fa13a85d92 0003513: There is no check for boundary of array in method Set for array attributes
- Added check of array's boundary in Set(i, val) methods.
- Added comments to cdl files.
- removed accidental modification in TDataStd_ExtStringArray::Value(i).
- recovering accidentally lost modifications.
2013-08-15 17:23:17 +04:00
omy
8263fcd384 0024087: Eliminate compiler warning C4244 in MSVC++ with warning level 4
Most of the compiler warnings C4244 have been eliminated.
2013-08-01 12:38:21 +04:00
ika
673693f1cf 0021317: Face cannot be fixed by Shape Healing
Fix that face, in which only wire was reordered during shape healing, was not replaced.
Add test case for this fix
Add status for shifted wires in reordering.
Modified test case de/step_1/E3 according to new reference data
2013-08-01 12:34:52 +04:00
omy
773f53f1ec 0024085: Eliminate compiler warning C4706 in MSVC++ with warning level 4
Got rid from most cases which led to Warning c4706
Tiny code style corrections
2013-08-01 12:20:35 +04:00
oan
304c45c83f 0023105: Exception during Meshing / Missing triangles
Fix compilation error on Linux
Adding test command for this fix
meshPolygon: simplify source polygon by splitting it onto parts without glued edges and loops
Check surrounded triangles during final cleaning of mesh
Correct polygon on frontier edges
Modified test cases in group mesh according to new behavior
2013-07-25 13:11:00 +04:00
apn
55f1e74d75 0023614: BRepMesh creates incorrect triangulation on the attached models
Added test cases bugs/mesh/bug23614_1 bug23614_2 bug23614_3 bug23614_4
2013-07-25 12:57:39 +04:00
ika
fdabc2117e 0023746: IGES wheel model fails to load when OCCT unit is meters
Add check for too small distances during edges reordering
Fix writing TrimmedSurface (Type 144).
Fix checking for too small distances between loops of edges during edge's reordering.
Add checking for too small BSpline segments during reading and writing IGES.
Fix wire splitting by adding checking that vertexes same not only in 3d, but in 2d too.
use tolerance of vertexes recomputed through resolution surface, not 2d curves.
Adding test case for this fix
Modified test case bugs iges bug23746 and cases in group de according to new reference data
2013-07-25 12:39:12 +04:00
apn
a9e4846fe4 0024022: Slow meshing in BRepMesh
Added test case bugs/mesh/bug24022
2013-07-25 12:35:33 +04:00
bugmaster
63fb818eb7 Update of environment files of qt samples for compilation in batch mode. 2013-07-24 15:41:33 +04:00
nbv
440906ef6a 0024077: Build errors on master branch on Mac OS X
small correction
Init() method is called with other parameter.
2013-07-22 12:31:41 +04:00
bugmaster
66deda1eea Corrected integration to remove incorrect merge fix for issue 0024057 with fix for 0023582 2013-07-19 12:43:03 +04:00
gka
da0e82aac3 0024047: Exception in TPrsStd_AISPresentation during destruction of TDocStd_Document
Adding test case for this fix
Modification in order to avoid exception during destruction of AIS_InteractiveContext
Small modification for trihedron
Small modifications to avoid regressions
Cosmetic modification
2013-07-18 13:16:35 +04:00
Roman Lygin
efef9da8e5 0024072: VC 2009 64-bit compiler crashes while compiling IntPoly_ShapeSection.cxx 2013-07-18 13:12:49 +04:00
omy
35e08fe886 0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
Got rid of warning C4100: 'identifier' : unreferenced formal parameter
Got rid of compile errors
2013-07-18 13:09:32 +04:00
mkv
92a4955951 0024075: Boolean Section between two faces fails 2013-07-18 13:06:06 +04:00
omy
cf6625bdc6 0024076: New warning during compilation OCCT on WNT platform (release and debug)
Added return statement to disable warning
2013-07-18 12:57:50 +04:00
jgv
ee9451aba5 0023839: Projection algorithm produces wrong results for set of data
Added test cases bugs/modalg_5/bug23839_1 bug23839_2 bug23839_3 bug23839_4 bug23839_5 bug23839_6 bug23839_7
2013-07-18 12:54:38 +04:00
jgv
fa748d099f 0023582: Argument of LocOpe_WiresOnShape::SetCheckInterior() function is ignored. 2013-07-18 12:49:03 +04:00
emv
95978b2851 0024069: Confusion in the name of variables 2013-07-18 12:46:41 +04:00
ika
381a6d0e99 0023570: Command param in DRAW outputs non-readable symbols
Added test case bugs/xde/bug23570
2013-07-18 12:44:08 +04:00
bugmaster
a44902efd1 Update of environment files for compilation in batch mode. 2013-07-18 12:11:50 +04:00
ibs
03c69aec69 0024054: Move the dynamic part of main CMakeLists.txt to adm/cmake folder 2013-07-17 15:04:32 +04:00
omy
d3f26155b5 0024058: Eliminate compiler warning C4702 in MSVC++ with warning level 4
Got rid of most of warnings of C4702 type: unreachable code.
Returned some #ifdef DEB
Fixed tabs formatting
Fixed some mistakes in code
2013-07-12 12:54:01 +04:00
emv
c1746a0ac9 0024060: Wrong result done by general fuse algorithm.
Added treatment of the vertex as a single object.
Added test case bugs/modalg_5/bug24060
Modified shape's extension in test cases bugs/moddata_3/bug23943_3 bug23943_4
Modified test cases in group de according to new reference data in issue 24035
2013-07-12 12:42:42 +04:00
vro
9733d9b31b 0024062: A mistake in Geom_OffsetCurve.cdl about direction of offset
A misprint in document is corrected.
2013-07-12 12:41:15 +04:00
jgv
f7e3c52fcc 0024032: An exception raised during projection of the curve on the surface
Added test case bugs/moddata_3/bug24032
2013-07-12 12:39:06 +04:00
omy
302f96fb0d 0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
Fix first subset of warnings (about 100)
- while(1) and similar constructs replaced by for(;;)
- some uninitialized variables corrected
Got rid of Warning C4189: local variable is initialised but not referenced
Corrected mistakes after getting rid of C4189 compiler warning
Corrected some mistakes that led to compiling errors
Fixed test case because of improvement message - removed unnecessary TODO.
Small fix: tabs have been replaced with whitespaces.
Added TODO for Windows platform
removed last TODO
Corrected mistakes, returned some #ifdef DEB code, fixed test case .
Restoring a few places which have been modified too much
Small grammar fix
Deleted unnecessary puts in bugs/end
2013-07-12 12:37:38 +04:00
ibs
a8195d65ba 0024048: "Basic Runtime Checks" option of VS projects should be equal to "RTC1"
tolreached initialized (src\ChFi3d\ChFi3d_Builder_6.cxx);
LocalTransition initialized in deb case (src\HatchGen\HatchGen_Hatcher.gxx);
vprev initialized (src\Blend\Blend_Walking_3.gxx);
uprev initialized (src\BRepBlend\BRepBlend_SurfRstLineBuilder.cxx);
lxp initialized (src\Interface\Interface_FloatWriter.cxx)
pBuff initialized (src\OSD\OSD_Process.cxx)
aPrefix initialized (src\RWStepBasic\RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx)
ier initialized AdvApp2Var/AdvApp2Var_ApproxF2var.cxx
FacRevolInfini initialized BRepFeat_MakePrism.cxx
default action of "switch" returned
nombre mas of chars was expanded to 1024 (had been 20). this expansion helps avoiding the error of conversion a float number to mas of chars: the size of mas is enough for converting float number now.
Changed status (todo ?) of tests: de step_5 A6 B3, de iges_3 A9
2013-07-12 12:29:30 +04:00
Roman Lygin
96a85238fb 0024043: Performance improvements: Modeling Algorithms
Performance improvements: Modeling Algorithms (added Shape Healing)
Added TODO to unstable test cases
2013-07-12 12:27:30 +04:00
omy
64531d9c98 0023042: Potential mistakes in (s)printf usage
Use PRIuPTR macros for Standard_Size values in printf.
Use STL streams instead of printf when reasonable.
2013-07-12 12:25:44 +04:00
jgv
bda8360543 0023625: New functionality building reflect lines on a shape
Adding test case for this fix; Small corrections
2013-07-12 12:24:21 +04:00
emv
97acf541ac 0023782: Intersection algorithm produces wrong section curves for the attached faces
The fix is to keep the correlation between numbers of segments in U and V parametric directions (nbu and nbv).
When minimal of these numbers (f.e. nbu) is set to default minimal value (10), other (nbv) is set to Min(30, nbv*(default/nbu)). 30 is used to avoid too small segments.
Added test case bugs/modalg_5/bug23782
2013-07-12 12:23:01 +04:00
emv
c1fe53c64e 0024029: Add a flag to bopcheck command to provide possibility to disable Face/Face intersection
Added new parameter to bopcheck command that defines which interferences to check:
bopcheck shape [level of check: 0 - 5]
Examples:
1. bopcheck shape 1
    #The level of check is set to V/E, i.e. intersections #E/E, V/F, E/F, F/F will not be checked.
2. bopcheck shape 4
    #The level of check is set to E/F, i.e. intersection F/F is disabled.
3. bopcheck shape 5
    #All intersections will be checked. It is the same as bopcheck shape.
Added test case bugs/modalg_5/bug24029
2013-07-12 12:21:38 +04:00
Roman Lygin
388fc344c9 0024007: [Regression] Sporadic crashes when working with XDE documents 2013-07-04 14:33:30 +04:00
Roman Lygin
1145e2bc72 0024042: Performance improvements: Foundation Classes
Removed code under former __OPTIM_ARRAY macro
2013-07-04 14:31:57 +04:00
Pawel
4bee43a928 0024019: Voxel_FastConverter: filling problem
Added a new method filling the inner part of a shape with voxels. The advantages of using this method are:
- processing vertical faces
- correct processing of 'concave' shapes
Added QA command OCC24019 for issue 24019 and test case bugs/vis/bug24019
2013-07-04 14:29:08 +04:00
emv
9c9a29ea5c 0024053: Section between plane and sphere is not correct
Small correction in splitting into intervals.
Adding test case for this fix
2013-07-04 14:26:05 +04:00
emv
093bfc493b 0024033: All the orientation as a result of BRepAlgoAPI_Common is set to INTERNAL
Dimension of the shapes is used in the condition of choosing the shape to take parts of it in the common.
Adding test case for this fix
2013-07-04 14:23:22 +04:00
emv
b20eeb13fe 0024037: Wrong result done by General Fuse algorithm
Do not calculate the angle between same edges in WireSplitter algorithm and set it to 2*PI.
Adding test cases for this fix
Correction of test case
2013-07-04 14:21:44 +04:00
emv
e656bcbe59 0024040: The result of CUT operation is not correct
Changed the way of getting point inside face for detecting same domain faces.
Adding test case for this fix
2013-07-04 14:19:17 +04:00
jgv
afed7fd721 0023994: GeomAPI_ExtremaCurveCurve class calculates wrong values
Adding test casefor this fix
2013-07-04 14:15:42 +04:00
Pawel
03679c4858 0024050: Voxel_FastConverter::Convert / ConvertUsingSAT - problems in multithreaded scenario
Computing triangle spans using integer numbers.
2013-07-04 14:12:49 +04:00
ika
404d419daa 0024035: Intersector is not symmetrical
asymmetrical check in  Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect was changed to symmetrical.
fix wrong calculation of approx parameter on curve for last polygon segment
Added test case bugs/modalg_5/bug24035
Modified TODO in "de" test cases because there are small differences with old behaviour
Modified test case heal/split_closed_faces/G5 because of corrections in intersector's behavior, which lead to changes in checkshape
2013-06-27 13:56:52 +04:00
nbv
9d109e39c2 0024028: It is impossible to create a face based on Geom_RectangularTrimmedSurface by standard methods
1. Trimmed Surfaces were replaced with bases for *.igs and *.stp file format.
BRepLib_MakeFace method sets the TRIMMED surface of Geom_RectangularTrimmedSurface in created face.

2. Adding test case for this fix
2013-06-27 10:10:16 +04:00
abv
166d6cd76a 0023957: Provide CMakeLists.txt file in root folder of OCCT
Added simple CMakeLists.txt file in the root folder, redirecting to adm/cmake
2013-06-26 11:56:39 +04:00
apn
3f4689a163 Adding test cases
for following issues:

0023823: The result of section operation contains redundant vertex
0023826: Boolean Common between two solids fails
0023884: Boolean Fuse between two faces fails
0023892: Missing intersection curve between two surfaces
0023976: Extremely high memory consumption on boolean operation on 64 bits
0023991: Missing section edge between two faces
0024003: Exception reaised during intersection between two faces
2013-06-20 17:03:56 +04:00
emv
5549deff05 0024025: The method Modified2() in BRepAlgoAPI_BooleanOperation should be removed.
Removed method BRepAlgoAPI_BooleanOperation::Modified2(const TopoDS_Shape& aS) as it is no longer relevant (in the previous version of BOP it had used History collector to find modified shapes, but there is no such collector in current version of BOP). The replacement for this method is BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_Shape& aS).
Small correction of test case
2013-06-20 15:48:11 +04:00
jgv
d42d186778 0023998: Bad result of intersection of two faces: curve has a loop
Add test case for this fix
2013-06-20 15:46:20 +04:00
mkv
c8c37c2879 0022834: Instable case testing 3d offset algorithm (problem with cone-like surfaces)
Small correction of test case
2013-06-20 15:43:42 +04:00
san
3f65725b8b 0024031: Depth buffer writes not enabled after rendering a transparent object
Depth buffer writes manipulation made independent from the reflection mode flags
to ensure correct depth buffer operation after rendering transparent object(s).
Coding style improved slightly by using more human-readable variable name for
the reflection mode.
2013-06-20 15:36:15 +04:00
aba
d7223c763e 0023959: Getting rid of generic classes in Visualization: generic classes were removed from Prs3d
Errors corrections; DsgPrs_DatumTool class was removed as unused
2013-06-20 15:28:40 +04:00
emv
8ba3c5e073 0024030: Undefined reference to `NCollection_IncAllocator::DefaultBlockSize'. 2013-06-18 15:45:55 +04:00
bugmaster
6e88a46c01 Renaming shape extension of test case 2013-06-14 15:05:17 +04:00
vro
8405834525 0023939: Incorrect circle parameter in IntAna
Adding testing case
2013-06-14 12:14:35 +04:00
vro
799e449136 0023889: Assignment of function parameter has no effect outside the function.
Voxel_ROctBoolDS::SetZeroSplitData() is modified to accept an address of a pointer to deleting data.
Removal of a compilation error on Linux.
Compile error on Linux platform was fixed
2013-06-13 15:38:17 +04:00
pdn
3f16d97046 0023939: Incorrect circle parameter in IntAna
Fix for circle circle intersection in case of one point touching
Test command added
2013-06-13 15:28:55 +04:00
Pawel
f03671a0c4 0023894: Voxel_BooleanOperation (Cut) gives incorrect results
Implemented a new method using separating axis theorem to compute triangle-box intersection. Based on the intersection result the decision whether to set the voxel is made.
Adjustment of lines (removal of extra-spaces).
Adding test cases for voxel testing
2013-06-13 15:19:29 +04:00
jgv
3830895866 0023995: GeomAPI_ExtremaCurveSurface : wrong result between a curve and a plane
Adding test case for this fix
2013-06-13 15:14:37 +04:00
nbv
32ca7a5106 0023706: Cannot project point on curve
1.   Approximation of derivative (by Taylor-series and by three points).
2.   Some methods (Degree(), GetType(), D0(), D3(), DN()) are added.
3.   Getting of subInterval's boundaries.
4.   Algorithm for checking if 1st derivative is equal to zero is amended.
5.   Cases are controlled when extrema or Project point do not exist.
6.   GetNormal() function for gp_Vec2d was added.
7.   Computing of Value, D0, D1, D2 and D3 for offset curves was changed.
8.   Limitation of tolerance for derivative computing was added.
9.   Methods for computing trihedron in singularity point are added.
10. Test tests/bugs/moddata_3/bug23706 is added.
11. Restriction on the LastParameter for visualization of 3-D curves. Calling PlotCurve(...) function for last interval.
12. LProp package is modified for tangent computing in singularity point (LProp_CLProps, LProp_SLProps).
13. Added test cases for issue.
Deleting bad test cases for this fix
2013-06-13 15:12:06 +04:00
emv
71797c62f1 0024016: Test case bugs moddata_2 bug324 works not correct after integration of the fix for the issue 0023985.
Do not perform the check for the height of the cylinder (see issue 0023985) for infinite cylinders.
2013-06-13 15:06:46 +04:00
aba
18d715bde0 0023670: Support for multiple 3D views: edited commands: vinit; added commands: vclose, vactivate, vviewlist
bugs/end script was edited to dump results from all opened views; duplicated vinit was deleted from bug625. QABugs::OCC280()
was edited to work with multiviews;ViewerInit() method was corrected. vviewlist command was modificated to output string.
Small corrections
Compile errors were corrected
2013-06-13 14:57:07 +04:00
Pawel
da8536ad43 0024018: Voxel_FastConverter::Convert - avoiding unnecessary iterations when using multiple threads
After processing 'end_thread_triangle' the method exits instead of just continuing the iteration.
Formatting adjusted.
2013-06-13 14:49:26 +04:00
Pawel
c5e9fb8bad 0024013: Voxel_FastConverter is able to use existing triangulation
Added the possibility to use existing triangulation within Voxel_FastConverter.
A grammar mistake is corrected.
2013-06-13 14:45:04 +04:00
apn
85c44a05a0 0023952: Improving thread-safety of intersections, approximations and other modeling algorithms
Modified QAcommands OCC23952sweep and OCC23952intersect to prevent exception in appropriate test cases
2013-06-06 11:06:26 +04:00
emv
fee4fa0f01 0024004: Initialization of arrays TPoints, TEdges, TTriangles of the class IntPolyh_MaillageAffinage by exact values
This commit implements two ideas for current version of OCCT:
1. Initialization of the arrays of the class IntPolyh_MaillageAffinage by exact values. The idea suggested by Roman Lygin (http://opencascade.blogspot.fr/2008/12/why-are-boolean-operations-so-sloooooow.html [^]);
2. Optimizing for loops. The idea has been taken from OCE (7b19650b29 [^]).
2013-06-06 10:31:03 +04:00
szv
bd0c22ce9f 0023988: Force use of reentrant mode
Reentrant mode switch is eliminated
2013-06-06 10:27:42 +04:00
Pawel
310659466b 0024010: Voxel_DS: getting the origin point of a voxel
A method obtaining the voxel origin added.
1. (xc, yc, zc) is renamed to (x0, y0, z0)
2. The method GetCenter() calls now the method GetOrigin() internally to reduce amount of code and increase readability.
2013-06-06 10:21:21 +04:00
Pawel
bbf847ad1b 0023501: Redundant triangulation cleaning/generation (1) in AIS_Shape.cxx
Cleaning triangulation only if the AIS_Shape has either (1) OwnDeviationAngle and
the values 'newangle' and 'prevangle' are different or (2) OwnDeviationCoefficient and the values 'newcoeff' and 'prevcoeff' are different
Found similar problems in further code portions and corrected them.
The same faulty condition found in XCAFPrs_AISObject.cxx
2013-06-06 10:13:30 +04:00
apn
c6df241cea Adjusting testing cases for current state of OCCT 2013-06-03 14:45:39 +04:00
bugmaster
a9926dd8dd Update source code 2013-05-31 20:04:11 +04:00
vro
f8fc2b2a2d 0023935: Compiler warnings on returning Handle from C functions in OCAF schemas
The warning 4190 is disabled because a C++ object calling from C section is manipulating only in C++ (outside of C section).
Second attempt to remove the warning: extern "C" is removed - everything works fine. But I tested it only on Windows.
Removed "Create##schema" method at all: without "extern "C"" it is useless. Checked that in OCCT and Samples this method is unused.

"new ##Schema" is used instead (like in StdDrivers.cxx, for an example). Also this approach is advised in Storage_Schema.cdl:
    	--   For example, if ShapeSchema is the class
    	-- inheriting from Storage_Schema and containing
    	-- the description of your application data schema,
    	-- you create a storage/retrieval algorithm as follows:
    	-- Handle(ShapeSchema) s = new
    	-- ShapeSchema;
2013-05-31 17:29:27 +04:00
emv
04cbc9d384 0023985: There is no section between attached faces.
Added new parameter for checking whether the plane and cylinder are parallel - the height of the cylinder.
This parameter is needed for the cases when angle between AXIS and plane's normal is very close to PI,
but the "height" is big enough that point, translated from intersection point between cylinder's axis and plane
on the "height" distance in the direction of cylinder's axis, does not belong to the plane.
Such plane and cylinder cannot be considered as parallel.
Add test case for this fix
2013-05-31 17:17:34 +04:00
ifv
470ebb43f2 0023945: GeomAdaptor_Surface fails to compute the first derivatives on the surface of the attached face
Add test case for this fix
Add new draw-command OCC23945 for testing this fix
Add new draw-command for testing tis fix
2013-05-31 17:13:38 +04:00
ifv
a0f8845f56 0023982: Wire explorer raises exception
Add test case for this fix
2013-05-31 17:10:17 +04:00
abv
80482e0178 0023970: Ignore dot-paths when searching for data files 2013-05-31 17:08:23 +04:00
Roman Lygin
1ef32e96ee 0023952: Improving thread-safety of intersections, approximations and other modeling algorithms
AdvApp2Var_SysBase::mcrgene_ size reduced from 1000 to 32 elements, and each element reworked into typed structure.
fixed IntAna_Curve.cxx to prevent access to #NAN# SigneSqrtDis
fixed alignment of doubles by 8 bytes, and minor corrections
Minor correction: static const N given more specific name (MAX_ALLOC_NB)
Added QAcommands OCC23952sweep and OCC23952intersect
Added test cases bugs/modalg_5/bug23952_1 bug23952_2
2013-05-31 17:04:58 +04:00
Roman Lygin
416d012709 0023944: Typo in ShapeCustom_RestrictionParameters leading to wrong approximation results
Add test case for this fix
2013-05-31 16:58:07 +04:00
Pawel
20b1ae2c3c 0023996: Width 50 given in format string (no. 2) is larger than destination buffer 'vale[50]'
Increased the size of the destination buffer to avoid possible overflow.
2013-05-31 16:54:49 +04:00
Pawel
034b4775dc 0023965: Making unnecessary copies of TopoDS_Face in Voxel_FastConverter when checking triangulation
Using reference of TopoDS_Face instead of a copy.
Checking if the obtained triangulation is not Null before continuing.
2013-05-31 16:52:31 +04:00
Pawel
eb57b012e8 0023966: Voxel_FastConverter performs unnecessary triangulation.
Avoiding creating new triangulation in case a triangulation with a deflection value not greater than the one specified exists.
2013-05-31 16:50:36 +04:00
abv
8fd76287f8 0022831: Regression in boolean Cut - wrong result ( 6.5.2).
Adding testing case
2013-05-23 14:57:11 +04:00
abv
f404c5c215 0023946: Uninitialized variable aNewEdge3 used
Code for creation of extra edges in BRepMesh (special case) corrected
2013-05-23 14:55:05 +04:00
Roman Lygin
c15398ab70 239343: OCC fails to work with offset surfaces with singularities
Add test cases for this fix
2013-05-23 14:52:21 +04:00
vro
f7b4312f04 0023850: TDataStd_ByteArray is too slow on storage on disk
Optimization of a byte-array for XML persistence (binary persistence is ok).
A possible bug is corrected (size of an array is extended a little).
Same improvement for storage of a TDataStd_TreeNode.
Improvement of speed of storage of several Ocaf attributes in XML file format.
Also, format of storage of a double value is extended to keep 17 digits after a decimal point (it was used only 15 digits before).
Several draw-commands are added to manipulate the basic Ocaf attributes:
BooleanArray
BooleanList
IntegerList
RealList
A test-script for OCAF document successfully saved and opened from disk in XML file format.
+ 1 is added to keep '\0'
Removed several spaces in source files.
PLib_LocalArray is renamed to NCollection_LocalArray and became a template. It is used as a local array for Standard_Character in XML OCAF drivers, and as a local array of Standard_Real in PLib package.
Small correction of test case for this fix
2013-05-23 12:09:09 +04:00
omy
5a77460e4a 0023901: Memory leaks in tests.
1. Removed cyclic reference. Removed field myCommonBlock from BOPDS_PaveBlock;
2. Added data map myMapPBCB in BOPDS_DS. It contains pairs (PaveBlock, CommonBlock);
3. All methods about common block have been shifted from BOPDS_PaveBlock to BOPDS_DS;
4. Test case bugs moddata_2 pro19422_2 has been rewritten to build the correct result.
Test case corrected (TODO removed)
2013-05-23 12:02:14 +04:00
kgv
6a7d83c480 0023904: Multiple warning on Windows x86_64 target concerning WinAPI usage 2013-05-23 11:57:26 +04:00
emv
f14190252b 0023933: Self intersection reported after Fuse operation.
Additional check has been added in IntTools_BeanFaceIntersector::FastComputeExactIntersection() to prevent
creating an Edge/Face intersection for the case when edge lies on the surface of the face, but not on the face itself.
Adding test case for this fix
2013-05-23 11:55:08 +04:00
apn
8b7c9cb469 Adjusting testing cases for current state of OCCT 2013-05-17 12:29:32 +04:00
emv
d633fd7069 0023906: Performance of the projection algorithm in some cases became lower after integration of the fix for the bug 0022610.
New search algorithm Extrema_ExtAlgo_Tree used in projection algorithm in Boolean Operations.
Extrema is set to search only min distance.
Add test case for this fix
Draw command projponf has been modified to provide possibility to change the default parameters of Extrema_ExtPS algorithm:
projponf f pnt [extrema flag: -min/-max/-minmax] [extrema algo: -g(grad)/-t(tree)]
-min - Extrema_ExtFlag_MIN;
-max - Extrema_ExtFlag_MAX;
-minmax - Extrema_ExtFlag_MINMAX (default);
-g - Extrema_ExtAlgo_Grad (default);
-t - Extrema_ExtAlgo_Tree;
Examples:
projponf f pnt -min  - the parameters are Extrema_ExtFlag_MIN and Extrema_ExtAlgo_Grad;
projponf f pnt -t  - the parameters are Extrema_ExtFlag_MINMAX and Extrema_ExtAlgo_Tree;
projponf f pnt -min -t  - the parameters are Extrema_ExtFlag_MIN and Extrema_ExtAlgo_Tree;
2013-05-16 17:55:09 +04:00
pdn
db56cc2d24 0023949: OCC IncAllocator allocates second and further blocks with different size then first one
NCollection_IncAllocator tuned to allocate blocks of equal size to reduce fragmentation and increase chances for block reuse
2013-05-16 17:51:57 +04:00
ika
2a141d40f0 0023938: Crash at StepToTopoDS_TranslateEdgeLoop::Init() &StepToTopoDS_TranslateEdge::Init()
necessary checks were added
2013-05-16 17:49:29 +04:00
kgv
ac4aaa9821 0023960: Particular ViewerTest commands lack self-description 2013-05-16 17:46:50 +04:00
nbv
ab87e6fc2e 0023748: Bad monitoring of intermediate results in offset commands 2013-05-16 11:46:21 +04:00
abv
ac29d56ac7 0023953: Avoid unjustified use of $CASROOT and exporting to GIF in tests
Function locate_data_file is used instead of direct path in 3rdparty fonts tests
DE tests changed to produce PNG images
2013-05-16 11:40:49 +04:00
ifv
12f139fde8 0022766: Wrong results done by several algorithms for the case of intersection between a surface of revolution and a plane
Add test case for this fix
2013-05-16 11:38:13 +04:00
skv
cf3327f417 0023903: Invalid result of pipe operation on closed path
Add test case for this fix
2013-05-16 11:35:11 +04:00
bugmaster
244587f413 0023402: Issue in BRepAlgoAPI_Common - SOLID and FACE
Added test case bugs/modalg_5/bug23402

Rebased on current state of master
2013-05-16 11:31:43 +04:00
ika
1939140c23 0023771: Writing offset-based surfaces of revolution to IGES
Parameter to write offset curves like b-splines was added
Change function, which convert offset curves to b-splines
Added test command "test_offset"
Added test cases bugs/xde/bug23771_1 bug23771_2
2013-05-16 11:14:51 +04:00
kgv
2361d7e861 0023486: Remove obsolete image manipulation classes
Remove AlienImage package. Clean up Image package.
2013-05-16 11:09:31 +04:00
vro
bbd048069d 0023912: TDataStd_ExtStringArray::Value() returns a copy of TCollection_ExtendedString, but it might return a reference.
Since now TDataStd_ExtStringArray::Value() returns a constant reference to the string value.
Also, a draw-command GetExtStringArray is modified to manipulate with the string by a constant reference.
Added test case bugs/caf/bug23912
2013-05-16 11:07:43 +04:00
kgv
ee1e83b94b 0023917: Primitive Array with reserved but unused Edges array drawn corrupted from VBO 2013-05-16 11:04:05 +04:00
Roman Lygin
fa523cddc5 0023920: Change use of static variables in Message package to prevent data races in Shape Healing 2013-05-16 11:02:04 +04:00
bugmaster
d18bedc711 Update of testing cases for current state of OCCT 2013-04-29 16:13:25 +04:00
bugmaster
ed6a9c100b Changing OCC_VERSION_DEVELOPMENT to dev 2013-04-29 12:19:45 +04:00
Roman Lygin
ed6afcbdcf 0023919: Redefine operator* to Handle_Standard_{Transient|Persistent} subclasses 2013-04-26 15:35:39 +04:00
apn
5879dab46b 0023916: Test artifacts in current directory
Improvements to prevent producing artifacts (files) in current directory
Modified QA command OCC7141 to save file in specific location
2013-04-26 15:33:30 +04:00
dbv
b4def8937f 0023915: Redundant header inclusion
Removed redundant inclusion
2013-04-26 15:31:54 +04:00
omy
d0e4e57891 0023843: scanf without field width limits can crash with huge input data.
Corrected width specifiers and use of buffer arrays in *printf and *scanf functions.
Removed unreferenced variable warning.
Got rid of compiler warning (returning address of local variable or temporary).
2013-04-26 15:29:28 +04:00
git
3af9db62e0 Adjusting testing case for testing on Debian60 64bit 2013-04-23 13:54:52 +04:00
bugmaster
b9d558fc57 Update of License version. 2013-04-22 15:23:09 +04:00
abv
846858f0a0 Fixing path to xsd file in tests of _xml grids in xml group 2013-04-22 11:24:47 +04:00
bugmaster
3c7d96e646 Changing OCCT version from 6.6.0 beta to 6.6.0 2013-04-19 10:51:07 +04:00
abv
b432670a77 Avoid adding CASROOT to CSF_TestDataPath which leads to long time spent unnecessarily by locate_data_file 2013-04-19 10:51:04 +04:00
apn
dc5bdbfc0c Update of test cases that are crashed by cpulimit command 2013-04-19 10:51:01 +04:00
abv
9753e6deb9 0023905: Clean obsolete test commands
In parallel mode, limit number of jobs in the queue to avoid slowdown occurring with long queues
Obsolete DRAW tools removed
Improvement of processing of test log:
- log is collected as list and not as string for better performance
- short table of test cases (TOC) is added in HTML log
- algorithm to combine test cases in one row in HTML log is improved to avoid long lines (group bugs)
Parse rules corrected to ignore irrelevant debug messages, and to correctly report tests 3rdparty export as skipped or BAD when Gl2Ps is missing or is built in incompatible mode on windows
Tests corrected to pass in Debug mode on Windows
2013-04-19 10:50:58 +04:00
abv
174178b9fa 0023909: FPE in BSplSLib::RationalDerivative
Avoid use of array out of its bounds in BSplSLib::RationalDerivative().

In addition, Resource_Manager is fixed to allow saving with empty resource map (test bugs fclasses bug181_1).
2013-04-19 10:50:53 +04:00
apn
e87a5bc65e Correction bugs xde group 2013-04-19 10:50:50 +04:00
apn
d67042f867 Adjusting testing cases for current state of OCCT 2013-04-19 10:50:48 +04:00
aba
d27868141a Small correction 2013-04-17 18:49:56 +04:00
omy
323c04defa 0023901: Memory leaks in tests
Removed a field from BOPDS_PaveBlock that contained  the BOPDS_PaveBlock object itself.
Function RealPaveBlock() now returns a const handle, not a const reference to handle.
Removed const modifier because function now returns an object, not a reference to it.
2013-04-17 17:15:29 +04:00
kgv
ed97f43c0c 0022590: Migration to FreeImage - revision of Xw and WNT packages
Clean up Xw package from outdated and unused functionality
Adjusting test case for current state of master
2013-04-17 16:36:16 +04:00
abk
b659a6dc19 0023830: BRepExtrema_DistShapeShape does not find intersection of face with edge
Data member myIsDivergent was added to class math_FunctionSetRoot.
The member is initialized in method Perform start by Standard_False. The member is changed in the method to Standard_True if an approximation point is located outside of search set.

Method IsDivergent was added to class math_FunctionSetRoot.
The method returns value of myIsDivergent.

Parameter theStopOnDivergent with default value Standard_False was added to
a constructor and method Perform of class math_FunctionSetRoot.
The parameter shows whether return from method Perform if myIsDivergent
became Standard_True.

Class Extrema_GenExtCS was optimized for dynamic memory consumption:
the class surface values are not stored now.

Method Perform of class Extrema_GenExtCS was improved for local extreme
search in case of iteration algorithm divergence. Size of the algorithm
grid cell for initial approximation is reduced by 2 in the case. The count
of the reduces is limited.
Build fix in *.cdl.
Case of extrusion was carried out of the repeat loop.

Division method of the 3-dimensional grid (curve param, surface first
param, surface second param) by two was replaced by method of moving the
grid.

The moving method is about two times faster than division method.
Now grid moving method is depending on some average linear sizes of the curve and the surface.
In case (theStopOnDivergent && myIsDivergent) method math_FunctionSetRoot::Perform sets Done to Standard_False and discard it's last solution.
Test case for the bug fix.
Test case correction
Initial approximation was corrected for search of maximum in Extrema_GenExtCS::Perform.
Test case bugs moddata_3 bug23830 was formatted.
2013-04-17 15:33:27 +04:00
pkv
729d84d4f9 0023765: The result of section operation contains redundant vertex.
Adding test case for this fix
Modified test cases regarding to 23765
2013-04-17 15:29:29 +04:00
Roman Lygin
06be28a4f1 CR23683: Geom_BSplineSurface incorrectly determines continuity for periodic cases
Add a checking into files Geom_OffsetSurface.cxx, Geom_OffsetCurve.cxx, Geom2d_OffsetCurve.cxx , which try to make continuity of bspline surfaces and curves more than C0 to build offset.
Delete duplicate code and checkings
Prevent change of offset curve / surface when exception is raised due to attempt to set new C0 basis curve / surface
Added new QA command OCC23683. Added test case bugs/moddata_3/bug23683
2013-04-17 15:26:49 +04:00
pkv
973f1c39ac 0023891: Function fsameparameter throws an exception.
Added test cases bugs modalg_5/bug23891_1/bug23891_2/bug23891_3/bug23891_4
2013-04-15 18:22:32 +04:00
emv
7a9d451a98 0023881: BRepAlgoAPI_Section HasAncestorFaceOn1 returned False on the boundary(6.6.0 beta).
The methods HasAncestorFaceOn1() and HasAncestorFaceOn1() return true only in the case when their first argument is the new edge built from intersection curve and not an existing common edge.
PCurveOn1() and PCurveOn2() have been removed.
Methods PCurveOn1() and PCurveOn2() removed from BRepAlgo_Section class.
Added test case bugs/modalg_5/bug23881
2013-04-15 18:19:01 +04:00
dbv
275e812f4a 0023895: XCAF document does not store names for subfigures from IGES files
Fixed names for subfigures
Added test case bugs/xde/bug23895
2013-04-15 18:14:16 +04:00
dbv
bcfb87ebe4 0023879: Test cases update for Mac OS X platform 2013-04-15 18:08:25 +04:00
aba
0a768f5684 0023709: Redesign of hlrtest command: vhlr and vhlrtype commands were added; hlr type changing was added to AIS_Shape, AIS_Drawer and Prs3d_Drawer
QuickHLR and ExactHLR items removed from AIS_DisplayMode enumeration as unused.
Minor coding style and CDL documentation corrections applied.
Compiler error in AIS_Shape::SetTypeOfHLR() corrected
Corrections in HLR algorithm.
Compiler error in AIS_Shape::TypeOfHLR() corrected
Added test cases bugs vis bug23709_1/bug23709_2/bug23709_3/bug23709_4
2013-04-15 18:06:26 +04:00
dbv
d9e8bb0884 Updating test cases for 23828 issue to mark them as known on Mac OS X platform. 2013-04-15 13:57:08 +04:00
kgv
0c4ca3bd7b Adjusting testing case for current state of OCCT 2013-04-15 11:56:29 +04:00
kgv
7cc2d520c2 0023883: Bound color in the primitive array do not work when displayed using VBO
Added test case bugs vis bug23883
2013-04-12 16:36:20 +04:00
dbv
87225ffd03 0023885: Inclusion of X11 header should be protected with macro
X11 headers inclusions have been protected with macro
Remarks fix
2013-04-12 13:44:46 +04:00
emv
5d05cf31f0 0023882: Memory leak is reported on BOP in test bugs fclasses bug7287_5.
Test cases which check Boolean Operation algorithm on memory leaks have been rewritten to test the whole algorithm and not a part of it.
2013-04-12 13:37:16 +04:00
omy
df017cc9d3 0023853: BOP regression (2) - BRepAlgoAPI_Cut.
Modifications:
Changed the way of finding the angle between the faces.
New static functions:
GetFaceDir - builds direction for the face;
FindPointInFace - finds the point in the face in bi normal direction.

New square values have been set in the following test cases:
boolean bopcommon_complex J1
bugs modalg_2 bug202085_6
              bug202085_7
              bug202085_8
              bug202085_9
              bug202085_10.
"TODO" marks have been removed from these cases.
Added test cases bugs modalg_5 bug23853
2013-04-12 13:29:02 +04:00
omy
fe34304950 0023876: New Boolean Operation algorithm works incorrect with cylinder made by revolution and torus.
Added treatment for surfaces periodic in the V parametric direction.
Added test case bugs modalg_5/bug23876
2013-04-12 13:26:04 +04:00
oan
456b33ebf2 0023512: Incorrect triangulation on revolution shape
Added test cases bugs/modalg_5/bug23512_1 bug23512_2
Moved test cases for issue 23512 moved to folder bugs/mesh. Square checking is made in END file
2013-04-12 13:24:07 +04:00
omy
67a1064eb8 0023818: Extend OSD_MemInfo to report C heap statistics
A new counter MemHeapUsage was added to OSD_MemInfo class to examine program heap size
DRAW command meminfo got new option -h (--heap ) to use new counter data
The following testcases were changed to use new option -h of DRAW command meminfo
myCounters[MemHeapUsage] now will always be refilled every time the OSD_MemInfo::Update() function is called.
Fixed testcases to use meminfo -h instead of meminfo -w to detect memory leaks more properly.
2013-04-12 13:21:13 +04:00
abv
38da19bd28 Test parsing rules fixed to correctly report tests failed due to missing data file as SKIPPED, broken by integration of #23439 2013-04-08 10:44:10 +04:00
ika
c97067ad95 0023439: Integration of test grid "xigs" into the new testing system
Loop back tests for iges and step files with possibility of generation of reference data.
Clean up of test scripts (removal of obsolete code, adding comments, corrected formatting)
two fixes were done (same like bug 23722 and bug 23736)
Cancelling checking for number of warnings
rewrite some test scripts in cause of this and fix 23794
Tolerance checking was weakened.
Fix to check instability on Linux (bug 23822) was added.
TODO messages was added to tests which have different results on Windows and Mandriva2010
Ability to update this TODO in regeneration mode was added.
Add fix to bug 23852
Test groups were recomposed.
'dataexch' was renamed to 'de'.
CPU limit was decreased from 2000 sec. to 1500 sec.
2013-04-05 16:09:52 +04:00
aba
ebd1da3d10 0023877: Errors in MFC sample HLR 2013-04-05 15:41:43 +04:00
apn
ac4efa2212 0023875: Integration of grid "nam" into the new testing system
Added testgroup caf nam
2013-04-05 11:51:33 +04:00
kgv
27eed93740 0023872: Remove outdated classes OpenGl_Polygon and OpenGl_Polyline 2013-04-05 11:10:16 +04:00
jgv
471ce7366b 0023870: Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm.
Adding test cases for this fix
Test cases correction
Correction of instability.
2013-04-05 10:35:38 +04:00
mkv
0691a5bb8f 0023282: Wrong triangulation on cone
Adding test cases for this fix
2013-04-05 10:33:01 +04:00
szv
ad2a6c0662 0023867: Reading performance improvement
Small improvement in TCollection_AsciiString::Search.
2013-04-05 10:22:57 +04:00
ika
f2cc47113f Adjusting testing cases for current state of OCCT 2013-04-01 13:31:10 +04:00
ibs
aea58b16dd 0023861: Draw can not start if OCCT is installed in a path containing spaces 2013-04-01 12:53:52 +04:00
bugmaster
643cc6aae4 0023799: Crash on copying a label
A check on NULL is added to prevent the crash.
Adding test case for this fix
2013-04-01 11:48:54 +04:00
aba
973191093d 0023831: Ghosts appears in 2D viewer of HLR MFC sample
2d view updating was corrected. ISession2D_Shape drawing was corrected.
Style changes
2013-04-01 11:38:44 +04:00
omy
2c896b8f8a 0023375: (OCC 6.5.3 regression) BRepBuilderAPI_Sewing returns wrong result
Fixed selection of sewing pairs of edges.
Mistake fix
Adding test case for this fix
2013-04-01 11:38:43 +04:00
ika
802ea1e6fd 0023852: OSD_Path interprets unc paths incorrectly
checking for unc path on Windows was added
change deprecated macro WNT to _WIN32
Adding test case for this fix
2013-04-01 11:38:42 +04:00
apn
b92d758fec 0021707: Selection of Vertex returns Compound of vertexes
Added test case bugs/caf/bug21707
2013-04-01 11:38:40 +04:00
bugmaster
dd4edf9bc9 Update of OCCT version up to 6.6.0 beta 2013-03-25 18:56:57 +04:00
mkv
74f764ba61 Adjusting testing cases for current state of OCCT 2013-03-25 18:37:19 +04:00
emv
ce101cacbf 0023849: BOP regression (1) - BRepAlgoAPI_Common.
Fix for the bug.
Set the lower bound for the refined tolerance value in 2d classification algorithm.
2013-03-25 17:24:26 +04:00
szy
456b8422e1 0023819: Naming failures
Fixed regression with DummyVertex processing.
Correction test cases for CR23819
2013-03-25 17:21:31 +04:00
oan
b62b93ac30 0022818: Wrong triangulation of Revolution surface with slice angle <= 180 degree
Take face attributes into account to calculate 2d tolerance
Adding test cases for this fix
Correction according additional bug CR23832
2013-03-22 17:44:31 +04:00
oan
32d878f538 0023184: Bad face tessellation result
Consider BSplineKnots to achieve better tessellation result
Adding test cases for this fix
2013-03-22 17:34:37 +04:00
jgv
51a849d770 0023845: New auxiliary method concatenating a wire into an edge based on C0-continuous curve.
Fix of exception in old method (ConcatenateWire).
Adding test case for this fix
2013-03-22 17:31:43 +04:00
ika
903634d07d 0023832: sprops and triarea commands return incorrect value of a mass for shape of revolution
incorrect way of creation faces in test scripts has been fixed
2013-03-22 17:27:35 +04:00
jgv
a31abc03d7 0023824: Bad results of sweep operation when a path curve has unpredictable torsion along its way.
Adding test cases for this fix
2013-03-22 17:10:51 +04:00
pkv
26347898a8 0023785: Crash on make face from wire
Adding test case for this fix
2013-03-22 17:08:06 +04:00
kgv
de75ed09ad 0023791: Remove obsolete functionality - animation mode and degeneration presentation mode 2013-03-22 16:55:11 +04:00
Pawel
123e4db005 0023844: It's odd to compare a bool type value with a value of 0.
Comparing Standard_Real values instead of Standard_Real and Standard_Boolean
2013-03-22 16:51:39 +04:00
kgv
8b224a0992 0023842: Undefined behavior: Variable 'thePsFont' is used as parameter and destination in s[n]printf() 2013-03-22 16:48:34 +04:00
dbv
5c686fff42 0023841: Redundant assignment to itself.
Removed redundant assignment to itself in ViewerTest_ViewerCommands
2013-03-22 16:46:44 +04:00
epv
e2f0aca019 0022812: Bad performance meshing a face based on extrusion of huge b-spline curve 2013-03-20 12:42:58 +04:00
emv
a82b7ef700 0023809: New compiler warnings in new BOP, 64-bit VC++ 9.0.
Standard_Size have been replaced by Standard_Integer to avoid warnings.
2013-03-20 12:39:44 +04:00
san
1d8ec4db0a 0023821: Improve qmake project files for Qt samples
Scene dump image file extensions corrected.
2013-03-19 17:15:15 +04:00
mkv
1f16517f4e Adjusting testing case for current state of OCCT 2013-03-18 20:46:03 +04:00
san
752259d839 0023829: Remove Graphic3dDemo sample app as obsolete 2013-03-15 13:09:18 +04:00
omy
f4aad56f97 0023284: Using 'memcpy' on class that contains a virtual method
NCollection_BaseVector::MemBlock class was converted to POD structure
Added fix for compilation of multiple inherited classes on gcc/Linux
2013-03-15 13:04:26 +04:00
dbv
872f4e44da 0023769: Eliminate the dependence on X11 libs on Mac OS X
Removed ImageUtility package as it is no longer used.
Disabled Xw package building on Mac OS X when Cocoa used.
2013-03-15 13:01:15 +04:00
emv
8c720dc1fe 0023309: The 'then' statement is equivalent to the 'else' statement in TopOpeBRep_EdgesFiller.cxx.
Removed unnecessary else-if action.
2013-03-15 12:46:03 +04:00
jgv
bead40f28c 0023774: Incorrect conversion from gp_Trsf2d to gp_Trsf
Adding test command for this fix
Adding test case for this fix
2013-03-15 12:40:54 +04:00
apn
0dc98b5b0a 0021308: Problem of Interface_Tracefile. There are not messages.
Added test case for issue 21308
2013-03-15 12:32:46 +04:00
apn
972bd4bfeb 0022981: BRepOffsetAPI_ThruSections fails to build a surface from closed wires
Added test case for issue 22981.
2013-03-15 12:30:59 +04:00
apn
8c99d1caad 0023773: Can not read names in STEP file
Added test for issue 23773.
2013-03-15 12:27:55 +04:00
ika
6db6171400 0023822: SIGSEGV 'segmentation violation' during writing IGES
checking for infinity coordinates was added.
Adding test case for this fix
Shape name correction
2013-03-15 12:25:31 +04:00
apn
a1cd0db66f 0023366: Cut operation produces invalid shape
Added test case for issue 23366.
2013-03-15 12:22:43 +04:00
apn
1e6b194039 0022027: <bop> command between two faces raises exception
Added test case for issue 22027.
2013-03-15 12:20:25 +04:00
apn
3f92b61ae7 0023122: Operation "cut" crashes on attached shapes.
Added test case for issue 23122
2013-03-15 12:17:32 +04:00
aba
5c1f974e17 0023776: Redesign of MFC samples after V2d viewer removing 2013-03-14 17:49:18 +04:00
san
fad8962a72 0023821: Improve qmake project files for Qt samples
Project file extension corrected for VS 2010/2012 solutions
Sources and resource files from Common and Interface sub-foldrs added to qmake project files from their original location.
RES_DIR environment variable redirected to the binary directory, all resource files copied there to keep the source tree intact.
RES_DIR environment variable corrected under Linux/MacOS similalry to Windows.
Makefile generation corrected under MacOS:
- filenames used as the output for the extra compilers instead of the absolute paths.
- mkdir and cp command options corrected
2013-03-14 17:21:47 +04:00
bugmaster
b7ad3a6187 Adjusting testing cases for current state of OCCT 2013-03-11 17:27:45 +04:00
vsr
7fb60cfdbe 0023775: Compatibility with Tcl/Tk 8.6 2013-03-11 11:46:03 +04:00
abv
b2d3f23104 0023672: Eliminate obsolete functions in OSD_WNT_1.cxx
MsgBox() and several other obsolete Windows-specific functions eliminated in OSD_WNT*
2013-03-07 14:35:21 +04:00
pkv
8f9a9b9d10 0023777: 2D-Classifier algorithm produces wrong results for a point and face.
Adding test case for this fix
2013-03-07 14:25:51 +04:00
dbv
e187cc0ac0 Updating test for current state of OCCT 2013-03-07 14:23:33 +04:00
dbv
a6a9658686 0023209: Potentially unmatched XOpenDisplay() and XCloseDisplay() calls in some OCCT packages
Fixed display connection management in Draw_Window
2013-03-07 14:18:18 +04:00
emv
da21902312 0023648: Add tool for checking shapes on validity for boolean operations.
Modifications:
1. To provide the checking tool for single or couple of shapes in the
context of issue "0021762:Integration of new Boolean Operation Algorithm
into OCCT" has been implemented new class BRepAlgoAPI_Check.
This class provides possibility to check single shape or couple of shapes
on topological validity, small edges and self-interference. Also, the couple
of shapes can be checked on validity for boolean operation of given type.
2. According to the issue "0023613:Add diagnostic tool for BOP" by GKA
has been implemented new static public function BRepAlgoAPI::BoolDump().
This function is used for saving the initial shapes and the result shape of
boolean operation in case if the arguments or the result are not valid shapes
in terms of BRepAlgoAPI_Check.
2013-03-07 13:38:27 +04:00
pkv
a7dd5d0fbd 0023471: Intersection algorithm produces overlapping intersection curves
Test correction
2013-03-07 13:36:14 +04:00
abv
3b21f8ae43 0023803: Mess with snapshot images in the test case reports
Adding a caption (the file name) to each image included in the HTML test log
2013-03-07 13:33:57 +04:00
kgv
b1fa9f3841 0023792: 3D viewer window content is blended with Linux desktop
Eliminate tabulation symbols
Prefer 24-bit visual over 32-bit
2013-03-07 13:30:09 +04:00
ika
9b308cd3f6 0023794: Too small precision leads to instability
tol2 (10^-36) was changed to dPreci (10^-18)
test case was changed by adding TODO
2013-03-07 13:21:34 +04:00
dbv
6942f04af5 0023810: Cyclic dependency detected between the several OCCT units
Removed package Viewer. Methods and class filed from Viewer_View and Viewer_Viewer have been moved to V3d_View and V3d_Viewer
accordingly.
Removed Aspect_GraphicDriver.
V3d_View declaration fix
2013-03-06 13:17:05 +04:00
bugmaster
91c8d9f2e2 Removing java sample 2013-03-06 13:15:08 +04:00
mkv
65263f37db Adjusting testing cases for current state of OCCT 2013-03-04 17:29:20 +04:00
bugmaster
ca1372ec23 Update of OCCT version 2013-03-04 15:22:26 +04:00
apn
6fcb77aa3a Adjusting testing cases for current state of OCCT 2013-03-04 15:20:57 +04:00
szy
06da7b7e70 Adding new tests cases from chl grid 2013-03-01 14:32:42 +04:00
mkv
3113d5208c 0023788: OCCT tests don't catch Naming failures
Test corrections for catch Naming failure
2013-03-01 14:30:01 +04:00
ski
607a96d42a 0023619: Integration of test grid "xml" into the new testing system
Removing XML Validator
Improvements of begin and TODO's in testing cases
small correction in begin file to provide normal behavior of tests if Java is not installed
2013-03-01 14:27:39 +04:00
vsr
97c4a2fa37 0023789: Missing EOL in header files 2013-03-01 14:25:02 +04:00
abv
5d1833ef09 0023793: Tests failing when launched without data files
Call to locate_data_file moved from catch statement in test scripts to ensure that missing data file is correctly reported as SKIPPED status of the test.
TODO statements with single word 'Exception' made bit more specific ("**" added).
Test bugs/caf/buc60846 removed as it is aimed to test inexistent component (Sketcher).
TODO removed in test bugs/fclasses/bug22611 -- the missing command must be added or test removed.
Test bugs/step/bug133_4 removed as duplicate of bugs/step/bug133_2.
Command vinit added in test bugs/vis/bug23226 to ensure that viewer is properly initialized before command vvbo, and relevant TODO statements removed.
Redundant FAILED patterns removed in parse.rules in groups perf and v3d as they break appropriate handling of missing data files.
Added QA command OCC22611 to improve test case bugs/fclasses/bug22611.
Modified test case buc60898 (shape was renamed) and moved to folder moddata_3 to avoid checkshape in end file.
Test case vis/bug23226 was modified using function checkcolor.
2013-03-01 14:23:17 +04:00
omy
a9ae57b966 0023615: Wrong parameter value calculating in ShapeAnalysis_Curve
Now Extrema_LocateExtPC object is used instead of ShapeAnalysis_Curve::CurveNewton().
Removed CurveNewton() function.
Removed code protecting against null-length b-splines (should be obsolete now).
One TODO removed in test heal *advanced W6

Conflicts:

	tests/heal/data/advanced/W6
Fixed regressions:
did 011 A6 C9
xsat 101 G6
Small syntax fix.
2013-03-01 14:20:00 +04:00
emv
b6fba42fd9 0023796: Command "bhaspc" which was contained in BOPTest_LowCommands.cxx was removed.
Modifications:
BOPTest_LowCommands.cxx: the command bhaspc has been restored.
2013-03-01 14:16:45 +04:00
san
269294d62e 0023747: Enabling environment mapping breaks text rendering
vtextureenv command added to reproduce the bug
Two test cases using vtextureenv command added:
bug23747_1 - checks that environment mapping does not break text rendering
bug23747_2 - tests environment mapping in general
vtextureenv command improved:
- User-friendly option names supported instead of integer values
- Better input arguments check implemented
2013-03-01 14:14:34 +04:00
omy
5cbfdb412f 0023533: Unitialized variables used, IntTools_TopolTool.cxx
Also contains fixes for:

0023534: Unitialized variables used, ShapeAnalysis_TransferParameters.cxx
0023537: Uninitialized variable: MaxUserColor
0023538: Memory leak: cdata
0023557: V547 Expression 'as1.ToCString() != ""' is always true. To compare strings you should use strcmp() function. qabugs_3.cxx,
DRAW command for test bugs fclasses buc60724 corrected; test is OK now
2013-03-01 14:12:08 +04:00
abv
7f4c47564c 0023787: Eliminate trivial type conversion warnings in MSVC
Explicit type cast added in conversions from double to float in PrsMgr, Select3D, StdPrs, Visual3d, and Voxel.
Minor corrections in ShapeProcess and TCollection.
In Visual3d_ViewManager::ConvertCoord...(), output is initialized by zeros instead of RealLast() in case of failure.
In XmlMXCAFDoc, material density is correctly converted to string when writing to Xml.
2013-03-01 14:02:48 +04:00
abv
5788f5438f 0023694: The variable 'pBuff" is being used without being initialized
pBuff initialized by zero
2013-02-27 18:55:06 +04:00
bugmaster
aa2f78c2de Adjusting testing cases for current state of OCCT 2013-02-25 18:34:25 +04:00
emv
87f59163e1 Adjusting testing cases for current state of OCCT 2013-02-22 16:22:01 +04:00
emv
0ed6989cfa 0023783: New Boolean Operation algorithm produces incorrect result of SECTION operation for the attached shapes.
Fix for the bug.
Modifications:
BOPAlgo_BOP::BuildSection():
Building a result of the SECTION operation has been based on the Face/Face intersections.
It prevents the building the result of the SECTION operation between shapes without faces.
2013-02-22 16:11:03 +04:00
emv
7cfb39680f 0023778: New Boolean Operation algorithm does not work with same arguments.
Fix for the bug.
2013-02-22 16:08:55 +04:00
emv
c209782cf4 0023779: New Boolean Operation algorithm produces incorrect result of CUT operation with the attached shapes.
Fix for the bug.
Modifications:
BOPAlgo_Builder::FillSameDomainFaces():
Added treatment of the case when faces have shared bounds.
2013-02-22 16:05:28 +04:00
ski
7faaccfd34 Added testing cases from grid CHL
Removing test duplicate
2013-02-22 14:52:42 +04:00
kgv
2758330973 0023756: VBO rendering problem (1)
Fixed asymmetric VBO unbind call in OpenGl_Text::drawText().
2013-02-22 14:50:02 +04:00
kgv
6598416b22 0023727: Variable 'A' set but not used in Graphic3d_ArrayOfPrimitives::VertexColor 2013-02-22 14:46:04 +04:00
dbv
4709515e0f 0023735: Linkage error after patch 23663 on non-Windows platforms
Linkage error fix
Description fix
2013-02-22 14:22:35 +04:00
aba
446e9c14e5 0023721: Missing usage hints for vselmode command
vselmode help string was modified.
Changed error case message.
2013-02-22 14:16:58 +04:00
skv
6060dd1fed 0022610: The algorithm GeomAPI_ProjectPointOnSurf produces wrong results 2013-02-22 14:13:06 +04:00
kgv
723754e2a3 0023739: Execution of Draw Harness command "test" failed 2013-02-22 14:00:47 +04:00
omy
cf5195b88c 0022323: MakeThickSolid raises Construction exception on cylinder.
Removed BRepTest/BRepTest_ShellCommands.cxx from OCCT.
Added test case for bug 22323. It is placed in bugs/modalg.
2013-02-22 13:56:00 +04:00
dbv
dc3fe572ec 0023712: Remove dependency on Aspect_GraphicDevice from Aspect_Window 2013-02-18 16:40:54 +04:00
dbv
8db070a59d Correction of unstable testing cases 2013-02-16 13:55:09 +04:00
ski
ee535a6c7c 0023752: Integration of test grid "vpr" into the new testing system 2013-02-15 17:06:19 +04:00
nbv
fa6cd9152f 0023703: Projection algorithm produces incomplete 2D-Curve
Change compare algorithm.
Adding test case for this fix
2013-02-15 17:04:16 +04:00
ibs
a1bd71b4a8 0023761: Removing FTGL defines from OpenGl_CMPLRS.edl 2013-02-15 16:57:53 +04:00
skv
a20400b3a2 0023733: PCurve for edge on face creation failure
Adding test case for this fix
2013-02-15 16:55:25 +04:00
vro
16e65a0347 0023743: AIS_Triangulation crashes if Poly_Triangulation has no normals
A crash on absent normals is avoided.
AIS_Triangulation::Compute() is corrected so that it is much faster,
Adding test case for this fix
2013-02-15 16:52:07 +04:00
emv
5f05c0a3d8 0023749: Tests cases boolean bsection M9 N4 work incorrect with new Boolean Operation Algorithm.
Fix for the cases.
Small correction test cases
2013-02-15 16:49:54 +04:00
emv
3389667b4c 0023751: Test case bugs modalg bug6334 does not work with new Boolean Operation Algorithm.
Fix for the bug.
Added simple condition:
If the map myShapes (map of the parts of the tool that should be in result shape) is not filled then boolean operation of the given type will be performed.
Modified test case bugs/modalg_4/bug6334.
Small correction test cases
2013-02-15 16:48:17 +04:00
ski
b7a3c4704b Adjusting testing cases for current state of OCCT 2013-02-11 17:27:02 +04:00
skv
1c88cbaf14 0023705: Isoline in the AIS viewer is not trimmed 2013-02-08 17:53:02 +04:00
emv
4e57c75ee1 0021762: Integration of new Boolean Operation algorithm to OCCT.
Modifications:
- BRepOffset/BRepOffset_Tool.cxx, Features and Fillets algorithms have been ported on new BO algorithm.
- Old BO algorithm, that was implemented in BOP, BooleanOperations and BOPTools packages, has - been deleted.
- Porting SALOME algorithms to new BOP algorithm.
- Fixing regressions. Rebased on current master.
- Corrections in post treatment of section edges;
- Corrections in the accordance with the bug 0023293;
- Small corrections in the bopcheck and bopargcheck commands.
- NCollection maps have been replaced by NCollection indexed maps to guarantee the constant order of sub-shapes in the result of boolean operation.
- Test case feat featprism M9 has been fixed.
- Test cases chl 902 E3 H3 have been fixed (corrections in the treatment of section edges).
- Test cases caf driver B6 B7, caf named_shape F6 F7 have been modified according to the new order of sub-shapes in the result of boolean operation.
- Test cases blend buildevol G1, blend simple K4, bcommon_complex C7, feat featprism L6 have been modified as they are improvements.
- Test case boolean bsection A3 has been modified according to the new syntax of the bsection command.
- Test cases boolean bfuse_complex J1 P9 have been fixed (the function IsInternalFace has been modified to use the function GetFaceOff);
- Test case chl 902 H3 has been fixed (changes in the treatment of section edges);
- Test case boolean bsection D8 has been modified (removed TODO statement);
- Test case boolean bsection A3 has been modified (as the shapes have been changed).
- Added correction of the tolerance values of the shapes according to the bug 0023610.
- test cases:
    boolean bcommon_complex C3,
    boolean bcut_complex F2 O7,
    boolean bfuse_complex C4 C5 E4,
    boolean bsection B6 M8 M9 N4 N5 N7,
    boolean bfuse_simple ZP6,
    draft angle G8,
    feat featprism S2
have been marked as invalid according to the bug 0022033;
- New value of result has been set in the test cases :
    boolean bopsection D4
    boolean bsection R8
as it is correct.
- test case bugs modalg bug23472 has been rewritten according to the new format of bsection command.
- The classes IntTools_Context and IntTools_ShrunkRange have been replaced by BOPInt_Context and BOPInt_ShrunkRange accordingly.
- The new class BRepAlgoAPI_Check has been added according to the bug 0023648.
- Some regressions have been fixed.
- The following test cases have been marked as invalid or rewritten
    bugs modalg buc60462_2, 60531_2, 60776_1, bug472_1, bug472_2, bug472_3, bug497_3, bug62
    bugs moddata bug26_1, bug26_2,
- The test case bugs modalg buc60533 has been rewritten to use the general fuse algorithm for building the result.
- The new value of the result has been set in the test case bugs modalg 60776_2.
- The following test cases have been rewritten according to the new format of the bsection command
    bugs modlag fra62369, pro18892
    bugs moddata bug75_1, bug75_2
- Corrected BRepAlgoAPI_Check.
- Removed package BOPTColStd.
- Rewritten test cases caf named_shape F8 F9.
- Removed unnecessary comments.
- Corrected the following test scripts :
    boolean bcut_complex(012) O3 O4 O5 O6 O8
    boolean bfuse_complex(013) O5 O6 P8
    boolean bopcommon_complex(021) D8 D9
    boolean bopfuse_complex(022) H1 J6
    boolean boptuc_complex(024) D5
    bugs modalg(006) bug399 bug497_1
    feat featprism(003) C4
- Corrections in the treatment of section edges (putting paves on the curves);
- Corrections in BRepOffset_Tool;
- The following test cases have been rewritten according to the new format of the bsection command
   bugs modalg bug6502, bug6554, bug6766_1, bug6766_3
- The new value of the result has been set in the following test cases
   bugs modalg bug1255, bug1255_1
- The following test cases have been marked as invalid or rewritten
   bugs modalg bug472_2, bug472_3, bug825_2
   bugs moddata bug10603, bug152_1, bug152_2, bug3721_1, bug3721_2, bug3721_3
- The following test cases have been rewritten as improvements
   bugs modalg bug693, bug693_1, bug817_1
   bugs moddata bug3721_5, bug3721_6, bug6862_3, bug6862_4, bug6862_6
- Test cases bugs modlag buc60787_1, buc60787_2, buc60788_2, buc60788_3 have been corrected.
- Fixed some SALOME regressions (modifications in the treatment of the section edges);
- Fixed test case bugs modalg bug23100;
- Test cases bugs modalg bug21754, bug22990 have been corrected according to the new format of the bsection command.
- Test cases bugs modalg bug13116_*, bug23711 have been fixed;
- Test cases bugs modalg bug697_2, bug697_4, bug697_7, bug697_8 have been marked as invalid according to the issue 0022033;
- Test cases bugs modalg bug22109_2, bug22109_3 have been corrected;
- Test case bugs modalg bug18186 has been corrected as it is improvement;
- Test case bugs modalg bug22802 has been deleted as there is no package BOPTColStd.
2013-02-08 17:42:05 +04:00
ski
a8676008f7 Adding of testing cases from subgroups 937 940 and 941 of CHL group
Splitting of subgroups bugs/modalg and bugs/moddata to optimise time of testing
Correction of end file in group v3d
Small correction of test case
2013-02-08 15:16:15 +04:00
kgv
a174a3c54f 0023457: Slow text rendering
Added class Font_FTFont wrapper over FreeType face

Unify collections methods NCollection_Array1, NCollection_Sequence, NCollection_Vector:
declare Upper, Lower, First, Last, ChangeFirst, ChangeLast methods for all these collections.

Added method NCollection_DataMap::Find() with check key is bound + retrieve value within single call interface.

OpenGl_Context::ReleaseResource() method now supports lazy release of shared resources.

Added class OpenGl_Font which implements textured fonts support.
Added class OpenGl_TextFormatter for text formatting using OpenGl_Font.

OpenGl_Text was redesigned to use OpenGl_FontFormatter.

OpenGl_FontMgr class was removed.
All methods related to text rendered removed from OpenGl_Display class.

OpenGl_Trihedron and OpenGl_GraduatedTrihedron classes were redesigned
to use OpenGl_Text.

OpenGl_PrinterContext instance was moved to OpenGl_GraphicDriver fields
(eliminated usage of global instance).

Added test cases into 3rdparty/fonts grid to check different font styles
and perform FPS tests (no automated results - requires manual analysis
or snapshots comparisons).

Removed unused CSF_FTGL dependency.
OpenGl_Text::setupMatrix - do not apply floor for myWinZ
2013-02-08 15:05:16 +04:00
ika
163ef25006 0023722: stack overflow during reading IGES in Test Harness
Add creation a new vertex before replace.
Adding of test cases for CR23722
2013-02-08 14:56:38 +04:00
pkv
77088633a2 0023738: Boolean Fuse between two faces fails 2013-02-08 14:53:51 +04:00
ika
ab4a555430 0023736: Exeption during reading STEP file in Test Harness
Add checking for null name and null id
Adding of test cases for CR23736
2013-02-08 14:50:50 +04:00
ski
92f122144f Adjusting test cases for current state of OCCT 2013-02-04 14:37:06 +04:00
abv
91322f44fd 0022898: IGES import fails in german environment
Added DRAW command dlocale to set and query current locale of the C subsystem
Equivalents of C functions working with conversions of strings to/from reals added in Standard_CString, providing locale-independent behavior (using always "C" locale)
In DRAW packages, calls to atof() and atoi() are replaced by direct calls to Draw::Atof() and Draw::Atoi(), respectively, instead of substituting by #define
Use of atof(), strtod(), and *scanf() involving floating point conversions in OCCT code replaced by locale-independent Atof() and Strtod()
Calls to sprintf() involving floating point in OCCT code are replaced by call to locale-independent Sprintf(), except a few places where converted strings are used immediately for display in the 3d viewer
Changes of global locale are eliminated throughout OCCT code
Proposed correction for GNU libC where v*printf_l functions are absent
Added test case (bugs xde bug22898) for data exchange operations with non-standard locale
Use xlocale on Mac OS X and within glibc
Corrected strtod_l wrapper
Generate error rather than warning
Introduce Standard_CLocaleSentry replacement for removed OSD_Localizer
Standard_CLocaleSentry - copy locale string
Standard_CLocaleSentry - use _configthreadlocale on Windows
Standard_CLocaleSentry::GetCLocale() - return locale_t rather than void*
Corrected misprint in ~Standard_CLocaleSentry()
Use French locale in bug22898 test case
Mark test case as skipped if locale is unavailable on tested system.
Use fr_FR locale for tests on Mac OS X
2013-02-01 18:41:16 +04:00
apn
3bea4c165c Adding test cases from chl grid 2013-02-01 17:32:08 +04:00
jgv
aadab519fd 0023436: BRepOffsetAPI_ThruSections crashes when lofting through identical profiles
Adding of test case
2013-02-01 17:22:26 +04:00
pkv
19d6e40d3f 0023711: Incorrect result done by fuse operation
Correction of misprint
Adding of test case
2013-02-01 17:19:18 +04:00
pkv
2426168486 0023732: Exception raised during intersection between two surfaces
Adding of test case
2013-02-01 17:06:03 +04:00
omy
024855ee13 0023310: No IsEqual function for Handles
IsEqual function for Handle(Standard_Transient) was added to global scope.
Getting rid of compilation errors (removed additional IsEqual functions)
2013-02-01 16:47:50 +04:00
kgv
9e3758ca29 0023730: Statement has no effect in DNaming_RevolutionDriver.cxx 2013-02-01 16:41:42 +04:00
kgv
9786a9af2b 0023725: C++11 compatibility issues in Image_Color.hxx
Fixed warning emited by g++ 4.7.2
2013-02-01 16:30:36 +04:00
kgv
aec37c1569 0023728: Unused variables "Tolu" and "Tolv" in Select3D 2013-02-01 16:27:48 +04:00
kgv
3616fc066e 0023729: Statement has no effect in BinMDataStd_NamedDataDriver::Paste() 2013-02-01 15:44:28 +04:00
abv
1d0a9d4d46 0023664: Eliminate linker warnings on import of local symbol
Standard_IMPORT removed or replaced by 'export' where it applies to a symbol defined in the same toolkit
2013-02-01 15:42:05 +04:00
omy
9254e07c59 0023267: cppcheck warning: Using 'memcpy' on class that contains a virtual method
Removed class _BaseElement, thus _Element's functions are not virtual now.
Removed redundant Msg() function from _Element class.
2013-02-01 15:39:38 +04:00
kgv
16347bb877 0023726: Wrong usage of NCollection_StdAllocator<void> in QANColStdAllocator2
Fixed compilation error within g++ 4.7.2
2013-02-01 15:26:36 +04:00
omy
22f47da6ef Update of testing cases 2013-01-28 17:02:50 +04:00
omy
094942236a Adjusting testing cases for current state of OCCT 2013-01-28 14:00:50 +04:00
pkv
b989480555 0023716: Boolean Fuse between two faces fails 2013-01-28 11:51:58 +04:00
pkv
d9bea41f2f 0023699: Exception reaised during intersection between two surfaces 2013-01-28 11:42:33 +04:00
pkv
b3fb2d64c7 0023704: The program hang-up during intersection of two edges. 2013-01-28 11:35:52 +04:00
pkv
4bd102b84c 0023644: Intersection between coaxial cones produces exception
Small correction: one more tolerance variable has been added.
Test case for this fix
Small correction of test case
2013-01-28 11:33:22 +04:00
nbv
3f257c62d2 0023530: Error in Draw command "checkshape": invalid face is not recognized
Add function for determinate closure in 2D and 3D
Change ChoixUV(...) function
Small correction of test case
2013-01-28 11:30:17 +04:00
aba
128cc8df34 0023663: Removing 2D viewer library
Deleted TKV2d toolkit and CGM, MFT,FontMFT, PlotMgt, PS packages. Deleted 2d test cases.
Deleted WNT_WDriver and Xw_Driver, edited Aspect_Driver.
Deleted trailing spaces, removed WNT_FontMapEntry, WNT_FontTable, WNT_HFontTable
Deleting tests for 2D viewer
2013-01-25 18:11:16 +04:00
ski
474be6cde1 0023510: Integration of test grid "vis" into the new testing system 2013-01-25 16:26:18 +04:00
apn
809eca9db6 Added test cases to folders /bugs/modalg and /bugs/moddata from chl grid.
Modified TODO in some offset cases.
Deleted the same test cases bug697_* in /bugs/modalg
Deleted test cases which is based on v2d commands
Added test cases to folder bugs
2013-01-25 16:22:41 +04:00
omy
6c3e4c2965 0023483: Use appropriate type for handling integer time
Introduced new cdl-friendly Standard_Time alias to time_t type.
2013-01-25 16:04:00 +04:00
bugmaster
5edb1ac35b 0023720: Call of malloc.h include absence in Image_PixMap.cxx 2013-01-25 15:29:19 +04:00
kgv
cfd5fa01e8 0023715: Generated cmake files should link against Cocoa on Mac OS X
Replace inclusion of GL/glu.h header with OpenGl_GlCore11.hxx wrapper
GL/glu.h doesn't exists on Mac OS X without XQuartz 3rd-party library
2013-01-25 15:27:12 +04:00
kgv
dac04bfa38 0023668: OCCT automated testing: Using Mesa3d for 3D visualization on virtual Windows machines
Added advanced Draw Harness environment variable CSF_UserDllPath
to prepend DLL search path for system libraries like "opengl32.dll".

Added new Draw Harness command vglinfo to print OpenGL self info.
2013-01-25 15:07:11 +04:00
kgv
1981cb228a 0023525: Disappearing of highlight in screenshot
OpenGl immediate mode - get rid from GL display lists

Visual3d_TransientManager, Graphic3d_GraphicDriver:
removed outdated unused methods to draw primitives in immediate mode.
New Draw Harness command to swith rendering mode in immediate mode.

When set to false scene will be always redrawn in back buffer.
V3d_View::ToPixMap - temporarily switch immediate mode to draw into back buffer

Make happy immediate mode dump on OpenGL without FBO (like ms software implementation).
OpenGl_Workspace::RedrawImmediatMode - invalidate back buffer when immediate mode drawn into it
Added more detailed description for Graphic3d_GraphicDriver::SetImmediateModeDrawToFront method

Adding of test case
2013-01-25 14:52:59 +04:00
ika
f34eec8f91 0023062: Incorrect display of edge in draw axo viewer
Update first and last parameters of intervals, because they should be at same period like other values.
2013-01-25 14:49:08 +04:00
dbv
5f9575b332 0023701: Add Cocoa support to Qt samples
Adapted Qt samples for using Cocoa on Mac OS X
2013-01-25 14:41:33 +04:00
apn
6aac585ac8 Adjusting testing cases for current state of OCCT 2013-01-21 18:27:00 +04:00
apn
228148b373 Added subgroup Specific in group Pipe (chl 930-932). Small correction in boolean/bopfuse_simple/ZP6 2013-01-18 15:09:00 +04:00
dbv
67d97f0eec 0023682: Implement Draw_Window with Cocoa framework
Implemented most Draw_Window functions with Cocoa. Still should be implemented: drawing rectangle when zooming, window screenshot function in QAxwd
Added workaround for drawing rectangle when zooming
Added small fixes
2013-01-18 15:04:50 +04:00
ysn
94a57f1fb2 0023607: Spelling corrections in OCCT tests 2013-01-18 14:28:47 +04:00
aba
4754e16481 0023539: QASelect and QAShiftSelect commands
Replaced QAMoveTo, QASelect and QAShiftSelect draw commands with vmoveto and vselect
Moved vselect and vmoveto draw commands to ViewerTest_ViewerCommands.cxx
Replaced  QAMoveTo and QASelect in test cases. Corrected returned error case result in vselect and vmoveto.
Added commands in ViewerTest_ViewerCommands from QADraw. Edited tests.
QACommands in tests were replaced with ViewerTest commands.
QAxwd command was removed from QADraw. Edited command wzoom and commands from ViewerTest.
Help for ViewerTest commands was edited
Small corrections. Added test cases for polygonal selection.
Small correction of test cases
2013-01-18 14:22:14 +04:00
Roman Lygin
5ae15e0ef7 CR23684: TCollection_HExtendedString::String() returns a copy instead of const reference
Update TCollection_HExtendedString::String() implementation as well
2013-01-18 13:50:27 +04:00
Roman Lygin
d97f89db4f 0023690: Miscellaneous minor enhancements in OCAF/XDE 2013-01-18 13:47:00 +04:00
jgv
ea9632bc14 0023651: Exception on fillet construction between NURBS and surface of revolution
Adding test cases for this fix
2013-01-18 13:42:52 +04:00
pkv
cfb6776ec0 0023552: Projection algorithm produces wrong results with default tolerance value.
Add TKShHealing to TKFillet/EXTERNLIB
Adding test case
2013-01-18 13:39:21 +04:00
kgv
b8ddfc2f5d 0023634: Eliminate Polyline and Polygon usage in drawers
Polylines and polygons removed, now everything is based on PrimitiveArrays.
Added use of Graphic3d_ArrayOfSegments, some additional clean up in Graphic3d_Group.
Dead code elimination in AIS and V3d
Corrected compilation errors
Fixed grid presentation
Adding test case correction
2013-01-18 13:36:18 +04:00
abv
44cf55e600 Test for 0022778: Bug in BRepMesh
Test case bugs mesh bug22778 added.
Test case bugs mesh bug23473 moved to systematic grid (mesh standard* X5)
2013-01-18 12:30:29 +04:00
abv
7566ccf330 0023678: Compiler warning in BRepFill_Pipe::ShareFaces() 2013-01-18 12:16:43 +04:00
san
a940de4195 0023673: Static method Image_PixMap::SizePixelBytes is not exported
Static method Standard_Size SizePixelBytes (const Image_PixMap::ImgFormat thePixelFormat)
exported under Windows to prevent link error in the user code.
2013-01-18 12:14:13 +04:00
pkv
ddd95bbf9a 0023676: Intersection between edge and a face produces extra vertex 2013-01-18 12:10:48 +04:00
Pawel
e1db25a9f0 0023687: Two opposite conditions. The second condition is always false in ifselect_shareout.cxx
Deleted if-condition that was always false.
2013-01-18 12:03:56 +04:00
Pawel
f8814ccf52 0023686: The call to 'Precision::Angular()' is pointless in the Release build
Calling 'Precision::Angular()' inky if 'DEB' is defined.
2013-01-18 11:58:24 +04:00
apn
746bb46a41 Adjusting testing cases 2013-01-14 16:38:44 +04:00
apn
61c421bffa Adjusting bugs group for current state of OCCT 2013-01-11 15:30:11 +04:00
apl
b4c5c58ed4 0023652: Non zoomable text with alignment slides away when zooming view
Alignment is applied after zoom persistence scaling
2013-01-09 13:25:32 +04:00
apn
08c28f5b83 Adjusting testing cases 2013-01-04 11:41:58 +04:00
apn
355c155147 Adding testing cases from chl group
Modified END file of all group bugs. Command nbshape moved to END file. Add begin with variable subgroup
Small correction in END file
Replaced test case bug726_3 from moddata to modalg
2012-12-28 18:50:48 +04:00
dbv
a6cfe9b29c 0023657: Fails compilation with WOK after patch 22980
Key -I added to CSF_TCL_INCLUDE variable
2012-12-28 18:46:36 +04:00
apl
6c8856a08f 0023652: Non zoomable text with alignment slides away when zooming view
alignment is applied after zoom persistence scaling
Adding test case for this fix
2012-12-28 18:38:00 +04:00
abv
d9b81fa5f5 0023636: Problems initialising errorStream
OSD_Error.cxx is protected for the case if errorStream is NULL
2012-12-28 18:34:17 +04:00
ika
a8fcd8d07e 0022820: OCCT IGES writer loses plane information
added writing planes in Type 108 not like BSplines
pcurves for planes not writing
add parameter for choice between writing planes in BSplines and Planes
0022820: OCCT IGES writer loses plane information

pcurves were prohibited also for BRep mode
Adding test case for this fix
2012-12-28 18:30:58 +04:00
kgv
1a7dfdb719 0023632: Add support for NPOT mipmap textures in TKOpenGl
Use glGenerateMipmap instead of gluBuild2DMipmaps when available.
2012-12-28 18:24:40 +04:00
kgv
c34dba32d4 0021357: Transform persistence bug
Resurrection of lost patch
scale depth size in zoom persistent mode to avoid z-fighting conflicts
2012-12-28 18:20:27 +04:00
abv
53e7fedeb2 0023627: Standard_OutOfRange in TopOpeBRep_FacesIntersector
Number of iterations corrected in static function GetArc()
2012-12-28 18:15:03 +04:00
Roman Lygin
c888decadb 0023622: IGES import produces invalid shape with parameter read.iges.bspline.continuity=0
Adding test cases for this fix
2012-12-28 18:11:58 +04:00
kgv
7fe83417f1 0023628: Snapshots have wrong dimension when OCCT is built by VC++ 11
Use AdjustWindowRect() function to adjust window rectangle instead of
manual GetSystemMetrics().
2012-12-28 18:05:45 +04:00
Roman Lygin
e6aad0ee24 0023595: XCAFDoc_ShapeTool extended with two methods - SetAutoNaming() and AutoNaming()
Adding new draw command
Adding test case for this fix
Small correction
Small correction
2012-12-28 18:02:51 +04:00
ika
a9da59ffb6 0022715: Incorrect faces of the filleted cube after import from iges file
Writing and reading tabulated cylinders in IGES were changed in accordance of Type 122 (parametrization [0,1]x[0,1]

some cosmetic changes
Adding test cases for this fix
2012-12-28 17:59:09 +04:00
emv
bfff00a894 0023562: nbshapes command works incorrect with the attached shapes
This option allows to see the number of sub-shapes counting the same sub-shapes with different location as different sub-shapes.
Adding test cases for this fix
2012-12-28 17:55:30 +04:00
apn
e54706ed46 Prepared branch for raising to master 2012-12-24 17:58:42 +04:00
bugmaster
4fe5661921 0023243: Adapt OpenGL viewer for using in Cocoa applications on Mac OS X
Cocoa_Window draft
OpenGl_Context and OpenGl_Window - added support for Cocoa OpenGL context
TKV3d - accept Cocoa_Window
Draft version of ViewerInit method for Mac OS X
Added ViewerTest_CocoaEventManagerView
ViewerTest - attach events to Cocoa window
Cocoa_Window - disable autorelease on close
Fix for OpenGl_Context::Init method
Cocoa_Window - convert top-left coordinates to bottom-left
Added selection with rubber band (rubber band drawing still should be implemented)
Fixed OpenGl_Display initialization on Mac OS X
Fixed OpenGl includes
2012-12-24 17:46:07 +04:00
apn
352ffd7358 Adding test cases for chl grid
Test case tests/bugs/modalg/dxf906 was renamed to bug889
Adding test cases to tests/bugs/moddata
Modified expressions puts [checkshape result]. Added command vzfit in end file in folder bugs. Unlocked command coordload in QABugs_3.cxx
Modified test case bugs vis buc60738
Added test cases to modalg and moddata
Added test cases to caf and fclasses
Added test cases to group heal
2012-12-21 16:39:38 +04:00
pkv
fa0291ff83 0023576: Intersection algorithm produces trimmed circle with illegal parametric range. 2012-12-21 16:35:19 +04:00
pkv
e145f8c1de 0023603: Boolean operation between two edges fails 2012-12-21 16:25:15 +04:00
skv
46e68e02e3 0023606: Invalid result of pipe operation 2012-12-21 16:16:21 +04:00
pkv
bf0ba8139a 0023643: Intersection algorithm produces B-Spline curve in case of coaxial cones 2012-12-21 16:05:58 +04:00
bugmaster
41b3001c72 0023203: STEP import produces wrong surface of revolution on ellipse
Checking of XAsis for ellipses was added.
Adding test case for this fix
2012-12-21 16:01:04 +04:00
Pawel
f5a6ee3c32 0023529: Uninitialized variable: aSurfType - AIS_DiameterDimension.cxx , line 339
Initialized the variable 'aSurfType'.
2012-12-21 15:56:13 +04:00
Roman Lygin
1365140bb8 0022980: Fixed Standard_Atomic.hxx
Standard_Atomic, prefer gcc built-ins rather than WinAPI calls (revert previous change of order)
Raise compiler error if no implementation found for atomic operations.
Add new draw command for testing this bug
Fix for compilation with TBB disabled
Adding CSF_TBB_INCLUDES macro in edl files
Correction of *.edl files
Update of EXTERNLIB files with CSF_TBB
Adding EXTERNLIB file
2012-12-18 22:35:43 +04:00
abv
5789daf94d Restoring test cases removed by last commit.
Enabling command QAAIAGetColor2d on Windows in order to allow relevant tests to pass.
2012-12-18 13:24:12 +04:00
abv
57ea2bf0d3 Adjusting code and testing cases for current state of OCCT 2012-12-17 20:01:09 +04:00
abv
a60b9727cf 0023618: Some tests get killed just because of wrong cpulimit setting
Cpulimit increased in tests bugs moddata bug54 and boolean bsection N4 for tests to pass on slower systems.
Cpulimit command now should print a dying message when it kills process.
2012-12-14 18:16:36 +04:00
Roman Lygin
126b07638d 0023591: IGES Boundary Entity containing Composite Curve fails to translate 2012-12-14 17:50:46 +04:00
apn
f1aa2b6272 Adding new testing cases for chl grid
Adding procedures checkcolor and checkpoint.
Modified test cases which are used QAGetPixelColor or QAAISGetPixelColor2d
Allow using command QAAISGetPixelColor2d on WNT
Rename test case tests/bugs/vis/bug19619 to pro19619
Added test cases to modalg and moddata
2012-12-14 16:56:11 +04:00
mkv
fa350ff051 0023452: Couldn't catch results produced by commands "data" and "tpstat"
Add new printer
Improving of duplication of command's output
Simplification of removing duplication of command's output
Removing of brackets
improved version
Test correction
2012-12-14 16:51:39 +04:00
apn
c7e8fd777c 0023580: [Regression] BRepMesh 6.5.4 produces visually incorrect view
Added test case and modified end file in /bugs/mesh
2012-12-14 16:47:37 +04:00
kgv
bca1d6e249 0023630: Incorrect NULL check in OpenGl_Workspace::EnableTexture() 2012-12-14 16:44:24 +04:00
gka
305cc3f88a 0023587: Operation "2dintersect "in TestHarness can not find intersection point of two intersecting 2d curves.
Modified DRAW command "2dintersect" added optional parameter "tolerance for intersection".
Test case for bug 0023587 : Check intersections of four 2d curves
Adding test cases for this fix
Deleting temporary test case
2012-12-14 16:40:05 +04:00
gka
24de79c3a5 0023523: In session DRAW it is impossible to close document having name already once closed document.
Added destructor for TDocStd_Document which performs destruction of document in logical order in order to avoid exception when Undo and Redo fields are destructed after THF_Data field.
Added removing name of closed document from tcl variables in the DRAW in order to avoid exception during use the same name for new document.
Modification to avoid compilation error class ViewerTest
Minor correction in test caf basic G3
2012-12-14 16:17:11 +04:00
abv
7a06c690fb 0023604: Uninitialized variables in debug mode
Removed #ifndef DEB ... #else ... #endif directives where the variables were being initialized only in release mode.
Removed unused part of code.
2012-12-14 16:12:54 +04:00
aba
bd92cc2a59 0023323: Duplicate if-clause in Visual3d_View.cxx
Changed an outer condition.
Deleted MyMatOfOriIsModified and MyMatOfMapIsModified flags.Deleted all modification flags from ViewOrientationReset() and SetViewOrientation() functions.
Checkings of view modifications in SetViewOrientation() and ViewOrientationReset() methods were returned
CustomIsModified flag was replaced by ScaleIsModified flag in modification checking.
Added 'IsInitialized' flag to check if orientation matrix was set
2012-12-14 16:08:27 +04:00
21800 changed files with 484137 additions and 701554 deletions

2
.gitattributes vendored
View File

@@ -12,6 +12,7 @@
*.jxx eol=lf
*.lxx eol=lf
*.pxx eol=lf
*.cl eol=lf
*.cdl eol=lf
*.edl eol=lf
*.yacc eol=lf
@@ -34,6 +35,7 @@
*.brep eol=lf
*.rle eol=lf
*.vrml eol=lf
*.md eol=lf
FILES eol=lf
PACKAGES eol=lf
EXTERNLIB eol=lf

9
.gitignore vendored
View File

@@ -7,6 +7,7 @@
/ao1
/sil
/wnt
/doc
/drv
/inc
/work
@@ -15,6 +16,12 @@
win32
win64
# standard names of directories for objects and binaries for samples
bin
obj
Debug
Release
# project files and artifacts
/adm/msvc
/adm/wnt
@@ -23,6 +30,7 @@ win64
/adm/make
/adm/cmake
*.vcproj*user
*.csproj*user
*.ncb
*.suo
*.sdf
@@ -34,7 +42,6 @@ win64
*~
#Generated files
*.in
/*.am
/*.m4
/*.ac

503
CMakeLists.txt Normal file
View File

@@ -0,0 +1,503 @@
cmake_minimum_required ( VERSION 2.6)
if (NOT BUILD_CONFIGURATION)
set(BUILD_CONFIGURATION "Release" CACHE STRING "Build type of OCCT" FORCE)
SET_PROPERTY(CACHE BUILD_CONFIGURATION PROPERTY STRINGS Release Debug RelWithDebInfo)
endif()
set(CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE)
project(OCCT)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(BUILD_SHARED_LIBS ON)
IF("${BUILD_CONFIGURATION}" STREQUAL "${CMAKE_BUILD_TYPE}")
SET(CHANGES_ARE_NEEDED OFF)
ELSE()
SET(CHANGES_ARE_NEEDED ON)
ENDIF()
MATH(EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
SET( CMAKE_BUILD_TYPE ${BUILD_CONFIGURATION} CACHE INTERNAL "Build type of OCCT" FORCE )
SET( INSTALL_DIR "" CACHE PATH "Directory that will contain install files of OCCT" )
SET( CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
set (BUILD_TOOLKITS "" CACHE STRING "Toolkits are also included in OCCT")
separate_arguments(BUILD_TOOLKITS)
IF(MSVC)
SET(BUILD_Samples OFF CACHE BOOL "OCCT samples building")
ENDIF()
include(adm/cmake/CMakeModules.txt)
if (WIN32)
set(SCRIPT_EXT bat)
else()
set(SCRIPT_EXT sh)
endif()
if (MSVC)
add_definitions(/fp:precise)
endif()
# set compiler short name and choose SSE2 option for appropriate MSVC compilers
if (DEFINED MSVC70)
SET(COMPILER vc7)
elseif (DEFINED MSVC80)
SET(COMPILER vc8)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
endif()
elseif (DEFINED MSVC90)
SET(COMPILER vc9)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
endif()
elseif (DEFINED MSVC10)
SET(COMPILER vc10)
if (${COMPILER_BITNESS} STREQUAL 32)
add_definitions(/arch:SSE2)
endif()
elseif (DEFINED MSVC11)
SET(COMPILER vc11)
else()
SET(COMPILER ${CMAKE_GENERATOR})
endif()
if (${COMPILER_BITNESS} STREQUAL 64)
add_definitions(-D_OCC64)
endif()
add_definitions(-DCSFDB)
if(WIN32)
add_definitions(/DWNT -wd4996)
elseif(APPLE)
add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H)
else()
add_definitions(-fexceptions -fPIC -DOCC_CONVERT_SIGNALS -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -DLIN)
endif()
# enable structured exceptions for MSVC
string(REGEX MATCH "EHsc" ISFLAG "${CMAKE_CXX_FLAGS}")
IF(ISFLAG)
STRING(REGEX REPLACE "EHsc" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ELSEIF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHa")
ENDIF()
# enable parallel compilation on MSVC 9 and above
IF(WIN32)
IF(NOT DEFINED MSVC70 AND NOT DEFINED MSVC80)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -MP")
ENDIF()
ENDIF()
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
IF(MSVC)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEB")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEB")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out/bin)
# RESOURCES
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/DrawResources" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/StdResource" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/SHMessage" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/Textures" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/Shaders" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XSMessage" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XSTEPResource" DESTINATION "${INSTALL_DIR}/src" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/src/XmlOcafResource" DESTINATION "${INSTALL_DIR}/src" )
install(FILES "${CMAKE_SOURCE_DIR}/src/UnitsAPI/Lexi_Expr.dat" DESTINATION "${INSTALL_DIR}/src/UnitsAPI" )
install(FILES "${CMAKE_SOURCE_DIR}/src/UnitsAPI/Units.dat" DESTINATION "${INSTALL_DIR}/src/UnitsAPI" )
install(FILES "${CMAKE_SOURCE_DIR}/src/TObj/TObj.msg" DESTINATION "${INSTALL_DIR}/src/TObj" )
IF("${BUILD_CONFIGURATION}" STREQUAL "Release")
SET(BUILD_SUFFIX "")
ELSE()
SET(BUILD_SUFFIX "") # debug == release
ENDIF()
FUNCTION(SUBDIRECTORY_NAMES MAIN_DIRECTORY RESULT)
file(GLOB SUB_ITEMS "${MAIN_DIRECTORY}/*")
foreach(ITEM ${SUB_ITEMS})
if(IS_DIRECTORY "${ITEM}")
GET_FILENAME_COMPONENT(ITEM_NAME "${ITEM}" NAME)
LIST(APPEND LOCAL_RESULT "${ITEM_NAME}")
endif()
endforeach()
set (${RESULT} ${LOCAL_RESULT} PARENT_SCOPE)
ENDFUNCTION()
FUNCTION(FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT)
string( TOLOWER "${PRODUCT_NAME}" lower_PRODUCT_NAME )
LIST(APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*${COMPILER}.*${COMPILER_BITNESS}")
LIST(APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}")
LIST(APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+.*${COMPILER_BITNESS}")
LIST(APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}.*[0-9.]+")
LIST(APPEND SEARCH_TEMPLATES "${lower_PRODUCT_NAME}")
SUBDIRECTORY_NAMES( "${ROOT_DIR}" SUBDIR_NAME_LIST)
FOREACH( SEARCH_TEMPLATE ${SEARCH_TEMPLATES})
IF(LOCAL_RESULT)
BREAK()
ENDIF()
FOREACH(SUBDIR_NAME ${SUBDIR_NAME_LIST})
string( TOLOWER "${SUBDIR_NAME}" lower_SUBDIR_NAME )
STRING(REGEX MATCH "${SEARCH_TEMPLATE}" DUMMY_VAR "${lower_SUBDIR_NAME}")
IF(DUMMY_VAR)
LIST(APPEND LOCAL_RESULT ${SUBDIR_NAME})
ENDIF()
ENDFOREACH()
ENDFOREACH()
IF(LOCAL_RESULT)
LIST(LENGTH "${LOCAL_RESULT}" LOC_LEN)
MATH(EXPR LAST_ELEMENT_INDEX "${LOC_LEN}-1")
LIST(GET LOCAL_RESULT ${LAST_ELEMENT_INDEX} DUMMY)
SET(${RESULT} ${DUMMY} PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
IF(WIN32)
SET(DLL_SO "dll")
SET(DLL_SO_FOLDER "bin")
SET(DLL_SO_PREFIX "")
ELSEIF(APPLE)
SET(DLL_SO "dylib")
SET(DLL_SO_FOLDER "lib")
SET(DLL_SO_PREFIX "lib")
ELSE()
SET(DLL_SO "so")
SET(DLL_SO_FOLDER "lib")
SET(DLL_SO_PREFIX "lib")
ENDIF()
SET(3RDPARTY_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory contains required 3rdparty products")
SET(3RDPARTY_INCLUDE_DIRS "")
SET(3RDPARTY_NOT_INCLUDED)
IF(APPLE)
SET(USE_GLX OFF CACHE BOOL "whether use X11 OpenGL on OSX or not")
ENDIF()
SET(USE_GL2PS OFF CACHE BOOL "whether use gl2ps product or not")
SET(USE_FREEIMAGE OFF CACHE BOOL "whether use freeimage product or not")
SET(USE_TBB OFF CACHE BOOL "whether use tbb product or not")
SET(USE_OPENCL OFF CACHE BOOL "whether use OpenCL or not")
SET(INSTALL_TESTS OFF CACHE BOOL "Is tests copy to install directory")
MACRO(THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME)
IF(NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
SET(3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "Directory contains ${PRODUCT_NAME} product")
ENDIF()
IF(3RDPARTY_DIR AND ("${3RDPARTY_${PRODUCT_NAME}_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" ${PRODUCT_NAME} ${PRODUCT_NAME}_DIR_NAME)
IF("${${PRODUCT_NAME}_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "${PRODUCT_NAME} DON'T FIND")
ELSE()
SET(3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_DIR}/${${PRODUCT_NAME}_DIR_NAME}" CACHE PATH "Directory contains ${PRODUCT_NAME} product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_${PRODUCT_NAME} OFF CACHE BOOL "Is ${PRODUCT_NAME} lib copy to install directory")
IF(3RDPARTY_${PRODUCT_NAME}_DIR)
IF("${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the ${PRODUCT_NAME} product" FORCE)
FIND_PATH(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/include" NO_DEFAULT_PATH)
ENDIF()
IF("${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of the ${PRODUCT_NAME} product" FORCE)
FIND_LIBRARY(3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/lib" NO_DEFAULT_PATH)
ENDIF()
IF("${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of the ${PRODUCT_NAME} product" FORCE)
FIND_FILE(3RDPARTY_${PRODUCT_NAME}_DLL "${DLL_SO_PREFIX}${LIBRARY_NAME}.${DLL_SO}" PATHS "${3RDPARTY_${PRODUCT_NAME}_DIR}/${DLL_SO_FOLDER}" NO_DEFAULT_PATH)
ENDIF()
MARK_AS_ADVANCED(3RDPARTY_${PRODUCT_NAME}_DIR)
ELSE()
ENDIF()
# check default path (with additions) for header search
IF("${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the ${PRODUCT_NAME} product" FORCE)
FIND_PATH(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR ${HEADER_NAME} ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_HEADER})
ENDIF()
# check default path (with additions) for library search
IF("${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Directory contains library of the ${PRODUCT_NAME} product" FORCE)
FIND_LIBRARY(3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB})
ENDIF()
# check default path (with additions) for DLL search
IF("${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "" OR "${3RDPARTY_${PRODUCT_NAME}_DLL}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND")
SET(3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Directory contains shared library of the ${PRODUCT_NAME} product" FORCE)
FIND_FILE(3RDPARTY_${PRODUCT_NAME}_DLL "${DLL_SO_PREFIX}${LIBRARY_NAME}.${DLL_SO}" ${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL})
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR)
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_LIBRARY)
ENDIF()
IF(3RDPARTY_${PRODUCT_NAME}_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_${PRODUCT_NAME}_DLL)
ENDIF()
IF(INSTALL_${PRODUCT_NAME})
INSTALL(FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
SET(3RDPARTY_${PRODUCT_NAME}_DLL_DIR "")
ELSE()
GET_FILENAME_COMPONENT(3RDPARTY_${PRODUCT_NAME}_DLL_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL}" PATH)
ENDIF()
ENDMACRO()
# TCL
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)
IF (IS_TCL_VERSION_FOUND)
SET (TCL_VERSION ${TCL_MAJOR_VERSION}${TCL_SEP}${TCL_MINOR_VERSION})
SET (TCL_FOLDER_VERSION ${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
ELSE()
SET (TCL_VERSION "")
#TODO SEARCH tclX.X & tkX.X subdirs
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}")
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")
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
IF(USE_GLX)
ADD_DEFINITIONS(-DMACOSX_USE_GLX)
IF(NOT DEFINED 3RDPARTY_GLX_DIR)
SET(3RDPARTY_GLX_DIR "" CACHE PATH "Directory contains GLX product")
ENDIF()
IF(3RDPARTY_DIR AND ("${3RDPARTY_GLX_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" GLX GLX_DIR_NAME)
IF("${GLX_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "GLX DON'T FIND")
ELSE()
SET(3RDPARTY_GLX_DIR "${3RDPARTY_DIR}/${GLX_DIR_NAME}" CACHE PATH "Directory contains GLX product" FORCE)
ENDIF()
ENDIF()
IF(3RDPARTY_GLX_DIR)
SET(3RDPARTY_GLX_INCLUDE_DIR "${3RDPARTY_GLX_DIR}/include" CACHE FILEPATH "Directory contains headers of the GLX product" FORCE)
SET(3RDPARTY_GLX_LIBRARY_DIR "${3RDPARTY_GLX_DIR}/lib" CACHE FILEPATH "Directory contains library of the GLX product" FORCE)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_GLX_INCLUDE_DIR}")
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_GLX_LIBRARY_DIR}")
MARK_AS_ADVANCED(3RDPARTY_GLX_DIR)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_GLX_INCLUDE_DIR)
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_GLX_LIBRARY_DIR)
ENDIF()
ENDIF()
# FREETYPE
THIRDPARTY_PRODUCT("FREETYPE" "ft2build.h" "freetype${BUILD_SUFFIX}")
IF("${3RDPARTY_FREETYPE_INCLUDE_DIR}" STREQUAL "" OR "${3RDPARTY_FREETYPE_INCLUDE_DIR}" STREQUAL "3RDPARTY_${PRODUCT_NAME}_INCLUDE_DIR-NOTFOUND")
ELSEIF(EXISTS "${3RDPARTY_FREETYPE_INCLUDE_DIR}/freetype2/")
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_FREETYPE_INCLUDE_DIR}/freetype2")
ENDIF()
# FREEIMAGE
IF(USE_FREEIMAGE)
ADD_DEFINITIONS(-DHAVE_FREEIMAGE)
THIRDPARTY_PRODUCT("FREEIMAGE" "FreeImage.h" "freeimage${BUILD_SUFFIX}")
IF(WIN32)
IF("${3RDPARTY_FREEIMAGE_DIR}" STREQUAL "")
ELSE()
SET (3RDPARTY_FREEIMAGEPLUS_DIR "${3RDPARTY_FREEIMAGE_DIR}")
ENDIF()
THIRDPARTY_PRODUCT("FREEIMAGEPLUS" "FreeImagePlus.h" "freeimageplus${BUILD_SUFFIX}")
ENDIF()
ENDIF()
# GL2PS
IF(USE_GL2PS)
ADD_DEFINITIONS(-DHAVE_GL2PS)
THIRDPARTY_PRODUCT("GL2PS" "gl2ps.h" "gl2ps${BUILD_SUFFIX}")
ENDIF()
# OPENCL
IF(USE_OPENCL)
ADD_DEFINITIONS(-DHAVE_OPENCL)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER $ENV{AMDAPPSDKROOT}/include
$ENV{INTELOCLSDKROOT}/include
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/inc
$ENV{ATISTREAMSDKROOT}/include)
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86
$ENV{INTELOCLSDKROOT}/lib/x86
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/Win32
$ENV{ATISTREAMSDKROOT}/lib/x86)
ELSEIF(${COMPILER_BITNESS} STREQUAL 64)
SET (3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB $ENV{AMDAPPSDKROOT}/lib/x86_64
$ENV{INTELOCLSDKROOT}/lib/x64
$ENV{NVSDKCOMPUTE_ROOT}/OpenCL/common/lib/x64
$ENV{ATISTREAMSDKROOT}/lib/x86_64)
ENDIF()
THIRDPARTY_PRODUCT("OPENCL" "CL/cl.h" "OpenCL${BUILD_SUFFIX}")
# if CL/cl.h isn't found (and 3RDPARTY_OPENCL_INCLUDE_DIR isn't defined)
# then try to find OpenCL/cl.h (all other variable won't be changed)
THIRDPARTY_PRODUCT("OPENCL" "OpenCL/cl.h" "OpenCL${BUILD_SUFFIX}")
ENDIF()
# TBB
IF (USE_TBB)
ADD_DEFINITIONS(-DHAVE_TBB)
INCLUDE(adm/templates/tbb.cmake)
IF(INSTALL_TBB)
INSTALL(FILES "${3RDPARTY_TBB_DLL}" "${3RDPARTY_TBB_MALLOC_DLL}" DESTINATION "${INSTALL_DIR}/${DLL_SO_FOLDER}")
SET(3RDPARTY_TBB_DLL_DIR "")
SET(3RDPARTY_TBB_MALLOC_DLL_DIR "")
ELSE()
GET_FILENAME_COMPONENT(3RDPARTY_TBB_DLL_DIR "${3RDPARTY_TBB_DLL}" PATH)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_MALLOC_DLL_DIR "${3RDPARTY_TBB_MALLOC_DLL}" PATH)
ENDIF()
ENDIF()
string( REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
#CHECK ALL 3RDPARTY PATHS
IF(3RDPARTY_NOT_INCLUDED)
MESSAGE(FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
ENDIF()
list(REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
string( REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
MESSAGE(STATUS "3RDPARTY_INCLUDE_DIRS: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
include_directories( ${3RDPARTY_INCLUDE_DIRS} )
list(REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
string( REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
MESSAGE(STATUS "3RDPARTY_LIBRARY_DIRS: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
link_directories( ${3RDPARTY_LIBRARY_DIRS} )
IF("${INSTALL_DIR}" STREQUAL "")
MESSAGE(FATAL_ERROR "INSTALL_DIR is empty")
ELSE()
# inc,data,tests DIRECTORY
install(DIRECTORY "${CMAKE_SOURCE_DIR}/inc" DESTINATION "${INSTALL_DIR}" )
install(DIRECTORY "${CMAKE_SOURCE_DIR}/data" DESTINATION "${INSTALL_DIR}" )
IF(INSTALL_TESTS)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/tests" DESTINATION "${INSTALL_DIR}" )
ENDIF()
# DRAW.BAT or DRAW.SH
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_WRITE WORLD_EXECUTE)
IF (BUILD_Samples)
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/sample.bat" DESTINATION "${INSTALL_DIR}")
ENDIF()
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/env.${SCRIPT_EXT}.in" env.${SCRIPT_EXT} @ONLY)
install(FILES "${OCCT_BINARY_DIR}/env.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" )
ENDIF()
include(adm/cmake/CMakeToolKitsDeps.txt)
IF (BUILD_Samples)
SET (CMAKE_MFC_FLAG 2)
SET (OCCT_ROOT ${CMAKE_SOURCE_DIR})
SET (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
SET (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
subdirs(samples/mfc/standard/mfcsample)
subdirs(samples/mfc/standard/01_Geometry)
subdirs(samples/mfc/standard/02_Modeling)
subdirs(samples/mfc/standard/03_Viewer2d)
subdirs(samples/mfc/standard/04_Viewer3d)
subdirs(samples/mfc/standard/05_ImportExport)
subdirs(samples/mfc/standard/06_Ocaf)
subdirs(samples/mfc/standard/07_Triangulation)
subdirs(samples/mfc/standard/08_HLR)
subdirs(samples/mfc/standard/09_Animation)
subdirs(samples/mfc/standard/10_Convert)
ENDIF()

151
LICENSE
View File

@@ -1,151 +0,0 @@
Open CASCADE Technology Public License
License version: 6.5 March, 2011
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 des 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"

502
LICENSE_LGPL_21.txt Executable file
View File

@@ -0,0 +1,502 @@
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!

10
OCCT_LGPL_EXCEPTION.txt Normal file
View File

@@ -0,0 +1,10 @@
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.

44
README
View File

@@ -1,44 +0,0 @@
Open CASCADE Technology source repository
-----------------------------------------
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).
The OCCT code is subject to the Open CASCADE Technology Public License Version
6.5 (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.
In order to build OCCT libraries from these sources for use in your program,
you need to:
1. Download, build, and install the required third-party libraries.
Follow the instructions provided in the documents titled "Building 3rd party
products for OCCT" on http://dev.opencascade.org/?q=home/resources for
installation and building.
2. Install and configure WOK development environment.
See http://dev.opencascade.org/?q=home/resources for the latest build of the
WOK and instructions of configuring it.
3. Use WOK to generate build scripts or project files for your compiler,
then build the libraries.
Note that you may use also the pre-processed source packages that include
makefiles and projects, or binary packages, available for official releases of
OCCT at http://www.opencascade.org. In this case however you will not be able
to re-generate derived files after changing the CDL files (requires WOK).
The current version of OCCT can be consulted in the file
src/Standard/Standard_Version.hxx
For more information regarding OCCT code development please consult the official
OCCT Collaborative Development Portal:
http://dev.opencascade.org

90
README.txt Normal file
View File

@@ -0,0 +1,90 @@
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).
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.
Packaging
---------
You can receive certified version of OCCT code in different packages.
- Snapshot of Git repository: contains only bare sources of OCCT; many C++
files, HTML documentation, and project files / makefiles for building OCCT
need to be generated.
- Complete source archive: contains all sources of OCCT, including C++ files
generated by WOK, HTML and PDF documentation, and projects / makefiles for
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.
This package allows using OCCT immediately after installation.
Certified versions of OCCT can be downloaded from http://www.opencascade.org
You can also find OCCT pre-installed on your system, or install it from
packages provided by a third party. Note that packaging and functionality
of such versions can be different from certified releases. Please consult
documentation accompanyog your version for details.
Documentation
-------------
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.
- Read documentation in source plain text (MarkDown) format found in
subfolder *dox*
See *dox/dev_guides/documentation/documentation.md* for details.
Building
--------
In most cases you need to rebuild OCCT on your platform (OS, compiler) before
using it in your project, to ensure binary compatibility.
Consult the file *dox/dev_guides/building/building.md* for instructions on
building OCCT from sources on supported platforms.
Version
-------
The current version of OCCT can be consulted in the file
*src/Standard/Standard_Version.hxx*
Development
-----------
For information regarding OCCT code development please consult the official
OCCT Collaborative Development Portal:
http://dev.opencascade.org

View File

@@ -92,8 +92,6 @@ t TKG3d
t TKGeomBase
p AppBlend
p ApproxInt
p BOP
p BOPTColStd
p BOPTools
p BRepAlgo
p BRepAlgoAPI
@@ -124,7 +122,6 @@ p BiTgte
p Bisector
p Blend
p BlendFunc
p BooleanOperations
p ChFi2d
p ChFi3d
p ChFiDS
@@ -149,6 +146,7 @@ p GeomPlate
p HLRAlgo
p HLRBRep
p HLRTopoBRep
p HLRAppli
p Hatch
p HatchGen
p IntCurve
@@ -208,46 +206,33 @@ t TKTopAlgo
t TKXMesh
n InterfaceGraphic
p AIS
p AIS2D
p AlienImage
p Aspect
p CGM
p DsgPrs
p GGraphic2d
p Graphic2d
p Graphic3d
p Image
p ImageUtility
p MFT
p MeshVS
p NIS
p OpenGl
p PS
p PlotMgt
p Prs2d
p Prs3d
p PrsMgr
p Select2D
p Select3D
p SelectBasics
p SelectMgr
p StdPrs
p StdSelect
p TColQuantity
p V2d
p V3d
p Viewer
p Visual3d
p Voxel
p WNT
p Xw
r FontMFT
p Cocoa
r Textures
r Shaders
t TKMeshVS
t TKNIS
t TKOpenGl
t TKService
t TKV2d
t TKV3d
t TKVoxel
n BinTObjDrivers
@@ -474,7 +459,6 @@ p TObjDRAW
p TestTopOpe
p TestTopOpeDraw
p TestTopOpeTools
p Viewer2dTest
p ViewerTest
p XDEDRAW
p XSDRAW
@@ -496,9 +480,12 @@ p QANCollection
p QANewBRepNaming
p QANewDBRepNaming
p QANewModTopOpe
p QAViewer2dTest
r QAResources
t TKQADraw
p QADNaming
p QABugs
p Font
p BOPAlgo
p BOPDS
p BOPCol
p BOPInt

7
adm/templates/draw.bat Normal file
View File

@@ -0,0 +1,7 @@
@echo off
rem Setup environment and launch DRAWEXE
call "%~dp0env.bat"
echo Hint: use "pload ALL" command to load standard commands
DRAWEXE.exe

8
adm/templates/draw.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
source "${aScriptPath}/env.sh"
echo 'Hint: use "pload ALL" command to load standard commands'
DRAWEXE

59
adm/templates/env.bat.in Normal file
View File

@@ -0,0 +1,59 @@
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%"
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%"
rem ----- Set path to 3rd party and OCCT libraries -----
set "PATH=%CASROOT%\bin;%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"
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 "%CASROOT%\src\DrawResourcesProducts" (
set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
)

101
adm/templates/env.sh.in Normal file
View File

@@ -0,0 +1,101 @@
#!/bin/bash
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
if [ "${CASROOT}" == "" ]; then
export CASROOT="${aScriptPath}"
fi
aLibPath="${CASROOT}/lib"
TCL_DIR="@3RDPARTY_TCL_DLL_DIR@"
if [ "$TCL_DIR" != "" ]; then
aLibPath="${TCL_DIR}:${aLibPath}"
fi
FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
if [ "$FREETYPE_DIR" != "" ]; then
aLibPath="${FREETYPE_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}"
fi
# ----- Set path to 3rd party and OCCT libraries -----
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
export WOKSTATION="mac";
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
export DYLD_LIBRARY_PATH="${aLibPath}:${DYLD_LIBRARY_PATH}"
else
export DYLD_LIBRARY_PATH="${aLibPath}"
fi
else
export WOKSTATION="lin";
if [ "$LD_LIBRARY_PATH" != "" ]; then
export LD_LIBRARY_PATH="${aLibPath}:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${aLibPath}"
fi
fi
# ----- Set path to OCCT executables -----
PATH="${PATH}:${CASROOT}/bin"
# ----- Setup Environment Variables -----
anArch=`uname -m`
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
export ARCH="32";
else
export ARCH="64";
fi
if [ "$aSystem" == "Darwin" ]; then
export ARCH="64";
fi
# ----- Set envoronment variables used by OCCT -----
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"
# 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"
fi
fi
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
fi

28
adm/templates/sample.bat Normal file
View File

@@ -0,0 +1,28 @@
@echo off
if ["%1"] == [""] (
echo Launch selected sample as follows:
echo sample.bat SampleName
echo available samples:
echo Geometry
echo Modeling
echo Viewer2d
echo Viewer3d
echo ImportExport
echo Ocaf
echo Triangulation
echo HLR
echo Animation
echo Convert
exit /B
)
if not exist "%~dp0/bin/%1.exe" (
echo Executable %~dp0/bin/%4.exe not found.
echo Probably you didn't compile the application.
exit /B
)
call "%~dp0/env.bat"
"%~dp0/bin/%1.exe"

109
adm/templates/tbb.cmake Normal file
View File

@@ -0,0 +1,109 @@
# Find tbb includes and libraries
IF(${COMPILER_BITNESS} STREQUAL 32)
SET (TBB_ARCH_NAME ia32)
ELSE()
SET (TBB_ARCH_NAME intel64)
ENDIF()
IF(NOT DEFINED 3RDPARTY_TBB_DIR)
SET(3RDPARTY_TBB_DIR "" CACHE PATH "Directory contains tbb product")
ENDIF()
SET(3RDPARTY_TBB_DIR_NAME "")
IF(3RDPARTY_DIR AND ("${3RDPARTY_TBB_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" "TBB" 3RDPARTY_TBB_DIR_NAME)
IF("${3RDPARTY_TBB_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "TBB DON'T FIND")
ELSE()
SET(3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${3RDPARTY_TBB_DIR_NAME}" CACHE PATH "Directory contains tbb product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_TBB OFF CACHE BOOL "Is tbb lib copy to install directory")
IF(3RDPARTY_TBB_DIR)
IF("${3RDPARTY_TBB_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "Directory contains headers of the tbb product" FORCE)
FIND_PATH(3RDPARTY_TBB_INCLUDE_DIR tbb/tbb.h PATHS "${3RDPARTY_TBB_DIR}/include")
ENDIF()
SET(TBB_DEBUG_POSTFIX "")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
SET(TBB_DEBUG_POSTFIX "_debug")
ENDIF()
IF("${3RDPARTY_TBB_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TBB_LIBRARY}" STREQUAL "3RDPARTY_TBB_LIBRARY-NOTFOUND")
SET(3RDPARTY_TBB_LIBRARY "3RDPARTY_TBB_LIBRARY-NOTFOUND" CACHE PATH "Directory contains library of the tbb product" FORCE)
FIND_LIBRARY(3RDPARTY_TBB_LIBRARY tbb${TBB_DEBUG_POSTFIX} PATHS "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_LIBRARY}" STREQUAL "3RDPARTY_TBB_LIBRARY-NOTFOUND")
FIND_LIBRARY(3RDPARTY_TBB_LIBRARY tbb${TBB_DEBUG_POSTFIX})
ENDIF()
ENDIF()
IF("${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND")
SET(3RDPARTY_TBB_MALLOC_LIBRARY "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND" CACHE PATH "Directory contains library of the tbb malloc product" FORCE)
FIND_LIBRARY(3RDPARTY_TBB_MALLOC_LIBRARY tbbmalloc${TBB_DEBUG_POSTFIX} PATHS "${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_MALLOC_LIBRARY}" STREQUAL "3RDPARTY_TBB_MALLOC_LIBRARY-NOTFOUND")
FIND_LIBRARY(3RDPARTY_TBB_MALLOC_LIBRARY tbbmalloc${TBB_DEBUG_POSTFIX})
ENDIF()
ENDIF()
IF("${3RDPARTY_TBB_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_DLL "3RDPARTY_TBB_DLL-NOTFOUND" CACHE PATH "Directory contains shared library of the tbb product" FORCE)
FIND_FILE(3RDPARTY_TBB_DLL "${DLL_SO_PREFIX}tbb${TBB_DEBUG_POSTFIX}.${DLL_SO}" PATHS "${3RDPARTY_TBB_DIR}/${DLL_SO_FOLDER}/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_DLL}" STREQUAL "3RDPARTY_TBB_DLL-NOTFOUND")
FIND_FILE(3RDPARTY_TBB_DLL "${DLL_SO_PREFIX}tbb${TBB_DEBUG_POSTFIX}.${DLL_SO}")
ENDIF()
ENDIF()
IF("${3RDPARTY_TBB_MALLOC_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED)
SET(3RDPARTY_TBB_MALLOC_DLL "3RDPARTY_TBB_MALLOC_DLL-NOTFOUND" CACHE PATH "Directory contains shared library of the tbb malloc product" FORCE)
FIND_FILE(3RDPARTY_TBB_MALLOC_DLL "${DLL_SO_PREFIX}tbbmalloc${TBB_DEBUG_POSTFIX}.${DLL_SO}" PATHS "${3RDPARTY_TBB_DIR}/${DLL_SO_FOLDER}/${TBB_ARCH_NAME}/${COMPILER}" NO_DEFAULT_PATH)
IF("${3RDPARTY_TBB_MALLOC_DLL}" STREQUAL "3RDPARTY_TBB_MALLOC_DLL-NOTFOUND")
FIND_FILE(3RDPARTY_TBB_MALLOC_DLL "${DLL_SO_PREFIX}tbbmalloc${TBB_DEBUG_POSTFIX}.${DLL_SO}")
ENDIF()
ENDIF()
MARK_AS_ADVANCED(3RDPARTY_TBB_DIR_NAME)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_DIR)
ENDIF()
IF(3RDPARTY_TBB_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_TBB_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
ENDIF()
IF(3RDPARTY_TBB_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_LIBRARY_DIR "${3RDPARTY_TBB_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TBB_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_LIBRARY)
ENDIF()
IF(3RDPARTY_TBB_MALLOC_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TBB_LIBRARY_DIR "${3RDPARTY_TBB_MALLOC_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TBB_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_MALLOC_LIBRARY)
ENDIF()
IF(3RDPARTY_TBB_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_DLL)
ENDIF()
IF(3RDPARTY_TBB_MALLOC_DLL)
#
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_MALLOC_DLL)
ENDIF()

163
adm/templates/tcl.cmake Normal file
View File

@@ -0,0 +1,163 @@
# - Find Tcl includes and libraries
IF(WIN32)
SET(TCL_SEP "")
GET_FILENAME_COMPONENT(ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" NAME)
ELSE()
SET(TCL_SEP ".")
ENDIF()
IF(NOT DEFINED 3RDPARTY_TCL_DIR)
SET(3RDPARTY_TCL_DIR "" CACHE PATH "Directory contains TCL product")
ENDIF()
IF(3RDPARTY_DIR AND ("${3RDPARTY_TCL_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED))
FIND_PRODUCT_DIR("${3RDPARTY_DIR}" tcl TCL_DIR_NAME)
IF("${TCL_DIR_NAME}" STREQUAL "")
MESSAGE(STATUS "\nInfo: tcl folder isn't found in ${3RDPARTY_DIR}. Start seeking in default folders")
ELSE()
SET(3RDPARTY_TCL_DIR "${3RDPARTY_DIR}/${TCL_DIR_NAME}" CACHE PATH "Directory contains TCL product" FORCE)
ENDIF()
ENDIF()
SET(INSTALL_TCL OFF CACHE BOOL "Is TCL lib copy to install directory")
# include dir search
IF("${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND")
SET(3RDPARTY_TCL_INCLUDE_DIR "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "Directory contains headers of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_PATH(3RDPARTY_TCL_INCLUDE_DIR tcl.h PATHS "${3RDPARTY_TCL_DIR}/include" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS /usr/include
/usr/local/include
/usr/include/tcl8${TCL_SEP}6
/usr/include/tcl8${TCL_SEP}5)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS ${3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
"$ENV{ProgramFiles}/Tcl/include"
#"$ENV{ProgramFiles\(x86\)}/Tcl/include"
"C:/Program Files/Tcl/include"
"C:/Tcl/include")
ENDIF(WIN32)
# check default path (with additions) for header search
FIND_PATH(3RDPARTY_TCL_INCLUDE_DIR tcl.h PATHS ${3RDPARTY_TCL_POSSIBLE_INCLUDE_DIRS})
#if find_path found something - set 3RDPARTY_TCL_DIR
IF(NOT "${3RDPARTY_TCL_INCLUDE_DIR}" STREQUAL "3RDPARTY_TCL_INCLUDE_DIR-NOTFOUND")
GET_FILENAME_COMPONENT (3RDPARTY_TCL_DIR "${3RDPARTY_TCL_INCLUDE_DIR}/../" ABSOLUTE)
SET(3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DIR} CACHE FILEPATH "Directory contains TCL product" FORCE)
ENDIF()
ENDIF()
ENDIF()
#library dir search
IF("${3RDPARTY_TCL_LIBRARY}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_LIBRARY}" STREQUAL "3RDPARTY_TCL_LIBRARY-NOTFOUND")
SET(3RDPARTY_TCL_LIBRARY "3RDPARTY_TCL_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_LIBRARY(3RDPARTY_TCL_LIBRARY
NAMES tcl tcl8${TCL_SEP}6 tcl8${TCL_SEP}5
PATHS "${3RDPARTY_TCL_DIR}/lib" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS /usr/lib /usr/local/lib)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS ${3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
"$ENV{ProgramFiles}/Tcl/Lib"
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib" )
ENDIF()
# check default path (with additions) for library search
FIND_LIBRARY(3RDPARTY_TCL_LIBRARY
NAMES tcl tcl8${TCL_SEP}6 tcl8${TCL_SEP}5
PATHS ${3RDPARTY_TCL_POSSIBLE_LIBRARIES_DIRS})
ENDIF()
ENDIF()
#search the version of found tcl library
IF("${3RDPARTY_TCL_LIBRARY}" STREQUAL "" OR "${3RDPARTY_TCL_LIBRARY}" STREQUAL "3RDPARTY_TCL_LIBRARY-NOTFOUND")
SET (TCL_DLL_SO_NAMES ${DLL_SO_PREFIX}tcl.${DLL_SO}
${DLL_SO_PREFIX}tcl8${TCL_SEP}5.${DLL_SO}
${DLL_SO_PREFIX}tcl8${TCL_SEP}6.${DLL_SO} )
ELSE()
GET_FILENAME_COMPONENT(TCL_LIBRARY_NAME "${3RDPARTY_TCL_LIBRARY}" NAME)
STRING(REGEX REPLACE "^.*tcl([0-9])[^0-9]*[0-9].*$" "\\1" TCL_MAJOR_VERSION "${TCL_LIBRARY_NAME}")
STRING(REGEX REPLACE "^.*tcl[0-9][^0-9]*([0-9]).*$" "\\1" TCL_MINOR_VERSION "${TCL_LIBRARY_NAME}")
IF (NOT "${TCL_MAJOR_VERSION}" STREQUAL "${TCL_LIBRARY_NAME}")
SET (IS_TCL_VERSION_FOUND ON)
ELSE()
SET (IS_TCL_VERSION_FOUND OFF)
ENDIF()
IF (IS_TCL_VERSION_FOUND)
SET (TCL_DLL_SO_NAMES "${DLL_SO_PREFIX}tcl${TCL_MAJOR_VERSION}${TCL_SEP}${TCL_MINOR_VERSION}.${DLL_SO}")
ELSE()
MESSAGE(STATUS "\nWarning: Tcl version isn't found. ${DLL_SO_PREFIX}tcl.${DLL_SO} is used")
SET (TCL_DLL_SO_NAMES "${DLL_SO_PREFIX}tcl.${DLL_SO}")
ENDIF()
ENDIF()
#dll_so search
IF("${3RDPARTY_TCL_DLL}" STREQUAL "" OR CHANGES_ARE_NEEDED OR "${3RDPARTY_TCL_DLL}" STREQUAL "3RDPARTY_TCL_DLL-NOTFOUND")
SET(3RDPARTY_TCL_DLL "3RDPARTY_TCL_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of the TCL product" FORCE)
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
FIND_FILE(3RDPARTY_TCL_DLL
NAMES ${TCL_DLL_SO_NAMES}
PATHS "${3RDPARTY_TCL_DIR}/${DLL_SO_FOLDER}" NO_DEFAULT_PATH)
ELSE()
SET(3RDPARTY_TCL_POSSIBLE_SO_DIRS /usr/lib /usr/local/lib)
IF(WIN32)
SET(3RDPARTY_TCL_POSSIBLE_SO_DIRS ${3RDPARTY_TCL_POSSIBLE_SO_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
"$ENV{ProgramFiles}/Tcl/Bin"
"C:/Program Files/Tcl/bin"
"C:/Tcl/b" )
ENDIF()
# check default path (with additions) for dll_so search
FIND_FILE(3RDPARTY_TCL_DLL
NAMES ${TCL_DLL_SO_NAMES}
PATHS ${3RDPARTY_TCL_POSSIBLE_SO_DIRS})
ENDIF()
ENDIF()
IF(NOT "${3RDPARTY_TCL_DIR}" STREQUAL "")
MARK_AS_ADVANCED(3RDPARTY_TCL_DIR)
ENDIF()
# #includes found paths to common variables
IF(3RDPARTY_TCL_INCLUDE_DIR)
SET(3RDPARTY_INCLUDE_DIRS "${3RDPARTY_INCLUDE_DIRS};${3RDPARTY_TCL_INCLUDE_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_INCLUDE_DIR)
ENDIF()
IF(3RDPARTY_TCL_LIBRARY)
GET_FILENAME_COMPONENT(3RDPARTY_TCL_LIBRARY_DIR "${3RDPARTY_TCL_LIBRARY}" PATH)
SET(3RDPARTY_LIBRARY_DIRS "${3RDPARTY_LIBRARY_DIRS};${3RDPARTY_TCL_LIBRARY_DIR}")
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_LIBRARY)
ENDIF()
IF(3RDPARTY_TCL_DLL)
ELSE()
LIST(APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TCL_DLL)
ENDIF()

BIN
data/images/marker_box1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

BIN
data/images/marker_box2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

BIN
data/images/marker_dot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

188
dox/DoxygenLayout.xml Normal file
View File

@@ -0,0 +1,188 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.3.1 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Introduction"/>
<tab type="pages" visible="yes" title="Documents" intro="This section contains links to all OCCT documents that are available at the moment"/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="no" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="Reference Manual">
<tab type="classlist" visible="no" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="no" title="" intro=""/>
<tab type="classmembers" visible="no" title="" intro=""/>
</tab>
<tab type="files" visible="no" title="Files">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="no" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

55
dox/FILES.txt Normal file
View File

@@ -0,0 +1,55 @@
# This file contains list of documentation files of OCCT which are processed
# by Doxygen to generate HTML documentation.
# Files are listed one file per line, with paths relative to dox folder.
# Empty spaces are allowed, part of string starting with # is ignored.
# The order of files in this list determines order of top-level pages
# in the generated documentation.
overview/overview.md
../samples/mfc/standard/ReadMe.md
../samples/CSharp/ReadMe.md
tutorial/tutorial.md
technical_overview/technical_overview.md
user_guides/user_guides.md
user_guides/foundation_classes/foundation_classes.md
user_guides/modeling_data/modeling_data.md
user_guides/modeling_algos/modeling_algos.md
user_guides/visualization/visualization.md
user_guides/iges/iges.md
user_guides/step/step.md
user_guides/xde/xde.md
user_guides/ocaf/ocaf.md
user_guides/tobj/tobj.md
user_guides/shape_healing/shape_healing.md
user_guides/draw_test_harness.md
user_guides/brep_wp/brep_wp.md
user_guides/ocaf_functionmechanism_wp/ocaf_functionmechanism_wp.md
user_guides/ocaf_tree_wp/ocaf_tree_wp.md
user_guides/ocaf_wp/ocaf_wp.md
user_guides/voxels_wp/voxels_wp.md
dev_guides/dev_guides.md
dev_guides/documentation/documentation.md
dev_guides/contribution/coding_rules.md
dev_guides/contribution_workflow/contribution_workflow.md
dev_guides/git_guide/git_guide.md
dev_guides/tests/tests.md
dev_guides/cdl/cdl.md
dev_guides/wok/wok.md
dev_guides/building/building.md
dev_guides/building/3rdparty/3rdparty_windows.md
dev_guides/building/3rdparty/3rdparty_linux.md
dev_guides/building/3rdparty/3rdparty_osx.md
dev_guides/building/wok/wok.md
dev_guides/building/automake.md
dev_guides/building/cmake/cmake.md
dev_guides/building/code_blocks.md
dev_guides/building/msvc.md
dev_guides/building/xcode.md
license.md

View File

@@ -0,0 +1,264 @@
 Building 3rd-party libraries on Linux {#dev_guides__building_3rdparty_linux}
=========
@tableofcontents
@section dev_guides__building_3rdparty_linux_1 Introduction
This document presents additional guidelines for building third-party
products used by Open CASCADE Technology and samples on Linux platform.
The links for downloading the third-party products are available on the web site
of OPEN CASCADE SAS at
http://www.opencascade.org/getocc/require/.
There are two types of third-party products, which are necessary to build OCCT:
* Mandatory products: Tcl/Tk 8.5 - 8.6 and  FreeType 2.4.10 - 2.4.11
* Optional products: TBB 3.x - 4.x, gl2ps 1.3.5 - 1.3.8, FreeImage 3.14.1 - 3.15.4
@section dev_guides__building_3rdparty_linux_2 Building Mandatory Third-party Products
@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk
Tcl/Tk is required for DRAW test harness.
@subsubsection dev_guides__building_3rdparty_linux_2_1_1 Installation from binaries:
It is possible to download ready-to-install binaries from
http://www.activestate.com/activetcl/downloads
1. Download the binaries archive and unpack them to some TCL_SRC_DIR.
2. Enter the directory TCL_SRC_DIR.
cd TCL_SRC_DIR
3. Run the install command
install.sh
and follow instructions.
@subsubsection dev_guides__building_3rdparty_linux_2_1_2 Installation from sources: Tcl
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the unix sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
cd TCL_SRC_DIR/unix
2. Run the configure command
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building is finished successfully, start the installation of Tcl.
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
make install
@subsubsection dev_guides__building_3rdparty_linux_2_1_3 Installation from sources: Tk
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the unix sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
cd TK_SRC_DIR/unix
2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building has finished successfully, start the installation of Tk.
All binary and service files of the product will be copied
to the directory defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
make install
@subsection dev_guides__building_3rdparty_linux_2_2 FreeType
FreeType is required for display of text in 3D viewer.
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
cd FREETYPE_SRC_DIR
2. Run the configure command
configure --prefix=FREETYPE_INSTALL_DIR
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building has finished successfully, start the installation of FreeType.
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
make install
@section dev_guides__building_3rdparty_linux_3 Building Optional Third-party Products
@subsection dev_guides__building_3rdparty_linux_3_1 TBB
This third-party product is installed with binaries from the archive that can be downloaded from http://threadingbuildingblocks.org.
Go to \"Downloads page\", find the release version you need and pick the archive for Linux platform.
To install, unpack the downloaded archive of TBB product.
@subsection dev_guides__building_3rdparty_linux_3_2 gl2ps
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
1. Install or build cmake product from source file.
2. Start cmake in GUI mode with the directory where the source files of gl2ps are located:
ccmake GL2PS_SRC_DIR
a. Press [c] to make the initial configuration
b. Define the necessary options CMAKE_INSTALL_PREFIX
c. Press [c] to make the final configuration
d. Press [g] to generate Makefile and exit
or just run the following command:
cmake DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR DCMAKE_BUILD_TYPE=Release
3. Start building of gl2ps
make
4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
make install
@subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
Download the necessary archive from http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
1. Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
In line 60 insert the following:
#include string.h
2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
cd FREEIMAGE_SRC_DIR
3. Run the building process
make
4. Run the installation process
a. If you have permissions to write to /usr/include and /usr/lib directories then run the following command:
make install
b. If you dont have permissions to write to /usr/include and
/usr/lib directories then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.gnu:
Change lines 7-9 from:
DESTDIR ?= /
INCDIR ?= $(DESTDIR)/usr/include
INSTALLDIR ?= $(DESTDIR)/usr/lib
to:
DESTDIR ?= $(DESTDIR)
INCDIR ?= $(DESTDIR)/include
INSTALLDIR ?= $(DESTDIR)/lib
Change lines 65-67 from:
install -m 644 -o root -g root $(HEADER) $(INCDIR)
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
to:
install -m 755 $(HEADER) $(INCDIR)
install -m 755 $(STATICLIB) $(INSTALLDIR)
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
Change line 70 from: 
ldconfig
to:
\#ldconfig
Then run the installation process by the following command:
make DESTDIR=FREEIMAGE_INSTALL_DIR install
5. Clean the temporary files
make clean
@subsection dev_guides__building_3rdparty_linux_3_4 OpenCL ICD Loader
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
2. Unpack the archive and put headers in **inc/CL** sub-folder
3. Print **make** in root of unpacked archive to compile OpenCL libraries.
4. Create installation folder for OpenCL IDL Loader package and put there:
1. OpenCL header files in **include/CL** subfolder
2. **libOpenCL.so** (generated in **bin** subfolder of source package) in **lib** subfolder
@section dev_guides__building_3rdparty_linux_4 Installation From Official Repositories
@subsection dev_guides__building_3rdparty_linux_4_1 Debian-based distributives
All 3rd-party products required for building of OCCT could be installed
from official repositories. You may install them from console using apt-get utility:
sudo apt-get install \
tcllib tklib tcl-dev tk-dev \
libfreetype-dev \
libxt-dev libxmu-dev \
libgl1-mesa-dev \
libfreeimage-dev \
libtbb-dev \
libgl2ps-dev
To launch WOK-prebuilt binaries you need install C shell and 32-bit libraries on x86_64 distributives:
sudo apt-get install \
csh \
libstdc++5:i386 libxt6:i386
Any compliant C++ compiler is required for building anyway:
sudo apt-get install \
g++

View File

@@ -0,0 +1,218 @@
 Building 3rd-party libraries on MacOS X {#dev_guides__building_3rdparty_osx}
==============================================
@tableofcontents
@section dev_guides__building_3rdparty_osx_1 Introduction
This document presents additional guidelines for building third-party products
used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later).
The links for downloading the third-party products are available
on the web site of OPEN CASCADE SAS at
http://www.opencascade.org/getocc/require/</a>.
There are two types of third-party products, which are necessary to build OCCT:
* Mandatory products: Tcl 8.5, Tk 8.5, FreeType 2.4.10
* Optional products: TBB 3.x or 4.x, gl2ps 1.3.5, FreeImage 3.14.1 or 3.15.x
@section dev_guides__building_3rdparty_osx_2 Building Mandatory Third-party Products
@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5
Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT.
@subsubsection dev_guides__building_3rdparty_osx_2_1_1 Installation from binaries
It is possible to download ready-to-install binaries from
http://www.activestate.com/activetcl/downloads
1. Download the disk image to some TCL_DOWNLOAD_DIR.
2. Open in Finder the directory TCL_DOWNLOAD_DIR.
3. Open disk image and follow instructions.
@subsubsection dev_guides__building_3rdparty_osx_2_1_2 Installation from sources: Tcl 8.5
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the macosx sub-directory of the directory where the source files of Tcl are located (TCL_SRC_DIR).
cd TCL_SRC_DIR/macosx
2. Run the configure command
configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR
For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building is finished successfully, start the installation of Tcl.
All binary and service files of the product will be copied to the directory defined by TCL_INSTALL_DIR
make install
@subsubsection dev_guides__building_3rdparty_osx_2_1_3 Installation from sources: Tk 8.5
Download the necessary archive from http://www.tcl.tk/software/tcltk/download.html and unpack it.
1. Enter the macosx sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR).
cd TK_SRC_DIR/macosx
2. Run the configure command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib
configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR
where TCL_LIB_DIR is TCL_INSTALL_DIR/lib. For a 64 bit platform also add --enable-64bit option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building has finished successfully, start the installation of Tk.
All binary and service files of the product will be copied to the directory
defined by TK_INSTALL_DIR (usually TK_INSTALL_DIR is TCL_INSTALL_DIR)
make install
@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10
FreeType is required for display of text in 3D viewer.
Download the necessary archive from http://sourceforge.net/projects/freetype/files/ and unpack it.
1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR).
cd FREETYPE_SRC_DIR
2. Run the configure command
configure --prefix=FREETYPE_INSTALL_DIR
For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line.
3. If the configure command has finished successfully, start the building process
make
4. If building has finished successfully, start the installation of FreeType.
All binary and service files of the product will be copied to the directory defined by FREETYPE_INSTALL_DIR
make install
@section dev_guides__building_3rdparty_osx_3 Building Optional Third-party Products
@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x
This third-party product is installed with binaries from the archive
that can be downloaded from http://threadingbuildingblocks.org/.
Go to \"Downloads / Commercial Aligned Release\", find the release version you need (e.g. tbb30_018oss)
and pick the archive for Mac OS X platform.
To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*).
@subsection dev_guides__building_3rdparty_osx_3_2 gl2ps 1.3.5
Download the necessary archive from http://geuz.org/gl2ps/ and unpack it.
1. Install or build cmake product from source file.
2. Start cmake in GUI mode with the directory where the source files of fl2ps are located
ccmake GL2PS_SRC_DIR
1. Press [c] to make the initial configuration
2. Define the necessary options CMAKE_INSTALL_PREFIX
3. Press [c] to make the final configuration
4. Press [g] to generate Makefile and exit
or just run the following command:
cmake DCMAKE_INSTALL_PREFIX=GL2PS_INSTALL_DIR DCMAKE_BUILD_TYPE=Release
3. Start building of gl2ps
make
4. Start the installation of gl2ps. Binaries will be installed according to the CMAKE_INSTALL_PREFIX option
make install
@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x
Download the necessary archive from
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
and unpack it. The directory with unpacked sources is further referred to as FREEIMAGE_SRC_DIR.
Note that for building FreeImage on Mac OS X 10.7 you should replace Makefile.osx
in FREEIMAGE_SRC_DIR by corrected one which you can find in attachment to issue #22811 in OCCT Mantis bug tracker
(http://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug) or elsewhere.
1. If you are building FreeImage 3.15.x you can skip this step.
Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:
In line 60 insert the following:
#include string.h
Modify FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp:
In line 320 replace:
SwapShort(value);
with:
SwapShort(&value);
2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR).
cd FREEIMAGE_SRC_DIR
3. Run the building process
make
4. Run the installation process
1. If you have permissions to write to /usr/local/include and /usr/local/lib directories then run the following command:
make install
2. If you do not have permissions to write to /usr/include and /usr/lib directories
then you need to modify the file FREEIMAGE_SRC_DIR/Makefile.osx:
Change line 49 from:   
PREFIX ?= /usr/local
to:
PREFIX ?= $(PREFIX)
  Change lines 65-69 from:
install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
ranlib -sf $(INSTALLDIR)/$(STATICLIB)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
to:
install -d $(INCDIR) $(INSTALLDIR)
install -m 755 $(HEADER) $(INCDIR)
install -m 755 $(STATICLIB) $(INSTALLDIR)
install -m 755 $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
Then run the installation process by the following command:
make PREFIX=FREEIMAGE_INSTALL_DIR install
5. Clean the temporary files
make clean

View File

@@ -0,0 +1,311 @@
 Building 3rd-party libraries on Windows {#dev_guides__building_3rdparty_windows}
==============================================
@tableofcontents
@section dev_guides__building_3rdparty_win_1 Introduction
This document presents guidelines for building third-party products
used by Open CASCADE Technology (OCCT) and samples on Windows platform.
This guide assumfamiliar with MS Visual Studio / Visual C++.
You need to use the same version of MS Visual Studio for building
all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries.
The links for downloading the third-party products are available on the web site
of OPEN CASCADE SAS at http://www.opencascade.org/getocc/require/.
There are two types of third-party products which are used by OCCT:
* Mandatory products: Tcl/Tk 8.5 - 8.6 and  FreeType 2.4.10 - 2.4.11
* Optional products: TBB 3.x - 4.x, gl2ps 1.3.5 - 1.3.8, FreeImage 3.14.1 -3.15.4
It is recommended to create a separate new folder on your workstation where
you will unpack the downloaded archives of the third-party products,
and where you will build these products (for example, *c:\\occ3rdparty*).
Further in this document, this folder is referred to as *3rdparty*.
@section dev_guides__building_3rdparty_win_2 Building Mandatory Third-party Products
@subsection dev_guides__building_3rdparty_win_2_1 Tcl/Tk
Tcl/Tk is required for DRAW test harness.We recommend installing a binary distribution that could
be downloaded from http://www.activestate.com/activetcl.
Go to \"Free Downloads\" and pick the version of the Install Wizard
that matches your target platform 32 bit (x86) or 64 bit (x64).
The version of Visual Studio you use is irrelevant when choosing the Install Wizard.
Run the Install Wizard you downloaded, and install Tcl/Tk products
* to 3rdparty\\tcltk-win32 folder (for 32-bit platform) or
* to 3rdparty\\tcltk-win64 folder (for 64-bit platform).
Further in this document, this folder is referred to as *tcltk*.
@subsection dev_guides__building_3rdparty_win_2_2 FreeType
FreeType is required for display of text in 3D viewer.
You can download its sources from http://sourceforge.net/projects/freetype/files/
The building process is the following:
1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder.
As a result, you should have a folder named for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*.
2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio, where vc20xx stands for the version of Visual Studio you are using.
3. Select a configuration to build: either Debug or Release.
4. Build the *freetype* project.
As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder.
5. If you are building for 64 bit platform, start the Configuration Manager (Build - Configuration Manager),
and add *x64* platform to the solution configuration by copying the settings from Win32 platform:
@image html /dev_guides/building/3rdparty/images/3rdparty_image001.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image001.png
Update the value of the Output File for x64 configuration:
@image html /dev_guides/building/3rdparty/images/3rdparty_image003.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image003.png
Build the *freetype* project.
As a result, you should obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder.
If you want to build freetype as a dynamic library (.dll) follow items 6, 7 and 8 of this list.
6. Open Project-Properties-Configuration Properties-General and change option 'Configuration Type' to \"*Dynamic Library (.dll)*\".
7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*:
in line 255, uncomment the definition of macro FT_EXPORT and change it as follows:
#define FT_EXPORT(x) __declspec(dllexport) x
8. Build the *freetype* project.
As a result, you should obtain import library (.lib) and dynamic library (.dll)
files in *freetype \\objs\\release or \\objs\\debug folders.*
If you are building for a 64 bit platform, follow item 5 of this list.
In order to facilitate use of the FreeType libraries in OCCT with minimal adjustment of its build procedures,
it is recommended to copy the include files and libraries of FreeType to a separate folder, named according to the pattern:
*freetype-compiler-bitness-building mode*
where
* compiler is vc8 or vc9 or vc10 or vc11;
* bitness is 32 or 64;
* building mode is opt (for Release) or deb (for Debug)
The include subfolder should be copied as is, while libraries should be renamed to
*freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories
*lib *and *bin*, respectively. If Debug configuration is built,
the Debug libraries should be put in subdirectories *libd* and *bind*.
@section dev_guides__building_3rdparty_win_3 Building Optional Third-party Products
@subsection dev_guides__building_3rdparty_win_3_1 TBB
This third-party product is installed with binaries
from the archive that can be downloaded from http://threadingbuildingblocks.org/.
Go to \"Downloads page\", find the release version you need (e.g. tbb30_018oss) and pick the archive for Windows platform.
Unpack the downloaded archive of TBB product into the *3rdparty* folder.
Further in this document, this folder is referred to as *tbb*.
@subsection dev_guides__building_3rdparty_win_3_2 gl2ps
This third-party product should be built as a dynamically loadable library (dll file).
You can download its sources from http://geuz.org/gl2ps/src/
The building process is the following:
1. Unpack the downloaded archive of gl2ps product (e.g. *gl2ps-1.3.5.tgz*) into the *3rdparty* folder.
As a result, you should have a folder named for example, *3rdparty\\gl2ps-1.3.5-source*.
Rename it according to the rule: gl2ps-platform-compiler-building mode, where
* platform is win32 or win64;
* compiler is vc8 or vc9 or vc10;
* building mode - opt (for release) or deb (for debug)
Further in this document, this folder is referred to as *gl2ps*.
2. Download (from http://www.cmake.org/cmake/resources/software.html)
and install the *CMake* build system.
3. Edit the file *gl2ps\\CMakeLists.txt*.
After line 113 in CMakeLists.txt:
set_target_properties(shared PROPERTIES COMPILE_FLAGS \"-DGL2PSDLL -DGL2PSDLL_EXPORTS\")
add the following line:
add_definitions(-D_USE_MATH_DEFINES)
Attention: If cygwin was installed on your computer make sure that there is no path
to the latter in the PATH variable in order to avoid possible conflicts during the configuration.
4. Launch CMake (cmake-gui.exe) using the Program menu.
In CMake:
* Define where the source code is.
This path must point to *gl2ps* folder.
* Define where to build the binaries.
This path must point to the folder where generated gl2ps project binaries will be placed
(for example, *gl2ps\\bin*).
Further in this document, this folder is referred to as *gl2ps_bin*.
* Press the \"Configure\" button.
@image html /dev_guides/building/3rdparty/images/3rdparty_image004.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image004.png
* Select the generator (the compiler and the target platform - 32 or 64 bit) in the pop-up window.
@image html /dev_guides/building/3rdparty/images/3rdparty_image005.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image005.png
* Then press the \"Finish\" button to return to the main CMake window.
Expand the ENABLE group and uncheck ENABLE_PNG and ENABLE_ZLIB check boxes.
@image html /dev_guides/building/3rdparty/images/3rdparty_image006.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image006.png
* Expand the CMAKE group and define CMAKE_INSTALL_PREFIX
(path where you want to install the build results, for example, *c:\\occ3rdparty\\gl2ps-1.3.5*).
@image html /dev_guides/building/3rdparty/images/3rdparty_image007.png
@image latex /dev_guides/building/3rdparty/images/3rdparty_image007.png
* Press the \"Configure\" button again, and then the \"Generate\" button in order to generate
Visual Studio projects. After completion, close CMake application.
5. Open the solution file *gl2ps_bin\\gl2ps.sln* in Visual Studio.
* Select a configuration to build
* Choose \"*Release*\" if you are building Release binaries.
* Choose \"*Debug*\" if you are building Debug binaries.
* Select a platform to build.
* Choose \"*Win32*\" if you are building for a 32 bit platform.
* Choose \"*x64*\" if you are building for a 64 bit platform.
* Build the solution.
* Build the *INSTALL* project.
As a result, you should have the installed gl2ps product in the *CMAKE_INSTALL_PREFIX* path.
@subsection dev_guides__building_3rdparty_win_3_3 FreeImage
This third-party product should be built as a dynamically loadable library (.dll file).
You can download its sources from
http://sourceforge.net/projects/freeimage/files/Source%20Distribution/
The building process is the following:
1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder.
As a result, you should have a folder named *3rdparty\\FreeImage*.
Rename it according to the rule: freeimage-platform-compiler-building mode, where
* platform is win32 or win64;
* compiler is vc8 or vc9 or vc10 or vc11;
* building mode is opt (for release) or deb (for debug)
Further in this document, this folder is referred to as *freeimage*.
2. Open the solution file *freeimage\\FreeImage.*.sln* in Visual Studio that corresponds to the version of Visual Studio you use.
Since the version of Visual Studio you use is higher than VC++ 2008, apply conversion of the workspace.
Such conversion should be suggested automatically by Visual Studio.
3. Select a configuration to build.
- Choose \" *Release* \" if you are building Release binaries.
- Choose \" *Debug* \" if you are building Debug binaries.
*Note:*
If you want to build a debug version of FreeImage binaries then you must rename
the following files for projects FreeImage and FreeimagePlus:
Project-Properties-Configuration Properties-Linker-General-Output File
from FreeImage*d*.dll to FreeImage.dll
from FreeImagePlus*d*.dll to FreeImagePlus.dll
Project-Properties-Configuration Properties-Linker-Debugging-Generate Program Database File
from FreeImage*d*.pdb to FreeImage.pdb
from FreeImagePlus*d*.pdb to FreeImagePlus.pdb
Project-Properties-Configuration Properties-Linker-Advanced-Import Library
from FreeImage*d*.lib to FreeImage.lib
from FreeImagePlus*d*.lib to FreeImagePlus.lib
Project-Properties-Configuration Properties-Build Events-Post-Build Event-Comand Line
from FreeImage*d*.dll to FreeImage.dll
from FreeImage*d*.lib to FreeImage.lib
from FreeImagePlus*d*.dll to FreeImagePlus.dll
from FreeImagePlus*d*.lib to FreeImagePlus.lib
Additionally, for project FreeImagePlus rename:
Project-Properties-Configuration Properties-Linker-Input-Additional Dependencies
from FreeImage*d*.lib to FreeImage.lib
4. Select a platform to build.
- Choose \" *Win32* \" if you are building for a 32 bit platform.
- Choose \" *x64* \" if you are building for a 64 bit platform.
5. Start the building process.
As a result, you should have the library files of FreeImage product in the
*freeimage\\Dist* folder (FreeImage.dll and FreeImage.lib files) and in the
*freeimage\\Wrapper\\FreeImagePlus\\dist* folder (FreeImagePlus.dll and
FreeImagePlus.lib files).
@subsection dev_guides__building_3rdparty_win_opencl OpenCL ICD Loader
If you have OpenCL SDK (one provided by Apple, AMD, NVIDIA, Intel, or other
vendor) installed on your system, you should find OpenCL headers and
libraries required for building OCCT inside that SDK.
Alternatively, you can use OpenCL ICD (Installable Client Driver) Loader
provided by Khronos group. The following describes steps used to build OpenCL
ICD Loader version 1.2.11.0.
1. Download OpenCL ICD Loader sources archive and OpenCL header files from
Khronos OpenCL Registry
http://www.khronos.org/registry/cl/
2. Unpack the archive and put headers in **inc/CL** sub-folder
3. Use CMake to generate VS projects for building the library:
- Start CMake-GUI and select OpenCL ICD Loader folder as source path,
and the folder of your choice for VS project and intermediate build data
- Click Generate
- Select VS version to be used (among the one you have installed; we
recommend using VS 2010), and architecture (32- or 64-bit)
4. Open solution **OPENCL_ICD_LOADER.sln** generated in the build folder.
Though not strictly necessary, we recommend making two changes in generated
projects:
- Add file **OpenCL.rc** to project OpenCL, to have version and Khronos
copyright correctly embedded in DLL
- In properties of OpenCL project, on "C/C++ / Code Generation" page,
for Release configuration, change "Runtime library" to "Multi-threaded
(/MT)", to avoid dependency on run-time DLL.
5. Build project OpenCL in Release mode
6. Create installation folder for OpenCL IDL Loader package and put there:
- OpenCL header files in **include/CL** subfolder
- OpenCL.dll (generated in **bin/Release** subfolder of source package)
in **bin** subfolder
- OpenCL.lib (generated in **Release** subfolder of build directory)
in **lib** subfolder

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

View File

@@ -0,0 +1,71 @@
Building with Automake {#dev_guides__building__automake}
======================
This file describes steps to build OCCT libraries from complete source
archive on Linux with GNU build system (Autotools).
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See paragraph 1 \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install required third-party libraries; see paragraph 1 of
\ref dev_guides__building for instructions.
Note that during compilation by makefiles on some Linux OS on a station with
NVIDIA video card you may experience problems because the installation
procedure of NVIDIA video driver removes library libGL.so included in package
libMesaGL from directory /usr/X11R6/lib and places this library libGL.so in
directory /usr/lib. However, libtool expects to find the library in directory
/usr/X11R6/lib, which causes compilation crash (See /usr/X11R6/lib/libGLU.la).
To prevent this, suggest making links:
ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so
ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la
1.In OCCT root folder, launch build_configure script
This will generate files configure and Makefile.in for your system.
2.Go to the directory where OCCT will be built, and run configure to generate
makefiles.
$CASROOT/configure \<FLAGS\>
Where \<FLAGS\> is a set of options.
The following flags are mandatory:
* --with-tcl= defines location of tclConfig.sh
* --with-tk= defines location of tkConfig.sh
* --with-freetype= defines location of installed FreeType product
* --prefix= defines location for the installation of OCCT binaries
Additional flags:
* --with-gl2ps= defines location of installed gl2ps product
* --with-freeimage= defines location of installed FreeImage product
* --with-tbb-include= defines location of tbb.h
* --with-tbb-library= defines location of libtbb.so
* --with-opencl-include= defines location of cl.h
* --with-opencl-library= defines location of libOpenCL.so
* --enable-debug= yes: includes debug information, no: does not include debug information
* --enable-production= yes: switches code optimization, no: switches off code optimization
* --disable-draw - allows OCCT building without Draw.
If location of FreeImage, TBB, gl2ps or OpenCL is not specified, OCCT will be
built without these optional libraries.
Attention: 64-bit platforms are detected automatically.
Example:
> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-opencl-include=/PRODUCTS/opencl-icd-1.2.11.0/include --with-opencl-library=/PRODUCTS/opencl-icd-1.2.11.0/lib
3.If configure exits successfully, you can build OCCT with make command.
> make -j8 install
To start DRAW, launch
> draw.sh

View File

@@ -0,0 +1,32 @@
Building OCCT from sources {#dev_guides__building}
=========
In order to build OCCT libraries from these sources for use in your program,
you need to:
1. Make sure you have all required third-party libraries installed (check
software requirements in \ref OCCT_OVW_SECTION_5 "Overview").
See the following documents for short guide to installation of
third-party libraries on different platforms:
- \subpage dev_guides__building_3rdparty_windows
- \subpage dev_guides__building_3rdparty_linux
- \subpage dev_guides__building_3rdparty_osx
2. If you use bare OCCT sources from Git repository or made some changes affecting
CDL files or dependencies of OCCT toolkits, you need to update header files generated
from \ref dev_guides__cdl "CDL", and regenerate build scripts for your environment using WOK.
See \subpage dev_guides__building__wok for details.
Skip to step 3 if you use complete source package (e.g. official OCCT
release) without changes in CDL.
3. Build using your preferred build tool.
- \subpage dev_guides__building__automake "Building on Linux with Autotools"
- \subpage dev_guides__building__cmake "Building with CMake (cross-platform)"
- \subpage dev_guides__building__code_blocks "Building on Mac OS X with Code::Blocks"
- \subpage dev_guides__building__msvc "Building on Windows with MS Visual Studio"
- \subpage dev_guides__building__xcode "Building on Mac OS X with Xcode"
The current version of OCCT can be consulted in the file src/Standard/Standard_Version.hxx

View File

@@ -0,0 +1,232 @@
Building with CMake {#dev_guides__building__cmake}
===================
@tableofcontents
This file describes steps to build OCCT libraries from complete source package
with CMake. CMake is free software that can create GNU Makefiles, KDevelop,
XCode, and Visual Studio project files. Version 2.6 or above of CMake is
required.
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install required third-party libraries; see
instructions for your platform in @ref dev_guides__building.
## Decide on location of build and install directories.
The build directory is the one where intermediate files will be created (projects / makefiles, objects, binaries).
The install directory is the one where binaries will be installed after build,
along with header files and resources required for OCCT use in applications.
OCCT CMake scripts assume use of separate build and one install directories
for each configuration (Debug or Release).
It is recommended to separate build and install directories from OCCT source directory, for example:
/user/home/occt/ - sources
/user/home/tmp/occt-build-release - intermediate files (release)
/user/home/occt-install-release - installed binaries (release)
## CMake usage
Run CMake indicating path to OCCT sources ($CASROOT; in previous example
CASROOT equal to /user/home/occt in lin case, and d:/occt in windows case)
and selected build directory (in prev example build directory is
/user/home/tmp/occt-build-release).
It is recommended to use GUI tools provided by CMake: cmake-gui on Windows
and Mac, ccmake on Linux.
### Windows:
@image html /dev_guides/building/cmake/images/cmake_image001.png
@image latex /dev_guides/building/cmake/images/cmake_image001.png
* Specify "main" CMakelists.txt meta-project location by clicking Browse Source (e.g., $CASROOT)
* Specify location (build folder) for Cmake generated project files by clicking Browse Build (e.g., d:/occt/build/win32-vc9-debug) (each cmake configuration of the project uses a specific build directory and a specific directory for installed files. It is recommended to compose names of the binary and install directory from system, bitness, compiler and build type.)
* Configure opens the window with a drop-down list of generators supported by CMake project. Select the required generator (e.g., Visual Studio 2008) and click Finish)
@image html /dev_guides/building/cmake/images/cmake_image002.png
@image latex /dev_guides/building/cmake/images/cmake_image002.png
### Linux:
In the console, change to the build directory and call ccmake with the path to the source directory of the project:
> cd ~/occt/build/debug
> ccmake ~/occt
@image html /dev_guides/building/cmake/images/cmake_image003.png
@image latex /dev_guides/building/cmake/images/cmake_image003.png
Press "c" to configure.
### Mac OS:
Use cmake-gui (Applications -> CMake 2.8-10.app) to generate project files for the chosen build environment (e.g., XCode).
@image html /dev_guides/building/cmake/images/cmake_image004.png
@image latex /dev_guides/building/cmake/images/cmake_image004.png
## OCCT Configuration
The error message which appears at the end of configuration process, informs you about the required variables
which need to be defined. This error will appear until all required variables are defined correctly.
Note: In cmake-gui there is "grouped" option, which groups variables with a common prefix.
### Selection of components to be built
The variables with "BUILD_" prefix allow specifying OCCT components and
configuration to be built:
* BUILD_CONFIGURATION - defines configuration to be built (Release by default).
* BUILD_<MODULE> - specify whether corresponding OCCT module should be
built (all toolkits). Note that even if whole module is not
selected for build, its toolkits used by other toolkits
selected for build will be included automatically.
* BUILD_TOOLKITS - allows including additional toolkits from non-selected
modules (should be list of toolkit names separated by a
space or a semicolon).
* BUILD_SAMPLES - specify whether OCCT MFC samples should be built.
Check variables with "USE_" prefix (USE_FREEIMAGE, USE_GL2PS, USE_TBB, and
USE_OPENCL) if you want to enable use of the corresponding optional 3rd-party
library.
### 3rd-party configuration
### 3rd-party configuration (The variables with 3RDPARTY_ prefix)
If you have 3rd-party libraries in a non-default location
(e.g., on Windows, binaries downloaded from "http://www.opencascade.org/getocc/download/3rdparty/"),
specify 3RDPARTY_DIR variable that points to the folders of 3rdparty products (some or all).
At the next configuration 3rd-party product paths stored in 3RDPARTY_\<PRODUCT\>_DIR variable
will be searched for in 3RDPARTY_DIR directory. If the structure of 3RDPARTY_DIR directory
is the same as adopted in the OCCT, the directory will contain product dir, lib and header files.
Press "Configure" ("c" key for ccmake).
The result of the 3rdparty product search will be recorded in the corresponding variables:
* 3RDPARTY_\<PRODUCT\>_DIR - path to the product directory (with directory name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32)
* 3RDPARTY_\<PRODUCT\>_LIBRARY - path to the .lib libraries (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/lib/tcl85.lib). In non-windows case, this variable is the same as 3RDPARTY_\<PRODUCT\>_DLL.
* 3RDPARTY_\<PRODUCT\>_INCLUDE - path to the include directory that contains the required header file (with "include" name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/include including tcl.h)
* 3RDPARTY_\<PRODUCT\>_DLL - path to the .dll/.so/.dylib library (with the library name) (e.g., D:/3rdparty/Tcl-8.5.12.0-32/bin/tcl85.dll)
The search process is as follows:
1. Common path: 3RDPARTY_DIR
2. Path to particular 3rd-party library: 3RDPARTY_\<PRODUCT\>_DIR
3. Paths to headers and binaries:
1. 3RDPARTY_\<PRODUCT\>_INCLUDE
2. 3RDPARTY_\<PRODUCT\>_LIBRARY
3. 3RDPARTY_\<PRODUCT\>_DLL
If a variable of any level is not defined (empty or \<variable name\>-NOTFOUND)
and the upper level variable is defined, the content of the non-defined variable
will be searched for at the next configuration step. If search process in level 3
does not find the required files, it searches in default places also.
**Note**: the names of searched libraries and header files are hardcoded.
Freetype search process tries to find ft2build.h file in 3RDPARTY_FREETYPE INCLUDE dir
and after that adds "3RDPARTY_FREETYPE_INCLUDE /freetype2" path to common includes if it exists.
Important: If BUILD_CONFIGURATION variable is changed - at the next configuration
3RDPARTY_ variables will be replaced by the search process result, except for the 3RDPARTY_DIR variable.
*Note*: CMake will produce an error after the configuration step until all required variables are defined correctly.
If the search result (include path, or library path, or dll path) does not meet your expectations -
you can change 3RDPARTY_\<PRODUCT\>_DIR variable, clear (if they are not empty)
3RDPARTY_\<PRODUCT\>_DLL, 3RDPARTY_\<PRODUCT\>_INCLUDE_DIR and 3RDPARTY_\<PRODUCT\>_LIBRARY variables
(or clear one of them) and run the configuration process again.
At this time the search will be performed in the new identified directory
and the result will be recorded to empty variables (non-empty variables will not be replaced).
For example, (Linux case) 3RDPARTY_FREETYPE_DIR variable
/PRODUCTS/maintenance/Mandriva2010/freetype-2.3.7
can be changed to
/PRODUCTS/maintenance/Mandriva2010/freetype-2.4.10
and the related variables: 3RDPARTY_FREETYPE_DLL, 3RDPARTY_FREETYPE_INCLUDE_DIR and 3RDPARTY_FREETYPE_LIBRARY will be cleared.
@image html /dev_guides/building/cmake/images/cmake_image005.png
@image latex /dev_guides/building/cmake/images/cmake_image005.png
During configuration process the cleaned variables will be filled with new found values.
###The variables with INSTALL_ prefix:
Define in INSTALL_DIR variable the path where will be placed built OCCT files (libraries, executables and headers).
If INSTALL_\<PRODUCT\> variable is checked - 3rd-party products will be copied to the install directory.
#### At the end of the configuration process "configuring done" message will be shown and the generation process can be started.
## OCCT Generation
This will create makefiles or project files for your build system.
### Windows
Click Generate button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g., d:/occt/build/win32-vc9-release).
### Linux
When the configuration is complete, start the generation process by pressing "g".
@image html /dev_guides/building/cmake/images/cmake_image006.png
@image latex /dev_guides/building/cmake/images/cmake_image006.png
### Mac OS X
Click Generate button and wait until the generation process is finished.
Then the project files will appear in the build folder (e.g., /Developer/occt/build/XCode).
## OCCT Building
The install folder contains bin, inc, lib and res folders and a script to run DRAWEXE (draw.bat or draw.sh).
"bin" contains executables, DLL (Windows) style shared libraries and pdb-files in OCCT debug version,.
"lib" contains the import parts of DLL libraries.
"inc" contains header files.
"res" contains all required source files for OCCT.
### Windows (Visual studio)
Go to the build folder, start the Visual Studio solution (OCCT.sln) and build it by clicking Build - Build Solution.
When the building process finished, build the INSTALL project
(by default the build solution process skips the building of the INSTALL project) to move the above files to INSTALL_DIR.
For this in the solution explorer right click on the INSTALL project and select Project Only - Build Only INSTALL.
### Linux (make)
Change directory to binary dir and run make command
> make
To copy all libraries, executables and chosen 3rd-party libraries run "make" command with "install" argument
> make install
This command will move the above files to INSTALL_DIR.
### Mac OS X (XCode)
Go to the build folder, start the XCode solution (OCCT.xcodeproj)
and build it by clicking Build -> Build.
Please notice that XCode may have worst responsibility to user actions
due to sources processing at first start.
When the building process finished, build the INSTALL project
(by default the build solution process skips the building of the INSTALL project)
to move the above files to INSTALL_DIR.
Notice that env.sh (configure PATH and DYLD_LIBRARY_PATH environment variables
as well as Draw Harness extra variables) and draw.sh (to launch DRAWEXE) will be created in target directory.
## OCCT project debugging for Visual Studio
Run OCCT.bat from the build directory to start Visual Studio with required environment for debugging.

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -0,0 +1,64 @@
Building with Code::Blocks on Mac OS X {#dev_guides__building__code_blocks}
======================================
This file describes steps to build OCCT libraries from complete source package
on Mac OS X with Code::Blocks.
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for details.
1. Add paths to the mandatory 3rd-party products (Tcl/Tk and FreeType) in file
custom.sh located in \<OCCT_ROOT_DIR\>. For this:
1.1. Add paths to the includes in variable "CSF_OPT_INC";
1.2. Add paths to the binary libraries in variable "CSF_OPT_LIB64";
All paths should be separated by ":" symbol.
2. Add paths to the optional 3rd-party libraries (TBB, gl2ps and FreeImage)
in the aforementioned environment variables "CSF_OPT_INC" and
"CSF_OPT_LIB64" from file custom.sh.
If you want to build OCCT without the optional libraries perform the
following steps:
2.1 Disable unnecessary library in custom.sh by setting the corresponding
variable HAVE_\<LIBRARY_NAME\> to "false".
export HAVE_GL2PS=false
2.2 Remove this library from Linker settings in Code::Blocks for each project
that uses it: right click on the required project, choose "Build options",
go to "Linker settings" tab in the opened window , select unnecessary
libraries and click "Delete" button.
3. Open Terminal application
4. Enter \<OCCT_ROOT_DIR\>:
cd \<OCCT_ROOT_DIR\>
5. To start Code::Blocks, run the command /codeblocks.sh
6. To build all toolkits, click "Build->Build workspace" in the menu bar.
To start DRAWEXE, which has been built with Code::Blocks on Mac OS X, perform
the following steps:
1. Open Terminal application
2. Enter \<OCCT_ROOT_DIR\>:
cd \<OCCT_ROOT_DIR\>
3. Run script
./draw_cbp.sh cbp [d]
Option "d" is used if OCCT has been built in Debug mode.

View File

@@ -0,0 +1,31 @@
Building with MS Visual C++ {#dev_guides__building__msvc}
===========================
This file describes steps to build OCCT libraries from complete source
archive on Windows with MS Visual C++.
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for instructions.
1. Edit file custom.bat to define environment:
- VCVER - version of Visual Studio (vc8, vc9, vc10, vc11 or vc12),
and relevant VCVARS path
- ARCH - architecture (32 or 64), affects only PATH variable for execution
- HAVE_* - flags to enable or disable use of optional third-party products
- CSF_OPT_* - paths to search for includes and binaries of all used
third-party products
2. Launch msvc.bat to start Visual Studio with all necessary environment
variables defined.
Note: the MSVC project files are located in folders adm\\msvc\\vc[9-12].
Binaries are produced in win32 or win64 folders.
3. Build with Visual Studio
To start DRAW, launch draw.bat.

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@@ -0,0 +1,162 @@
Using WOK {#dev_guides__building__wok}
=========
@tableofcontents
\ref dev_guides__wok "WOK" is a legacy build environment for Open CASCADE Technology.
It is required for generation of header files for classes defined with
@ref dev_guides__cdl "CDL" ("Cascade Definition Language").
Also tools for generation of project files for other build systems, and OCCT
documentation, are integrated to WOK.
WOK thus is needed in the following situations:
- Building from OCCT sources from Git repository (do not contain generated files)
- Building after some changes made in CDL files
Before installing and using WOK, make sure that you have installed a compiler
(it is assumed that it is Visual Studio on Windows or gcc on Linux and MacOS)
and third-party components required for building OCCT.
@section wok1 Installing WOK
Download the latest version of binary distribution WOK from http://dev.opencascade.org/index.php?q=home/resources
@subsection wok11 Windows
Run the installer. You will be prompted to read and accept the OCCT Public License to proceed:
@image html /dev_guides/building/wok/images/wok_image001.png
@image latex /dev_guides/building/wok/images/wok_image001.png
Click Next and proceed with the installation.
At the end of the installation you will be prompted to specify the version and the location of Visual Studio to be used, and the location of third-party libraries:
@image html /dev_guides/building/wok/images/wok_image002.png
@image latex /dev_guides/building/wok/images/wok_image002.png
You can change these settings at any time later. For this click on the item "Customize environment (GUI tool)" in the WOK group in the Windows Start menu.
The shortcuts from this group provide two ways to run WOK:
* In command prompt window ("WOK TCL shell").
* In Emacs editor ("WOK Emacs"). Using Emacs is convenient if you need to work within WOK environment.
By default WOK installer creates a WOK factory with name "LOC" within workshop "dev" (WOK path :LOC:dev).
@subsection wok12 Linux
* Unpack the .tgz archive containing WOK distributive into an installation directory \<WOK_INSTALL_DIR\>.
* Perform the following commands assuming that you have unpacked WOK distributive archive into \<WOK_INSTALL_DIR\>:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_confgui.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Define all necessary paths to third-party products in the dialog window:
@image html /dev_guides/building/wok/images/wok_image003.png
@image latex /dev_guides/building/wok/images/wok_image003.png
* Run the following commands to create WOK LOC factory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_init.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Your installation procedure is over. To run WOK use one the following commands:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_emacs.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
or
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_tclsh.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsection wok13 Mac OS X
* In the Finder double click on wokSetup.dmg file. This will open a new window. Drag and drop "wokSetup" folder from this window at the location in the Finder where you want to install WOK, i.e. \<WOK_INSTALL_DIR\>.
* Browse in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokConfig. This will open a window with additional search path settings. Define all necessary paths to third-party products in the dialog window:
@image html /dev_guides/building/wok/images/wok_image004.png
@image latex /dev_guides/building/wok/images/wok_image004.png
* Run the following commands to create WOK LOC factory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
cd \<WOK_INSTALL_DIR\>/site
wok_init.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Your installation procedure is over. To run WOK in Emacs navigate in the Finder to the folder \<WOK_INSTALL_DIR\>/site and double click on WokEmacs.
@section wok2 Initialization of Workbench
To start working with OCCT, clone the OCCT Git repository from the server (see http://dev.opencascade.org/index.php?q=home/resources for details) or unpack the source archive.
Then create a WOK workbench (command wcreate) setting its Home to the directory, where the repository is created ($CASROOT variable). The workbench should have the same name as that directory.
For example, assuming that OCCT repository has been cloned into D:/occt folder:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wcreate occt -DHome=D:/occt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: $CASROOT is equal to D:/occt now
Then you can work with this workbench using normal WOK functionality (wprocess, umake, etc.; see WOK User's Guide for details) or use it only for generation of derived sources and project files, and build OCCT with Visual Studio on Windows or make command on Linux, as described below.
@section wok3 Generation of building projects
Use command wgenproj in WOK to generate derived headers, source and building projects files:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wokcd occt
LOC:dev:occt> wgenproj [ -target=<TARGET> ] [ -no_wprocess ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TARGET:
* vc8 - Visual Studio 2005
* vc9 - Visual Studio 2008
* vc10 - Visual Studio 2010
* vc11 - Visual Studio 2012
* cbp - CodeBlocks
* cmake - CMake
* amk - AutoMake
* xcd - Xcode
-no_wprocess - skip generation of derived headers and source files
Note that this command takes several minutes to complete at the first call.
Re-execute this step to generate derived headers, source and building projects files if some CDL files in OCCT have been modified (either by you directly, or due to updates in the repository). Note that in some cases WOK may fail to update correctly; in such case remove sub-directories drv and .adm and repeat the command.
To regenerate derived headers and source files without regeneration of projects use command:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
LOC:dev> wokcd occt
LOC:dev:occt> wprocess -DGroups=Src,Xcpp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The generated building project has been placed into $CASROOT/adm folder:
* for vc8 - $CASROOT/adm/msvc/vc8
* for vc9 - $CASROOT/adm/msvc/vc9
* for vc10 - $CASROOT/adm/msvc/vc10
* for vc11 - $CASROOT/adm/msvc/vc11
* for cbp - $CASROOT/adm/\<OS\>/cbp
* for cmake - $CASROOT/adm/cmake
* for amk - $CASROOT/adm/lin/amk
* xcd - $CASROOT/adm/\<OS\>/xcd
@section wok4 Generation of documentation
Use command wgendoc in WOK to generate reference documentation:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
:LOC:dev> wokcd occt
:LOC:dev:occt> wgendoc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following options can be used:
* -wb=< workbench name > the name of OCCT workbench (the current one by default);
* -m=< list of modules > the list of modules that will be contained in the documentation;
* -outdir=< path > the output directory for the documentation;
* -chm the option to generate CHM file;
* -hhc=< path > the path to HTML Help Compiler (hhc.exe) or equivalent;
* -qthelp=< path > the option to generate Qt Help file, it is necessary to specify the path to qthelpgenerator executable;
* -doxygen=< path > the path to Doxygen executable
* -dot=< path > the path to GraphViz dot executable

View File

@@ -0,0 +1,71 @@
Building with Xcode {#dev_guides__building__xcode}
===================
This file describes steps to build OCCT libraries from complete source package
on Mac OS X with Xcode.
If you are building OCCT from bare sources (as in Git repository), or do some
changes affecting CDL files, you need to use WOK to re-generate header files
and build scripts / projects. See \ref dev_guides__building__wok for instructions.
Before building OCCT, you need to install required third-party libraries; see
paragraph 1 of \ref dev_guides__building for details.
1. Add paths to the mandatory 3rd-party products (Tcl/Tk and FreeType)
in file custom.sh located in \<OCCT_ROOT_DIR\>. For this:
1.1. Add paths to the includes in variable "CSF_OPT_INC";
1.2. Add paths to the binary libraries in variable "CSF_OPT_LIB64";
All paths should be separated by ":" symbol.
2. Add paths to the optional 3rd-party libraries (TBB, gl2ps and FreeImage)
in the aforementioned environment variables "CSF_OPT_INC" and
"CSF_OPT_LIB64" from file custom.sh.
If you want to build OCCT without the optional libraries perform the
following steps:
2.1 Disable unnecessary library in custom.sh by setting the corresponding
variable HAVE_<LIBRARY_NAME> to "false".
export HAVE_GL2PS=false
2.2 Remove this library from Project navigator in Xcode for each project that
uses it: choose the required project, right click on the unnecessary
library and select "Delete" button.
3. Open Terminal application.
4. Enter \<OCCT_ROOT_DIR\>:
cd \<OCCT_ROOT_DIR\>
5. To start Xcode, run the command /xcode.sh
6. To build a certain toolkit, select it in "Scheme" drop-down list in Xcode
toolbar, press "Product" in the menu and click "Build" button.
To build the entire OCCT, create a new empty project (select "File ->
New -> Project -> "Empty project" in the menu. Input the project name,
e.g. "OCCT", click "Next" and "Create" buttons). Drag and drop the "OCCT"
folder in the created "OCCT" project in the Project navigator. Select
"File -> New -> Target -> Aggregate" in the menu. Enter the project name
(e.g. "OCCT") and click "Finish". The "Build Phases" tab will open.
Click "+" button to add the necessary toolkits to the target project.
It is possible to select all toolkits by pressing "Command+A" combination.
To start DRAWEXE, which has been built with Xcode on Mac OS X, perform the following steps:
1. Open Terminal application
2. Enter \<OCCT_ROOT_DIR\>:
cd \<OCCT_ROOT_DIR\>
3. Run script
./draw_cbp.sh xcd [d]
Option "d" is used if OCCT has been built in Debug mode.

1846
dox/dev_guides/cdl/cdl.md Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,916 @@
Coding Rules {#dev_guides__coding_rules}
======================================
@tableofcontents
@section OCCT_RULES_SECTION_1 Introduction
The purpose of this document is to define and formalize one style of programming for developers working on Open CASCADE Technology.
The establishment of a common style facilitates understanding and maintaining code developed by more than one programmer as well as making it easier for several people to co-operate in the development of the same framework.
In addition, following a common programming style enables the construction of tools that incorporate knowledge of these standards to help in the programming task.
Using a consistent coding style throughout a particular module, package, or project is important because it allows people other than the author, and the author himself, to easily understand and (hopefully) maintain the code.
Most programming styles are somewhat arbitrary, and this one is no exception. Some guidelines have been excerpted from the public domain of widely accepted practices.
This suggests that the guide will continue to evolve over time as new ideas and enhancements are added.
@subsection OCCT_RULES_SECTION_1_1 Scope of the rules in this document
Rules in this document was written for C++ code.
However, with minor exceptions due to language restrictions, them should be applied to any sources in Open CASCADE Technology framework, including:
- C/C++
- GLSL programs
- OpenCL kernels
- TCL scripts and test cases
@section OCCT_RULES_SECTION_2 Naming Conventions
@subsection OCCT_RULES_SECTION_2_1 General naming rules
The names considered in this section are mainly those which compound the interface to Open CASCADE Technology libraries as well as source code itself.
### International language [MANDATORY]
All names are composed of English words and their abbreviations.
Open CASCADE Technology is an open source available for international community.
### Suggestive names
Names should be suggestive or, at least, contain a suggestive part.
Currently, there is no exact rule that would define how to generate suggestive names. However, usually names given to toolkits, packages, classes and methods are suggestive. Here are several examples:
- Packages containing words Geom or Geom2d in their names are related to geometrical data and operations.
- Packages containing words TopoDS or BRep in their names are related to topological data and operations.
- In OCAF, packages that define transient, persistent data classes and drivers to map between them, have similar names prefixed by 'T', 'P', and 'M' correspondingly (e.g. TDocStd, PDocStd, MDocStd).
- Packages ending with ...Test define Draw Harness plugins.
- Methods starting with Get... and Set... are usually responsible for (accordingly) retrieving/storing some data.
### Related names
Names that define logically connected functionality should have the same prefix (start with the same letters) or, at least, have any other common part in them.
As an example the method GetCoord can be given. It returns a triple of real values and is defined for directions, vectors and points. The logical connection is obvious.
### Camel Case style
Camel Case style is preferred for names.
For example:
~~~~~{.cpp}
Standard_Integer awidthofbox; // this is bad
Standard_Integer width_of_box; // this is bad
Standard_Integer aWidthOfBox; // this is OK
~~~~~
@subsection OCCT_RULES_SECTION_2_2 Names of development units
Usually unit (e.g. package) is a set of classes, methods, enumerations or any other sources implementing certain common functionality which, to the certain extent, is self contained and independent from other parts of library.
### Underscores in units names [MANDATORY]
Names of units should not contain underscores, except cases where usage of underscores is allowed explicitly.
Usually names of files consisting Open CASCADE Technology are constructed according to the rules defined in the appropriate sections of this document.
### File names extensions [MANDATORY]
The following extensions should be used for source files, depending on their type:
.cdl - CDL declaration files
.cxx - C++ source files
.hxx - C++ header files
.lxx - headers with definitions of inline methods (CDL packages)
@subsection OCCT_RULES_SECTION_2_3 Names of toolkits
The following rules are usually used in naming of toolkits:
### Prefix for toolkits names [MANDATORY]
Toolkits names are prefixed by TK, followed by suggestive part of name explaining the domain of functionality covered by the toolkit (e.g. TKOpenGl).
### Names of classes
Usually source files located in the unit have names that start from the name of the unit, separated from remaining part of file name (if any) by underscore "_".
For instance, names of files containing sources of C++ classes are constructed according to the following template.
### Naming of C++ class files
The following template should be used for names of files containing sources of C++ classes:
<unit-name>_<class-name>.cxx (.hxx, .cdl etc.)
Files that contain sources related to whole unit are called by the name of unit with appropriate extension.
### Names of functions
The term 'function' here is defined as:
- Any class method
- Any package method
- Any non-member procedure or function
It is preferred to name public methods from upper case, while protected and private methods from low case.
~~~~~{.cpp}
class MyPackage_MyClass
{
public:
Standard_Integer Value() const;
void SetValue (const Standard_Integer theValue);
private:
void setIntegerValue (const Standard_Integer theValue);
};
~~~~~
@subsection OCCT_RULES_SECTION_2_4 Names of variables
There are several rules that describe currently accepted practice used for naming variables.
### Naming of variables
Name of variable should not conflict with the global names (packages, macros, functions, global variables etc.), either existing or possible.
The name of variable should not start with underscore(s).
See the following examples:
~~~~~{.cpp}
Standard_Integer Elapsed_Time = 0; // this is bad - possible class name
Standard_Integer gp = 0; // this is bad - existing package name
Standard_Integer aGp = 0; // this is OK
Standard_Integer _KERNEL = 0; // this is bad
Standard_Integer THE_KERNEL = 0; // this is OK
~~~~~
### Names of function parameters
The name of a function (procedure, class method) parameter should start with 'the' followed by the rest of the name starting with capital letter.
See the following examples:
~~~~~{.cpp}
void Package_MyClass::MyFunction (const gp_Pnt& p); // this is bad
void Package_MyClass::MyFunction (const gp_Pnt& theP); // this is OK
void Package_MyClass::MyFunction (const gp_Pnt& thePoint); // this is preferred
~~~~~
### Names of class member variables
The name of a class member variable should start with 'my' followed by the rest of the name (rule for suggestive names applies) starting with capital letter.
See the following examples:
~~~~~{.cpp}
Standard_Integer counter; // This is bad
Standard_Integer myC; // This is OK
Standard_Integer myCounter; // This is preferred
~~~~~
### Names of global variables
It is strongly recommended to avoid defining any global variables.
However, as soon as global variable is necessary, the following rule applies.
Global variable name should be prefixed by the name of a class or a package where it is defined followed with '_my'.
See the following examples:
~~~~~{.cpp}
Standard_Integer MyPackage_myGlobalVariable = 0;
Standard_Integer MyPackage_MyClass_myGlobalVariable = 0;
~~~~~
Static constants within the file should be spelled upper-case and started with 'THE_' prefix:
~~~~~{.cpp}
namespace
{
static const Standard_Real THE_CONSTANT_COEF = 3.14;
};
~~~~~
### Names of local variables
Local variable name should be constructed in such way that it can be distinguished from the name of a function parameter, a class member variable and a global variable.
It is preferred to prefix local variable names with 'a' and 'an' (also 'is', 'to' and 'has' for Boolean variables).
See the following examples:
~~~~~{.cpp}
Standard_Integer theI; // this is bad
Standard_Integer i; // this is bad
Standard_Integer index; // this is bad
Standard_Integer anIndex; // this is OK
~~~~~
### Avoid dummy names
Avoid dummy names like I, j, k. Such names are meaningless and easy to mix up.
Code becomes more and more complicated when such dummy names used multiple times in code with different meaning, in cycles with different iteration ranges and so on.
See the following examples for preferred style:
~~~~~{.cpp}
void Average (const Standard_Real** theArray,
Standard_Integer theRowsNb,
Standard_Integer theRowLen,
Standard_Real& theResult)
{
theResult = 0.0;
for (Standard_Integer aRow = 0; aRow < aRowsNb; ++aRow)
{
for (Standard_Integer aCol = 0; aCol < aRowLen; ++aCol)
{
theResult += theArray[aRow][aCol];
}
theResult /= Standard_Real(aRowsNb * aRowLen);
}
}
~~~~~
@section OCCT_RULES_SECTION_3 Formatting rules
In order to improve the open source readability and, consequently, maintainability, the following set of rules is applied.
### International language [MANDATORY]
All comments in all sources must be in English.
### Line length
In all sources try not to exceed 120 characters limit of line length.
### C++ style comments
Prefer C++ style comments in C++ sources.
### Commenting out unused code
Delete unused code instead of commenting it or using #define.
### Indentation in sources [MANDATORY]
Indentation in all sources should be set to two space characters.
Use of tabulation characters for indentation is disallowed.
### Separating spaces
Punctuation rules follow the rules of English.
C/C++ reserved words, commas, colons and semicolons should be followed by a space character if they are not at the end of line.
There should be no space characters after '(' and before ')'. Closing and opening brackets should be separated by a space character.
For better readability it is also recommended to surround conventional operators by a space character. See the following examples:
~~~~~{.cpp}
while (true) // NOT: while( true ) ...
{
DoSomething (theA, theB, theC, theD); // NOT: DoSomething(theA,theB,theC,theD);
}
for (anIter = 0; anIter < 10; ++anIter) // NOT: for (anIter=0;anIter<10;++anIter){
{
theA = (theB + theC) * theD; // NOT: theA=(theB+theC)*theD
}
~~~~~
### Separate logical blocks
Separate logical blocks of code with one blank line and comments.
See the following example:
~~~~~{.cpp}
// check arguments
Standard_Integer anArgsNb = argCount();
if (anArgsNb < 3 || isSmthInvalid)
{
return THE_ARG_INVALID;
}
// read and check header
...
...
// do our job
...
...
~~~~~
Notice that multiple blank lines should be avoided.
### Separate function bodies [MANDATORY]
Use function descriptive blocks to separate function bodies from each other.
Each descriptive block should contain at least a function name and description of purpose.
See the following example:
~~~~~{.cpp}
// ----------------------------------------------
// function : TellMeSmthGood
// purpose : Gives me good news
// ----------------------------------------------
void TellMeSmthGood()
{
...
}
// ----------------------------------------------
// function : TellMeSmthBad
// purpose : Gives me bad news
// ----------------------------------------------
void TellMeSmthBad()
{
...
}
~~~~~
### Block layout [MANDATORY]
Figure brackets '{', '}' and each operator (for, if, else, try, catch) should be on dedicated line.
General block should have layout similarly to the following:
~~~~~{.cpp}
while (expression)
{
...
}
~~~~~
Entering block increases and leaving block decreases indentation to one tabulation.
### Single-line operators
Single-line conditional operator (if, while, for etc.) can be written without brackets on the following line.
~~~~~{.cpp}
if (!myIsInit) return Standard_False; // bad
if (thePtr == NULL) // OK
return Standard_False;
if (!theAlgo.IsNull()) // preferred
{
DoSomething();
}
~~~~~
Code on the same line is less convenient for debugging.
### Use alignment
Use alignment wherever it enhances readability. See the following example:
~~~~~{.cpp}
MyPackage_MyClass anObject;
Standard_Real aMinimum = 0.0;
Standard_Integer aVal = theVal;
switch (aVal)
{
case 0: computeSomething(); break;
case 12: computeSomethingElse (aMinimum); break;
case 3:
default: computeSomethingElseYet(); break;
}
~~~~~
### Indentation of comments
Comments should be indented similar to the code which they refer to or can be on the same line if they are short.
Text should be delimited with single space character from slash.
See the following example:
~~~~~{.cpp}
while (expression) //bad comment
{
// this is a long multi-line comment
// which is really required
DoSomething(); // maybe, enough
DoSomethingMore(); // again
}
~~~~~
### Early return statement
Prefer early return condition rather than collecting indentations.
Better write like this:
~~~~~{.cpp}
Standard_Integer ComputeSumm (const Standard_Integer* theArray,
const Standard_Size theSize)
{
Standard_Integer aSumm = 0;
if (theArray == NULL || theSize == 0)
{
return 0;
}
... computing summ ...
return aSumm;
}
~~~~~
rather than:
~~~~~{.cpp}
Standard_Integer ComputeSumm (const Standard_Integer* theArray,
const Standard_Size theSize)
{
Standard_Integer aSumm = 0;
if (theArray != NULL && theSize != 0)
{
... computing summ ...
}
return aSumm;
}
~~~~~
to improve readability and reduce unnecessary indentation depth.
### Trailing spaces
Trailing spaces should be removed when possible.
Spaces at end of line are useless and do not affect functionality.
### Headers order
Split into groups: system headers, per framework headers, project headers; sort includes list alphabetically.
This rule can improve readability, allows detection of useless header's multiple inclusions and makes 3rd-party dependencies clearly visible.
~~~~~{.cpp}
// system headers
#include <iostream>
#include <windows.h>
// Qt headers
#include <QDataStream>
#include <QString>
// OCCT headers
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <NCollection_List.hxx>
~~~~~
@section OCCT_RULES_SECTION_4 Documentation rules
The source code is one of the most important references for documentation.
The comments in the source code should be complete enough to allow understanding of that code, and to serve as basis for other documents.
The main reasons why comments are regarded as documentation and should be maintained are:
- The comments are easy to reach - they are always together with source code
- It's easy to update description in the comment when source is modified
- The source itself represents a good context to describe various details that would require much more explanations in separate document
- As a summary, this is the most cost-effective documentation
The comments should be compatible with Doxygen tool for automatic documentation generation (thus should use compatible tags).
### Documenting classes [MANDATORY]
Each class should be documented in its header file (.hxx or .cdl).
The comment should give enough details for the reader to understand the purpose of the class and main way of work with it.
### Documenting class methods [MANDATORY]
Each class or package method should be documented in the header file (.hxx or .cdl).
The comment should explain the purpose of the method, its parameters, and returned value(s).
Accepted style is:
@verbatim
//! Method computes the square value.
//! @param theValue the input value
//! @return squared value
Standard_Export Standard_Real Square (Standard_Real theValue);
@endverbatim
### Documenting C/C++ sources
It is very desirable to put comments in the C/C++ sources of the package/class.
They should be detailed enough to allow any person to understand what does each part of code, and get familiar with it.
It is recommended to comment all static functions (like methods in headers), and at least each 10-100 lines of the function bodies.
There are also some rules that define how comments should be formatted, see section "Formatting Rules".
Following these rules is important for good comprehension of the comments;
moreover it makes possible to automatically generate user-oriented documentation directly from commented sources.
@section OCCT_RULES_SECTION_5 Application design
The following set of rules defines the common style which should be applied by any developer contributing to the open source.
### Allow for possible inheritance
Try to design general classes (objects) keeping possible inheritance in mind.
This rule means that making possible extensions of your class the user should not encounter with problems of private implementations.
Try to use protected members and virtual methods wherever you expect extensions in the future.
### Avoid friend declarations
Avoid using 'friend' classes or functions except some specific cases (ex., iteration) 'Friend' declarations increase coupling.
### Set/get methods
Avoid providing set/get methods for all fields of the class.
Intensive set/get functions break down encapsulation.
### Hiding virtual functions [MANDATORY]
Avoid hiding a base class virtual function by a redefined function with a different signature.
Most of the compilers issue warning on this.
### Avoid mixing error reporting strategies
Try not to mix different error indication/handling strategies (exceptions or returned values) on the same level of an application.
### Minimize compiler warnings [MANDATORY]
When compiling the source pay attention to and try to minimize compiler warnings.
### Avoid unnecessary inclusion
Try to minimize compilation dependencies by removing unnecessary inclusion.
@section OCCT_RULES_SECTION_6 General C/C++ rules
This section defines rules for writing portable and maintainable C/C++ source code.
### Wrapping of global variables [MANDATORY]
Use package or class methods returning reference to wrap global variables to reduces possible name space conflicts.
### Avoid private members
Use 'protected' members instead of 'private' wherever reasonable to enable future extensions.
Use 'private' fields if future extensions should be disabled.
### Constants and inlines over defines [MANDATORY]
Use constant variables (const) and inline functions instead of defines (#define).
### Avoid explicit numerical values [MANDATORY]
Avoid usage of explicit numeric values. Use named constants and enumerations instead.
Magic numbers are badly to read and maintain.
### Three mandatory methods
A class with any of (destructor, assignment operator, copy constructor) usually needs all of them.
### Virtual destructor
A class with virtual function(s) ought to have a virtual destructor.
### Default parameter value
Do not redefine a default parameter value in an inherited function.
### Use const modifier
Use const modifier wherever possible (functions parameters, return values etc.)
### Usage of goto [MANDATORY]
Avoid goto statement except the cases where it is really needed.
### Declaring variable in for() header
Declaring cycle variable in the header of the for() statement if not used out of cycle.
~~~~~{.cpp}
Standard_Real aMinDist = Precision::Infinite();
for (NCollection_Sequence<gp_Pnt>::Iterator aPntIter (theSequence);
aPntIter.More(); aPntIter.Next())
{
aMinDist = Min (aMinDist, theOrigin.Distance (aPntIter.Value()));
}
~~~~~
### Condition statements within zero
Avoid usage of C-style comparison for non-boolean variables:
~~~~~{.cpp}
void Function (Standard_Integer theValue,
Standard_Real* thePointer)
{
if (!theValue) // bad style - ambiguous logic
{
DoSome();
}
if (theValue == 0) // OK
{
DoSome();
}
if (thePointer != NULL) // OK, predefined NULL makes pointer comparison cleaner to reader
{ // (nullptr should be used instead as soon as C++11 will be available)
DoSome2();
}
}
~~~~~
@section OCCT_RULES_SECTION_7 Portability issues
This chapter contains rules that are critical for cross-platform portability.
### Ensure code portability [MANDATORY]
It is required that source code must be portable to all platforms listed in the official 'Technical Requirements'.
The term 'portable' here means 'able to be built from source'.
The C++ source code should meet C++03 standard.
Any usage of compiler-specific features or further language versions (C++11, until all major compliers on all supported platforms do not implement all it features)
should be optional (escaped with appropriate preprocessor checks) and non-exclusive (alternative implementation should be provided, compatible with other compilers).
### Avoid usage of global variables [MANDATORY]
Avoid usage of global variables. Usage of global variables may cause problems of accessing them from another shared library.
Instead of global variables, use global (package or class) functions that return reference to static variable local to this function.
Another possible problem is the order of initialization of global variables defined in various libraries that may differ depending on platform, compiler and environment.
### Avoid explicit basic types
Avoid explicit usage of basic types (int, float, double etc.), use Open CASCADE Technology types (from package Standard - see Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString and others) or specific typedef instead.
### Use sizeof() to calculate sizes [MANDATORY]
Do not assume sizes of types. Use sizeof() instead to calculate sizes.
### Empty line at end of file [MANDATORY]
In accordance with C++03 standard source files should be trailed by empty line.
It is recommended to follow this rule for any plain text files for consistency and for correct work of git difference tools.
@section OCCT_RULES_SECTION_8 Stability issues
The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries.
### OSD::SetSignal() to catch exceptions
When using Open CASCADE Technology in an application, make sure to call OSD::SetSignal() function when the application is initialized.
This will install C handlers for run-time interrupt signals and exceptions,
so that low-level exceptions (such as access violation, division by zero etc.) will be redirected to C++ exceptions
(that use try {...} catch (Standard_Failure) {...} blocks).
The above rule is especially important for robustness of modeling algorithms.
### Cross-referenced handles
Take care about cycling of handled references to avoid chains which will never be freed.
For that purpose, use a pointer at one (subordinate) side. See the following example:
In MyPackage.cdl:
class MyFirstHandle;
class MySecondHandle;
pointer MySecondPointer to MySecondHandle;
...
In MyPackage_MyFirstHandle.cdl:
class MyFirstHandle from MyPackage
...
is
...
SetSecondHandleA (me: mutable; theSecond: MySecondHandle from MyPackage);
SetSecondHandleB (me: mutable; theSecond: MySecondHandle from MyPackage);
...
fields
...
mySecondHandle : MySecondHandle from MyPackage;
mySecondPointer : MySecondPointer from MyPackage;
...
end MyFirstHandle from MyPackage;
In MyPackage_MySecondHandle.cdl:
class MySecondHandle from MyPackage
...
is
...
SetFirstHandle (me: mutable; theFirst: MyFirstHandle from MyPackage);
...
fields
...
myFirstHandle : MyFirstHandle from MyPackage;
...
end MySecondHandle from MyPackage;
In C++ code:
~~~~~{.cpp}
void MyFunction()
{
Handle(MyPackage_MyFirstHandle) anObj1 = new MyPackage_MyFirstHandle();
Handle(MyPackage_MySecondHandle) anObj2 = new MyPackage_MySecondHandle();
Handle(MyPackage_MySecondHandle) anObj3 = new MyPackage_MySecondHandle();
anObj1->SetSecondHandleA(anObj2);
anObj1->SetSecondHandleB(anObj3);
anObj2->SetFirstHandle(anObj1);
anObj3->SetFirstHandle(anObj1);
// memory is not freed here !!!
anObj1.Nullify();
anObj2.Nullify();
// memory is freed here
anObj3.Nullify();
}
~~~~~
### C++ memory allocation
In C++ use new and delete operators instead of malloc() and free().
Try not to mix different memory allocation techniques.
### Match new and delete [MANDATORY]
Use the same form of new and delete.
~~~~~{.cpp}
aPtr1 = new TypeA[n]; ... ; delete[] aPtr1;
aPtr2 = new TypeB(); ... ; delete aPtr2;
aPtr3 = Standard::Allocate (4096); ... ; Standard::Free (aPtr3);
~~~~~
### Methods managing dynamical allocation [MANDATORY]
Define a destructor, a copy constructor and an assignment operator for classes with dynamically allocated memory.
### Uninitialized variables [MANDATORY]
Every variable should be initialized.
~~~~~{.cpp}
Standard_Integer aTmpVar1; // bad
Standard_Integer aTmpVar2 = 0; // OK
~~~~~
Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is *guarantied* by following code.
### Do not hide global new
Avoid hiding the global new operator.
### Assignment operator
In operator=() assign to all data members and check for assignment to self.
### Float comparison
Don't check floats for equality or non-equality; check for GT, GE, LT or LE.
~~~~~{.cpp}
if (Abs (theFloat1 - theFloat2) < theTolerance)
{
DoSome();
}
~~~~~
Package 'Precision' provides standard values for SI units and widely adopted by existing modeling algorithms:
- Precision::Confusion() for lengths in meters
- Precision::Angular() for angles in radians
as well as definition of infinity values within sanity range of double precision:
- Precision::Infinite()
- Precision::IsInfinite()
- Precision::IsPositiveInfinite()
- Precision::IsNegativeInfinite()
### Non-indexed iteration
Avoid usage of iteration over non-indexed collections of objects.
If such iteration is used, make sure that the result of the algorithm does not depend on order.
Since the order of iteration is unpredictable in this case, it frequently leads to different behavior of the application from one run to another,
thus embarrassing the debugging process.
It mostly concerns mapped objects for which pointers are involved in calculating the hash function.
For example, the hash function of TopoDS_Shape involves the address of TopoDS_TShape object.
Thus the order of the same shape in the TopTools_MapOfShape will vary in different sessions of the application.
### Do not throw in destructors
Do not throw from within destructor.
### Assigning to reference [MANDATORY]
Avoid possible assignments of the temporary object to a reference.
Different behavior for different compiler of different platforms.
@section OCCT_RULES_SECTION_9 Performance issues
These rules define the ways of avoiding possible loss of performance caused by ineffective programming.
### Class fields alignment
In a class, declare its fields in the decreasing order of their size for better alignment.
Generally, try to reduce misaligned accesses since they impact the performance (for example, on Intel machines).
### Fields initialization order [MANDATORY]
List class data members in the constructor's initialization list in the order they are declared.
~~~~~{.cpp}
class MyPackage_MyClass
{
public:
MyPackage_MyClass()
: myPropertyA (1),
myPropertyB (2) {}
// NOT
// : myPropertyB (2),
// myPropertyA (1) {}
private:
Standard_Integer myPropertyA;
Standard_Integer myPropertyB;
};
~~~~~
### Initialization over assignment
In class constructors prefer initialization over assignment.
~~~~~{.cpp}
MyPackage_MyClass()
: myPropertyA (1) // preferred
{
myPropertyB = 2; // not recommended
}
~~~~~
### Optimize caching
When programming procedures with extensive memory access, try to optimize them in terms of cache behavior.
Here is an example of how cache behavior can be impact:
On x86 this code
~~~~~{.cpp}
Standard_Real anArray[4096][2];
for (Standard_Integer anIter = 0; anIter < 4096; ++anIter)
{
anArray[anIter][0] = anArray[anIter][1];
}
~~~~~
is more efficient than
~~~~~{.cpp}
Standard_Real anArray[2][4096];
for (Standard_Integer anIter = 0; anIter < 4096; ++anIter)
{
anArray[0][anIter] = anArray[1][anIter];
}
~~~~~
since linear access (above) does not invalidate cache too often.
@section OCCT_RULES_SECTION_10 Examples
Here is C++ source file sample:
@verbatim
//! Sample documented class
class Package_Class
{
public: //! @name public methods
//! Method computes the square value.
//! @param theValue the input value
//! @return squared value
Standard_Export Standard_Real Square (const Standard_Real theValue);
private: //! @name private methods
//! Auxiliary method
void increment();
private: //! @name private fields
Standard_Integer myCounter; //!< usage counter
};
@endverbatim
~~~~~{.cpp}
#include <Package_Class.hxx>
// ==========================================================
// function : Square
// purpose : Method computes the square value
// ==========================================================
Standard_Real Package_Class::Square (const Standard_Real theValue)
{
increment();
return theValue * theValue;
}
// ==========================================================
// function : increment
// purpose :
// ==========================================================
void Package_Class::increment()
{
++myCounter;
}
~~~~~
TCL script for Draw Harness:
~~~~~{.tcl}
# show fragments (solids) in shading with different colors
proc DisplayColored {theShape} {
set aSolids [uplevel #0 explode $theShape so]
set aColorIter 0
set THE_COLORS {red green blue1 magenta1 yellow cyan1 brown}
foreach aSolIter $aSolids {
uplevel #0 vdisplay $aSolIter
uplevel #0 vsetcolor $aSolIter [lindex $THE_COLORS [expr [incr aColorIter] % [llength $THE_COLORS]]]
uplevel #0 vsetdispmode $aSolIter 1
uplevel #0 vsetmaterial $aSolIter plastic
uplevel #0 vsettransparency $aSolIter 0.5
}
}
# load modules
pload MODELING VISUALIZATION
# create boxes
box bc 0 0 0 1 1 1
box br 1 0 0 1 1 2
compound bc br c
# show fragments (solids) in shading with different colors
vinit View1
vclear
vaxo
vzbufftrihedron
DisplayColored c
vfit
vdump $imagedir/${casename}.png 512 512
~~~~~
GLSL program:
~~~~~{.fs}
vec3 Ambient; //!< Ambient contribution of light sources
vec3 Diffuse; //!< Diffuse contribution of light sources
vec3 Specular; //!< Specular contribution of light sources
//! Computes illumination from light sources
vec4 ComputeLighting (in vec3 theNormal,
in vec3 theView,
in vec4 thePoint)
{
// clear the light intensity accumulators
Ambient = occLightAmbient.rgb;
Diffuse = vec3 (0.0);
Specular = vec3 (0.0);
vec3 aPoint = thePoint.xyz / thePoint.w;
for (int anIndex = 0; anIndex < occLightSourcesCount; ++anIndex)
{
int aType = occLight_Type (anIndex);
if (aType == OccLightType_Direct)
{
directionalLight (anIndex, theNormal, theView);
}
else if (aType == OccLightType_Point)
{
pointLight (anIndex, theNormal, theView, aPoint);
}
}
return vec4 (Ambient, 1.0) * occFrontMaterial_Ambient()
+ vec4 (Diffuse, 1.0) * occFrontMaterial_Diffuse()
+ vec4 (Specular, 1.0) * occFrontMaterial_Specular();
}
//! Entry point to the Fragment Shader
void main()
{
gl_FragColor = computeLighting (normalize (Normal),
normalize (View),
Position);
}
~~~~~

View File

@@ -0,0 +1,283 @@
Contribution Workflow {#dev_guides__contribution_workflow}
====================================
@tableofcontents
@section occt_contribution_workflow_1 Introduction
The purpose of this document is to describe standard workflow for processing contributions to certified version of OCCT.
@subsection occt_contribution_workflow_1_1 Use of issue tracker system
Each contribution should have corresponding issue (bug, or feature, or integration request)
registered in the MantisBT issue tracker system accessible by URL
http://tracker.dev.opencascade.org.
The issue is processed further according to the described workflow.
@subsection occt_contribution_workflow_1_2 Access Levels
Access level defines the permissions of the user to view,
register and modify issues in a Mantis bugtracker.
The correspondence of access level and user permissions
is defined in accordance with the table below.
| Access level | Granted to | Permissions | Can set statuses |
|:------------- | :--------- | :-------------- | :----------------------- |
| Viewer | Everyone (anonymous access) | View public issues only | No |
| Reporter | Users registered on dev.opencascade.com | View, report, and comment issues | New, Resolved |
| Updater | Users of dev.opencascade.com in publicly visible projects | View and comment issues | New, Resolved |
| Developer | OCC developers and external contributors who signed the CLA | View, report, modify, and handle issues | New, Assigned, Resolved, Reviewed |
| Tester | OCC engineer devoted to certification testing | View, report, modify, and handle issues | Assigned, Tested |
| Manager | Person responsible for a project or OCCT component | View, report, modify, and handle issues | New, Resolved, Reviewed, Tested, Closed |
According to his access level, the user can participate in the issue handling process under different roles, as described below.
@section occt_contribution_workflow_2 Typical workflow for an issue
@subsection occt_contribution_workflow_2_1 General scheme
@image html OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
@image latex OCCT_ContributionWorkflow_V3_image001.png "Standard life cycle of an issue"
@subsection occt_contribution_workflow_2_2 Issue registration
An issue is registered in Mantis bugtracker by the Reporter with definition of the necessary attributes.
The definition of the following attributes is obligatory:
* **Category** - indicates component of OCCT to which the issue relates. If in doubt, assign OCCT:Foundation Classes.
* **Reproducibility**
* **Severity**
* **Priority**
* **Profile** - allows defining the platform on which the problem was detected from the list of predefined platforms. If a platform is absent in the list of predefined platforms it is possible to use Or Fill In option to define the platform manually.
* **Platform**
* **OS**
* **OS Version**
* **Products Version** - defines the version of Open CASCADE on which the problem has been detected.
* **Summary** - a short, one sentence description of the issue. It has a limit of 128 characters. It should be informative and useful for the developers. It is advisable to avoid vague or misleading phrases, such as "it doesn't work" or "it crashed". It is not allowed to mention the issue originator, and in particular the customer, in the name of the registered issue.
* **Description** - should contain a detailed definition of the nature of the registered issue depending on its type. For a bug it is required to submit a detailed description of the incorrect behavior, including the indication of the cause of the problem (if possible at this stage) or any inputs from the originator. For a feature or integration request it is recommended to describe the proposed feature in details (as possible at that stage), including the changes required for its implementation and the main features of the new functionality. Filling the bug description is obligatory.
* **Steps To Reproduce** - in this field it is possible to describe in detail how to reproduce the issue. This field considerably helps to find the cause of the problem, to eliminate it and to create the test case.
* *Upload File* field allows attaching the shapes, scripts or modified source files of OCCT. It is recommended to attach a prototype test case in form of a Tcl script for DRAW, using either existing DRAW commands, or a C++ code which can be organized in DRAW commands, as well as sample shapes or other input data (if applicable), immediately after the issue registration.
The newly registered issue gets status **NEW** and is assigned to the developer responsible for the OCCT component indicated in the Category field (Maintainer).
@subsection occt_contribution_workflow_2_3 Assigning the issue
The description of the new issue is checked by the **Maintainer** and if it is feasible,
he may assign the issue to a **Developer**. Alternatively, any user with **Developer** access level
or higher can assign the issue to himself if he wants to provide a solution.
The recommended way to handle contributions is that the **Reporter** assigns the issue to himself and provides a solution.
The **Maintainer, Technical Project Manager,** or **Bugmaster** can close or reassign the issue
(in **FEEDBACK** state) to the **Reporter** after it has been registered, if its description does not contain sufficient details to reproduce the bug or explain the purpose of the new feature.
That decision shall be documented in the comments to the issue in the Bugtracker.
The assigned issue should have state **ASSIGNED**.
@subsection occt_contribution_workflow_2_4 Resolving the issue
The **Developer** responsible for the issue assigned to him provides a solution
as a change on the version of OCCT indicated in the issue attributes, or the last development version.
The modified sources should be submitted for review and testing to the dedicated branch of the official OCCT Git repository:
* Branch should be created for the issue with name composed of letters CR followed by issue ID number (without leading zeroes).
Optional suffix can be added to the branch name after issue ID,
e.g. to distinguish between several version of the fix.
* The branch should be based on recent version of the master branch
(not later than commit tagged as last OCCT release).
* The first line of the first commit message should contain
the Summary of the issue (starting with its ID followed by colon, e.g. "0022943: Bug TDataXtd_PatternStd").
The consequent lines should contain a description of the changes made.
If more than one commit has been made, the commit messages should contain description of the changes made.
* The amount of the code affected by the change should be limited
to only the changes required for the bug fix or improvement.
Change of layout or re-formatting of the existing code is allowed
only in the parts where meaningful changes related to the issue have been made.
* The name of the branch where the fix is submitted should be given
in the note to the Mantis issue
(providing the direct link to relevant branch view in GitWeb is encouraged).
* The description of the changes made should be put to the field
"Additional information and documentation updates" of the Mantis issue.
In some cases (if Git is not accessible for the contributor),
external contributions can be submitted as patch (diff) files or sources
attached to the Mantis issue, with indication of OCCT version on which the fix is made.
Such contributions should be put to Git for processing by someone else,
and hence they have less priority in processing than the ones submitted directly through Git.
The issue for which solution is provided should be switched to **RESOLVED** state
and assigned to the developer who is expected to make a code review
(the **Reviewer**; by default, can be set to the **Maintainer** of the component).
@subsection occt_contribution_workflow_2_5 Code review
The **Reviewer** analyzes the proposed solution for applicability in accordance with OCCT Code reviewing rules and examines all changes in the sources to detect obvious and possible errors, misprints, conformity to coding style.
* If Reviewer detects some problems, he can either:
* Fix these issues and provide new solution, reassigning the issue (in **RESOLVED** state) to the **Developer**, who then becomes a **Reviewer**.
Possible disagreements should be resolved through discussion, which is done normally within issue notes (or on the OCCT developers forum if necessary).
* Reassign the issue back to the **Developer**, providing detailed list of remarks. The issue then gets status **ASSIGNED** and a new solution should be provided.
* If Reviewer does not detect any problems, he changes status to **REVIEWED**.
@subsection occt_contribution_workflow_2_6 Testing
The issues that are in **REVIEWED** state are subject of certification (non-regression) testing.
The issue is assigned to OCC **Tester** when he starts processing it.
The results of tests are checked by the **Tester**:
* If the **Tester** detects build problems or regressions, he changes the status to **ASSIGNED** and reassigns the issue to the **Developer** with a detailed description of the problem. The **Developer** should produce a new solution.
* If the **Tester** does not detect build problems or regressions, he changes the status to **TESTED** for further integration.
@subsection occt_contribution_workflow_2_7 Integration of a solution
Before integration into the master branch of the repository the **Integrator** checks the following conditions:
* the change has been reviewed;
* the change has been tested without regressions (or with regressions treated properly);
* the test case has been created for this issue (when applicable), and the change has been rechecked on this test case;
* "Additional information and documentation updates" field is filled by the developer;
* the change does not conflict with other changes integrated previously.
If the result of check is successful the Integrator integrates solution
into the master branch of the repository. Each change is integrated into the master branch
as a single commit without preserving the history of changes made in the branch
(by rebase, squashing all intermediate commits), however, preserving the author when possible.
This is done to have the master branch history plain and clean.
The following picture illustrates the process:
@image html OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
@image latex OCCT_ContributionWorkflow_V3_image002.png "Integration of several branches"
The new master branch is tested against possible regressions that might appear due to interference between separate changes. When the tests are Ok, the new master is pushed to the official repository
and the original branches are removed from it.
The issue status is set then to **VERIFIED** and is assigned to the **Reporter** so that he could check the fix as-integrated.
@subsection occt_contribution_workflow_2_8 Closing a bug
The **Bugmaster** closes the issue after regular OCCT Release provided that the issue status is **VERIFIED** and that issue was really solved in that release, by rechecking the corresponding test case. The final issue state is **CLOSED**.
@subsection occt_contribution_workflow_2_9 Reopening a bug
If a regression is detected, the **Bugmaster** may reopen and reassign the **CLOSED** issue to the appropriate developer with comprehensive comments about the reason of reopening. The issue then becomes **ASSIGNED** again.
@section occt_contribution_workflow_3 Appendix
@subsection occt_contribution_workflow_3_1 Issue attributes
@subsubsection occt_contribution_workflow_3_1_1 Severity
Severity shows at which extent the issue affects the product.
The list of used severities is given in the table below in the descending order.
| Severity | Description | Weight for Bug Score |
| :---------- | :------------------------------------------------ | :------------------: |
| crash | Crash of the application or OS, loss of data | 5 |
| block | Regression corresponding to the previously delivered official version. Impossible operation of a function on any data with no work-around. Missing function previously requested in software requirements specification. Destroyed data. | 4 |
| major | Impossible operation of a function with existing work-around. Incorrect operation of a function on a particular dataset. Impossible operation of a function after intentional input of incorrect data. Incorrect behavior of a function after intentional input of incorrect data. | 3 |
| minor | Incorrect behavior of a function corresponding to the description in software requirements specification. Insufficient performance of a function. | 2 |
| tweak | Ergonomic inconvenience, need of light updates. | 1 |
| text | Inconsistence of program code to the Coding Standard. Errors in source text (e.g. unnecessary variable declarations, missing comments, grammatical errors in user manuals). | 1 |
| trivial | Cosmetic bugs. | 1 |
| feature | Bug fix, new feature, improvement that requires workload estimation and validation. | 1 |
| integration request | Requested integration of an existing feature into the product. | 0 |
| Just a question | A question to be processed, without need of any changes in the product. | 0 |
@subsubsection occt_contribution_workflow_3_1_2 Statuses of issues
The bug statuses that can be applied to the issues are listed in the table below.
| Status | Description |
| :------------------- | :----------------------------------------- |
| New | New just registered issue. Testing case should be created by Reporter. |
| Feedback | The issue requires more information; the original posters should pay attention. |
| Assigned | Assigned to a developer. |
| Resolved + a resolution | The issue has been fixed, and now is waiting for revision. |
|Revised + a resolution | The issue has been revised, and now is waiting for testing. |
| Tested | The fix has been internally tested by the tester with success on the full non-regression database or its part and a test case has been created for this issue. |
| Verified | The fix has been integrated into the master of the corresponding repository |
| Closed | The fix has been integrated to the master. The corresponding test case has been executed successfully. The issue is no longer reproduced. |
@subsubsection occt_contribution_workflow_3_1_3 Resolutions
**Resolution** is set when the bug is resolved. "Reopen" resolution is added automatically when the bug is reopened.
| Resolution | Description |
|:--------------------- | :--------------------------------------------------------------------------- |
| Open | The issue is being processed. |
| Fixed | The issue has been successfully fixed. |
| Reopened | The bug has been reopened because of insufficient fix or regression. |
| | Unable to reproduceThe bug is not reproduced. |
| Not fixable | The bug cannot be fixed because it is a bug of third party software, or because it requires more workload than it can be allowed. |
| Duplicate | The bug for the same issue already exists in the tracker. |
| Not a bug | It is a normal behavior in accordance with the specification of the product |
| No change required | The issue didnt require any change of the product, such as a question issue |
| Suspended | This resolution is set for Acknowledged status only. It means that the issue is waiting for fix until a special administrative decision is taken (e.g. a budget is not yet set in accordance with the contract) |
| Documentation updated | The issue was a normal behavior of the product, but the actions of the user were wrong. The specification and the user manual have been updated to reflect this issue. |
| Wont fix | An administrative/contractual decision has been taken to not fix the bug |
@subsection occt_contribution_workflow_3_2 Update and evolution of documentation
The documentation on Open CASCADE Technology currently exists in three forms:
* OCCT Technical Documentation generated automatically with Doxygen tool on the basis of comments in CDL or HXX files.
* Users Reference Documentation on OCCT packages and Products supplied in the form of PDF Users guides
* OCCT Release Documentation supplied in the form of Release Notes with each release.
It is strictly required to properly report the improvements and changes introduced in OCCT in all three forms of Documentation.
@subsubsection occt_contribution_workflow_3_2_1 Maintenance of CDL files
Every developer providing a contribution to the source code of OCC
should make a relevant change in the corresponding header file, including CDL.
Making the appropriate comments is mandatory in the following cases:
* Development of a new package / class / method / enumeration;
* Modification of an existing package / class / method / enumeration that changes its behavior;
* Modification / new development impacts at other packages / classes / methods / enumerations, the documentation which of should be modified correspondingly.
The only case when the comments may be not required is introducing
a modification that does not change the existing behavior in any noticeable way
or brings the behavior in accordance with the existing description.
CDL description must be in good English, containing as much relevant
information and as clear as possible. If the developer is unable to properly formulate
his ideas in English or suspects that his description can be misunderstood,
he should address to the Documentation Engineer for language assistance.
Such action is completely subject to the discretion of the developer; however,
the Documentation Engineer can require that the developer should provide a relevant
technical documentation and reopen a bug until all documentation satisfies the requirements above.
@subsubsection occt_contribution_workflow_3_2_2 Maintenance of the Users Reference Documentation
The Users Reference Documentation is distributed among a number of Users Guides,
each describing a certain module of OCCT.
The User's Guides do not cover the entire functionality of OCCT;
however, they describe most widely used and important packages.
In most aspects the User's Guides present the information that is contained in CDL descriptions for methods, classes, etc., only from a different point of view. Thus, it is required that any developer who implements a new or modifies an existing package / class / method / enumeration and adds a description of new development or changes in the corresponding CDL file should also check if this class package / class / method / enumeration or the package / class, to which the added class / method belongs is already described in the documentation and update the Users Reference Documentation correspondingly.
3.2.3. Preparation of the Release Documentation
Before changing the bug Status to RESOLVED, the developer should provide a description of the implemented work using the "Additional information and documentation updates" field of Mantis bugtracker.
This description is used for the Release Documentation and has the following purposes:
* to inform the OCCT users about the main features and improvements implemented in the platform in the release;
* to give a complete and useable list of changes introduced into the OCCT since the latest version.
The changes should be described from the users viewpoint so that the text
could be comprehensible even for beginners having a very vague idea about OCCT.
If the developer is unable to properly formulate his ideas in English or suspects
that his description can be misunderstood, he should address to the Documentation Engineer
for language assistance. Such action is completely subject to the discretion of the developer;
however, the Documentation Engineer can require that the developer
should provide a relevant technical documentation and reopen a bug
until all documentation satisfies the requirements.
**Note**, that it is required to single out the changes in the OCCT behavior as compared to the previous versions and especially the changes to be considered when porting from the previous version of OCCT.
For example:
* If global macros XXX() was used in the code of your application, revise it for direct use of the argument stream object.
* You might need to revise the code related to text display in 3d viewer to take into account new approach of using system fonts via XXX library.
The **Documentation Engineer** is responsible for preparation of the version Release Notes
and update of the Users Guides. If the **Documentation Engineer** considers that the description currently provided by the **Developer** is somehow inadequate or unsatisfactory he can demand the **Developer** to rewrite the documentation with the **Documentation Engineers** assistance.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -0,0 +1,17 @@
Developer Guides {#dev_guides}
================
The following documents provide information on OCCT building, development and testing:
* @subpage dev_guides__building "Building OCCT from sources"
* @subpage dev_guides__documentation "Documentation system"
* @subpage dev_guides__coding_rules "Coding Rules"
* @subpage dev_guides__contribution_workflow "Contribution Workflow"
* @subpage dev_guides__git_guide "Guide to installing and using Git for OCCT development"
* @subpage dev_guides__tests "Automatic Testing system"
Two other documents provide details on obsolete technologies used by OCCT,
to be removed in future releases:
* @subpage dev_guides__wok "Workshop Organization Kit (WOK)"
* @subpage dev_guides__cdl "Component Definition Language (CDL)"

View File

@@ -0,0 +1,522 @@
Documentation System {#dev_guides__documentation}
======================
@tableofcontents
@section OCCT_DM_SECTION_1 Introduction
This document provides practical guidenes for generation and editing of OCCT user documentation.
@section OCCT_DM_SECTION_2 Prerequisites
<b>Tcl/Tk</b>
Version 8.5 or 8.6: http://www.tcl.tk/software/tcltk/download.html
<b>Doxygen</b>
Version 1.8.4 or above: http://www.stack.nl/~dimitri/doxygen/download.html
<b>MathJax</b> (used for rendering math formulas in browser).
See \ref OCCT_DM_SECTION_A_9 paragraph for more detailed description.
The latest version: http://www.mathjax.org/download/
<b>MiKTeX</b> or equivalent tool (used for PDF document creation)
Latest version: http://miktex.org/download
**Note**: to generate pdf documentation with MiKTeX you should execute gendoc.bat within MiKTeX environment
(run gendoc.bat in MiKTeX command promt or update PATH for MiKTeX bin folder). Also in process of pdf generation
MiKTeX can request you to download missing packages if MiKTeX was installed with option below:
@image html /dev_guides/documentation/images/documentation_image002.png
@image latex /dev_guides/documentation/images/documentation_image002.png
If this option is set to "Yes", MiKTeX will download missing packages automatically.
@section OCCT_DM_SECTION_2_1 Documentation Generation
Run gendoc.bat from OCCT directory to generate all articles are defined in FILES.txt:
gendoc.bat options:
* -html : To generate HTML files (cannot be used with -pdf);
* -pdf : To generate PDF files (cannot be used with -html);
* -m=\<modules_list\> : Specifies list of articles to generate. If it is not specified, all files, mentioned in FILES.txt are processed;
* -l=\<document_name\> : Specifies the article caption for a single document;
* -h : Prints help message;
* -v : Specifies the Verbose mode (info on all script actions is shown).
If you run the command without arguments (like example above) it will generate HTML documentation
for all articles are defined into FILES.txt.
**Note**: the generation process generates PDF files for each article,
but in html case it generates common Html page with references to the ones.
For generation of specific article you need:
* have it's name with relative path (from \%OCCDIR\%/dox/ to the file) contained in FILES.txt
(is located into \%OCCDIR\%/dox/ directory).
@verbatim
devs_guid/documentation/documentation.md
@endverbatim
where documentation .md is name of article and devs_guid/documentation/ is relative path of it
* use this name with -m option in the generation process:
@verbatim
% gendoc.bat -html -m=devs_guid/documentation/documentation.md
@endverbatim
Multiple files are separated with comma:
@verbatim
% gendoc.bat -html -m=MD_FILE_1,MD_FILE_2
@endverbatim
To sepcify a article name with -l option, use quotes to prevent incorrect interpretation of whitespaces:
@verbatim
% gendoc.bat -pdf -m=MD_FILE_1 -l="Label of MD_FILE_1 document"
@endverbatim
@section OCCT_DM_SECTION_3 Documentation Conventions
This section contains information about conventions in the field of OCCT documentation file format,
structure of documentation directories, etc.
@subsection OCCT_DM_SECTION_3_1 File Format
The format used for documentation is MarkDown with Doxygen extensions.
The MarkDown files have a "*.md" extension and are based on rules desribed in
\ref OCCT_DM_SECTION_A section.
@subsection OCCT_DM_SECTION_3_2 Directory Structure
@image html /dev_guides/documentation/images/documentation_image001.png
@image latex /dev_guides/documentation/images/documentation_image001.png
Every separate article has own folder if images are used in it. These images
are stored into "images" subfolder.
If you want to use the same image for several articles, you can place the one into "dox/resources" folder.
**Note**: Every article can use any image that is used by others articles. To avoid incorrect image
displaying, use relative path to the image (starting from dox folder). For instance
@verbatim
@image html /dev_guides/snv/images/snv_image001.svg
@endverbatim
Result of generation of the documentation is:
%OCCT_DIR% / doc - a folder for generated articles;
* html/ - a directory for generated HTML pages;
* pdf/ - a directory for generated PDF files.
@section OCCT_DM_SECTION_4 Adding a New Article
- Place a new article into folder that is chosen taking into account the place of the article
at the hierarchy of the documentation. For instance the article about "using SVN working with OCCT
source code" (svn.md - the file of the article) might be placed into /dox/dev_guides/ . If the article has images then you may create
the own folder of the article and subfolder in it for images. For instance
*/dox/dev_guides/svn/ - for svn.md file
*/dox/dev_guides/svn/images/ - for images
- Update dox/FILES.txt to add relative path to svn.md. For instance
@verbatim
dev_guides/snv/svn.md
@endverbatim
**Note**: the place of the relative path to an article is connected with the place
into treeview of html version.
Note, that you should specify a file tag, not the document name.
See <a href="#OCCT_DM_SECTION_A_1">Header section</a> for details.
@section OCCT_DOC_SECTION_5 Additional Resources
More information about OCCT can be found at http://www.opencascade.org
The information on formula syntax can be found at:
http://en.wikipedia.org/wiki/Help:Displaying_a_formula
More information on MarkDown and Doxygen syntax can be found at:
http://www.stack.nl/~dimitri/doxygen/manual
@section OCCT_DM_SECTION_A Appendix 1: Document Syntax
Each OCCT document file in *.md format has a simple structure.
It can contain:
| Content type | Obligation |
| :---------------- | :-------------------: |
| Header | M |
| Footer | M |
| Plain text | O |
| List | O |
| Table | O |
| Code | O |
| Formula | O |
| Image | O |
| Page numbers | M (auto generation) |
| Table of contents | M (auto generation) |
The legend:
* M is for Mandatory
* O is for Optional
@subsection OCCT_DM_SECTION_A_1 Text Caption (a header)
headings of different levels can be specified with the following code:
@verbatim
Header 1 {#header1}
=======
@endverbatim
to get
Header 1
=========
and with the following code:
@verbatim
Header 2 {#header2}
--------
@endverbatim
to get
Header 2
---------
Where a word in curly braces is a MarkDown-style reference, which can be used in table of contents.
If you would like to have the table of contents, it is recommended to use \@section,
\@subsection and \@subsubsection pages instead of MarkDown headers as follows:
@verbatim
@section Section_Name Section Header
@subsection SubSection_Name SubSection Header
@subsubsection SubSubSection_Name SubSubSection Header
@endverbatim
@subsection OCCT_DM_SECTION_A_2 Plain Text
Plain text is a text in a notepad-like format. To insert special symbols,
like \< , \> or \\, prepend them with \\ character: \\\<, \\\>, \\\\
To emphasize some words, write one pair of asterisks ( * ) or underscores ( _ ) across the word
to make it *italic* and two pairs of these symbols to make a word **Bold**.
@subsection OCCT_DM_SECTION_A_3 Lists
To create a bulleted list, start each line with a hyphen or an asterisk,
followed by a space. List items can be nested. This code:
@verbatim
* Bullet 1
* Bullet 2
- Bullet 2a
- Bullet 2b
* Bullet 3
@endverbatim
produces this list:
* Bullet 1
* Bullet 2
* Bullet 2a
* Bullet 2b
* Bullet 3
To create a numbered list, start each line with number and a period,
then a space. Numbered lists can also be nested. Thus this code
@verbatim
1. List item 1
1. Sub-item 1
2. Sub-item 2
2. List item 2
3. List item 3
@endverbatim
produces this list:
1. List item 1
1. Sub-item 1
2. Sub-item 2
2. List item 2
3. List item 3
Each list item can contain several paragraphs of text; these paragraphs must
have the same indentation as text after bullet or number in the numbered list
item (otherwise numbering will be broken).
Code blocks can be inserted as paragraphs with additional indentation
(4 spaces more). Note that fenced code blocks do not work within numbered lists
and their use may cause numeration to be reset.
Example of complex nested list:
@verbatim
1. ListItem_1
Additional paragraph
code fragment
One more paragraph
1. Sub-item 1
code fragment for sub-item 1
2. Sub-item 2
Paragraph for sub-item 2
Yet one more paragraph for list item 1
2. ListItem_2
@endverbatim
1. List item 1
Additional paragraph
code fragment
One more paragraph
1. Sub-item 1
code fragment for sub-item 1
2. Sub-item 2
Paragraph for sub-item 2
Yet one more paragraph for list item 1
2. List item 2
Note that numbers of paragraphs are regenerated so they do not necessarily
follow numbering of source items.
@subsection OCCT_DM_SECTION_A_4 Tables
A table consists of a header line, a separator line, and at least one row line.
Table columns are separated by the pipe (|) character. The following example:
@verbatim
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
@endverbatim
will produce the following table:
First Header | Second Header
------------ | -------------
Content Cell | Content Cell
Content Cell | Content Cell
Column alignment can be controlled via one or two colons at the header separator line:
@verbatim
| Right | Center | Left |
| ----: | :----: | :---- |
| 10 | 10 | 10 |
| 1000 | 1000 | 1000 |
@endverbatim
which will looks as follows:
| Right | Center | Left |
| ----: | :----: | :---- |
| 10 | 10 | 10 |
| 1000 | 1000 | 1000 |
Note that each table raw should be contained in one line of text; complex
tables can be created using HTML tags.
@subsection OCCT_DM_SECTION_A_5 Code Blocks
It is recommended to indent a code lines with 4 spaces.
A fenced code block does not require indentation, and is defined by a pair of "fence lines".
Such line consists of 3 or more tilde (~) characters on a line.
The end of the block should have the same number of tildes. Here is an example:
~~~~~~~~~~~~~~~~~~~~~~~
a one-line code block
~~~~~~~~~~~~~~~~~~~~~~~
By default the output is the same as for a normal code block.
To highlight the code, the developer has to indicate the typical file extension,
which corresponds to the programming language, after the opening fence.
For highlighting according to the C++ language, for instance, write the following code (the curly braces and dot are optional):
@verbatim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
int func(int a,int b) { return a*b; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@endverbatim
which will produce:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
int func(int a,int b) { return a*b; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Verbatim content can be written by using framing \@verbatim \@endverbatim . For instance
verbatim text
@subsection OCCT_DM_SECTION_A_6 References
To insert a reference to a website, it is proposed to write a URL. For example: http://en.wikipedia.org
To insert a reference to another part of the same document, the developer can write:
@verbatim
@htmlonly
<a href="#OCCT_DOC_SECTION_5">Doxygen Configuration file</a>
@endhtmlonly
@endverbatim
to get a link to paragraph : @htmlonly <a href="#OCCT_DOC_SECTION_5">Doxygen configuration</a> @endhtmlonly
@subsection OCCT_DM_SECTION_A_7 Images
To insert image into document the developer can write the following code(in Doxygen-style):
For HTML document:
@verbatim
@image html /relative/path/to/image/image001.png "Image caption"
@endverbatim
For latex document:
@verbatim
@image latex /relative/path/to/image/image001.png "Image caption"
@endverbatim
*Note*: When markdown document is used to generate html document the latex insertion is ignored (and vice versa)
due to this fact you can use image insertions in the pair, like example below:
@verbatim
@image html /relative/path/to/image/image001.png "Image caption"
@image latex /relative/path/to/image/image001.png "Image caption"
@endverbatim
The code below tells Doxygen to insert a picture right in the place this code was written:
@verbatim
@image html /resources/occ_logo.png "OCCT logo"
@image latex /resources/occ_logo.png "OCCT logo"
@endverbatim
@image html /resources/occ_logo.png "OCCT logo"
@image latex /resources/occ_logo.png "OCCT logo"
@subsection OCCT_DM_SECTION_A_8 Table Of Contents
To get the table of contents at the beginning of the document, write \@tableofcontents tag.
But it is not needed now because TreeView option for HTML is used.
The TOC in the PDF document will be generated automatically.
@subsection OCCT_DM_SECTION_A_9 Formulas
Formulas within documents will be generated using MathJax tool.
A developer has to specify these parameters in Doxyfile to enable support of MathJax in Doxygen:
USE_MATHJAX = YES
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
To use MathJax tool with the HTML page, it's \<head\> block has to contain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.html}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
displayAlign: "left"
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First script configures MathJax to understand separator types and to left allign formulas.
The second script inserts reference to MathJax tool.
This tool will always be used when the HTML output will be shown.
Equations can be written by several ways:
1.Unnumbered displayed formulas that are centered on a separate line.
These formulas should be put between \@f\[ and \@f\] tags. An example:
@verbatim
@f[
|I_2|=\left| \int_{0}^T \psi(t)
\left\{
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
\right\} dt
\right|
@f]
@endverbatim
gives the following result:
@f$
|I_2|=\left| \int_{0}^T \psi(t)
\left\{
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
\right\} dt
\right|
@f$
2.Formulas can also be put between @verbatim \begin{align} @endverbatim and @verbatim \end{align} @endverbatim tags. An example:
@verbatim
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
@endverbatim
gives the following result:
@latexonly
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
@endlatexonly
@htmlonly
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
@endhtmlonly
3.Inline formulas can be specified using this syntax:
@verbatim
@f$ \sqrt{3x-1}+(1+x)^2 @f$
@endverbatim
that leads to the following result: @f$ \sqrt{3x-1}+(1+x)^2 @f$

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,550 @@
Guide to installing and using Git for OCCT development {#dev_guides__git_guide}
=================================
@tableofcontents
@section occt_gitguide_1 Overview
@subsection occt_gitguide_1_1 Purpose
The purpose of this document is to provide a practical introduction to Git
to OCCT developers who are not familiar with this tool
and to facilitate the use of the official OCCT Git repository for code contribution to OCCT.
Reading this document does not exempt from the need to learn Git concepts and tools.
Please consult a book or manual describing Git to get acquainted with this tool.
Many good books on Git can be found at http://git-scm.com/documentation
For the experienced Git users it can be enough to read sections 1 and 3
of this document to start working with the repository.
Please make sure to get familiar with the Contribution Workflow document
that describes how Git is used for processing contributions to OCCT.
This and related documents are available at the Resources page
of the OCCT development portal at http://dev.opencascade.org/index.php?q=home/resources.
@subsection occt_gitguide_1_2 Git URL
URL of the official OCCT source code Git repository (accessed by SSH protocol) is:
gitolite@git.dev.opencascade.org:occt
or
ssh://gitolite@dev.opencascade.org/occt.git
@subsection occt_gitguide_1_3 Content
The official repository contains:
* The current certified version of OCCT: the "master" branch. This branch is updated by the Bugmaster only. Official OCCT releases are marked by tags.
* Topic branches created by contributors to submit changes for review / testing or for collaborative development. The topic branches should be named by the pattern "CR12345" where 12345 is the ID of the relevant issue registered in Mantis (without leading zeroes), and "CR" stands for "Change Request". The name can have an additional postfix used if more than one branch was created for the same issue.
* Occasionally topic branches with non-standard names can be created by the Bugmaster for special needs.
@subsection occt_gitguide_1_4 Short rules of use
The name specified in the user.name field in Git configuration should correspond
to your login name on the OCCT development portal.
This is important to clearly identify the authorship of commits.
(The full real name can be used as well; in this case add the login username in parentheses.)
By default, contributors are allowed to push branches only with the names starting with CR
(followed by the relevant Mantis issue ID).
Possibility to work with other branches can be enabled by the Bugmaster on request.
The branch is created by the developer in his local repository when the development of a contribution starts.
The branch for new developments is to be created from the current master.
The branch for integration of patches or developments based on an obsolete version
is created from a relevant tag or commit. The branch should be pushed to the official repo
only when sharing with other people (for collaborative work or review / testing) is needed.
Rebasing the local branch to the current master is encouraged before the first submission
to the official repository. If rebasing was needed after the branch is pushed to the official repo,
the rebased branch should have a different name (use suffix).
Integration of contributions that have passed certification testing is made exclusively by the Bugmaster.
Normally this is made by rebasing the contribution branch on the current master
and squashing it into a single commit. This is made to have the master branch history plain and clean,
following the general rule “one issue one commit”.
The description of the commit integrated to the master branch is taken from the Mantis issue
(ID, 'Summary', followed by the information from 'Documentation' field if present).
In special cases when it is important to save the commits history in the branch
(e.g. in case of a long-term development integration) it can be integrated by merge (no fast-forward).
The authorship of the contribution is respected by preserving the Author field of the commit when integrating.
Branches are removed from the official repository when integrated to the master.
The Bugmaster can also remove branches which have no commits during one-month period.
The Bugmaster may ask the developer (normally the one who produced the contribution)
to rebase a branch on the current master, in the case if merge conflicts appear during integration.
@subsection occt_gitguide_1_5 Version of Git
The repository is tested to work with Git 1.7.6 to 1.7.9.
Please do not use versions below 1.7.1 as they are known to cause troubles.
@section occt_gitguide_2 Installing Tools for Work with Git
@subsection occt_gitguide_2_1 Windows platform
Installation of Git for Windows (provided by MSysGit project) is required.
In addition, it is recommended to install TortoiseGit to work with Git on Windows.
If you do not install TortoiseGit or any other GUI tool,
you can use GitGui and Gitk GUI tools delivered with Git and available on all platforms.
@subsubsection occt_gitguide_2_1_1 Installation of Git for Windows
Download Git for Windows distributive from http://code.google.com/p/msysgit/downloads/list.
During the installation:
* Select Windows Explorer integration options:
* Git Bash Here
* Git GUI Here
@image html OCCT_GitGuide_V2_image001.png
@image latex OCCT_GitGuide_V2_image001.png
* To avoid a mess in your PATH, we recommend selecting Run Git from Windows Prompt in the environment settings dialog:
@image html OCCT_GitGuide_V2_image002.png
@image latex OCCT_GitGuide_V2_image002.png
* In "Configuring the line ending conversions" dialog, select "Checkout Windows-style, commit Unix style endings".
@image html OCCT_GitGuide_V2_image003.png
@image latex OCCT_GitGuide_V2_image003.png
Note that by default Git user interface is localized to the system default language.
If you prefer to work with the English interface, remove or rename .msg localization file
in subdirectories *share/git-gui/lib/msgs* and *share/gitk/lib/msgs* of the Git installation directory.
Before the first commit to the OCCT repository, make sure that your User Name in the Git configuration file (file *.gitconfig* in the $HOME directory) is equal to your username on the OCCT development portal.
@subsubsection occt_gitguide_2_1_2 Installation and configuration of TortoiseGit
Download TortoiseGit distributive from http://code.google.com/p/tortoisegit/downloads/list.
Launch the installation.
* Select your SSH client. Choose OpenSSH if you prefer to use command-line tools
for SSH keys generation, or TortoisePLink if you prefer to use GUI tool (PuttyGen, see 3.2):
@image html OCCT_GitGuide_V2_image004.png
@image latex OCCT_GitGuide_V2_image004.png
* Complete the installation.
TortoiseGit integrates to Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
@image html OCCT_GitGuide_V2_image005.png
@image latex OCCT_GitGuide_V2_image005.png
Note that if you have installed MSysGit or have Git installed in non-default path,
on the first time you use TortoiseGit you may get the message demanding to define path to Git.
In such case, click on **Set MSysGit path** button and add the path to git.exe
and path to MigGW libraries in the Settings dialog.
* After the installation select Start -> Programs -> TortoiseGit Settings to configure TortoiseGit.
Select Git->Config to add your user name and Email address to the local .gitconfig file
@image html OCCT_GitGuide_V2_image006.png
@image latex OCCT_GitGuide_V2_image006.png
@subsection occt_gitguide_2_2 Linux platform
We assume that Linux users have Git already installed and available in the PATH.
Make sure to configure Git so that the user name is equal to your username
on the OCCT development portal, and set SafeCrLf option to true:
~~~~~
> git config --global user.name "Your User Name"
> git config --global user.email your@mail.address
> git config --global your@mail.address
~~~~~
@section occt_gitguide_3 Getting access to the repository
@subsection occt_gitguide_3_1 Prerequisites
Access to the repository is granted to the users who have signed the Contributor License Agreement.
The repository is accessed by SSH protocol, thus you need to register your public SSH key
on the development portal to get access to the repository.
SSH keys are used for secure authentication of the user when accessing the Git server.
Private key is the one stored on the user workstation (optionally encrypted).
Open (or public) key is stored in the user account page on the web site.
When Git client accesses the remote repository through SSH,
it uses this key pair to identify the user and acquire relevant access rights.
Normally when you have Git installed, you should have also SSH client available.
On Unix/Linux it is installed by default in the system.
On Windows it is typical to have several SSH clients installed;
in particular they are included with Cygwin, Git, TortoiseGit.
It is highly recommended to use the tools that come
with the chosen Git client for generation of SSH keys.
Using incompatible tools (e.g. ssh-keygen.exe from Cygwin for code generation,
and TortoiseGit GUI with a default Putty client for connection to server)
may lead to authentication problems.
@subsection occt_gitguide_3_2 How to generate a key
@subsubsection occt_gitguide_3_2_1 Generating key with Putty
Use this option if you have installed TortoiseGit (or other GUI Git client on Windows)
and have chosen “TortoisePLink” (or other Putty client) as SSH client during installation.
To generate the key with this client, run Puttygen (e.g. from Start menu -> TortoiseGit -> Puttygen),
then click Generate and move mouse cursor over the blank area until the key is generated.
@image html OCCT_GitGuide_V2_image007.png "Putty key generator"
@image latex OCCT_GitGuide_V2_image007.png "Putty key generator"
After the key is generated, you will see GUI controls to define the public key comment
and / or specify the password for the private key protection.
When done, save both the public and the private key to the files of your choice
(make sure to store your private key in a secure place!).
Copy the public key as shown by Puttygen to the clipboard to add it in your account.
Do not copy the Putty public key file content -- it is formatted in a way not suitable for the web site.
@subsubsection occt_gitguide_3_2_2 Generating key with command-line tools
Use this option if you work on Linux or if you have chosen “OpenSSH” as SSH client
during installation of TortoiseGit (or other Windows tool).
Make sure that you have *ssh* and *ssh-keygen* commands in the path.
On Windows, you might need to start 'Git Bash' command prompt window provided by Git for Windows.
Use the following command to generate SSH keys:
~~~~~
> ssh-keygen -t rsa -C "your@mail.address"
~~~~~
The last argument is an optional comment, which can be included with the public key and used to distinguish between different keys (if you have many). The common practice is to put here your mail address or workstation name.
The command will ask you where to store the keys. It is recommended to accept the default path *$HOME/.ssh/id_rsa*. Just press Enter for that. You will be warned if a key is already present in the specified file; you can either overwrite it by the new one, or stop generation and use the old key.
If you want to be on the safe side, enter password to encrypt the private key. You will be asked to enter this password each time you use that key (e.g. access a remote Git repository), unless you use the tool that caches the key (like TortoiseGit). If you do not want to bother, enter an empty string.
On Windows, make sure to note the complete path to the generated files (the location of your $HOME might be not obvious). Two key files will be created in the specified location (by default in $HOME/.ssh/):
* *id_rsa* - private key
* id_rsa.pub - public key
The content of the public key file (one text line) is the key to be added to the user account on the site (see below).
@subsubsection occt_gitguide_3_2_3 Generating key with Git GUI
GitGUI (standard GUI interface included with Git) provides the option
to either generate the SSH key (if not present yet) or show the existing one.
Click Help/Show SSH key and copy the public key content for adding to the user account page (see below).
@subsection occt_gitguide_3_3 Adding public key in your account
Log in on the portal http://dev.opencascade.org and click on **My account** link to the right. If you have a Contributor status, you will see **SSH keys** tab to the right.
Click on that tab, then click **Add a public key**, and paste the text of the public key (see above sections on how to generate the key) into the text box.
Click **Save** to input the key to the system.
@image html OCCT_GitGuide_V2_image008.png
@image latex OCCT_GitGuide_V2_image008.png
Note that a user can have several SSH keys.
You can distinguish between these keys by the Title field ID; by default it is taken from SSH key comment.
It is typical to use your e-mail address or workstation name for this field; no restrictions are set by the portal.
Please note that some time (5-10 min) is needed for the system
to update the configuration after the new key is added.
After that time, you can try accessing Git.
@section occt_gitguide_4 WORK WITH REPOSITORY: DEVELOPER OPERATIONS
@subsection occt_gitguide_4_1 General workflow
To start working with OCCT source repository, you need to create its clone in your local system.
This cloned repository will manage your working copy of the sources
and provide you the means to exchange code between your clone and the origin.
In most cases it is sufficient to have one clone of the repository;
your working copy will be updated automatically by Git when you switch branches.
The typical development cycle for an issue is as follows:
* Create a new branch for your development, basing on the selected version of the sources
(usually the current master) and switch your working copy to it
* Develop and test your change. Note that for the first time, and after any changes
made in CDL files you will have to re-generate build scripts or Visual Studio projects using WOK.
* Do as many commits in your branch as you feel convenient;
the general recommendation is to commit every stable state (even incomplete), to record the history of your development.
* Push your branch to the repository when your development is complete or when you need to share it with other people (e.g. for review)
* Before the first push, rebase your local branch on the latest master;
consider collapsing the history in one commit unless you think the history of your commits is interesting for others.
Make sure to provide a good commit message.
* Do not amend the commits that have been already pushed in the remote repository,
If you need to rebase your branch, commit the rebased branch under a different name, and remove the old branch.
You can switch to another branch at any moment
(unless you have some uncommitted changes in the working copy)
and return back to the branch when necessary (e.g. to take into account review remarks).
Note that only the sources that are different between the switched branches will be modified,
thus required recompilation should be reasonably small in most cases.
@subsection occt_gitguide_4_2 Cloning official repository
Clone the official OCCT repository in one of following ways:
* From command line by command:
~~~~~
> git clone gitolite@git.dev.opencascade.org:occt <path>
~~~~~
where <i><path></i> is the path to the new folder which will be created for the repository.
* In TortoiseGit: create a new folder, open it and right-click in the Explorer window, then choose **Git Clone** in the context menu:
@image html OCCT_GitGuide_V2_image009.png
@image latex OCCT_GitGuide_V2_image009.png
If you have chosen Putty as SSH client during TortoiseGit installation, check the **Load Putty Key** option and specify the location of the private key file saved by PuttyGen (see 3.2.1). This shall be done for the first time only.
Note that on the first connection to the repository server you may be requested to enter a password for your private SSH key; further you can get a message that the authenticity of the host cannot be established and will be asked if you want to continue connecting or not. Choose **Yes** to continue. The hosts key will be stored in <i>$HOME/.ssh/known_hosts</i> file.
@subsection occt_gitguide_4_3 Branch creation
You need to create a branch when you are going to start development of a new change,
apply a patch, etc. It is recommended to fetch updates from the remote repository
before this operation, to make sure you work with the up-to-date version.
Create a branch from the current master branch unless you need to base your development on a particular version or revision.
In the console:
~~~~~
> git checkout -b CR12345 origin/master
~~~~~
In TortoiseGit:
* Go to the local copy of the repository.
* Right-click in the Explorer window, then choose **Git Create Branch**.
@image html OCCT_GitGuide_V2_image011.png
@image latex OCCT_GitGuide_V2_image011.png
* Select **Base On** Branch *remotes/origin/master*.
@image html OCCT_GitGuide_V2_image012.png
@image latex OCCT_GitGuide_V2_image012.png
Check option **Switch to new branch** if you are going to start working with the newly created branch immediately.
@subsection occt_gitguide_4_4 Branch switching
If you need to switch to another branch, use Git command checkout for that.
In the console:
~~~~~
> git checkout CR12345
~~~~~
In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Switch/Checkout**.
@image html OCCT_GitGuide_V2_image013.png
@image latex OCCT_GitGuide_V2_image013.png
Note that in order to work with the branch locally you need to set option
**Create new branch** when you checkout the branch from the remote repository for the first time.
Option **Track** stores association between the local branch and the original branch in a remote repository.
@subsection occt_gitguide_4_5 Committing branch changes
Commit your changes locally as soon as a stable status of the work is reached.
Make sure to review carefully the committed changes beforehand to avoid unintentional commit of a wrong code.
* In the console:
~~~~~
> git diff
> git commit -a -m "Write meaningful commit message here"
~~~~~
Option a tells the command to automatically include (stage) files
that have been modified or deleted, but it will omit the new files that might have been added by you.
To commit such new files, you must add (stage) them before commit command.
To find new unstaged files and them to commit, use commands:
~~~~~
> git status -s
?? file1.hxx
?? file2.cxx
> git add file1.hxx file2.cxx
~~~~~
* In TortoiseGit: right-click in the explorer window and select in the context menu <b>Git Commit -> CR…</b>:
@image html OCCT_GitGuide_V2_image014.png
@image latex OCCT_GitGuide_V2_image014.png
Unstaged files will be shown if you check the option Show Unversioned Files.
Double-clock on each modified file to see the changes to be committed (as a difference vs. the base version).
@subsection occt_gitguide_4_6 Pushing branch to the remote repository
When the code developed in your local branch is ready for review,
or you need to share it with others, push your local changes to the remote repository.
* In the console:
~~~~~
> git push "origin" CR12345:CR12345
~~~~~
* In TortoiseGit: right-click in the explorer window and select in the context menu, TortoiseGit -> **Push**
@image html OCCT_GitGuide_V2_image015.png
@image latex OCCT_GitGuide_V2_image015.png
Note that Git forbids pushing a branch if the corresponding remote branch already exists and has some changes, which are not in the history of your local branch. This may happen in different situations:
* You have amended the last commit which is already in the remote repository. If you are sure that nobody else uses your branch, push again with **Force** option.
* You have rebased your branch, so that now it is completely different from the branch in the remote repository. In this case, push it under a different name (add a suffix):
@image html OCCT_GitGuide_V2_image016.png
@image latex OCCT_GitGuide_V2_image016.png
Then remove the original remote branch so that other people recognize that it has been replaced by the new one. For that, select TortoiseGit -> **Push** again, select an empty line for your local branch name,
and enter the name of the branch to be removed in **Remote** field:
* The other developer has committed some changes in the remote branch. In this case, **Pull** changes from the remote repository to have them merged with your version, and push your branch after it is successfully merged.
@subsection occt_gitguide_4_7 Synchronizing with remote repository
Maintain your repository synchronized with the remote one and clean unnecessary stuff regularly.
Use Git command *fetch* with option *prune* to get the update of all branches from the remote repository and to clean your local repository from the remote branches that have been deleted.
* In the console:
~~~~~
> git fetch --prune
~~~~~
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Fetch**. Check in **Prune** check-box.
@image html OCCT_GitGuide_V2_image018.png
@image latex OCCT_GitGuide_V2_image018.png
If the branch you are working with has been changed in the remote repository, use Git command *pull* to get the remote changes and merge them with your local branch.
This operation is required in particular to update your local master branch when the remote master changes.
* In console:
~~~~~
> git pull
~~~~~
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Pull**.
@image html OCCT_GitGuide_V2_image019.png
@image latex OCCT_GitGuide_V2_image019.png
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration - that repository should not be used for long-term storage of incomplete changes.
Remove the local branches that you do not need any more. Note that you cannot delete the current branch. It means that you need to switch to another one (e.g. master) if the branch you are going to delete is the current one.
* In the console:
~~~~~
> git branch -d CR12345
~~~~~
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Git Show Log**.
@image html OCCT_GitGuide_V2_image020.png
@image latex OCCT_GitGuide_V2_image020.png
Select **All branches** check-box to view all branches.
Right-click on the branch you want to delete and select **Delete** item in the context menu.
Note that many functions described above can be accessed from the Log View, which is a very convenient tool to visualize and manage branches.
@subsection occt_gitguide_4_8 Applying a fix made on older version of OCCT
If you have a fix made on a previous version of OCCT, perform the following sequence of operations to prepare it for testing and integration to the current development version:
* Identify the version of OCCT on which the fix has been made. In most cases, this will be an OCCT release, e.g. OCCT 6.7.0.
* Find a tag or a commit corresponding to this version in the Git history log of the master branch.
* Create a branch basing on this tag or commit. In TortoiseGit history log: right-click on the base commit, then select **Create branch at this version**.
@image html OCCT_GitGuide_V2_image021.png
@image latex OCCT_GitGuide_V2_image021.png
* Check option **Switch to the new branch** to start working within the new branch immediately, or switch to it separately afterwards.
* Put your fix in the working copy, build and check that it works, then commit to the branch.
* Rebase the branch on the current master. In TortoiseGit: right-click on the working directory, choose **TortoiseGit** -> **Rebase**, select *remotes/origin/master* as UpStream revision, and click **Start**:
@image html OCCT_GitGuide_V2_image022.png
@image latex OCCT_GitGuide_V2_image022.png
Note that you can get some conflicts during rebase. To resolve them, double-click on each conflicted file (highlighted by red in the file list) to open visual merge tool. Switch between conflicting fragments by red arrows, and for each one decide if the code of one or both conflicting versions is to be taken.
@subsection occt_gitguide_4_9 Rebasing with history clean-up
At some moments you might need to rebase your branch on the latest version of the master.
We recommend rebasing before the first submission of the branch for review or when the master has diverged substantially from your branch.
Rebasing is a good occasion to clean-up the history of commits in the branch. Consider collapsing (squashing, in terms of Git) the history of your branch into a single commit unless you deem that having separate commits is important for your future work with the branch or its code reviewing. Git also allows changing the order of commits, edit commit contents and messages, etc.
To rebase your branch into a single commit, you need to do the following:
* Switch to your branch (e.g. “CR12345”)
* In TortoiseGit history log, select a branch to rebase on *(remotes/origin/master)* and in the context menu choose **Rebase “CR12345” onto this**.
* In the **Rebase** dialog, check **Squash All**. You can also change the order of commits and define for each commit whether it should be kept (**Pick**), edited, or just skipped.
@image html OCCT_GitGuide_V2_image023.png
@image latex OCCT_GitGuide_V2_image023.png
* Click **Start**.
* The process will stop if a conflict is detected. In that case, find files with status **Conflicted** in the list (marked by red), and double-click on them to resolve the conflict. When all conflicts are resolved, click **Continue**.
@image html OCCT_GitGuide_V2_image024.png
@image latex OCCT_GitGuide_V2_image024.png
* At the end of the process, edit the final commit message (it should start from the issue ID and a description from Mantis in the first line, followed by a summary of actual changes), and click **Commit**.
@image html OCCT_GitGuide_V2_image025.png
@image latex OCCT_GitGuide_V2_image025.png
@section occt_gitguide_5 Work with repository: Reviewer operations
@subsection occt_gitguide_5_1 Review branch changes using GitWeb
The changes made in the branch can be reviewed without direct access to Git, using GitWeb interface:
* Open GitWeb in your web browser: http://git.dev.opencascade.org/gitweb/?p=occt.git
* Locate the branch you want to review among **heads** (click ‘…’ at the bottom of the page to see the full list).
* Click **log** (or **shortlog**) to see the history of the branch.
**Note** that the branch can contain more than one commit, and you need to distinguish commits that belong to that branch (those to be reviewed) from the commits corresponding to the previous state of the master branch. Normally the first commit in the list that starts from the ID of the other issue indicates the branching point; commits above it are the ones to be reviewed.
* Click **commitdiff** on each log entry to review the changes (highlighted with color format).
@subsection occt_gitguide_5_2 Review branch changes with TortoiseGit
Use of TortoiseGit is recommended for convenient code review:
* Fetch the changes from the remote repository as described in <a href="#occt_gitguide_4_7">Synchronizing with remote repository</a> section.
* Right-click on the repository, choose **TortoiseGit** -> **Show** log;
* Locate the remote branch you need to review;
* To review commits one-by-one, select each commit in the log. The list of changed files is shown at the bottom of the window; double-click on the file will open visual compare tool.
* To review all changes made in the branch at once, or to compare two arbitrary revisions, select the corresponding commits in the log (e.g. the last commit in the branch and the branching point), ight-click for the context menu, and choose **Compare revisions**.
@image html OCCT_GitGuide_V2_image026.png
@image latex OCCT_GitGuide_V2_image026.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,593 @@
Automated Testing System {#dev_guides__tests}
======================================
@tableofcontents
@section testmanual_1 Introduction
This document provides overview and practical guidelines for work with OCCT automatic testing system.
Reading this section *Introduction* should be sufficient for OCCT developers to use the test system
to control non-regression of the modifications they implement in OCCT. Other sections provide
more in-depth description of the test system, required for modifying the tests and adding new test cases.
@subsection testmanual_1_1 Basic Information
OCCT automatic testing system is organized around DRAW Test Harness @ref user_guides__test_harness "DRAW Test Harness",
a console application based on Tcl (a scripting language) interpreter extended by OCCT-related commands.
Standard OCCT tests are included with OCCT sources and are located in subdirectory *tests*
of the OCCT root folder. Other test folders can be included in the scope of the test system,
e.g. for testing applications based on OCCT.
Logically the tests are organized in three levels:
* Group: group of related test grids, usually relating to some part of OCCT functionality (e.g. blend)
* Grid: set of test cases within a group, usually aimed at testing some particular aspect or mode of execution of the relevant functionality (e.g. buildevol)
* Test case: script implementing individual test (e.g. K4)
Some tests involve data files (typically CAD models) which are located separately
and are not included with OCCT code. The archive with publicly available
test data files should be downloaded and installed independently on OCCT code from dev.opencascade.org.
@subsection testmanual_1_2 Intended Use of Automatic Tests
Each modification made in OCCT code must be checked for non-regression
by running the whole set of tests. The developer who does the modification
is responsible for running and ensuring non-regression on the tests that are available to him.
Note that many tests are based on data files that are confidential and thus available only at OPEN CASCADE.
Thus official certification testing of the changes before integration to master branch
of official OCCT Git repository (and finally to the official release) is performed by OPEN CASCADE in any case.
Each new non-trivial modification (improvement, bug fix, new feature) in OCCT
should be accompanied by a relevant test case suitable for verifying that modification.
This test case is to be added by developer who provides the modification.
If a modification affects result of some test case(s),
either the modification should be corrected (if it causes regression)
or affected test cases should be updated to account for the modification.
The modifications made in the OCCT code and related test scripts
should be included in the same integration to master branch.
@subsection testmanual_1_3 Quick Start
@subsubsection testmanual_1_3_1 Setup
Before running tests, make sure to define environment variable CSF_TestDataPath
pointing to the directory containing test data files.
(The publicly available data files can be downloaded
from http://dev.opencascade.org separately from OCCT code.)
The recommended way for that is adding a file *DrawInitAppli*
in the directory which is current at the moment of starting DRAWEXE (normally it is $CASROOT).
This file is evaluated automatically at the DRAW start. Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
set env(CSF_TestDataPath) d:/occt/tests_data
return ;# this is to avoid an echo of the last command above in cout
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All tests are run from DRAW command prompt, thus first run draw.tcl or draw.sh to start DRAW.
@subsubsection testmanual_1_3_2 Running Tests
To run all tests, type command *testgrid* followed by path
to the new directory where results will be saved.
It is recommended that this directory should be new or empty;
use option overwrite to allow writing logs in existing non-empty directory.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[]> testgrid d:/occt/results-2012-02-27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If empty string is given as log directory name, the name will be generated automatically
using current date and time, prefixed by *results_*. Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[]> testgrid {}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For running only some group or a grid of tests,
give additional arguments indicating group and (if needed) grid. Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[]> testgrid d:/occt/results-2012-02-28 blend simple
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As the tests progress, the result of each test case is reported.
At the end of the log summary of test cases is output,
including list of detected regressions and improvements, if any. Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Tests summary
CASE 3rdparty export A1: OK
...
CASE pipe standard B1: BAD (known problem)
CASE pipe standard C1: OK
No regressions
Total cases: 208 BAD, 31 SKIPPED, 3 IMPROVEMENT, 1791 OK
Elapsed time: 1 Hours 14 Minutes 33.7384512019 Seconds
Detailed logs are saved in D:/occt/results_2012-06-04T0919
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The tests are considered as non-regressive if only OK, BAD (i.e. known problem),
and SKIPPED (i.e. not executed, e.g. because of lack of data file) statuses are reported.
See <a href="#testmanual_3_4">Grids *cases.list* file</a> chapter for details.
The detailed logs of running tests are saved in the specified directory and its sub-directories.
Cumulative HTML report summary.html provides links to reports on each test case.
An additional report TESTS-summary.xml is output in JUnit-style XML format
that can be used for integration with Jenkins or other continuous integration system.
Type *help testgrid* in DRAW prompt to get help on additional options supported by testgrid command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[3]> help testgrid
testgrid: Run all tests, or specified group, or one grid
Use: testgrid logdir [group [grid]] [options...]
Allowed options are:
-verbose {0-2}: verbose level, 0 by default, can be set to 1 or 2
-parallel N: run in parallel with up to N processes (default 0)
-refresh N: save summary logs every N seconds (default 60)
-overwrite: force writing logs in existing non-empty directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsubsection testmanual_1_3_3 Running Single Test
To run single test, type command *test* followed by names of group, grid, and test case.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[1]> test blend simple A1
CASE blend simple A1: OK
Draw[2]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that normally intermediate output of the script is not shown.
To see intermediate commands and their output, type command *decho on*
before running the test case. (Type decho off to disable echoing when not needed.)
The detailed log of the test can also be obtained after the test execution by command *dlog get*.
@section testmanual_2 Organization of Test Scripts
@subsection testmanual_2_1 General Layout
Standard OCCT tests are located in subdirectory tests of the OCCT root folder ($CASROOT).
Additional test folders can be added to the test system
by defining environment variable CSF_TestScriptsPath.
This should be list of paths separated by semicolons (*;*) on Windows
or colons (*:*) on Linux or Mac. Upon DRAW launch,
path to tests sub-folder of OCCT is added at the end of this variable automatically.
Each test folder is expected to contain:
* Optional file parse.rules defining patterns for interpretation of test results, common for all groups in this folder
* One or several test group directories.
Each group directory contains:
* File grids.list that identifies this test group and defines list of test grids in it.
* Test grids (sub-directories), each containing set of scripts for test cases, and optional files cases.list, parse.rules, begin, and end.
* Optional sub-directory data
* Optional file parse.rules
* Optional files begin and end
By convention, names of test groups, grids, and cases should contain no spaces and be lowercase.
Names begin, end, data, parse.rules, grids.list, cases.list are reserved.
General layout of test scripts is shown on Figure 1.
@image html /dev_guides/tests/images/tests_image001.png
@image latex /dev_guides/tests/images/tests_image001.png
Figure 1. Layout of tests folder
@subsection testmanual_2_2 Test Groups
@subsubsection testmanual_2_2_1 Group Names
Test folder usually contains several directories representing test groups (Group 1, Group N).
Each directory contains test grids for certain OCCT functionality.
The name of directory corresponds to this functionality.
Example:
@verbatim
caf
mesh
offset
@endverbatim
@subsubsection testmanual_2_2_2 Group's *grids.list* File
The test group must contain file *grids.list* file
which defines ordered list of grids in this group in the following format:
~~~~~~~~~~~~~~~~~
001 gridname1
002 gridname2
...
NNN gridnameN
~~~~~~~~~~~~~~~~~
Example:
~~~~~~~~~~~~~~~~~
001 basic
002 advanced
~~~~~~~~~~~~~~~~~
@subsubsection testmanual_2_2_3 Group's *begin* File
The file *begin* is a Tcl script. It is executed before every test in current group.
Usually it loads necessary Draw commands, sets common parameters and defines
additional Tcl functions used in test scripts.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
pload TOPTEST ;# load topological command
set cpulimit 300 ;# set maximum time allowed for script execution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsubsection testmanual_2_2_4 Group's *end* File
The file end is a TCL script. It is executed after every test in current group.
Usually it checks the results of script work, makes a snap-shot
of the viewer and writes *TEST COMPLETED* to the output.
Note: *TEST COMPLETED* string should be presented in output
in order to signal that test is finished without crash.
See <a href="#testmanual_3">Creation And Modification Of Tests</a> chapter for more information.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
if { [isdraw result] } {
checkshape result
} else {
puts *Error: The result shape can not be built*
}
puts *TEST COMPLETED*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsubsection testmanual_2_2_5 Groups *parse.rules* File
The test group may contain *parse.rules* file.
This file defines patterns used for analysis of the test execution log
and deciding the status of the test run.
Each line in the file should specify a status (single word),
followed by a regular expression delimited by slashes (*/*)
that will be matched against lines in the test output log to check if it corresponds to this status.
The regular expressions support subset of the Perl re syntax.
The rest of the line can contain a comment message
which will be added to the test report when this status is detected.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
FAILED /\\b[Ee]xception\\b/ exception
FAILED /\\bError\\b/ error
SKIPPED /Cannot open file for reading/ data file is missing
SKIPPED /Could not read file .*, abandon/ data file is missing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lines starting with a *#* character and blank lines are ignored to allow comments and spacing.
See <a href="#testmanual_2_3_4">Interpretation of test results</a> chapter for details.
If a line matches several rules, the first one applies.
Rules defined in the grid are checked first, then rules in group,
then rules in the test root directory. This allows defining some rules on the grid level
with status IGNORE to ignore messages that would otherwise be treated as errors due to the group level rules.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
FAILED /\\bFaulty\\b/ bad shape
IGNORE /^Error [23]d = [\d.-]+/ debug output of blend command
IGNORE /^Tcl Exception: tolerance ang : [\d.-]+/ blend failure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsection testmanual_2_3 Test Grids
@subsubsection testmanual_2_3_1 Grid Names
Group folder can have several sub-directories (Grid 1… Grid N) defining test grids.
Each test grid directory contains a set of related test cases.
The name of directory should correspond to its contents.
Example:
caf
basic
bugs
presentation
Where **caf** is the name of test group and *basic*, *bugs*, *presentation*, etc are the names of grids.
@subsubsection testmanual_2_3_2 Grids *begin* File
The file *begin* is a TCL script. It is executed before every test in current grid.
Usually it sets variables specific for the current grid.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
set command bopfuse ;# command tested in this grid
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsubsection testmanual_2_3_3 Grids *end* File
The file *end* is a TCL script. It is executed after every test in current grid.
Usually it executes specific sequence of commands common for all tests in the grid.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
vdump $logdir/${casename}.gif ;# makes a snap-shot of AIS viewer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsubsection testmanual_2_3_4 Grids *cases.list* File
The grid directory can contain an optional file cases.list
defining alternative location of the test cases.
This file should contain singe line defining the relative path to collection of test cases.
Example:
../data/simple
This option is used for creation of several grids of tests with the same data files
and operations but performed with differing parameters.
The common scripts are usually located place in common
subdirectory of the test group (data/simple as in example).
If cases.list file exists then grid directory should not contain any test cases.
The specific parameters and pre- and post-processing commands
for the tests execution in this grid should be defined in the begin and end files.
@subsection testmanual_2_4 Test Cases
The test case is TCL script which performs some operations using DRAW commands
and produces meaningful messages that can be used to check the result for being valid.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
pcylinder c1 10 20 ;# create first cylinder
pcylinder c2 5 20 ;# create second cylinder
ttranslate c2 5 0 10 ;# translate second cylinder to x,y,z
bsection result c1 c2 ;# create a section of two cylinders
checksection result ;# will output error message if result is bad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The test case can have any name (except reserved names begin, end, data, cases.list, parse.rules).
For systematic grids it is usually a capital English letter followed by a number.
Example:
@verbatim
A1
A2
B1
B2
@endverbatim
Such naming facilitates compact representation of results
of tests execution in tabular format within HTML reports.
@subsection testmanual_2_5 Directory *data*
The test group may contain subdirectory data.
Usually it contains data files used in tests (BREP, IGES, STEP, etc.)
and / or test scripts shared by different test grids
(in subdirectories, see <a href="#testmanual_2_3_4">Grids *cases.list* file</a> chapter).
@section testmanual_3 Creation And Modification Of Tests
This section describes how to add new tests and update existing ones.
@subsection testmanual_3_1 Choosing Group, Grid, and Test Case Name
The new tests are usually added in context of processing some bugs.
Such tests in general should be added to group bugs, in the grid
corresponding to the affected OCCT functionality.
New grids can be added as necessary to contain tests on functionality not yet covered by existing test grids.
The test case name in the bugs group should be prefixed by ID
of the corresponding issue in Mantis (without leading zeroes).
It is recommended to add a suffix providing a hint on the situation being tested.
If more than one test is added for a bug, they should be distinguished by suffixes;
either meaningful or just ordinal numbers.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
12345_coaxial
12345_orthogonal_1
12345_orthogonal_2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the case if new test corresponds to functionality for which
specific group of tests exists (e.g. group mesh for BRepMesh issues),
this test can be added (or moved later by OCC team) to this group.
@subsection testmanual_3_2 Adding Data Files Required for a Test
It is advisable that tests scripts should be made self-contained whenever possible,
so as to be usable in environments where data files are not available.
For that simple geometric objects and shapes can be created using DRAW commands in the test script itself.
If test requires some data file, it should be put to subdirectory data of the test grid.
Note that when test is integrated to master branch,
OCC team can move data file to data files repository,
so as to keep OCCT sources repository clean from big data files.
When preparing a test script, try to minimize size of involved data model.
For instance, if problem detected on a big shape can be reproduced on a single face
extracted from that shape, use only this face in the test.
@subsection testmanual_3_3 Implementation of the Script
Test should run commands necessary to perform the operations being tested,
in a clean DRAW session. This includes loading necessary functionality by *pload* command,
if this is not done by *begin* script. The messages produced by commands in standard output
should include identifiable messages on the discovered problems if any.
Usually the script represents a set of commands that a person would run interactively
to perform the operation and see its results, with additional comments to explain what happens.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
# Simple test of fusing box and sphere
box b 10 10 10
sphere s 5
bfuse result b s
checkshape result
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Make sure that file parse.rules in the grid or group directory contains
regular expression to catch possible messages indicating failure of the test.
For instance, for catching errors reported by *checkshape* command
relevant grids define a rule to recognize its report by the word *Faulty*: FAILED /\\bFaulty\\b/ bad shape
For the messages generated in the script the most natural way is to use the word *Error* in the message.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
set expected_length 11
if { [expr $actual_length - $expected_length] > 0.001 } {
puts *Error: The length of the edge should be $expected_length*
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At the end, the test script should output *TEST COMPLETED* string
to mark successful completion of the script.
This is often done by the end script in the grid.
When test script requires data file, use Tcl procedure *locate_data_file*
to get path to the data file, rather than explicit path.
This will allow easy move of the data file from OCCT repository
to the data files repository without a need to update test script.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
stepread [locate_data_file CAROSKI_COUPELLE.step] a *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When test needs to produce some snapshots or other artifacts,
use Tcl variable logdir as location where such files should be put.
Command *testgrid* sets this variable to the subdirectory of the results folder
corresponding to the grid. Command *test* sets it to $CASROOT/tmp unless it is already defined.
Use Tcl variable casename to prefix all the files produced by the test.
This variable is set to the name of the test case.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
xwd $logdir/${casename}.gif
vdisplay result; vfit
vdump $logdir/${casename}-axo.gif
vfront; vfit
vdump $logdir/${casename}-front.gif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
could produce:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
A1.gif
A1-axo.gif
A1-front.gif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@subsection testmanual_3_4 Interpretation of Test Results
The result of the test is evaluated by checking its output against patterns
defined in the files parse.rules of the grid and group.
The OCCT test system recognizes five statuses of the test execution:
* SKIPPED: reported if line matching SKIPPED pattern is found (prior to any FAILED pattern). This indicates that the test cannot be run in the current environment; most typical case is absence of the required data file.
* FAILED: reported if some line matching pattern with status FAILED is found (unless it is masked by preceding IGNORE pattern or a TODO statement, see below), or if message TEST COMPLETED is not found at the end. This indicates that test produces bad or unexpected result, and usually highlights a regression.
* BAD: reported if test script output contains one or several TODO statements and corresponding number of matching lines in the log. This indicates a known problem (see 3.5). The lines matching TODO statements are not checked against other patterns and thus will not cause a FAILED status.
* IMPROVEMENT: reported if test script output contains TODO statement for which no corresponding line is found. This is possible indication of improvement (known problem disappeared).
* OK: If none of the above statuses have been assigned. This means test passed without problems.
Other statuses can be specified in the parse.rules files, these will be classified as FAILED.
Before integration of the change to OCCT repository, all tests should return either OK or BAD status.
The new test created for unsolved problem should return BAD.
The new test created for a fixed problem should return FAILED without the fix, and OK with the fix.
@subsection testmanual_3_5 Marking BAD Cases
If the test produces invalid result at a certain moment then the corresponding bug
should be created in the OCCT issue tracker http://tracker.dev.opencascade.org,
and the problem should be marked as TODO in the test script.
The following statement should be added to such test script:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
puts *TODO BugNumber ListOfPlatforms: RegularExpression*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where:
* BugNumber is an ID of the bug in the tracker. For example: #12345
* ListOfPlatform is a list of platforms at which the bug is reproduced (e.g. Mandriva2008, Windows or All).
*Note: the platform name is custom for the OCCT test system;*
*it can be consulted as value of environment variable os_type defined in DRAW.*
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
Draw[2]> puts $env(os_type)
windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
* RegularExpression is a regular expression which should be matched against the line indicating the problem in the script output.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
puts *TODO #22622 Mandriva2008: Abort .* an exception was raised*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Parser checks the output of the test and if an output line matches
the RegularExpression then it will be assigned a BAD status instead of FAILED.
For each output line matching to an error expression a separate TODO line
must be added to mark the test as BAD.
If not all the TODO statements are found in the test log,
the test will be considered as possible improvement.
To mark the test as BAD for an incomplete case
(when final TEST COMPLETE message is missing)
the expression *TEST INCOMPLETE* should be used instead of regular expression.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
puts *TODO OCC22817 All: exception.+There are no suitable edges*
puts *TODO OCC22817 All: \\*\\* Exception \\*\\**
puts *TODO OCC22817 All: TEST INCOMPLETE*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@section testmanual_4 Extended Use
@subsection testmanual_4_1 Running Tests on Older Versions of OCCT
Sometimes it might be necessary to run tests on previous versions of OCCT (up to to 6.5.3)
that do not include this test system. This can be done by adding DRAW configuration file DrawAppliInit
in the directory which is current by the moment of DRAW startup,
to load test commands and define necessary environment. Example
(assume that d:/occt contains up-to-date version of OCCT sources
with tests, and test data archive is unpacked to d:/test-data):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
set env(CASROOT) d:/occt
set env(CSF_TestScriptsPath) $env(CASROOT)/tests
source $env(CASROOT)/src/DrawResources/TestCommands.tcl
set env(CSF_TestDataPath) d:/test-data
return
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that on older versions of OCCT the tests are run in compatibility mode
and not all output of the test command can be captured;
this can lead to absence of some error messages (can be reported as improvement).
@subsection testmanual_4_2 Adding Custom Tests
You can extend the test system by adding your own tests.
For that it is necessary to add paths to the directory where these tests are located,
and additional data directory(ies), to the environment variables CSF_TestScriptsPath and CSF_TestDataPath.
The recommended way for doing this is using DRAW configuration file DrawAppliInit
located in the directory which is current by the moment of DRAW startup.
Use Tcl command *_path_separator* to insert platform-dependent separator to the path list.
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.tcl}
set env(CSF_TestScriptsPath) \
$env(TestScriptsPath)[_path_separator]d:/MyOCCTProject/tests
set env(CSF_TestDataPath) \
d:/occt/test-data[_path_separator]d:/MyOCCTProject/tests
return ;# this is to avoid an echo of the last command above in cout
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

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