Created by Tokarev Sergey, Davide Carpi (Wrapper); The University of Manchester, United Kingdom (GPC) in the scope of SMath project. Published by smath.
This is Open Source project. Sources shared under MIT Licence and available in public SVN repository.

This website uses cookies to enhance your browsing experience and provide personalized recommendations. By continuing to use our website, you agree to our Privacy Policy.

Accept

Features of GPC Wrapper

Version 1.0.9161.7296

Functions

Additional components that add new mathematical functions to the SMath Studio program, necessary for solving problems from various fields.

  1. GPC.AddContour("1:matrix", "2:matrix")
    Add a two-column polygon "2:matrix" of vertices x and y as a contour to GPC polygon "1:matrix"; first vertex may be repeated.
  2. GPC.AddHole("1:matrix", "2:matrix")
    Add a two-column polygon "2:matrix" of vertices x and y as a hole contour to GPC polygon "1:matrix"; first vertex may be repeated.
  3. GPC.CountContours("matrix")
    Returns the number of contours of the GPC polygon "1:matrix".
  4. GPC.CountHoles("matrix")
    Returns the number of hole contours of the GPC polygon "1:matrix".
  5. GPC.CountVertices("matrix")
    Returns the number of vertices of the GPC polygon "1:matrix".
  6. GPC.Difference("1:matrix", "2:matrix")
    Returns the difference between GPC polygons "1:matrix" and "2:matrix".
  7. GPC.GetContour("1:matrix", "2:number")
    Returns a plottable contour "2:number" from a GPC polygon "1:matrix".
  8. GPC.GetContours("matrix")
    Returns plottable contours from a GPC polygon "1:matrix".
  9. GPC.GetTriStrips("matrix")
    Returns plottable triangle strips from a GPC polygon "1:matrix".
  10. GPC.Intersection("1:matrix", "2:matrix")
    Returns the intersection between GPC polygons "1:matrix" and "2:matrix".
  11. GPC.Polygon("matrix")
    Creates a GPC polygon from a two-column "1:matrix" of vertices x and y; first vertex may be repeated.
  12. GPC.Read;NoFlags("string")
    Import a GPC polygon from the file "1:string"; contours must not have hole flags.
  13. GPC.Read;NoFlags("1:string", "2:unit")
    Import a GPC polygon from the file "1:string" assigning length unit "2:unit"; contours must not have hole flags.
  14. GPC.Read("string")
    Import a GPC polygon from the file "1:string"; contours must have hole flags.
  15. GPC.Read("1:string", "2:unit")
    Import a GPC polygon from the file "1:string" assigning the length unit "2:unit"; contours must have hole flags.
  16. GPC.Union("1:matrix", "2:matrix")
    Returns the union between GPC polygons "1:matrix" and "2:matrix".
  17. GPC.Write;NoFlags("1:matrix", "2:string")
    Export the GPC polygon "1:matrix" to the file "2:string"; contours will not have hole flags.
  18. GPC.Write("1:matrix", "2:string")
    Export the GPC polygon "1:matrix" to the file "2:string"; contours will have hole flags.
  19. GPC.XOR("1:matrix", "2:matrix")
    Returns the exclusive OR between GPC polygons "1:matrix" and "2:matrix".
  20. gpc_add_contour("1:matrix", "2:matrix", "3:number")
    (P, V, H) Add contour V to GPC polygon P. V is a x,y matrix of vertices, first may be repeated; H=1: contour cuts hole, H=0 otherwise.
  21. gpc_clip("1:number", "2:matrix", "3:matrix")
    (Op, P1, P2) GPC polygon operation on GPC polygons P1 and P2; Op: (0 - Differece, 1 - Intersection, 2 - XOr, 3 - Union).
  22. gpc_get_contour("1:matrix", "2:number", "3:number")
    (P, N, F) Return N-th contour from GPC polygon P as x,y matrix. F=1: repeat first vertex (for plotting), F=0 otherwise.
  23. gpc_polygon("matrix")
    (V) Creates a GPC polygon from x,y matrix of vertices V, first may be repeated.
  24. gpc_polygon_to_tristrip("matrix")
    (P) Converts the Polygon to a Tristrip.
  25. gpc_read_polygon("1:string", "2:number")
    (F, H) Read polygon from file with name F and hole flag H (0 - contours without hole flag, 1 - otherwise).
  26. gpc_tristrip_clip("1:number", "2:matrix", "3:matrix")
    (O, P1, P2) Performs the chosen operation to the two polygons and returns the result as a tristrip, O = (0 - Differece, 1 - Intersection, 2 - XOr, 3 - Union)
  27. gpc_write_polygon("1:matrix", "2:string", "3:number")
    (P, F, H) Write polygon P to file with name F and hole flag H (0 - contours without hole flag, 1 - otherwise).