| PolyhedronStateNetlibScraper {Rpolyhedra} | R Documentation |
PolyhedronStateNetlibScraper
Description
Scrapes polyhedra from a PHD file format.
Super class
Rpolyhedra::PolyhedronState -> PolyhedronStateNetlibScraper
Public fields
netlib.p3.linesThe path to the PHD files
labels.rowsLabels - row of appearance
labels.mapLabels - Map of content
errorsthe errors found
Methods
Public methods
Inherited methods
Method new()
Initializes the object, taking the file.id and PDH file as parameters
Usage
PolyhedronStateNetlibScraper$new(file.id, netlib.p3.lines)
Arguments
file.idthe file id
netlib.p3.linesthe lines to add
Returns
A new PolyhedronStateNetlibScraper object.
Method extractRowsFromLabel()
Extracts data from the label, taking the label number and the expected label as parameters
Usage
PolyhedronStateNetlibScraper$extractRowsFromLabel(label.number, expected.label)
Arguments
label.numberthe label number
expected.labelthe expected label
Method getLabels()
get Labels from current netlib file description
Usage
PolyhedronStateNetlibScraper$getLabels()
Returns
a list containing labels from netlib file description
Method scrapeNet()
scrape Net Model from netlib format
Usage
PolyhedronStateNetlibScraper$scrapeNet(net.txt, offset = 0)
Arguments
net.txta vector containing net model in netlib format
offsetin numbering vertices
Returns
a list containing a net model
Method extractCFOutBrackets()
Remove brackets for current field content
Usage
PolyhedronStateNetlibScraper$extractCFOutBrackets(x)
Arguments
xa string containing brackets
Returns
value
Method scrapeVertices()
scrape vertices described in netlib format
Usage
PolyhedronStateNetlibScraper$scrapeVertices(vertices.txt)
Arguments
vertices.txtvector containing netlib format vertices
Returns
data.frame containing netlib vertices
Method setupLabelsOrder()
setupLabelsOrder
Usage
PolyhedronStateNetlibScraper$setupLabelsOrder()
Arguments
vertices.txtvector containing netlib format vertices
Returns
data.frame containing netlib vertices
Method getDataFromLabel()
Get data from label specified as parameter
Usage
PolyhedronStateNetlibScraper$getDataFromLabel(label)
Arguments
labelthe label to get data from
Returns
value
Method getName()
get Polyhedron name
Usage
PolyhedronStateNetlibScraper$getName()
Returns
string with polyhedron name
Method scrape()
scrape Netlib polyhedron definition
Usage
PolyhedronStateNetlibScraper$scrape()
Returns
A new PolyhedronStateDefined object.
Method applyTransformationMatrix()
Apply transformation matrix to polyhedron
Usage
PolyhedronStateNetlibScraper$applyTransformationMatrix(transformation.matrix)
Arguments
transformation.matrixthe transformation matrix to apply to the polyhedron
Method buildRGL()
Creates a 'rgl' representation of the object
Usage
PolyhedronStateNetlibScraper$buildRGL(transformation.matrix)
Arguments
transformation.matrixthe transformation matrix to apply to the polyhedron
Method exportToXML()
serializes object in XML
Usage
PolyhedronStateNetlibScraper$exportToXML()
Method clone()
The objects of this class are cloneable with this method.
Usage
PolyhedronStateNetlibScraper$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
ken4rab