MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031185Open CASCADE[OCCT] PRODUCTS:PMI Visualizationpublic2019-11-22 09:032020-06-28 12:49
Reporternds 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0031185: PMIVis - give an access to angle computation by shapes out of dimension build
DescriptionPMIVis has some modeling code to compute an angle based on:
- one shape (revolution or offset surface),
- two shapes (face-face, face-plane).

The algorithm searches three points on the shapes and PMIVis builds presentation using the points or not if the points can not be found.

Sometimes we need to know these points/the points absence beforehand the PMIVis is created and stored in OCAF. Now there are no such interface in PMIVis.

The proposal here one of the following:
1. Provide such interface (extract functions in static interface)
2. Move out this functionality from PMIVis as it looks more as some modeling one to extend it with more types combination in some modeling tool/algorithm.
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships

-  Notes
(0091297)
nds (developer)
2020-03-27 14:19

It's proposed to implement cases:
-Add an angle between a planar face and a linear edge
-Add a new structure PMIVis_AngularSegmentsData with data for an Angle
-Add a new enumeration PMIVis_ShapesMutualLocation, it consists different shapes mutual location
(0091298)
kgv (developer)
2020-03-27 14:27

+  PMIVis_TwoEdgesParallel = 1,  //! two edges are parallel

//!<
(0092737)
kgv (developer)
2020-06-25 21:11

+  return aResult;
+}
+//=======================================================================
+//function : InitAngularSegments

Missing empty line.

+      theThirdShape.ShapeType() == TopAbs_VERTEX)
+    return initAngleByThreePoints (theFirstShape, theSecondShape, theThirdShape, theData);

Brackets are recommended for any condition (or use ternary operator).

+  Standard_Real anAngle = aFirstLin.Angle(aSecondLin);

Please always use `const` when possible, especially in long methods.

+  Standard_Boolean isParallelLines = Abs (anAngle - M_PI) <= Precision::Angular() ||

Variable name is confusing - `areParallelLines` sounds more natural.

+      gp_Pnt aNearPnt = anAnglePoint.Distance(aFirstPoint2) < anAnglePoint.Distance(aLastPoint2)


This is unlikely performance-critical place, but please prefer gp_Pnt::SquareDistance() in comparisons.

+    return fabs(aFirstPlane->Pln().Axis().Direction().Dot(aSecondPlane->Pln().Axis().Direction()))

...
+  if (fabs(aPlane->Pln().Position().Direction().Dot (aCurve.Line().Direction())) < Precision::Confusion())


Abs()

+//! Structure consist the data for creating the angular segment
+struct PMIVis_AngularSegmentsData

`consists of`, or `Structure defines`

+//! Enumeration consists different types of a shapes mutual location.
+enum PMIVis_ShapesMutualLocation

`Enumeration defines`

It's proposed to implement:

Commit title is confusing - it doesn't look 'proposing', it looks like actually implementing proposal.
Please reformulate like
> PMIVis_XXX now compute an angle between a planar face and a linear edge.
> Added an auxiliary structure PMIVis_AngularSegmentsData defining data for an Angle.
(0092738)
nds (developer)
2020-06-25 21:14

Dear Svetlana

could you please process remarks.

Thank you a lot for help.
(0092774)
sshutina (developer)
2020-06-26 17:12

Кирилл, ремарки исправлены. Не мог бы ты, пожалуйста, посмотреть еще раз.

Спасибо, Светлана.
(0092775)
kgv (developer)
2020-06-26 17:17

Please raise the patch in OCC Products branch CR31185_6 if tests passed.
(0092794)
bugmaster (administrator)
2020-06-28 11:28

Combination -
OCCT branch : IR-2020-06-26
master SHA - 832a6f4412321ca784bbb36916dc740d04a05c0c
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-06-26 SHA - 180ab3ca4e501bda3da57c99a8ac8b220db33df3
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: 17164.36000000016 / 17160.400000000114 [+0.02%]
Products
Total CPU difference: 11173.720000000081 / 11197.400000000112 [-0.21%]
Windows-64-VC14:
OCCT
Total CPU difference: 18707.65625 / 18650.578125 [+0.31%]
Products
Total CPU difference: 13062.6875 / 13012.71875 [+0.38%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0092795)
bugmaster (administrator)
2020-06-28 12:36

Fix has been integrated into master of occt-products repository

- Issue History
Date Modified Username Field Change
2019-11-22 09:03 nds New Issue
2019-11-22 09:03 nds Assigned To => nds
2019-11-25 13:20 nds Relationship added related to 0031194
2020-03-27 14:19 nds Note Added: 0091297
2020-03-27 14:27 kgv Note Added: 0091298
2020-03-27 14:28 nds Assigned To nds => sshutina
2020-06-21 21:33 kgv Summary PMIVis - give an acess to angle computation by shapes out of dimension build => PMIVis - give an access to angle computation by shapes out of dimension build
2020-06-25 20:32 sshutina Assigned To sshutina => nds
2020-06-25 20:32 sshutina Status new => resolved
2020-06-25 21:11 kgv Note Added: 0092737
2020-06-25 21:14 nds Note Added: 0092738
2020-06-25 21:14 nds Assigned To nds => sshutina
2020-06-25 21:14 nds Status resolved => assigned
2020-06-26 17:12 sshutina Note Added: 0092774
2020-06-26 17:12 sshutina Assigned To sshutina => kgv
2020-06-26 17:12 sshutina Status assigned => resolved
2020-06-26 17:17 kgv Note Added: 0092775
2020-06-26 17:17 kgv Assigned To kgv => bugmaster
2020-06-26 17:17 kgv Status resolved => reviewed
2020-06-28 11:28 bugmaster Note Added: 0092794
2020-06-28 11:28 bugmaster Status reviewed => tested
2020-06-28 11:34 bugmaster Test case number => Not required
2020-06-28 12:36 bugmaster Note Added: 0092795
2020-06-28 12:36 bugmaster Status tested => verified
2020-06-28 12:36 bugmaster Resolution open => fixed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker