3D Framework
Overview
Framework Customer Story
CIMdata e-Book
MBD Utilities
Validate
Revision
View/Convert
Customer Stories
CAD Data Risks Whitepaper
Focus: Aerospace
KeyCreator CAD
Meet KeyCreator
What Is Direct Modeling
KeyCreator Reviews
KeyCreator Customer Stories
Focus: Drafting
Schools & Students
CKD Viewer
About
Company
International Resellers
All Customer Stories
Referral Program
Partners
News
Blog
Contact
Store
Revision/Validate
View/Convert
KeyCreator CAD
Shopping Cart
Support
Login
Software
Users
Submit Request
Remote Assist
Forum
Kubotek University
Help
Kubotek Forum
KeyCreator CAD & CKD Viewer
Technical discussion of CAD/CAM and integrated partner products
Customer Forum
>
KeyCreator CAD & CKD Viewer
>
Mirror to all quadrants
View modes:
View mode
Threaded
Flat - newest to oldest
Flat - oldest to newest
Advanced member
Hans_Winkler
-
2/13/2019 3:05:33 PM
Mirror to all quadrants
Hello everyone,
below is KXL code to mirror copy selected entities to the other three quadrants in one step.
Program flow:
Select entities to be mirrored, indicate mirror position, done!
// beginning of code
:START
MaskEntity 0
GENSEL "Select Entities to be mirrored to all quadrants...Press ESC to Quit", nNumSel, 0, 1, 0, 0, 0, 0
if (@key == -3)
EXIT
if (@key == -2)
EXIT
CLEAR aGenSelEnts, aGenSelEnts2
GETSELECTED aGenSelEnts
:INDICATE_POS
INT intDefault
if (intDefault == 0)
intDefault = 1
GETPOS "Indicate the mirror position... ", intDefault
if (@key == -3)
EXIT
if (@key == -2)
goto START
intDefault = @key
CLEAR adPlane
DOUBLE adPlane[0]
ARRAY adPlane[3] = {@xworld, @yworld, @zworld}
// mirror horizontally
XFormMirror 1, aGenSelEnts, 2, adPlane, , , aGenSelEnts2
// add the newly created entities to the selected entity array
HAPPEND aGenSelEnts, aGenSelEnts2
// mirror vertically
XFormMirror 1, aGenSelEnts, 1, adPlane, ,
NoteState
goto START
// end of code
Hans
Reply
|
Quote
|
Subscribe to post
1
Login