how to dimension?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

how to dimension?

David Rysdam
n00b here.

In the wikibook, there's one reference to dimensioning and I don't get
it. Can someone tell me how I can take a 3D model and make a printout of
3 orthographic views with dimensions? Automatically would be awesome,
but at the very least a human choosing the views would probably be
necessary.

btw, I love how the external editor feature works. The only downside I
saw to OpenSCAD was that the editor wasn't emacs. And now it is!

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

Giles Bathgate-2
This might be of use to you:

http://www.gilesbathgate.com/2010/06/extracting-2d-mendel-outlines-using-openscad/

You will have to dimension it manually in your 2D cad package though...

Regards

Giles

On 16 June 2011 12:29, David Rysdam <[hidden email]> wrote:

> n00b here.
>
> In the wikibook, there's one reference to dimensioning and I don't get
> it. Can someone tell me how I can take a 3D model and make a printout of
> 3 orthographic views with dimensions? Automatically would be awesome,
> but at the very least a human choosing the views would probably be
> necessary.
>
> btw, I love how the external editor feature works. The only downside I
> saw to OpenSCAD was that the editor wasn't emacs. And now it is!
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
On Thu, 16 Jun 2011 22:20:49 +0100, Giles Bathgate <[hidden email]> wrote:
> This might be of use to you:
>
> http://www.gilesbathgate.com/2010/06/extracting-2d-mendel-outlines-using-openscad/

Yes, I found that projection technique, I just wasn't sure it was The Way.
 
> You will have to dimension it manually in your 2D cad package though...

Isn't this a little...strange? I mean, OpenSCAD is for CAD and it knows
the dimensions. There's no way to label them? Is that on the roadmap?

Thinking about it a little more, I guess it kind of makes sense. I could
put my dimensions in an include file. I describe the geometry for
OpenSCAD and render 3D and 2D drawings. Then I have a separate
script/program read that same include file and put labels on the 2D
drawing. "Do one thing well."

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

nophead
With openscad you normally put the dimensions in the source code and it creates objects with those dimensions. You can also make it draw dimension lines to match those dimensions as Gavilan does here: http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=95

It is possibly not the right tool for pulling in objects and measuring them.

On 17 June 2011 12:38, David Rysdam <[hidden email]> wrote:
On Thu, 16 Jun 2011 22:20:49 +0100, Giles Bathgate <[hidden email]> wrote:
> This might be of use to you:
>
> http://www.gilesbathgate.com/2010/06/extracting-2d-mendel-outlines-using-openscad/

Yes, I found that projection technique, I just wasn't sure it was The Way.

> You will have to dimension it manually in your 2D cad package though...

Isn't this a little...strange? I mean, OpenSCAD is for CAD and it knows
the dimensions. There's no way to label them? Is that on the roadmap?

Thinking about it a little more, I guess it kind of makes sense. I could
put my dimensions in an include file. I describe the geometry for
OpenSCAD and render 3D and 2D drawings. Then I have a separate
script/program read that same include file and put labels on the 2D
drawing. "Do one thing well."
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

Triffid Hunter
On Fri, Jun 17, 2011 at 10:49 PM, nop head <[hidden email]> wrote:
> With openscad you normally put the dimensions in the source code and it
> creates objects with those dimensions. You can also make it draw dimension
> lines to match those dimensions as Gavilan does
> here: http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=95
> It is possibly not the right tool for pulling in objects and measuring them.

I checked out Gavilan's code when this thread came up (it's in the
zipfile for his robot dog on thingiverse), his code can label but not
dimension. You'd have to put in the dimensions manually, and since
openscad is so poor for text processing you can't even read them from
a variable.

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
In reply to this post by nophead
On Fri, 17 Jun 2011 13:49:49 +0100, nop head <[hidden email]> wrote:
> With openscad you normally put the dimensions in the source code and it
> creates objects with those dimensions. You can also make it draw dimension
> lines to match those dimensions as Gavilan does here:
> http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=95

When I watched that video like a week ago, I remember him doing
dimension lines. Skipping through it now, though, I can't find that segment.

