Hi all,
Is there a way to convert a 2D objects to a polygon format? Or a 3D object
to a polyhedron format?
To be able to go that way, rather than make a polygon / polyhedron from
points and paths /faces would be awesome, as this would open up a whole new
set of abilities.
Thanks.
--
View this message in context: http://forum.openscad.org/Convert-from-object-to-polygon-polyhedron-tp18522.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Yes, there is but not with OpenSCAD language yet. A python code by Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geometry-td18145.html#a18156
http://forum.openscad.org/Wrapping-text-around-a-complex-geometry-td18145.html#a18156
--
View this message in context: http://forum.openscad.org/Convert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
also on thingiverse is an inkscape extension which exports vector
objects to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geometry-td18145.html#a18156
http://forum.openscad.org/Wrapping-text-around-a-complex-geometry-td18145.html#a18156
--
View this message in context: http://forum.openscad.org/Convert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date: 10/03/16
The reason there is no such thing is that OpenSCAD can not change/set the
variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector objects
to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-
geometry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-
geometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date: 10/03/16
True that all variables are constants, but there could be an operator that
returns the points. That wouldn't break that paradigm. Something like:
_2d = points_edges()
intersection()
{
circle(1, $fn=20);
square(2);
}
_3d = points_faces()
intersection()
{
sphere(1, $fn=20);
cube(2);
}
Where:
_2d=[ [point0, point1, ...], [ [edge0, ...], [edge1, ...], ...];
_3d=[ [point0, point1, ...], [ [face0, ...], [face1, ...], ...];
On Tue, Oct 4, 2016 at 8:42 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
The reason there is no such thing is that OpenSCAD can not change/set the
variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector objects
to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geo
metry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-ge
ometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date:
10/03/16
Oh, and further to this, yes, one can write the primitives and the
operators, but that would be reinventing the wheel, and would definitely be
slower. Especially with things like hull() and minkowski().
The information is available, it just needs to be made available.
Thinking about this further, the operators that I described are actually a
module to function crossover, which doesn't currently exist in OpenSCAD,
but perhaps it could possibly be doable? Maybe by some incremental build
process?
As I understand it, it currently builds by:
What I would be suggesting is to iterate over the first 2 steps, executing
each iteration, child node first, up to such crossover points until
everything is calculated, and then do step 3.
Yes, that would be a significant change to the paradigm, but doable?
On Tue, Oct 4, 2016 at 8:42 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
The reason there is no such thing is that OpenSCAD can not change/set the
variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector objects
to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geo
metry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-ge
ometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date:
10/03/16
The problem is that with F5 preview the geometry is never calculated. It is
straight from variables to pixels, so the information is never there unless
you use render().
On 4 October 2016 at 14:32, Adrian H adrianh.bsc@gmail.com wrote:
Oh, and further to this, yes, one can write the primitives and the
operators, but that would be reinventing the wheel, and would definitely be
slower. Especially with things like hull() and minkowski().
The information is available, it just needs to be made available.
Thinking about this further, the operators that I described are actually a
module to function crossover, which doesn't currently exist in OpenSCAD,
but perhaps it could possibly be doable? Maybe by some incremental build
process?
As I understand it, it currently builds by:
1. calculate all variables/functions
2. calculate all operations/modules.
3. show result on screen result
What I would be suggesting is to iterate over the first 2 steps, executing
each iteration, child node first, up to such crossover points until
everything is calculated, and then do step 3.
Yes, that would be a significant change to the paradigm, but doable?
On Tue, Oct 4, 2016 at 8:42 AM, Peter Falke <stempeldergeschichte@
googlemail.com> wrote:
The reason there is no such thing is that OpenSCAD can not change/set
the variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector
objects to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by
Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geo
metry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-ge
ometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date:
10/03/16
Oh, that's unfortunate. But, can not the same idea apply to the preview?
It still has to have points to be able to show the preview, doesn't it?
On Oct 4, 2016 10:00 AM, "nop head" nop.head@gmail.com wrote:
The problem is that with F5 preview the geometry is never calculated. It
is straight from variables to pixels, so the information is never there
unless you use render().
On 4 October 2016 at 14:32, Adrian H adrianh.bsc@gmail.com wrote:
Oh, and further to this, yes, one can write the primitives and the
operators, but that would be reinventing the wheel, and would definitely be
slower. Especially with things like hull() and minkowski().
The information is available, it just needs to be made available.
Thinking about this further, the operators that I described are actually
a module to function crossover, which doesn't currently exist in OpenSCAD,
but perhaps it could possibly be doable? Maybe by some incremental build
process?
As I understand it, it currently builds by:
1. calculate all variables/functions
2. calculate all operations/modules.
3. show result on screen result
What I would be suggesting is to iterate over the first 2 steps,
executing each iteration, child node first, up to such crossover points
until everything is calculated, and then do step 3.
Yes, that would be a significant change to the paradigm, but doable?
On Tue, Oct 4, 2016 at 8:42 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
The reason there is no such thing is that OpenSCAD can not change/set
the variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector
objects to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by
Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in
the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geo
metry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-ge
ometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date:
10/03/16
Preview doesn't compute boolean operations points. Try preview cube(10);
rotate(15) sphere(10,$fn=12); with Show edges on. You will see no edges at
the intersection line.
2016-10-05 21:07 GMT-03:00 Adrian H adrianh.bsc@gmail.com:
Oh, that's unfortunate. But, can not the same idea apply to the preview?
It still has to have points to be able to show the preview, doesn't it?
On Oct 4, 2016 10:00 AM, "nop head" nop.head@gmail.com wrote:
The problem is that with F5 preview the geometry is never calculated. It
is straight from variables to pixels, so the information is never there
unless you use render().
On 4 October 2016 at 14:32, Adrian H adrianh.bsc@gmail.com wrote:
Oh, and further to this, yes, one can write the primitives and the
operators, but that would be reinventing the wheel, and would definitely be
slower. Especially with things like hull() and minkowski().
The information is available, it just needs to be made available.
Thinking about this further, the operators that I described are actually
a module to function crossover, which doesn't currently exist in OpenSCAD,
but perhaps it could possibly be doable? Maybe by some incremental build
process?
As I understand it, it currently builds by:
1. calculate all variables/functions
2. calculate all operations/modules.
3. show result on screen result
What I would be suggesting is to iterate over the first 2 steps,
executing each iteration, child node first, up to such crossover points
until everything is calculated, and then do step 3.
Yes, that would be a significant change to the paradigm, but doable?
On Tue, Oct 4, 2016 at 8:42 AM, Peter Falke <
stempeldergeschichte@googlemail.com> wrote:
The reason there is no such thing is that OpenSCAD can not change/set
the variables (set any(!) variable) during execution.
But the 2d primitives are eaily written by your self.
The 3D primitives are doable too, but a little harder.
2016-10-04 12:51 GMT+02:00 Mark Schafer mschafer@wireframe.biz:
also on thingiverse is an inkscape extension which exports vector
objects to openscad format directly:
Yes it would be nice if we could have lines as first class objects in
OpenSCAD but for now these tools might help you
On 10/4/2016 1:25 PM, Ronaldo wrote:
Yes, there is but not with OpenSCAD language yet. A python code by
Neon22
converts AMF files (possibly exported by OpenSCAD) to a text file in
the
OpenSCAD polyhedron format. See this discussion:
http://forum.openscad.org/Wrapping-text-around-a-complex-geo
metry-td18145.html#a18156
<http://forum.openscad.org/Wrapping-text-around-a-complex-ge
ometry-td18145.html#a18156>
--
View this message in context: http://forum.openscad.org/Conv
ert-from-object-to-polygon-polyhedron-tp18522p18523.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13139 - Release Date:
10/03/16
I have written a library for my work with and for openscad that does
affine transforms. I use it to generate a module that will rotate
about the line through any two points in space given the two points. It
simplifies a number of operations if you can wrap your brain around
the affine transform.
Code and test examples are at:
https://github.com/ottojas/openscad-affine
I would appreciate any testing comments etc.
I just created the library and realized I havn't (yet) included the
license for you to do whatever you want with it. I will do that now.
Thanks for any help
Otto