Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 9th December 2013, 11:21 PM   #1
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Plug-in features for 3-d print modeling

Lately I've been thinking about some features it would be great to have in AC3D to help in preparing models for 3D printing:
  • Better extrude by normal. I roughed some math in pseudo code on this thread that keeps the new surface parallel to the old surface so the extrusion distance is more exact.
  • Water tight test. I believe ensuring every edge is shared by exactly two edges is a simple test of water tightness. Perhaps the plug-in could change leaky surfaces to a specified material. A brief look through the SDK makes me think this is already 95% done in AC3D.
  • Consistent normals. Once we've achieved every edge being shared by exactly (one or) two vertexes, I think if we test the edges to ensure one goes from V0->V1 and the other goes from V1->V0 we can know the normals are consistent.

I am hoping to gain some free time in the near future to work on these things. If someone would like to step-up to mentor my on the internals of AC3D, that would be great.

There are also some things I don't have an idea how to solve:
  • Self-intersection test. Testing to make sure no surfaces intersect each other.
  • Wall thickness test. The 3D print service I've been using has minimum required wall thicknesses.
  • Object volume. The 3D print service I've been using also charges by the cubic centimeter, so it would be nice to figure out how much a model would cost before I upload it.
jentron is offline   Reply With Quote
Old 14th December 2013, 02:04 PM   #2
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Plug-in features for 3-d print modeling

Is it possible to switch selection modes from C++? I don't see a prototype in the SDK header but see a few candidate functions in the binary:
  • set_new_select_mode_ui
  • set_new_select_mode
  • add_undoable_change_select_mode
  • set_select_mode_ui %s
  • set_select_mode

I assume I should do something like:
add_undoable_change_select_mode("My Plugin thing");
set_select_mode(SELECT_SURFACE);

But I don't know what the prototype should look like or which of the 4 sets is the 'best' to use?

Thanks,

Ron

(Extrude by normal switches to surface mode and leaves the new surfaces selected. I would like to emulate that. Also, in the watertightness plug-in I would like to switch to surface mode and leave any "bad" surfaces selected.)

Last edited by jentron; 14th December 2013 at 02:06 PM.
jentron is offline   Reply With Quote
Old 24th December 2013, 05:04 AM   #3
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Plug-in features for 3-d print modeling

You should probably use this one:

Prototype void add_undoable_change_select_mode(int newmode, char *undotext) // remembers selection and changes to new mode



Quote:
Originally Posted by jentron View Post
Is it possible to switch selection modes from C++? I don't see a prototype in the SDK header but see a few candidate functions in the binary:
  • set_new_select_mode_ui
  • set_new_select_mode
  • add_undoable_change_select_mode
  • set_select_mode_ui %s
  • set_select_mode
I assume I should do something like:
add_undoable_change_select_mode("My Plugin thing");
set_select_mode(SELECT_SURFACE);

But I don't know what the prototype should look like or which of the 4 sets is the 'best' to use?

Thanks,

Ron

(Extrude by normal switches to surface mode and leaves the new surfaces selected. I would like to emulate that. Also, in the watertightness plug-in I would like to switch to surface mode and leave any "bad" surfaces selected.)
Andy is offline   Reply With Quote
Old 24th December 2013, 10:51 AM   #4
Edymnion
Senior Member
Professional user
 
Edymnion's Avatar
 
Join Date: Aug 2005
Posts: 203
Default Re: Plug-in features for 3-d print modeling

Having a plugin that could essentially smoke test a mesh to see if it were ready for 3D printing would definitely be something I'd be interested in.

Something that could determine if a mesh was water tight and then automatically ensure that all of the surfaces were facing out correctly would be very useful indeed.
__________________
It is by caffeine alone that I set my mind in motion. It is by the syrup of cola that thoughts acquire speed, the ears acquire ringing, the ringing becomes a warning. It is by caffeine alone that I set my mind into motion.
Edymnion is offline   Reply With Quote
Old 27th December 2013, 08:02 PM   #5
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Plug-in features for 3-d print modeling

Edymnion,

I have a plug-in now that selects leaky surfaces. When I ran it on the Tardis model you uploaded it pointed out several leaky edges:

The dome light had a few "extra surfaces." I know Shapeways.com doesn't like those.
The right side vertical panels had a vertex that didn't connect to the horizontal panel.
The handles didn't have surfaces on their rears.

If you'd like a copy of the source code, let me know.

Ron
Attached Thumbnails
Click image for larger version

Name:	tardis-1.jpg
Views:	310
Size:	73.2 KB
ID:	2949  

jentron is offline   Reply With Quote
Old 28th December 2013, 02:55 PM   #6
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Plug-in features for 3-d print modeling

Sounds great - Yes please!
Andy is offline   Reply With Quote
Old 28th December 2013, 04:19 PM   #7
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Plug-in features for 3-d print modeling

https://gitorious.org/ac3d-plugins/watertight

Includes watertight.cpp and a Linux makefile. With thanks to Dennis Hawthorne for selcon.
jentron is offline   Reply With Quote
Old 4th January 2014, 11:25 PM   #8
Edymnion
Senior Member
Professional user
 
Edymnion's Avatar
 
Join Date: Aug 2005
Posts: 203
Default Re: Plug-in features for 3-d print modeling

Excellent, gratci!
__________________
It is by caffeine alone that I set my mind in motion. It is by the syrup of cola that thoughts acquire speed, the ears acquire ringing, the ringing becomes a warning. It is by caffeine alone that I set my mind into motion.
Edymnion is offline   Reply With Quote
Old 28th February 2014, 10:11 AM   #9
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Plug-in features for 3-d print modeling

Andy wrote:
"AC3D 7.2 also includes Ron Jensen's plugin for checking the integrity of an object prior to 3D printing."

I guess I'm (in)famous now.
jentron is offline   Reply With Quote
Old 10th March 2014, 12:33 PM   #10
Edymnion
Senior Member
Professional user
 
Edymnion's Avatar
 
Join Date: Aug 2005
Posts: 203
Default Re: Plug-in features for 3-d print modeling

Been using this one a lot with my latest project. If for nothing else, its awesome at finding places where I extruded a surface and it left behind a wall inside the model that I didn't see (which proceeds to wreak havoc when subdividing).
__________________
It is by caffeine alone that I set my mind in motion. It is by the syrup of cola that thoughts acquire speed, the ears acquire ringing, the ringing becomes a warning. It is by caffeine alone that I set my mind into motion.
Edymnion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 08:08 AM.


AC3D Forum
(C) Inivis Limited 2020