1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

..

117 Commits

Author SHA1 Message Date
abk
8415a280ed Tolerance post Build (Perform) fix was changed for BRepOffset_MakeOffset.
Standard_Boolean parameter theCopy with default value Standard_False was
added to methods LocOpe_WiresOnShape::Bind to determine whether bind
passing shape or its copy.

Tolerance post Build (Perform) fix was created for
- BiTgte_Blend,
- LocOpe_Spliter.

Commands checkshape were added to tests:
- bugs modalg_2 bug22864,
-               bug22946,
-      modalg_4 bug8842_1.

Minor change in BRepFeat_SplitShape.cxx.
2013-03-14 16:57:54 +04:00
abk
85c81d703f Tolerances were changed for input shapes in tests:
- bugs modalg_1 buc60462_2,
-               bug1255,
-               bug1255_1,
- bugs modalg_2 bug19811,
-               bug22781_1,
-               bug22781_2,
-               bug22781_3,
-               bug22781_4,
- bugs modalg_4 bug625,
-               bug767,
- bugs moddata_2 bug75_2,
- bugs vis bug288_10,
- bugs vis bug288_7,
- pipe specific A1 - A9,
-               B1 - B9,
-               C1 - C6,
-               K3 - K9,
-               L1 - L9,
-               M1 - M9,
-               N1 - N5,
-               S8 - S9,
-               T1 - T9,
-               U1 - U7.

Error messages were changed in tests and test files:
- bugs modalg_2 bug472_2,
- heal data advanced H5,
-      drop_small_edges A4.

Input shapes checks were added in test bugs modalg_4 bug8842_1.
2013-03-12 11:34:32 +04:00
abk
7aad5710fb Build fix in CDL files. 2013-03-06 15:11:32 +04:00
abk
f7e8fe1d88 Tolerance post Build (Perform) fix was changed for:
- BRepBuilderAPI_Sewing,
- BRepFeat_MakePrism,
- BRepFilletAPI_MakeChamfer,
- BRepFilletAPI_MakeFillet,
- BRepOffsetAPI_MakePipe,
- BRepOffsetAPI_MakePipeShell
so that input shapes remain unchanged by the fix.

Tolerance post Build (Perform) fix was slightly changed for:
- BRepOffsetAPI_NormalProjection,
- ShapeFix_Shape,
- ShapeUpgrade_ShapeDivide.

Correction of tolerances in input shapes was made for tests:
- blend buildevol F9,
-       complex B6,
-               B8,
-               D5,
-               E2,
-               E4,
-               E6,
-               E9,
- sewing tol_0_01 G3,
-                 G4.
2013-03-06 15:11:28 +04:00
abk
472c48335d Class BRepLib_ToleranceRule was created to work with shape tolerances by
tolerance rule.

Some code from BRepLib was moved to BRepLib_ToleranceRule.
2013-03-06 15:11:25 +04:00
abk
a8301722d0 Error message was changed in test 'bugs modalg bug10232'.
Error message was changed in test file 'heal data advanced ZD1'.
2013-03-06 15:11:21 +04:00
abk
1abff7396b Error message was changed in tests:
- blend complex F6,
-               F8,
- bugs fclasses bug309,

Error message was changed in test data files:
- chamfer data complex B5,
-                      B7,
- heal data advanced ZD3,
-           standard R5.
2013-03-06 15:11:18 +04:00
abk
a5806fd49e Input shapes were corrected by 'updatetolerance' in tests:
- bugs modalg bug697_3,
-             bug697_4,
-             bug697_7,
-             bug697_8,
-             bug697_11,
-             bug1255,
-             bug1255_1,
-             bug5729,
-             bug6181,
-             bug6182,
-             bug6272_85,
-             bug6272_86,
-             bug10842_5.
2013-03-06 15:07:17 +04:00
abk
65b387bd75 Draw command 'EnsureTolRule' was replaced by command 'updatetolerance' in
tests.

Draw command 'EnsureTolRule' was removed.
2013-03-06 15:04:42 +04:00
abk
3e9d304d46 BRepBuilderAPI_MakeShape::EnsureToleranceRule was replaced by
BRepLib::UpdateTolerances.

BRepBuilderAPI_MakeShape::EnsureToleranceRule was removed.
2013-03-06 15:04:04 +04:00
abk
916851661a Error messages was changed in test case data file chamfer/data/complex/B9. Error message was changed in test cases: - thrusection/solids/A2, - A3, - A4, - A5, - A6, - A7, - A8, - A9. 2013-03-06 14:59:46 +04:00
abk
5ed5c561b0 Error message was changed in test case data files: - heal/data/advanced/H5, - S7, - ZC3, - ZE6, - ZE8, - ZE9. Result shape in the tests is invalid. 2013-03-06 14:59:42 +04:00
abk
36228fd825 Error message was changed in test case heal/drop_small|_edges/A4. Result shape in the test is invalid. 2013-03-06 14:59:38 +04:00
abk
168b9ec45a Draw function nexplode was replaced by explode in test case
blend/complex/D4.
Calculation of gravity center was removed for degenerated edge.
It is revealed that function nexplode does not work on shapes with
degenerated edges.

Comments.
Calculation of gravity center was made by vertices data in case of
degenerated edge without representations especially for test case
blend/complex/D4. The mass of the edge was set to 1. The mass near 0 does
not satisfy the test case. As a result test case bugs/moddata/bug268
became failed. Because only the mass near 0 satisfies last test case.
2013-03-06 14:56:53 +04:00
abk
7ed3f1cf33 Error message was changed in test case heal/drop_small_edges/A4. 2013-03-06 14:56:50 +04:00
abk
c3cf76dfbd Calculation of gravity center was made by vertices data for degenerated
edge without representations.
2013-03-06 14:51:30 +04:00
abk
3d9cefa6a7 Correction of tolerances in result shape was made for group boolean and
grids:
- heal drop_small_edges,
       fix_face_size,
       fix_gaps,
       split_angle_advanced,
       surface_to_bspline.

Correction of tolerances in input shapes was made for tests:
- bugs heal bug329,
- bugs modalg buc60462_1,
              buc60463,
              bug292,
              bug317,
              bug330,
              bug452_2,
              bug452_3,
              bug625,
              bug697_1,
              bug698,
              bug774_1,
              bug776_1,
              bug776_2,
              bug80,
              bug919,
- bugs moddata buc60652_2,
               buc60652_3,
               buc60707,
               bug368,
               bug75_2,
               fra62476_2,
               ger61235,
               pro20333,
- bugs step buc60948,
- bugs step bug630,
- bugs vis buc60661,
- bugs vis bug288_1,
- bugs vis bug288_4,
- bugs xde bug859,
- bugs xde bug861,
- feat featlf B8,
       featprism L2,
                 L8,
                 M1,
                 O6,
                 O9,
                 R1,
                 S1,
                 S2,
- sewing tol_0_01 T1.
2013-03-06 14:51:27 +04:00
abk
dca967d0b8 Method BRepGProp::LinearProperties was changed to avoid degenerated edges. 2013-03-06 14:51:02 +04:00
abk
064a93b073 Method BRepBuilderAPI_MakeShape::EnsureToleranceRule was made slightly
simpler.

Tolerance post Build (Perform) fix was made for:
- BRepAlgoAPI_BooleanOperation,
- BRepFeat_MakePrism,
- BRepOffsetAPI_MakePipeShell.

Draw command getsourcefile now returns result for:
- buildsweep,
- simulsweep,
- geompipe.
2013-03-06 14:50:57 +04:00
abk
b015a803fc Application of EnsureToleranceRule to ShapeFix_Shape was fixed. 2013-03-06 14:46:41 +04:00
abk
43809f7eec Static public method EnsureToleranceRule(const TopoDS_Shape & theS) was
created in class BRepBuilderAPI_MakeShape to fix all tolerances of the
shape and it's subshapes by the tolerance rule:
vertex tolerance >= edge tolerance >= face tolerance.
Edge or vertex tolerance which does not satisfy the tolerance rule will be
increased.
Draw command EnsureTolRule was created to test new functional.
Tolerance post Build (Perform) fix was made for:
- BRepBuilderAPI_Sewing,
- BRepFilletAPI_MakeChamfer,
- BRepFilletAPI_MakeFillet,
- BRepOffsetAPI_MakePipe,
- BRepOffsetAPI_NormalProjection,
- ShapeFix_Shape,
- ShapeUpgrade_ShapeDivide.
2013-03-06 14:46:38 +04:00
abv
eeb913ae52 0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
In BRepCheck, added check for tolerance of face to be not greater than tolerance of edge, and tolerance of edge not greater than tolerance of its vertices
2013-03-06 14:46:35 +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
5446 changed files with 158252 additions and 201986 deletions

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
@@ -208,33 +205,23 @@ 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
@@ -242,13 +229,11 @@ p Voxel
p WNT
p Xw
p Cocoa
r FontMFT
r Textures
t TKMeshVS
t TKNIS
t TKOpenGl
t TKService
t TKV2d
t TKV3d
t TKVoxel
n BinTObjDrivers
@@ -475,7 +460,6 @@ p TObjDRAW
p TestTopOpe
p TestTopOpeDraw
p TestTopOpeTools
p Viewer2dTest
p ViewerTest
p XDEDRAW
p XSDRAW
@@ -497,9 +481,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

View File

