News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

circular arrows

Started by j-wetzel, June 30, 2010, 09:21:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

j-wetzel

I need arrows having circular arcs as shafts.  It is easy enough to fake one by drawing the arc and attaching an arrow with a very short shaft to the end and orienting it carefully, but after a while this becomes tedious.  Any suggestions?
--Jack

accuratesteel

I can't take credit for the macro but I use it daily.

j-wetzel

Thanks, Accuratesteel; but unless I am very mistaken, the same drawing tool is built into v. 20.  The initial arrow menu provides the option to "draw as a curve."

Unfortunately I need something different.  I want to be able to (a) select the arrow type and size, then (b) set the center point for the circular arc that forms the shaft, then (c) set the initial point of that arc, and finally (d) set the terminal point of the arc, i.e., the tip of the arrowhead.  If I knew more about macros I probably could write a macro to do this; but ... .

A favorite joke to lighten the mood:  "What did 0 say to 8?  Nice belt!"
--Jack

paulerens

Hi j-wetzel,
Here a macro that does it

magic

Hi Paul,

I get the below error, when I set the third point of the arc in your macro in DesignCAD 3D MAX v. 20.
It's a kind of magic!




paulerens

Hi Magic,

ma by, select object when created? (Not on)

paulerens

#6
'This macro change the arrow side or place two arrows.
'=======================================================
reset = 0
If Sys(242) = 0 Then
Sys(242) = 1      '242 - Select object when created [0=no, 1=yes].Now select is on magic ,Thanks.
reset = 1
End If
Sys(1027) = 4
Sys(269) = 20      '269 - Number of Arc Segments (V. 16)
                'This function how many segments to create when an arc, ellipse, or circle is created as a plane or line.

Input "Layer number for the arrow ?",lay
>Arc3
{
 <Color 0,75,85
 <Layer [lay]
 
 <Type 1        'Vector arc
 }
GetSelect 1,K
Entity K
count=sys(99)
 Dim x(count)
 Dim y(count)
 Dim z(count)
   for L = 1 to count
     Pointval x(L), y(L), z(L), L
next L
>Erase
{
}
>Arrow
{
 <Color 255,000,000
 <Layer [lay]            '
 
 <Type 12
 <DoubleSided 0
 <CurvedArrow 1
 for L = 1 to count
  <Pointxyz [x(L), y(L), z(L), L]
next L
 }
 >Deselect
 {
 }
 Regen
 Message"Are you satisfied ?"
 If Sys(1028)= 6 Then
 End
 End If
 Input"Change the arrow side(C) or Place two arrows (T) ?",ct$
 If ct$ = "c" or ct$ ="C" Then
 >EraseLast
 {
 }
 >Arrow
{
 <Color 255,000,000
 <Layer [lay]            '
 
 <Type 12
 <DoubleSided 0
 <CurvedArrow 1
 for L = count  to 1 step -1
  <Pointxyz [x(L), y(L), z(L), L]
next L
 }
 >Deselect
 {
 }
 End If
 If ct$ = "t" or ct$ ="T" Then
 >EraseLast
 {
 }
 >Arrow
{
 <Color 255,000,000
 <Layer [lay]            
 <Type 12
 <DoubleSided 1
 <CurvedArrow 1
 for L = count  to 1 step -1
  <Pointxyz [x(L), y(L), z(L), L]
next L
 }
 >Deselect
 {
 }
 End If
 Regen
If reset = 1 Then
Sys(242) = 0  
End If
End

magic

Hi Paul,

Yes, you were right.

And your new macro works fine as well, except if the "Select object is created" is unchecked, when you start, it ought to be unchecked, when you finish.

Also it's called side, not said.

But great job!
It's a kind of magic!




paulerens

Thanks for the English lesson magic!

magic

Hi Paul,

You're welcome. And now your macro works like a dream.

Have a pleasant weekend!
It's a kind of magic!