I am at a customer place and thinking about a logic about the box passing. I am afraid that I have not reached out to an clean solution yet.
Problem statement:
There are two points from where boxes can come on a path. pointA & pointB. All I want is to figure out how to make sure that the boxes do not collide if they come from different paths. Pictorial representation is attached for the problem. I am free to put sensors on the path to know whether box has come or not.
In the image I have attached, there are 3 sensors, s1, s2, s3 which tell me that if there are any boxes in front of them or not.
This is what I have thought of till now. If there is any box in front of s3, stop box at s1 and let box at s3 go. As soon as box at s3 reaches to s2, I start moving box at s1. Please write me if I am not clear on this.
Problem I see is if multiple boxes, say 2 boxes box1 & box2, come together at s3 separated by minor space. In my logic, box1 at s3 would stop the box at s1, which is fine. Along with box1, box2 would also go from s3. Whenever sensor at s2 sees that box1 has reached s2, my logic starts moving box at s1 as well and thus box from s1 and box2 would collide.
How do I make clean logic for this problem so that boxes do not collide.
I know it is difficult to explain. I am very happy to write any clarifications, if needed.
P.S. Tagging C++ since I am coding in C++ for this. Admin, please feel free to add the right tags.
Related
I'm a newbie to mashlab. I brought the bear model as a point cloud, but as you can see there is no point cloud in the neck area. I want to make a mesh that connects the neck and the body, but it doesn't work because the space is too empty. let me know if there is a better way.
*I tried close holes, but it doesn't work..
enter image description here
enter image description here
I am using the rigid body physics option in blender to drop balls (meshes) into a box. Some of the balls miss the box entirely and fall past the box. I want to be able to select just the balls which fall into the box an export them individually to an .stl file, with their global position (after settling in the box).
I think I know how to export the files, but am having trouble on how to select the mesh objects based on their position at a given frame. I am planning to use this for multiple instances, and hence I need help with a way of doing this via scripting using python.
Note: The balls are dropped from a random height and when I select the object, the z position it shows still looks like its initial starting position.
Im new to blender, so any help is greatly appreciated
I did find this elsewhere, you need to use .matrix_world.translation rather than .location to select objects via their locations at a given frame
I often spend hours bringing pictures into PowerPoint templates one by one and trying to customize the way a presentation whose behavior is very different.
If there were a way to randomly select an image from all of the images on a different slide or excel file or folder and have them appear based on the probable weight assigned to them, it would be a huge time saver.
I've seen various methods of having a random object appear, and some of them don't even require a macro, but importing the images is always very time consuming. If anyone knows of a better/faster way to link a folder with a group of images or something along these lines to an object that is randomized, please help.
Importantly, showing a random image from a batch group without customizing the way each image is brought in is the hard part. Adding weight helps, but it could be done by duplicating important images repeatedly.
I'm looking for some advice on how to get started on a project my team is working on internally. The basic situation is this:
We receive PDF's that are 250-500 pages in length. Some of those pages (let's say, 10-15 of them) may have color on them. Of those 10-15 pages, some might need to remain in color. if it is identified that none need to be printed in color, we print in black and white. Otherwise we print color.
Currently we tab through each of those pages to find pages with color. As you can imagine, this is very time consuming. I am looking to build a solution that perhaps will output page numbers (as an example) of pages with color so the end user can simply jump to the page being referenced and make a determination. I am not sure where to start on this and i'm looking for some advice.
What I am ultimately trying to do is to create a grid of images for print that are minor variations of the same thing (different text is all). Looking through online resources I was able to create a script that changes the text and exports all of the images necessary (several hundred). What I am trying to do now is to import all of these images into a new photoshop document and lay them all out in a grid and I can't seem to find any examples of this.
Can anyone point me in the right direction to place a file at a specific coordinate (I'm using CS5 and have the design suite so if there is a way in illustrator to do this quickly...)?
Also, I'm open to other ideas on how to do this (even other programs) easily. It's for labels so the positioning on the sheet has to be pretty precise...
The art layer object has a translate() method that takes delta x and y params. You'll need to open each image, copy it to the target document, get its current location (using artLayer.bounds) and do the math to find the deltas to position it where you want it. Your deltas can be in pixels so you'll get plenty of precision.
Check out your 'JavaScript Scripting Reference' pdf in your Adobe install directory for more details.
Ok I'm marking Anna's response as the answer because though I didn't fully test it, it seems like it should work and answers the original question with jsx. However I'm also leaving my final solution in case anyone else runs across this with the same issue and may prefer this method as well.
What I ended up doing instead is using InDesign. I figured out that it has a grid option that lets you import a number of files and place them all in an equal grid in a single command. This is almost exactly what I was looking for, except that it leaves a small border/margin in between the columns and grids and mine were designed to meet exactly.
I couldn't figure out how to make it not have the border (I have very little experience with InDesign, it may be possible). However I was able to select all my images and scale them uniformly to be the correct size, then I just selected each column and dragged it over to snap to the adjacent column and the same with rows...