@@ -4,7 +4,7 @@
#pragma warning( disable : 4800 )
OCCViewer::OCCViewer(void)
{
myGraphicDevice=NULL;
myGraphicDriver=NULL;
myViewer=NULL;
myView=NULL;
myAISContext=NULL;
@@ -17,22 +17,27 @@ OCCViewer::~OCCViewer(void)
bool OCCViewer::InitViewer(void* wnd)
{
try {
myGraphicDevice = new Graphic3d_WNTGraphicDevice();
} catch (Standard_Failure) {
return false;
}
TCollection_ExtendedString a3DName("Visu3D");
myViewer = new V3d_Viewer( myGraphicDevice, a3DName.ToExtString(),"", 1000.0,
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
Standard_True, Standard_False);
try
{
Handle(Aspect_DisplayConnection) aDisplayConnection;
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
}
catch (Standard_Failure)
{
return false;
}
TCollection_ExtendedString a3DName("Visu3D");
myViewer = new V3d_Viewer (myGraphicDriver, a3DName.ToExtString(),"", 1000.0,
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
Standard_True, Standard_False);
myViewer->Init();
myViewer->SetDefaultLights();
myViewer->SetLightOn();
myView = myViewer->CreateView();
Handle(WNT_Window) aWNTWindow = new WNT_Window(myGraphicDevice, reinterpret_cast<HWND> (wnd));
Handle(WNT_Window) aWNTWindow = new WNT_Window (reinterpret_cast<HWND> (wnd));
myView->SetWindow(aWNTWindow);
if (!aWNTWindow->IsMapped())
aWNTWindow->Map();
@@ -543,9 +548,12 @@ void OCCViewer::CreateNewView(void* wnd)
if (myAISContext.IsNull())
return;
myView = myAISContext->CurrentViewer()->CreateView();
if (myGraphicDevice.IsNull())
myGraphicDevice = new Graphic3d_WNTGraphicDevice();
Handle(WNT_Window) aWNTWindow = new WNT_Window(myGraphicDevice, reinterpret_cast<HWND> (wnd));
if (myGraphicDriver.IsNull())
{
Handle(Aspect_DisplayConnection) aDisplayConnection;
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
}
Handle(WNT_Window) aWNTWindow = new WNT_Window (reinterpret_cast<HWND> (wnd));
myView->SetWindow(aWNTWindow);
Standard_Integer w=100, h=100;
aWNTWindow->Size(w,h);

View File

@@ -11,7 +11,7 @@ private:
Handle_V3d_Viewer myViewer;
Handle_V3d_View myView;
Handle_AIS_InteractiveContext myAISContext;
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
Handle_Graphic3d_GraphicDriver myGraphicDriver;
public:
__declspec(dllexport) bool InitViewer(void* wnd);
__declspec(dllexport) bool ImportBRep(char* filename);

View File

@@ -23,9 +23,11 @@
#include <PTColStd_PersistentTransientMap.hxx>
#include <TCollection_AsciiString.hxx>
//for OCC graphic
#include <Aspect_DisplayConnection.hxx>
#include <WNT_Window.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Graphic3d.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
//for object display
#include <V3d_Viewer.hxx>

View File

@@ -28,7 +28,6 @@
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>

View File

@@ -27,7 +27,6 @@
#include <Standard.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>

View File

@@ -126,8 +126,7 @@ CViewer3dView::CViewer3dView()
myDegenerateModeIsOn=Standard_True;
m_Pen = NULL;
NbActiveLights=2; // There are 2 default active lights
myGraphicDriver = Handle(Graphic3d_GraphicDriver)::DownCast(
((CViewer3dApp*)AfxGetApp())->GetGraphicDevice()->GraphicDriver() );
myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver();
}
CViewer3dView::~CViewer3dView()
@@ -158,11 +157,7 @@ void CViewer3dView::OnInitialUpdate()
// store for restore state after rotation (witch is in Degenerated mode)
myDegenerateModeIsOn = Standard_True;
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
((CViewer3dApp*)AfxGetApp())->GetGraphicDevice();
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
myView->SetWindow(aWNTWindow);
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();

View File

@@ -88,14 +88,12 @@
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <MMgt_TShared.hxx>
#include <OSD_Environment.hxx>
#include <Precision.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Text.hxx>
#include <PrsMgr_PresentationManager2d.hxx>
#include <Quantity_Factor.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_NameOfColor.hxx>
@@ -121,9 +119,6 @@
#include <StdPrs_Curve.hxx>
#include <StdPrs_Point.hxx>
#include <StdPrs_PoleCurve.hxx>
#include <StdSelect_SensitiveText2d.hxx>
#include <StdSelect_TextProjector2d.hxx>
#include <StdSelect_ViewerSelector2d.hxx>
#include <TCollection_AsciiString.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
@@ -145,7 +140,6 @@
#include <UnitsAPI.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
#include <WNT_WDriver.hxx>
#include <WNT_Window.hxx>
// specific STEP

View File

@@ -92,7 +92,6 @@
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <MMgt_TShared.hxx>
#include <OSD_Environment.hxx>
#include <Precision.hxx>
@@ -100,7 +99,6 @@
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_Text.hxx>
#include <PrsMgr_PresentationManager2d.hxx>
#include <Quantity_Factor.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_NameOfColor.hxx>
@@ -126,9 +124,6 @@
#include <StdPrs_Curve.hxx>
#include <StdPrs_Point.hxx>
#include <StdPrs_PoleCurve.hxx>
#include <StdSelect_SensitiveText2d.hxx>
#include <StdSelect_TextProjector2d.hxx>
#include <StdSelect_ViewerSelector2d.hxx>
#include <TCollection_AsciiString.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
@@ -149,7 +144,6 @@
#include <UnitsAPI.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
#include <WNT_WDriver.hxx>
#include <WNT_Window.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>

View File

@@ -78,7 +78,6 @@
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>

View File

@@ -49,11 +49,11 @@ CAnimationDoc::CAnimationDoc()
StaticCount++;
myCount = StaticCount;
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
((CAnimationApp*)AfxGetApp())->GetGraphicDevice();
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
((CAnimationApp*)AfxGetApp())->GetGraphicDriver();
TCollection_ExtendedString a3DName("Visu3D");
myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0,
myViewer = new V3d_Viewer(aGraphicDriver,a3DName.ToExtString(),"", 1000.0,
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
Standard_True, Standard_False);
@@ -86,7 +86,7 @@ CAnimationDoc::CAnimationDoc()
TCHAR tchBuf[80];
CString CASROOTValue = ((GetEnvironmentVariable("CASROOT", tchBuf, 80) > 0) ? tchBuf : NULL);
aString = (CASROOTValue + "\\..\\data\\occ");
aString = (CASROOTValue + "\\data\\occ");
char DataDirPath[200];
strcpy_s(DataDirPath, aString);

View File

@@ -152,10 +152,7 @@ void CAnimationView3D::OnInitialUpdate()
// store for restore state after rotation (witch is in Degenerated mode)
myDegenerateModeIsOn = myView->DegenerateModeIsOn();
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
((CAnimationApp*)AfxGetApp())->GetGraphicDevice();
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
myView->SetWindow(aWNTWindow);
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();

View File

@@ -154,36 +154,18 @@ enum CurrentAction3d {
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <Graphic2d_Array1OfVertex.hxx>
#include <Graphic2d_Buffer.hxx>
#include <Graphic2d_CircleMarker.hxx>
#include <Graphic2d_DisplayList.hxx>
#include <Graphic2d_Drawer.hxx>
#include <Graphic2d_PolyLine.hxx>
#include <Graphic2d_Segment.hxx>
#include <Graphic2d_SetOfCurves.hxx>
#include <Graphic2d_SetOfSegments.hxx>
#include <Graphic2d_Text.hxx>
#include <Graphic2d_Vertex.hxx>
#include <Graphic2d_View.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <MMgt_TShared.hxx>
#include <OSD_Environment.hxx>
#include <Precision.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Text.hxx>
#include <PrsMgr_PresentationManager2d.hxx>
#include <Quantity_Factor.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Quantity_PhysicalQuantity.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_TypeOfColor.hxx>
#include <Select2D_SensitiveArc.hxx>
#include <Select2D_SensitiveBox.hxx>
#include <Select2D_SensitiveEntity.hxx>
#include <Select2D_SensitiveSegment.hxx>
#include <SelectBasics_BasicTool.hxx>
#include <SelectBasics_ListOfBox2d.hxx>
#include <SelectMgr_EntityOwner.hxx>
@@ -207,9 +189,6 @@ enum CurrentAction3d {
#include <StdPrs_Curve.hxx>
#include <StdPrs_Point.hxx>
#include <StdPrs_PoleCurve.hxx>
#include <StdSelect_SensitiveText2d.hxx>
#include <StdSelect_TextProjector2d.hxx>
#include <StdSelect_ViewerSelector2d.hxx>
#include <TCollection_AsciiString.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TColgp_HArray1OfPnt2d.hxx>
@@ -225,11 +204,8 @@ enum CurrentAction3d {
#include <TopoDS_Solid.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <UnitsAPI.hxx>
#include <V2d_View.hxx>
#include <V2d_Viewer.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
#include <WNT_WDriver.hxx>
#include <WNT_Window.hxx>
#include "HLRAlgo_Projector.hxx"
#include "Aspect_MarkMap.hxx"

View File

@@ -33,7 +33,8 @@ COCCDemoApp::COCCDemoApp()
SampleName = "";
try
{
myGraphicDevice = new Graphic3d_WNTGraphicDevice;
Handle(Aspect_DisplayConnection) aDisplayConnection;
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
}
catch(Standard_Failure)
{

View File

@@ -25,8 +25,8 @@ class COCCDemoApp : public OCC_BaseApp
{
public:
COCCDemoApp();
Handle(Graphic3d_WNTGraphicDevice) GetGraphicDevice() const
{ return myGraphicDevice; } ;
Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const
{ return myGraphicDriver; } ;
// Overrides
// ClassWizard generated virtual function overrides
@@ -44,7 +44,7 @@ public:
DECLARE_MESSAGE_MAP()
private:
Handle(Graphic3d_WNTGraphicDevice) myGraphicDevice;
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
};

View File

@@ -43,10 +43,10 @@ END_MESSAGE_MAP()
COCCDemoDoc::COCCDemoDoc()
{
// TODO: add one-time construction code here
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
myViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D");
myViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
myViewer->SetDefaultLights();
myViewer->SetLightOn();
myViewer->SetDefaultBackgroundColor(Quantity_TOC_RGB, 0.,0.,0.);

View File

@@ -70,8 +70,7 @@ COCCDemoView::COCCDemoView()
myCurrentMode = CurAction3d_Nothing;
myVisMode = VIS_SHADE;
m_Pen = NULL;
myGraphicDriver = Handle(Graphic3d_GraphicDriver)::DownCast(
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice()->GraphicDriver() );
myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
}
COCCDemoView::~COCCDemoView()
@@ -99,10 +98,7 @@ void COCCDemoView::OnInitialUpdate()
myView = GetDocument()->GetViewer()->CreateView();
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
myView->SetWindow(aWNTWindow);
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();

View File

@@ -29,10 +29,11 @@
#include <Standard.hxx>
#include <Aspect_DisplayConnection.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <AIS_Point.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <Graphic3d.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>

View File

@@ -11,7 +11,7 @@
#include "OCC_BaseApp.h"
#include <Standard_Macro.hxx>
#include <Handle_Graphic3d_WNTGraphicDevice.hxx>
#include <Handle_Graphic3d_GraphicDriver.hxx>
class Standard_EXPORT OCC_3dApp : public OCC_BaseApp
{
@@ -19,10 +19,10 @@ public:
OCC_3dApp();
virtual ~OCC_3dApp();
Handle_Graphic3d_WNTGraphicDevice GetGraphicDevice() const { return myGraphicDevice; } ;
Handle_Graphic3d_GraphicDriver GetGraphicDriver() const { return myGraphicDriver; } ;
protected :
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
Handle_Graphic3d_GraphicDriver myGraphicDriver;
};
#endif // !defined(AFX_OCC_3DAPP_H__FC7278BF_390D_11D7_8611_0060B0EE281E__INCLUDED_)

View File

@@ -9,13 +9,10 @@
#include <Quantity_Factor.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
#include <Handle_PrsMgr_PresentationManager2d.hxx>
#include <Handle_Graphic2d_GraphicObject.hxx>
#include <Standard_Integer.hxx>
#include <Handle_SelectMgr_Selection.hxx>
#include <Standard_OStream.hxx>
#include <Standard_IStream.hxx>
#include <AIS2D_InteractiveObject.hxx>
DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS2D_InteractiveObject)
class Sample2D_Image : public AIS2D_InteractiveObject {

View File

@@ -24,27 +24,13 @@
#include "Standard_ShortReal.hxx"
#pragma warning( default : 4244 ) // Issue warning 4244
#include <V2d_Viewer.hxx>
#include <V2d_View.hxx>
#include <AIS2D_InteractiveContext.hxx>
#include <WNT_WDriver.hxx>
#include <Standard.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>
#include <AIS2D_InteractiveObject.hxx>
#include <Graphic2d_SetOfCurves.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Prs2d_AspectLine.hxx>
#include <Graphic2d_Array1OfVertex.hxx>
#include <Graphic2d_Polyline.hxx>
#include <Graphic2d_Text.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>

View File

@@ -9,14 +9,12 @@
#include <QColor>
#include <QColorDialog>
#ifndef WNT
#include <Graphic3d_GraphicDevice.hxx>
#else
#include <Graphic3d_WNTGraphicDevice.hxx>
#endif
#include <Aspect_DisplayConnection.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Graphic3d.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <TCollection_AsciiString.hxx>
Handle(V3d_Viewer) DocumentCommon::Viewer( const Standard_CString aDisplay,
const Standard_ExtString aName,
@@ -26,21 +24,20 @@ Handle(V3d_Viewer) DocumentCommon::Viewer( const Standard_CString aDisplay,
const Standard_Boolean ComputedMode,
const Standard_Boolean aDefaultComputedMode )
{
#ifndef WNT
static Handle(Graphic3d_GraphicDevice) defaultdevice;
if( defaultdevice.IsNull() )
defaultdevice = new Graphic3d_GraphicDevice( aDisplay );
return new V3d_Viewer(defaultdevice,aName,aDomain,ViewSize,ViewProj,
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
#else
static Handle(Graphic3d_WNTGraphicDevice) defaultdevice;
if( defaultdevice.IsNull() )
defaultdevice = new Graphic3d_WNTGraphicDevice();
return new V3d_Viewer(defaultdevice,aName,aDomain,ViewSize,ViewProj,
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
static Handle(Graphic3d_GraphicDriver) aGraphicDriver;
if (aGraphicDriver.IsNull())
{
Handle(Aspect_DisplayConnection) aDisplayConnection;
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
aDisplayConnection = new Aspect_DisplayConnection (aDisplay);
#endif
aGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
}
return new V3d_Viewer(aGraphicDriver,aName,aDomain,ViewSize,ViewProj,
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
}
DocumentCommon::DocumentCommon( const int theIndex, ApplicationCommonWindow* app )

View File

@@ -16,11 +16,13 @@
#include <Visual3d_View.hxx>
#include <Graphic3d_ExportFormat.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <QWindowsStyle>
#ifdef WNT
#if defined(_WIN32) || defined(__WIN32__)
#include <WNT_Window.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
#include <Cocoa_Window.hxx>
#else
#include <QX11Info>
#include <GL/glx.h>
@@ -29,10 +31,11 @@
#include <X11/Xmu/StdCmap.h>
#include <X11/Xlib.h>
#include <Xw_Window.hxx>
#include <Graphic3d_GraphicDevice.hxx>
#include <QColormap>
#endif
#include <Aspect_DisplayConnection.hxx>
// the key for multi selection :
#define MULTISELECTIONKEY Qt::ShiftModifier
@@ -53,7 +56,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
: QWidget( parent ),
myViewActions( 0 )
{
#ifndef WNT
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
//XSynchronize( x11Display(),true ); // it is possible to use QApplication::syncX();
XSynchronize( x11Info().display(),true ); // it is possible to use QApplication::syncX();
#endif
@@ -70,7 +73,7 @@ myViewActions( 0 )
setAttribute(Qt::WA_PaintOnScreen);
setAttribute(Qt::WA_NoSystemBackground);
#if !defined WNT
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
XVisualInfo* pVisualInfo;
if ( x11Info().display() )
{
@@ -161,22 +164,26 @@ View::~View()
void View::init()
{
if(myView.IsNull())
myView = myContext->CurrentViewer()->CreateView();
int windowHandle = (int) winId();
short hi, lo;
lo = (short) windowHandle;
hi = (short) (windowHandle >> 16);
#ifdef WNT
Handle(WNT_Window) hWnd = new WNT_Window(Handle(Graphic3d_WNTGraphicDevice)::DownCast(myContext->CurrentViewer()->Device()),(int) hi,(int) lo);
if (myView.IsNull())
myView = myContext->CurrentViewer()->CreateView();
#if defined(_WIN32) || defined(__WIN32__)
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
Handle(WNT_Window) hWnd = new WNT_Window (aWindowHandle);
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
NSView* aViewHandle = (NSView* )winId();
Handle(Cocoa_Window) hWnd = new Cocoa_Window (aViewHandle);
#else
Handle(Xw_Window) hWnd = new Xw_Window(Handle(Graphic3d_GraphicDevice)::DownCast(myContext->CurrentViewer()->Device()),(int) hi,(int) lo,Xw_WQ_SAMEQUALITY);
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
Handle(Aspect_DisplayConnection) aDispConnection = myContext->CurrentViewer()->Driver()->GetDisplayConnection();
Handle(Xw_Window) hWnd = new Xw_Window (aDispConnection, aWindowHandle);
#endif // WNT
myView->SetWindow( hWnd );
if ( !hWnd->IsMapped() )
hWnd->Map();
myView->SetBackgroundColor(Quantity_NOC_BLACK);
myView->MustBeResized();
myView->SetWindow (hWnd);
if (!hWnd->IsMapped())
{
hWnd->Map();
}
myView->SetBackgroundColor (Quantity_NOC_BLACK);
myView->MustBeResized();
}
void View::paintEvent( QPaintEvent * e )

View File

@@ -1,5 +1,7 @@
@ECHO OFF
call ../../../env.bat %1 %2 %3
IF NOT DEFINED CASROOT GOTO ERR_CASROOT
IF NOT EXIST "%CASROOT%\win32\bin\TKernel.dll" GOTO ERR_CASCADE

View File

@@ -30,9 +30,14 @@ unix {
OBJECTS_DIR = ./$$UNAME/obj
MOC_DIR = ./$$UNAME/src
}
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
!macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
!macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
LIBS += -lfreeimageplus
LIBS += -ltbb -ltbbmalloc
}

8
samples/qt/IESample/make.sh Normal file → Executable file
View File

@@ -4,4 +4,10 @@ export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
cd $aSamplePath
qmake IESample.pro
make
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
if [ "${CASDEB}" == "d" ]; then
make debug
else
make release
fi
fi

View File

@@ -8,7 +8,17 @@ host=`uname -s`
STATION=$host
RES_DIR="${aSamplePath}/res"
BIN_DIR="${aSamplePath}/${STATION}/bin"
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
if [ "${CASDEB}" == "d" ]; then
BIN_DIR="${aSamplePath}/build/Debug/IESample.app/Contents/MacOS"
else
BIN_DIR="${aSamplePath}/build/Release/IESample.app/Contents/MacOS"
fi
else
BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
fi
CSF_ResourcesDefaults="${RES_DIR}"
CSF_IEResourcesDefaults="${RES_DIR}"
@@ -19,9 +29,13 @@ export CSF_IEResourcesDefaults CSF_ResourcesDefaults
export PATH
if test ! -r "${BIN_DIR}/IESample"; then
echo "Executable \"${BIN_DIR}/IESample\" not found."
echo "Probably you don't compile the application. Execute \"make\"."
exit 1
echo "Executable \"${BIN_DIR}/IESample\" not found."
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
echo "Probably you don't compile the application. Build it with Xcode."
else
echo "Probably you don't compile the application. Execute \"make\"."
fi
exit 1
fi
${BIN_DIR}/IESample

View File

@@ -32,11 +32,16 @@ unix {
OBJECTS_DIR = ./$$UNAME/obj
MOC_DIR = ./$$UNAME/src
}
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H
LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
LIBS += -lfreeimageplus
LIBS += -ltbb -ltbbmalloc
MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
!macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
!macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
LIBS += -lfreeimageplus
LIBS += -ltbb -ltbbmalloc
}
win32 {

View File

@@ -4,4 +4,10 @@ export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
cd $aSamplePath
qmake Tutorial.pro
make
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
if [ "${CASDEB}" == "d" ]; then
make debug
else
make release
fi
fi

View File

@@ -8,7 +8,17 @@ host=`uname -s`
STATION=$host
RES_DIR="${aSamplePath}/res"
BIN_DIR="${aSamplePath}/${STATION}/bin"
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
if [ "${CASDEB}" == "d" ]; then
BIN_DIR="${aSamplePath}/build/Debug/Tutorial.app/Contents/MacOS"
else
BIN_DIR="${aSamplePath}/build/Release/Tutorial.app/Contents/MacOS"
fi
else
BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
fi
CSF_ResourcesDefaults="${RES_DIR}"
CSF_TutorialResourcesDefaults="${RES_DIR}"
@@ -19,9 +29,13 @@ export CSF_TutorialResourcesDefaults CSF_ResourcesDefaults
export PATH
if test ! -r "${BIN_DIR}/Tutorial"; then
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
echo "Probably you don't compile the application. Execute \"make\"."
exit 1
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
echo "Probably you don't compile the application. Build it with Xcode."
else
echo "Probably you don't compile the application. Execute \"make\"."
fi
exit 1
fi
${BIN_DIR}/Tutorial

View File

@@ -8,26 +8,29 @@
#include <QMouseEvent>
#include <WNT_Window.hxx>
#include <Graphic3d_WNTGraphicDevice.hxx>
#include <Voxel_Prs.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Aspect_DisplayConnection.hxx>
#include <Graphic3d.hxx>
#include <Graphic3d_GraphicDriver.hxx>
static Handle(Graphic3d_WNTGraphicDevice) device;
static Handle(Graphic3d_GraphicDriver) Viewer_aGraphicDriver;
Viewer::Viewer(QWidget* parent):QWidget(parent)
{
if(device.IsNull())
if (myGraphicDriver.IsNull())
{
device = new Graphic3d_WNTGraphicDevice();
if (!device->GraphicDriver().IsNull())
{
myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(device->GraphicDriver());
}
if (Viewer_aGraphicDriver.IsNull())
{
Handle(Aspect_DisplayConnection) aDisplayConnection;
Viewer_aGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
}
myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(Viewer_aGraphicDriver);
}
Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
Handle(V3d_Viewer) aViewer = new V3d_Viewer(myGraphicDriver, TCollection_ExtendedString("Visu3D").ToExtString(), "",
1000, V3d_XposYnegZpos,
Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
true, true, V3d_TEX_NONE);
@@ -39,13 +42,8 @@ Viewer::Viewer(QWidget* parent):QWidget(parent)
myIC = new AIS_InteractiveContext(aViewer);
myIC->SetDeviationCoefficient(1.e-3);
int windowHandle = (int) winId();
short hi, lo;
lo = (short) windowHandle;
hi = (short) (windowHandle >> 16);
Handle(WNT_Window) hWnd =
new WNT_Window(Handle(Graphic3d_WNTGraphicDevice)::DownCast(aViewer->Device()), (int) hi, (int) lo);
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
Handle(WNT_Window) hWnd = new WNT_Window (aWindowHandle);
myView->SetWindow(hWnd);
if(!hWnd->IsMapped())

View File

@@ -17,6 +17,8 @@
#include "VoxelClient_VisDrawer.h"
#include <OpenGl_GlCore11.hxx>
#include <ElSLib.hxx>
#include <gp_Dir.hxx>
#include <Geom_Plane.hxx>
@@ -29,9 +31,7 @@
#include <OpenGl_Element.hxx>
#include <OpenGl_GraphicDriver.hxx>
#include <OpenGl_NamedStatus.hxx>
#include <GL/gl.h>
#include <GL/glu.h>
#include <OpenGl_Workspace.hxx>
/**************************************************************************/

View File

@@ -141,7 +141,6 @@ uses
Geom,
Bnd,
Aspect,
Graphic2d,
Graphic3d,
V3d,
TopAbs,

View File

@@ -39,9 +39,7 @@ uses Shape from TopoDS,
Line from Geom,
Ax1 from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
Plane from Geom,
Surface from Geom,
ExtendedString from TCollection,
@@ -191,12 +189,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -101,7 +101,7 @@
#include <GC_MakeConicalSurface.hxx>
#include <gce_MakePln.hxx>
#include <gce_MakeCone.hxx>
#include <Graphic3d_Array1OfVertex.hxx>
//=======================================================================
//function : Constructor
@@ -472,19 +472,6 @@ void AIS_AngleDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : : to avoid warning
//=======================================================================
void AIS_AngleDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_AngleDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_AngleDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_AngleDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
@@ -1975,19 +1962,17 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
gp_Pnt AttachmentPnt;
gp_Pnt OppositePnt;
gp_Pnt aPnt, tmpPnt;
Quantity_Length X,Y,Z;
Standard_Real param = ElCLib::Parameter(myCircle, myPosition);
aPnt = Apex;
gp_Pnt aPnt = Apex;
gp_Pnt P1 = ElCLib::Value(0., myCircle);
gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
gce_MakePln mkPln(P1, P2, aPnt); // create a plane whitch defines plane for projection aPosition on it
gce_MakePln mkPln(P1, P2, aPnt); // create a plane whitch defines plane for projection aPosition on it
aPnt = AIS::ProjectPointOnPlane(myPosition, mkPln.Value());
tmpPnt = aPnt;
aPnt = AIS::ProjectPointOnPlane(myPosition, mkPln.Value());
gp_Pnt tmpPnt = aPnt;
if( aPnt.Distance(P1) < aPnt.Distance(P2) ){
AttachmentPnt = P1;
@@ -2015,49 +2000,30 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
if( myPosition.Distance( myCircle.Location() ) <= myCircle.Radius() )
if( 2 * myCircle.Radius() > aCircle2.Radius() * 0.4 ) IsArrowOut = Standard_False; //four times more than an arrow size
Graphic3d_Array1OfVertex V(1, 12);
Standard_Real angle;
param = ElCLib::Parameter(aCircle2, tmpPnt);
if(IsArrowOut) {
angle = OppParam - AttParam + M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
param = AttParam - M_PI / 12; //out parts of dimension line are 15 degrees
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
for( i = 0; i <= 11; i++ ) { //calculating of arc
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
aPnt.Coord(X, Y, Z);
V(i+1).SetCoord(X, Y, Z);
}
}
else {
angle = OppParam - AttParam;
param = AttParam;
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
for( i = 0; i <= 11; i++ ) { //calculating of arc
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
aPnt.Coord(X, Y, Z);
V(i+1).SetCoord(X, Y, Z);
}
}
for(i = 1; i<=11; i++) {
param = AttParam;
Standard_Real angle = OppParam - AttParam;
V(i).Coord(X, Y, Z);
P1.SetCoord(X, Y, Z);
V(i+1).Coord(X, Y, Z);
P1.SetCoord(X, Y, Z);
seg = new Select3D_SensitiveSegment(owner, P1, P2);
aSelection->Add(seg);
if(IsArrowOut)
{
angle += M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
param -= M_PI / 12; //out parts of dimension line are 15 degrees
}
tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -1)*2);
while ( angle > 2. * M_PI ) angle -= 2. * M_PI;
Standard_Real size(Min(myVal/100.+1.e-6,myArrowSize+1.e-6));
gp_Pnt Vprev = ElCLib::Value(param, aCircle2);
for( i = 1; i <= 11; i++ ) //calculating of arc
{
gp_Pnt Vcur = ElCLib::Value(param + angle/11 * i, aCircle2);
seg = new Select3D_SensitiveSegment(owner, Vprev, Vcur);
aSelection->Add(seg);
Vprev = Vcur;
}
tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -2));
const Standard_Real size(Min(myVal/100.+1.e-6,myArrowSize+1.e-6));
Handle( Select3D_SensitiveBox ) box = new Select3D_SensitiveBox( owner,
tmpPnt.X(),
tmpPnt.Y(),
@@ -2067,6 +2033,3 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
tmpPnt.Z() + size);
aSelection->Add(box);
}

View File

@@ -39,8 +39,6 @@ uses
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Pnt from gp,
Dir from gp,
LineAspect from Prs3d,
@@ -134,13 +132,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -19,15 +19,13 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#include <AIS_Axis.ixx>
#include <Aspect_TypeOfLine.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_DatumAspect.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_Structure.hxx>
#include <TColgp_Array1OfPnt.hxx>
@@ -177,10 +175,7 @@ void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager3d)&,
aPresentation->SetDisplayPriority(5);
if (!myIsXYZAxis ){
GeomAdaptor_Curve curv(myComponent);
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
}
else {
DsgPrs_XYZAxisPresentation::Add(aPresentation,myLineAspect,myDir,myVal,myText,myPfirst,myPlast);
@@ -217,13 +212,11 @@ void AIS_Axis::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
void AIS_Axis::SetColor(const Quantity_NameOfColor aCol)
#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
void AIS_Axis::SetColor(const Quantity_Color &aCol)
#endif
{
hasOwnColor=Standard_True;
myOwnColor=aCol;
@@ -255,16 +248,6 @@ void AIS_Axis::SetWidth(const Standard_Real aValue)
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : Compute
//purpose : to avoid warning

View File

@@ -39,8 +39,6 @@ uses
Dir from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfDimension from AIS
@@ -94,12 +92,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -242,19 +242,6 @@ void AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Chamf2dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_Chamf2dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_Chamf2dDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_Chamf2dDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -38,8 +38,6 @@ uses
Dir from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfDimension from AIS
@@ -90,11 +88,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -217,19 +217,6 @@ void AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Chamf3dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_Chamf3dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_Chamf3dDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_Chamf3dDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -36,8 +36,6 @@ uses
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Line from AIS,
KindOfInteractive from AIS
@@ -68,12 +66,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -19,14 +19,12 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#include <AIS_Circle.ixx>
#include <Aspect_TypeOfLine.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_Structure.hxx>
#include <TColgp_Array1OfPnt.hxx>
@@ -122,7 +120,6 @@ void AIS_Circle::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
//=======================================================================
void AIS_Circle::SetColor(const Quantity_NameOfColor aCol)
#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
@@ -133,7 +130,6 @@ void AIS_Circle::SetColor(const Quantity_NameOfColor aCol)
//=======================================================================
void AIS_Circle::SetColor(const Quantity_Color &aCol)
#endif
{
hasOwnColor=Standard_True;
myOwnColor=aCol;
@@ -157,17 +153,10 @@ void AIS_Circle::SetWidth(const Standard_Real aValue)
{
myOwnWidth=aValue;
#ifndef GER61351
Quantity_NameOfColor CC =
HasColor() ? myOwnColor : AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
#endif
if (!myDrawer->HasLineAspect ()) {
#ifdef GER61351
Quantity_Color CC;
if( HasColor() ) CC = myOwnColor;
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
#endif
myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
} else
myDrawer->LineAspect()->SetWidth(aValue);
@@ -186,17 +175,12 @@ void AIS_Circle::UnsetColor()
if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
else{
#ifdef GER61351
Quantity_Color CC;
if( HasColor() ) CC = myOwnColor;
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
#else
Quantity_NameOfColor CC =
#endif
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
Quantity_Color CC;
if( HasColor() ) CC = myOwnColor;
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
myDrawer->LineAspect()->SetColor(CC);
myOwnColor = CC;
}
}
}
//=======================================================================
@@ -225,10 +209,7 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
GeomAdaptor_Curve curv(myComponent);
Standard_Real prevdev = myDrawer->DeviationCoefficient();
myDrawer->SetDeviationCoefficient(1.e-5);
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
myDrawer->SetDeviationCoefficient(prevdev);
}
@@ -240,16 +221,11 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
//=======================================================================
void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation)
{
GeomAdaptor_Curve curv(myComponent,myUStart,myUEnd);
Standard_Real prevdev = myDrawer->DeviationCoefficient();
myDrawer->SetDeviationCoefficient(1.e-5);
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
myDrawer->SetDeviationCoefficient(prevdev);
}
//=======================================================================
@@ -278,15 +254,6 @@ void AIS_Circle::ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelecti
myComponent,myUStart,myUEnd);
aSelection->Add(seg);
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Circle::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : Compute

View File

@@ -40,8 +40,6 @@ uses
Dir from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d ,
Plane from Geom
is
@@ -68,12 +66,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -238,17 +238,6 @@ void AIS_ConcentricRelation::Compute(const Handle(Prs3d_Projector)&,
{
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_ConcentricRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : ComputeSelection
//purpose :

View File

@@ -49,8 +49,6 @@ uses
Location from TopLoc,
Transformation from Geom,
PresentationManager3d from PrsMgr,
GraphicObject from Graphic2d,
PresentationManager2d from PrsMgr,
Presentation from Prs3d,
TypeOfPresentation3d from PrsMgr,
Selection from SelectMgr,
@@ -145,18 +143,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
---Level: Internal
---Purpose: this method should fill the presentation according to the
-- enumerated mode of the application and to the display parameter
-- of the application.
raises NotImplemented from Standard
is redefined;
ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
aMode : Integer) is redefined virtual private;

View File

@@ -152,12 +152,6 @@ void AIS_ConnectedInteractive::Compute(const Handle_Prs3d_Projector& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
void AIS_ConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d, const Handle_Graphic2d_GraphicObject& aGraphicObject, const int anInteger)
{
// Standard_NotImplemented::Raise("AIS_ConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : ComputeSelection
//purpose :

View File

@@ -42,9 +42,7 @@ uses
Integer from Standard,
Shape from AIS,
TypeOfPresentation3d from PrsMgr,
GraphicObject from Graphic2d,
PresentationManager3d from PrsMgr,
PresentationManager2d from PrsMgr,
InteractiveObject from AIS,
KindOfInteractive from AIS,
Location from TopLoc,
@@ -113,17 +111,6 @@ is
aPresentation : mutable Presentation from Prs3d)
is redefined virtual private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
raises NotImplemented from Standard
is redefined;
---Level: Internal
---Purpose: this method should fill the presentation according to the
-- enumerated mode of the application and to the display parameter
-- of the application.
ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
aMode : Integer from Standard)
is redefined virtual private;

View File

@@ -166,19 +166,6 @@ void AIS_ConnectedShape::Compute(const Handle(Prs3d_Projector)& aProjector,
}
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_ConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
const Handle_Graphic2d_GraphicObject& aGraphicObject,
const int anInteger)
{
// Standard_NotImplemented::Raise("AIS_ConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
AIS_ConnectedInteractive::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : ComputeSelection
//purpose : Attention fragile...

View File

@@ -46,9 +46,7 @@ uses
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfSurface from AIS,
@@ -126,12 +124,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -168,19 +168,6 @@ void AIS_DiameterDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_DiameterDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
const Handle(Graphic2d_GraphicObject)& aPresentation,
const Standard_Integer aMode)
{
// Standard_NotImplemented::Raise("AIS_DiameterDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
}
void AIS_DiameterDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_DiameterDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -35,8 +35,6 @@ uses
Presentation from Prs3d,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Selection from SelectMgr,
Pnt from gp,
Drawer from AIS,
@@ -102,13 +100,7 @@ is
Compute( me : mutable;
aProjector : Projector from Prs3d;
aPresentation : mutable Presentation from Prs3d )
is redefined static private;
Compute( me : mutable;
aPresentationManager : PresentationManager2d from PrsMgr;
aPresentation : mutable GraphicObject from Graphic2d;
aMode : Integer from Standard = 0 )
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -221,21 +221,6 @@ void AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )& aProje
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )& aPresentationManager2d,
const Handle( Graphic2d_GraphicObject )& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )&,
// const Handle( Graphic2d_GraphicObject )&,const Standard_Integer )");
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)

View File

@@ -31,8 +31,6 @@ uses
Presentation from Prs3d,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Selection from SelectMgr,
Pnt from gp
@@ -56,13 +54,7 @@ is
Compute( me : mutable;
aProjector : Projector from Prs3d;
aPresentation : mutable Presentation from Prs3d )
is redefined static private;
Compute( me : mutable;
aPresentationManager : PresentationManager2d from PrsMgr;
aPresentation : mutable GraphicObject from Graphic2d;
aMode : Integer from Standard = 0 )
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -164,19 +164,6 @@ void AIS_EqualRadiusRelation::Compute( const Handle( Prs3d_Projector )& /*aProje
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager2d )& /*aPresentationManager2d*/,
const Handle( Graphic2d_GraphicObject )& /*aGraphicObject*/,
const Standard_Integer /*anInteger*/)
{
// Standard_NotImplemented::Raise("AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager2d )&,const Handle( Graphic2d_GraphicObject )&,const Standard_Integer )");
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : Compute
//purpose :

View File

@@ -45,8 +45,6 @@ uses
Pnt from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Plane from Geom
is
@@ -109,14 +107,8 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -235,19 +235,6 @@ void AIS_FixRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : Compute
//purpose :

View File

@@ -19,8 +19,7 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to get an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to get an object RGB color instead a restricted object NameOfColor.
@@ -92,7 +91,6 @@ static Handle(Prs3d_LineAspect) GetLineAspect(const Handle(Prs3d_Drawer)& Dr,
}
Quantity_NameOfColor AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)& Dr, const AIS_TypeOfAttribute Att)
#ifdef GER61351
{
Quantity_Color color;
GetLineColor(Dr,Att,color);
@@ -100,20 +98,10 @@ Quantity_NameOfColor AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)&
}
void AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)& Dr, const AIS_TypeOfAttribute Att, Quantity_Color &aColor)
#endif
{
Standard_Real W;
Aspect_TypeOfLine TYP;
Handle(Prs3d_LineAspect) LA = GetLineAspect(Dr,Att);
#ifdef GER61351
LA->Aspect()->Values(aColor,TYP,W);
#else
Quantity_Color QCol;
LA->Aspect()->Values(QCol,TYP,W);
return QCol.Name();
#endif
GetLineAspect(Dr,Att)->Aspect()->Values(aColor,TYP,W);
}
Standard_Real AIS_GraphicTool::GetLineWidth (const Handle(Prs3d_Drawer)& Dr,
@@ -159,7 +147,6 @@ void AIS_GraphicTool::GetLineAtt(const Handle(Prs3d_Drawer)& Dr,
}
Quantity_NameOfColor AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer)& Dr)
#ifdef GER61351
{
Quantity_Color color;
GetInteriorColor(Dr,color);
@@ -167,24 +154,16 @@ Quantity_NameOfColor AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer
}
void AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer)& Dr, Quantity_Color &aColor)
#endif
{
Handle(Graphic3d_AspectFillArea3d) AFA = Dr->ShadingAspect()->Aspect();
Aspect_InteriorStyle IS;
Aspect_TypeOfLine T;
Standard_Real W;
#ifdef GER61351
Quantity_Color EC;
AFA->Values(IS,aColor,EC,T,W);
#else
Quantity_Color IC,EC;
AFA->Values(IS,IC,EC,T,W);
return IC.Name();
#endif
}
Graphic3d_MaterialAspect AIS_GraphicTool::GetMaterial(const Handle(Prs3d_Drawer)& Dr)
{
return Dr->ShadingAspect()->Aspect()->BackMaterial();
}

