STL import caoability?

Next
 From:  Bob (APTIVABOY)
8823.1 
Any chance of adding STL import capabilities to future versions of MOI?

Many thanks,

Bob
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8823.2 In reply to 8823.1 
Hi Bob, it's problematic because STL files only contain triangle mesh geometry. For example something that looks like a sphere in STL is actually made up of many hundreds or thousands of little flat triangle facets. MoI is not designed to use that type of data for modeling, that's why STL is an export only format and not for import.

You would need to use a polygon mesh modeling program to load an STL file, not MoI.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
8823.3 In reply to 8823.1 
Hello Bob,

I have written a STL-Import for the nodeeditor. I'm not sure if the last version was included in my extensions.

Works for ASCII-STL.

Have a nice day
Karsten

p.s.: The same for CSV-Files:-)

EDITED: 14 Feb by KMRQUS

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.4 In reply to 8823.3 
Yes, your Nodeeditor STL-Importer works great (THX for reminding it)

To use a imported STL File with MoI i mostly rebuild the object with the given edges

P.S. is it possible to make a normal plugin-script without Nodeeditor? Can i try?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
8823.5 In reply to 8823.4 
Hello Ralf,

feel free to take the code for a standalone solution. I don't have the time at the Moment - some private Problems - hopefully solved in some month.

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8823.6 
There is actually a standalone script on this thread here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7046.1

But as I wrote above it's not a good idea to import a typical densly triangulated STL file into MoI making a separate trimmed surface for every triangle. NURBS solids are not designed to work with dense faceted data like that and it will be a very heavy and difficult to work with file as a NURBS solid.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.7 In reply to 8823.6 
Hi Michael,
with the new beta v4 on Mac i have several Errors with the script from your link..



BUT:

i just wrote a VERY quick and dirty plugin script with Karstens (KMRQUS) Nodeeditor Code to import STL files into Moi..

So far it works...

I totally agree with you that its not a good idea to work with this in Moi! But often i get a STL file for 3D printing which needs a little tweak. Than i import the STL (until now i used FreeCad for converting it but Karstens import Node does the job much more faster) and than i rebuild it as a real NURBS solid in MoI with the help of the imported edges and dimensions. Its still a lot of handwork but it works fine for me...

Perhaps someone like to add some time for a nice and usefull STL import script...


Ralf:)
looking for moments of inspiration...

Image Attachments:
Size: 134.8 KB, Downloaded: 9 times, Dimensions: 1484x652px
Size: 107.7 KB, Downloaded: 6 times, Dimensions: 1292x586px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.8 In reply to 8823.5 
Your friendly offer will give you 42 Karma points ! So problems will solve faster... ;-)


Ralf:)
looking for moments of inspiration...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8823.9 In reply to 8823.7 
Hi Ralf,

> with the new beta v4 on Mac i have several Errors with the script from your link..

It has a syntax error that used to be tolerated in older MoI versions. It's just a one character fix though:

P_ImportSTL.htm, line 11 - change ending comma to semicolon:

Current:
code:
var x, y, z, //max={ x:-100000, y:-100000, z:-100000 }, min={ x:100000, y:100000, z:100000 };

Fixed:
code:
var x, y, z; //max={ x:-100000, y:-100000, z:-100000 }, min={ x:100000, y:100000, z:100000 };


I don't seem to get the other error using the last .htm file from later in the thread.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.10 In reply to 8823.9 
YES this little ; fixed it..

The most work with rebuilding a STL in MoI is to delete all the unnesseccary edges - actually i only need the outer edges - for example a cube with a hole i need only the 12 outer edges and the 2 circles..
Do you think its possible to make a automatic selection of these? Perhaps with the help of these new crv functions?


Ralf:)
looking for moments of inspiration...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8823.11 In reply to 8823.10 
Hi Ralf,

re:
> Do you think its possible to make a automatic selection of these? Perhaps with the help of these new crv functions?

Some strategic use of selection and joining could help. For example with a cube+hole like this:



Go to the Top view and make a left-to-right window selection like this:



You'll get a selection like this:



Isolate these objects by right-clicking on Edit > Hide so they are the only visible objects:



Use Edit > Join and then select naked edges (http://moi3d.com/forum/index.php?webtag=MOI&msg=6051.2):




It really is a shame to work with data like that though - an STL file like would likely be coming from a CAD program and it's so much better to load in the original CAD data using STEP format for example.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Bob (APTIVABOY)
8823.12 
Great info everyone, thank you!

Where can I get the nodeditor script and how does one install it?

Thank you!

Bob
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.13 In reply to 8823.11 
>>Isolate these objects by right-clicking on Edit > Hide so they are the only visible objects:

I NEVER made a right click on Hide button to isolate... but this does the trick - i get nacked edges

Thanks a lot!

>It really is a shame to work with data like that though - an STL file like would likely be coming from a CAD program and it's so much better to load in the original CAD data using STEP format for example.
YES i agree but in the 3D printing scene often you have only a STL file to work with..

And now i have to right click all the buttons in MoI and see what happens... ;-)


Ralf:)
looking for moments of inspiration...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  r2d3
8823.14 In reply to 8823.12 
The nodeeditor stl import node is one of Karstens extensions you will find it in import.js
Just add it to a nodescene and connect it to a output...


Ralf:)
looking for moments of inspiration...
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8823.15 In reply to 8823.13 
Hi Ralf,

re:
> And now i have to right click all the buttons in MoI and see what happens... ;-)

Well also for the Hide button doing a Ctrl+click does a "Show subset" operation where it will temporarily show the current hidden objects, let you pick one or more of those and then go back to hiding everything other than what you just picked.

A right click on Copy or Paste will do CopyClipboardWithOrigin and PastePart instead of regular copy/paste, that's where you go right into orienting the pasted in part.

A right click on the Save button does "Save As".

A right click on View > Cplane will reset the cplane back to world default.

A right click on the style line in the properties panel when an object is selected will let you edit the style rather than bring up the menu.

And right click inside of a viewport is a shortcut for pushing the "Done" button or will repeat the last command if not in a command.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  r2d3
8823.16 In reply to 8823.15 
THX a lot!
Very usefull right click tricks...
Moi is a never ending box of surprises.. :-)


Ralf:)
looking for moments of inspiration...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All