[Plugin] Mirror

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Fri Aug 17, 2012 3:24 pm

Seems there is a glitch ?

An arc is drawn up left corner then "Mirrored"

Making a group don't resolve the problem :shock:
when explode mirrored group , arc is exploded!
when explode original group , arc is not exploded! :shock:

Mirror_arc.jpg
0
Last edited by pilou on Thu Jan 31, 2013 9:51 am, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Fri Aug 17, 2012 3:55 pm

This something to do with Sketchup itself.
If the arc/curve is grouped/mirrored with other connected-geometry [that borders a face] then the arc gets exploded !
If you replicate the arc+other_geometry_around_face > group, copy, scale -1, explode... you will find that native Sketchup breaks the arcs too...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby jim smith » Fri Aug 17, 2012 4:06 pm

TIG, thank you for the update
0
"Out of clutter find simplicity,
from discord find harmony,
In the middle of difficulty lies opportunity"
Albert Einstein
User avatar
jim smith 
Premium Member
Premium Member
 

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Fri Aug 17, 2012 4:47 pm

Sketchup breaks the arcs too...

It's a pity! :?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Fri Aug 17, 2012 5:56 pm

So solution is to group the rectangle first! :idea:

With that all the mirrors of the arcs will keep the arcs not explosed! :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Fri Aug 17, 2012 8:40 pm

Yes - it's just the same in Sketchup when it's done manually...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby urgen » Mon Aug 20, 2012 6:35 pm

Pilou wrote:
Sketchup breaks the arcs too...

It's a pity! :?

....Pilow,don"worry. :D make mirror and use plugin nilinies2arc.rb (viewtopic.php?t=21155)...properties of the arc( in Entity Info) must have been restored ;)
0
--pupil forever...------
User avatar
urgen 
 

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Mon Aug 20, 2012 9:30 pm

Don't know this little last one :)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby jeff hammond » Thu Jan 31, 2013 9:15 am

rainy day ideas..

mirror would be a good one for doing what you did to split_to_plane.. where <enter> is Z instead of the 3rd click.. lathe would be another candidate (2nd click when defining the axis)..
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Thu Jan 31, 2013 9:54 am

@Jeff
Sorry don't understand first proposition ...and second proposition! :oops:

mirror would be a good one
: it's that the problem that don't work :)
with 2 or 3 clicks even I split horizontally the rectangle

lathe

?? :oops:

A Copy Rotate works (don't explode the arc) but it's not the mirror function and i must draw some helper lines :)

copyrot.jpg
0
Last edited by pilou on Thu Jan 31, 2013 10:21 am, edited 5 times in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby rv1974 » Thu Jan 31, 2013 10:02 am