View File

@@ -34,9 +34,7 @@ uses
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
Plane from Geom,
Curve from Geom,
Line from Geom,
@@ -75,12 +73,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -379,18 +379,6 @@ void AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_IdenticRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_IdenticRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_IdenticRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_IdenticRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -23,12 +23,11 @@
#define BUC60577 //GG_101099 Enable to compute correctly
// transparency with more than one object in the view.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#define G003 //EUG_26/01/00 Degenerate support (G003)
#define IMP140200 //GG Add SetSelectedAspect() method.
//IMP140200 //GG Add SetSelectedAspect() method.
#define BUC60632 //GG 15/03/00 Add protection on SetDisplayMode()
// method, compute only authorized presentation.
@@ -1914,15 +1913,13 @@ UnsetDisplayMode(const Handle(AIS_InteractiveObject)& anIObj,
//purpose :
//=======================================================================
#ifdef GER61351
void AIS_InteractiveContext::SetCurrentFacingModel(
const Handle(AIS_InteractiveObject)& anIObj,
const Aspect_TypeOfFacingModel aModel) {
if ( !anIObj.IsNull () ) {
anIObj->SetCurrentFacingModel(aModel);
}
const Aspect_TypeOfFacingModel aModel)
{
if ( !anIObj.IsNull () )
anIObj->SetCurrentFacingModel(aModel);
}
#endif
//=======================================================================
//function : SetColor
@@ -1932,7 +1929,6 @@ void AIS_InteractiveContext::SetCurrentFacingModel(
void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
const Quantity_NameOfColor aColor,
const Standard_Boolean updateviewer)
#ifdef GER61351
{
SetColor(anIObj,Quantity_Color(aColor),updateviewer);
}
@@ -1940,7 +1936,6 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
const Quantity_Color &aColor,
const Standard_Boolean updateviewer)
#endif
{
if(anIObj.IsNull()) return ;
@@ -2292,13 +2287,11 @@ Quantity_NameOfColor AIS_InteractiveContext::Color(const Handle(AIS_InteractiveO
return anIObj->Color();
}
#ifdef GER61351
void AIS_InteractiveContext::Color(const Handle(AIS_InteractiveObject)& anIObj,
Quantity_Color &aColor) const
Quantity_Color &aColor) const
{
anIObj->Color(aColor);
}
#endif
//=======================================================================
//function : Width
@@ -2541,7 +2534,6 @@ void AIS_InteractiveContext :: SetDegenerateModel (
} // end AIS_InteractiveContext :: SetDegenerateModel
#endif
#ifdef IMP140200
//=======================================================================
//function : SetSelectedAspect
//purpose :
@@ -2549,7 +2541,8 @@ void AIS_InteractiveContext :: SetDegenerateModel (
void AIS_InteractiveContext::SetSelectedAspect(
const Handle(Prs3d_BasicAspect)& anAspect,
const Standard_Boolean globalChange,
const Standard_Boolean updateViewer) {
const Standard_Boolean updateViewer)
{
if( !HasOpenedContext() ) {
Standard_Boolean found = Standard_False;
Handle(AIS_Selection) sel =
@@ -2563,11 +2556,10 @@ void AIS_InteractiveContext::SetSelectedAspect(
if( found && updateViewer) {
myMainVwr->Update();
if( !(myIsCollClosed && myCollectorVwr.IsNull()) )
myCollectorVwr->Update();
myCollectorVwr->Update();
}
}
}
#endif
//=======================================================================
//function : SetLocalAttributes

View File

@@ -19,8 +19,7 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
inline Standard_Boolean AIS_InteractiveObject::AcceptShapeDecomposition() const
@@ -66,19 +65,13 @@ inline Standard_Integer AIS_InteractiveObject::SelectionMode() const
inline Quantity_NameOfColor AIS_InteractiveObject::Color() const
{
#ifdef GER61351
return myOwnColor.Name();
#else
return myOwnColor;
#endif
return myOwnColor.Name();
}
#ifdef GER61351
inline void AIS_InteractiveObject::Color(Quantity_Color& aColor) const
{
aColor = myOwnColor;
aColor = myOwnColor;
}
#endif
inline Standard_Boolean AIS_InteractiveObject::HasWidth() const
{return (!myOwnWidth == 0.);}

View File

@@ -34,9 +34,7 @@ uses Shape from TopoDS,
Dir from gp,
Pnt from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
Plane from Geom,
TypeOfDist from AIS,
@@ -150,12 +148,6 @@ is
aPresentation : mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -387,19 +387,6 @@ void AIS_LengthDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_LengthDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_LengthDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -36,8 +36,6 @@ uses
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Line from AIS,
KindOfInteractive from AIS
@@ -61,13 +59,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -19,15 +19,13 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#include <AIS_Line.ixx>
#include <Aspect_TypeOfLine.hxx>
#include <Prs3d_Drawer.hxx>
#include <Precision.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_Structure.hxx>
#include <TColgp_Array1OfPnt.hxx>
@@ -157,13 +155,11 @@ void AIS_Line::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
//=======================================================================
void AIS_Line::SetColor(const Quantity_NameOfColor aCol)
#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
void AIS_Line::SetColor(const Quantity_Color &aCol)
#endif
{
hasOwnColor=Standard_True;
myOwnColor=aCol;
@@ -190,15 +186,9 @@ void AIS_Line::UnsetColor()
if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
else{
#ifdef GER61351
Quantity_Color CC;
if( HasColor() ) CC = myOwnColor;
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
#else
Quantity_NameOfColor CC =
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
#endif
myDrawer->LineAspect()->SetColor(CC);
myOwnColor = CC;
}
@@ -212,17 +202,10 @@ void AIS_Line::SetWidth(const Standard_Real aValue)
{
myOwnWidth=aValue;
#ifndef GER61351
Quantity_NameOfColor CC =
HasColor()? myOwnColor : AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
#endif
if (!myDrawer->HasLineAspect ()) {
#ifdef GER61351
Quantity_Color CC;
if( HasColor() ) CC = myOwnColor;
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
#endif
myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
} else
myDrawer->LineAspect()->SetWidth(aValue);
@@ -251,16 +234,11 @@ void AIS_Line::UnsetWidth()
//=======================================================================
void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentation)
{
GeomAdaptor_Curve curv(myComponent);
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
//pas de prise en compte lors du FITALL
aPresentation->SetInfiniteState (Standard_True);
}
//=======================================================================
@@ -269,7 +247,6 @@ void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentat
//=======================================================================
void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentation)
{
gp_Pnt P1 = myStartPoint->Pnt();
gp_Pnt P2 = myEndPoint->Pnt();
@@ -277,11 +254,7 @@ void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentati
Standard_Real dist = P1.Distance(P2);
GeomAdaptor_Curve curv(myComponent,0.,dist);
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
}
@@ -325,15 +298,6 @@ void AIS_Line::ComputeSegmentLineSelection(const Handle(SelectMgr_Selection)& aS
myEndPoint->Pnt());
aSelection->Add(seg);
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Line::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : Compute

View File

@@ -93,7 +93,7 @@
#include <AIS_LocalStatus.hxx>
#include <StdPrs_WFShape.hxx>
#include <Visual3d_TransientManager.hxx>
#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_Group.hxx>
#include <Select3D_SensitiveTriangulation.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
@@ -1430,17 +1430,18 @@ void AIS_LocalContext::HilightTriangle(const Standard_Integer Rank,
{
static Standard_Integer PrevRank(0);
if(Rank==PrevRank) return;
// PrevRank = Rank;
Handle(SelectBasics_SensitiveEntity) SE = myMainVS->Primitive(Rank);
if(SE->IsKind(STANDARD_TYPE(Select3D_SensitiveTriangulation))){
if(SE->IsKind(STANDARD_TYPE(Select3D_SensitiveTriangulation)))
{
Handle(Select3D_SensitiveTriangulation) Tr = *((Handle(Select3D_SensitiveTriangulation)*)&SE);
gp_Pnt p1,p2,p3 ; Tr->DetectedTriangle(p1,p2,p3);
static Graphic3d_Array1OfVertex Vtt(1,3);
Vtt.SetValue(1,Graphic3d_Vertex(p1.X(),p1.Y(),p1.Z()));
Vtt.SetValue(2,Graphic3d_Vertex(p2.X(),p2.Y(),p2.Z()));
Vtt.SetValue(3,Graphic3d_Vertex(p3.X(),p3.Y(),p3.Z()));
static Handle(Prs3d_Presentation) TriPrs =
Handle(Graphic3d_ArrayOfTriangles) aTris = new Graphic3d_ArrayOfTriangles(3);
aTris->AddVertex(p1);
aTris->AddVertex(p2);
aTris->AddVertex(p3);
static Handle(Prs3d_Presentation) TriPrs =
new Prs3d_Presentation(myMainPM->StructureManager());
TriPrs->Clear();
#ifdef IMP300101
@@ -1448,20 +1449,17 @@ void AIS_LocalContext::HilightTriangle(const Standard_Integer Rank,
asp->SetColor(myCTX->HilightColor());
TriPrs->SetShadingAspect(asp);
#endif
Prs3d_Root::CurrentGroup(TriPrs)->Polygon(Vtt);
Prs3d_Root::CurrentGroup(TriPrs)->AddPrimitiveArray(aTris);
#ifndef IMP300101
if(view->TransientManagerBeginDraw())
Visual3d_TransientManager::EndDraw();
#endif
if(view->TransientManagerBeginDraw()) {
//P->Exploration();
Visual3d_TransientManager::DrawStructure(TriPrs);
Visual3d_TransientManager::EndDraw();
}
}
}
//=======================================================================

View File

@@ -40,9 +40,7 @@ uses
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfSurface from AIS,
@@ -85,13 +83,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -146,19 +146,6 @@ void AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_MaxRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
const Handle(Graphic2d_GraphicObject)& aPresentation,
const Standard_Integer aMode)
{
// Standard_NotImplemented::Raise("AIS_MaxRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
}
//=======================================================================
//function : Compute
//purpose :

View File

@@ -26,10 +26,8 @@ uses
ExtendedString from TCollection,
Projector from Prs3d,
Presentation from Prs3d,
PresentationManager2d from PrsMgr,
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
GraphicObject from Graphic2d,
Dir from gp,
Pnt from gp,
Lin from gp,
@@ -70,12 +68,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me: mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation : mutable GraphicObject from Graphic2d;
aMode : Integer from Standard = 0)
is redefined static private;
Compute(me: mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -155,18 +155,6 @@ void AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*/
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_MidPointRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
const Standard_Integer /*anInteger*/)
{
// Standard_NotImplemented::Raise("AIS_MidPointRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_MidPointRelation::Compute(const Handle_Prs3d_Projector& aProjector,
const Handle_Geom_Transformation& aTransformation,
const Handle_Prs3d_Presentation& aPresentation)

View File

@@ -39,9 +39,7 @@ uses
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfSurface from AIS,
@@ -87,12 +85,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -148,19 +148,6 @@ void AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_MinRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
const Handle(Graphic2d_GraphicObject)& aPresentation,
const Standard_Integer aMode)
{
// Standard_NotImplemented::Raise("AIS_MinRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
}
//=======================================================================
//function : Compute
//purpose :

View File

@@ -38,8 +38,6 @@ uses
SequenceOfInteractive from AIS,
KindOfInteractive from AIS,
PresentationManager3d from PrsMgr,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Presentation from Prs3d,
Projector from Prs3d,
Transformation from Geom,
@@ -97,12 +95,6 @@ is
-- a transformation if there's one stored.
is redefined virtual protected;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -176,19 +176,6 @@ void AIS_MultipleConnectedInteractive::Compute(const Handle_Prs3d_Projector& aPr
//purpose :
//=======================================================================
void AIS_MultipleConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
const Handle_Graphic2d_GraphicObject& aGraphicObject,
const int anInteger)
{
// Standard_NotImplemented::Raise("AIS_MultipleConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MultipleConnectedInteractive::Compute(const Handle_Prs3d_Projector& aProjector,
const Handle_Geom_Transformation& aTransformation,
const Handle_Prs3d_Presentation& aPresentation)

View File

@@ -33,8 +33,6 @@ class MultipleConnectedShape from AIS inherits MultipleConnectedInteractive from
uses
PresentationManager3d from PrsMgr,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Shape from TopoDS,
Projector from Prs3d,
Presentation from Prs3d,
@@ -108,18 +106,6 @@ is
-- presentation of this last object, with
-- a transformation if there's one stored.
is redefined virtual private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
---Level: Internal
---Purpose: this method should fill the presentation according to the
-- enumerated mode of the application and to the display parameter
-- of the application.
raises NotImplemented from Standard
is redefined;
fields
myShape : Shape from TopoDS; -- celle qui sert au compute Hidden lines et selection

View File

@@ -171,19 +171,6 @@ void AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager
AIS_MultipleConnectedInteractive::Compute( aPresentationManager3d , aPresentation , anint ) ;
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
const Handle_Graphic2d_GraphicObject& aGraphicObject,
const int anInteger)
{
// Standard_NotImplemented::Raise("AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
//=======================================================================
//function : ComputeSelection
//purpose :

View File

@@ -24,12 +24,6 @@
#include <AIS_NListIteratorOfListTransient.hxx>
#include <NCollection_DefineDataMap.hxx>
inline Standard_Boolean IsEqual (const Handle_Standard_Transient& theH1,
const Handle_Standard_Transient& theH2)
{
return (theH1 == theH2);
}
DEFINE_BASECOLLECTION(AIS_BaseCollItListTransient,
AIS_NListIteratorOfListTransient)
DEFINE_DATAMAP (AIS_NDataMapOfTransientIteratorOfListTransient,

View File

@@ -32,11 +32,9 @@ uses
Shape from TopoDS,
Presentation from Prs3d,
Projector from Prs3d,
Transformation from Geom,
Transformation from Geom,
PresentationManager3d from PrsMgr,
PresentationManager2d from PrsMgr,
Selection from SelectMgr,
GraphicObject from Graphic2d,
Dir from gp,
Pnt from gp,
Trsf from gp,
@@ -62,12 +60,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -148,18 +148,6 @@ void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
const Standard_Integer /*anInteger*/)
{
// Standard_NotImplemented::Raise("AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
const Handle(Geom_Transformation)& aTransformation,
const Handle(Prs3d_Presentation)& aPresentation)

View File

@@ -34,9 +34,7 @@ uses Shape from TopoDS,
Dir from gp,
Pnt from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ArrowSide from DsgPrs
is
@@ -79,13 +77,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -145,18 +145,6 @@ void AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_ParallelRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -30,9 +30,7 @@ uses Shape from TopoDS,
Pnt from gp,
Dir from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
Plane from Geom
is
@@ -69,12 +67,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -129,19 +129,6 @@ void AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)& aProjecto
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_PerpendicularRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)&
aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");

View File

@@ -38,8 +38,6 @@ uses
Pnt from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
NameOfMaterial from Graphic3d,
TypeOfPlane from AIS,
Axis2Placement from Geom,
@@ -200,13 +198,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined virtual private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined virtual private;
is redefined virtual private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -31,7 +31,7 @@
#include <gp_Pnt.hxx>
#include <ElSLib.hxx>
#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_ArrayOfQuadrangles.hxx>
#include <Graphic3d_Group.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
@@ -245,58 +245,59 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
ComputeFields();
aPresentation->SetInfiniteState(myInfiniteState);
if (myCurrentMode)
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(3);
else
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(1);
if(aMode == 0){
if (!myIsXYZPlane){
ComputeFrame();
const Handle(Geom_Plane)& pl = myComponent;
const Handle(Geom_Plane)& thegoodpl = Handle(Geom_Plane)::DownCast
(pl->Translated(pl->Location(),myCenter));
GeomAdaptor_Surface surf(thegoodpl);
StdPrs_Plane::Add(aPresentation,surf,myDrawer);
}
else {
DsgPrs_XYZPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
}
}
else if (aMode == 1){
if (!myIsXYZPlane){
ComputeFrame();
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
gp_Pnt p1;
Standard_Real Xmax,Ymax;
Xmax = Standard_Real(theaspect->PlaneXLength())/2.;
Ymax = Standard_Real(theaspect->PlaneYLength())/2.;
static Graphic3d_Array1OfVertex vertices(1,5);
TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
myComponent->D0(-Xmax,Ymax,p1);
vertices(1).SetCoord(p1.X(),p1.Y(),p1.Z());
vertices(5).SetCoord(p1.X(),p1.Y(),p1.Z());
myComponent->D0(Xmax,Ymax,p1);
vertices(2).SetCoord(p1.X(),p1.Y(),p1.Z());
myComponent->D0(Xmax,-Ymax,p1);
vertices(3).SetCoord(p1.X(),p1.Y(),p1.Z());
myComponent->D0(-Xmax,-Ymax,p1);
vertices(4).SetCoord(p1.X(),p1.Y(),p1.Z());
TheGroup->Polygon(vertices);
}
else{
DsgPrs_ShadedPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
}
}
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(myCurrentMode == 0? 1 : 3);
switch (aMode)
{
case 0:
{
if (!myIsXYZPlane)
{
ComputeFrame();
const Handle(Geom_Plane)& pl = myComponent;
const Handle(Geom_Plane)& thegoodpl = Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter));
GeomAdaptor_Surface surf(thegoodpl);
StdPrs_Plane::Add(aPresentation,surf,myDrawer);
}
else
DsgPrs_XYZPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
break;
}
case 1:
{
if (!myIsXYZPlane)
{
ComputeFrame();
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
gp_Pnt p1;
const Standard_Real Xmax = 0.5*Standard_Real(theaspect->PlaneXLength());
const Standard_Real Ymax = 0.5*Standard_Real(theaspect->PlaneYLength());
Handle(Graphic3d_ArrayOfQuadrangles) aQuads = new Graphic3d_ArrayOfQuadrangles(4);
myComponent->D0(-Xmax,Ymax,p1);
aQuads->AddVertex(p1);
myComponent->D0(Xmax,Ymax,p1);
aQuads->AddVertex(p1);
myComponent->D0(Xmax,-Ymax,p1);
aQuads->AddVertex(p1);
myComponent->D0(-Xmax,-Ymax,p1);
aQuads->AddVertex(p1);
TheGroup->AddPrimitiveArray(aQuads);
}
else
DsgPrs_ShadedPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
break;
}
}
}
void AIS_Plane::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
{
// Standard_NotImplemented::Raise("AIS_Plane::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation) ;
PrsMgr_PresentableObject::Compute(aProjector, aTransformation, aPresentation);
}
//=======================================================================
@@ -534,16 +535,6 @@ void AIS_Plane::ComputeFrame()
}
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : Compute
//purpose : to avoid warning

