DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Weird printing problem

Started by j-wetzel, March 21, 2013, 09:48:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

j-wetzel

A 2-d illustration I've prepared for a paper is all on one layer, it involves shading (hatching), and it involves line segments in colors.  The bold black line on top refuses to print.  It comes up on print preview, and disappears when the print button is clicked.  I attach the drawing, which is completely elementary as these things go.  Why won't it print the wide black line?

I just know somebody is going to look at this and point out something embarrassingly obvious--that the risk I guess I have to face.  Help, please!
--Jack

DrollTroll

Jack, I'm not even seeing a "wide black line". The outline of the hatch is a zero-width black line, but the only other black things I see are the text bits. When I print to PDF, it looks just like it does on the screen (see attached pdf print).
25 years with DesignCAD

j-wetzel

#2
Good grief, that's really weird.  I attach the pdf generated from "1b.dcd" by DesignCad's program; it's right.  When I view the "1b.dcd" I attached to the original post from the posting, the wide black lines are there, just as they should be.  I've attached that file again:  "1b.dcd."

It's spooky.

--Jack

DrollTroll

Jack, please rename the correct file and attach it with a new name (like "1b_updated.dcd"). Due to weirdities of browser caching, I'm not convinced I'm getting the right version of the file when I download it. If the file has a unique name, the caching shouldn't affect it.
25 years with DesignCAD

Bob P

Here's his second drawing post.  (With the bold black line.)

DrollTroll

