text stringlengths 0 7.52k |
|---|
} |
}); |
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(0, 0) * mm, "end": v(8, 0) * mm}); |
skLineSegment(sketch, "E1", {"start": v(0, 3.15) * mm, "end": v(4, 3.15) * mm}); |
skLineSegment(sketch, "E2", {"start": v(4, 3.15) * mm, "end": v(4, 7.25) * mm}); |
skLineSegment(sketch, "E3", {"start": v(4, 7.25) * mm, "end": v(8, 7.25) * mm}); |
skLineSegment(sketch, "E4", {"start": v(8, 7.25) * mm, "end": v(8, 20) * mm}); |
skLineSegment(sketch, "E5", {"start": v(8, 20) * mm, "end": v(3.7, 20) * mm}); |
skLineSegment(sketch, "E6.0.MirrorCS", {"start": v(0, -3.15) * mm, "end": v(4, -3.15) * mm}); |
skLineSegment(sketch, "E7.0.MirrorCS", {"start": v(4, -3.15) * mm, "end": v(4, -7.25) * mm}); |
skLineSegment(sketch, "E8.0.MirrorCS", {"start": v(4, -7.25) * mm, "end": v(8, -7.25) * mm}); |
skLineSegment(sketch, "E9.0.MirrorCS", {"start": v(8, -7.25) * mm, "end": v(8, -20) * mm}); |
skLineSegment(sketch, "E10.0.MirrorCS", {"start": v(8, -20) * mm, "end": v(3.7, -20) * mm}); |
skArc(sketch, "E11", {"start": v(3.7, 20) * mm, "mid": v(0, 0) * mm, "end": v(3.7, -20) * mm}); |
skSolve(sketch); |
} |
{ |
var Q0; |
{var subQ4=sQuery(id+"F0.wireOp",EDGE,"E2");Q0=makeQuery(id+"F0.imprint","IMPRINT",FACE,{"disambiguationData":[TD([[makeQuery(id+"F0.imprint","IMPRINT",EDGE,{"derivedFrom":subQ4}),1.0]])]});} |
var Q1; |
Q1=sQuery(id+"F0.wireOp",EDGE,"E0"); |
revolve(context, id + "F1", {"entities" : qUnion([Q0]), "axis" : qUnion([Q1]), "revolveType" : RevolveType.FULL}); |
} |
}); |
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(-35.08, 19.71) * mm, "end": v(43.2, 19.71) * mm}); |
skLineSegment(sketch, "E0.top", {"start": v(-35.08, -17.1) * mm, "end": v(43.2, -17.1) * mm}); |
skLineSegment(sketch, "E0.left", {"start": v(-35.08, 19.71) * mm, "end": v(-35.08, -17.1) * mm}); |
skLineSegment(sketch, "E0.right", {"start": v(43.2, 19.71) * mm, "end": v(43.2, -17.1) * 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]])]}); |
extrude(context, id + "F1", {"entities" : qUnion([Q0]), "depth" : 26.33 * mm}); |
} |
{ |
var Q0; |
Q0=makeQuery(id+"F1.opExtrude","CAP_EDGE",EDGE,{"disambiguationData":[OSD([sQuery(id+"F0.wireOp",EDGE,"E0.top")])],"isStart":false}); |
fillet(context, id + "F2", {"entities" : qUnion([Q0]), "radius" : 10.16 * mm, "tangentPropagation" : true, "allowEdgeOverflow" : false}); |
} |
}); |
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);} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.