View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031261 | Open CASCADE | OCCT:Modeling Data | public | 2019-12-23 12:58 | 2023-08-01 15:06 |
Reporter | snn | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Target Version | Unscheduled | ||||
Summary | 0031261: Modeling Data - Unable to find a closest point on the face section | ||||
Description | Takes place in the following situation: 1. A face with geometry is crossed by plane 2. It is needed to find a point on the cross-section closest to the specified point A code fragment is provided. The attached archive contains shapes of interest (in binary and text formats). Shape names correlate with names from the code fragment. | ||||
Steps To Reproduce | BRepAlgoAPI_Section mkSection(mindface, toolplane, Standard_False); mkSection.Approximation(Standard_True); mkSection.ComputePCurveOn1(Standard_False); mkSection.ComputePCurveOn2(Standard_False); mkSection.Build(); if (mkSection.IsDone()) { const TopoDS_Shape& section = mkSection.Shape(); // Find an edge containing the ponsurf-point. double mind2(DBL_MAX); TopExp_Explorer expl(section, TopAbs_EDGE); for (; expl.More(); expl.Next()) { const TopoDS_Edge& edge = TopoDS::Edge(expl.Current()); double f, l; const Handle(Geom_Curve)& curve = BRep_Tool::Curve(edge, f, l); if (!curve.IsNull()) { GeomAdaptor_Curve adaptor(curve, f, l); Extrema_ExtPC extrema(pontris, adaptor, Precision::Confusion()); if (extrema.IsDone()) { bool isminfound(false); for (int i = 1; i <= extrema.NbExt() && !isminfound; i++) { if (extrema.IsMin(i)) { double d2 = extrema.SquareDistance(i); if (d2 < mind2) { mind2 = d2; isminfound = true; sectionedge = edge; ponsurf = extrema.Point(i).Value(); } } } } } } if (mind2 == DBL_MAX) { // Shapes were saved here std::cout << "mind2 == DBL_MAX" << std::endl; } } | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-12-23 12:58 | snn | New Issue | |
2019-12-23 12:58 | snn | Assigned To | => msv |
2019-12-23 12:58 | snn | File Added: shapes.zip | |
2020-09-15 12:42 |
|
Target Version | 7.5.0 => 7.6.0 |
2020-09-15 12:42 |
|
Summary | Unable to find a closest point on the face section => Modeling Data - Unable to find a closest point on the face section |
2021-08-29 18:53 |
|
Target Version | 7.6.0 => 7.7.0 |
2022-10-24 10:43 |
|
Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:06 | dpasukhi | Target Version | 7.8.0 => Unscheduled |