²é¿´: 3276  |  »Ø¸´: 3
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

sixulianyi

гæ (³õÈëÎÄ̳)

[ÇóÖú] ÀûÓÃLeditµÄCÓïÑԵĺê³ÌÐò»­ÓàÏÒSÍäÇúÏߣ¬ÄܺÍÈí¼þÁ¬½Óµ«ÊÇ»­²»³öͼ£¡£¡´úÂëÒѸ½ÉÏ ÒÑÓÐ1È˲ÎÓë

ÏëÔÚL-editÀïÃæ»­ÓàÏÒSÍäÇúÏߣ¬¹ÊдÁËÒ»¸öCÓïÑԵĺê³ÌÐò£¬ÔÚLeditÀïÃæÔËÐÐÁË£¬ÄÜÓëÈí¼þÁ¬½Ó£¬ÄÜÏÔʾ¹â±ê×ø±êλÖÃÒÔ¼°µ¯³ö²ÎÊýµÄ¶Ô»°¿ò£¬µ«ÊÇ»­²»³öÇúÏßͼ¡£´úÂëÈçÏÂÃæËùʾ¡£Óï¾äÉϰ´ÕÕÈí¼þµÄ˵Ã÷ÒÔ¼°×Ô´øµÄÀý×Ó¿´ÁËÒ»±éûÓдíÎó£¬ÊµÔÚÕÒ²»³öʲôԭÒò¡££¬ÇóÎÊȺÀïµÄ´óÉñÄÄÀï³ö´íÁË£¡£¡£¡
#include <stdlib.h>
#include <math.h>
#include <ldata.h>

