[OpenSCAD] Evaluating imported STL's

Lucas Vinicius Hartmann lucas.hartmann at gmail.com
Wed Jun 15 07:34:41 EDT 2016


I am going to take Michael's word that there is no immediate way to do
that, but since you are procedurally generating solids I assume you are no
stranger to some programming.

You may use project(...) to grab a slice from your solid. From the command
line you can then modify a transformation so that project(...) gets a slice
of your interest, and export slices to dxf. Coding a 2D raytracer should be
an order of magnitude easier than a 3D one.

If all you need to know is IF 2 objects are colliding, then you may use
intersection(), export via commandline, and check for a non-empty resulting
STL (filesize maybe?).

If you need to know WHERE they are colliding then again use intersection(),
but this time you will need to parse the output STL and read the
coordinates. Still easier than calculating the collision yourself.
Em 15/06/2016 03:08, "username" <atex76 at shaw.ca> escreveu:

> Hi everyone, first time poster here. Just learned about OpenSCAD and I
> really
> like the concept, being familiar with coding it's quite easy to get the
> hang
> of it.
>
> Would like to create a batch script which would load and STL (no faults,
> procedurally generated by another app), check for certain
> features/measurements...append some geometry in function of those
> measurements then save it back into an STL. Currently doing this manually,
> which is time consuming given the number of models we have to go though.
>
> Question is: are there any functions available to check where two objects
> would intersect or collide ? I mean kinda like raytracing form a given
> coordinate with a given vector and see where that ray would intersect our
> loaded mesh ? Or is there any feedback I could use ?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/Evaluating-imported-STL-s-tp17682.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20160615/7910b17b/attachment-0002.html>


More information about the Discuss mailing list