Jump to content
Developer Wiki and Function Reference Links ×

3D Loci are all white in PIOs


SamIWas

Recommended Posts

I use 3D loci quite a bit for reference points in plugins.  Usually, I either delete them or hide them after needed in the code, but sometimes I use them as snap points for outside things.

 

But, in all of my PIOs, my 3D loci are white and not visible unless there's a dark background.  I've tried assigning them to different classes.  I've tried setting their pencolors to black.  I've tried giving them a pen size.  But they just stay white.  If I put a 3D locus in my document, it's the selected pen color and visible.  So I know that it's not the wrong settings for loci visibility.

 

What gives??

Link to comment
3 hours ago, Marissa Farrell said:

@SamIWas

Can you share one of your PIOs that has this issue? Or a slimmed down one that demonstrates it? I'd like to take a look.

@Marissa Farrell Here is just a quick little Locus Test.  It makes a small array of both 2D and 3D locus points.   The 2D Loci take on the color, while the 3D ones do not.  

 

PROCEDURE LocusStuff;

VAR
	markertest : BOOLEAN;
	
BEGIN

	PushAttrs;

	NameClass('None');
	FillPat(1);
	FillFore(0,0,65000); FillBack(0,0,65000);
	PenPatN(1);
	PenFore(65000,0,0);PenBack(65000,0,0);
	OpacityN(100,100);
	markertest:=SetDefaultBeginningMarker(1,15,0.25",0.125",1,1,FALSE);
	markertest:=SetDefaultEndMarker(1,15,0.25",0.125",1,1,FALSE);


	Locus(-12",0"); Locus(0",12"); Locus(12",0"); Locus(0",-12");
	
	Locus3D(-12",12",12"); Locus3D(-12",-12",12"); Locus3D(-12",12",-12"); Locus3D(-12",-12",-12");
	Locus3D(12",12",12"); Locus3D(12",-12",12"); Locus3D(12",12",-12");

	Locus3D(12",-12",-12"); SetPenFore(LNewObj,3);SetPenBack(LNewObj,3);  {this one to test indiviudal color assignment}
	
	BeginXtrd(-30",30");
		Rect(-30",30",30",31");
		EndXtrd;

	PopAttrs;

END;

Run(LocusStuff);

 

 

 

image.png.4562d22b1ea1bc924e378355c8c380cc.pngimage.png.4bf73c7c2c59fa36029dfcb1d049dc6d.png

 

3D Locus Test.vso

Link to comment
6 hours ago, Marissa Farrell said:

I think this is due to 

 

PenPatN(1);

 

because that sets the pen to a dash type. When I took that line out, it appears to work correctly. Please let me know if you don't see the same.

That was the issue. Very odd.  But PenPat 1 isn't a dash style.  It's the PenFore color, while PenPat 2 is the PenBack color.  PenFore 0 is no pen, but it makes the 3D Loci appear.  The boxes below are PenPatN(0) through PenPat(5).  When extruded, they appear only with the PenFore Color, except for 3D loci.  Very bizarre behavior, but at least I can control it now!  Thank you.

 

image.png.7b62083a882f13d1e3ff92e92d12c1a8.pngimage.png.8a8a71da8d0d1335dad641cdabbfe3a5.png

Link to comment
  • Marionette Maven
11 hours ago, SamIWas said:

But PenPat 1 isn't a dash style.  It's the PenFore color, while PenPat 2 is the PenBack color.

 

That's not my understanding. PenPat and PenPatN both set the active linetype, or dash style.

PenFore sets the front color of the pattern and PenBack sets the back color, which you use in your script.

  • Like 1
Link to comment
21 hours ago, SamIWas said:

But PenPat 1 isn't a dash style.  It's the PenFore color, while PenPat 2 is the PenBack color.

 

Hey @SamIWas,

   Actually Pen Pat=1 is the background LineStyle (pen pattern) and Pen Pat=2 is the foreground LineStyle (pen pattern). The same is true for the Fill Patterns; Fill Pat=1 is the background fill pattern and Fill Pat=2 is the foreground fill pattern. The colors for foreground and background Pens and Fills track accordingly.

 

   The real confusion belongs to VW assigning the default Pen Style as 2 (foreground - which makes sense), BUT the default Fill Pattern is 1 (background - which has been "wrong" for more than 3 decades - IMO.) When you select SOLID from the Attributes Palette for Pens you get the Foreground Pattern - PenPatN(2); but selecting SOLID for Fills, you get FillPat(1).

 

   Users don't care, because they assign patterns and colors from the UI palettes and everything works. Programmers are the ones who have to know where the wrinkles are. Welcome to the Wrinkle Conscious Club. I could pontificate more, but we're way past the point of that affecting anything. 

 

Raymond

  • Like 1
Link to comment
12 hours ago, Marissa Farrell said:

 

That's not my understanding. PenPat and PenPatN both set the active linetype, or dash style.

PenFore sets the front color of the pattern and PenBack sets the back color, which you use in your script.

It's my understanding that PenPat or PenPatN 1-71 match the fill styles...the pixelated patterns.   If you use a negative PenPat, then it becomes a dash style.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...