View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030206 | Open CASCADE | OCCT:DRAW | public | 2018-10-05 16:03 | 2021-09-11 14:05 |
Reporter | Assigned To | ||||
Priority | normal | Severity | tweak | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.3.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0030206: Improve API of commands bbop and bapibop | ||||
Description | Improve API of commands bbop and bapibop so that it was possible to use symbolic names of operations instead of integer type. | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | test bugs modalg_7 bug30206 | ||||
|
Branch CR30206 has been created by emv. SHA-1: a677d51c8c8ccacc27c02c3e56593b95da94b340 Detailed log of new commits: Author: emv Date: Tue Sep 7 16:00:25 2021 +0300 0030206: Improve API of commands bbop and bapibop Allow using meaningful parameters for the commands bbop and bapibop: common - for Common operation fuse - for Fuse operation cut - for Cut operation tuc/cut21 - for Cut21 operation section - for Section operation |
|
Branch CR30206 has been updated forcibly by emv. SHA-1: 1b9139411885b2c695db3d6eac3817a52de98f44 |
|
Branch CR30206 has been updated forcibly by emv. SHA-1: 32a9c0430a589ca7622bb4e4efaa7073d4bb6187 |
|
Dear Mikhail, could you please review the git branch CR30206? Test results - http://jenkins-test-occt.nnov.opencascade.com/view/CR30206-master-emv/view/COMPARE/ Please note, that it also fixes the the issue 0030620. |
|
src/BOPTest/BOPTest.cxxif (std::strlen(theOp) == 1) { // Try converting to integer Standard_Integer iOp = Draw::Atoi(theOp); if (iOp < 0 || iOp > 4) { // out of range return BOPAlgo_UNKNOWN; } // Check if satisfies the enumeration. If 0 is returned, check that 0 was really meant. if ((iOp > 0 && iOp <= 4) || (iOp == 0 && theOp[0] == '0')) { return static_cast<BOPAlgo_Operation>(iOp); } return BOPAlgo_UNKNOWN; } This can be much shorter: if (std::strlen(theOp) == 1) { if (theOp[0] >= '0' && theOp[0] <= '4')) { return static_cast<BOPAlgo_Operation>(theOp[0] - '0'); } return BOPAlgo_UNKNOWN; } if (!strcasecmp(theOp, "common")) I am in doubt if we can safely use strcasecmp function. I found such statement in https://stackoverflow.com/questions/31127260/strcasecmp-a-non-standard-function: "strcasecmp is not in the C or C++ standard. It's defined by POSIX.1-2001 and 4.4BSD. If your system POSIX or BSD compliant, you'll have no problems. Otherwise, the function will be unavailable." Instead, it is better to do as in other OCCT places: convert the input string to lowercase (with TCollection_AsciiString) and compare with lowercase sample. |
|
+ theCommands.Add("bfillds", "Performs intersection of the arguments.\n" + "\t\tUsage: bfillds [-t]\n" + "\t\tWhere: -t is the optional parameter for enabling timer and showing elapsed time of the operation", + __FILE__, bfillds, g); Command help doesn't mention a syntax for providing "the arguments" for intersection operation. If this should be provided by another command - it would be useful mentioning command name in help. + Standard_EXPORT static BOPAlgo_Operation GetOperationType(const Standard_CString& theOp); It is unusual and unnecessary passing Standard_CString (which is char*) by reference. |
|
Branch CR30206 has been updated forcibly by emv. SHA-1: 96ed82265f9012e45c3d0f9b5899f9dae39b9dfa |
|
Corrected. |
|
Branch CR30206 has been updated by emv. SHA-1: 7f5c10d02eaf3f11eb0b1bca6ecba2601f249fb8 Detailed log of new commits: Author: emv Date: Wed Sep 8 15:06:16 2021 +0300 # small correction. |
|
For integration: occt - CR30206 products - node |
|
Combination - OCCT branch : IR-2021-09-10 master SHA - 9ae883970dd77a39d856b49e6883ed5d0e60d20f 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2021-09-10 SHA - 2d2bc879e2da9d770a1938ab3410f5885c8555e7 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17358.54000000042 / 17496.500000000422 [-0.79%] Products Total CPU difference: 11397.800000000112 / 11567.680000000111 [-1.47%] Windows-64-VC14: OCCT Total CPU difference: 19328.109375 / 19307.609375 [+0.11%] Products Total CPU difference: 12733.328125 / 12920.953125 [-1.45%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR30206 has been deleted by mnt. SHA-1: 7f5c10d02eaf3f11eb0b1bca6ecba2601f249fb8 |
occt: master 74a53b82 2021-09-07 13:00:25
Committer: |
0030206: Improve API of commands bbop and bapibop 0030620: Tests - perf/bop/buildfaces does not match description (broken) Allow using meaningful parameters for the commands bbop and bapibop: * common - for Common operation * fuse - for Fuse operation * cut - for Cut operation * tuc/cut21 - for Cut21 operation * section - for Section operation Add description for the commands dealing with Boolean/GF/Split operations. Validate arguments of these commands. Correct test case perf/bop/buildfaces to perform GF execution in parallel and serial modes - compare the results. |
Affected Issues 0030206 |
|
mod - src/BOPTest/BOPTest.cxx | Diff File | ||
mod - src/BOPTest/BOPTest.hxx | Diff File | ||
mod - src/BOPTest/BOPTest_APICommands.cxx | Diff File | ||
mod - src/BOPTest/BOPTest_ObjCommands.cxx | Diff File | ||
mod - src/BOPTest/BOPTest_PartitionCommands.cxx | Diff File | ||
mod - tests/bugs/modalg_5/bug24639 | Diff File | ||
add - tests/bugs/modalg_7/bug30206 | Diff File | ||
mod - tests/perf/bop/buildfaces | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-10-05 16:03 |
|
New Issue | |
2018-10-05 16:03 |
|
Assigned To | => emv |
2019-07-19 17:27 | apn | Target Version | 7.4.0 => 7.5.0 |
2020-08-28 13:25 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-09-07 16:01 | git | Note Added: 0103895 | |
2021-09-07 17:42 | git | Note Added: 0103900 | |
2021-09-07 22:06 | git | Note Added: 0103906 | |
2021-09-08 07:40 |
|
Note Added: 0103911 | |
2021-09-08 07:40 |
|
Assigned To | emv => msv |
2021-09-08 07:40 |
|
Status | new => resolved |
2021-09-08 07:41 |
|
Note Edited: 0103911 | |
2021-09-08 07:41 |
|
Relationship added | related to 0030620 |
2021-09-08 10:46 |
|
Note Added: 0103916 | |
2021-09-08 10:46 |
|
Assigned To | msv => emv |
2021-09-08 10:46 |
|
Status | resolved => assigned |
2021-09-08 10:46 | kgv | Note Added: 0103917 | |
2021-09-08 10:48 | kgv | Note Edited: 0103917 | |
2021-09-08 12:07 | git | Note Added: 0103918 | |
2021-09-08 14:32 |
|
Note Added: 0103924 | |
2021-09-08 14:32 |
|
Assigned To | emv => msv |
2021-09-08 14:32 |
|
Status | assigned => resolved |
2021-09-08 15:07 | git | Note Added: 0103926 | |
2021-09-08 15:09 |
|
Note Added: 0103927 | |
2021-09-08 15:09 |
|
Assigned To | msv => bugmaster |
2021-09-08 15:09 |
|
Status | resolved => reviewed |
2021-09-08 15:12 |
|
Test case number | => test bugs modalg_7 bug30206 |
2021-09-11 13:24 |
|
Note Added: 0104006 | |
2021-09-11 13:24 |
|
Status | reviewed => tested |
2021-09-11 13:43 |
|
Changeset attached | => occt master 74a53b82 |
2021-09-11 13:43 |
|
Assigned To | bugmaster => smoskvin |
2021-09-11 13:43 |
|
Status | tested => verified |
2021-09-11 13:43 |
|
Resolution | open => fixed |
2021-09-11 14:05 | git | Note Added: 0104025 |