CamBam

Resources => Scripts and Plugins => Topic started by: dh42 on December 23, 2016, 05:29:24 am

Title: Hatch plugin
Post by: dh42 on December 23, 2016, 05:29:24 am
Hello,

I just finished a first version of a hatch plugin.

select on or more shape the hit the hatch toolbar icon or the draw/hatch menu.

select hatch type, size and angle then clik OK

- more pattern will be implemented later

works on both V0.9.8 and V1.0

(https://i37.servimg.com/u/f37/14/07/22/66/hachur10.png)


V1.0 first release 23/12/2016

V1.1 Ansi 33,35,36,38 hatch pattern added, tool-tip for hatch pattern now translatable

V1.2 - 07-jan-2017
 -     new patterns with X and Y spacing, 1/2 Line shift, and scale settings.
 -     preview button
 -     works on Windows and Linux (see notes on the web page)

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Hatch_EN.html

++
David
Title: Re: Hatch plugin
Post by: dave benson on December 23, 2016, 05:39:29 am
HI David
Works fine Here
Dave
Title: Re: Hatch plugin
Post by: dh42 on December 23, 2016, 10:08:55 am
V1.1 added (see 1st message)

add more hatch pattern

++
David
Title: Re: Hatch plugin
Post by: Bubba on December 23, 2016, 10:34:45 am
Thanks David. As always , nice job!
Title: Re: Hatch plugin
Post by: EddyCurrent on December 23, 2016, 12:28:39 pm
Yes it's a good one  ;D  well done David.

Is the angle parameter correct though ?
Title: Re: Hatch plugin
Post by: dh42 on December 23, 2016, 13:38:03 pm
Quote
Is the angle parameter correct though ?

I use the same rules than Autocad, so the ANSI hatch with angle = 0 give 45° hatch and the patterns like stars, crosses, etc (not yet implemented) give horizontal pattern with angle = 0

For the history, I searched why I had a strange comportment of the plugin after I add a few change in the code (all hatch regions was selected together) ; I added the name of the pattern (like "ANSI31") in the Tag field.

after some minutes I understood that it's the Group plugin that group all the regions with the same tag name  ;D , so I assume that the group plugin not only groups objects with tags text that begin with Groupxxx but any objects with the same text in tag .. lol

++
David
Title: Re: Hatch plugin
Post by: lloydsp on December 23, 2016, 14:17:29 pm
David,
Thank you!  That will really 'pretty-up' some of my drawings I must present for review by the clients.  That will, to some degree, at least, reduce my having to export them to another drawing package.

LLoyd
Title: Re: Hatch plugin
Post by: EddyCurrent on December 23, 2016, 14:17:59 pm
Quote
Is the angle parameter correct though ?

after some minutes I understood that it's the Group plugin that group all the regions with the same tag name  ;D , so I assume that the group plugin not only groups objects with tags text that begin with Groupxxx but any objects with the same text in tag .. lol

++
David


David,

You are correct, the Group plugin does not care what the text is, it only looks for the same text. That is why the Group name can be anything.
It would be ideal if a new field could be added to each entity for a Group name.
Title: Re: Hatch plugin
Post by: dh42 on January 06, 2017, 20:55:45 pm
Hello

I just add a new version with more patterns, x and y spacing settings, 1/2 line shift option, and a scale value that can be used to scale the size/x spacing/y spacing in one shot.

A preview button is also added.

works also on linux if libmono visual-basic is installed (see web page)

(http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/HatchPlugin/patterns.png)

see the first message for the download link

++
David
Title: Re: Hatch plugin
Post by: newlinuxuser on January 06, 2017, 21:04:40 pm
 ;D ;D ;D
Now works very well in linux too.
Title: Re: Hatch plugin
Post by: dh42 on January 06, 2017, 21:11:30 pm
I just found a little bug ; I forgot to test for bad value in the textbox ... oops

++
David
Title: Re: Hatch plugin
Post by: dh42 on January 06, 2017, 23:13:39 pm
corrected in V 1.21

++
David
Title: Re: Hatch plugin
Post by: EddyCurrent on January 07, 2017, 08:43:55 am
David,

I think it needs the option for 'user defined' patterns now.

Edit:

But I see you already have that in hand  :D

Hello,

I'm working currently to add new patterns to the Hatch plugin ... and maybe (if it would work), a way to define custom patterns ...  ;)

++
David
Title: Re: Hatch plugin
Post by: SteveT on January 07, 2017, 09:31:01 am
Hi, Just tried Hatch V1.21 in CB V1 Linux and it works great, I have a project in which I am trying to copy the affect of straight engine turning on my CNC mill like this https://engineturning.files.wordpress.com/2014/07/guillochecc81-callie-shelvin-viii.jpg (https://engineturning.files.wordpress.com/2014/07/guillochecc81-callie-shelvin-viii.jpg)
Is there a way I can generate this type of affect with the Hatch plugin.

Steve
Title: Re: Hatch plugin
Post by: dh42 on January 07, 2017, 22:59:01 pm
Hello,

Quote
Is there a way I can generate this type of affect with the Hatch plugin.

no, I do not think ... I assume that you need a "Polar Array Copy" to do that.

++
David
Title: Re: Hatch plugin
Post by: kvom on January 08, 2017, 01:07:50 am
I frankly never saw the use for this, but now that one can print CB files it can be useful.
Title: Re: Hatch plugin
Post by: lloydsp on January 08, 2017, 01:10:58 am
Sigh...

 ::)
Lloyd