SolidWorks Exporter

Announcements, information, requests and support regarding other exporters and general/new exporters
Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Sun Jul 29, 2007 10:06 am

yup please post it :D also does your sketchup importer work for the free version? I would be interested in that too. :wink: ( if you made a link before it didnt.. :roll: )

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Sun Jul 29, 2007 11:04 am

not sure about the obj importer with the free version but i'll post.
please let me know.

remember you still need to export from an assembly. it dosn't matter where you put macro and you don't have to make a button to run it. it outputs the obj to the same folder your assembly is saved in.

with the obj importer i find the mesh import option works better, other than that i see no difference. once imported select the new group, go to soften edges and select soften coplanar.
Attachments
SW_Obj_Export.zip
(156.89 KiB) Downloaded 370 times
Sketchup_obj_import.zip
(1.39 KiB) Downloaded 318 times

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Sun Jul 29, 2007 11:45 am

jeffr, i hope this is ok with you i guess i should've asked before posting parts of your code.

by the way have you considered the select by material macro for SW this would enable the easy selection of similiar material geometry so it could be saved as a seperate part, then these seperate parts could be re-assembled in a assembly and exported as obj. then it would be easy for re-texturing in a modeling app.

P.S i noticed the obj export doesn't export surfaces, any way to include these?

jeffr
Posts: 120
Joined: Sun Jan 28, 2007 2:08 pm

Post by jeffr » Sun Jul 29, 2007 12:13 pm

No problem about the obj export.

I 'll have to check out the macro. Sounds interesting.
P.S i noticed the obj export doesn't export surfaces, any way to include these?
Don't think I can get any information form SW to enable anything but a mesh. ...but I'm far from being an expert with this stuff.

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Sun Jul 29, 2007 1:11 pm

check it out? hell, you wrote it. i just scaled it down a bit. i'm not half bad when it comes to cut & paste programming. :lol:

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Sun Jul 29, 2007 8:38 pm

@xrok1
I tried the importer with free sketchup on various obj files from various sources and it works using the mesh option (although its definitely v. slow on large models) however for some meshes there are a number of holes in the result...in some cases a great number.
when I try to create a face it tells me they are not planar..I guess there is a difference in precision between applications. :?
the other import option seems to hang or perhaps it is just extraordinarily slow? so far using vrml and blender is getting better results for me.
see attach for a successful import of a rough laser scan of my phone I made using DAVID laserscanner. this took 5 mins to open and was 37,000 faces...:roll: but some of my stuff like the motorbike has over 500,000 and one or two have been1.5 million so dunno...
the SW obj exporter would not work for me. I tried making a button for it as well but same..unless I am doing something completely wrong...
Attachments
chopper.jpg
chopper.jpg (109.16 KiB) Viewed 8765 times
obj import.JPG
obj import.JPG (44.11 KiB) Viewed 8771 times
Last edited by Big Fan on Mon Jul 30, 2007 9:53 am, edited 1 time in total.

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Mon Jul 30, 2007 8:26 am

did you get an error message when you ran the exporter?
make sure you're exporting from an assembly.
the assembly has to be saved.
the .obj will be created in the same place the assembly file was saved.

Big Fan
Posts: 745
Joined: Tue Oct 17, 2006 9:37 am
Location: Nelson NZ

Post by Big Fan » Mon Jul 30, 2007 11:17 am

still nothing
opened a small assy, ran the macro, and nothing. it looked like something was going on for about 1-2 secs but there is no file output anywhere and I dont think it ran long enough to do anything anyway :?
perhaps the API changed in 06
anyway dont worry about it I have my script it'll do :wink:

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Mon Jul 30, 2007 11:20 am

(SW)it is very quick it only takes a couple of seconds for me to export quite complex stuff.
make sure and check the folder where the assembly was saved?
note the exporter doesn't work with surfaces, and exports in inches.
thats about all i can think of to try.




(sketchup)this is an exerpt from the script:

# Adds sub-menu "Import OBJ" under the Plugins menu.
#
# ** THIS CAN TAKE A LONG TIME TO LOAD THE FILES **
#
# Note: Some .obj files have a very small scale and faces may not
# be created in such cases.
#

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Thu Aug 02, 2007 12:10 pm

jeffr,
hey check this out! its a obj exporter with material support. i can't get it to work by i'm sure you can.

let me know.

http://swapi.wordpress.com/2007/03/25/objmtl-exporter/

jeffr
Posts: 120
Joined: Sun Jan 28, 2007 2:08 pm

Post by jeffr » Thu Aug 02, 2007 12:22 pm

That's actually the script I used to learn how to export obj files in the first place :D
Not sure if having an obj materials file exported at the same time would make any difference.

I have got the script set up to use the SW settings to make a material (not uploaded yet). I haven't finished getting all the material settings in yet.

I also added a couple buttons. One to export just the igs scene file and another to export only the obj file. These are in addition to the button that exports everything and renders.

The problem I'm encountering at the moment is that Indigo 0.8 and 0.9 both choke on large files. I have an epson robot model that I try rendering and it just can't do it. :( I've tested the obj in a different renderer (you know which one) and it takes it no problem so I know the files ok. :?: :?: :?:

P.S. oh yeh. The original script wouldn't work for me either. It took some changes to get it functioning.

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Thu Aug 02, 2007 12:33 pm

thats cool i can't wait to try it.

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Thu Aug 02, 2007 1:44 pm

by the way how do i declare, then access an array for macros?

i can't seem to find an example or i'm just being dense.

jeffr
Posts: 120
Joined: Sun Jan 28, 2007 2:08 pm

Post by jeffr » Thu Aug 02, 2007 3:11 pm

dim AnArray as variant
.....
a = AnArray(0)
b = AnArray(1)
....

User avatar
xrok1
Posts: 287
Joined: Wed Jun 13, 2007 11:26 am

Post by xrok1 » Thu Aug 02, 2007 3:22 pm

thankyou!

Post Reply
102 posts

Who is online

Users browsing this forum: No registered users and 16 guests