Could anybody write the subject please?
Something like Autocad's Mirror3d (Sketchup has similar plugin too)
*3 mouse clicks would define a mirror plane
Thanks in advance
Forum topic · Scripts Wanted
By 1rv · 2017-08-22
Could anybody write the subject please?
Something like Autocad's Mirror3d (Sketchup has similar plugin too)
*3 mouse clicks would define a mirror plane
Thanks in advance
Comments (11)
Comment policy
Symmetry instead??
Thanks Jahman,
I've tried to modify the script using "Symmetry" instead "mirror" modifier but does'n really work...
can you please tell me how can I do it?
Many thanks
Alessandro
.
just change mirror modifier properties with corresponding symmetry modifier properties
if you don't know what properties to change select object with symmetry mod and
run show $.modifiers[1]
thanks for your reply
this is what I did... and, sorry but I'm not so good in scripting :)
(
tool pick3points (
local p1,p2,p3
on mousePoint clickno do (
case clickno of (
1: p1 = worldpoint
3: p2 = worldPoint
4: (
p3 = worldPoint
stopTool pick3points
#( p1, p2, p3 )
)
default:()
)
)
on mouseMove clickno do redrawViews()
on mouseAbort val do (
stopTool pick3points
undefined
)
)
if selection.count > 0 do (
pts = starttool pick3points
if pts != undefined do (
norm = normalize (cross (pts[2] - pts[1]) (pts[3] - pts[1]))
center = (pts[1] + pts[2] + pts[3]) / 3.0
for s in selection do (
try (
addModifier s (m = Symmetry())
m.Symmetry_axis = 1
m.Symmetry_flip = boolean
m.Symmetry_slice = 1
m.Symmetry_weld = (Weld_Seam) : 0
m.Symmetry_threshold = 0.1
)catch()
)
)
)
)
.
that's what props these two modifier have
mirror:Mirror
.copy : boolean
.offset (Mirror_Offset) : float
.mirror_axis : integer
.Mirror_Center : transform
symmetry:Symmetry
.axis : integer
.flip : boolean
.slice : integer
.weld (Weld_Seam) : integer
.threshold : float
.Mirror : transform
replacing Mirror_Center with Mirror should be enough I think
Sorry Jahaman, but I'm really struggling to understand... for me is like another language! :D
I would be grateful if you can show me how to modify the script...
Thank you very much!
_
Thank you very much!! :)
Miauu, could you please add 'keep original' option?
and there's a bug: oddly the script mirrors ALL instances (not only the ones are preselected)
Thank you Miauu! Please check PM.
_
.
I will.