Dear all,
I wanted to know if there is any way to check if there is an connection occurs with two cellElements. as shown in the figure,Only Point A coincides with Point B is considered as a connection .What would be the best way to achieve this?
Thanks in advance.
As far as I understood, DongLee wants to determine if cells have a common point - perhaps origin of the cell.Then simple comparison of origins should be enough, or comparision of points A and B in some tolerance. But only if I understood: "Only Point A coincides with Point B is considered as a connection ." correctly :)
In addition to Jan's suggestion, you could include a point (i.e. a zero-length line) in the cell coincident with the connection point A or B. Put the point on a named level (e.g. connection points) to make it easy to find.
Regards, Jon Summers LA Solutions
Hi,
if the cells are so simple as on your picture and they consist from a few elements only, I think a simple algorithm "test all points from cell 1 against points from cell2" would be enough.
You have not written what language you want to use, but the concept is the same: Make collections (array, vector etc.) of all endpoints from cell 1and from cell 2 and test 1st point from 1 to all points from 2, followed by 2nd point from one etc. You can use mdlVec_pointEqualTol or similar to test for the coincidence.
The algorithm is not very efficient, but works fine for a few points. Its disadvantage is it tests general points, not "ending points" as A and B at your picutre are.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point