OCCT 8.0 Update Part 3

This commit is contained in:
Frozen Forest Reality Technologies
2026-06-24 19:31:52 +03:00
committed by Thomas Krijnen
parent 81f71e6418
commit 7f49c945b9
5 changed files with 16 additions and 10 deletions
@@ -1315,7 +1315,7 @@ bool IfcGeom::util::boolean_operation(const boolean_settings& settings, const To
}
if (has_open_shells) {
TopTools_IndexedMapOfShape faces;
NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher> faces;
TopExp::MapShapes(r, TopAbs_FACE, faces);
for (TopExp_Explorer exp(a, TopAbs_FACE); exp.More(); exp.Next()) {
auto& f = TopoDS::Face(exp.Current());
+2 -2
View File
@@ -40,8 +40,8 @@ namespace {
const bool is_rational = !!bc->weights;
NCollection_Array1<gp_Pnt> Poles(0, bc->control_points.size() - 1);
NCollection_Array1<double> Weights(0, bc->control_points.size() - 1);
NCollection_Array1<gp_Pnt> Poles(0, (int)bc->control_points.size() - 1);
NCollection_Array1<double> Weights(0, (int)bc->control_points.size() - 1);
NCollection_Array1<double> Knots(0, (int)bc->knots.size() - 1);
NCollection_Array1<int> Mults(0, (int)bc->knots.size() - 1);
int Degree = bc->degree;
@@ -904,7 +904,7 @@ bool IfcGeom::util::convert_wire_to_faces(const TopoDS_Wire& w, TopoDS_Compound&
}
}
TopTools_ListOfShape results;
NCollection_List<TopoDS_Shape> results;
if (settings.use_wire_intersection_check && util::wire_intersections(w, results, settings)) {
Logger::Root().Warning("GEO", 229, "Self-intersections with " + boost::lexical_cast<std::string>(results.Extent()) + " cycles detected");
} else {
@@ -919,7 +919,7 @@ bool IfcGeom::util::convert_wire_to_faces(const TopoDS_Wire& w, TopoDS_Compound&
std::list<std::pair<double, TopoDS_Face>> face_list;
double max_area = 0.;
TopTools_ListIteratorOfListOfShape it(results);
NCollection_List<TopoDS_Shape>::Iterator it(results);
for (; it.More(); it.Next()) {
const TopoDS_Wire& wire = TopoDS::Wire(it.Value());
if (!is_2d) {
+5 -1
View File
@@ -41,7 +41,11 @@
#include <BRepTools.hxx>
#include <BRepAlgoAPI_Section.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <NCollection_HSequence.hxx>
#include <TopExp.hxx>
#include <BRepAdaptor_Curve.hxx>
+6 -4
View File
@@ -22,7 +22,10 @@
#ifdef IFOPSH_WITH_OPENCASCADE
#include "../ifcgeom/kernels/opencascade/OpenCascadeConversionResult.h"
#include <TopTools_HSequenceOfShape.hxx>
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <NCollection_HSequence.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBndLib.hxx>
#include <BRepAlgoAPI_Section.hxx>
@@ -408,14 +411,13 @@ void TtlWktSerializer::write(const IfcGeom::BRepElement* brep_obj) {
for (int iter = 0; iter < 10; ++iter) {
gp_Pln pln(gp_Pnt(0, 0, zmin + section_height + iter * (height - 1.) / 10.), gp::DZ());
Handle(TopTools_HSequenceOfShape) wires = new TopTools_HSequenceOfShape();
opencascade::handle<NCollection_HSequence<TopoDS_Shape>> wires = new NCollection_HSequence<TopoDS_Shape>();
size_t N = 0;
TopoDS_Iterator it(compound);
// Iterate over components of compound to have better chance of matching section edges to closed wires
for (; it.More(); it.Next()) {
Handle(TopTools_HSequenceOfShape) edges = new TopTools_HSequenceOfShape();
opencascade::handle<NCollection_HSequence<TopoDS_Shape>> edges = new NCollection_HSequence<TopoDS_Shape>();
TopoDS_Shape result = BRepAlgoAPI_Section(it.Value(), pln);
{