OK, I think I figured it out. Sometimes DesignCAD has trouble displaying wide lines with duplicated vertices. They may display at some zoom factors and disappear at others. Try running my DeleteTinySegments macro (in DrollTroll's Tools in Tips and Tricks board), then manually regenerate the drawing and see if that fixes it.
25 years with DesignCAD

j-wetzel

DT:  I ran your magic macro, and it complained about one too-small segment in the misbehaving wide black line.  I didn't know quite what to do about it, so I just deleted the line and redrew it.  Now everything works as desired!  Thanks so much for your suggestion.  You've saved the day.
--Jack

DrollTroll

Jack -- maybe you ran "FindTinySegments" rather than "DeleteTinySegments"? The first one will just locate and select them; the second will actually delete the problem points.
25 years with DesignCAD

Rob S

This is indeed weird.  First attempt, the line is selectable, but not visible even when being moved around the screen. 

I tried breaking the line into its component parts using break line,  and then it also became visible 

Then I re-built it by selecting all the parts individually to avoid duplication, and using combine, and it remained visible.  I did not find any small segments left over, (by moving the resulting line out of the way and drag selecting where it was) however the original line has 13 points, and the resulting recombined line only has 12 points.

Then, on reopening the original drawing, I tried moving the original line again, when it would remain invisible only in the lower left corner of my screen.  After moving it around for a while, it remained visible all the time.

User since forever

samdavo

#9
Quote from: Rob S on March 22, 2013, 09:17:42 AM
This is indeed weird. ....
the original line has 13 points, and the resulting recombined line only has 12 points.

Then, on reopening the original drawing, I tried moving the original line again, when it would remain invisible only in the lower left corner of my screen.  After moving it around for a while, it remained visible all the time.
Rob
Likewise, agreed, weird.
Something similar to what you did ...

I simply duplicated the line off to the side ( with "n" hotkey)
the original had 13 points, the duplicate 12 (?)

However, if you copy (Cntl+C) and paste (Cntl+V) back into the drawing somewhere else, it comes back with 13 points.

But, lol, in EACH case (N-duplicate, or cut-and-paste, I selected the zigzag line by clicking once on the approx midpoint of one of those diagonal lines, (line g-o) (??)
...  who ya gonna call?   ghost busters (2 cents).

PS Jack, re the purpose of that drawing, can we assume you are developing a perpetual motion machine?  or maybe a new stock market investment stategy?  :)  Maybe Easter egg designer?  Maybe brain surgeon trying to understand the effect of high octane vodka?

samdavo

#10
PS ...
two more clues - correction, comments.
1. IN early replies above, there is inconsistency of whether the line displays.   Now when you print the original "1b" with fit to window - repeatedly - ,  then sometimes the black line is present, sometimes not - almost random, (but I doubt that is news to anyone).

[[PS there is a periodic pattern of sorts (ALMOST periodic lol but not quite) which goes like "no yes no yes yes no yes" - blame it on the bossanova??]]

Yet when you print "refresh" you always get the same view as previous.  i.e. the black line will stay hidden or shown with each refresh, just as it was before.

But also ..
2.  there are two points "e" on the original line - clearly with a zero (or near zero?) length line between.  (Points 5 and 6 both have same coordinates).

If you duplicate the line with "n", there are 12 points - because only one point "e".
If you cut and paste, it maintains 13 points ( and two e's.)

DT, Rather than me pretending I cracked any code here,  at last I understand what you mean by delete tiny segments? thanks - another macro to add to the toolbar.

PS - so I tried to replicate what might have happened.  I assumed that Jack must have accidently sneezed and clicked point "e" twice when he added the black line.    So I tried to draw a line with three segments (4 points), and clicked the second point three times, making what I thought would be 6 points total.  The program ignored the extra points, and the final line only had 4 points.

Jack - question,  I assume you don't use snap grid?  (hard to imagine with a drawing like that, lol, but just checking out all options.

...................................................
PPS. I'm going to add a third comment here, where it fits better than it would in the following posts.
But I tried another way to see what was going on here. 
Given that we know that there are 2 points at or near "e"  (both the 5th and 6th),   I thought of another idea ...   

I selected manipulate all layers,
I pressed asterisk (= change the position of a point, i.e. a single point), 
then gravity snapped on point "e" from eg the south
then moved that point way down near "a"  - so that the thirteenth point should have been left at or near "e" (you would think)
But lol, "e" and all lines apparently meeting at e move off to the new location -
and the line still shows 13 points (??)   I give up - other than to investigate solutions to the problem rather than reasons.

samdavo

#11
Herewith the infobox showing the 6th point with exactly the same coordinates (to 4 decimal places) as the fifth.

I also tried to see if there were two points there close together.  However I don't think there are.   Not sure how to prove that?
I gravity snapped in from N S E and W, and always seemed to get the same point ( based on "angle and distance between two points" always being zero distance, and either 0 or 90 degrees).
(2 cents)

(I guess that a macro would prove it, listing all point coordinates)

PS There is also an unnecessary point between "g" and "m".  Can be safely ignored, unless you're determined to count 12 points.  :)   But that's not the problem - the problem is a 13th point hiding at "e".

samdavo

#12
Finally
On a completely different matter (not related to the printing problem)
but I enclose a drawing and pdf with the background and "easter egg" colours reversed.  (more correctly darker grey background , previously white, compared to the egg shaped hatch colour)
in case it is of interest
cheers
sam

PS.  Sorry, on checking the dcd file I just posted ("1b grey background" below), I see I didn't save background colour correctly. (or maybe its about defaults)...  At least the pdf is correct as I intended.

Anyway to get that effect
a) double click the black line, change it's RGB to 005, 005, 005  (otherwise it might become white), and
b) go to file - workspace configuration - set - appearance setting - details - background - set RGB to 190,190,190;

Using recorded keystrokes, that COULD be Alt+F, then K, S, A, Alt+D, G (grass), G (gray), enter, Alt+P, Alt+C;

or else, as a macro, using sys() functions :-
' grey = simply changes to grey background.
sys(321)=190
sys(322)=190
sys(323)=190

regen

Or, you can do that through Q (options) - colours if you prefer.  (2 cents). 

samdavo

#13
DT and Jack

I'm gonna summarise two ways to fix that problem (although I have no clues as to why it happened (i.e. what caused it in the first place);

1. Using your Delete TinyFragments macro :-
download the dcd file, 
press "fit to window" as many times as necessary for that black line to appear (optional),
run your macro,
it will tell you "fixed"
fit to window (I use F).
Press fit to window a few times just to double check.
all good (PROVIDED ...  see below)