View File

@@ -55,8 +55,6 @@ uses
Projector from Prs3d,
Transformation from Geom,
Drawer from Prs3d,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Line from AIS,
Point from AIS,
Plane from Geom,
@@ -109,11 +107,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -19,8 +19,7 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#define OCC218 //SAV using DsgPrs_XYZAxisPresentation to draw axes.
// + X/YAxis() returns AIS_Line instead of AIS_Axis
@@ -280,13 +279,11 @@ void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
}
void AIS_PlaneTrihedron::SetColor(const Quantity_NameOfColor aCol)
#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
void AIS_PlaneTrihedron::SetColor(const Quantity_Color &aCol)
#endif
{
hasOwnColor=Standard_True;
myOwnColor = aCol;
@@ -294,15 +291,6 @@ void AIS_PlaneTrihedron::SetColor(const Quantity_Color &aCol)
myDrawer->DatumAspect()->SecondAxisAspect()->SetColor(aCol);
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_PlaneTrihedron::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
void AIS_PlaneTrihedron::Compute(const Handle(Prs3d_Projector)&,
const Handle(Prs3d_Presentation)&)

View File

@@ -36,8 +36,6 @@ uses
Selection from SelectMgr,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Vertex from TopoDS,
KindOfInteractive from AIS
@@ -75,13 +73,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -168,15 +168,7 @@ TopoDS_Vertex AIS_Point::Vertex() const
return BRepBuilderAPI_MakeVertex(P);
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_Point::Compute(const Handle(PrsMgr_PresentationManager2d)&,
const Handle(Graphic2d_GraphicObject)&,
const Standard_Integer)
{
}
//=======================================================================
//function : Compute
//purpose : to avoid warning

View File

@@ -42,9 +42,7 @@ uses Shape from TopoDS,
Lin from gp,
Circ from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
ArrowSide from DsgPrs,
KindOfDimension from AIS
@@ -114,12 +112,6 @@ is
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -292,18 +292,6 @@ void AIS_RadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_RadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
const Handle(Graphic2d_GraphicObject)& aPresentation,
const Standard_Integer aMode)
{
// Standard_NotImplemented::Raise("AIS_RadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,const Handle(Graphic2d_GraphicObject)& aPresentation,const Standard_Integer aMode)");
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
}
//=======================================================================
//function : Compute
//purpose :

