Hi all I'm new to the forum but not new to Inkscape. I use Inkscape primarily for the design of RC aircraft. I have a process for designing parts that only requires some basic steps that follow simple boolean logic and a handful of measurements. However it's a very slow process and I'd like it to be faster if that's at all possible. All I know coding wise is some basic Java from a computer programming class I took last year. Is there anyone who can walk me through the process for writing the code for an extension that will have to read a list of a variables and conditions and then go through a process of measuring and drawing a series of straight line segments?
You might be better served by using a free parametric CAD program like Fusion 360. Designs can be updated just by changing a few entry fields, which can include expressions and named parameters.
I have tried using fusion 360 before and it definitely has potential. But my PC has a really hard time running the program even on the lowest settings. Not to mention that I also have a much easier time designing in two dimensional space.
I'm not trying to sound like a jerk, but fusion or any other programs that I'm aware of aren't capable of doing what I need in this situation. It's not that it's a complicated process it's just not wanted by the masses, I may be the only person who wants something like this haha. What I want to do is write out code for an extension that: When I select two individual paths made out of straight line segments. The extension will be able to read the distance between every cusp node in those two paths and use that information, coupled with a previously imputed measurement, to draw a series of triangles. It's not a hard process or complex procedure. It's just slow process that I'd like to have way to be able to press a button and let a computer do the work for me.
I guess that would be quite achievable. You could use to_superpath function and pick the coordinates for each node from that and just calculate the distance node by node. The distances could be visualized as text (get inspired from the Visualize Path - Number Nodes extension) or you could write those distances to a txt file.
I gradually learn to write the code for my extensions by looking at the code for extensions that do similar things that I want to do.
In Prefrences under System you will find the paths where the built in extensions are saved (Inkscape extensions) to your system and where you should put your own (User extensions).
The Visualize Path - Number Nodes extensions have two files - find them in the Inkscape extensions folder: path_number_nodes.py + path_number_nodes.inx
The .inx file is the user interface for the dialog box and the .py is the Python code doing the job.
For the use of to_superpath function I guess there are better references than my own extensions, but I struggled to find any examples using Inkscape v1.0+ type of code so if it could be of any help here I have used that: https://inkscape.org/~EllenWasbo/%E2%98%85removeduplicatenodes
Hi all I'm new to the forum but not new to Inkscape. I use Inkscape primarily for the design of RC aircraft. I have a process for designing parts that only requires some basic steps that follow simple boolean logic and a handful of measurements. However it's a very slow process and I'd like it to be faster if that's at all possible. All I know coding wise is some basic Java from a computer programming class I took last year. Is there anyone who can walk me through the process for writing the code for an extension that will have to read a list of a variables and conditions and then go through a process of measuring and drawing a series of straight line segments?
Thanks!
You might be better served by using a free parametric CAD program like Fusion 360. Designs can be updated just by changing a few entry fields, which can include expressions and named parameters.
I have tried using fusion 360 before and it definitely has potential. But my PC has a really hard time running the program even on the lowest settings. Not to mention that I also have a much easier time designing in two dimensional space.
Thank you for the suggestion though!
I do all my 2D cad work in Fusion... you can't beat constraints, dimensions and parametrics.
Fusion is not the only choice, there are other free cad programs.
Good luck!
I'm not trying to sound like a jerk, but fusion or any other programs that I'm aware of aren't capable of doing what I need in this situation. It's not that it's a complicated process it's just not wanted by the masses, I may be the only person who wants something like this haha. What I want to do is write out code for an extension that: When I select two individual paths made out of straight line segments. The extension will be able to read the distance between every cusp node in those two paths and use that information, coupled with a previously imputed measurement, to draw a series of triangles. It's not a hard process or complex procedure. It's just slow process that I'd like to have way to be able to press a button and let a computer do the work for me.
I guess that would be quite achievable. You could use to_superpath function and pick the coordinates for each node from that and just calculate the distance node by node. The distances could be visualized as text (get inspired from the Visualize Path - Number Nodes extension) or you could write those distances to a txt file.
I gradually learn to write the code for my extensions by looking at the code for extensions that do similar things that I want to do.
In Prefrences under System you will find the paths where the built in extensions are saved (Inkscape extensions) to your system and where you should put your own (User extensions).
The Visualize Path - Number Nodes extensions have two files - find them in the Inkscape extensions folder: path_number_nodes.py + path_number_nodes.inx
The .inx file is the user interface for the dialog box and the .py is the Python code doing the job.
Here some more on getting started: https://inkscape-extensions-guide.readthedocs.io/en/latest/01_getting-started.html
As a reference for the inx code I use this: https://wiki.inkscape.org/wiki/index.php?title=Extension_GUI_Reference
As a reference for the inkscape specific Python code (inkex) I use this: https://inkscape-extensions-guide.readthedocs.io/en/latest/inkex-modules.html
For the use of to_superpath function I guess there are better references than my own extensions, but I struggled to find any examples using Inkscape v1.0+ type of code so if it could be of any help here I have used that: https://inkscape.org/~EllenWasbo/%E2%98%85removeduplicatenodes
Thank you very much Ellen! Those are some very helpful resources!