def banded_tube(xyz_path, point_colors, segment_colors, radius, segment_subdivisions, circle_subdivisions, band_length, limit_tangent=None, surface_model=None, model_id=None): if len(xyz_path) <= 1: return None # No tube import spline ptlist = spline.overhauser_spline_points(xyz_path, segment_subdivisions, limit_tangent, return_tangents=True) plist = [pt[0] for pt in ptlist] pcolors = band_colors(plist, point_colors, segment_colors, segment_subdivisions, band_length) p = tube_surface_piece(ptlist, pcolors, radius, circle_subdivisions, surface_model, model_id) return p
def vrml_overhauser_spline(points, rgb, radius, segment_subdivisions): import spline plist = spline.overhauser_spline_points(points, segment_subdivisions) if len(plist) <= 1: return '' colors = [rgb] * len(plist) if radius == 0: return vrml_lines(plist, colors) return vrml_tube(plist, colors, colors[:-1], radius)
def vrml_banded_tube(points, point_colors, segment_colors, radius, segment_subdivisions, band_length): import spline plist = spline.overhauser_spline_points(points, segment_subdivisions) if len(plist) <= 1: return '' pcolors, scolors = band_colors(plist, point_colors, segment_colors, segment_subdivisions, band_length) if radius == 0: return vrml_lines(plist, pcolors) return vrml_tube(plist, pcolors, scolors, radius)
def banded_tube(xyz_path, point_colors, segment_colors, radius, segment_subdivisions, circle_subdivisions, band_length, limit_tangent = None, surface_model = None, model_id = None): if len(xyz_path) <= 1: return None # No tube import spline ptlist = spline.overhauser_spline_points(xyz_path, segment_subdivisions, limit_tangent, return_tangents = True) plist = [pt[0] for pt in ptlist] pcolors = band_colors(plist, point_colors, segment_colors, segment_subdivisions, band_length) p = tube_surface_piece(ptlist, pcolors, radius, circle_subdivisions, surface_model, model_id) return p