Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Coordinate based selection whithin arbitrarily shaped (closed) curve

Please login with a confirmed email address before reporting spam

Hi, I would like to parametrize a 2D geometry build-up using comsol 5.6, where a number of circes is built up automatically with certain symmetries and the circles whithin a given boundary curve are selected (the other ones deleted....). For this, I would like to import a 2D curve (closed curve with arbitrary shape) and - after creating the pattern of circles - would like to select all objects that lie inside the curve and delete the rest (for clarity see the example picture attached).

For simple shapes, such as circles, rectangles etc., the built-in coordinate based selections "box selection" or "circles selection" does just that. However, if the curve is not easily approximated by either a box or a circle, this seems to be troublesome.

Is there a way to does such a selection of "objects inside a certain curve" using the Comsol Desktop? If not, using Matlab LiveLink or the comsol Method Builder would also be an alternative, though not preferred.

Thanks in advance! :-)



2 Replies Last Post Apr 22, 2022, 10:04 a.m. EDT
Acculution ApS Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Apr 21, 2022, 4:44 a.m. EDT

You could consider doing it under Geometry via Boolean operations instead of via selections.

-------------------
René Christensen, PhD
Acculution ApS
www.acculution.com
info@acculution.com
You could consider doing it under Geometry via Boolean operations instead of via selections.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Apr 22, 2022, 10:04 a.m. EDT

Hi René, thank you for your suggestion. If I understand you correctly you are proposing to do the boolean intersection operation on the area encircled by the boundary curve and the ensemble of circles? That kind of works, however there is the issue, that if one of the circles intersects the boundary curve, it gets cut in half. In the coordinate based box-selection this is exactly what is resolved by selecting the option "Include entity if: Entity inside box". Do you have any suggestions how to circumvent this problem?

Hi René, thank you for your suggestion. If I understand you correctly you are proposing to do the boolean intersection operation on the area encircled by the boundary curve and the ensemble of circles? That kind of works, however there is the issue, that if one of the circles intersects the boundary curve, it gets cut in half. In the coordinate based box-selection this is exactly what is resolved by selecting the option "Include entity if: Entity inside box". Do you have any suggestions how to circumvent this problem?

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.