View Full Version : Getting an imported shape into the yellow selection box
Brenton King
08-22-2007, 08:25 PM
If you are trying to import a 3D file into Flexsim it will need to first be in one of our recognized file types, .3ds or .wrl. When you export your shape you will need to make sure it is in the correct location and scale so that it will appear inside of your yellow selection box in Flexsim. (if you don't it could appear clear off of your screen or be to small or large to see.
I recommend that you export using .wrl format and that you scale your object to be 1X1X1 (1X,1Y,1Z). It will squash your object and make it look out of proportion but you will be able to fix that inside of Flexsim.
Now you need to set your shape's location to be .5,.5,.5 (.5X,.5Y,.5Z).
Doing these two steps will put your shape inside of the yellow box, then you can scale it to be the correct size.
AlanZhang
08-24-2007, 05:55 PM
WRL is VRML format. It seems it is not widely used anymore. Besides, Flexsim only support VRML 1.0. Does Flexsim have plan to support later version of VRML such as VRML 2.0 or VRML 97? What software do you use to export 3D file to .wrl? AC3D?
Thanks.
Alan
Anthony Johnson
09-05-2007, 10:44 AM
We use AC3D to create our 3D models. It's a pretty affordable software, maybe $75 per license. Right now there aren't any direct plans to update to vrml 2.0 support as there have only been a few requests for it. Isn't vrml 97 the same as vrml 1.0? We may also add support for the .obj format sometime in the future though.
AlanZhang
09-05-2007, 11:03 AM
VRML97 is a later version of VRML 2.0 with some minor changes. See Floppy's VRML97 Tutorial at http://web3d.vapourtech.com/tutorials/vrml97/en/tut11.html
AlanZhang
09-07-2007, 03:56 PM
...I recommend that you export using .wrl format and that you scale your object to be 1X1X1 (1X,1Y,1Z). It will squash your object and make it look out of proportion but you will be able to fix that inside of Flexsim.
Now you need to set your shape's location to be .5,.5,.5 (.5X,.5Y,.5Z).
Doing these two steps will put your shape inside of the yellow box, then you can scale it to be the correct size.
Today I was trying to import a 3ds object. The imported shape is a little bit off the yellow box. So I tried to adjust the Shape Factors in the Visual tabs of object properties window. By adjusting shape factors, I can make the shape inside and occupy the whole yellow box. Since you recommend adjusting the shape's size and location before it is imported into Flexsim, I would like to know if there is any disadvantage of adjusting shape factors in the Flexsim after the object is imported.
Another question is how do I scale and change shape location after it is exported to a .wrl format.
Thanks very much.
Alan
Brenton King
09-13-2007, 08:43 AM
Alan,
There isn't anything wrong with playing around with the shape factors. It could be annoying if you have to do it 100 times but usually for one shape you should be fine. In fact, that is how all of the older Flexsim Shapes were done.
"Another question is how do I scale and change shape location after it is exported to a .wrl format."
If you are talking about scaling it in Flexsim, that is all done in the properties window of each object. SX, SY, SZ. This will also change the size of the yellow box. For movement independent from the yellow box use the shape factors. Sorry I didn't answer sooner, it didn't notify me that you had posted.
Regards,
Brenton
Flexsim Support
AlanZhang
10-03-2007, 12:48 PM
Brenton,
Thanks for your answer. Sorry I just see the post.
Now I understand that the shape factor is used to adjust the shape independent to the yellow box, while the Position, Rotation, and Size in the Properties Window is to adjust and scale both yellow box and the shape. The yellow box is just like a container holding the shape here.
When I adjust the shape using shape factors, I can make it into yellow box. But I find that it is not easy to make the shape scale right by adjusting SX, SY, and SZ in Properties window. It seems that the X, Y and Z axises in the yellow box is not the same as those in the Global space (X,Y, and Z shows in the view window). Is that right?
For my anther question, actually my question is how to scale the .wrl file before it is imported into the Flexsim. I guess that is what you mean when you say " I recommend that you export using .wrl format and that you scale your object to be 1X1X1 (1X,1Y,1Z)." in your original post. By the way, we just bought AC3D software. So if you use AC3D to do this, I will be able to follow.
Thanks.
Alan
Tom David
10-03-2007, 11:48 PM
Yes Alan, AC3D is the way to go, because it is inexpensive and does what you need (at least for me).
If I want to import a shape into Flexsim I use AC3D to prepare it for import. I use *.wrl (VRML1) in Flexsim.
Under File|Settings in AC3D is a check box 'VRML1 Flexsim mode'. Check this box.
I resize the object to x= 1, y=1, z=1.
I move the object to 0.5, 0.5, 0.5.
If I want that the object uses the color I assign in Flexsim, than I assign material 0 to the whole object.
Select the whole object and set the surface to black. Left bottom corner of AC3D.
Now export this object to VRML1.
Don't be scared if your object now looks wired.
If you import the object to Flexsim (for testing I normally use a Visual Tool with opition Imported 3D Shape) and resize the Visual Tool to the original dimensions of your object, it will look good.
You now can choose the color under Properties.
Sometimes I only want that some parts of the object change the color, that I just give some specific surfaces the material 0.
Now this object is in the yellow box and this was what Brenton was talking about. So the key word here is AC3D ;).
And if you have any questions about AC3D and Flexsim than Brenton is the Guru. He is doing really amazing things with AC3D.
AlanZhang
10-04-2007, 09:41 AM
Thanks Tom. I heard that AC3D has special support for Flexsim. Now I know where it is. I am new to use AC3D. Your tips are very helpful.
Before you export 3D files to VRML1, what 3D files do you typically have? 3DS? In our group, many people use AutoCAD. So I typically have DXF files. Now I have a DXF crane object. I can load it using Visual Tool in Flexsim without any problem (except that I am not able to change crane colors). But when I tried to imported it into AC3D. It does not looks right. And the exported VRML1 file is not right either.
I attached the file. Can you or Brenton take a look to see if you can import the file into the AC3D and export to a good VRML1 file?
Thanks.
Alan
Tom David
10-05-2007, 03:07 AM
Alan,
I loaded the 3Dcrane.dxf into a Visual Tool as 3D Shape. Yes, I can see it, but the handling in Flexsim is very slow and the object is huge.
I imported it in AC3D and you are right, it looks broken.
The only thing I know about *.dxf is, that there are different dxf formats even if people call it a standard. I know that they always make trouble or let me say you are lucky if it works.
So my suggestion is to export from AutoCAD in another format (*.3ds or *.wrl) and try it again. Sometimes I prefer to get *.3ds because than I have still the single objects and can modify some stuff. But I am also happy about *.wrl.
Before using it in Flexsim I always make the object as desribed above to a *.wrl with the position and size and material.
Maybe Brenton can give you an expert view on the whole story.
AlanZhang
10-05-2007, 11:04 AM
Tom,
Thanks for your trying. The problem is that AutoCAD is not able to export to .3ds or .wrl directly. The AutoCAD 2007 that I am using is able to export to the following format:
3D DWF (*.dwf)
Metafile (*.wmf)
ACIS (*.sat)
Lithography (*.stl)
Encapsulated PS (*.eps)
DXX Extract (*.dxx)
Bitmap (*.bmp)
Block (*.dwg)I googled but was not able to find a free plugin to export AutoCAD drawing to .3ds or .wrl. Actually one reason for me to buy AC3D is to convert DWG to 3DS or VRML. But it works not well in this case.
I attached the original DWG file. Maybe Brenton can give it a try?
Thanks,
Alan
Kris Geisberger
10-13-2007, 01:34 PM
Hi Alan, is the version you have LT (a light version)? That is interesting I have AutoCAD 2005 and File > Export > .3ds is still an option. Same with 2006. I performed this action with your crane object and imported into AC3D for you - see attached. The translation algorithm in ACAD is not perfect, I noticed some mistakes on the crane wheels.
Before saving in AC3D I used the Object > Fragement feature such that you can modify the different surfaces independently. Now, before you export to wrl, you should go into Object mode and select all objects and surfaces. Then under the Object menu choose Merge, then Object > Optimize Vertices, then Object > Optimize Surfaces to decrease the wrl file size significantly. This helps to reduce the 'weight' in Flexsim.
Kris
AlanZhang
10-15-2007, 10:19 AM
Thanks Kris. Your AC3D file works great. I can open it and export to wrl. Then in Flexsim, the crane looks good and completely in the yellow box. And thanks for those tips for using AC3D.
The AutoCAD 2007 that I used is not LT version. the about information gives me:
AutoCAD 2007
A.54.0 (UNICODE)
I also searched the web. It seems AutoCAD 2007 does not support exporting to 3ds anymore (What a bad idea!!!). And it creates a lot of inconvenience to end users. See a discussion here: http://discussion.autodesk.com/thread.jspa?threadID=462091. I will keep looking to see if I can find a solution.
Alan
AlanZhang
10-15-2007, 10:51 AM
Found a solution. Autodesk provided a plugin called 3DSOUT command to allow AutoCAD 2007 and later version to export to 3DS. The plugin can be found here:
http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=9481286&linkID=9240618
I tested the command using my crane file. It works fine and the exported 3ds file can be imported into AC3D. The shape looks good although still some minor transformation errors exist.
Alan
Brenton King
04-01-2008, 01:54 PM
Thought this would be another good spot to post this video.
If there are any other videos you would like to see done please ask.
http://www.flexsim.com/support/forum/images/AC3D.gif
AlanZhang
04-03-2008, 08:45 AM
This is good. But the gif image is too small. Do you have a bigger one?
AlanZhang
04-26-2008, 10:28 AM
Hi Brenton,
I have a 3ds file which can be loaded into Flexsim. But if I use AC3D to scale, move, and save the object as a wrl file, it cannot be seen in the Flexsim. All I do is follow your procedure. Could you please check the attached 3ds file and give it a try? Thanks.
Martijn van Oostenbrugge
04-27-2008, 11:09 AM
Hi Alan,
Although I'm not Brenton, I tried it anyway ;). I had no problem in importing it in AC3D, scaling and moving it and export it to a wrl. I've attached the wrl for you. Of course you have to scale back in Flexsim.
Martijn
AlanZhang
04-28-2008, 12:32 AM
Martijn,
Thanks for the try. Actually, after I tried your file, I realized the problem is not the converted wrl file.
I was using the file in the Flowitem Bin. And I clicked on the New Item when I selected the BasicBox. And then I edited the 3D shape in the Properties window. No matter what 3D file I specified, the shape won't be shown and the file won't be saved either. Then I checked the tree. I found it lacks of the shape node under visual node. Then I created the shape node and put the object file path into it. It works.
Maybe this is a known problem for your guys. Since if you click on the New Item when you select the TaskExecuterFlowItem, you won't get the problem. But it should give users at least some message on why it won't work.
Thanks again!
Martijn van Oostenbrugge
04-28-2008, 07:23 AM
I didn't know that was your problem. Nice you figured it out yourself ;). I don't think it is a problem at all, but it is done on purpose. Flowitems are most likely to exist a lot in your model and you want it to be as small as possible. A box doesn't need the visual node. Therefore, it is probably eliminated for the BasixBox. I agree that a message of some kind would be helpful.
Martijn
AlanZhang
04-28-2008, 08:02 PM
Thanks, Martijn. That's exactly what I mean it is not a problem for your guys because you are already familiar with the default Flexsim working mechanism. Just It would be better to be more user friendly.
BTW, I just noticed that you have much long orange and green bars than mine. I guess that is one nice reason to have a longer user name. :p
Brandon Peterson
04-29-2008, 08:43 AM
Guys,
You may want to notice that not all of the flowitems have or don't have shape nodes. The easiest way to tell if the flowitem has one or not is to open the properties window and see if a shape is specified.
If you were to add a new flowitem with the "New Item" button the new flowitem created would have had a shape node.
As a general rule of thumb I would create a new flowitem and wouldn't modify a flowitem unless I positively knew that the flowitem was exactly what I needed. The same rule applies to objects as well. I wouldn't modify a library object in the library tree unless I was quite sure it was exactly what I wanted. I would use the BasicTE or BasicFR instead.
Everything is done for a purpose and there are a lot of subtleties with objects that Flexsim developers have built into the software that aren't and shouldn't need to be explained. The reason for this is that if you want to make a new object an appropriate path has already been created for you.
As always you're free to go off the beaten path but you might end up as just that, beaten.
Good Luck,
Brandon
Phil BoBo
04-29-2008, 11:09 AM
When you hit the New Item button in the Flowitem Bin, it creates a copy of the selected flowitem for you to work with. Alan had the Basic Box selected so the "new item" he got was a copy of the basic box: no shape node.
Jamie Santa Ana
07-24-2009, 08:44 PM
I've done all of the steps mentioned in this post. I created my 3d shape, sized it to 1x1y1z and moved it to location .5x.5y.5z. But when I bring my shape into flexsim, it comes in extra huge with no sign of a yellowbox. I'm not sure what I'm doing wrong. I've attached my shape. Can anyone help me with this?
So it wasn't working on my computer that is running on vista, but I just tried it on my laptop running xp and it worked out just fine. Probably just another vista issue..
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.