zecruel / cadzinho Goto Github PK
View Code? Open in Web Editor NEWMinimalist computer aided design (CAD) software
License: MIT License
Minimalist computer aided design (CAD) software
License: MIT License
With very little modification I was able to build CadZinho on macOS. I will publish my modifications soon, and invite everyone to test the resulting executable in the meantime: CadZinho.zip.
I'm also thinking of switching the build system to CMake, so the Makefile would be uniform on Windows, Linux and macOS (I was able to build on Linux, and Windows, but Windows executable just crashes on startup), and also packaging in Flatpak for Linux. Let me know if such changes are welcome (I will do it anyway in my fork, but won't submit any pull requests if these changes are unwanted).
Hi,
I generated new GUI translations using AI as follows.
The generated files are in folder translations.
To use these translations, simply copy the files to the /lang folder (Windows - in the executable folder, Linux - /usr/share/cadzinho/, macOS - CadZinho.app/Contents/Resources/), and they will be available in the configuration window.
For non-Latin languages (Russian, Chinese) it is necessary to use a font that has the corresponding characters. I recommend using the GoNotoKurrent-Regular.ttf font, which is almost universal. To load the font it is necessary to change the configuration file indicating the path and file of the font to be used, as in the following example.
I ask that native speakers in these languages check the quality of the translation and display on the screen. Feel free to submit improvements. The files consolidated in the verification/improvement will be incorporated into the next versions of CadZinho.
If you want to follow the same methodology to do other translations (base file in English), I used Copilot with the following prompt:
rewrite the Lua ‘translate’ table below, translating the value strings into --target lang--
See ya!
This commit references release 0.5.0: c4537bc
However, the latest release available for download is 0.4.1. Was release 0.5.0 removed for some reason? Or is it just a teaser for the next release?
Hi @zecruel .
Maybe use -lz
for support *.dxfz
?
I have tried to build CadZinho with MSVC (VS2019 for both x64 and x86). These are the libraries that I was using:
The executable launches, but crashes with this error:
Access violation - code c0000005
eax=00000000 ebx=00000001 ecx=4e3a7c0a edx=7473bd44 esi=04bc9378 edi=04bc4a28
eip=00000000 esp=04afe018 ebp=04afe058 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210246
00000000 ?? ???
With a debugger, I figured out that this is the exact line that crashes:
Line 54 in 843a064
How can I debug further to provide valuable information?
I am using it on Ubuntu 22.04 LTS. The UI specially the plotting pointer moves are slow and lagging.
Maybe add shields in README.md?:
![GitHub release (latest by date)](https://img.shields.io/github/v/release/zecruel/CadZinho)
![GitHub Release Date](https://img.shields.io/github/release-date/zecruel/CadZinho)
![GitHub repo size](https://img.shields.io/github/repo-size/zecruel/CadZinho)
![GitHub all releases](https://img.shields.io/github/downloads/zecruel/CadZinho/total)
![GitHub](https://img.shields.io/github/license/zecruel/CadZinho)
I have just built CadZinho in Flatpak, it works fine for me. My YAML config is published here: tpimh/cadzinho-flatpak. If anyone is interested, please test it and report if there are any problems. All suggestions are welcome!
The code compiled just fine but it failed at linking:
gcc -L/usr/lib -L. `sdl2-config --cflags --libs` -llua -lm -lGL -lGLU -lGLEW ./obj/_dirent.o ./obj/bmp.o ./obj/draw_gl.o ./obj/dxf.o ./obj/dxf_attract.o ./obj/dxf_copy.o ./obj/dxf_create.o ./obj/dxf_dim.o ./obj/dxf_edit.o ./obj/dxf_ent.o ./obj/dxf_export.o ./obj/dxf_graph.o ./obj/dxf_hatch.o ./obj/dxf_image.o ./obj/dxf_math.o ./obj/dxf_print.o ./obj/font.o ./obj/graph.o ./obj/gui.o ./obj/gui_attrib.o ./obj/gui_block.o ./obj/gui_circle.o ./obj/gui_config.o ./obj/gui_dim.o ./obj/gui_dupli.o ./obj/gui_edit_attr.o ./obj/gui_edit_text.o ./obj/gui_ellip.o ./obj/gui_explode.o ./obj/gui_export.o ./obj/gui_file.o ./obj/gui_find.o ./obj/gui_hatch.o ./obj/gui_image.o ./obj/gui_info.o ./obj/gui_insert.o ./obj/gui_lay.o ./obj/gui_line.o ./obj/gui_loop.o ./obj/gui_ltype.o ./obj/gui_measure.o ./obj/gui_mirror.o ./obj/gui_move.o ./obj/gui_mtext.o ./obj/gui_paste.o ./obj/gui_pline.o ./obj/gui_plugins.o ./obj/gui_point.o ./obj/gui_print.o ./obj/gui_prop.o ./obj/gui_rect.o ./obj/gui_rotate.o ./obj/gui_scale.o ./obj/gui_script.o ./obj/gui_select.o ./obj/gui_spline.o ./obj/gui_text.o ./obj/gui_toolbox.o ./obj/gui_tstyle.o ./obj/gui_txt_prop.o ./obj/gui_vertex.o ./obj/gui_xy.o ./obj/gui_zoom.o ./obj/hatch_pat.o ./obj/hershey.o ./obj/i_svg_media.o ./obj/list.o ./obj/ltype.o ./obj/main.o ./obj/miniz.o ./obj/pdfgen.o ./obj/rref.o ./obj/script.o ./obj/shape.o ./obj/shp_font.o ./obj/sqlite3.o ./obj/tt_graph.o ./obj/util.o ./obj/yxml.o `sdl2-config --cflags --libs` -llua -lm -lGL -lGLU -lGLEW -o cadzinho
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGL: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLU: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLEW: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGL: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLU: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lGLEW: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:31: cadzinho] Error 1
I have to edit makefile to replace -lGL -lGLU
with -lopengl32
and -lGLEW
with -lglew32
.
p/s: Why could I know it's -lglew32
but not -lGLEW
? You could read information about any MSYS2 packages online.
This is the information of the mingw-w64-x86_64-glew
package: https://packages.msys2.org/package/mingw-w64-x86_64-glew
Btw, you could use pkg-config
, too: pkg-config --libs glew
.
I haven't yet figured out the exact line or reason why my build broke, but I was able to bisect the exact commit that introduced the regression: 659d762
I will investigate the issue further and post the updates here.
Today, When I try to use Lua 5.4.3 ,
CadZinho cannot bootstrap on both windows and linux.
same message:
PANIC: unprotected error in call to Lua API (attempt to index a userdata value)
Lua 5.4.0 runs well on both platform.
Here is a short test case, it will panic when use Buffer method:
`#include <stdio.h>
#include <stdlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#ifdef _MSC_VER
#pragma comment(lib, "lua.lib")
#endif
void
setLuaPathBuffer(lua_State* L)
{
luaL_Buffer b;
luaL_buffinit(L, &b);
luaL_addstring(&b, "/etc/init.lua");
lua_getglobal( L, "package");
luaL_pushresult(&b);
lua_setfield( L, -2, "path");
lua_pop( L, 1 );
}
void
setLuaPathString( lua_State* L )
{
lua_getglobal( L, "package" );
lua_pushstring( L, "/etc/init.lua" );
lua_setfield( L, -2, "path" );
lua_pop( L, 1 );
}
int
main(int argc, char** argv)
{
lua_State* L = luaL_newstate();
luaL_openlibs(L);
if (argc == 2 && !strcmp(argv[1],"string")) {
setLuaPathString(L);
} else if (argc == 2 && !strcmp(argv[1],"buffer")) {
setLuaPathBuffer(L);
}
lua_getglobal( L, "package" );
lua_getfield( L, -1, "path" );
const char* cur_path = lua_tostring( L, -1 );
printf("%s\n", cur_path);
lua_close(L);
printf("bye\n");
}
`
best regards.
Hi there - I'd love it if you could join us on the community.osarch.org forum so we chat about your great little application for 2D CAD
We really need some good options in the FOSS world so it's great to see this here. FOr now I've added the project to https://wiki.osarch.org/index.php?title=Getting_started_with_2D_CAD_drafting but haven't yet had time to make software page for it, you're very welcome to make one yourself. A good template is https://wiki.osarch.org/index.php?title=Inkscape
I hope to see you soon on our forum, maybe in this thread https://community.osarch.org/discussion/815/new-2d-cad-application-cadzinho/
AppImage is fully portable package for Linux.
Create & setup .travis.yml
Doesn't react to touch events at all.
On Ubuntu 24.04
CadZinho appimage starts but the tools on the top toolbar do not work. The same in Wayland or X sessions.
The .deb installation fails saying that it has not installable dependencies: sdl2, glew, sdl2-net.
Add licensing info as LICENSE
or/and COPYING
files.
Also, add dependencies & build info into README.md
or into INSTALL.md
.
For example: i need to draw rectangle from point A=(10,10) to point B=(100,100). How to specify coordinates of point A?
I have compiled the "master" in Fedora Linux 28 :
[s@localhost ~]$ uname -a
Linux localhost.localdomain 4.19.8-200.fc28.x86_64 #1 SMP Mon Dec 10 15:43:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[s@localhost ~]$ gcc --version
gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[s@localhost ~]$
with the following changes :
Makefile :
LINKER_FLAGS = -lSDL2main -lSDL2 -llua -lm
EXE=teste9.x
When the compiled program is executed , it is producing a
"Segmentation fault" ,
crashing KDE KWin windows manager .
I have made the following change to
config.lua :
-- font_path = "C:\Windows\Fonts\"
font_path = "/usr/share/fonts/"
It did not make any effect .
( The fonts are in different sub-directories . )
I searched "int main ..." in some possible source files , but I could find it with difficulty .
( It is within interface.c ) .
Can it be made a different source file with "traditional name" main.c ?
There are some conditional compilation statements such as
#ifdef linux
Is there a possibility to collect such words into an included file with statements such as
#define linux
#undef _WIN32
#undef WIN32
#undef CYGWIN
#undef MINGW32
to be able to modify them with respect to OS ?
Thank you very much .
Mehmet Erol Sanliturk
Tried to open test file on window. The file located in a directory with cyrillic symbols in the address. So when I browse to the file location the app freezes and crashes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.