Skip to content

Commit

Permalink
Updated docs, test, old types
Browse files Browse the repository at this point in the history
  • Loading branch information
furio committed Aug 5, 2018
1 parent 609652e commit 9ea7093
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 121 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The TRIANGLE.jl package is licensed under the MIT "Expat" License: The TRIANGLE.jl package is licensed under the MIT "Expat" License:


> Copyright (c) 2017: > Copyright (c) 2017-2018:
> * Francesco Furiani > * Francesco Furiani
> >
> Permission is hereby granted, free of charge, to any person obtaining a copy > Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
78 changes: 2 additions & 76 deletions README.md
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.org/cvdlab/TRIANGLE.jl.svg?branch=master)](https://travis-ci.org/cvdlab/TRIANGLE.jl) [![Build Status](https://travis-ci.org/cvdlab/TRIANGLE.jl.svg?branch=master)](https://travis-ci.org/cvdlab/TRIANGLE.jl)
[![Coverage Status](https://coveralls.io/repos/github/cvdlab/TRIANGLE.jl/badge.svg)](https://coveralls.io/github/cvdlab/TRIANGLE.jl) [![Coverage Status](https://coveralls.io/repos/github/cvdlab/TRIANGLE.jl/badge.svg)](https://coveralls.io/github/cvdlab/TRIANGLE.jl)
[![DOI](https://zenodo.org/badge/doi/10.1007/BFb0014497.svg)](http://dx.doi.org/10.1007/BFb0014497) [![DOI](https://zenodo.org/badge/doi/10.1007/BFb0014497.svg)](http://dx.doi.org/10.1007/BFb0014497)
[![Read the Docs](https://img.shields.io/readthedocs/pip.svg)](https://cvdlab.github.io/TRIANGLE.jl/)


A Julia interface to Jonathan Richard Shewchuk [Triangle](https://www.cs.cmu.edu/~quake/triangle.html). A Julia interface to Jonathan Richard Shewchuk [Triangle](https://www.cs.cmu.edu/~quake/triangle.html).


Expand Down Expand Up @@ -31,79 +32,4 @@ The build proces uses [VC++ for Python](https://www.microsoft.com/en-us/download


Include the module (`using TRIANGLE`). Include the module (`using TRIANGLE`).


You can use Julia `?TRIANGLE.methodname` for inline documentation, here a short summary: You can use Julia `?TRIANGLE.methodname` for inline documentation. Documentation can be read on https://cvdlab.github.io/TRIANGLE.jl/ .


`TRIANGLE.basic_triangulation_vertices(vertices::Array{Float64,2})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_

Returns:
* __Array{Array{Float64,2},1}__ an array of array of 3-vertices lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.basic_triangulation(vertices::Array{Float64,2}, vertices_map::Array{Int64,1})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices

Returns:
* __Array{Array{Int64,1},1}__ an array of array of 3-vertices marker lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.basic_triangulation_vertices(vertices::Array{Float64,2}, vertices_map::Array{Int64,1})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices

Returns:
* __Array{Array{Float64,2},1}__ an array of array of 3-vertices lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation

Returns:
* __Array{Array{Int64,1},1}__ an array of array of 3-vertices marker lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation_vertices(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation

Returns:
* __Array{Array{Float64,2},1}__ an array of array of 3-vertices lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2}, edges_boundary::Array{Bool,1})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation
* *edges_boundary* a list of booleans that tells TRIANGLE if the edge is on the boundary or not (the indexing is the same of *edges_list*)

Returns:
* __Array{Array{Int64,1},1}__ an array of array of 3-vertices marker lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation_vertices(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2}, edges_boundary::Array{Bool,1})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation
* *edges_boundary* a list of booleans that tells TRIANGLE if the edge is on the boundary or not (the indexing is the same of *edges_list*)

Returns:
* __Array{Array{Float64,2},1}__ an array of array of 3-vertices lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2}, edges_boundary::Array{Bool,1}, holes::Array{Float64,2})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation
* *edges_boundary* a list of booleans that tells TRIANGLE if the edge is on the boundary or not (the indexing is the same of *edges_list*)
* *holes* containing the list of your holes in the form of _[x1 y1; x2 y2; ... ; xn yn]_ they will be used as marker to remove pieces of the mesh

Returns:
* __Array{Array{Int64,1},1}__ an array of array of 3-vertices marker lists (a triangle). Each triangle is properly order in the whole mesh.

`TRIANGLE.constrained_triangulation_vertices(vertices::Array{Float64,2}, vertices_map::Array{Int64,1}, edges_list::Array{Int64,2}, edges_boundary::Array{Bool,1}, holes::Array{Float64,2})`
* *vertices* containing the list of your vertices in the form of _[x1 y1; x2 y2; ... ; xn yn]_
* *vertices_map* a list of custom integer identifier for the vertices
* *edges_list* a list of edges in the form of _[ vertex-identifier-1 vertex-identifier-2; vertex-identifier-1 vertex-identifier-3; ... ; vertex-identifier-N vertex-identifier-M ]_ that will be retaied during the constrained Delaunay triangulation
* *edges_boundary* a list of booleans that tells TRIANGLE if the edge is on the boundary or not (the indexing is the same of *edges_list*)
* *holes* containing the list of your holes in the form of _[x1 y1; x2 y2; ... ; xn yn]_ they will be used as marker to remove pieces of the mesh

Returns:
* __Array{Array{Float64,2},1}__ an array of array of 3-vertices lists (a triangle). Each triangle is properly order in the whole mesh.
4 changes: 2 additions & 2 deletions REQUIRE
@@ -1,2 +1,2 @@
julia 0.5 julia 0.6
BinDeps 0.4.7 BinDeps 0.6.0
5 changes: 3 additions & 2 deletions docs/src/index.md
@@ -1,7 +1,8 @@
# TRIANGLE.jl Documentation # TRIANGLE.jl Documentation


```@contents A Julia interface to Jonathan Richard Shewchuk [Triangle](https://www.cs.cmu.edu/~quake/triangle.html).
```
The library builds the C version and then expose methods to calculate CDTs.


## Functions ## Functions


Expand Down
2 changes: 1 addition & 1 deletion src/NativeInterface/native_remapper.jl
@@ -1,4 +1,4 @@
type TriangulateInputMapper mutable struct TriangulateInputMapper
originalVerticesMarkers::Vector{Cint} originalVerticesMarkers::Vector{Cint}
remappedVerticesMarkers::Vector{Cint} remappedVerticesMarkers::Vector{Cint}
originalEdgesList::Vector{Cint} originalEdgesList::Vector{Cint}
Expand Down
2 changes: 1 addition & 1 deletion src/NativeInterface/options_structure.jl
Expand Up @@ -43,7 +43,7 @@
/* eliminates Triangle's -r, -q, -a, -u, -D, -Y, -S, and -s switches. */ /* eliminates Triangle's -r, -q, -a, -u, -D, -Y, -S, and -s switches. */
=# =#


type TriangulateOptions mutable struct TriangulateOptions
pslg::Bool #p pslg::Bool #p
regionattrib::Bool # A regionattrib::Bool # A
convex::Bool # c convex::Bool # c
Expand Down
2 changes: 1 addition & 1 deletion src/NativeInterface/triangle_structure.jl
@@ -1,6 +1,6 @@
# REAL = double = Cdouble # REAL = double = Cdouble


type TriangulateIO mutable struct TriangulateIO
pointlist::Ptr{Cdouble} pointlist::Ptr{Cdouble}
pointattributelist::Ptr{Cdouble} pointattributelist::Ptr{Cdouble}
pointmarkerlist::Ptr{Cint} pointmarkerlist::Ptr{Cint}
Expand Down

0 comments on commit 9ea7093

Please sign in to comment.