Model of forked lever #16
Replies: 2 comments 6 replies
-
This looks great, I have a couple of questions and remarks! First, I will look into how to improve the missing features! The fillet in the sketcher class would be an especially good addition! I have seen that you do not use chaining like this: let innerLever = new Sketcher("XY")
.movePointerTo(p1)
.lineTo(p2)
.threePointsArcTo(p4, p3)
.lineTo(p5)
.threePointsArcTo(p1, p6)
.close(); Any reason? Also you could probably benefit from some helper functions like Just to play with the concept I have recreated this part of the model: const sideShape = new Sketcher("XZ")
.movePointerTo([distance + radius2 + t3, 0])
.vLine(t2 / 2)
.hLine(-(radius2 + t3) * 2)
.lineTo([radius1 + t3, sep / 2 + t1])
.hLine(-(radius1 + t3) * 2)
.vLine(-t1)
.hLine((radius1 + t3) * 2)
.polarLine(sep / 2 / Math.sin(DEG2RAD * angle), -angle)
.closeWithMirror(); I personally find it easier to read, but this is perhaps because I am more used to it! |
Beta Was this translation helpful? Give feedback.
-
You could access a certain position while building something with the sketcher. function SideView(radius1, radius2, distance, sep, t1, t2, t3) {
const sideShapeMaker = new Sketcher("XZ")
.movePointerTo([distance + radius2 + t3, 0])
.vLine(t2 / 2)
.hLine(-(radius2 + t3) * 2)
.lineTo([radius1 + t3, sep / 2 + t1])
.hLine(-(radius1 + t3) * 2)
.vLine(-t1)
.hLine((radius1 + t3) * 2)
.polarLine(sep / 2 / Math.sin(DEG2RAD * angle), -angle);
const centerPoint = sideShapeMaker.pointer;
console.log(centerPoint);
const sideShape = sideShapeMaker.closeWithMirror();
return sideShape;
} The pointer value is not exposed - I should probably create a method to save these points for later. |
Beta Was this translation helpful? Give feedback.
-
Example of a forked lever, created in Replicad. This is a translation of a model that I built earlier in CascadeStudio. However, I had to rethink the modeling approach as some functions in Replicad are different from those in CascadeStudio. For example:
The code is shown below:
Beta Was this translation helpful? Give feedback.
All reactions