View File

@@ -19,14 +19,12 @@
// and conditions governing the rights and limitations under the License.
#define GER61351 //GG_171199 Enable to set an object RGB color
// instead a restricted object NameOfColor.
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
#define BUC60915 //GG 05/06/01 Enable to compute the requested arrow size
// if any in all dimensions.
#include <AIS.hxx>
#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_Group.hxx>
#include <AIS_Relation.ixx>
@@ -222,13 +220,11 @@ void AIS_Relation::ComputeProjVertexPresentation(const Handle(Prs3d_Presentation
//=======================================================================
void AIS_Relation::SetColor(const Quantity_NameOfColor aCol)
#ifdef GER61351
{
SetColor(Quantity_Color(aCol));
}
void AIS_Relation::SetColor(const Quantity_Color &aCol)
#endif
{
if(hasOwnColor && myOwnColor==aCol) return;
@@ -268,13 +264,9 @@ void AIS_Relation::UnsetColor()
if (!hasOwnColor) return;
hasOwnColor = Standard_False;
const Handle(Prs3d_LineAspect)& LA = myDrawer->LineAspect();
#ifdef GER61351
Quantity_Color CC;
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
LA->SetColor(CC);
#else
LA->SetColor(AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line));
#endif
myDrawer->AngleAspect()->SetLineAspect(LA);
myDrawer->LengthAspect()->SetLineAspect(LA);
myDrawer->SetTextAspect(myDrawer->Link()->TextAspect());

View File

@@ -58,13 +58,11 @@ uses
Box from Bnd,
ShapeEnum from TopAbs,
Shape from TopoDS,
GraphicObject from Graphic2d,
NameOfMaterial from Graphic3d ,
---NameOfPhysicalMaterial from Graphic3d ,
MaterialAspect from Graphic3d,
Presentation from Prs3d,
Projector from Prs3d,
PresentationManager2d from PrsMgr,
PresentationManager3d from PrsMgr,
Selection from SelectMgr,
KindOfInteractive from AIS,
@@ -174,11 +172,6 @@ uses
aMode : Integer from Standard = 0)
is redefined virtual protected;
Compute(me : mutable;
aPresentationManager : PresentationManager2d from PrsMgr;
aPresentation : mutable GraphicObject from Graphic2d;aMode:Integer from Standard = 0)
is redefined virtual protected;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aPresentation : mutable Presentation from Prs3d)

