TAGGED: Moderator SpaceClaim, python-scripting, script, spaceclaim
-
-
February 12, 2024 at 1:23 pm
alrifai
SubscriberHello,Â
I am simply trying to select some edges less than a threshold via the PowerSelection command.Â
First, I try by recording a macro that is when I select an edge manually, and then execute the powerSelection tool, which works fine (Line 82 and geometry as shown in the screenshot).
In line 83, I rewrite the same line but instead use a length as a criteria, which can be used as an argument according to API documentation. But then it doesn't work. I tried by entering just 10 instead of "MM(10)" but it still doesn't seem to work.Â
Can anyone shed any light as to what might be going wrong here?
-
February 12, 2024 at 1:42 pm
Atharv Joshi
Forum ModeratorHi Yasser,
Let me check and get back to you.Â
Thanks and Regards
Atharv -
February 12, 2024 at 2:21 pm
-
February 13, 2024 at 1:08 pm
alrifai
SubscriberHello,Â
The PowerSelection tool now seems to be working but not because of the solution that you provided. It even works when you don't define the length as a variable. The problem seemed to be with PowerSelectOptions(False). The command works when I set it to True.
I came across this on another post, in which one of your colleague explains that keeping it False only filters the edges in the current body and NOT all the bodies. But since I only have 1 body, I don't understand how should it matter if I select 1 body(False option) or all the bodies(True option)?
And yes you're right, whenever I faced issue earlier, it threw up an error saying "deleted section".
On other note, 1. I wanted to select some curves from a specific area. I know I can do it perhaps through using FilterByBoundingBox perhaps. But can we define a custom shape? Elliptical or a disc area?
-
February 13, 2024 at 2:31 pm
Atharv Joshi
Forum ModeratorHello Yasser,Â
If you refer to my screenshot, I have used PowerSelectOptions(True) and the solution highlights PowerSelection works with length as criteria and 2 ways you can implement with/without variable.Â
Edge1 in line 82 of your code represents the edge selection and thus it can refer to the all edges within that body and script works even with PowerSelectOptions(False).Â
When we define length we have a empty selection and so basically no body to search for edges. That’s why it makes sense to set PowerSelectOptions(True) and search for all bodies even if you have single body.Â
Thanks and Regards
Atharv -
February 13, 2024 at 2:40 pm
Atharv Joshi
Forum ModeratorYou can use FilterByBoundingBox for the selection. I don't think its possible but will confirm if custom shapes can be used for the BoundingBox and let you know.Â
Thanks and Regards
Atharv -
February 16, 2024 at 8:06 am
alrifai
SubscriberSure Atharv!
Also, thanks for the explanation That makes sense!
-
February 26, 2024 at 9:19 am
alrifai
SubscriberHi Atharv, was just following up with you to see if you got time to check if custom shapes could be used as BoundingBox for filtering edges/faces?
Thanks!
-
February 26, 2024 at 9:52 am
Atharv Joshi
Forum ModeratorHi Yasser, its not possible to use custom shapes for PowerSelect using BoundingBox.Â
-
- The topic ‘SCDM Scripting PowerSelection not working as expected’ is closed to new replies.
- Unable to attach geometry 2024 R2
- Data Center Simulation
- DXF file loaded incorrectly
- plugin error failed to import assembly from spaceclaim
- Inventor 2025 files
- Masonry Brick Simulation
- Ansys SpaceClaim and Discovery 2024 Facet shelling bug – 2022 version is better
- solidwork parameters for optimization in ansys
- Spaceclaim 2024 error FNE activation failed
- Simulating PCB
-
1932
-
839
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.