diff --git a/modules/workbenches/modeler/features/hole_tool/docs/index.md b/modules/workbenches/modeler/features/hole_tool/docs/index.md new file mode 100644 index 00000000..e332fb6d --- /dev/null +++ b/modules/workbenches/modeler/features/hole_tool/docs/index.md @@ -0,0 +1 @@ +place holder \ No newline at end of file diff --git a/modules/workbenches/modeler/features/occ-bottle/icon.svg b/modules/workbenches/modeler/features/hole_tool/icon.svg similarity index 100% rename from modules/workbenches/modeler/features/occ-bottle/icon.svg rename to modules/workbenches/modeler/features/hole_tool/icon.svg diff --git a/modules/workbenches/modeler/features/hole_tool/index.ts b/modules/workbenches/modeler/features/hole_tool/index.ts new file mode 100644 index 00000000..ca84d656 --- /dev/null +++ b/modules/workbenches/modeler/features/hole_tool/index.ts @@ -0,0 +1,130 @@ +import { ApplicationContext } from 'context'; +import { MBrepShell } from 'cad/model/mshell'; +import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; +import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; + +export default { + id: 'hole_tool', + label: 'hole_tool', + icon, + info: 'hole_tool', + mutualExclusiveFields: [], + paramsInfo: ({ diameter, + depth, + counterBoreDiameter, + counterBoreDepth, + countersinkDiameter, + countersinkAngle, + holeType, }) => `(${r(depth)} ${r(counterBoreDiameter)}) ${r(counterBoreDepth)})`, + run: ({ + diameter, + depth, + counterBoreDiameter, + counterBoreDepth, + countersinkDiameter, + countersinkAngle, + holeType, + }, ctx: ApplicationContext) => { + const oc = ctx.occService.occContext; + + const myLocation = new oc.gp_Pnt_3(0, 0, 0); + const cylinderCenterline = oc.gp.DZ(); + const cylinderOrientationAndLocation = new oc.gp_Ax2_3(myLocation, cylinderCenterline); + + + let myBody = new oc.BRepPrimAPI_MakeCylinder_3(cylinderOrientationAndLocation, diameter / 2, depth,); + + + if (holeType == "counterbore") { + let counterboreItem = new oc.BRepPrimAPI_MakeCylinder_3(cylinderOrientationAndLocation, counterBoreDiameter, counterBoreDepth,); + myBody = new oc.BRepAlgoAPI_Fuse_3(myBody.Shape(), counterboreItem.Shape()); + } + + + + if (holeType == "countersink") { + let heightFromDiameterAndAngle = (countersinkDiameter - diameter) / (2 * Math.tan((countersinkAngle / 180 * Math.PI) / 2)); + let countersinkItem = new oc.BRepPrimAPI_MakeCone_1(countersinkDiameter / 2, diameter / 2, heightFromDiameterAndAngle); + myBody = new oc.BRepAlgoAPI_Fuse_3(myBody.Shape(), countersinkItem.Shape()); + } + + + const aRes = new oc.TopoDS_Compound(); + const aBuilder = new oc.BRep_Builder(); + aBuilder.MakeCompound(aRes); + aBuilder.Add(aRes, myBody.Shape()); + + + const mobject = new MBrepShell(occ2brep(aRes, ctx.occService.occContext)); + return { + consumed: [], + created: [mobject] + }; + }, + schema: { + diameter: { + type: 'number', + defaultValue: 10, + label: 'Hole ⌀' + }, + depth: { + type: 'number', + defaultValue: 100, + label: 'Hole ↧' + }, + + + holeType: { + type: 'TextField', + defaultValue: "counterbore", + label: 'HoleType', + children: [ + "counterbore", + "countersink", + "normal", + ], + }, + + + counterBoreDiameter: { + type: 'number', + defaultValue: 20, + label: '⌴ ⌀' + }, + counterBoreDepth: { + type: 'number', + defaultValue: 10, + label: '⌴ ↧' + }, + + + + countersinkDiameter: { + type: 'number', + defaultValue: 20, + label: '⌵ ⌀' + }, + countersinkAngle: { + type: 'number', + defaultValue: 90, + label: '⌵ Angle' + }, + } +} + + + + + + + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/hole_tool/old.index.ts.md b/modules/workbenches/modeler/features/hole_tool/old.index.ts.md new file mode 100644 index 00000000..4fc7c980 --- /dev/null +++ b/modules/workbenches/modeler/features/hole_tool/old.index.ts.md @@ -0,0 +1,82 @@ +import { ApplicationContext } from 'context'; +import { MBrepShell } from 'cad/model/mshell'; +import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; +import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; + +export default { + id: 'hole', + label: 'hole', + icon, + info: 'hole', + mutualExclusiveFields: [], + paramsInfo: ({ diameter, depth, counterBoreDiameter, counterBoreDepth, countersinkDiameter, countersinkAngle,}) => `(${r(diameter)} ${r(depth)})`, + run: ({ diameter, depth, counterBoreDiameter, counterBoreDepth, countersinkDiameter, countersinkAngle, }, ctx: ApplicationContext) => { + //const occObj = createCylinder(diameter, height, ctx.occService.occContext); + const oc = ctx.occService.occContext; + + const myLocation = new oc.gp_Pnt_3(0, 0, 0); + const cylinderCenterline = oc.gp.DZ(); + const cylinderOrientationAndLocation = new oc.gp_Ax2_3(myLocation, cylinderCenterline); + + + let primaryHole = new oc.BRepPrimAPI_MakeCylinder_3(cylinderOrientationAndLocation, diameter, depth,); + + + + //let myBody = new oc.BRepPrimAPI_Make + + const aRes = new oc.TopoDS_Compound(); + const aBuilder = new oc.BRep_Builder(); + aBuilder.MakeCompound(aRes); + aBuilder.Add(aRes, primaryHole.Shape()); + + + + const mobject = new MBrepShell(occ2brep(aRes, ctx.occService.occContext)); + return { + consumed: [], + created: [mobject] + }; + }, + schema: { + diameter: { + type: 'number', + defaultValue: 10, + label: 'diameter' + }, + depth: { + type: 'number', + defaultValue: 100, + label: 'depth' + }, + + + + counterBoreDiameter: { + type: 'number', + defaultValue: 200, + label: 'diameter' + }, + counterBoreDepth: { + type: 'number', + defaultValue: 280, + label: 'counterBoreDepth' + }, + + + + countersinkDiameter: { + type: 'number', + defaultValue: 200, + label: 'countersinkDiameter' + }, + countersinkAngle: { + type: 'number', + defaultValue: 90, + label: 'Countersink Angle' + }, + + } +} + diff --git a/modules/workbenches/modeler/features/occ-bottle/bottle.occ.ts b/modules/workbenches/modeler/features/occ-bottle/bottle.occ.ts deleted file mode 100644 index 9682ec55..00000000 --- a/modules/workbenches/modeler/features/occ-bottle/bottle.occ.ts +++ /dev/null @@ -1,137 +0,0 @@ -export function createOCCBottle(myWidth: number, myHeight: number, myThickness: number, oc: any) { - - const aPnt1 = new oc.gp_Pnt_3(-myWidth / 2., 0, 0); - const aPnt2 = new oc.gp_Pnt_3(-myWidth / 2., -myThickness / 4., 0); - const aPnt3 = new oc.gp_Pnt_3(0, -myThickness / 2., 0); - const aPnt4 = new oc.gp_Pnt_3(myWidth / 2., -myThickness / 4., 0); - const aPnt5 = new oc.gp_Pnt_3(myWidth / 2., 0, 0); - - // Profile : Define the Geometry - const anArcOfCircle = new oc.GC_MakeArcOfCircle_4(aPnt2, aPnt3, aPnt4); - const aSegment1 = new oc.GC_MakeSegment_1(aPnt1, aPnt2); - const aSegment2 = new oc.GC_MakeSegment_1(aPnt4, aPnt5); - - // Profile : Define the Topology - const anEdge1 = new oc.BRepBuilderAPI_MakeEdge_24(new oc.Handle_Geom_Curve_2(aSegment1.Value().get())); - const anEdge2 = new oc.BRepBuilderAPI_MakeEdge_24(new oc.Handle_Geom_Curve_2(anArcOfCircle.Value().get())); - const anEdge3 = new oc.BRepBuilderAPI_MakeEdge_24(new oc.Handle_Geom_Curve_2(aSegment2.Value().get())); - const aWire = new oc.BRepBuilderAPI_MakeWire_4(anEdge1.Edge(), anEdge2.Edge(), anEdge3.Edge()); - - // Complete Profile - const xAxis = oc.gp.OX(); - const aTrsf = new oc.gp_Trsf_1(); - - aTrsf.SetMirror_2(xAxis); - const aBRepTrsf = new oc.BRepBuilderAPI_Transform_2(aWire.Wire(), aTrsf, false); - const aMirroredShape = aBRepTrsf.Shape(); - - const mkWire = new oc.BRepBuilderAPI_MakeWire_1(); - mkWire.Add_2(aWire.Wire()); - mkWire.Add_2(oc.TopoDS.Wire_1(aMirroredShape)); - const myWireProfile = mkWire.Wire(); - - // Body : Prism the Profile - const myFaceProfile = new oc.BRepBuilderAPI_MakeFace_15(myWireProfile, false); - const aPrismVec = new oc.gp_Vec_4(0, 0, myHeight); - let myBody = new oc.BRepPrimAPI_MakePrism_1(myFaceProfile.Face(), aPrismVec, false, true); - - // Body : Apply Fillets - const mkFillet = new oc.BRepFilletAPI_MakeFillet(myBody.Shape(), oc.ChFi3d_FilletShape.ChFi3d_Rational); - const anEdgeExplorer = new oc.TopExp_Explorer_2(myBody.Shape(), oc.TopAbs_ShapeEnum.TopAbs_EDGE, oc.TopAbs_ShapeEnum.TopAbs_SHAPE); - while(anEdgeExplorer.More()) { - const anEdge = oc.TopoDS.Edge_1(anEdgeExplorer.Current()); - // Add edge to fillet algorithm - mkFillet.Add_2(myThickness / 12., anEdge); - anEdgeExplorer.Next(); - } - myBody = mkFillet.Shape(); - - // Body : Add the Neck - const neckLocation = new oc.gp_Pnt_3(0, 0, myHeight); - const neckAxis = oc.gp.DZ(); - const neckAx2 = new oc.gp_Ax2_3(neckLocation, neckAxis); - - const myNeckRadius = myThickness / 4.; - const myNeckHeight = myHeight / 10.; - - const MKCylinder = new oc.BRepPrimAPI_MakeCylinder_3(neckAx2, myNeckRadius, myNeckHeight); - const myNeck = MKCylinder.Shape(); - - myBody = new oc.BRepAlgoAPI_Fuse_3(myBody, myNeck); - - // Body : Create a Hollowed Solid - let faceToRemove; - let zMax = -1; - const aFaceExplorer = new oc.TopExp_Explorer_2(myBody.Shape(), oc.TopAbs_ShapeEnum.TopAbs_FACE, oc.TopAbs_ShapeEnum.TopAbs_SHAPE); - for(; aFaceExplorer.More(); aFaceExplorer.Next()) { - const aFace = oc.TopoDS.Face_1(aFaceExplorer.Current()); - // Check if is the top face of the bottle's neck - const aSurface = oc.BRep_Tool.Surface_2(aFace); - if(aSurface.get().$$.ptrType.name === "Geom_Plane*") { - const aPlane = new oc.Handle_Geom_Plane_2(aSurface.get()).get(); - const aPnt = aPlane.Location(); - const aZ = aPnt.Z(); - if(aZ > zMax) { - zMax = aZ; - faceToRemove = new oc.TopExp_Explorer_2(aFace, oc.TopAbs_ShapeEnum.TopAbs_FACE, oc.TopAbs_ShapeEnum.TopAbs_SHAPE).Current(); - } - } - } - - const facesToRemove = new oc.TopTools_ListOfShape_1(); - facesToRemove.Append_1(faceToRemove); - const s = myBody.Shape(); - myBody = new oc.BRepOffsetAPI_MakeThickSolid_1(); - myBody.MakeThickSolidByJoin(s, facesToRemove, -myThickness / 50, 1.e-3, oc.BRepOffset_Mode.BRepOffset_Skin, false, false, oc.GeomAbs_JoinType.GeomAbs_Arc, false); - // Threading : Create Surfaces - const aCyl1 = new oc.Geom_CylindricalSurface_1(new oc.gp_Ax3_2(neckAx2), myNeckRadius * 0.99); - const aCyl2 = new oc.Geom_CylindricalSurface_1(new oc.gp_Ax3_2(neckAx2), myNeckRadius * 1.05); - - // Threading : Define 2D Curves - const aPnt = new oc.gp_Pnt2d_3(2. * Math.PI, myNeckHeight / 2.); - const aDir = new oc.gp_Dir2d_4(2. * Math.PI, myNeckHeight / 4.); - const anAx2d = new oc.gp_Ax2d_2(aPnt, aDir); - - const aMajor = 2. * Math.PI; - const aMinor = myNeckHeight / 10; - - const anEllipse1 = new oc.Geom2d_Ellipse_2(anAx2d, aMajor, aMinor, true); - const anEllipse2 = new oc.Geom2d_Ellipse_2(anAx2d, aMajor, aMinor / 4, true); - const anArc1 = new oc.Geom2d_TrimmedCurve(new oc.Handle_Geom2d_Curve_2(anEllipse1), 0, Math.PI, true, true); - const anArc2 = new oc.Geom2d_TrimmedCurve(new oc.Handle_Geom2d_Curve_2(anEllipse2), 0, Math.PI, true, true); - const tmp1 = anEllipse1.Value(0); - const anEllipsePnt1 = new oc.gp_Pnt2d_3(tmp1.X(), tmp1.Y()); - const tmp2 = anEllipse1.Value(Math.PI); - const anEllipsePnt2 = new oc.gp_Pnt2d_3(tmp2.X(), tmp2.Y()); - - const aSegment = new oc.GCE2d_MakeSegment_1(anEllipsePnt1, anEllipsePnt2); - // Threading : Build Edges and Wires - const anEdge1OnSurf1 = new oc.BRepBuilderAPI_MakeEdge_30(new oc.Handle_Geom2d_Curve_2(anArc1), new oc.Handle_Geom_Surface_2(aCyl1)); - const anEdge2OnSurf1 = new oc.BRepBuilderAPI_MakeEdge_30(new oc.Handle_Geom2d_Curve_2(aSegment.Value().get()), new oc.Handle_Geom_Surface_2(aCyl1)); - const anEdge1OnSurf2 = new oc.BRepBuilderAPI_MakeEdge_30(new oc.Handle_Geom2d_Curve_2(anArc2), new oc.Handle_Geom_Surface_2(aCyl2)); - const anEdge2OnSurf2 = new oc.BRepBuilderAPI_MakeEdge_30(new oc.Handle_Geom2d_Curve_2(aSegment.Value().get()), new oc.Handle_Geom_Surface_2(aCyl2)); - const threadingWire1 = new oc.BRepBuilderAPI_MakeWire_3(anEdge1OnSurf1.Edge(), anEdge2OnSurf1.Edge()); - const threadingWire2 = new oc.BRepBuilderAPI_MakeWire_3(anEdge1OnSurf2.Edge(), anEdge2OnSurf2.Edge()); - oc.BRepLib.BuildCurves3d_2(threadingWire1.Wire()); - oc.BRepLib.BuildCurves3d_2(threadingWire2.Wire()); - oc.BRepLib.BuildCurves3d_2(threadingWire1.Wire()); - oc.BRepLib.BuildCurves3d_2(threadingWire2.Wire()); - - // Create Threading - const aTool = new oc.BRepOffsetAPI_ThruSections(true, false, 1.0e-06); - aTool.AddWire(threadingWire1.Wire()); - aTool.AddWire(threadingWire2.Wire()); - aTool.CheckCompatibility(false); - - const myThreading = aTool.Shape(); - - // Building the Resulting Compound - const aRes = new oc.TopoDS_Compound(); - const aBuilder = new oc.BRep_Builder(); - aBuilder.MakeCompound(aRes); - aBuilder.Add(aRes, myBody.Shape()); - aBuilder.Add(aRes, myThreading); - - return aRes; - - } diff --git a/modules/workbenches/modeler/features/occ-bottle/index.ts b/modules/workbenches/modeler/features/occ-bottle/index.ts deleted file mode 100644 index 6e128a2c..00000000 --- a/modules/workbenches/modeler/features/occ-bottle/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ApplicationContext } from 'context'; -import { MBrepShell } from 'cad/model/mshell'; -import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; -import { createOCCBottle } from './bottle.occ'; -import { occ2brep } from 'cad/occ/occ2models'; -import icon from './icon.svg'; - -export default { - id: 'OCC_BOTTLE', - label: 'OCC Bottle', - icon, - info: 'create occ bottle', - mutualExclusiveFields: [], - - - paramsInfo: ({ width, height, thickness }) => `(${r(width)} ${r(height)} ${r(thickness)})`, - run: ({ width, height, thickness }, ctx: ApplicationContext) => { - const occObj = createOCCBottle(width, height, thickness, ctx.occService.occContext); - const mobject = new MBrepShell(occ2brep(occObj, ctx.occService.occContext)); - return { - consumed: [], - created: [mobject] - }; - }, - schema: { - width: { - type: 'number', - defaultValue: 200, - label: 'width' - }, - height: { - type: 'number', - defaultValue: 280, - label: 'height' - }, - thickness: { - type: 'number', - min: 0, - label: 'thickness', - defaultValue: 150 - } - } -} diff --git a/modules/workbenches/modeler/features/primitive_box/icon.svg b/modules/workbenches/modeler/features/primitive_box/icon.svg new file mode 100644 index 00000000..78b99920 --- /dev/null +++ b/modules/workbenches/modeler/features/primitive_box/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/primitive_box/index.ts b/modules/workbenches/modeler/features/primitive_box/index.ts index 16e8f832..2c905a18 100644 --- a/modules/workbenches/modeler/features/primitive_box/index.ts +++ b/modules/workbenches/modeler/features/primitive_box/index.ts @@ -2,11 +2,12 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; export default { id: 'primitive_box', label: 'primitive_box', - icon: 'img/cad/extrude', + icon, info: 'primitive_box', mutualExclusiveFields: [], paramsInfo: ({ boxX, boxY, boxZ }) => `(${r(boxX)} ${r(boxY)}) ${r(boxZ)})`, diff --git a/modules/workbenches/modeler/features/primitive_cone/icon.svg b/modules/workbenches/modeler/features/primitive_cone/icon.svg new file mode 100644 index 00000000..78b99920 --- /dev/null +++ b/modules/workbenches/modeler/features/primitive_cone/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/primitive_cone/index.ts b/modules/workbenches/modeler/features/primitive_cone/index.ts index 27916940..af895b65 100644 --- a/modules/workbenches/modeler/features/primitive_cone/index.ts +++ b/modules/workbenches/modeler/features/primitive_cone/index.ts @@ -2,11 +2,12 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; export default { id: 'primitive_cone', label: 'primitive_cone', - icon: 'img/cad/extrude', + icon, info: 'primitive_cone', mutualExclusiveFields: [], paramsInfo: ({ diameter, height }) => `(${r(diameter)} ${r(height)})`, diff --git a/modules/workbenches/modeler/features/primitive_cylinder/icon.svg b/modules/workbenches/modeler/features/primitive_cylinder/icon.svg new file mode 100644 index 00000000..78b99920 --- /dev/null +++ b/modules/workbenches/modeler/features/primitive_cylinder/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/primitive_cylinder/index.ts b/modules/workbenches/modeler/features/primitive_cylinder/index.ts index a41186cb..e91375c5 100644 --- a/modules/workbenches/modeler/features/primitive_cylinder/index.ts +++ b/modules/workbenches/modeler/features/primitive_cylinder/index.ts @@ -2,11 +2,12 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; export default { id: 'primitive_cylinder', label: 'primitive_cylinder', - icon: 'img/cad/extrude', + icon, info: 'primitive_cylinder', mutualExclusiveFields: [], paramsInfo: ({ diameter, height }) => `(${r(diameter)} ${r(height)})`, diff --git a/modules/workbenches/modeler/features/primitive_sphere/icon.svg b/modules/workbenches/modeler/features/primitive_sphere/icon.svg new file mode 100644 index 00000000..78b99920 --- /dev/null +++ b/modules/workbenches/modeler/features/primitive_sphere/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/primitive_sphere/index.ts b/modules/workbenches/modeler/features/primitive_sphere/index.ts index 2ec9beea..38c88c47 100644 --- a/modules/workbenches/modeler/features/primitive_sphere/index.ts +++ b/modules/workbenches/modeler/features/primitive_sphere/index.ts @@ -2,11 +2,12 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.svg'; export default { id: 'primitive_sphere', label: 'primitive_sphere', - icon: 'img/cad/extrude', + icon, info: 'primitive_sphere', mutualExclusiveFields: [], paramsInfo: ({ diameter }) => `(${r(diameter)} )`, diff --git a/modules/workbenches/modeler/features/primitive_torus/icon96.png b/modules/workbenches/modeler/features/primitive_torus/icon.png similarity index 100% rename from modules/workbenches/modeler/features/primitive_torus/icon96.png rename to modules/workbenches/modeler/features/primitive_torus/icon.png diff --git a/modules/workbenches/modeler/features/primitive_torus/icon32.png b/modules/workbenches/modeler/features/primitive_torus/icon32.png deleted file mode 100644 index 8c7438e0..00000000 Binary files a/modules/workbenches/modeler/features/primitive_torus/icon32.png and /dev/null differ diff --git a/modules/workbenches/modeler/features/primitive_torus/index.ts b/modules/workbenches/modeler/features/primitive_torus/index.ts index a4715680..40d80087 100644 --- a/modules/workbenches/modeler/features/primitive_torus/index.ts +++ b/modules/workbenches/modeler/features/primitive_torus/index.ts @@ -2,11 +2,12 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; +import icon from './icon.png'; export default { id: 'primitive_torus', label: 'primitive_torus', - icon: 'img/cad/extrude', + icon, info: 'primitive_torus', mutualExclusiveFields: [], paramsInfo: ({ radius, tubeRadius }) => `(${r(radius)} ${r(tubeRadius)} )`, diff --git a/modules/workbenches/modeler/index.ts b/modules/workbenches/modeler/index.ts index 399cd3ee..b3499630 100644 --- a/modules/workbenches/modeler/index.ts +++ b/modules/workbenches/modeler/index.ts @@ -5,17 +5,18 @@ import primitive_cone from './features/primitive_cone'; import primitive_cylinder from './features/primitive_cylinder'; import primitive_sphere from './features/primitive_sphere'; import primitive_torus from './features/primitive_torus'; +import hole_tool from './features/hole_tool'; export default { workbenchId: 'modeler', features: [ EXTRUDE, - OCC_BOTTLE, primitive_box, primitive_cone, primitive_cylinder, primitive_sphere, - primitive_torus + primitive_torus, + hole_tool, ] } \ No newline at end of file diff --git a/web/app/cad/part/menuConfig.js b/web/app/cad/part/menuConfig.js index 7188790d..ed426309 100644 --- a/web/app/cad/part/menuConfig.js +++ b/web/app/cad/part/menuConfig.js @@ -9,7 +9,7 @@ export default [ id: 'craft', cssIcons: ['magic'], info: 'set of available craft operations on a solid', - actions: ['EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', 'SHELL', 'FILLET', 'DATUM_CREATE'] + actions: ['EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', 'SHELL', 'FILLET', 'DATUM_CREATE', ] }, { id: 'primitives', diff --git a/web/app/cad/part/uiConfigPlugin.js b/web/app/cad/part/uiConfigPlugin.js index 1e5fffde..8118a9d7 100644 --- a/web/app/cad/part/uiConfigPlugin.js +++ b/web/app/cad/part/uiConfigPlugin.js @@ -10,9 +10,7 @@ import Expressions from '../expressions/Expressions'; import {SelectionView} from "../dom/components/SelectionView"; import {GrSelect} from "react-icons/gr"; -export const STANDARD_MODE_HEADS_UP_TOOLBAR = ['DATUM_CREATE', 'PLANE', 'EditFace', 'EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', - '-', 'FILLET', '-', 'INTERSECTION', 'SUBTRACT', 'UNION', '-', 'IMPORT_PART', "IMPORT_STEP_FILE", "IMPORT_STEP_LOCAL_FILE", - "ExportFaceToDXF", 'OCC_BOTTLE', "primitive_cylinder", "primitive_box", "primitive_cone", "primitive_sphere","primitive_torus"]; +export const STANDARD_MODE_HEADS_UP_TOOLBAR = ['DATUM_CREATE', 'PLANE', 'EditFace', '-', 'INTERSECTION', 'SUBTRACT', 'UNION', '-', "primitive_cylinder", "primitive_box", "primitive_cone", "primitive_sphere", "primitive_torus", "hole_tool", ]; export function activate({services, streams}) { streams.ui.controlBars.left.value = ['menu.file', 'menu.craft', 'menu.boolean', 'menu.primitives', 'menu.views', 'Donate', 'GitHub'];