View File

@@ -44,8 +44,7 @@
#include <Graphic3d_AspectText3d.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Graphic3d_MaterialAspect.hxx>
#include <Prs3d_Presentation.hxx>
@@ -104,24 +103,18 @@ void AIS_Shape::DisplayBox(const Handle(Prs3d_Presentation)& aPrs,
const Bnd_Box& B,
const Handle(Prs3d_Drawer)& aDrawer)
{
Standard_Real X[2],Y[2],Z[2];
Standard_Integer Indx [16] ;
static const Standard_Integer Indx[][3] =
{ { 0, 0, 0 }, { 1, 0, 0 }, { 1, 0, 1 }, { 0, 0, 1 },
{ 0, 1, 1 }, { 1, 1, 1 }, { 1, 1, 0 }, { 0, 1, 0 },
{ 0, 0, 0 }, { 0, 0, 1 }, { 1, 0, 1 }, { 1, 1, 1 },
{ 0, 1, 1 }, { 0, 1, 0 }, { 1, 1, 0 }, { 1, 0, 0 } };
if ( B.IsVoid() )
return; // nothing to show
Indx [0]=1;Indx [1]=2;Indx [2]=4;Indx [3]=3;
Indx [4]=5;Indx [5]=6;Indx [6]=8;Indx [7]=7;
Indx [8]=1;Indx [9]=3;Indx [10]=7;Indx [11]=5;
Indx [12]=2;Indx [13]=4;Indx [14]=8;Indx [15]=6;
Standard_Real X[2],Y[2],Z[2];
B.Get(X[0], Y[0], Z[0], X[1], Y[1], Z[1]);
Graphic3d_Array1OfVertex V(1,8);
Standard_Integer Rank(0);
for(Standard_Integer k=0;k<=1;k++)
for(Standard_Integer j=0;j<=1;j++)
for(Standard_Integer i=0;i<=1;i++)
V(++Rank) = Graphic3d_Vertex(X[i],Y[j],Z[k]);
Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPrs);
Quantity_Color Q;
Aspect_TypeOfLine A;
@@ -130,16 +123,11 @@ void AIS_Shape::DisplayBox(const Handle(Prs3d_Presentation)& aPrs,
G->SetGroupPrimitivesAspect(new Graphic3d_AspectLine3d(Q,Aspect_TOL_DOTDASH,W));
G->BeginPrimitives();Standard_Integer I,J;
Graphic3d_Array1OfVertex VVV (1,5);
for(I=1;I<=4;I++){
for(J=1;J<=4;J++){
VVV.SetValue(J,V(Indx[J+4*I-5]));
}
VVV.SetValue(5,VVV(1));
G->Polyline(VVV);
}
G->EndPrimitives();
Handle(Graphic3d_ArrayOfPolylines) aPolyline = new Graphic3d_ArrayOfPolylines(16);
Standard_Integer i(0);
for(;i<16;i++)
aPolyline->AddVertex(X[Indx[i][0]],Y[Indx[i][1]],Z[Indx[i][2]]);
G->AddPrimitiveArray(aPolyline);
}
static Standard_Boolean IsInList(const TColStd_ListOfInteger& LL, const Standard_Integer aMode)
@@ -287,17 +275,6 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
aPrs->ReCompute(); // for hidden line recomputation if necessary...
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager*/,
const Handle(Graphic2d_GraphicObject)& /*aGRO*/,
const Standard_Integer /*aMode*/)
{
}
//=======================================================================
//function : Compute
//purpose : Hidden Line Removal

