|Anonymous | Login||2018-05-24 12:38 MSK|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0029766||Community||[OCCT] OCCT:Modeling Algorithms||public||2018-05-14 15:55||2018-05-17 19:24|
|Product Version||[OCCT] 7.2.0|
|Target Version||[OCCT] 7.4.0*||Fixed in Version|
|Summary||0029766: Modeling Algorithms - BRepExtrema_DistShapeShape Should Give Access to Its Solutions|
|Description||I compute the distances of two shapes, but I am not only interested in the minimum distance, but I also want to have the closest points on both shapes, their distances and their parameters with respect to both shapes.|
BRepExtrema_DistShapeShape does not offer an easy solution for that, because its actual solutions are private. For computing the distances of the local solutions, I have to compute the distances of the solution points (using BRepExtrema_DistShapeShape::PointOnShape1 and BRepExtrema_DistShapeShape::PointOnShape2). And for computing the point parameters, I have to project the points with ShapeAnalysis_Curve::Project.
If there were getters for the actual solutions, I could more easily access that data and also it would be less costly in terms of computation times.
|Steps To Reproduce||Not required|
|Tags||No tags attached.|
|Test case number|
Branch CR29766 has been created by BenjaminBihler.
Detailed log of new commits:
Author: Benjamin Bihler
Date: Mon May 14 15:02:22 2018 +0200
0029766: BRepExtrema_DistShapeShape Should Give Access to Its Solutions
Solution getters have been added to BRepExtrema_DistShapeShape.
Why don't you use the methods:
//! gives the support where the Nth solution on the first shape is situated. //! This support can be a Vertex, an Edge or a Face. Standard_EXPORT TopoDS_Shape SupportOnShape1(const Standard_Integer N) const; //! gives the support where the Nth solution on the second shape is situated. //! This support can be a Vertex, an Edge or a Face. Standard_EXPORT TopoDS_Shape SupportOnShape2(const Standard_Integer N) const; //! gives the corresponding parameter t if the Nth solution //! is situated on an Egde of the first shape Standard_EXPORT void ParOnEdgeS1(const Standard_Integer N,Standard_Real& t) const; //! gives the corresponding parameter t if the Nth solution //! is situated on an Egde of the first shape Standard_EXPORT void ParOnEdgeS2(const Standard_Integer N,Standard_Real& t) const; //! gives the corresponding parameters (U,V) if the Nth solution //! is situated on an face of the first shape Standard_EXPORT void ParOnFaceS1(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const; //! gives the corresponding parameters (U,V) if the Nth solution //! is situated on an Face of the second shape Standard_EXPORT void ParOnFaceS2(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const;
I think they provide the info you seek for.
I guess that they don't. Please correct me, if I am wrong.
- If the first shape is an edge, then the method ParOnEdgeS1 looks tempting. But as the documentation states, it returns the parameter, if the Nth solution is situated ON AN EDGE OF THE FIRST SHAPE, which is not the case since the first shape itself is the edge. In this case a BRepExtrema_UnCompatibleShape("BRepExtrema_DistShapeShape::ParOnEdgeS1: ParOnEdgeS1 is impossible without EDGE") is thrown.
- The local distances are not available at all.
There is no contradiction between the fact that the first shape is an edge and Nth solution is situated on an edge. In this case all solutions will be situated on the edge or on one of its vertices.
Please see how it is used in OCCT sources, e.g. AIS_LengthDimension.cxx, lines 481-501, or better ShapeAnalysis_Edge.cxx, 986-1010.
What do you mean under local distances? The tool gives the distance by the method Value(). All other distances are within the range [Value(), Value()+deflection], by default deflection is 1e-7.
|2018-05-14 15:55||BenjaminBihler||New Issue|
|2018-05-14 15:55||BenjaminBihler||Assigned To||=> BenjaminBihler|
|2018-05-14 16:07||git||Note Added: 0075964|
|2018-05-14 16:08||BenjaminBihler||Assigned To||BenjaminBihler => msv|
|2018-05-14 16:08||BenjaminBihler||Status||new => resolved|
|2018-05-14 16:08||BenjaminBihler||Steps to Reproduce Updated||View Revisions|
|2018-05-14 16:20||kgv||Summary||BRepExtrema_DistShapeShape Should Give Access to Its Solutions => Modeling Algorithms - BRepExtrema_DistShapeShape Should Give Access to Its Solutions|
|2018-05-14 17:00||msv||Note Added: 0075968|
|2018-05-14 17:00||msv||Assigned To||msv => BenjaminBihler|
|2018-05-14 17:00||msv||Status||resolved => feedback|
|2018-05-14 17:43||BenjaminBihler||Note Added: 0075969|
|2018-05-14 17:44||BenjaminBihler||Assigned To||BenjaminBihler => msv|
|2018-05-17 19:24||msv||Note Added: 0076019|
|2018-05-17 19:24||msv||Assigned To||msv => BenjaminBihler|
|Copyright © 2000 - 2018 MantisBT Team|