TreeRegion#
- class ansys.motorcad.core.geometry_tree.TreeRegion(tree, region_type, motorcad_instance=None)#
Subclass of Region used for entries in GeometryTree.
Nodes should not have a parent or children unless they are part of a tree.
Methods
TreeRegion.add_entity(entity)Add entity to list of region entities.
TreeRegion.add_point(point)Add a new point into region on an existing Line/Arc.
TreeRegion.collides(regions)Check whether any of the specified regions collide with self.
TreeRegion.edit_point(old_coordinates, ...)Edit a point in the region and update entities.
TreeRegion.extend_entity(entity_index[, ...])Extend an Entity of a Region by a given distance.
Search through region to find an entity with start and end coordinates.
Work in progress.
TreeRegion.from_json(geometry_tree, ...)Create a RegionTree from JSON data, must link parent once whole tree is available.
TreeRegion.insert_entity(index, entity)Insert entity to list of region entities at given index.
TreeRegion.insert_polyline(index, polyline)Insert polyline at given index, polyline can be made up of line/arc entities.
Check whether Region's entities are closed.
TreeRegion.limit_arc_chord(max_chord_height)Limit the chord height for arcs in a region.
TreeRegion.mirror(mirror_line[, unique_name])Mirror region along entity.
TreeRegion.remove_entity(entity_remove)Remove the entity from the region.
TreeRegion.replace(replacement_region)Replace self with another region.
TreeRegion.rotate(centre_point, angle)Rotate Region around a point for a given angle.
TreeRegion.round_corner(corner_coordinate, ...)Round the corner of a region.
TreeRegion.round_corners(corner_coordinates, ...)Round multiple corners of a region.
TreeRegion.subtract(region)Subtract region from self, returning any additional regions.
TreeRegion.translate(x, y)Translate Region by specified x,y distances.
TreeRegion.unite(regions)Unite one or more other regions with self.
TreeRegion.update(region)Update class fields from another region.
Attributes
Get the region area.
Get the region centroid.
Get list of keys corresponding to child nodes.
Get list of names corresponding to child nodes.
Get or set parent region.
Get or set region colour.
Get linked Motor-CAD instance.
Get or set number of region duplications for the full machine.
Get or set the list of entities in the region.
Get extrusion blocks list.
Get key of Region in dict.
Get or set lamination type of region from Motor-CAD.
Level of region in tree.
Get linked duplication/unite region.
Get linked region names for duplication/unite operations.
Get linked region objects for duplication/unite operations.
Get or set region material name.
Get or set the mesh length to use, or 0 for default.
Get or set the linked Motor-CAD instance.
Name of Region.
Get or set parent region.
Get key corresponding to parent region.
Get name corresponding to parent region.
Get points that exist in region.
Get the reference coordinate within the region.
Get region type.
Get or set if region is singular.