To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 9012
  Mirrored parts and studs
 
There is somewhat of a disagreeance going on over at the PT about mirrored parts and I thought I'd bring it to the whole community to discuss. Here's a little background for the non initiated: In order to same time and DAT code if a part has a (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs  [DAT]
 
(...) I favour the following scenario - put the part detail in a subpart, but the studs themselves in the main part files. s\xxxxs01.dat bulk of part excluding decorated surfaces and studs (handedness of lowest numbered part) xxxx.dat 1 0 0 0 1 0 0 (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
I am generally against new meta-commands, but inspired by "0 BFD INVERTNEXT", how about something like "0 MIRRORING KEEPPOSITIVENEXT". The more accurate syntax, I leave to the gurus... /Tore (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) I'm not going to comment on the actual question, but I want to make it clear that LDView should NOT display the logo mirrored, ever. It automatically detects that the stud has been mirrored, and mirrors the logo back to its correct (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Thats what i did with the re-upload of some files from the 2865.dat & 32087.dat parts (9V straight track, 9V track cross ) and the recently posted 2867.dat (9V Curved track). I moved the studs from the subparts to the main file. With the (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Good summation. My preference is 1... a sufficiently clever convertor could perhaps detect this rotation and use rotated versions of the studs that it substitutes somehow in a preprocess step??? If there is a way to do 2 (perhaps with a (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) LDView does not have a problem with mirrored studs. (...) Right! See my posting (URL) Cobbs also explains it well in (URL) 2.) The part itself is flawed in that the studs are mirrored. We should redo (...) Though I acknowledge that L3P should (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs  [DAT]
 
(...) **snip** (...) Ah, the perennial question. During a past discussion of this very topic I offered what I thought to be a semi-workable option similar to #2 above, which I reiterate in the interest of further stirring the pot: We could redo the (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) My view is that there is nothing _serious_ wrong, but that a fix should be welcome. Anyway. Since we are only talking about studs, the rendering programs _could_ simply remember to fix any mirrored studs (can be done by multiplying the (...) (21 years ago, 1-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) That is my opinion. The programs should be changed, rather than the parts. One thing to consider: even if we 'fix' all the part files so that all studs render non-mirrored logos, mirrored logos can still occur. For example, if someone created (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
Just for kicks and grins.(not!) I'll throw in my $1.25 (...) This may have resurfaced because of the studs with logo files on my webpage. It was a quick thought I came up with a couple years ago. I guess I should remove them and any references to (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) And mine as well. If LDView can correct for this then so can any other program. The stud logos are a bonus feature offered by many programs but are not officailly supported by the LDraw spec. (...) This further supports my position on this (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) My only concern about letting the rendering programs do this is "how they know which way to orientate the logo". Coding this within the .dat file (either with a correctly orientated stud.dat or with metadata) is preferable to storing this (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Wait a minute. Doesn't L3Input.cpp build a threaded tree structure before outputting a single POV part? I would think you could traverse the array Parts[0...nParts] and look for toplevel parts from the PARTS directory. Then for each toplevel (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Umm, my math is really rusty. Can the sign of the determinant also be used to detect mirroring? That could be handy. Don (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Yes. That's what LDView does. --Travis Cobbs (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) We definitely don't want to do this. It's unnecessary, because the sign of the determinant in the matrix specifying the sub-part tells you whether the sub-part is mirrored. The above might allow the program to do less math, but that's not an (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Yeah, I did a search for determinant and found your note. I tried the on-the-fly fix in ldglite with the L3 structs and it seems to work, although I'm not sure I'm applying the fix correctly. Is it really as simple as multiplying some matrix (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) I don't actually do any transformations in LDView to get the logos right. I just detect the mirroring (by tracking negative determinants and flipping the mirrored bit every time I see one) and modify my texture coordinates to un-mirror (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Actually that does help a bit. It looks like you aren't concerned with whether the logo faces the same direction as on the actual part, you're just ensuring that it's readable. That makes me feel better about my solution. By the way, why do (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Correct. There's no way to know if they actually face the right direction, so I just figured that horizontal mirroring was more likely to be correct than vertical (although I could be wrong). (...) You can, but my code that decides which (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) After thinking about it for a while, I totally agree. If anyone wants to make perfect rendering with stud logos lined up correctly (how often does this occur?), I assume this person must have the knowledge to inline that part locally at (...) (21 years ago, 2-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) A fair point, but how often would that happen, realistically? Enough to be a problem? Even if one or two parts eventually turn up like that, why would the whole system have to be jettisoned for those few exceptions? (...) I'm not sure that (...) (21 years ago, 3-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Yes. But I'm not as willing as you are to see files changed, I guess (...) I think mirrored is more of a concern than misrotated, but that's just me. Would this meta work though? In other words, are there any parts that have studs *with logos* (...) (21 years ago, 3-Jul-03, to lugnet.cad.dev)
 
  Re: Mirrored parts and studs
 
(...) Ouch--painful use of Dave! Oh, well. I knew my solution wasn't perfect, but it solved the immediate problem (while admittedly creating others). I'll still probably use it in my blasphemous clone.dats, if it's all the same to you folks. (...) (...) (21 years ago, 3-Jul-03, to lugnet.cad.dev)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR