Ruby method to calculate the area of an intersection?
-
Hi everyone,
Please take a look at the attached image. Here is the situation:
I have only a rectangular.
Using SketchUp, I can easily draw a circle, select the intersection of my circle & rectangular --> view Entity info --> I can see the area of the intersection.However, I want to write a ruby script to automatically draw the circle, then get the intersection area.
I can automatically draw the circle, no problem. However, I don't know how to automatically get the intersection area. May I know if there is any function in Ruby API can do that?
There is a face.area() to get the area of the face, however, I don't know how to define the face = intersection. Is there any way to do that?Thank you.
-
In other words, my question is:
How to create a new face/ entity (or whatever) that hold intersection of A and B so that I can then use the area() method to get the area of that intersection. -
Advertisement