public void LocalGeometry(BRepClass_Edge E, double U, gp_Dir2d T, gp_Dir2d N, ref double C) { throw new NotImplementedException(); }
public bool Getduv(TopoDS_Face f, gp_Pnt2d uv, gp_Vec dir, double factor, gp_Dir2d duv) { throw new NotImplementedException(); }
public bool UVISO(TopOpeBRepTool_C2DF C2DF, ref bool _isou, ref bool _isov, gp_Dir2d d2d, gp_Pnt2d o2d) { throw new NotImplementedException(); }
/// <summary> /// create a screw /// </summary> /// <param name="widthBase">length of the base</param> /// <param name="diameter">diameter of the screwed part</param> /// <param name="lengthVis">length of the screwed part</param> /// <param name="pas">distance travelled by the helicoidal part after 2*pi</param> /// <param name="heightBase">height of the base</param> /// <param name="profondeurSillon">depth of the screw</param> /// <param name="longueurSillon">length of the helicoidal part</param> public Vis(double widthBase, double diameter, double lengthVis, double pas, double heightBase, double profondeurSillon, double longueurSillon) { // it was hard to parameterize it "correctly", consider taking a screenshot before having fun in modifying it double param6 = 2; // pas / (2 * Math.PI); // pas trop grand please double param10 = pas / (Math.PI / 3); // c'est pour definir le pas double param9 = 0; // -param10/2; // position de la vis ? double param1 = lengthVis - longueurSillon / 2; // position du centre de la partie helicoidale par rapport au bout pointu de la vis double aMinor = 0.05; // epaisseur de la rainure double aMajor = (longueurSillon / pas) * Math.PI; // un pi par tour donc 2*pi = 2 tours // Base /*Cylinder myBase = new Cylinder(widthBase / 2, heightBase); * myBase.Translate(new Pnt(0, 0, -heightBase));//*/ BRepPrimAPI_MakeCylinder aMakeCylinder = new BRepPrimAPI_MakeCylinder(new gp_Ax2(new gp_Pnt(0, 0, -heightBase), new gp_Dir(0, 0, 1)), widthBase / 2, heightBase); TopoDS_Shape myBase = aMakeCylinder.Shape(); // helicoidal part //Cylinder neck = new Cylinder(diameter / 2, lengthVis); BRepPrimAPI_MakeCylinder aMakeCylinder2 = new BRepPrimAPI_MakeCylinder(new gp_Ax2(new gp_Pnt(0, 0, 0), new gp_Dir(0, 0, 1)), diameter / 2, lengthVis); TopoDS_Shape neck = aMakeCylinder2.Shape(); //threading: define 2d curves double depart = param1; gp_Pnt2d aPnt = new gp_Pnt2d(2 * Math.PI, param9); gp_Dir2d aDir = new gp_Dir2d(2 * Math.PI, param10); gp_Ax2d anAx2d = new gp_Ax2d(aPnt, aDir); //double aMinor = longueurSillon/5; // epaisseur de la rainure Geom2d.Geom2d_Ellipse anEllipse1 = new Geom2d.Geom2d_Ellipse(anAx2d, aMajor, aMinor); Geom2d.Geom2d_Ellipse anEllipse2 = new Geom2d.Geom2d_Ellipse(anAx2d, aMajor, aMinor / param6); Geom2d.Geom2d_TrimmedCurve anArc1 = new Geom2d.Geom2d_TrimmedCurve(anEllipse1, 0, Math.PI); Geom2d.Geom2d_TrimmedCurve anArc2 = new Geom2d.Geom2d_TrimmedCurve(anEllipse2, 0, Math.PI); gp_Pnt2d anEllipsePnt1 = anEllipse1.Value(0); gp_Pnt2d anEllipsePnt2 = anEllipse1.Value(Math.PI); GCE2d_MakeSegment aMakeSegment = new GCE2d_MakeSegment(anEllipsePnt1, anEllipsePnt2); Geom2d.Geom2d_TrimmedCurve aSegment = aMakeSegment.Value(); //threading: build edges and wires Geom_CylindricalSurface aCyl1 = new Geom_CylindricalSurface(new gp_Ax3(new gp_Ax2(new gp_Pnt(0, 0, depart), new gp_Dir(0, 0, 1))), (diameter / 2) * 0.99); Geom_CylindricalSurface aCyl2 = new Geom_CylindricalSurface(new gp_Ax3(new gp_Ax2(new gp_Pnt(0, 0, depart), new gp_Dir(0, 0, 1))), (diameter / 2) * (0.99 + profondeurSillon)); // BRepBuilderAPI_MakeEdge aMakeEdge = new BRepBuilderAPI_MakeEdge(anArc1, aCyl1); aMakeEdge.Build(); TopoDS_Edge anEdge1OnSurf1 = aMakeEdge.Edge(); // aMakeEdge = new BRepBuilderAPI_MakeEdge(aSegment, aCyl1); aMakeEdge.Build(); TopoDS_Edge anEdge2OnSurf1 = aMakeEdge.Edge(); // aMakeEdge = new BRepBuilderAPI_MakeEdge(anArc2, aCyl2); aMakeEdge.Build(); TopoDS_Edge anEdge1OnSurf2 = aMakeEdge.Edge(); // aMakeEdge = new BRepBuilderAPI_MakeEdge(aSegment, aCyl2); aMakeEdge.Build(); TopoDS_Edge anEdge2OnSurf2 = aMakeEdge.Edge(); // BRepBuilderAPI_MakeWire aMakeWire = new BRepBuilderAPI_MakeWire(anEdge1OnSurf1, anEdge2OnSurf1); aMakeWire.Build(); TopoDS_Wire threadingWire1 = aMakeWire.Wire(); aMakeWire = new BRepBuilderAPI_MakeWire(anEdge1OnSurf2, anEdge2OnSurf2); aMakeWire.Build(); TopoDS_Wire threadingWire2 = aMakeWire.Wire(); BRepLib.BRepLib.BuildCurves3d(threadingWire1); BRepLib.BRepLib.BuildCurves3d(threadingWire2); //create threading BRepOffsetAPI_ThruSections aTool = new BRepOffsetAPI_ThruSections(true); aTool.AddWire(threadingWire1); aTool.AddWire(threadingWire2); aTool.CheckCompatibility(false); TopoDS_Shape myThreading = aTool.Shape(); // _______fuse_______ BOPAlgo_BOP adder = new BOPAlgo_BOP(); adder.AddArgument(myBase); TopTools_ListOfShape LSA = new TopTools_ListOfShape(); LSA.Append(neck); adder.SetTools(LSA); adder.SetRunParallel(true); adder.SetOperation(BOPAlgo_Operation.BOPAlgo_FUSE); adder.Perform(); TopoDS_Shape myBody = adder.Shape(); // _______fuse_______ BOPAlgo_BOP adder2 = new BOPAlgo_BOP(); adder2.AddArgument(myBody); TopTools_ListOfShape LSA2 = new TopTools_ListOfShape(); LSA2.Append(myThreading); adder2.SetTools(LSA2); adder2.SetRunParallel(true); adder2.SetOperation(BOPAlgo_Operation.BOPAlgo_FUSE); adder2.Perform(); myBody = adder2.Shape(); // _______triangulation_______ myFaces = Triangulation(myBody, 0.007f); }
public TColgp_Array1OfDir2d(gp_Dir2d theBegin, int theLower, int theUpper) : base() { throw new NotImplementedException(); }
public gce_MakeMirror2d(gp_Pnt2d Point, gp_Dir2d Direc) : base() { throw new NotImplementedException(); }
public void Normal(gp_Dir2d N) { throw new NotImplementedException(); }
public Geom2d_Direction(gp_Dir2d V) : base() { throw new NotImplementedException(); }
public gce_MakeLin2d(gp_Pnt2d P, gp_Dir2d V) : base() { throw new NotImplementedException(); }
public Adaptor2d_Line2d(gp_Pnt2d P, gp_Dir2d D, double UFirst, double ULast) : base() { throw new NotImplementedException(); }
public void SetDirections(gp_Vec V, gp_Dir2d D) { throw new NotImplementedException(); }
public void fillIndexTable(gp_Dir2d theTable) { throw new NotImplementedException(); }
public TColgp_HArray2OfDir2d(int theRowLow, int theRowUpp, int theColLow, int theColUpp, gp_Dir2d theValue) : base() { throw new NotImplementedException(); }
public GCE2d_MakeLine(gp_Pnt2d P, gp_Dir2d V) : base() { throw new NotImplementedException(); }
public void Append(gp_Dir2d theItem) { throw new NotImplementedException(); }
public gp_Dir To3d(gp_Ax2 Pos, gp_Dir2d V) { throw new NotImplementedException(); }
public void LocalGeometry(Geom2dAdaptor_Curve E, double U, gp_Dir2d T, gp_Dir2d N, ref double C) { throw new NotImplementedException(); }
public void Set(gp_Pnt2d thePnt, gp_Dir2d theDir) { throw new NotImplementedException(); }
public void Tangent(gp_Dir2d D) { throw new NotImplementedException(); }
public TColgp_HArray1OfDir2d(int theLower, int theUpper, gp_Dir2d theValue) : base() { throw new NotImplementedException(); }
public Geom2dGcc_FunctionTanObl(Geom2dAdaptor_Curve Curve, gp_Dir2d Dir) : base() { throw new NotImplementedException(); }
public Geom2d_AxisPlacement(gp_Pnt2d P, gp_Dir2d V) : base() { throw new NotImplementedException(); }
public void SetValue(int theIndex, gp_Dir2d theItem) { throw new NotImplementedException(); }
public void SetDirection(gp_Dir2d V) { throw new NotImplementedException(); }
public void Init(gp_Dir2d theValue) { throw new NotImplementedException(); }
public GCE2d_MakeSegment(gp_Pnt2d P1, gp_Dir2d V, gp_Pnt2d P2) : base() { throw new NotImplementedException(); }
public bool UVISO(Geom2d_Curve PC, ref bool _isou, ref bool _isov, gp_Dir2d d2d, gp_Pnt2d o2d) { throw new NotImplementedException(); }
public void InsertAfter(int theIndex, gp_Dir2d theItem) { throw new NotImplementedException(); }
public bool UVISO(TopoDS_Edge E, TopoDS_Face F, ref bool _isou, ref bool _isov, gp_Dir2d d2d, gp_Pnt2d o2d) { throw new NotImplementedException(); }
public void AddLine(gp_Dir2d D, double D_ist) { throw new NotImplementedException(); }