Circle(radius, center=None, normal=None, frame=None)
The Circle class provides an interface for creating a circle segmentation.
A circle segmentation is defined by a radius, a 3D point defining its
center and a normal. The normal defines its orientation (i.e. the plane the
circle lies in).
A Circle object is created using a radius, center and normal or a PathFrame
object.
A PathFrame object contains a path's interpolating spline (curve points)
position, tangent, and normal data at a given location. The position is
used for the circle center, the tangent for its normal.
Args:
radius (float): The circle radius.
center (list([float,float,float]): The circle center.
normal(list([float,float,float]): The circle normal direction.
frame (Optional[PathFrame]): A PathFrame object defing the circle's
center and coordinate frame.
get_center()
Get the circle segmentation center.
Returns (list([float,float,float])): The circle center.
get_id()
Get the contour ID.
Returns int: The contour ID.
get_normal()
Get the circle segmentation normal.
Returns (list([float,float,float]): The circle normal.
get_path_point()
Get the contour path point.
Returns dict(pos:[x,y,z], tangent:[x,y,z], rotation:[x,y,z]): The contour path point.
get_points()
Get the segmentation contour points.
Returns list([x,y,z]): The list of contour points.
get_vtk_polydata()
Get the contour type.
Returns (str): contour type.
get_radius(r)
Get the radius for a circle segmentation.
Returns (float): The radius of the circle.
get_type()
Get the contour type.
Returns (str): contour type.
set_center(center)
Set the circle segmentation center.
Args:
center (list([float,float,float]): The circle center.
set_frame(frame)
Set the circle segmentation coordinate frame using a PathFrame object.
Args:
frame (PathFrame): The PathFrame object defing the circle's center and coordinate frame.
set_normal(normal)
Set the circle segmentation normal.
Args:
normal (list([float,float,float]): The circle normal.
set_radius(radius)
Set the radius for a circle segmentation.
Args:
radius (float): The radius of the circle.