| 1 |
-- File: tkz_elements_main.lua |
| 2 |
-- Copyright (c) 2026 Alain Matthes |
| 3 |
-- SPDX-License-Identifier: LPPL-1.3c |
| 4 |
-- Maintainer: Alain Matthes |
| 5 |
|
| 6 |
tkz_reserved_names = {} -- liste des noms à ne pas utiliser |
| 7 |
|
| 8 |
local modules = { |
| 9 |
"angle", |
| 10 |
"circle", |
| 11 |
"conic", |
| 12 |
"line", |
| 13 |
"matrix", |
| 14 |
"occs", |
| 15 |
"parallelogram", |
| 16 |
"path", |
| 17 |
"point", |
| 18 |
"list_point", |
| 19 |
"quadrilateral", |
| 20 |
"rectangle", |
| 21 |
"regular_polygon", |
| 22 |
"square", |
| 23 |
"tkz", |
| 24 |
"triangle", |
| 25 |
"utils", |
| 26 |
"vector", |
| 27 |
"function", |
| 28 |
"param_function", |
| 29 |
} |
| 30 |
|
| 31 |
for _, name in ipairs(modules) do |
| 32 |
local modname = "tkz_elements_" .. name |
| 33 |
require(modname) |
| 34 |
-- Registers the name if it corresponds to a constructor (not utils/constants) |
| 35 |
-- if not ( name == "constants") then |
| 36 |
table.insert(tkz_reserved_names, name) |
| 37 |
-- end |
| 38 |
end |
| 39 |
require("tkz_elements_functions_maths.lua") |
| 40 |
require("tkz_elements_functions_intersections.lua") |
| 41 |
require("tkz_elements_functions_points.lua") |
| 42 |
require("tkz_elements_functions_lines.lua") |
| 43 |
require("tkz_elements_functions_circles.lua") |
| 44 |
require("tkz_elements_functions_triangles.lua") |
| 45 |
require("tkz_elements_functions_regular.lua") |
| 46 |
require("tkz_elements_functions_matrices.lua") |
| 47 |
require("tkz_elements_functions_conics.lua") |
| 48 |
require("tkz_elements_functions_vectors.lua") |
| 49 |
require("tkz_elements_functions_square.lua") |
| 50 |
require("tkz_elements_functions_parallelogram.lua") |
| 51 |
require("tkz_elements_tkz.lua") |
| 52 |
|
| 53 |
-- Initialize elements |
| 54 |
|
| 55 |
function init_elements() |
| 56 |
local tables_to_clear = { |
| 57 |
"A","C","CO","L","M","O","P","PA","LP", |
| 58 |
"Q","R","RP","S","T","V","z","F","PF", |
| 59 |
} |
| 60 |
|
| 61 |
for _, name in ipairs(tables_to_clear) do |
| 62 |
_G[name] = {} |
| 63 |
end |
| 64 |
end |