We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Clone object by HTML input

Home Forums General Questions Clone object by HTML input

Tagged: ,

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #66647
    Marko
    Customer

    Hello,

    how to clone object acording to input value on external html?

    For example, if I have beam
    (dimensions for example: width: 0,1m; length: 1m; height 0,5m)
    i want clone that beam specified by inserted number (html input id=”beamNumber”)
    upon “z” os, (by beam heigth).

    After that – It must also be possible to define the distance between cloned objects in the second “input” window. (html input id=”distanceClone”). So we can specify the spacing value between the cloned objects.

    Here is similar “input” example from forum but no puzzle to help: https://sandbox.soft8soft.com/product/drink-variable/

    I would be grateful if someone could give me an example via a puzzle of how to arrange it.

    Thank you!

    • This topic was modified 7 months, 3 weeks ago by Marko.
    • This topic was modified 7 months, 3 weeks ago by Marko.
    • This topic was modified 7 months, 3 weeks ago by Marko.
    #66660
    kdv
    Participant

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66672
    Marko
    Customer

    Dear “kdv”,

    thank you very much for your effort. Unfortunately, it doesn’t work for me. I did everything like you but nothing happens. I switched the “input” elements inside the Iframe, (otherwise the “in parent doc” check box must be checked), but even then it doesn’t work. I tried some other combinations with this but it doesn’t work. :unsure:

    I’m attaching a picture where you can see the html code, so maybe I didn’t define something well. It would be good if you could put your project in “zip” so I can compare.

    In any case, many thanks for your time and help.

    • This reply was modified 7 months, 3 weeks ago by Marko.
    Attachments:
    You must be logged in to view attached files.
    #66676
    kdv
    Participant

    See the console log first. Use the print to console puzzle for debugging to monitor every step. Do not be a blind coder, use debugging.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66677
    Marko
    Customer

    Sorry, I’m new to coding and I don’t know how to use “print to console” :unsure:
    My Chrome console don’t show any problems.

    #66678
    kdv
    Participant

    Something like this. Read variables. All of them must be defined.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66681
    kdv
    Participant

    BTW, what’s the height of your beam? You are using 5 as an interval. That is, for a second, 5 meters.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66682
    Marko
    Customer

    Yes. I’s so long. This is only example, original will be similar.
    Btw: In link is my project so you can export in your applications folder.
    https://www.dropbox.com/scl/fi/p3vaigcmoxmw1i4ea4h8w/Ograda.rar?rlkey=ml0sucs0swz3h66wu7cc6ko0m&dl=0

    I wouldn’t take more of your time, I’m sending this if you’re also interested in how to make it.

    Thank you for all.

    • This reply was modified 7 months, 3 weeks ago by Marko.
    • This reply was modified 7 months, 3 weeks ago by Marko.
    #66685
    kdv
    Participant

    Ограда? Для огорода? )))

    Here’s you mistake. There is no element with the class name submit_button in your html file.

    Should be this way

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66689
    Marko
    Customer

    Incredibly!! I’m really blind! :) Works perfectly!
    “Ograda” is actually the croatian name for “fence”.

    You are my savior. :yahoo: :yahoo:
    I want buy you a drink :) Send me paypal email.

    Thank you!!

    #66690
    kdv
    Participant

    I want buy you a drink :) Send me paypal email.

    Contact me via e-mail kdv [at] izh [dot] com and I’ll send you PP account.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66691
    Marko
    Customer

    You have email. :good:

    #66889
    Marko
    Customer

    Hello. One additional question. Is it possible to clone the object according to the Z and Y axes? Or how to simulate the cloning of clones? I know that you cannot clone a group of objects, but I need to be able to clone the same object upwards and to the right.

    #66890
    kdv
    Participant

    use an additional loop to clone along another axis inside the first loop

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #66891
    Marko
    Customer

    It’s not that simple beacuse it’s the same project where I have the “input” of default parameters. If I insert a loop in that part, only the bottom row along the Y axis is cloned, but not the Z axis.
    What I need to get is this from the attachment.

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.