void  SMacro ( void )
{
        /********************************************************************/
        /* ÓàÏÒSÍä */
        /********************************************************************/
        double       Height, Length,  Width, Deltax;
        long           P, Points_Total;
        double       PI = 3.141592654;
        LPoint        Points [ 1002 ];
        LObject      Polygon;
        LCell        Cell_Draw   = LCell_GetVisible( );
        LFile        File_Draw   = LCell_GetFile ( Cell_Draw );
        LPoint       pt = LCursor_GetPosition ( );
        LDialog_MsgBox( LFormat( "( %lf, %lf )", pt.x, pt.y) );
        LDialogItem  Dialog_Items [ 3 ] = { { "Height ", "50.0" },
        {"Length  ",  "1500"},
        { "Width  ", "5.0" } };
        /********************************************************************/

        if(LLayer_Find (File_Draw, "Poly" == NULL)
        {
                LDialog_AlertBox("There is no Poly layer.\nMake sure Poly is in the layer map!";
                return;
        }

        if( LDialog_MultiLineInputBox ( "S Properties", Dialog_Items, 3 ) )
        {
               Height   = atof ( Dialog_Items [ 0 ].value );
                Length   = atof ( Dialog_Items [ 1 ].value );
                Width    = atof ( Dialog_Items [ 3 ].value );
                return 1;
        }
        else
                return 0£»

    Deltax       = 3.0;

        for ( P = 0; P <= Points_Total; P++ )
        {       
            Points [ P ].x = pt.x +Deltax*P;
        Points [ P ].y = pt.y + Height/2*(1-cos(PI*( Deltax*P )/Length));
                Points [ 1002 - P ].x = Points [ P ].x ;
                Points [ 1002 - P ].y = Points [ P ].y +Width ;
        }

        Polygon = LPolygon_New ( Cell_Draw, LLayer_Find ( File_Draw, "Poly" ),
                                                Points, 1002 );

        LCell_SetView ( Cell_Draw, LCell_GetMbb ( Cell_Draw ) );
        LCell_MakeVisible ( Cell_Draw );
        LCell_HomeView ( Cell_Draw );
}

int  UPI_Entry_Point( void )
{
        LMacro_Register("S", "SMacro";
        return 1;
}
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

yuguofang

гæ (³õÈëÎÄ̳)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

ÎÒÊÔÁËһϣ¬¸Ä³ÉÕâÑù×ӾͿÉÒÔÁË
if( !LDialog_MultiLineInputBox ( "S Properties", Dialog_Items, 2 ) )
                 return ;
        //{
  Height   = atof ( Dialog_Items [ 0 ].value );
  Length   = atof ( Dialog_Items [ 1 ].value );
  Width      = atof ( Dialog_Items [ 2].value );
             //   return;
       // }
       // else
            //    return 0;
3Â¥2021-05-18 18:12:26
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 4 ¸ö»Ø´ð

sixulianyi

гæ (³õÈëÎÄ̳)

³ÌÐòÊǸ´ÖÆÕ³ÌùÉÏÈ¥µÄ£¬ÊÇûÓбíÇéµÄ£¬ÄǼ¸¸ö±íÇé²»ÖªµÀÔõô»ØÊ£¬ÇëºöÂÔ
2Â¥2016-06-21 16:06:49
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[»ù½ðÉêÇë] ¹ú×ÔÈ»ÆÀÉóÒâ¼û +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
[»ù½ðÉêÇë] ÎÒ¾ÍÊÇÉêÇëÒ»¸öÃæÉÏÏîÄ¿¶øÒÑ£¬ÕâÆÀÉóÒâ¼ûÊǰ´ÕÕ½ÜÇàµÄÌõ¼þÆÀµÄ°É£¿ +6 gouxfjh 2026-08-28 9/450 2026-08-29 09:59 by jklily
[½Ìʦ֮¼Ò] ÊÛSCIÒ»ÇøT0PÎÄÕ£¬ÎÒ:8.O.55.1.O54,¿ÆÄ¿È«,¿ÉÙ¤¼± +3 ASdOkHsho7FD 2026-08-28 4/200 2026-08-29 09:48 by G6APbkg8SA6w
[˶²©¼ÒÔ°] ÊÛSCIÒ»ÇøÎÄÕ£¬ÎÒ:8.O.55.1.O.54,¿ÆÄ¿ÆëÈ«,¿ÉÙ¤¼± +4 ASdOkHsho7FD 2026-08-28 7/350 2026-08-29 09:38 by G6APbkg8SA6w
[»ù½ðÉêÇë] 2026ÄêÒ¶ÆóËï»ù½ð +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[»ù½ðÉêÇë] Ϊʲô×ÊÖúÊý¸÷´ó¸ßУ¶¼´´Ð¸ߣ¬×Ô¼ºÉêÇëÔõô¾ÍÕâôÄÑ +12 Kittylucky 2026-08-27 13/650 2026-08-29 00:04 by superceng
[»ù½ðÉêÇë] ¹ú×ÔÈ»ÃæÉϸ´ÅÌ~»¶Ó­ÌÖÂÛ (½ð±Ò+15) +13 ÇçÌì¼ÓÓÍ 2026-08-26 14/700 2026-08-28 18:36 by huagongfeihu
[»ù½ðÉêÇë] ϵͳ²é²»µ½ +11 ¶­°Ëǧ 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[»ù½ðÉêÇë] »ù½ðϵͳʲôÄÚÈÝҲûÓÐ 30+4 winsaint 2026-08-27 9/450 2026-08-28 11:06 by maolC
[»ù½ðÉêÇë] ÉêÇëɾ³ý±¾Ìû +6 lyz123lyz 2026-08-27 7/350 2026-08-27 17:31 by Äþ¾²ÖÂÔ¶sy
[»ù½ðÉêÇë] ¿´°åÉÏÕâô¶àÖеģ¬ÓеãÏñ50ÈËȺÀï49¸öÈ˶¼ÊÇÆ­×ÓµÄÄÇÖָоõ¡­¡­ +5 a089 2026-08-26 6/300 2026-08-27 14:05 by jonewore
[ÎÄѧ·¼²ÝÔ°] ÃÎÏë +3 myrtle 2026-08-26 3/150 2026-08-27 10:01 by angelyueyi
[»ù½ðÉêÇë] 2026ÄêµÄ¹ú¼ÒÉç¿Æ»ù½ðÏîĿͨѶÆÀÉóµÄйæÔòÓëж¯Ïò¡¢ÐÂÌôÕ½ +7 process2012 2026-08-23 10/500 2026-08-26 19:23 by hmhminy
[»ù½ðÉêÇë] ³öÀ´ÁË +9 trojank 2026-08-26 9/450 2026-08-26 14:25 by ±¦±´³æ×Ó
[»ù½ðÉêÇë] ¹úºÏÀïÃæÄÜ¿´µ½ÁË +7 Ò»»³Ü°Çï 2026-08-26 7/350 2026-08-26 11:23 by zhaosm1982
[»ù½ðÉêÇë] ¹ú¼ÊºÏ×÷¿É²éÁË£¬ÖÐÁËÃæÉÏ (EPI+1)(½ð±Ò+50) +18 Ldrop2023 2026-08-26 18/900 2026-08-26 11:15 by cmrandy
[»ù½ðÉêÇë] ¹úºÏ¿É²éÁË +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[Ö°³¡ÈËÉú] ѧÉúײ¼û¸¨µ¼Ô±ËÍÍâÂô£¬µÚ¶þÌìÈ«°à¶¼³ÁĬÁË +3 ¾¨ÓãÈÚ½ð_Õã½­_É 2026-08-22 3/150 2026-08-26 09:01 by zzuzxg
[»ù½ðÉêÇë] ijЩ»ú¹¹£¬ÒÔЧÂʵÍΪÈÙ£¬ÒÔЧÂʵÍ×÷Ϊ´æÔڸР+9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
[»ù½ðÉêÇë] ûÓÐÈκÎÏûÏ¢-ÊDz»ÊǾÍÁ¹ÁË +9 ͼÀ²Í¼À² 2026-08-24 10/500 2026-08-25 11:59 by ÄϺ£Ð¡¸ç
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û