Anonymous | Login | 2021-01-18 07:09 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0031261 | Open CASCADE | [OCCT] OCCT:Modeling Data | public | 2019-12-23 12:58 | 2020-09-15 12:42 | ||||||||
Reporter | snn | ||||||||||||
Assigned To | msv | ||||||||||||
Priority | normal | Severity | minor | ||||||||||
Status | new | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | |||||||||||||
Target Version | [OCCT] 7.6.0* | Fixed in Version | |||||||||||
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 | |||||||||||||
Attached Files | ![]() | ||||||||||||
![]() |
|||
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 | msv | Target Version | 7.5.0 => 7.6.0* |
2020-09-15 12:42 | msv | Summary | Unable to find a closest point on the face section => Modeling Data - Unable to find a closest point on the face section |
Copyright © 2000 - 2021 MantisBT Team |