I use to render my projects in 3DS Max and my pipeline is to turn all entourage components to the cubes proxies (by Fredo's Ghost plug in), open simplified entourage skp file in Max and then replace
them by another Max script with hi-poly vray proxies.
What is interesting is that the mirrored (at some stage) SU components get wrong Z value in Max.
I just wandering where is the wicked link:
SU itself, mirror.rb, ghostcomponent.rb, exporters\importers? :?
0

rv1974 
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Thu Jan 31, 2013 10:50 am

rv1974 wrote:I use to render my projects in 3DS Max and my pipeline is to turn all entourage components to the cubes proxies (by Fredo's Ghost plug in), open simplified entourage skp file in Max and then replace them by another Max script with hi-poly vray proxies.
What is interesting is that the mirrored (at some stage) SU components get wrong Z value in Max.
I just wandering where is the wicked link:
SU itself, mirror.rb, ghostcomponent.rb, exporters\importers? :?
When you 'mirror' or use 'scale -1' [which is all that mirror really does] the component-instance is flipped [aka 'transformed']; however, inside its definition the geometry still has the original orientation.
When exporting such objects into another format that exporter's code must identify the original geometry and its container's 'transformation', then typically it applies the transformation so it now looks right - some formats have limited 'transformation' abilities, so make everything changed so it looks right perhaps messing with the object's innards while doing this. This then breaks the direct link to the original's transformation, so maybe 'swapping' a component won't adopt the original's transformation...

When you 'mirror' something it's typically about a bounding-box center-point - so is this 'Z difference' you see after swapping related to say half of the object's bounding-box 'height' [actually Z is its 'depth'!] - it might be that the Max script is incorrectly interpreting that point when applying its own transformation - would a fix be for the script to adjust the Z-value as it swaps ?
Are you sure that the paired simple and complex proxies have the exact same bounding-box and insertion point etc - if they don't then the swapping of them can easily get muddled... If you swap and swap back do things reset properly or get worsened ? This could indicate such a state...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby rv1974 » Thu Jan 31, 2013 12:18 pm

may be the attached files would help.
0

rv1974 
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Thu Jan 31, 2013 12:36 pm

So the Max 'swapper' script is misinterpreting the transformation of the imported objects ?
If you swap and re-swap back as you were, are you back or has further wrong-transformation happened ?
Seems to me the issue is with the Max swapper script itself, which is clearly flipping the 'mirrored' versions of swapped pyramids about their centers ??
If you used a non-symmetrical object as the two simple/complex we can better see the extent of the 'flipping' which might be a 'rotation' or a real 'scale -1' ??? try a pyramid placeholder with an offset apex so we can clearly see its transformation, and a more complex version for the 'swap'.
The Z-offset issue should be solved if the script correctly flips these mirrored versions...
I know little about Max scripts.
Have you tried looking for solutions over on their forums...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby rv1974 » Thu Jan 31, 2013 2:04 pm

Wow you helped (even knowing little about max script) me to solve the the issue that was a real pain in the @ss for a very long period.
I tended to blame Sketchup but it appears to be a Soulburn replacer problem.
For all who suffered the same issue, Here is a good one (that respects SU components):
https://www.scriptspot.com/3ds-max/scripts/replacer-0
:fecstatic:
0

rv1974 
 

Re: [Plugin] Mirror v3.8 20120809

Postby jeff hammond » Thu Jan 31, 2013 4:12 pm

Pilou wrote:@Jeff
Sorry don't understand first proposition ...and second proposition! :oops:

it's that the problem that don't work :)
with 2 or 3 clicks even I split horizontally the rectangle


maybe it works out ok with 2D (but even then, i think you still have to define the Z for proper mirror)


?? :oops:

A Copy Rotate works (don't explode the arc) but it's not the mirror function and i must draw some helper lines :)

copyrot.jpg


copy/rotate isn't mirroring it though.. using a rectangle for testing doesn't make that immediately recognizable..
(mirroring an object can very literally be thought of as placing an actual mirror on a line and you'll be left with the original component as well as the one you see in the mirror.. there's no 180º rotating happening )

anyway.. the idea for <return> for Z isn't creating new functionality for the tools.. it just makes some situations a tiny bit easier when you're zoomed in close.. if you want to mirror something along the green axis, you select the object, click on one part of the green axis, click another part of the green axis, then inference along the blue axis for your third point.. if you can push <return> for Z, you'd only click the first and second points then <return> tells it your third click is on a vertical axis..

with lathe, you also have to define the rotation axis.. but if this option were in it and you were rotating perpendicular to the ground, you'd only click once then <enter>
(in a round about way, it's the same thing as holding the shift key in order to lock the protractor to the Z axis then using one click to define a point of rotation)

you can see the same behavior in split_to_plane and cut_to_plane.
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby pilou » Thu Jan 31, 2013 5:13 pm

Yes but the problem was not exactly that the problem was the "explosion" of the arc :)

So my solution to Group the rectangle before draw anything resolve all headache! ;)
Mirror can be used with any restriction and by Magical mood the arc stay safe! :)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby jeff hammond » Thu Jan 31, 2013 5:34 pm

Pilou wrote:Yes but the problem was not exactly that the problem was the "explosion" of the arc :)

So my solution to Group the rectangle before draw anything resolve all headache! ;)
Mirror can be used with any restriction and by Magical mood the arc stay safe! :)


haha.. i think we're talking about two entirely different things.
TIG knows what i'm talking about because i got the idea from him.. it's not my idea, it's his ;)
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby bmike » Sat Feb 02, 2013 1:12 pm

would love to see <enter> or <return> give you the Z. would make life that much nicer when picking and hunting around to mirror an object.
0
User avatar
bmike 
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Sat Feb 02, 2013 3:48 pm

But if you pick two points if gives you a line on the 'plane of mirroring', the third point can be in any direction, provided it's not co-linear with the initial two points: the inference engine makes picking a third point on the plane to make it 'vertical' easy [provided that the initial two points are not already vertically aligned!]... just move the cursor until the rubber-banding turn blue and click the 'plane of mirroring' is now vertical and passing through the initial two points... If you replaced the third mouse click with a <enter> key-press what are the advantages ? you'd probably have to take your hand off the mouse ?? Having the third point replaced by <enter> also screws up the tool as you can mirror in different ways by picking one, two or three points - an <enter> after clicking stops and uses the points so far clicked...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby jeff hammond » Sun Feb 03, 2013 8:18 pm

TIG wrote:But if you pick two points if gives you a line on the 'plane of mirroring', the third point can be in any direction, provided it's not co-linear with the initial two points: the inference engine makes picking a third point on the plane to make it 'vertical' easy [provided that the initial two points are not already vertically aligned!]... just move the cursor until the rubber-banding turn blue and click the 'plane of mirroring' is now vertical and passing through the initial two points... If you replaced the third mouse click with a <enter> key-press what are the advantages ? you'd probably have to take your hand off the mouse ?? Having the third point replaced by <enter> also screws up the tool as you can mirror in different ways by picking one, two or three points - an <enter> after clicking stops and uses the points so far clicked...


