Author Topic: hatching a form with a fixed spacing  (Read 11063 times)

0 Members and 1 Guest are viewing this topic.

bendesarts

  • Jr. Member
  • **
  • Posts: 42
hatching a form with a fixed spacing
« on: April 26, 2014, 11:11:22 AM »
Hello,

I use visio for technical schemes. I often need to hatch forms. However, i would like to hatch a form with a fixed spacinf for example 1 or 2 mm. It seems that when i zoom a form the spacing between 2 lines is changing
How can i hatch a form with a fixed spacing ?

Thank you for help

Thomas Winkel

  • Full Member
  • ***
  • Posts: 244
Re: hatching a form with a fixed spacing
« Reply #1 on: April 26, 2014, 12:36:17 PM »
See attached screenshot.

You should also create a template for your technical schemes:
1. Make your settings, include your stencils, include your logo, etc.
2. Save as Visio template.
3. Create new schemes with this template.

Yacine

  • Hero Member
  • *****
  • Posts: 3004
Re: hatching a form with a fixed spacing
« Reply #2 on: April 26, 2014, 12:50:13 PM »
Hi Thomas,
I think Bendesart is after "Schraffuren".
Visio does indeed display hatches dynamically and there is only a coarse and a fine one.
For a technical purpose it makes sense to make own hatches as custom fillings with well defined spacing.
Yacine

bendesarts

  • Jr. Member
  • **
  • Posts: 42
Re: hatching a form with a fixed spacing
« Reply #3 on: April 26, 2014, 01:02:49 PM »
OK. Thank you for your answers.

However, i need to make this line with a angle such as the form attached that is to say with oblique lines and not vertical or horizontal lines.

Have you others ideas to do that ?

Thank you for your help.





Thomas Winkel

  • Full Member
  • ***
  • Posts: 244
Re: hatching a form with a fixed spacing
« Reply #4 on: April 27, 2014, 02:15:53 AM »
Hi Thomas,
I think Bendesart is after "Schraffuren".

Ups, sorry... My English...  :-X

Yacine

  • Hero Member
  • *****
  • Posts: 3004
Re: hatching a form with a fixed spacing
« Reply #5 on: April 27, 2014, 04:15:16 AM »
Hi Bendesart,
I am not really sure if you understood what I meant by custom fill patterns.
Google is your friend, but here are some links anyhow:
http://visguy.com/vgforum/index.php?topic=1300.0
http://www.visguy.com/2009/09/09/visio-tutorial-advanced-fill-effects/
http://www.visguy.com/2008/09/09/hexagonal-custom-fill-pattern/
Yacine

bendesarts

  • Jr. Member
  • **
  • Posts: 42
Re: hatching a form with a fixed spacing
« Reply #6 on: April 27, 2014, 04:37:38 AM »
OK Thank you for your help.
The first link has dealt with my post that is to say hatching a form with oblique lines and constant spacing.
It seems that, unfortunately, the conclusion is that visio has no easy solution to do the hatching i want for a form.

Yacine

  • Hero Member
  • *****
  • Posts: 3004
Re: hatching a form with a fixed spacing
« Reply #7 on: April 27, 2014, 04:48:38 AM »
It has! I recall some decades ago, having needed to create my own hatch in ACAD.
How much easier is it with Visio's patterns?
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • Ideas Visio-lized into solutions
Re: hatching a form with a fixed spacing
« Reply #8 on: April 28, 2014, 01:49:34 AM »
 @Yacine:   :o  Decades???

Anyway, back to the hatching issue.  The custom fill pattern ought to work.  After some additional consideration to the 1st post Yacine recalled, I believe there is a solution to the little glitches that were noticed.

Draw the initial hatch fill per usual.  See attached Visio file.  I drew equally spaced diagonal lines.  Added another shape behind it to include a fill background.  Also, made the line color around that 2nd shape the same as the fill color.  These shapes were grouped together.  Open the shapesheet of the group, and under Protection section set LocCalcWH to 1.  Then, extend the lines beyond the alignment box.  That should do it.

What this does, when the fill pattern is applied, the patterns butt together along the alignment boxes.  Because the filled shape has a border line around it as the same color as the fill, there is no obvious transition from fill pattern to fill pattern.  Also, because the lines extend beyond the alignment box, there are no gaps or glitches in the line pattern.

This seems to work fine in the attached example.  There are 3 rectangles:  left shape has no border line, middle shape has fine border line, and right shape has a heavier border line.  No noticeable anomalies.

HTH
Wapperdude
Visio 2019 Pro

Yacine

  • Hero Member
  • *****
  • Posts: 3004
Re: hatching a form with a fixed spacing
« Reply #9 on: April 28, 2014, 11:54:16 AM »
@Wapperdude: Clownish behaviour isn't necessarely a sign of youth.  ;D
I recalled this topic: http://visguy.com/vgforum/index.php?topic=1730.msg7568#msg7568
And yes, time flows like sand. We don't get wiser, just sadder.  ;)

But back to the serious things, your hatch demo is really nice. I learned something.
The very next thing I tried, was to setup a filling shape that could be configured. Say adjust the distance between the lines, their weight and the angle.
So I made a "line" group somewhat larger as the diagonal of the background shape.
But obviously the lines must overlap the group shape only slightly, otherwise you get those ugly artifacts.
Got stuck there...
« Last Edit: April 28, 2014, 12:03:51 PM by Yacine »
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • Ideas Visio-lized into solutions
Re: hatching a form with a fixed spacing
« Reply #10 on: April 28, 2014, 12:20:11 PM »
Yeah...

I played with this more last night and this morning...with / without the "borderline".  The overlap seems to have a very narrow tolerance margin!   :P  It works, but, isn't as robust as I had thought it might be, and as you have discovered.

As for automating the line spacings...perhaps using the distribute function...would be tricky though. 


LOL... love the logo!
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4479
  • Ideas Visio-lized into solutions
Re: hatching a form with a fixed spacing
« Reply #11 on: April 28, 2014, 09:53:20 PM »
Upon further consideration, once the fill pattern is created, then, assuming that the line overlaps and the fill overlap are slaved to the group shape size, then, to change the line spacing is merely a function of resizing the fill pattern.  For example, 10 lines across, each with 1mm spacing.  Group shape is 10mm square.  Additional step would be to lock the aspect ration.  Then, if the shape is resized to 20mm, the lines will have 2mm spacing, etc. etc.

Wapperdude
Visio 2019 Pro

Yacine

  • Hero Member
  • *****
  • Posts: 3004
Re: hatching a form with a fixed spacing
« Reply #12 on: April 29, 2014, 02:58:20 AM »
I set the background shape's contour to noline, reduced the whole pattern to only one line.
The overlapping is minor: 0.001 in.
The result is a rectangle of which you modify the angle of diagonal by modifying either the height or the width, then you adjust the pitch visually (NO DIRECT input in shape data).
The pitch being the height of the triangle formed by the edges of the rectangle and the diagonal.

If I understood those bloody setatref commands, I could have written the values directly in the shape data... :(

The artifacts are still there, by in my opinion negletable.

One might want to add an option to set the background either transparent or coloured ... don't know.

PS: the shape works only between 0 and 90 DEG. Over 90° would require to an option to reposition the line. Not a big deal
« Last Edit: April 29, 2014, 03:06:02 AM by Yacine »
Yacine