cancel
Showing results for
Search instead for
Did you mean:
cancel
Showing results for
Search instead for
Did you mean:
BIM Coordinator Program (INT) April 22, 2024

# Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.

# Find X and Y of where line intersects with chamfer / fillet

Advocate

I have a box where any of the corners can be filleted or chamfer... or just a plain right angle.

My goal is for the diagonal lines to come to a stop when they reach the chamfer or fillet and not extend past to the corner. Hopefully the images attached demonstrate this.

Is there anything similar to a cutpoly for 2D? I haven't been able to find a formula to figure out how to calculate the x and y of the points.

Any help would be very much appreciated,

Thanks

ArchiCAD 23

Windows 10
2 REPLIES 2
Guru

You know the coordinates of the two ends of your diagonal line.

From those two ends, you can work out the equation for the line that runs between the two.

You know where your chamfer corners are.

From your chamfer corners, you can work out the equation for the line that runs between the two.

You now have two equations. Well, four if you are working your x and y separately... Anyway, now with your two equations, you can use an IF statement for when they equal each other. When they do, x (diagonal) = x (chamfer) and y (diagonal) = y (chamfer)

The fillet will be a similar process using x^2 + y^2 = r together with your circles centre offset. You will get two intersection points with this though so you will need to eliminate them depending on which corner you are solving for.

Ling.

 AC22-23 AUS 7000 Help Those Help You - Add a Signature Self-taught, bend it till it breaks Creating a Thread Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Graphisoft

There is no language support for this, but we have

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Learn and get certified!