yeah.. i hear what you're saying..
the reason i posted in the first place was because i was doing some mirroring in a weirdish situation (in close with other elements nearby) and was having problems getting the Z inference.. so i was setting 1st & 2nd points then zooming out to get the Z.. in which case, id rather of kept the zoom the same then took my hand off the mouse for the <return> key..

generally though, the mirror plugin catches the Z axis very consistently.. maybe a sweeter idea than <return> would be a double-click (or a right-click?) on the 2nd point forces the Z? is that even possible with ruby?


that said, lathe's axis setting is a little more finicky when it comes to setting the second point and i usually end up drawing a line which defines the rotation axis then snapping to it's end points.. (there's a little box the follows the cursor and you have to click inside of it.. even if it's showing you you're locked to the Z axis, you still have to click in the little box as well)


[EDIT]- oh.. also.. i wasn't suggesting _replacing_ the third click with <enter>... the third click is still necessary in a lot of situations.. i was just thinking IF the <enter> is pressed after the 2nd click then it will go on the Z.. but you're still able to do a 3rd click instead if you need another plane that isn't vertical
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby bmike » Sun Feb 03, 2013 10:22 pm

yes, you still need to keep the third click, but if there was an 'option' click or something that simply meant Z on the last point, it would be sweet.

thats the way the mirror works in auto cad, if i remember. you can pick three points, or 2 with a right click or enter to finish the command.
0
User avatar
bmike 
 

Re: [Plugin] Mirror v3.8 20120809

Postby photon2 » Sat Feb 09, 2013 5:48 pm

Wow great plugin, Thanks!
0

photon2 
 

Re: [Plugin] Mirror v3.8 20120809

Postby function » Sun Apr 28, 2013 10:35 pm

is there a way to turn off the prompt at the end of the command, so it never erases original geometry?
0

function 
 

Re: [Plugin] Mirror v3.8 20120809

Postby mitcorb » Sun Apr 28, 2013 10:54 pm

There probably is. You would have to study the Ruby code and maybe comment out the line(s) that generates it. Conceptually, this would be simple. But I will bet that while you comment out one thing, you might "punch a hole in the bottom of the boat". The author could probably point you to it.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Sun Apr 28, 2013 11:01 pm

function wrote:is there a way to turn off the prompt at the end of the command, so it never erases original geometry?
You can edit the code so it does whatever you want...
The closing code that asks the question and makes the erase is easily disabled with a leading #
Code: Select all
if UI.messagebox("Erase Original Selection ? ",MB_YESNO,"")==6 ### 6=YES 7=NO
            copy_group.erase! if copy_group.valid?       
         else ### NO
            copy_group.explode if copy_group.valid?
           @faces=[]
           ents.each{|e|@faces << e if e.valid? && e.class==Sketchup::Face}
         self.gluer(sents)
         @ss.clear
            sents.each{|e|@ss.add(e) if e.valid?}
       end#if
becomes
Code: Select all
#if UI.messagebox("Erase Original Selection ? ",MB_YESNO,"")==6 ### 6=YES 7=NO
            #copy_group.erase! if copy_group.valid?       
         #else ### NO
            copy_group.explode if copy_group.valid?
           @faces=[]
           ents.each{|e|@faces << e if e.valid? && e.class==Sketchup::Face}
         self.gluer(sents)
         @ss.clear
            sents.each{|e|@ss.add(e) if e.valid?}
       #end#if
BUT if you want to Mirror and NOT keep the original selected object[s] then how would you do it ?
Clicking on Yes/No [or just pressing the Y or the N key] is hardly a hardship ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby Krisidious » Mon Apr 29, 2013 12:14 am

I never use the delete afterwards either. Mirror is normally my symmetry tool. One of the most necessary tools in computer aided architectural drafting in my opinion. The dialog is not a hardship. But I will probably disable it. When I need to remove a previously mirrored object I'll just delete it. I would say that the delete feature is more needed than not. It's quite traditional in the sense of autocad.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Mirror v3.8 20120809

Postby TIG » Mon Apr 29, 2013 8:38 am

@Kris

You are right - I added that final dialog to make the Mirror tool match most CAD applications, which will prompt you after doing the Mirror to Erase/Keep the original selection.
Feel free to customize it as you will :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Mirror v3.8 20120809

Postby bmike » Mon Apr 29, 2013 11:49 am

Krisidious wrote:I never use the delete afterwards either. Mirror is normally my symmetry tool. One of the most necessary tools in computer aided architectural drafting in my opinion. The dialog is not a hardship. But I will probably disable it. When I need to remove a previously mirrored object I'll just delete it. I would say that the delete feature is more needed than not. It's quite traditional in the sense of autocad.



Agree with this... maybe 1 in 10 do I delete the object.
0
User avatar
bmike 
 

Re: [Plugin] Mirror v3.8 20120809

Postby function » Mon Apr 29, 2013 6:52 pm

Thanks for showing where to comment out, I was blowing it up dissecting it!
0

function 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: fredo6, massimo, nabil2k6 and 8 guests

Visit our sponsors: