-
Notifications
You must be signed in to change notification settings - Fork 558
V2 backwards compatibility with V1 #1326
Copy link
Copy link
Open
Description
Sorry if this has been dealt with before, but I did have a didn't find it in my searches.
I just came back to an old script that I wanted to make a minor change to, and found it no longer works and there's no obvious way of using it any more. Is there any solution or easy way to 'upgrade' old scripts?
Expected Behavior
Script I made a year ago is still usable on https://openjscad.xyz/:
function main(params) {
return difference(
union(
cube({size:[20,20,20],center:true}),
cube({size:[50,8,8],center:true}).translate([0,0,14]),
cube({size:[20,8.5,8.5],center:true}).rotateX(45).translate([0,4,10]),
cube({size:[20,8.5,8.5],center:true}).rotateX(45).translate([0,-4,10]),
//cylinder({start: [-10,5,10], end: [10,5,10], r: 5, fn: 20}),
//cylinder({start: [-10,-5,10], end: [10,-5,10], r: 5, fn: 20}),
cube({size:[10,8,20],center:true}).rotateY(20).translate([9,0,5]),
cube({size:[10,8,20],center:true}).rotateY(-20).translate([-9,0,5])
).expand(2,20),
cube({size:[20,20,40],center:true}).translate([0,0,-10])
);
}
Actual Behavior
Script fails with error about exports.main, after that, difference, after fixing that, size for cube not being a number
Steps to Reproduce the Problem
- Go to https://openjscad.xyz/:
- Try script above and shift+enter to execute
Specifications
- Version: 2.6.6 (https://openjscad.xyz/:)
- Platform: Linux
- Environment: Chrome
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels