<commit_before>/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkCenteredSliderRepresentation.cxx

  Copyright (c) <NAME>, <NAME>, <NAME>
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

/*-------------------------------------------------------------------------
  Copyright 2008 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/

#include "vtkCenteredSliderRepresentation.h"
#include "vtkCommand.h"
#include "vtkObjectFactory.h"
#include "vtkActor2D.h"
#include "vtkPolyDataMapper2D.h"
#include "vtkPoints.h"
#include "vtkCellArray.h"
#include "vtkProperty2D.h"
#include "vtkRenderer.h"
#include "vtkMath.h"
#include "vtkLine.h"
#include "vtkEvent.h"
#include "vtkInteractorObserver.h"
#include "vtkWindow.h"
#include "vtkPolyData.h"
#include "vtkTextProperty.h"
#include "vtkTextMapper.h"
#include "vtkTextActor.h"
#include "vtkTransform.h"
#include "vtkTransformPolyDataFilter.h"
#include "vtkSmartPointer.h"
#include "vtkUnsignedCharArray.h"
#include "vtkPointData.h"

vtkCxxRevisionMacro(vtkCenteredSliderRepresentation, "1.3");
vtkStandardNewMacro(vtkCenteredSliderRepresentation);

//----------------------------------------------------------------------
vtkCenteredSliderRepresentation::vtkCenteredSliderRepresentation()
{
  // The coordinates defining the slider
  this->Point1Coordinate = vtkCoordinate::New();
  this->Point1Coordinate->SetCoordinateSystemToNormalizedViewport();
  this->Point1Coordinate->SetValue(0.95,0.8,0.0);

  this->Point2Coordinate = vtkCoordinate::New();
  this->Point2Coordinate->SetCoordinateSystemToNormalizedViewport();
  this->Point2Coordinate->SetValue(0.99,0.98,0.0);

  // Default configuration
  this->ButtonSize = 0.08;
  this->TubeSize = 0.85; // includes buttons
  this->ArcCount = 31;
  this->ArcStart = 1.0 - this->TubeSize + this->ButtonSize;
  this->ArcEnd = 1.0 - this->ButtonSize;

  // The points and the transformation for the points. 
  this->XForm = vtkTransform::New();
  this->Points = vtkPoints::New();
  this->Points->SetNumberOfPoints(2*(10+this->ArcCount));

  this->TubeCells = 0;
  this->Tube = 0;
  this->BuildTube();

  this->TubeXForm = vtkTransformPolyDataFilter::New();
  this->TubeXForm->SetInput(this->Tube);
  this->TubeXForm->SetTransform(this->XForm);<commit_msg>BUG: Fixing problem with number of points<commit_after>/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkCenteredSliderRepresentation.cxx

  Copyright (c) <NAME>, <NAME>, <NAME>
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

/*-------------------------------------------------------------------------
  Copyright 2008 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/

#include "vtkCenteredSliderRepresentation.h"
#include "vtkCommand.h"
#include "vtkObjectFactory.h"
#include "vtkActor2D.h"
#include "vtkPolyDataMapper2D.h"
#include "vtkPoints.h"
#include "vtkCellArray.h"
#include "vtkProperty2D.h"
#include "vtkRenderer.h"
#include "vtkMath.h"
#include "vtkLine.h"
#include "vtkEvent.h"
#include "vtkInteractorObserver.h"
#include "vtkWindow.h"
#include "vtkPolyData.h"
#include "vtkTextProperty.h"
#include "vtkTextMapper.h"
#include "vtkTextActor.h"
#include "vtkTransform.h"
#include "vtkTransformPolyDataFilter.h"
#include "vtkSmartPointer.h"
#include "vtkUnsignedCharArray.h"
#include "vtkPointData.h"

vtkCxxRevisionMacro(vtkCenteredSliderRepresentation, "1.4");
vtkStandardNewMacro(vtkCenteredSliderRepresentation);

//----------------------------------------------------------------------
vtkCenteredSliderRepresentation::vtkCenteredSliderRepresentation()
{
  // The coordinates defining the slider
  this->Point1Coordinate = vtkCoordinate::New();
  this->Point1Coordinate->SetCoordinateSystemToNormalizedViewport();
  this->Point1Coordinate->SetValue(0.95,0.8,0.0);

  this->Point2Coordinate = vtkCoordinate::New();
  this->Point2Coordinate->SetCoordinateSystemToNormalizedViewport();
  this->Point2Coordinate->SetValue(0.99,0.98,0.0);

  // Default configuration
  this->ButtonSize = 0.08;
  this->TubeSize = 0.85; // includes buttons
  this->ArcCount = 31;
  this->ArcStart = 1.0 - this->TubeSize + this->ButtonSize;
  this->ArcEnd = 1.0 - this->ButtonSize;

  // The points and the transformation for the points. 
  this->XForm = vtkTransform::New();
  this->Points = vtkPoints::New();
  this->Points->SetNumberOfPoints(2*this->ArcCount + 12);

  this->TubeCells = 0;
  this->Tube = 0;
  this->BuildTube();

  this->TubeXForm = vtkTransformPolyDataFilter::New();
  this->TubeXForm->SetInput(this->Tube);
  this->TubeXForm->SetTransform(this->XForm);
{'fraction_non_alphanumeric': 0.2382373595505618, 'fraction_numerical': 0.019662921348314606, 'mean_word_length': 3.6354759967453214, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2355989', 'n_tokens_mistral': 1748, 'n_tokens_neox': 1672, 'n_words': 350}