Commit Graph

136 Commits

Author SHA1 Message Date
Dion Moult e089d4c78a Use vectors instead of unordered_map for 15% speed boost 2024-02-08 11:44:08 +11:00
Dion Moult 155f0abbfe Refactor out BVH-BVH clash into its own function. 2024-02-08 10:35:35 +11:00
Dion Moult 77d9688296 Replace threeyd tri-tri intersect library with physx implementation. 2024-02-08 10:21:56 +11:00
Dion Moult 09efd68e6e Move vendor functions into clash_utils 2024-02-07 23:01:21 +11:00
Dion Moult 0b3e9e7c5a Reuse geom iterator triangulation data, don't use optimal OBBs for speed, verts now use gp_Pnt instead of BVH_Vec3d, and optimise add_triangulated. 2024-02-07 17:49:12 +11:00
Dion Moult b658b74b90 Fix missing clearance AABB check and add check_all clearance bool. Minor cleanup to use vert/normal maps. 2024-02-07 09:28:19 +11:00
Dion Moult 47dd8ec4dd Use map for verts and normals, basic implementation of piercing checks. 2024-02-06 22:21:33 +11:00
Dion Moult 9ba1596e30 Implement early return bool for intersection tests. 2024-02-05 18:47:08 +11:00
Dion Moult 930020bf05 Use NVIDIA's ray-tri intersection implementation under BSD-3 license. 2024-02-04 22:51:51 +11:00
Dion Moult 1fe69e5f19 Simple implementation of clearance clash. 2024-02-04 16:02:45 +11:00
Dion Moult 988c8f16f3 Implement collision clash type (pure tri intersection regardless of protrusion)
This should be equivalent to select(element) but faster and with an allow_touching toggle.
2024-02-04 09:01:35 +11:00
Dion Moult 080b628df5 Optimise by removing unnecessary (very slow) triangle shrinking, more optimal OBBs, check OBB first for points_in_b prior to doing raycast (much faster now), and return the surface point of the protrusion too for convenience. 2024-02-03 16:14:26 +11:00
Dion Moult d0333ac7cd Penetration distances now are influenced by the normal for better results.
Add cache for points that have already been checked.

Separate out new add_triangulated function with new kwarg add_element(should_triangulate=True) so that you can still have the old geom tree using aabb only if you want, also because add() is used in boolean_utils. Tolerance is now a kwarg.

