MantisBT - Open CASCADE
View Issue Details
0031185Open CASCADE[OCCT] PRODUCTS:PMI Visualizationpublic2019-11-22 09:032020-06-28 12:49
nds 
bugmaster 
normalminor 
verifiedfixed 
 
[OCCT] 7.5.0* 
Not required
0031185: PMIVis - give an access to angle computation by shapes out of dimension build
PMIVis 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.
No tags attached.
Issue History
2019-11-22 09:03ndsNew Issue
2019-11-22 09:03ndsAssigned To => nds
2019-11-25 13:20ndsRelationship addedrelated to 0031194
2020-03-27 14:19ndsNote Added: 0091297
2020-03-27 14:27kgvNote Added: 0091298
2020-03-27 14:28ndsAssigned Tonds => sshutina
2020-06-21 21:33kgvSummaryPMIVis - 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:32sshutinaAssigned Tosshutina => nds
2020-06-25 20:32sshutinaStatusnew => resolved
2020-06-25 21:11kgvNote Added: 0092737
2020-06-25 21:14ndsNote Added: 0092738
2020-06-25 21:14ndsAssigned Tonds => sshutina
2020-06-25 21:14ndsStatusresolved => assigned
2020-06-26 17:12sshutinaNote Added: 0092774
2020-06-26 17:12sshutinaAssigned Tosshutina => kgv
2020-06-26 17:12sshutinaStatusassigned => resolved
2020-06-26 17:17kgvNote Added: 0092775
2020-06-26 17:17kgvAssigned Tokgv => bugmaster
2020-06-26 17:17kgvStatusresolved => reviewed
2020-06-28 11:28bugmasterNote Added: 0092794
2020-06-28 11:28bugmasterStatusreviewed => tested
2020-06-28 11:34bugmasterTest case number => Not required
2020-06-28 12:36bugmasterNote Added: 0092795
2020-06-28 12:36bugmasterStatustested => verified
2020-06-28 12:36bugmasterResolutionopen => fixed

Notes
(0091297)
nds   
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   
2020-03-27 14:27   
+  PMIVis_TwoEdgesParallel = 1,  //! two edges are parallel

//!<
(0092737)
kgv   
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   
2020-06-25 21:14   
Dear Svetlana

could you please process remarks.

Thank you a lot for help.
(0092774)
sshutina   
2020-06-26 17:12   
Кирилл, ремарки исправлены. Не мог бы ты, пожалуйста, посмотреть еще раз.

Спасибо, Светлана.
(0092775)
kgv   
2020-06-26 17:17   
Please raise the patch in OCC Products branch CR31185_6 if tests passed.
(0092794)
bugmaster   
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   
2020-06-28 12:36   
Fix has been integrated into master of occt-products repository