mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Merge branch 'v0.6.0' of github.com:IfcOpenShell/IfcOpenShell into v0.6.0
This commit is contained in:
@@ -456,7 +456,7 @@ namespace {
|
||||
if (cls.Perform(gp_Pnt2d(u, v)) == TopAbs_IN) {
|
||||
gp_Pnt test2;
|
||||
p1->D0(u, v, test2);
|
||||
double w = gp_Vec(p1->Position().Direction().XYZ()).Dot(test2.XYZ() - test.XYZ());
|
||||
double w = std::abs(gp_Vec(p1->Position().Direction().XYZ()).Dot(test2.XYZ() - test.XYZ()));
|
||||
if (w < M) {
|
||||
M = w;
|
||||
}
|
||||
@@ -3684,7 +3684,9 @@ bool IfcGeom::Kernel::wire_intersections(const TopoDS_Wire& wire, TopTools_ListO
|
||||
// ShapeAnalysis_Wire saw(wd, face, getValue(GV_PRECISION));
|
||||
|
||||
const double eps = faceset_helper_
|
||||
? faceset_helper_->epsilon()
|
||||
// eps is added to both ends of the parametric domain, so 3. is chosen to be on the safe side here.
|
||||
? (faceset_helper_->epsilon() / 3.)
|
||||
// @todo re-evaluate 2. here for the reasons above:
|
||||
: (std::min)(min_edge_length(wire) / 2., getValue(GV_PRECISION) * 10.);
|
||||
|
||||
for (int i = 2; i < n; ++i) {
|
||||
@@ -4163,7 +4165,7 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a_, const TopTools_L
|
||||
} else if ((v = min_vertex_edge_distance(r, getValue(GV_PRECISION), fuzziness * 3.)) < fuzziness * 3.) {
|
||||
reason = 1;
|
||||
success = false;
|
||||
} else if ((v = min_face_face_distance(r, fuzziness * 3.)) < fuzziness * 3.) {
|
||||
} else if ((v = min_face_face_distance(r, 1.e-4)) < 1.e-4) {
|
||||
reason = 2;
|
||||
success = false;
|
||||
}
|
||||
|
||||
@@ -501,9 +501,17 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape
|
||||
second_operands.push_back(operand2);
|
||||
|
||||
if (occ_op == BOPAlgo_CUT) {
|
||||
bool process_as_list = true;
|
||||
int n_half_space_operands = 0;
|
||||
bool process_as_list = false;
|
||||
while (true) {
|
||||
auto res1 = operand1->as<IfcSchema::IfcBooleanResult>();
|
||||
if (res1 && res1->SecondOperand()->as<IfcSchema::IfcHalfSpaceSolid>() && ++n_half_space_operands > 8) {
|
||||
// There is something peculiar about many half space subtraction operands that OCCT does not like.
|
||||
// Often these are used to create a semi-curved arch, as is the case in 693. Supplying all these
|
||||
// operands at once apparently leads to too many edge-edge interference checks.
|
||||
process_as_list = false;
|
||||
break;
|
||||
}
|
||||
if (res1) {
|
||||
if (res1->Operator() == op) {
|
||||
operand1 = res1->FirstOperand();
|
||||
|
||||
Reference in New Issue
Block a user