Skip to main content

solidpython_ff

Fast and Furious solidpython, more pythonic!

Solidpythonsticks to Openscad's operation(arguments) (objects,...) API.

This is a slim wrapper (and some tiny utility functions) that turn this into a python object.operation(arguments) API.

For example:

translate([0,0,10]) ( 
	cylinder(r=3,h=10) + 
	rotate([0,90,0]) ( 
		cylinder(r=3, h=10 )
		)
)

becomes

(cylinder(r=3, h=10) + cylinder(r=3, h=10).rotate([0,90,0])).translate([0,0,10])

There's also abbreviations, so you can go

cy(r=3, h=10) + cy(r=3, h=10).r([0,90,0])).t([0,0,10])

The functions have been tuned to understand to understand the openscady 'list-triplets' as well as regular old parameters, and the utils convenience functions are also available.

cy(r=3, h=10) + cy(r=3, h=10).r(0,90,0)).t(0,0,10)

Or even

(cy(r=3, h=10) + cy(r=3, h=10)).rzx().up(10) # rotate z to x

More convenience:

cy(r=3, h=10, segments = 64).scale(x=10, y=5) # z = 1 is implied, 64 segments is the default
cy(r=3, h=10).s(x=10, y=5) # z = 1 is implied

square(3,5).e(10, axis='x', center=True) #  a rectangle 3*5, extruded by 10mm, down 5mm, rotated so that extrusion direction is in the x axis.


cy(3,0).debug() # translates to # in openscad
cy(3,0).d()

cy(3,0).background() # translates to % in openscad
cy(3,0).b()


q(10,20,30) + cy(1.5,31).hole() # or .h() for 'first class negative space, and quick cubes

rq(10, r=2, axis='x', edges=(0,1)) # a 10x10x10 cube that has the top edges, parallel to the x axis rounded (so the 'straight' face is facing x)


q(10).x(5) # alias for forward. 
q(10).y(5) # alias for right. 
q(10).z(5) # alias for up. 


q(10).dump("example.scad") # write the object to a .scad file (calls scad_render_to_file)



Release files for solidpython-ff 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solidpython-ff 0.1.1
File Size Uploaded
solidpython_ff-0.1.1.tar.gz 16.5 kB Details

Release files / solidpython_ff-0.1.1.tar.gz

Download URL solidpython_ff-0.1.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
58f6aa8f7fbbb0c83777ad3833e1df98eb1f069b62305c5c44f68cd074c78b07
BLAKE2b-256 checksum
How to use checksums
014222fc91c5e9c9f8b878fd0dbd731718d077d85ba6aeb2ab6a1d34d6d7ec5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page