CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-09-2015, 06:05 AM
Maximus172 Maximus172 is offline
Registered User
 
Join Date: May 2007
Location: France
Posts: 52
Circular slot in Modeling

Hi,

I did a macro doing circular slot in ME10 and would like to do similar in LISP for Modeling.

ME10
Code:
 
DEFINE circular_slot
LOCAL P1
LOCAL P2
LOCAL B
LOCAL D
LOCAL V
LOCAL R
LET B 5
LET D 20
LINETYPE
SOLID
COLOR
WHITE Cr
READ NUMBER 'Angle ± ' DEFAULT B B
READ NUMBER 'Diameter' DEFAULT D D
READ PNT 'Center' P1
LOOP
READ PNT 'Position of slot' P2
 
LINETYPE
    DASH_CENTER
    COLOR
    YELLOW
LET V (ROT (P2 - P1) 0)
LET V1 (ROT(V) B)
LET V2 (ROT(V) (-B))
LET V11 (ROT(V) (2*B))
LET V12 (ROT(V) (-2*B))
LET V13 (ROT (P2 - P1) 0)
LET V13 (V13/(LEN (V13)))
LET V13 (V13*(D/2))
LINE TWO_PTS P1 P2
ARC THREE_PTS (V11+P1) (V12+P1) P2
    LINETYPE
    SOLID
    COLOR
    WHITE Cr
LET V5 (V1/(LEN(V1)))
LET V5 (V5*(-D/2))
ARC DIAMETER (P1+(V1-V5)) (P1+(V1+V5))
LET V6 (V2/(LEN(V2)))
LET V6 (V6*(-D/2))
ARC DIAMETER (P1+(V2+V6)) (P1+(V2-V6))
LET V (V/(LEN(V)))
LET V (V*(-D/2))
ARC THREE_PTS (P1+(V1-V5)) (P1+(V2-V6)) (P2-V)
ARC THREE_PTS (P1+(V1+V5)) (P1+(V2+V6)) (P2+V)
END_LOOP
END_DEFINE
I started but have problem with vectors

Could you help me ?

Thanks
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:18 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.