We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-07-30 08:08 AM
I have two walls which is at an angle. As seen in the image below, the walls does not intersect neatly. I was able to correct this using the intersect tool in the UI. How can we achieve similar result through code?
Expected
2024-07-30 05:39 PM
Wall intersections through the API are the same as they are for the user - intersections are done automatically if the wall reference lines intersect. No additional functionality is required
2024-07-31 03:04 PM
@Ralph Wessel Thank you for the response. So for these two walls i made the points exactly same but the intersection did not happen automatically
Expectation was:
The wall beg and end coordinates are as follows:
Wall 1 - (10.56,-9.15), (-0.19, 1.62)
Wall 2 - (0.11,-6.29), (10.56,-9.15)
2024-07-31 04:00 PM
Could you attach a module containing just the unjoined walls?
2024-08-01 07:49 AM
Hey @Ralph Wessel , It was a mistake from my side, the beg and end coordinates had a difference of approximately 0.001. (one of the points was calculated after a conversion) When I cleaned up the code to share with you, I noticed this slight difference.
So the wall endpoints must be the same for Archicad to intersect automatically?
Is there something else that can be done to intersect them forcefully through code like we have the intersect tool in the UI.
2024-08-01 01:10 PM
I'm not sure of the exact tolerance for Archicad to auto-intersect walls, but it's certainly less than 1mm. I expect it will be a length less than the precision shown on screen, i.e. the point where Archicad would display a non-zero value as "0" in the UI.
You may be able to invoke API functions to do the intersection for you, e.g. with ACAPI_Element_Edit, but in the case it's probably easier to just calculate the intersection using the wall reference lines and update the geometry accordingly.