{"id":48801712,"url":"https://github.com/visualdoj/fpc-libtess2","last_synced_at":"2026-04-14T03:04:04.343Z","repository":{"id":118362770,"uuid":"223546323","full_name":"visualdoj/fpc-libtess2","owner":"visualdoj","description":"Port of libtess2 to Free Pascal","archived":false,"fork":false,"pushed_at":"2026-04-09T01:03:11.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-09T02:31:44.466Z","etag":null,"topics":["fpc","freepascal","libtess2","pascal","tessellation","triangulation"],"latest_commit_sha":null,"homepage":null,"language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/visualdoj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-23T07:02:36.000Z","updated_at":"2026-04-09T01:03:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9d89528-8e75-454b-8876-87cb3fd4d2ee","html_url":"https://github.com/visualdoj/fpc-libtess2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/visualdoj/fpc-libtess2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Ffpc-libtess2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Ffpc-libtess2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Ffpc-libtess2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Ffpc-libtess2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visualdoj","download_url":"https://codeload.github.com/visualdoj/fpc-libtess2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Ffpc-libtess2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31779961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fpc","freepascal","libtess2","pascal","tessellation","triangulation"],"created_at":"2026-04-14T03:04:01.537Z","updated_at":"2026-04-14T03:04:04.328Z","avatar_url":"https://github.com/visualdoj.png","language":"Pascal","readme":"# libtess2 for Pascal\n\nThis is a port of [libtess2](https://github.com/memononen/libtess2) library to\nFree Pascal. The purpose of the library is to reduce the complexity of using\nlibtess2 in Free Pascal applications. No need to link with external library,\nno need to use C compiler.\n\nI've tried to keep the interface and behaviour as similar as possible, so\nusing the library in pascal code is pretty similar to using it in C code:\n\n```pascal\nuses\n  libtess2_tesselator; // tesselator.h\n\n\nconst\n  CONTOUR1: array[0 .. 5] of TESSreal = (\n    185.28, 455.91,\n    143.93, 270.04,\n    608.54, 489.26\n  );\n  CONTOUR2: array[0 .. 5] of TESSreal = (\n    167.59, 256.50,\n    217.29, 556.70,\n    363.79, 668.17\n  );\n\n\n\nvar\n  tess: PTESStesselator;\n\n  I, Count: LongInt;\n  Indices: PTESSindex;\n  Vertices: PTESSreal;\n\n\n\nbegin\n  tess := tessNewTess(nil);\n  if tess = nil then begin\n    Writeln(stderr, 'Out of memory');\n    Halt(1);\n  end;\n\n  tessAddContour(tess, 2, @CONTOUR1[0], 2 * SizeOf(TESSreal), 3);\n  tessAddContour(tess, 2, @CONTOUR2[0], 2 * SizeOf(TESSreal), 3);\n\n  if not tessTesselate(tess, TESS_WINDING_ODD, TESS_POLYGONS, 3, 2, nil) then begin\n    Writeln(stderr, 'Tesselation failed');\n    Halt(1);\n  end;\n\n  Count    := tessGetElementCount(tess);\n  Indices  := tessGetElements(tess);\n  Vertices := tessGetVertices(tess);\n  Writeln('Triangulation (', Count, ' triangles):');\n  for I := 0 to Count - 1 do begin\n    Writeln( I:2, Vertices[2 * Indices[3 * I + 0]], ' ', Vertices[2 * Indices[3 * I + 0] + 1]);\n    Writeln('  ', Vertices[2 * Indices[3 * I + 1]], ' ', Vertices[2 * Indices[3 * I + 2] + 1]);\n    Writeln('  ', Vertices[2 * Indices[3 * I + 2]], ' ', Vertices[2 * Indices[3 * I + 2] + 1]);\n  end;\n\n  tessDeleteTess(tess);\nend.\n```\n\nI've tried to keep the implementation as similar as possible as well to\nsimplify side-by-side comparison and debugging, although it was necessary to\nchange the names of some types to avoid ambiguities, and their placement to\navoid circular unit dependencies.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualdoj%2Ffpc-libtess2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisualdoj%2Ffpc-libtess2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualdoj%2Ffpc-libtess2/lists"}