text stringlengths 0 7.52k |
|---|
cPlane(context, id + "F7", {"entities" : qUnion([Q0]), "cplaneType" : CPlaneType.OFFSET, "offset" : 9.52 * mm, "width" : 152.4 * mm, "height" : 152.4 * mm}); |
} |
{ |
var Q0; |
Q0=qCreatedBy(makeId("Top.planeOp"),FACE); |
var sketch = newSketch(context, id + "F8", { "sketchPlane" : qUnion([Q0])}); |
skCircle(sketch, "E4", {"center": v(9.53, -9.49) * mm, "radius": 9.53 * mm}); |
skCircle(sketch, "E5", {"center": v(9.53, -9.49) * mm, "radius": 7.94 * mm}); |
skSolve(sketch); |
} |
{ |
var Q0; |
Q0=sQuery(id+"F8.wireOp",EDGE,"E4"); |
var Q1; |
Q1=sQuery(id+"F8.wireOp",EDGE,"E5"); |
extrude(context, id + "F9", {"bodyType" : ToolBodyType.SURFACE, "surfaceEntities" : qUnion([Q0, Q1]), "oppositeDirection" : true, "depth" : 517.52 * mm, "hasSecondDirection" : true, "secondDirectionOppositeDirection" : false, "secondDirectionDepth" : 279.4 * mm}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F9.opExtrude","SWEPT_BODY",BODY,{"disambiguationData":[OSD([sQuery(id+"F8.wireOp",EDGE,"E4")])]}); |
var Q1; |
Q1=makeQuery(id+"F9.opExtrude","SWEPT_BODY",BODY,{"disambiguationData":[OSD([sQuery(id+"F8.wireOp",EDGE,"E5")])]}); |
transform(context, id + "F10", {"entities" : qUnion([Q0, Q1]), "transformType" : TransformType.TRANSLATION_3D, "dx" : 0 * mm, "dy" : -9.52 * mm, "dz" : 0 * mm, "makeCopy" : false}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F9.opExtrude","SWEPT_BODY",BODY,{"disambiguationData":[OSD([sQuery(id+"F8.wireOp",EDGE,"E4")])]}); |
var Q1; |
Q1=makeQuery(id+"F9.opExtrude","SWEPT_BODY",BODY,{"disambiguationData":[OSD([sQuery(id+"F8.wireOp",EDGE,"E5")])]}); |
var Q2; |
Q2=makeQuery(id+"F2.opExtrude","SWEPT_FACE",FACE,{"disambiguationData":[OSD([sQuery(id+"F0.wireOp",EDGE,"E0")])]}); |
transform(context, id + "F11", {"entities" : qUnion([Q0, Q1]), "transformType" : TransformType.TRANSLATION_DISTANCE, "transformDirection" : qUnion([Q2]), "distance" : 349.25 * mm, "makeCopy" : true}); |
} |
}); |
FeatureScript 1511; |
import(path : "onshape/std/geometry.fs", version : "1511.0"); |
import(path : "onshape/std/common.fs", version : "1511.0"); |
const mm = millimeter; |
const VERTEX = EntityType.VERTEX; |
const EDGE = EntityType.EDGE; |
const FACE = EntityType.FACE; |
const BODY = EntityType.BODY; |
function v(x, y){return vector(x, y);} |
function OD(order){return orderDisambiguation(order);} |
function OSD(set){return originalSetDisambiguation(set);} |
function TD(topology){return topologyDisambiguation(topology);} |
function TDD(query){return trueDependencyDisambiguation(query);} |
function sQuery(a, b, c) {return sketchEntityQuery(a, b, c);} |
annotation { "Feature Type Name" : "Feature", "Feature Type Description" : "" } |
export const myFeature = defineFeature(function(context is Context, id is Id, definition is map) |
precondition{} |
{ |
{ |
var Q0; |
Q0=qCreatedBy(makeId("Front.planeOp"),FACE); |
var sketch = newSketch(context, id + "F0", { "sketchPlane" : qUnion([Q0])}); |
skLineSegment(sketch, "E0.bottom", {"start": v(0, 0) * mm, "end": v(1215, 0) * mm}); |
skLineSegment(sketch, "E0.top", {"start": v(0, 495) * mm, "end": v(1215, 495) * mm}); |
skLineSegment(sketch, "E0.left", {"start": v(0, 0) * mm, "end": v(0, 495) * mm}); |
skLineSegment(sketch, "E0.right", {"start": v(1215, 0) * mm, "end": v(1215, 495) * mm}); |
skLineSegment(sketch, "E1.0", {"start": v(16, 16) * mm, "end": v(16, 479) * mm}); |
skLineSegment(sketch, "E1.1", {"start": v(16, 16) * mm, "end": v(1199, 16) * mm}); |
skLineSegment(sketch, "E1.2", {"start": v(1199, 16) * mm, "end": v(1199, 479) * mm}); |
skLineSegment(sketch, "E1.3", {"start": v(16, 479) * mm, "end": v(1199, 479) * mm}); |
skLineSegment(sketch, "E2", {"start": v(607.5, 479) * mm, "end": v(607.5, 16) * mm, "construction": true}); |
skLineSegment(sketch, "E3.0", {"start": v(599.5, 479) * mm, "end": v(599.5, 16) * mm}); |
skLineSegment(sketch, "E4.0", {"start": v(615.5, 479) * mm, "end": v(615.5, 16) * mm}); |
skSolve(sketch); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E0.bottom")}),1.0]])]}); |
var Q1; |
{var subQ1=sQuery(id+"F0.wireOp",EDGE,"E3.0");Q1=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":subQ1}),1.0]])]});} |
extrude(context, id + "F1", {"entities" : qUnion([Q0, Q1]), "depth" : 490 * mm}); |
} |
{ |
var Q0; |
{var subQ2=sQuery(id+"F0.wireOp",EDGE,"E1.0");Q0=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":subQ2}),-1.0]])]});} |
var Q1; |
{var subQ2=sQuery(id+"F0.wireOp",EDGE,"E1.2");Q1=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":subQ2}),1.0]])]});} |
extrude(context, id + "F2", {"entities" : qUnion([Q0, Q1]), "operationType" : NewBodyOperationType.ADD, "depth" : 5 * mm}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F1.opExtrude","CAP_FACE",FACE,{"disambiguationData":[OSD([sQuery(id+"F0.wireOp",EDGE,"E0.bottom"),sQuery(id+"F0.wireOp",EDGE,"E0.top"),sQuery(id+"F0.wireOp",EDGE,"E0.left"),sQuery(id+"F0.wireOp",EDGE,"E0.right"),sQuery(id+"F0.wireOp",EDGE,"E1.0"),sQuery(id+"F0.wireOp",EDGE,"E1.1"),sQuery(id... |
var sketch = newSketch(context, id + "F3", { "sketchPlane" : qUnion([Q0])}); |
skLineSegment(sketch, "E5.bottom", {"start": v(0, 495) * mm, "end": v(605, 495) * mm}); |
skLineSegment(sketch, "E5.top", {"start": v(0, 0) * mm, "end": v(605, 0) * mm}); |
skLineSegment(sketch, "E5.left", {"start": v(0, 495) * mm, "end": v(0, 0) * mm}); |
skLineSegment(sketch, "E5.right", {"start": v(605, 495) * mm, "end": v(605, 0) * mm}); |
skLineSegment(sketch, "E6.bottom", {"start": v(1215, 495) * mm, "end": v(610, 495) * mm}); |
skLineSegment(sketch, "E6.top", {"start": v(1215, 0) * mm, "end": v(610, 0) * mm}); |
skLineSegment(sketch, "E6.left", {"start": v(1215, 495) * mm, "end": v(1215, 0) * mm}); |
skLineSegment(sketch, "E6.right", {"start": v(610, 495) * mm, "end": v(610, 0) * mm}); |
skSolve(sketch); |
} |
{ |
var Q0; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.