I misunderstood the OBB dimension and should *2 not /2 which now makes it much slower since there's more triangles to check.
2024-02-02 23:35:06 +11:00
Dion Moult e95e16c102 First attempt at implementation of intersection clash checks.
This considers only protruding clashes. It does not consider touching nor encroaching clashes and does not consider protrusion direction in the protrusion distance.
2024-02-01 18:30:20 +11:00
Thomas Krijnen 532869a48a #4182 Properly initialize filename in stream_or_filename class 2024-01-09 13:41:38 +01:00
Martin15135215 507a5cab83 add cff for ifcgeom_schema_agnostic 2023-12-07 13:42:32 +11:00
Thomas Krijnen 94db9ec522 Add IFC4X3_ADD2 schema 2023-10-13 11:51:05 +02:00
Thomas Krijnen 0e5e1f7873 Option to write Earth-Centered Earth-Fixed glTF 2023-10-03 21:26:11 +02:00
Dirk Olbrich aace987149 ifcgeom: fix compiler warning -Wreorder-ctor 2023-09-03 20:02:20 +02:00
Thomas Krijnen 30fc52ebd9 #3616 Only consider distance orthogonal to projection vector for 2d boolean preprocessing 2023-08-22 15:00:25 +02:00
Thomas Krijnen f4971da42e #3429 Fix b operand non-planar face check 2023-08-17 11:28:02 +02:00
Thomas Krijnen b611151039 #3536 fix edge segments in world coords 2023-08-09 14:55:23 +08:00
Thomas Krijnen c3f352c018 #3546 Filter duplicate edge indices 2023-08-06 14:27:31 +08:00
luzpaz b3b45893cc Fix various typos in src/ifcgeom* subdirs 2023-07-07 18:44:02 +02:00
Thomas Krijnen 2b3d547c99 #3120 item_id vector 2023-06-19 13:47:55 +02:00
Thomas Krijnen 840818d681 #3308 add assert 2023-06-15 21:27:42 +02:00
Thomas Krijnen 4bbb6cd2df #3305 Less pessimistic tolerance comparison in newells method 2023-06-14 11:47:24 +02:00
Thomas Krijnen 9411a1d94b #3305 one more iteration on lower fuzziness level for boolean ops 2023-06-14 11:47:24 +02:00
Thomas Krijnen c974306636 #3141 eliminate_narrow_operands() 2023-06-01 21:42:31 +02:00
kzfile 13f8b183cb fix IfcSpace default style 2023-03-08 20:58:49 +01:00
Thomas Krijnen b84782e07f #2810 catch bad positioning warning and empty result 2023-03-03 14:32:02 +01:00
Thomas Krijnen 7df9640807 #2704 properly propagate iterator destructor 2023-01-28 14:21:52 +01:00
Thomas Krijnen 802e3a0ea1 #2688 fix non-planar face triangulation 2023-01-15 14:42:24 +01:00
Thomas Krijnen 373d664251 #2361 2023-01-13 12:50:18 +01:00
Thomas Krijnen b301eb6520 Update boolean_utils.cpp 2023-01-12 13:07:40 +01:00
Thomas Krijnen dbbbb52e9e #2624 2022-12-02 13:43:44 +01:00
Thomas Krijnen 8a108f37c3 Moar schema indices 2022-11-24 09:36:02 +01:00
Thomas Krijnen 631722303f https://raw.githubusercontent.com/buildingSMART/IFC4.3-html/sep-13-release/IFC/RELEASE/IFC4x3/HTML/IFC4X3_TC1.exp 2022-11-23 13:23:49 +01:00
Thomas Krijnen 4e0a19e013 https://raw.githubusercontent.com/buildingSMART/IFC4.3-html/v4.3.1.0/IFC/RELEASE/IFC4x3/HTML/IFC4X3_ADD1.exp 2022-11-20 16:52:46 +01:00
Thomas Krijnen 8f33c2ca9d Missing file 2022-11-14 09:38:51 +01:00
Thomas Krijnen 9351038009 Refactoring 2022-11-14 09:23:59 +01:00
Thomas Krijnen c18458b3db Refactoring 2022-11-13 11:21:58 +01:00
Thomas Krijnen 3736a8b4b4 Refactoring 2022-11-13 11:04:16 +01:00
Thomas Krijnen a57cac5f9c #2558 make conditional 2022-11-06 14:39:01 +01:00
Kristoffer Andersen a7f9d548cf fix: add conditional #include <windows.h> for certain files breaking … (#2558)
* fix: add conditional #include <windows.h> for certain files breaking with boost v1.78+

* Revert "fix: add conditional #include <windows.h> for certain files breaking with boost v1.78+"

This reverts commit 7cd5c6292b.

* fix: add only `BOOST_REGEX_NO_W32` to fix issues boost v1.78+
2022-11-01 13:30:07 +01:00
Thomas Krijnen 4cccfd08d3 #671 check for zero magnitude vector in newells method 2022-10-13 09:34:14 +02:00
Thomas Krijnen 92fb46558f #671 perform fix on wires after wire_intersections() 2022-10-13 09:20:44 +02:00
Thomas Krijnen f3a15953b2 Missing include 2022-10-03 14:01:43 +02:00
Thomas Krijnen a63d6475b2 Keep moving schema agnostic code out of kernel 2022-09-12 10:34:11 +02:00
Thomas Krijnen 4cd0932d7d Fix to boolean utils, version detection, and behaviour on old versions 2022-09-12 10:34:11 +02:00