| | Re: Quick way to mirror-image a model? Carl Nelson
|
| | (...) Is there any documentation about what functionality needs to be exposed to make an MLCAD plugin? I've been playing with this in a class-based architecture, that has an LMirrorExceptionList that contains an array of LMirrorExceptionPart. I've (...) (20 years ago, 21-Jun-04, to lugnet.cad)
|
| | |
| | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | (...) Hmm, I don't know. I'm pretty sure there's documentation on language DLL creation, but I'm not so sure about the generators. Ask this on the .mlcad group. (...) XML works, but it's harder for humans (ie. me) to read. (...) Under Steve's scheme (...) (20 years ago, 22-Jun-04, to lugnet.cad)
|
| | | | |
| | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | (...) Steve, Don--thanks for the explanations; this now makes complete sense to me (finally!). For a reflection about the plane containing the Z & Y axes (left-to-right), the reflection matrix (Mp) should be: -1 0 0 0 1 0 0 0 1 Then Mp * (part-file (...) (20 years ago, 22-Jun-04, to lugnet.cad)
|
| | | | | |
| | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | (...) Err, I'm not sure what you mean by unmirror. I got (0 0 1 0 1 0 1 0 0 0 0 0) for a mirror.ini exception matrix, which looks yours except for the sign of that one number. (...) Me neither. (...) And generating the MIRROR.INI file. I did some (...) (20 years ago, 22-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | (...) Unreflect is a better word--just undo the X coordinate swap that -1 0 0 0 1 0 0 0 1 does. I believe they're equivalent things--I'm doing a clockwise rotation, then negating the X coordinate swap, you're doing the opposite rotation. I think (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | |
| | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | | (...) We already got some of them. The 4360 Space laser gun with side sight is gonna to be a problem. You just *know* someone out there'll hook it up to something by the stud on the asymetric sight portion. And there'll be no end to the whining when (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | | |
| | | | | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | | | | (...) Yup, oh well. I guess the mirror specification could always translate it with no rotation, or add a comment to the LDraw file saying that this part needs to be checked for proper placement. (...) Thanks! I put a 2 x 2 red brick by a 1 x 6 x 5 (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | | | |
| | | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | | | (...) Would that work in general cases, or just for right-left reflection? (...) Actually, I think they're not - "Steve's algorithm" (ha!) requires that both the MP and ME transforms be mirroring, so that the MF transform would be non-mirroring. (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | | | (...) It would need to determine the plane of reflection, and do the second reflection on the X components for left-right or Z components for front-back. (...) I've come up with the same results in all cases so far. I'll do some thinking as to which (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | | (...) Can you or Don check my work? I'm trying to figure out why the ME transform that I did works in my program and the ME that Don put in mirror.ini works in his code, but not vice-versa. The most likely explanation is that I'm doing something (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) Probably. ;^) (...) Matrix multiplication is not commutative. (distributive? Err, I forget my math terms.) You're doing one or more of the multiplications in the wrong order? Try ME * (MC * MP) instead. Notice I switched the order inside the (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | | (...) It's neither commutative [(a * b) * c != a * (b * c)] nor associative [a * b != b * a]. That shouldn't be the problem in the calculation above, since the current matrix was the identity matrix... (...) Looks like you're doing MF = MP * (MC * (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) Yes, that looks right. The other thing that messes me up with LDRAW matrices is the row, column ordering. The ordering in LDRAW files is not what I would have chosen, so I always have to look it up. From the old FAQ: (URL) type 1's format is: (...) (20 years ago, 23-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | | | | (...) Total side note: I agree with Don, row/column ordering is not what I would have chosen. BUT, it is far easier (IMO) to hand-transform row/column LDraw commands than the equivalent column/row commands (like I've had to do in POV-Ray code). (...) (20 years ago, 23-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Michael Lachmann
|
| | | | | | | | Hi Don, now it's getting interesting ... "Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:HzrwBF.9t2@lugnet.com... <SNIP> (...) I'm actually reading it in as | a b c | | d e f | | g h i | and that is also how I'm writing my (...) (20 years ago, 24-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | | (...) Dibs on Wings and files starting with 1! How hard would it be to support normal, self-referential reflections for patterned parts? So we could map all 973*.dat parts to themselves, with a default mirror. Steve (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | |
| | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) Read the comments at the top of MIRROR.INI in the zip file. I already did a bunch of wings. Only tested one though... Is there something special about files starting with 1, or are you taking an alphabetical approach? Sadly, I created my (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) Ignore the 9 suggestion, I see you're already way ahead of me on flag definition. Don (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | (...) In mirror.ini, you noted: ; NOTE: I started using the Flags to keep track of which parts I checked. ; 0 = not checked. ; 1 = substitute part ; 2 = mirror across XY plane instead of default of ZY plane ; 3 = mirror and rotate a bit. ; 4 = (...) (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | (...) and another two: ; 6 = asymmetric ; 7 = asymmetric, but in a non-significant way Part 108 (a shock absorber spring) is getting a 7. Steve (20 years ago, 23-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | What about a flag for default behavior? I've been coding to ignore ones with default rotations, but there are plenty of parts (especially slopes) that need a (-1 0 0 0 1 0 0 0 1) rotation applied when reflected front-to-back and it would be nice to (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | (...) Never mind. 5 would be the correct value for this, right? (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | |
| | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) I don't think so. 5 is for keeping track of which parts we've looked at, not which ones to ignore when your run your mirror program. Eventually I think we'll remove all the ones marked with a 5 from the MIRROR.INI file. (And that includes the (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | | | (...) IMO there *is* value to knowing that the proper exception matrix is indeed an exception rather than coincidentally the same as the default matrix. If the 5 is not the place for this, there should be a new flag for it. It's especially important (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | | (...) Sure, but you still haven't convinced me there's any difference between a 2x2 brick and a 2x2 slope brick. I must be getting senile in my old age, because I just don't get it. Anyhow, use 55 if it makes you happy. We'll figure out what to do (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | (...) Why? I have a slow PC, and running the mirwiz.exe program is nearly instantaneous. It's a lookup and 2 matrix multiplies per part. If the exception matrix lookup fails, use the default matrix. It would take extra, unneeded code to ignore (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | (...) Why process something as an exception when the default behavior is needed? It's all in what one sees as extra, unneeded code. ;-) Though I just did some timing and I don't see any performance differences between ignoring them and not. (...) (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | | (...) Well, yeah. But it's simpler to process it all -- the only exceptional processing you need is "look for the part in mirror.ini. If not found, use the default settings". With your method, you have to also add "if the matrix looks like MD, then (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | Oops, I missed replying to one point. (...) If you mean (-1 0 0 0 1 0 0 0 1) as the 'default' matrix, my response is: that default matrix works for *any* reflection across any arbitrary plane. If you mean (-1 0 0 0 1 0 0 0 1) as the reflection (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | | (...) Uh, I thought we were refering to it as "Steve's algorithm". Are you having 2nd thoughts? ;^) Enjoy, Don PS. Why am I constantly seeing really long lines in the browser for this thread. It makes things really hard to read when I have to scroll (...) (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | |
| | | | | | | | | Re: Quick way to mirror-image a model? Steve Bliss
|
| | | | | | | | (...) Sorry, I should have said "Don's pseudo-code". ;) (...) I don't know - I'm replying via the web interface, posting with plain text. (20 years ago, 24-Jun-04, to lugnet.cad)
|
| | | | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Carl Nelson
|
| | | | | | (...) Alright, I give up then. I've accomplished my original goal of mirroring a model, and I'm just confusing and frustrating myself and wasting your and Don's time with stupid questions. I've put the newest executable & source code at: (URL) (20 years ago, 25-Jun-04, to lugnet.cad)
|
| | | | | | |
| | | | | | | | Re: Quick way to mirror-image a model? Don Heyse
|
| | | | | | (...) I've put the complete mirror.ini file here for now. (URL) (20 years ago, 2-Jul-04, to lugnet.cad)
|
| | | | | | |
| | | | | | Developing MLCAD plugins? Don Heyse
|
| | | | (...) I forwarded this question to here because I don't know the answer. Apparently there has been some discussion in the past about developing plugins for MLCAD: (URL) there a specification for plugin development? Thanks, Don (20 years ago, 23-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | |
| | | | | | Re: Developing MLCAD plugins? Michael Lachmann
|
| | | | Done, "Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:Hzrprv.14sB@lugnet.com... <SNIP> (...) No sorry, MLCad does not support plugins yet, currently I have a very quick way introducing new generators and pseudo commands by (...) (20 years ago, 24-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | |
| | | | | | Re: Developing MLCAD plugins? Don Heyse
|
| | | | (...) While you're checking, think about this. What if the MLCad generators were reconfigured as some sort of plugins, and the plugin specs were documented? Then everyone could use your generators. You know, weird people like me who are frightened (...) (20 years ago, 24-Jun-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | |
| | | | | | Re: Developing MLCAD plugins? Michael Lachmann
|
| | | | Don, "Don Heyse" <dheyse@hotmail.spam....away.com> schrieb im Newsbeitrag news:Hztzr8.y0t@lugnet.com... <SNIP> (...) That will be documented anyway - sure. But for that feature I have to think even more ... but I have already an idea how that could (...) (20 years ago, 4-Jul-04, to lugnet.cad, lugnet.cad.mlcad)
|
| | | | |