using command line for line co-ordinates

Asked by Hemant Shah

I need to draw diagrams with specific dimensions and co-ordinates. how to do so? is there a command line interface?

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi Hemant Shah,

can you explain a bit about the kind of thing you want to do?

For example, how many diagrams do you want to draw? Limited number or variable re-use?
Where do you want to generate them?
(on a server? maybe also in a web browser? On your local machine?)
What kind of diagrams are you intending to draw? Curves? Rectangles? Circles? Equations?

There exists a python module 'pturtle' in the extensions directory. It can draw straight lines, as far as I understand. It could be used with some reading from files to run Inkscape with an extension via commandline. But that may require a GUI, so won't run on a server without a graphical interface.

The Inkscape commandline cannot currently be used directly to move or draw an object. You need to generate the SVG source code and insert it, this is how the Inkscape extensions work. Many of the options you will find by typing 'Inkscape --verb-list' will only open a dialog in the GUI, and you would have to fill it in manually. Operating tools via command line is not supported.

There are, however many other options, and they depend upon your use case.

Kind Regards,
 Maren

Revision history for this message
Hachmann (marenhachmann) said :
#2

(to draw with exact coordinates, without CLI, just use snapping to a grid)

Revision history for this message
Hemant Shah (hemantsshah) said :
#3

I understand... perhaps I will go with the grid solution.

I am trying to draw apparel design apperns, which start with rectangles
of specific dimensions (waist and hip and knee lengths), and bezier
would be wonderful for creating the curves needed in garments.

Not too many of those... less than 10 rectangles...

regards

Hemant

On 08/10/2016 08:08, Hachmann wrote:
> Your question #402836 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/402836
>
> Status: Open => Answered
>
> Hachmann proposed the following answer:
> Hi Hemant Shah,
>
> can you explain a bit about the kind of thing you want to do?
>
> For example, how many diagrams do you want to draw? Limited number or variable re-use?
> Where do you want to generate them?
> (on a server? maybe also in a web browser? On your local machine?)
> What kind of diagrams are you intending to draw? Curves? Rectangles? Circles? Equations?
>
> There exists a python module 'pturtle' in the extensions directory. It
> can draw straight lines, as far as I understand. It could be used with
> some reading from files to run Inkscape with an extension via
> commandline. But that may require a GUI, so won't run on a server
> without a graphical interface.
>
> The Inkscape commandline cannot currently be used directly to move or
> draw an object. You need to generate the SVG source code and insert it,
> this is how the Inkscape extensions work. Many of the options you will
> find by typing 'Inkscape --verb-list' will only open a dialog in the
> GUI, and you would have to fill it in manually. Operating tools via
> command line is not supported.
>
> There are, however many other options, and they depend upon your use
> case.
>
> Kind Regards,
> Maren
>

Revision history for this message
Hachmann (marenhachmann) said :
#4

Yes, in that case, definitely, the grid and the tool bar entry fields would be the best option.

You can define the rectangle's bottom left corner's position on the page by entering the value when you use the selection tool (look at the tool bar at the top).

The origin of the coordinate system is bottom left corner of the page. The other corner can be defined by either snapping to grid, or by entering a width and height.

Kind Regards,
 Maren

Can you help with this problem?

Provide an answer of your own, or ask Hemant Shah for more information if necessary.

To post a message you must log in.