> It is possibly not the right tool for pulling in objects and measuring them.

I realize most people are using it to create something for use by a 3D
printer-type arrangement, where shown dimensions aren't an
issue. However, I'd like to use it to produce drawings for use in the
workshop. I could use a more traditional CAD program, but I like the
"programmer's interface" to a CAD program. For one thing, I already know
how to program, so I don't have to learn anything else.

Since that feature doesn't exist, maybe I should submit a patch...

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

Triffid Hunter
On Sat, Jun 18, 2011 at 12:13 AM, David Rysdam <[hidden email]> wrote:
> I realize most people are using it to create something for use by a 3D
> printer-type arrangement, where shown dimensions aren't an
> issue. However, I'd like to use it to produce drawings for use in the
> workshop.

One interesting way around this that I found was getting 1:1 scale
print-outs of various faces of objects using blender, then gluing the
paper to my wood and using it as a cutting guide.. worked quite well
:)

The blender precision modelling tutorial at rafb.net has a section on
scale printouts.

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
On Sat, 18 Jun 2011 00:18:19 +1000, Triffid Hunter <[hidden email]> wrote:

> On Sat, Jun 18, 2011 at 12:13 AM, David Rysdam <[hidden email]> wrote:
> > I realize most people are using it to create something for use by a 3D
> > printer-type arrangement, where shown dimensions aren't an
> > issue. However, I'd like to use it to produce drawings for use in the
> > workshop.
>
> One interesting way around this that I found was getting 1:1 scale
> print-outs of various faces of objects using blender, then gluing the
> paper to my wood and using it as a cutting guide.. worked quite well
> :)

Good idea. I'll <strike>probably</strike>definitely use this when I'm
cutting out 2D shapes. I'm actually doing metal work on a lathe
(manually, not CNC). It's really nice to be able to use thousandths
(.001", the planck length of normal machine work) directly in my
OpenSCAD drawings.

> The blender precision modelling tutorial at rafb.net has a section on
> scale printouts.

I can't find anything about blender at rafb.net. Is that an abbreviation
of some other URL? No wait, it seems to be a defunct pastebin site?

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

Triffid Hunter
On Sat, Jun 18, 2011 at 12:32 AM, David Rysdam <[hidden email]> wrote:
> I can't find anything about blender at rafb.net. Is that an abbreviation
> of some other URL? No wait, it seems to be a defunct pastebin site?

No, totally wrong url, brainfart instead of recollection.. I meant
rab3d.com, specifically http://www.rab3d.com/tut_blender.php (scroll
down for PDF format)

That'll teach me for sending urls without actually checking them first :/

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
On Sat, 18 Jun 2011 00:46:20 +1000, Triffid Hunter <[hidden email]> wrote:
> On Sat, Jun 18, 2011 at 12:32 AM, David Rysdam <[hidden email]> wrote:
> > I can't find anything about blender at rafb.net. Is that an abbreviation
> > of some other URL? No wait, it seems to be a defunct pastebin site?
>
> No, totally wrong url, brainfart instead of recollection.. I meant
> rab3d.com, specifically http://www.rab3d.com/tut_blender.php (scroll
> down for PDF format)

I've used Blender and I knew people were using it for CADish things, but
I didn't know anyone was using it for precision. This is pretty awesome.

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
In reply to this post by David Rysdam
On Fri, 17 Jun 2011 10:13:16 -0400, David Rysdam <[hidden email]> wrote:
> On Fri, 17 Jun 2011 13:49:49 +0100, nop head <[hidden email]> wrote:
> > With openscad you normally put the dimensions in the source code and it
> > creates objects with those dimensions. You can also make it draw dimension
> > lines to match those dimensions as Gavilan does here:
> > http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=95
>
> When I watched that video like a week ago, I remember him doing
> dimension lines. Skipping through it now, though, I can't find that segment.

Replying to myself for posterity...

He for sure does dimensions in the next episode, though

    http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=96#comments

and in the comments mentions that he wrote "reusable modules" to do
it. If you download the file and look, the modules use his known
parameters, kind of like I originally speculated. A bit of a hassle to
write 10-20 lines of code for each dimension line, but maybe that could
be automated a bit more. I assume modules can take parameters. So you
could do a "dimLine(from, to, text)" or whatever.
 

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

