Home › Forums › General Questions › Clone object by HTML input
- This topic has 20 replies, 2 voices, and was last updated 1 year, 5 months ago by
Marko.
-
AuthorPosts
-
2023-09-07 at 9:57 am #66647
Marko
CustomerHello,
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!
2023-09-07 at 5:18 pm #66660kdv
ParticipantPuzzles and JS coding. 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 the meaning at all.
2023-09-08 at 6:07 am #66672Marko
CustomerDear “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.
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 1 year, 5 months ago by
Marko.
Attachments:
You must be logged in to view attached files.2023-09-08 at 6:33 am #66676kdv
ParticipantSee 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 coding. 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 the meaning at all.
2023-09-08 at 6:46 am #66677Marko
CustomerSorry, I’m new to coding and I don’t know how to use “print to console”
My Chrome console don’t show any problems.2023-09-08 at 6:51 am #66678kdv
ParticipantSomething like this. Read variables. All of them must be defined.
Puzzles and JS coding. 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 the meaning at all.
2023-09-08 at 7:19 am #66681kdv
ParticipantBTW, what’s the height of your beam? You are using 5 as an interval. That is, for a second, 5 meters.
Puzzles and JS coding. 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 the meaning at all.
2023-09-08 at 7:24 am #66682Marko
CustomerYes. 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=0I 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.
2023-09-08 at 7:43 am #66685kdv
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 coding. 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 the meaning at all.
2023-09-08 at 7:52 am #66689Marko
CustomerIncredibly!! I’m really blind! :) Works perfectly!
“Ograda” is actually the croatian name for “fence”.You are my savior.
I want buy you a drink :) Send me paypal email.Thank you!!
2023-09-08 at 7:58 am #66690kdv
ParticipantI 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 coding. 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 the meaning at all.
2023-09-08 at 8:04 am #66691Marko
CustomerYou have email.
2023-09-18 at 6:37 am #66889Marko
CustomerHello. 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.
2023-09-18 at 6:48 am #66890kdv
Participantuse an additional loop to clone along another axis inside the first loop
Puzzles and JS coding. 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 the meaning at all.
2023-09-18 at 6:57 am #66891Marko
CustomerIt’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. -
This reply was modified 1 year, 5 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.