View File

@@ -34,9 +34,7 @@ uses Shape from TopoDS,
Dir from gp,
Pnt from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
ExtendedString from TCollection,
Plane from Geom
@@ -87,12 +85,6 @@ is
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;
aTrsf : Transformation from Geom;

View File

@@ -141,19 +141,6 @@ void AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning at compilation (SUN)
//=======================================================================
void AIS_SymmetricRelation::Compute
(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
const Standard_Integer /*anInteger*/)
{
// Standard_NotImplemented::Raise("AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_SymmetricRelation::Compute(const Handle_Prs3d_Projector& aProjector,
const Handle_Geom_Transformation& aTransformation,
const Handle_Prs3d_Presentation& aPresentation)

View File

@@ -30,9 +30,7 @@ uses Shape from TopoDS,
Pnt from gp,
Dir from gp,
Projector from Prs3d,
Transformation from Geom,
PresentationManager2d from PrsMgr,
GraphicObject from Graphic2d,
Transformation from Geom,
Plane from Geom
is
@@ -75,13 +73,7 @@ is
Compute(me:mutable;
aProjector: Projector from Prs3d;
aPresentation: mutable Presentation from Prs3d)
is redefined static private;
Compute(me:mutable;
aPresentationManager: PresentationManager2d from PrsMgr;
aPresentation: mutable GraphicObject from Graphic2d;
aMode: Integer from Standard = 0)
is redefined static private;
is redefined static private;
Compute(me : mutable;
aProjector : Projector from Prs3d;

View File

@@ -129,18 +129,6 @@ void AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
}
//=======================================================================
//function : Compute
//purpose : to avoid warning
//=======================================================================
void AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
const Standard_Integer anInteger)
{
// Standard_NotImplemented::Raise("AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
}
void AIS_TangentRelation::Compute(const Handle_Prs3d_Projector& aProjector,
const Handle_Geom_Transformation& aTransformation,
const Handle_Prs3d_Presentation& aPresentation)