nophead
Yes it makes sense to be able to generate dimension annotation in openscad but I can't see how you could use it to dimension a slice through an imported STL. You would need to be able to identify the artefacts to dimension, which would require picking them out in a GUI, something openscad doesn't really do.

On 17 June 2011 16:29, David Rysdam <[hidden email]> wrote:
On Fri, 17 Jun 2011 10:13:16 -0400, David Rysdam <[hidden email]> wrote:
> On Fri, 17 Jun 2011 13:49:49 +0100, nop head <[hidden email]> wrote:
> > With openscad you normally put the dimensions in the source code and it
> > creates objects with those dimensions. You can also make it draw dimension
> > lines to match those dimensions as Gavilan does here:
> > http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=95
>
> When I watched that video like a week ago, I remember him doing
> dimension lines. Skipping through it now, though, I can't find that segment.

Replying to myself for posterity...

He for sure does dimensions in the next episode, though

   http://blog.onshoulders.org/BlogEntryDetails.php?blogID=tv&blogEntryId=96#comments

and in the comments mentions that he wrote "reusable modules" to do
it. If you download the file and look, the modules use his known
parameters, kind of like I originally speculated. A bit of a hassle to
write 10-20 lines of code for each dimension line, but maybe that could
be automated a bit more. I assume modules can take parameters. So you
could do a "dimLine(from, to, text)" or whatever.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
On Fri, 17 Jun 2011 17:12:48 +0100, nop head <[hidden email]> wrote:
> Yes it makes sense to be able to generate dimension annotation in openscad
> but I can't see how you could use it to dimension a slice through an
> imported STL. You would need to be able to identify the artefacts to
> dimension, which would require picking them out in a GUI, something
> openscad doesn't really do.

There's no need to pick them out in a GUI. Just mark them in the model
in the first place. You'd pick out landmarks in the model, say, and then
have some code that printed out a dimension line between given
landmarks.

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

nophead
Yes, but if it is an imported STL it isn't in the model in a way you can access it.

On 17 June 2011 17:41, David Rysdam <[hidden email]> wrote:
On Fri, 17 Jun 2011 17:12:48 +0100, nop head <[hidden email]> wrote:
> Yes it makes sense to be able to generate dimension annotation in openscad
> but I can't see how you could use it to dimension a slice through an
> imported STL. You would need to be able to identify the artefacts to
> dimension, which would require picking them out in a GUI, something
> openscad doesn't really do.

There's no need to pick them out in a GUI. Just mark them in the model
in the first place. You'd pick out landmarks in the model, say, and then
have some code that printed out a dimension line between given
landmarks.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

David Rysdam
On Fri, 17 Jun 2011 19:34:14 +0100, nop head <[hidden email]> wrote:
> Yes, but if it is an imported STL it isn't in the model in a way you can
> access it.

I'd noticed you mentioned this in the email I replied to, but I couldn't
figure out why I care about imported STLs. Because that's the only way
to get the orthographic views? Obviously that would also have to be
fixed....

Actually, there's another reason the orthographic views and dimensioning
have to be integrated: projection. If my dimension line says "2" but
it's into or out of the page for all orthographic views, then the actual
printed value should be less than "2".

Reply | Threaded
Open this post in threaded view
|

Re: how to dimension?

Giles Bathgate-2
In reply to this post by nophead
On 17 June 2011 17:12, nop head <[hidden email]> wrote:
> Yes it makes sense to be able to generate dimension annotation in openscad
> but I can't see how you could use it to dimension a slice through an
> imported STL. You would need to be able to identify the artefacts to
> dimension, which would require picking them out in a GUI, something
> openscad doesn't really do.

Talking of slices, RapCAD has a bounds() module. The idea is that you
measure the extents of the model before passing it to the .rcam slice
and dice script.

I will describe how all this is planned to work in my next blog post.
For now though all bounds() does is print the bounds into the console,
which isn't terribly useful, but its a start ;)