ansys/pymotorcad

Add corner rounding functions to Region() class

jgsdavies opened this issue ยท 3 comments

๐Ÿ“ Description of the feature

Create Region class methods to apply corner rounding.

image

Ideally workflow would look something like this:

region = mc.get_region("stator")

# Apply corner rounding to a specific point
# Raise exception if not possible
region.round_corner(int(region_point), float(radius))

# Apply corner rounding to whole region
# Raise exception if not possible
region.round_region(float(radius))

# Function to get max radius of a point
region.get_max_corner_radius(int(region_point))

๐Ÿ’ก Steps for implementing the feature

Probably best to create the actual functionality in the EntityList class and then link to the new EntityList methods in Region

Start with 2 lines for now. Is it possible/sensible to do line-arc or arc-arc corners?

๐Ÿ”— Useful links and references

No response

@james-packer Can you add any use cases that you would have for this.

I'm in the process of looking at this, initially for a single example, but I will try and generalise my code into a function for this. My example includes adding a fillet for a line to arc intersection, which is quite a complex case.

I will be quite interested if this function gets implemented.
thanks for your effort.