Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 38289) +++ trunk/scconfig/plugins.h (revision 38290) @@ -58,6 +58,7 @@ plugin_def("smartdisperse", "netlist based dispenser", sbuildin, 1) plugin_def("teardrops", "draw teardrops on pins", sbuildin, 1) plugin_def("tool_std", "standard tools", sbuildin, 1) +plugin_def("trimesh", "triangulated mesh", sbuildin, 1) plugin_def("vendordrill", "vendor drill mapping", sbuildin, 1) plugin_header("\nFootprint backends:\n") @@ -192,3 +193,4 @@ plugin_dep("query", "lib_formula") plugin_dep("report", "query") plugin_dep("show_netnames", "query") +plugin_dep("trimesh", "lib_polyhelp") Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 38289) +++ trunk/src/Makefile.dep (revision 38290) @@ -2722,6 +2722,9 @@ vtpadstack.h obj_pstk_shape.h polygon.h vtpadstack_t.h draw.h \ ../src_plugins/tool_std/tool_thermal.h undo.h \ ../src_3rd/libuundo/uundo.h undo_old.h obj_pstk_draw.h draw.h +../src_plugins/trimesh/trimesh.o: ../src_plugins/trimesh/trimesh.c \ + ../config.h ../src_plugins/lib_polyhelp/triangulate.h \ + ../src_3rd/fast89-poly2tri/fast89_poly2tri.h ../src_plugins/vendordrill/vendor.o: ../src_plugins/vendordrill/vendor.c \ ../config.h conf_core.h globalconst.h change.h board.h vtroutestyle.h \ attrib.h global_typedefs.h layer.h obj_common.h flag.h data_parent.h \ Index: trunk/src_plugins/plugins_ALL.tmpasm =================================================================== --- trunk/src_plugins/plugins_ALL.tmpasm (revision 38289) +++ trunk/src_plugins/plugins_ALL.tmpasm (revision 38290) @@ -110,4 +110,5 @@ include {../src_plugins/smartdisperse/Plug.tmpasm} include {../src_plugins/teardrops/Plug.tmpasm} include {../src_plugins/tool_std/Plug.tmpasm} +include {../src_plugins/trimesh/Plug.tmpasm} include {../src_plugins/vendordrill/Plug.tmpasm} Index: trunk/src_plugins/trimesh/Makefile =================================================================== --- trunk/src_plugins/trimesh/Makefile (nonexistent) +++ trunk/src_plugins/trimesh/Makefile (revision 38290) @@ -0,0 +1,6 @@ +all: + cd ../../src && $(MAKE) mod_trimesh + +clean: + rm *.o *.so 2>/dev/null ; true + Index: trunk/src_plugins/trimesh/Plug.tmpasm =================================================================== --- trunk/src_plugins/trimesh/Plug.tmpasm (nonexistent) +++ trunk/src_plugins/trimesh/Plug.tmpasm (revision 38290) @@ -0,0 +1,10 @@ +put /local/rnd/mod {trimesh} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/trimesh/trimesh.o +@] + +switch /local/module/trimesh/controls + case {buildin} include /local/pcb/tmpasm/buildin; end; + case {plugin} include /local/pcb/tmpasm/plugin; end; + case {disable} include /local/pcb/tmpasm/disable; end; +end Index: trunk/src_plugins/trimesh/trimesh.c =================================================================== --- trunk/src_plugins/trimesh/trimesh.c (nonexistent) +++ trunk/src_plugins/trimesh/trimesh.c (revision 38290) @@ -0,0 +1,51 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#include "config.h" + +#include + +#include +#include +#include +#include + +#include + +static const char *trimesh_cookie = "trimesh"; + +int pplg_check_ver_trimesh(int ver_needed) { return 0; } + +void pplg_uninit_trimesh(void) +{ +} + +int pplg_init_trimesh(void) +{ + RND_API_CHK_VER; + + return 0; +} Index: trunk/src_plugins/trimesh/trimesh.pup =================================================================== --- trunk/src_plugins/trimesh/trimesh.pup (nonexistent) +++ trunk/src_plugins/trimesh/trimesh.pup (revision 38290) @@ -0,0 +1,7 @@ +$class feature +$short triangulated mesh +$long generic surface triangulation +$state WIP +#$package export-sim +dep lib_polyhelp +default buildin