New version of mesh branch.
by Tavmjong Bah
Hi,
I just checked in a new version of my mesh branch. There was some major
restructuring to use a simple array of nodes for the internal
representation rather than the complicated side and corner classes I had
before. This was motivated by adding support for tensor meshes which
naturally calls for an array. Tensor meshes were added as an experiment
to see if they would help in smoothing color transitions across patch
boundaries (they don't seem to help very much) and are not envisioned to
be part of the SVG specification for meshes.
New/newish features:
Corner operations:
Ctrl-B: Toggle selected patch sides between linear and curve.
(Select both corner nodes of side to select side.)
Ctrl-C: Attempt to convert selected sides into elliptical arcs by
changing the length of the Bezier handles.
Ctrl-G: Toggle on/off tensor points for selected patches.
(Select all four corner nodes of a patch to select patch.)
Ctrl-J: Attempt to smooth color transition around a corner by
changing length of Bezier handles. This needs lots of
work to make it truly useful.
Ctrl-K: Sample colors underneath mesh at corner nodes. For nodes
at edge of mesh, move sample point inside mesh.
Older features:
1. Create a simple one patch square mesh the size of an objects bounding
box. (Select the third button on the Gradient Tool-Tool Bar and then
click-drag on object. You won't see a change as the default mesh has all
four corner colors set to the former object color. Click on object again
to see mesh handles.)
2. Drag corner nodes (diamonds).
3. Change color of corner nodes.
4. Drag handles (circles). There is no indication of what handle belongs
with which corner node or path so it can be confusing. And all handles
are shown. (Should be able to toggle on/off handle visibility.)
5. Divide a row or column of patches into two rows or columns. (Double
click on the lines connecting corner nodes. Double clicking elsewhere
may lead to a crash.) The row/column will be split at the place you
click.
6. Save the mesh. The mesh is saved in the proposed SVG standard format
(likely to change).
7. Read in saved meshes.
Bugs:
* Frequent crashes.
* Changing node color isn't saved until a node is moved.
* Linear patch sides are shown as non-linear when corner node moved.
* Selected nodes become unselected when any of the corner operations are
done.
* etc.
Note, a trunk version of the Cairo rendering library is needed.
My branch can be found at:
https://code.launchpad.net/~tavmjong-free/inkscape/mesh
Tav
11 years, 8 months
Wacom inkling files
by Gaetano Lo Nigro
Good morning guys,
I asked few files to a guy who bought, the new Wacom-inkling just in case if somebody want have a look on them.
The Wacom website reports the possibility to record layers, for
instance, to separate preparatory and final drawings.
These layers are
then retained after import.
It creates native bitmap or vector versions of your sketches for
Adobe Photoshop, Adobe Illustrator or Autodesk Sketchbook.
With a
simple click you can directly transfer your sketches into your preferred
software.
These imported versions retain the layers and line weights of
your original sketches. Additionally, you can save all sketches in the
native Inkling format or as single layer files in other popular image
formats such as JPEG, PNG, PDF or SVG.
You can find more details here with a full review from the owner`s sketch
http://www.inkscapeforum.com/viewtopic.php?f=30&t=11278
You ll fin attached on the forum a svg file in three layers, pdf, ai, and wac
directly
Have a nice day
11 years, 8 months
SpCursor
by Kris De Gussem
Hi all
Is there a reason why the parameters named xpm of the functions in
src/sp-cursor.cpp are refering to gchars and not guchars?
As a result a signed char is used as index for colorMap from line 153 on
and AFAIK using signed chars to index is risky business
Regards
K
11 years, 8 months
Re: [Inkscape-devel] Writing an extension
by Trever L. Adams
> Date: Mon, 16 Jan 2012 10:24:00 +0100
> From: Jasper van de Gronde <th.v.d.gronde@...528...>
> Subject: Re: [Inkscape-devel] Writing an extension
> To: inkscape-devel(a)lists.sourceforge.net
>
> On 13-01-12 19:10, Trever L. Adams wrote:
> > This relates to https://bugs.launchpad.net/inkscape/+bug/247463 and
> > comment 37 in particular.
> >
> > I would like to be able to attach information to objects that are needed
> > for high quality digitization. This includes stitch length and stitch
> > direction. I am thinking of displaying the direction as gradient,
> > although direction may be very complex. I am just learning about SVG so,
> > I do not know if there are smart ways of doing this. (For example, think
> > of a leaf, where you may have 20 different direction changes.) I also do
> > not know XML very well (creating schema, etc).
> So basically you want to embed information needed to convert a drawing
> to something that can be embroidered? And you want this information to
> be visible and manipulable in Inkscape's interface?
Yes, I am starting from information I have found here:
http://jumpnslide.tumblr.com/post/2557920924/how-to-use-inkscape-as-a-gam...
I am missing just a few pieces of information:
1) How do I set values in the interface (fetch them from the SVG)? I
have defaults working, etc.
2) How do I insert my custom attributes back into the SVG?
The following partial code block doesn't do #2 properly and actually
crashes inkscape:
#Loop through all the selected items in Inkscape
for id, node in self.selected.iteritems():
#Check if the node is a Group ( "svg:g" tag in XML )
if node.tag == inkex.addNS('g','svg'):
#DO SOME THINGS TO GROUPS
outputBlock += "Found a Group!" + "\n"
children = list(node)
for node2 in children:
outputBlock += "Group " + str(node) + " contains: "
+ str(node2.attrib["id"]) + "\n"
node2.attrib["max_stitch_length"] =
str(max_stitch_length)
I am sure I am going to have to create an XML schema right? If so can
you point me in the right direction?
>
> > So, is there a standard way to extend SVG or embed such codes in SVG for
> > a given object?
> Extending SVG is in principle very easy, just define a namespace that
> hasn't been taken yet (and preferably as specific as possible) and use
> elements/attributes from that namespace. Ideally you would also create a
> schema to define which elements/attributes are in that namespace and so
> on, but I wouldn't necessarily start out that way (although it's
> obviously a good idea to think about a formal definition if you want
> this to be used by others as well, and/or save yourself some trouble in
> the future).
>
> The idea is that viewers/editors will ignore anything they don't
> recognize. The extent to which this is true in practice varies a bit,
> and it's definitely not a given that an editor (Inkscape) will preserve
> the tags, but in principle it should "work" (in the sense that nothing
> will suddenly go wrong).
Can you provide me with any urls which show an example of how to create
an XML schema? In the past when I have looked, I just walk away with a
headache.
> > I would like to do this in SVG and Inkscape since I believe both are
> > scriptable and both can be used for print as well. (This is a project
> > for both print and embroidery.)
> Inkscape itself is not really scriptable. What you can do is write a
> python extension that essentially gets a piece of SVG to transform. But
> this is fairly flexible. Also, if you know C/C++ you might be able to
> write something like an LPE to help out.
LPE? I do know several languages, including C/C++.
I thought Inkscape was. I would like to be able to change colors (and
maybe remove them in some cases), resize and place objects and save/load
files from scripts.
>
> > Additional request for information:
> > Is it possible to define a custom color table? Embroidery machines
> > usually have a fixed color table (which can be converted to various
> > thread vendor product/color numbers).
> Not sure, but I think there is at least some support for color
> management. Perhaps someone else knows more about this?
I think the palettes was what I was looking for and have since learned
how to do this.
>
> > Is it possible to turn an outline on for an object and give it a
> > different color than the object, or easily create an outline?
> You mean outline as in stroke? If so, that's trivial in SVG, every
> object intrinsically has a fill and a stroke.
Yes, I finally figured this out. As I said, new to inkscape and SVG.
>
> > Finally, is there a way to do "Ungroup repeatedly until there are no
> > groups left, and convert objects to paths." as part of an extension
> > (http://www.jonh.net/~jonh/inkscape-embroidery/) without modifying the
> > original (as part of an export, etc.)?
> I think it's possible to create extensions for output as well, so
> conceivably this would be possible. In any case, you might want to have
> a look at this extension:
>
> https://gitorious.org/various-small-stuff/inkscape-ungroup-deep/
>
I am starting to wonder if I actually need this, but on having looked at
that code, I was able to at least start working on groups with my code.
Thank you,
Trever
11 years, 8 months
Codestyle: _*
by Johan Engelen
Hi all,
I am busy 'improving' a small part of the code to use an underscore
for class members. I think this helps fight bugs when converting C
functions to class methods. For example, a SPPath function may define a
temporary variable 'curve', but that one will hide the class's own
'curve' variable (inherited from SPShape). Since the class hierarchy is
quite long at places, this is not so easily spotted.
So I think the _* stuff for members is really nice and clarifies code a lot.
However, now I read in our codestyle document:
* Underscore as first character of identifiers
Please consider that the C++ standard reserves _* identifiers
[17.4.3.1.2]: "Each name that begins with an underscore is reserved to
the implementation for use as a name in the global namespace".
Hmm, quite a large part of our codebase already uses _* to signify class
members. I think this is somewhat common practice?
Do we agree to ignore this text in the C++ standard? And shall we change
our codestyle text to indicate that we use _* to indicate class members?
(I hope this does not result in long maillist discussions... Please
answer yes or no. I am already convinced that _* is better than without,
and cannot be convinced otherwise. (I _may_ consider 'm_' but it is
perhaps overly verbose?))
Thanks,
Johan
11 years, 8 months
Re: [Inkscape-devel] Powerstroke requests
by Valerie
If I may add a few words about interface...
Inkscape now has several pretty fun options for path shapes:
- Simple line
- Pattern along path
- Powerstroke
- Sketch brush
- [anything I might have missed. There will probably be future options too]
Now, for the "shape" drop-down I rarely use the presets because they are
rarely the exact width I need them at, it's easier to create the right shape
and copy it. So, how about the following?
Shape:
- Line
- Thick stroke (<- powerstroke)
- Sketch brush
- Clipboard
- Custom (insert drop-down of shapes you've saved for Pattern
along Path)
It's rather unfortunate that Inkscape's tool control bar is static, otherwise
I'd recommend for common options (like width and repeat options
in Pattern Along Path) to appear depending on the shape you've selected.
(though in the meantime, can someone please add dashes and
markers to the tool option bar? Having to hunt through two
layersof Fill & Stroke dialogue each time is a bit annoying... also,
a button to match marker colors to stroke color rather than hunting
through the menus, please? Some of us do a lot of graphs in Inkscape...)
More generally, I'd like to see some proper of sorting of LPEs eventually:
- Path shapes can be integrated into pen and other tools
- Effects like Gears seem like they belong in Extension -> Render
- I'd also Really like easier and on-canvas access to some transformations
that would probably be used more often if access were easier (not only LPE):
Envelope, Perspective, and Envelope deformation. Couldn't we include them
as a drop-down options (like with pen and Shape) in the Select and Transform
tool? I can do mock-ups.
11 years, 8 months
cannot compile rev 10891 (Windows XP)
by alvinpenner
attempting to compile rev 10891 I get the following error message:
Make error line 289: problem compiling: src/2geom/conicsec.cpp:1491:20:
error: prototype for 'std::vector<Geom::Point>
Geom::xAx::allNearestPoints(const Geom::Point&) const' does not match any in
class 'Geom::xAx'
src/2geom/conicsec.h:477:24: error: candidate is: std::vector<Geom::Point>
Geom::xAx::allNearestPoints(Geom::Point) const
- Alvin
--
View this message in context: http://inkscape.13.n6.nabble.com/cannot-compile-rev-10891-Windows-XP-tp36...
Sent from the Inkscape - Dev mailing list archive at Nabble.com.
11 years, 8 months
Traversing nodes of a path in order
by Maximilian Albert
Hi all!
After a long break I just had a quick play-around with some of the
Inkscape code. At some point I needed to traverse the nodes of the
selected path in the order in which they appar along the path, but I
couldn't find out how to do it in the limited time I was able to
spend. What's the correct/recommended way of doing this? Are there
some examples on the wiki or somewhere else?
Cheers,
Max
11 years, 8 months
Writing an extension
by Trever L. Adams
This relates to https://bugs.launchpad.net/inkscape/+bug/247463 and
comment 37 in particular.
I would like to be able to attach information to objects that are needed
for high quality digitization. This includes stitch length and stitch
direction. I am thinking of displaying the direction as gradient,
although direction may be very complex. I am just learning about SVG so,
I do not know if there are smart ways of doing this. (For example, think
of a leaf, where you may have 20 different direction changes.) I also do
not know XML very well (creating schema, etc).
So, is there a standard way to extend SVG or embed such codes in SVG for
a given object?
How would I go about attaching buttons, etc. in the GUI?
Can I have Inkscape view the direction code as a gradient for display
(if an option is set)? Or, show the fill as lines going in that
direction? (Again, this wouldn't be done in printing/export/etc., only
in viewing with an option set.)
I would like to do this in SVG and Inkscape since I believe both are
scriptable and both can be used for print as well. (This is a project
for both print and embroidery.)
Additional request for information:
Is it possible to define a custom color table? Embroidery machines
usually have a fixed color table (which can be converted to various
thread vendor product/color numbers).
Is it possible to turn an outline on for an object and give it a
different color than the object, or easily create an outline?
Finally, is there a way to do "Ungroup repeatedly until there are no
groups left, and convert objects to paths." as part of an extension
(http://www.jonh.net/~jonh/inkscape-embroidery/) without modifying the
original (as part of an export, etc.)?
Thank you,
Trever
11 years, 8 months