SamIWas Posted June 6, 2024 Share Posted June 6, 2024 (edited) I thought I had done this before, but apparently not. So, say I create a group of 3D objects. Some extrudes and some sweeps. I close the group. Now, I need to du0plicate it and flip it on the X axis. I found that HScale3D(obj,0",0",0", -1,0,0) does not work like it does in 2D. And Flip3DObj does not work on groups. Is there any command I'm missing? I'm hoping not to have to duplicate 130 lines of code and add flips to each piece. It's the two headlights in this image. Edited June 6, 2024 by SamIWas Quote Link to comment
Pat Stanford Posted June 6, 2024 Share Posted June 6, 2024 MirrorXY3D? Mirror? MirrorN? Just guessing from Function Ref. Have not tried any of them. Quote Link to comment
MullinRJ Posted June 6, 2024 Share Posted June 6, 2024 Hello @SamIWas, I tested HScale3D(obj, 0, 0, 0, -1, 0, 0), but it only accepts positive scale values. Use: Flip3DObj(H, True); for single 3D objects, where TRUE = Horizontal flip across Y-axis. For Groups of 3D objects, you will have to enter the group and flip each object individually. Here's a sample that works on a very simple test group. Test it thoroughly before you use it on anything of value. PROCEDURE xxx; { Example code: Duplicate a 3D object, or a 3D Group, and flip it across the Y-axis. } { 7 Jun 2024 - Raymond J Mullin } { THIS CODE IS LIGHTLY TESTED. USE ON A DUPLICATE FILE FIRST! } VAR H, H1 :Handle; procedure FlipGroupX(H :Handle); { Flip a group in the X-direction across the Y-axis. } Begin H := FInGroup(H); { H now points inside group } while (H<>nil) do begin Flip3DObj(H, True); H := NextObj(H); end; { while } End; { FlipGroupX } BEGIN H := FSActLayer; H1 := HDuplicate(H, 0, 0); { make duplicate object } SetDSelect(H); { deselect original object } if (GetTypeN(H1) = 11) then FlipGroupX(H1) else Flip3DObj(H1, True); ResetBBox(H1); SysBeep; END; Run(xxx); HTH, Raymond 1 Quote Link to comment
LarryO Posted June 14, 2024 Share Posted June 14, 2024 Does using a symbol allow for flipping? Then convert flipped symbol to group. Quote Link to comment
Recommended Posts
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.