2. Using N-duplicate.
download the dcd file
press A, then Cntl+A,  where A is a macro that "selects/unlocks all layers", and Cntl+A = select all (at this point you have everything selected);
press N (for duplicate)
place a point nearby (can be real close to orig position)
press "delete" which erases the (old) selection,
press fit to window (F)
Press fit to window a few times just to double check.
all good. 

These two methods give what appears to be identical results, a correct drawing as intended (and 12 points in that black line, not 13).

BUT I'm going to claim that there is "room for improvement" in your DeleteTiny Fragments macro  (hope I'm right).
It worked above, but only because the problem multisegment line was in layer 1, and layer 1 was editable.
Not sure I can explain it but ....

I tried this :-

3.  Using your Delete TinyFragments macro, but with the problem line in another (uneditable)  layer :-
download the dcd file, 
press "fit to window" as many times as necessary for that black line to appear (optional),

new steps:-
select just the line, and change it to layer 5 say (and to lightblue to identify it) -
change current layer to layer 1, and choose "select current layer only"


run your macro,
it will tell you "fixed"
Press fit to window once or twice just to double check.

At this stage I found a problem. 
the line between e and o becomes two almost parallel lines ( which actually meet way way off the screen to the left.  Like, the length of egg is about 50,  but the intersection point is way off the south west - about 90,000 units away.

PS there is another strange effect I notice - it has dropped off the last segment (now light blue) between points "L" and "k" (??)  In doing so, it ends up with the correct number of 12 points, but not in the right places.

I enclose the results of the second and third methods, including pdf ( seen zoomed into) of the third, with the long spike to the left.

In summary, I believe your macro should either "manipulate all layers" or should warn to do so (2 cents).   
PS (just as your macro "fix 3D text" does  - sorry I'm just effectively posting your ideas back at you :) )
cheers   

PS whenever I run either of these macros (DeleteTinySegments or Fix3DText),  I intend to run my macro "A" first (manipulate all layers) - thanks btw.

samdavo

#14
Quote from: samdavo on March 22, 2013, 06:36:34 PM
(I guess that a macro would prove it, listing all point coordinates)

Sorry to quote myself - but I find that DT's macro "NewMakeXYZ.d3m" does exactly that.
I selected the line (in the faulty file, i.e. with 13 points).

Then ran that macro.
The 13 points have coords as follows :-

; String data: 
71.6901584808           -21.8629543960            0.0000000000
58.4706966864           -17.8971184190            0.0000000000
53.8947291421            -12.1008927087           0.0000000000
58.1656321834               1.0168812672           0.0000000000
69.4918139156               5.5676441463           0.0000000000
69.4918139156               5.5676441463           0.0000000000

81.1471580722            -20.8460726924           0.0000000000
78.6258785485               5.7198785551           0.0000000000
84.9217998256              -4.1718004509           0.0000000000
93.1463618548            -17.2869893969           0.0000000000
98.3324584050               0.1016877340           0.0000000000
97.4281188291            -14.2079730638           0.0000000000
102.1966087756          -10.7789464941            0.0000000000

Clearly points 5 and 6 are the same point, even to 10 decimal points.
Now,  apart from the fact that I've learnt how to use another of DT's "toolbox macros"
I note that "DeleteTinySegments" includes the following screen decision requred :-
"Current minimum length is 0.000001. Specify new minimum length, or just press Enter to accept the default:"

Now clearly that is only 6 decimal places.  (and 6<10).    yet when you run DeleteTinySegments, it sorts the problem above (with 10 decimal places at least.

So DT, it sounds like you might as well choose the default (0.000001), than make it finer tolerance -  since it is not necessarily just the number of decimal places.

Perhaps as you inferred above it is also something to do with wide lines?

PPS. Yep,
Another way to get that black line to print is to set its width to zero.  It still weirdly has 13 points (incl two identical ones?) but
a) at least it is stable on the screen, so that "print to screen" doesn't turn it on and off, and 
b) at least it prints, albeit as a thin line (not what is intended).   (2 cents).
But since there are at least two ways to correct it , I'll drop it. Cheers.