Position Component on the fly

Forum Forums Visual Components 4.0 Component Modeling Position Component on the fly

This topic contains 4 replies, has 3 voices, and was last updated by zesty zesty 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14318
    Avatar
    vcnoob
    Participant

    Hi there,

    I have a requirement of placing components in the 3D world on the fly. For example, in the picture below I have placed the lathe at coordinates 0,0,0.

     

    deffault coordinats at 0,0,0

     

    However, I would like to change that frame in the lathe that positions it at 0,0,0. Say for instance I want one of the corners (and not the midpoint of the front side) of the lathe at 0,0,0. How can that be achieved?

    #14320
    Keke
    Keke
    Moderator

    Hi,

    You can use Move/Snap origin tools to change Component’s origin. Check the attached video for a quick tutorial on those tools.

    -k

    Attachments:
    You must be logged in to view attached files.
    #14323
    Avatar
    vcnoob
    Participant

    Thanks, that works 😀

    #14325
    Avatar
    vcnoob
    Participant

    Just adding to this, is it possible to add components to the 3D world from the eCatalog, once the simulation is running, using the VCID, component name, etc.? I currently have the component hidden that I clone and make visible during runtime and am not a huge fan of this approach.

    #14337
    zesty
    zesty
    Moderator

    Be aware that loading a component triggers a reset of simulation. For example, if you run simulation, and then drag and drop a component from eCat to 3D world the simulation will automatically reset.

    You might already know this ==> A Component Creator behavior can be used to add components during simulation. For example, feeders in the eCat can use either URI or vcid:<vcid of component> to generate a component in 3D world during runtime.

    Modifying the URI of a component creator during runtime…

    • The way a Works Component adds new components is one approach.
    • Another way is to do what an Advanced Feeder does where you have a component creator reserved for each type of component you want to add, which in this case is three creators for three different components.
    • Since this is API thread, consider having a dictionary in your script that contains the vcid values of the components you want to add, which is the approach used by the Shape Feeder in eCat.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.