Continued working through the examples on ParametricParts.com, adding 3 more and fixing some variables that weren't updated in some of the older examples.
This commit is contained in:
@ -19,20 +19,18 @@
|
||||
import cadquery
|
||||
import Part
|
||||
|
||||
#The dimensions of the box. These can be modified rather than changing the box's code directly.
|
||||
circle_radius = 50.0
|
||||
rectangle_width = 13.0
|
||||
rectange_length = 19.0
|
||||
thickness = 13.0
|
||||
#The dimensions of the model. These can be modified rather than changing the box's code directly.
|
||||
circle_radius = 3.0
|
||||
thickness = 0.25
|
||||
|
||||
#Make the plate with two cutouts in it
|
||||
result = cadquery.Workplane("front").circle(3.0) #Current point is the center of the circle, at (0,0)
|
||||
result = cadquery.Workplane("front").circle(circle_radius) #Current point is the center of the circle, at (0,0)
|
||||
result = result.center(1.5,0.0).rect(0.5,0.5) #New work center is (1.5,0.0)
|
||||
|
||||
result = result.center(-1.5,1.5).circle(0.25) #New work center is ( 0.0,1.5).
|
||||
#The new center is specified relative to the previous center, not global coordinates!
|
||||
|
||||
result = result.extrude(0.25)
|
||||
result = result.extrude(thickness)
|
||||
|
||||
#Get a cadquery solid object
|
||||
solid = result.val()
|
||||
|
Reference in New Issue
Block a user