discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

shape data from json or xml file

F
fractorr
Mon, Dec 7, 2015 5:17 PM

I am wanting to generate blocks of various shapes and sizes with holes
through them in various locations.  I currently have all the data for the
shapes, sizes and hole location in a json file.  Is there any way to use
this in OpenSCAD so I don't have to have a separate file for each shape /
size combination?  Between the various shapes and sizes I have over 200
combinations.  It would save me a lot of time be be able to reuse the json
file I already have.  If not is there another way to store and use
structured data to generate the blocks?

--
View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I am wanting to generate blocks of various shapes and sizes with holes through them in various locations. I currently have all the data for the shapes, sizes and hole location in a json file. Is there any way to use this in OpenSCAD so I don't have to have a separate file for each shape / size combination? Between the various shapes and sizes I have over 200 combinations. It would save me a lot of time be be able to reuse the json file I already have. If not is there another way to store and use structured data to generate the blocks? -- View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Mon, Dec 7, 2015 6:42 PM

It would be easy to import json in Python and spit out openscad, if you
speak Python that is.

On 7 December 2015 at 17:17, fractorr fractorr@gmail.com wrote:

I am wanting to generate blocks of various shapes and sizes with holes
through them in various locations.  I currently have all the data for the
shapes, sizes and hole location in a json file.  Is there any way to use
this in OpenSCAD so I don't have to have a separate file for each shape /
size combination?  Between the various shapes and sizes I have over 200
combinations.  It would save me a lot of time be be able to reuse the json
file I already have.  If not is there another way to store and use
structured data to generate the blocks?

--
View this message in context:
http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014.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

It would be easy to import json in Python and spit out openscad, if you speak Python that is. On 7 December 2015 at 17:17, fractorr <fractorr@gmail.com> wrote: > I am wanting to generate blocks of various shapes and sizes with holes > through them in various locations. I currently have all the data for the > shapes, sizes and hole location in a json file. Is there any way to use > this in OpenSCAD so I don't have to have a separate file for each shape / > size combination? Between the various shapes and sizes I have over 200 > combinations. It would save me a lot of time be be able to reuse the json > file I already have. If not is there another way to store and use > structured data to generate the blocks? > > > > > -- > View this message in context: > http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014.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 >
F
fractorr
Mon, Dec 7, 2015 7:09 PM

ah, right. I guess if I just make a library with the various drawing
functions and then I can then generate a separate scad file for each shape /
size combination that just uses my library.

--
View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15021.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

ah, right. I guess if I just make a library with the various drawing functions and then I can then generate a separate scad file for each shape / size combination that just uses my library. -- View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15021.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Mon, Dec 7, 2015 7:46 PM

On 12/07/2015 08:09 PM, fractorr wrote:

ah, right. I guess if I just make a library with the various drawing
functions and then I can then generate a separate scad file for each shape /
size combination that just uses my library.

Depending on the actual objects, you could also have a look at
BOLTS and see how it's done there. Or maybe even integrate :-).

http://www.bolts-library.org/en/index.html

ciao,
Torsten.

On 12/07/2015 08:09 PM, fractorr wrote: > ah, right. I guess if I just make a library with the various drawing > functions and then I can then generate a separate scad file for each shape / > size combination that just uses my library. > Depending on the actual objects, you could also have a look at BOLTS and see how it's done there. Or maybe even integrate :-). http://www.bolts-library.org/en/index.html ciao, Torsten.
F
fractorr
Mon, Dec 7, 2015 8:23 PM

I like the BOLT idea, going to look into it.

--
View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15023.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I like the BOLT idea, going to look into it. -- View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15023.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JD
Jerry Davis
Tue, Dec 8, 2015 4:07 AM

try python module solidpython

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous

If writing good code requires very little comments, then writing really
excellent code requires no comments at all!
- Ken Thompson

On Mon, Dec 7, 2015 at 1:23 PM, fractorr fractorr@gmail.com wrote:

I like the BOLT idea, going to look into it.

--
View this message in context:
http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15023.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

try python module solidpython -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Arduino developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov *I* *f you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. *- Anonymous *If writing good code requires very little comments, then writing really excellent code requires no comments at all!*- Ken Thompson On Mon, Dec 7, 2015 at 1:23 PM, fractorr <fractorr@gmail.com> wrote: > I like the BOLT idea, going to look into it. > > > > > -- > View this message in context: > http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15023.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 >
F
fractorr
Fri, Jan 15, 2016 11:05 PM

I am REALLY liking OpenSCAD. I went with the BOLTS type method.  I have 12
modules that accept various parameters for generating shapes.  With those 12
modules I can generate over 1,400 different OpenSCAD files.  I created a
script file to generate all the possible OpenSCAD files with the various
parameters for each module.  I then used the command line export option to
batch export them to stl and png files.  This ability saved me countless
hours of work.

--
View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15721.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I am REALLY liking OpenSCAD. I went with the BOLTS type method. I have 12 modules that accept various parameters for generating shapes. With those 12 modules I can generate over 1,400 different OpenSCAD files. I created a script file to generate all the possible OpenSCAD files with the various parameters for each module. I then used the command line export option to batch export them to stl and png files. This ability saved me countless hours of work. -- View this message in context: http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15721.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JD
Jerry Davis
Sat, Jan 16, 2016 12:35 AM

for those of you looking into BOLTS.
I installed it, and tried it out. My bolts have no threads.
Are my bolts supposed to come out with no threads?

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous

If writing good code requires very little comments, then writing really
excellent code requires no comments at all!
- Ken Thompson

On Fri, Jan 15, 2016 at 4:05 PM, fractorr fractorr@gmail.com wrote:

I am REALLY liking OpenSCAD. I went with the BOLTS type method.  I have 12
modules that accept various parameters for generating shapes.  With those
12
modules I can generate over 1,400 different OpenSCAD files.  I created a
script file to generate all the possible OpenSCAD files with the various
parameters for each module.  I then used the command line export option to
batch export them to stl and png files.  This ability saved me countless
hours of work.

--
View this message in context:
http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15721.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

for those of you looking into BOLTS. I installed it, and tried it out. My bolts have no threads. Are my bolts supposed to come out with no threads? -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Arduino developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov *I* *f you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. *- Anonymous *If writing good code requires very little comments, then writing really excellent code requires no comments at all!*- Ken Thompson On Fri, Jan 15, 2016 at 4:05 PM, fractorr <fractorr@gmail.com> wrote: > I am REALLY liking OpenSCAD. I went with the BOLTS type method. I have 12 > modules that accept various parameters for generating shapes. With those > 12 > modules I can generate over 1,400 different OpenSCAD files. I created a > script file to generate all the possible OpenSCAD files with the various > parameters for each module. I then used the command line export option to > batch export them to stl and png files. This ability saved me countless > hours of work. > > > > > -- > View this message in context: > http://forum.openscad.org/shape-data-from-json-or-xml-file-tp15014p15721.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 >