View File

@@ -30,7 +30,6 @@
#include <Graphic3d_Group.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_ArrayOfPrimitives.hxx>
IMPLEMENT_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
@@ -57,16 +56,11 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre
case 0:
const TColgp_Array1OfPnt& nodes = myTriangulation->Nodes(); //Nodes
const Poly_Array1OfTriangle& triangles = myTriangulation->Triangles(); //Triangle
const TShort_Array1OfShortReal& normals = myTriangulation->Normals(); //Normal
Standard_Boolean hasVNormals = Standard_False;
Standard_Boolean hasVColors = Standard_False;
if( normals.Length() > 0 )
hasVNormals = Standard_True;
if( myFlagColor == 1 )
hasVColors = Standard_True;
Standard_Boolean hasVNormals = myTriangulation->HasNormals();
Standard_Boolean hasVColors = (myFlagColor == 1);
Handle(Graphic3d_ArrayOfTriangles) array =
Handle(Graphic3d_ArrayOfTriangles) anArray =
new Graphic3d_ArrayOfTriangles ( myNbNodes, //maxVertexs
myNbTriangles * 3,//maxEdges
hasVNormals, //hasVNormals
@@ -81,26 +75,57 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre
Standard_Integer j;
Standard_Real ambient = aspect->FrontMaterial().Ambient();
for ( i = nodes.Lower(); i<= nodes.Upper(); i++ ){
if( myFlagColor == 1 )
array->AddVertex( nodes(i), AttenuateColor(myColor->Value(i),ambient));
if( myFlagColor == 0 )
array->AddVertex( nodes(i) );
j = (i - nodes.Lower()) * 3;
array->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
if (hasVNormals)
{
const TShort_Array1OfShortReal& normals = myTriangulation->Normals();
if (hasVColors)
{
const TColStd_Array1OfInteger& colors = myColor->Array1();
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
{
j = (i - nodes.Lower()) * 3;
anArray->AddVertex(nodes(i), AttenuateColor(colors(i), ambient));
anArray->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
}
}
else // !hasVColors
{
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
{
j = (i - nodes.Lower()) * 3;
anArray->AddVertex(nodes(i));
anArray->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
}
}
}
else // !hasVNormals
{
if (hasVColors)
{
const TColStd_Array1OfInteger& colors = myColor->Array1();
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
{
anArray->AddVertex(nodes(i), AttenuateColor(colors(i), ambient));
}
}
else // !hasVColors
{
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
{
anArray->AddVertex(nodes(i));
}
}
}
Standard_Integer indexTriangle[3] = {0,0,0};
for ( i = triangles.Lower(); i<= triangles.Upper(); i++ ) {
triangles(i).Get(indexTriangle[0], indexTriangle[1], indexTriangle[2]);
array->AddEdge(indexTriangle[0]);
array->AddEdge(indexTriangle[1]);
array->AddEdge(indexTriangle[2]);
anArray->AddEdge(indexTriangle[0]);
anArray->AddEdge(indexTriangle[1]);
anArray->AddEdge(indexTriangle[2]);
}
TheGroup->SetPrimitivesAspect(aspect);
TheGroup->BeginPrimitives();
TheGroup->AddPrimitiveArray(array);
TheGroup->EndPrimitives();
TheGroup->AddPrimitiveArray(anArray);
break;
}
}

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