Polyhedron State Netlib Scraper
Polyhedron State Netlib Scraper
Scrapes polyhedra from a PHD file format.
Rpolyhedra::PolyhedronState
-> PolyhedronStateNetlibScraper
netlib.p3.lines
The path to the PHD files
labels.rows
Labels - row of appearance
labels.map
Labels - Map of content
errors
the errors found
new()
Initializes the object, taking the file.id and PDH file as parameters
PolyhedronStateNetlibScraper.class$new(file.id, netlib.p3.lines)
file.id
the file id
netlib.p3.lines
the lines to add
A new PolyhedronStateNetlibScraper object.
extractRowsFromLabel()
Extracts data from the label, taking the label number and the expected label as parameters
PolyhedronStateNetlibScraper.class$extractRowsFromLabel( label.number, expected.label )
label.number
the label number
expected.label
the expected label
getLabels()
get Labels from current netlib file description
PolyhedronStateNetlibScraper.class$getLabels()
a list containing labels from netlib file description
scrapeNet()
scrape Net Model from netlib format
PolyhedronStateNetlibScraper.class$scrapeNet(net.txt, offset = 0)
net.txt
a vector containing net model in netlib format
offset
in numbering vertices
a list containing a net model
extractCFOutBrackets()
Remove brackets for current field content
PolyhedronStateNetlibScraper.class$extractCFOutBrackets(x)
x
a string containing brackets
value
scrapeVertices()
scrape vertices described in netlib format
PolyhedronStateNetlibScraper.class$scrapeVertices(vertices.txt)
vertices.txt
vector containing netlib format vertices
data.frame containing netlib vertices
setupLabelsOrder()
setupLabelsOrder
PolyhedronStateNetlibScraper.class$setupLabelsOrder()
vertices.txt
vector containing netlib format vertices
data.frame containing netlib vertices
getDataFromLabel()
Get data from label specified as parameter
PolyhedronStateNetlibScraper.class$getDataFromLabel(label)
label
the label to get data from
value
getName()
get Polyhedron name
PolyhedronStateNetlibScraper.class$getName()
string with polyhedron name
scrape()
scrape Netlib polyhedron definition
PolyhedronStateNetlibScraper.class$scrape()
A new PolyhedronStateDefined object.
applyTransformationMatrix()
Apply transformation matrix to polyhedron
PolyhedronStateNetlibScraper.class$applyTransformationMatrix( transformation.matrix )
transformation.matrix
the transformation matrix to apply to the polyhedron
buildRGL()
Creates a 'rgl' representation of the object
PolyhedronStateNetlibScraper.class$buildRGL(transformation.matrix)
transformation.matrix
the transformation matrix to apply to the polyhedron
exportToXML()
serializes object in XML
PolyhedronStateNetlibScraper.class$exportToXML()
clone()
The objects of this class are cloneable with this method.
PolyhedronStateNetlibScraper.class$clone(deep = FALSE)
deep
Whether to make a deep clone.