Resultados 1 al 3 de 3

Creando una carretera ahora en plugins

  1. #1
    Fecha de ingreso
    Oct 2010
    Mensajes
    585

    Exclamation Creando una carretera ahora en plugins

    Les dejo este código como ejemplo :
    Plugin simpleObject Carretera.

    Name:Carretera.

    Classid:#(0x27f6fed4, 0x61c91d2).

    Category:Crear una carretera.
    (.

    Parameters main ut:params.
    (tLength type:#float default:32 ui:spn_length.
    width type:#float default:100 ui:spn_width.

    Thickness type:#float default:2 ui:spn_thickness t tlengthSegs type:#integer default:3 ui:spn_lengthSegs.
    widthSegs type:#integer default:10 ui:spn_widthSegs.
    ).

    Rollout params Parámetros Carretera.
    (tgroup Dimensiones t(.

    Spinner spn_Length Length range:[0,100000,0].

    Spinner spn_width Width range:[0,100000,0].

    Spinner spn_thickness Thickness range:[0.01,100000,1] t) tgroup Segmentos t(.

    Spinner spn_lengthSegs Length Segs range:[1,10,1] type:#integer.

    Spinner spn_widthSegs Width Segs range:[1,10,1] type:#integer .
    ).
    ).

    On buildMesh do.
    (.

    BottomBox = createInstance box width:width length:Length height:thickness lengthSegs:lengthSegs widthSegs:widthSegs.

    Mesh = bottomBox.mesh.
    ).

    Tol create.
    (.

    On mousePoint click do.
    (.

    Case click of.
    (.
    1: nodeTM.translation = gridPoint.
    2: #estop.
    ).
    ).

    On mouseMove click do.
    (.

    Case click of.
    (.
    ---2: (width = abs gridDist.x*2; Length = abs gridDist, y*2).
    ).
    ).
    ).
    )--- end plugins.

    Pero, trato de hacer ahora con un Shape.

    Como el ejemplo que tengo en el tema: script Crear una Carretera y mi etiqueta es 3dsmx5 hasta 3dsmax12.

    Y espero su ayuda Gracias. Un Saludo De Chapolín. ^.^d.
    Última edición por Miguel-Arte-3D-1990; 15-10-2013 a las 03:37

  2. #2
    Fecha de ingreso
    Oct 2010
    Mensajes
    585

    Exclamation Creando una carretera ahora en plugins

    Bueno la idea es, como crear una Line LINEA en un plugin.

    Les dejo este ejemplo.
    1.- tengo que hacer una función para crear una línea.

    En este código :
    Fn LineaEntreDosPuntos pointA pointB =.
    (.

    Linea = SplineShape pos: pointA.

    AddNewSpline línea.

    Addknot línea 1 #corner #line pointA.

    Addknot línea 1 #corner #line pointB.

    UpDateShape línea.

    Linea.
    ).

    Linea = LineaEntreDosPuntos [0,0,0] [100,0,0].
    2.- cambiar box por línea.

    Seria a si.

    On buildMesh do.
    (.

    Bottomlinea = createInstance línea ---- y quitar esto ---> width:width length:Length height:thickness lengthSegs:lengthSegs widthSegs:widthSegs.

    Mesh = bottomlinea, mesh.
    ) --- o a si.

    On buildMesh do.
    (.

    Bottomlinea = createInstance línea = LineaEntreDosPuntos [0,0,0] [100,0,0].

    Mesh = bottomlinea, mesh.
    ) --- o a si.

    On buildMesh do.
    (.

    Bottomlinea = createInstance SplineShape.

    Mesh = bottomlinea, mesh.
    ) --- o a si.

    Alguien me podría resolver la lógica.

    En lugar de crear una caja, que me crea una línea.

    Y espero su ayuda. Gracias. Un Saludo de Chapolín ^.d.
    Última edición por Miguel-Arte-3D-1990; 15-10-2013 a las 04:03

  3. #3
    Fecha de ingreso
    Oct 2010
    Mensajes
    585

    Exclamation Creando una carretera ahora en plugins

    Hola les dejo otro ejemplo, sobre este Código.

    No sé, si estoy resolviendo la función del shape.

    No sé, si estoy bien o dónde está la clavé.

    Para qué me de la función correcta.

    Y espero que me ayuden gracias.

    Código :
    Plugin simpleObject Carretera.

    Name:Carretera.

    Classid:#(0x27f6fed4, 0x61c91d2).

    Category:Crear una carretera.
    (.

    Parameters main ut:params.
    (tLength type:#float default:32 ui:spn_length.
    width type:#float default:100 ui:spn_width.

    Thickness type:#float default:2 ui:spn_thickness t tlengthSegs type:#integer default:3 ui:spn_lengthSegs.
    widthSegs type:#integer default:10 ui:spn_widthSegs.
    ).

    Rollout params Parámetros Carretera.
    (tgroup Dimensiones t(.

    Spinner spn_Length Length range:[0,100000,0].

    Spinner spn_width Width range:[0,100000,0].

    Spinner spn_thickness Thickness range:[0.01,100000,1] t) tgroup Segmentos t(.

    Spinner spn_lengthSegs Length Segs range:[1,10,1] type:#integer.

    Spinner spn_widthSegs Width Segs range:[1,10,1] type:#integer .
    ).
    ).

    On buildMesh do t(.
    -- pb = point().
    -- pb, cross = of.
    -- pb, box = on.
    -- pb, size = 10.
    -- pb, name = b.
    -- para = point().
    -- pa, pues = [0,0,0].
    -- pa, name = a.
    -- .

    Fn LineaEntreDosPuntos pointA pointB = t (t línea = createInstance splineshape pos:pointA t t línea, render_displayRenderMesh = on t línea, thickness = 32 t línea, sides = 8.
    -- scale línea [1,1,0.01].
    -- línea.wirecolor = color 166 166 166.
    -- línea, render_displayRenderSettings = on.
    -- línea, render_renderable = on.
    -- línea, thickness = 32.
    -- línea, sides = 4 t t ---addNewSpline línea.
    -- addknot línea 1 #corner #line pointA.
    -- addknot línea 1 #corner #line pointB.
    -- upDateShape línea.
    -- línea t ) t línea = LineaEntreDosPuntos [0,0,0] [100,0,0].
    --- bottomBox = createInstance box ---idth:width length:Length height:thickness lengthSegs:lengthSegs widthSegs:widthSegs.
    --- mesh = bottomBox.mesh.
    ).

    Tol create.
    (.

    On mousePoint click do.
    (.

    Case click of.
    (.
    1: nodeTM.translation = gridPoint.
    2: #estop.
    ).
    ).

    On mouseMove click do.
    (.

    Case click of.
    (.
    ---2: (width = abs gridDist.x*2; Length = abs gridDist, y*2).
    ).
    ).
    ).
    )--- end plugins ---- Saludos de Chapolín ^^d.

Temas similares

  1. Mad max furia en la carretera
    Por 3dpoder en el foro Cine y TV VFX
    Respuestas: 6
    : 19-10-2020, 16:09
  2. La carretera
    Por lordloki en el foro Cine y TV VFX
    Respuestas: 4
    : 24-09-2009, 12:40
  3. Carretera
    Por cable en el foro Programas de Diseño 3D y CAD
    Respuestas: 2
    : 06-04-2008, 22:25
  4. Carretera
    Por konig en el foro Materiales y Texturizado
    Respuestas: 6
    : 13-12-2006, 13:32
  5. Texturizar carretera
    Por fclaveria en el foro Materiales y Texturizado
    Respuestas: 2
    : 24-01-2005, 17:09