text stringlengths 0 7.52k |
|---|
var Q0; |
Q0 = qSketchRegion(id + "F0", true); |
extrude(context, id + "F1", {"entities" : qUnion([Q0]), "depth" : 100 * mm, "offsetDistance" : 25 * mm}); |
} |
}); |
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("Top.planeOp"),FACE); |
var sketch = newSketch(context, id + "F0", { "sketchPlane" : qUnion([Q0])}); |
skCircle(sketch, "E0", {"center": v(0, 0) * mm, "radius": 4.45 * mm}); |
skCircle(sketch, "E1", {"center": v(0, 0) * mm, "radius": 9.53 * mm}); |
skCircle(sketch, "E2", {"center": v(0, 0) * mm, "radius": 5.72 * 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")}),1.0]])]}); |
extrude(context, id + "F1", {"entities" : qUnion([Q0]), "depth" : 3.17 * mm, "offsetDistance" : 25.4 * mm}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E0")}),-1.0]])]}); |
var Q1; |
Q1=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E0")}),1.0]])]}); |
extrude(context, id + "F2", {"entities" : qUnion([Q0, Q1]), "operationType" : NewBodyOperationType.ADD, "oppositeDirection" : true, "depth" : 0.64 * mm, "offsetDistance" : 25.4 * mm}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E1")}),1.0]])]}); |
var Q1; |
Q1=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E0")}),-1.0]])]}); |
var Q2; |
Q2=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":sQuery(id+"F0.wireOp",EDGE,"E0")}),1.0]])]}); |
var Q3; |
Q3=makeQuery(id+"F2.opExtrude","CAP_FACE",FACE,{"disambiguationData":[OSD([sQuery(id+"F0.wireOp",EDGE,"E2")])],"isStart":false}); |
extrude(context, id + "F3", {"entities" : qUnion([Q0, Q1, Q2]), "operationType" : NewBodyOperationType.ADD, "oppositeDirection" : true, "depth" : 2.54 * mm, "offsetDistance" : 25.4 * mm, "hasSecondDirection" : true, "secondDirectionBound" : SecondDirectionBoundingType.UP_TO_SURFACE, "secondDirectionOpposite... |
} |
}); |
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", {"start": v(-38.13, 8.43) * mm, "end": v(-38.13, 16.18) * mm}); |
skLineSegment(sketch, "E1", {"start": v(-38.13, 16.18) * mm, "end": v(-30.08, 20.34) * mm}); |
skLineSegment(sketch, "E2", {"start": v(-30.08, 20.34) * mm, "end": v(-30.08, 32.83) * mm}); |
skLineSegment(sketch, "E3", {"start": v(-13.83, 8.43) * mm, "end": v(-38.13, 8.43) * mm}); |
skLineSegment(sketch, "E4", {"start": v(-45.5, 0) * mm, "end": v(-6.35, 0) * mm, "construction": true}); |
skLineSegment(sketch, "E5", {"start": v(-23.83, 28.16) * mm, "end": v(-23.83, 15.79) * mm}); |
skLineSegment(sketch, "E6", {"start": v(-23.83, 15.79) * mm, "end": v(-13.83, 15.8) * mm}); |
skLineSegment(sketch, "E7", {"start": v(-13.83, 15.8) * mm, "end": v(-13.83, 8.43) * mm}); |
skLineSegment(sketch, "E8", {"start": v(-30.08, 32.83) * mm, "end": v(-30.08, 32.83) * mm}); |
skLineSegment(sketch, "E9", {"start": v(-30.08, 32.83) * mm, "end": v(7.62, 32.83) * mm}); |
skLineSegment(sketch, "E10", {"start": v(7.62, 32.83) * mm, "end": v(7.62, 28.17) * mm}); |
skLineSegment(sketch, "E11", {"start": v(7.62, 28.17) * mm, "end": v(-23.83, 28.16) * mm}); |
skSolve(sketch); |
} |
{ |
var Q0; |
Q0=qSketchRegion(id+"F0",true); |
var Q1; |
Q1=sQuery(id+"F0.wireOp",EDGE,"E4"); |
revolve(context, id + "F1", {"surfaceOperationType" : NewSurfaceOperationType.NEW, "entities" : qUnion([Q0]), "axis" : qUnion([Q1]), "revolveType" : RevolveType.FULL}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.