SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

Script to create a solvespace file (by Keenan Brock)
Hi all,

Has anyone created a ruby/python/java/javascript script to generate a solvespace file with a few shapes and constraints?

I saw a couple of attempts in the forum but didn't see enough to help me do this. I was hoping to work in ruby but I can translate and can probably link to a few c so/dll libraries if need be.

For such a simple file format, it sure is throwing me for a loop.

I want to 3d print a keyboard with spaces for the switches and wires. I have a json file with the definitions of the key layout, so the script would make this easier than manually entering it - especially since I'm exploring - adding, removing and moving things between workplanes.

I've been also creating openscad scripts, but solvespace is just so much better with the constraint engine and better to visualize. I guess if there were a way to generate a cad file and import it in a lossless way, that may work. CAD interoperability is surprisingly lacking from what I've found.

Thanks for the great project. This is the first CAD program that really made sense to me in my "learning to CAD" journey.

Thanks,
Keenan

Mac laptop with old High Siera, (10.13) built on the command line from github master. (probably updated 2 months ago)
Tue Dec 15 2020, 12:10:46
Instead of scripting, why not a description language? (by William Adams)
One of the things which has kept TeX popular and relevant is that when it was developed, Dr. Donald Knuth started with a description of the text commands which would be added to text to create the desired formatting.

Is there an existing 3D language description which maps well to Solvespace? If so, could a translation mechanism be worked up?

If not, what would be involved in creating a textual description of a design which could then be converted into the Solvespace format?
Sat Jun 19 2021, 10:15:59
(no subject) (by Andrew)
OpenScad might be a better choice for what you are trying to do, as it language based to start with. It's language is somewhat C or Python like, but with functional overtones.
Sat Jun 19 2021, 17:39:53
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2021 SolveSpace contributors. Most recent update Apr 18 2021.