Skip to main content
Post Merged (destination) from mathematica.stackexchange.com/questions/563/…
added 148 characters in body
Source Link
Arnoud Buzing
  • 9.9k
  • 2
  • 50
  • 58

There is a public, but undocumented, function called GeometricFunctions`DecodeFilledCurve which helps to decode this type of undocumented FilledCurve:

GeometricFunctions`DecodeFilledCurve[ FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{12.887695983062486, 5.160000000000004}, {1.8237311169604027, 5.160000000000004}, {5.496094644083314, 22.410000000000004}, {7.823731116960403, 22.410000000000004}, {4.5834973678187225, 7.222500000000004}, {13.319824330510414, 7.222500000000004}}}]] 

which gives a documented form of FilledCurve:

FilledCurve[{{Line[{{12.8877, 5.16}, {1.82373, 5.16}}], Line[{{5.49609, 22.41}}], Line[{{7.82373, 22.41}}], Line[{{4.5835, 7.2225}}], Line[{{13.3198, 7.2225}}]}}] 

The encoding/decoding scheme is and pretty obscure and may change in the future, which probably explains why this internal detail of the code is not documented. I would definitely not write code that depends on the undocumented syntax, and one could argue that Import(String) returning this syntax is a bug.

There is a public, but undocumented, function called GeometricFunctions`DecodeFilledCurve which helps to decode this type of undocumented FilledCurve:

GeometricFunctions`DecodeFilledCurve[ FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{12.887695983062486, 5.160000000000004}, {1.8237311169604027, 5.160000000000004}, {5.496094644083314, 22.410000000000004}, {7.823731116960403, 22.410000000000004}, {4.5834973678187225, 7.222500000000004}, {13.319824330510414, 7.222500000000004}}}]] 

which gives a documented form of FilledCurve:

FilledCurve[{{Line[{{12.8877, 5.16}, {1.82373, 5.16}}], Line[{{5.49609, 22.41}}], Line[{{7.82373, 22.41}}], Line[{{4.5835, 7.2225}}], Line[{{13.3198, 7.2225}}]}}] 

The encoding/decoding scheme is and pretty obscure and may change in the future, which probably explains why this internal detail of the code is not documented.

There is a public, but undocumented, function called GeometricFunctions`DecodeFilledCurve which helps to decode this type of undocumented FilledCurve:

GeometricFunctions`DecodeFilledCurve[ FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{12.887695983062486, 5.160000000000004}, {1.8237311169604027, 5.160000000000004}, {5.496094644083314, 22.410000000000004}, {7.823731116960403, 22.410000000000004}, {4.5834973678187225, 7.222500000000004}, {13.319824330510414, 7.222500000000004}}}]] 

which gives a documented form of FilledCurve:

FilledCurve[{{Line[{{12.8877, 5.16}, {1.82373, 5.16}}], Line[{{5.49609, 22.41}}], Line[{{7.82373, 22.41}}], Line[{{4.5835, 7.2225}}], Line[{{13.3198, 7.2225}}]}}] 

The encoding/decoding scheme is and pretty obscure and may change in the future, which probably explains why this internal detail of the code is not documented. I would definitely not write code that depends on the undocumented syntax, and one could argue that Import(String) returning this syntax is a bug.

Source Link
Arnoud Buzing
  • 9.9k
  • 2
  • 50
  • 58

There is a public, but undocumented, function called GeometricFunctions`DecodeFilledCurve which helps to decode this type of undocumented FilledCurve:

GeometricFunctions`DecodeFilledCurve[ FilledCurve[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{12.887695983062486, 5.160000000000004}, {1.8237311169604027, 5.160000000000004}, {5.496094644083314, 22.410000000000004}, {7.823731116960403, 22.410000000000004}, {4.5834973678187225, 7.222500000000004}, {13.319824330510414, 7.222500000000004}}}]] 

which gives a documented form of FilledCurve:

FilledCurve[{{Line[{{12.8877, 5.16}, {1.82373, 5.16}}], Line[{{5.49609, 22.41}}], Line[{{7.82373, 22.41}}], Line[{{4.5835, 7.2225}}], Line[{{13.3198, 7.2225}}]}}] 

The encoding/decoding scheme is and pretty obscure and may change in the future, which probably explains why this internal detail of the code is not documented.