See https://github.com/LibreCAD/LibreCAD_3/wiki/Building
If we want to support associative drawings, this is a good introduction to get started:
LibreCAD 3 is a next generation 2D CAD application written to be modular, with a core independent from GUI toolkits. Scripting is possible with Lua.
Home Page: http://librecad.org
License: Other
See https://github.com/LibreCAD/LibreCAD_3/wiki/Building
If we want to support associative drawings, this is a good introduction to get started:
I'm changing lua-intf to kaguya as it support multiple inheritance and function overloading.
The bindings are going to be automatically generated : https://github.com/feragon/cpp2lua
CMakeError.log
CMakeOutput.log
Tried installing LIbrecad3 on Linux Mint 19 Cinnamon but failed. CMakeError.log CMakeOutput.log files are attached.
If possible please let me know where things are going wrong.
Currently we just check for <> and substantive the real value.
However what we want is replace <> in the string for the real value
Actually, trim is handled by a Lua script. It's getting bigger for every entity added
A trim method should be added to CADEntity
Currently we have a metric grid, but a imperial would be a nice to have.
Additionally we should automatically be able to load the right grid based from the DXF
Please create a Snap of the current state of this development and add them to snapcraft.io/
Log4cxx was present before and is now disabled.
Add file describing style key
In order to start normally
program for setup file and style key
I opened a previously saved DXF created in LibreCAD (saved and re-opened same day) and found that the sizes of a part of the dimensions objects had changed significantly (see image below). Values for items such as text height, arrow size, extension line offset, etc. had changed. I have a hunch that this may have to do with the fact that I had the General Scale set to 50 in the file when everything still was working ok, but am not sure.
Other info:
Version: 2.1.3
Compiler: GNU GCC 4.9.1
Compiled on: Sep 23 2016
Qt Version: 5.4.1
Boost Version: 1.60.0
System: Windows 7
Current classes are name like : LCDimLinear
What we should create is a proper namespace for it and call the class differently for example
lc::draw::DimLinear
It is necessary to be able to cancel the ongoing command using ESC key.
void CliCommand::onKeyPressed(QKeyEvent *event) {
switch(event->key()) {
case Qt::Key_Up:
if(_historyIndex + 1 < _history.size()) {
_historyIndex++;
ui->command->setText(_history[_historyIndex]);
}
break;
case Qt::Key_Down:
if(_historyIndex > 0) {
_historyIndex--;
ui->command->setText(_history[_historyIndex]);
}
else {
_historyIndex = -1;
ui->command->clear();
}
break;
case Qt::Key_Escape:
/*TODO: Code to terminate ongoing command*/
break;
default:
ui->command->event(event);
break;
}
}
Is there any function available to terminate the ongoing command?
Ellipse major point is currently relative to center, which makes majorP getter returning a point which is not on ellipse and is confusing when creating an ellipse from user-given points.
Ellipse rendering is now correct so I'll fix this later if nobody do it before.
Things to change:
For example here:
CADEntity_CSPtr Line::move(const geo::Coordinate& offset) const {
auto newLine = std::make_shared<Line>(this->start() + offset, this->end() + offset, layer());
newLine->setID(this->id());
return newLine;
}
Start point and end point are modified, and layer/ID are conserved, but not MetaInfo
Solution:
CADEntity_CSPtr Line::move(const geo::Coordinate& offset) const {
auto newLine = std::make_shared<Line>(this->start() + offset, this->end() + offset, layer(), metaInfo());
newLine->setID(this->id());
return newLine;
}
Fixing them is easy but take time (each entity needs to be verified), for the moment I'll fix them when I need. That would be great if someone can help on this :)
Dimensions seem to have a lot of code in common in terms of text rendering.
We could possibly create on single function that can take care of this.
see also: Text rendering of radial that needs to be fixed
Overtime some names spaces have been added/removed and need to do a namespace reality checkup.
DemAngilar needs to be modified so it does smarter text placement- For example when the arrow's are to close we want to move the text automatically outside rather then inside.
Also what we want to do is sometimes draw the angular text on the inside, I am not sure yet what rules there are attached to that.
Is there any way command line differentiate between text option and command?
For example.
If CIRCLE command is working, it asks for radius. But to change from default Radius to Diameter if we type D or Diameter, command line says "Command diameter not found".
I think modifying CliCommand::onReturnPressed() can solve this provided it knows that some command is already running or not.
@feragon Do we have anything to know whether any command is already running?
Currently we have one large EntityVisitor and this makes the whole thing a bit bulky. see https://github.com/LibreCAD/LibreCAD_3/blob/master/lckernel/cad/interface/entityvisitor.h
One idea might be to split the EntityVisitor into a GeoVisitor for pure geometric visits and a subclass EntityVisitor for the rest /primitive) visitors.
This split might make it better to handle.
A other possible solution s discussed with kerkes is to make a map that can call function's. This has the advantage that this might be extendible even from outside the kernel.
Any ideas?
New version of LibreDWG library was released approximately month ago with a few good features
https://github.com/LibreDWG/libredwg/releases/tag/0.7
Your own library didn't update for years, feature difference is huge: https://github.com/LibreCAD/LibreCAD/tree/master/libraries/libdxfrw/src
It would be very beneficial to switch to this library finally.
new API:
API breaking changes:
Important bugfixes:
Other newsworthy changes:
Over time I have been adding files to location what seemed to be 'best fit' but we need to verify and see if it's all still in logical order.
-lboost_system must be added to target_link_libraries of lcUI/CMakeLists.txt
When the arrows/Text are to small then the arrow need to be drawn at the outside rather then on the inside. like this : http://skitch.rvantwisk.nl/~rvt/bmk/tmp/_opt_NONAME_1.dxf-20150128-211547.jpg
DXF files have the capability to load different line styles.
At this moment this is not yet support in our version.
This allows someone to copy and paste between different LibreCAD windows,and if possible different processes
Copy from LibreCAD v2 should be possible too
My aim is to find perpendicular of a 2D vector. Which is the appropriate function?
Also wanted to find intersection of 2 vectors.
It'll reduce building time on Travis-CI. It's actually taking ~30 minutes to complete.
on Lubuntu 14.10 64bit, following Instructions I get, after the command cmake ../LibreCAD_3/
, an error
CMake Error at luacmdinterface/CMakeLists.txt:19 (find_package):
By not providing "FindCurl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Curl", but
CMake did not find one.
Could not find a package configuration file provided by "Curl" with any of
the following names:
CurlConfig.cmake
curl-config.cmake
Add the installation prefix of "Curl" to CMAKE_PREFIX_PATH or set
"Curl_DIR" to a directory containing one of the above files. If "Curl"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/home/alessandro/build/CMakeFiles/CMakeOutput.log".
curl is installed. Any help?
As pointed out by @rupakbajgain, Circle/Circle intersection is marked as undefined because it's defined as bool operator()(const lc::geo::Circle& c1, const lc::geo::Circle& c2);
, and a CADEntity is sent so the compiler calls this function : template<typename S> bool operator()(const S& s1, const S& s2);
Add capability of panning with mouse by holding cmd/alt/ctrl keys and bible to pan around the view
We currently only support model space
-- Build info: branch master - commit 8f246bb
Scanning dependencies of target lckernel
[ 1%] Generating always_rebuild
[ 1%] Generating ../../lckernel/version.cpp
-- Build date: 2017-09-28 04:28:12
-- Build info: branch master - commit 8f246bb
[ 2%] Building CXX object lckernel/CMakeFiles/lckernel.dir/version.cpp.o
[ 3%] Building CXX object lckernel/CMakeFiles/lckernel.dir/cad/dochelpers/documentimpl.cpp.o
In file included from /home/user/soft/cad/librecad/LibreCAD_3/lckernel/cad/dochelpers/documentimpl.h:7:0,
from /home/user/soft/cad/librecad/LibreCAD_3/lckernel/cad/dochelpers/documentimpl.cpp:5:
/home/user/soft/cad/librecad/LibreCAD_3/lckernel/cad/document/document.h:9:10: fatal error: nano-signal-slot/nano_signal_slot.hpp: No such file or directory
#include <nano-signal-slot/nano_signal_slot.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
lckernel/CMakeFiles/lckernel.dir/build.make:166: recipe for target 'lckernel/CMakeFiles/lckernel.dir/cad/dochelpers/documentimpl.cpp.o' failed
make[2]: *** [lckernel/CMakeFiles/lckernel.dir/cad/dochelpers/documentimpl.cpp.o] Error 1
CMakeFiles/Makefile2:87: recipe for target 'lckernel/CMakeFiles/lckernel.dir/all' failed
make[1]: *** [lckernel/CMakeFiles/lckernel.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The file is right there though:
$ locate nano_signal_slot.hpp
/home/user/soft/cad/librecad/LibreCAD_3/nano-signal-slot/nano_signal_slot.hpp
LibreCAD uses 24 bits color in UI, but DXF only support 256 indexed colors
When saving, we should use the closest color, and warn the user.
Messages shown on command prompt support any font highlighting? like Bold or italics or underscore?
I originally raised this in the other repository here and I think its really important feature, I would love to roll this out as but our workflow is xref centric, will it land in version 3 ? Libredwg currently has an open issue to extract xref paths from dwg files (I am trying to implement the tool but im not sure I have the required skill set).
I assume xrefs aren't part of the dxf standard so im aware that this probably causes some compatability issues
Test for correct drawing of DimDiametric and DimRadial
This can be done creating a DXF in a other CAD application and compare that how LibreCAD 3 draw's it to compare the drawing's and see if we render the same Dim functions
I've added make stylecheck
using clang-tidy, but before I can add this check on Travis CI, all the code needs to be checked and fixed.
Ubuntu 18.10, Git master of LibreCAD_3:
Running 'cmake ..' outputs:
CMake Error at persistence/CMakeLists.txt:63 (add_subdirectory):
The source directory
/home/alex/soft/cad/LibreCAD_3/persistence/libopencad
does not contain a CMakeLists.txt file.
Is this expected? Should I be able to fix it on my end?
DocumentCanvas needs a redraw when a TempEntity is added or removed and the cursor isn't moving to trigger the redraw.
For example, when someone create an entity using command line.
I just read wiki page ...
... and found that it include reference link to webpage that not exist anymore
Is it issue of @gaganjyot website or is it incorrect link? Where this page live now?
P.S.: Is it same content on Medium?
TODO: Test for correct drawing of DimDiametric
This can be done creating a DXF in a other CAD application and compare that how LibreCAD 3 draw's it
Due to Cairo we currently can only load the PNG file format.
We need to have support in lcviewernoqt to load other image formats.
At this point I don't want to bluntly import Qt in this lib due to it's enormous dependencies and I rather would like to find a 'smaller' library. We don't need transformations (I think) only beable to show a image format in a Cairo surface,
Hello,
I just found that Lua >= 5.3.4 is required due to LUA_UTF8LIBNAME macro. It is being used on LibreCAD_3/lcadluascript/lclua.cpp
Document Canvas should ask the callee for a painter instead of keeping it's own vector of painter.
This will avoid a hashmap of painter in the DocumentCanvas and additionally the callee can decide where the paint what.
This will make it easier to use the DocumentCanvas in situations where you need to write to PDF or SVG.
Currently they are not yet handled in the drawing code.
Possible we can use transformations of the painter for this but not 100% sure .
From what I understand,
Lets say there is an area { 5000, 5000 } , { -5000, -5000 } area1 ( area of quadtree )
If I want to retrieve elements in area { 100, 100 }, { 200, 200 } called area2
it checks if the area2 is in the area1 and returns all the elemets so present in the area1
I don't have a *nix platform to unittest and make sure about it. but if the understanding is correct it will be retrieving lots of entities that are not even the area. Not sure if painter will paint all the entities or only a few
LibreCAD_3/lckernel/cad/dochelpers/quadtree.h
Line 342 in 8f246bb
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.