A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

mad-hatter
This post was updated on .


Hello,

If anybody wants to try it, the source code is here https://www.dropbox.com/sh/5qi02kt3oe0x6es/AADuNoMC07iJCVWMy1TU6vxVa?dl=0

You will have to know how to set up and install a new plugin from scratch and build LibreCad from source.

I've built and tested on Windows using Qt Creator 4.7.0:-
   Version: 2.2.0-alpha
   Compiler: GNU GCC 5.3.0
   Compiled on: Aug 10 2018
   Qt Version: 5.11.1
   Boost Version: 1.68.0
   System: Windows 10 (10.0).

It compiles on linux without errors but I don't know how to set up an entry in the plugins menu on linux.
About MAC OS X, I have no idea.

TODO:-
At the moment it will not divide/break the entities but will draw tick marks where the divisions should be,
then you can manually divide.

Any questions, please ask.
Feedback is welcome.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

R. van Twisk
Administrator
super cool!

even with the manual division, this is still going to be a time saver for a lot of people

Ries
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

gabriel
This looks awesome. I' ll try it over the weekend. 

El vie., 10 de ago. de 2018 12:22, R. van Twisk [via LibreCAD] <[hidden email]> escribió:
super cool!

even with the manual division, this is still going to be a time saver for a lot of people

Ries


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/A-PlugIn-to-allow-Lines-Arcs-and-Circles-to-be-divided-into-even-sections-tp5716289p5716290.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

LordOfBikes
Administrator
Many thanks for sharing this.
I've taken the liberty to add your code to our main repository.
https://github.com/LibreCAD/LibreCAD/commit/c43f770a

The only difference on Linux and OS X is the path to the plugin binary. Menu entries are created automatically by plugin interface, when the binary is found in plugins folder.

I made some minor modifications:
- renamed plugin, it's simply Divide now
- split source files, one source and header file per class
- removed blue text color to match better with LibreCAD GUI

How about your git skills?
Do you have a github account?
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

mad-hatter
This post was updated on .

 
Hello,

LordOfBikes wrote
- renamed plugin, it's simply Divide now
- split source files, one source and header file per class
- removed blue text color to match better with LibreCAD GUI

How about your git skills?
Do you have a github account?
Rename :- I used DivideOptions as you already have a menu entry and cmdline entry for Divide.
Split :-  I did them as one file, as they are quite short.
Git skills :- Non existant,
Github account :- I have one.

The source code has been revised serveral times and updated today 28-8-2013.

Edit:-
I've updated the source to split the the header & the *.cpp files. 13:30 today.
I've left the headers with *.hpp extensions.
https://www.dropbox.com/sh/5qi02kt3oe0x6es/AADuNoMC07iJCVWMy1TU6vxVa?dl=0

Regards
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

LordOfBikes
Administrator
Sorry, I lost focus on this.

First let me say again, that your efforts are more than welcome!

If you want to put more work in your plugin, I see two ways.

1) It is extra work for us to merge your contributions into code base manually, I won't do this too often. So if you won't invest in learning some git basics, I would wait for a more final version to merge manually again.

2) If you are willing to give git a try, I can merge latest changes when you are ready for it and then you can continue with your own forked repository. This allows automatic merge for us, which is much less time consuming.

For Windows you need git for Windows, which you find here: https://gitforwindows.org/
And I recommend TortoiseGit, a git GUI for git on Windows: https://tortoisegit.org/
All basics are explained on github: https://guides.github.com/activities/hello-world/

Important, when you go with git, is to work on a separate branch. Otherwise, working on forked master branch will mess up things and makes automatic merging impossible.

No matter how you decide to go on, you're contribution is welcome. Don't hesitate to ask if anything is obscure, this can save time for all of us.
You can also ping us on IRC channel #librecad or Zulip chat at https://librecad.zulipchat.com/

Armin
Reply | Threaded
Open this post in threaded view
|

Re: A PlugIn to allow Lines, Arcs and Circles to be divided into even sections

mad-hatter
Hello,
LordOfBikes wrote
Don't hesitate to ask if anything is obscure.
At the moment, I have no idea how to 'Divide/Break' from a C++ program.
I did think of sending a string of commands but can't work out how to do this.
Any sugggestions would be appriciated.
I'll think about using github.

Regards