OCCT基础类库介绍:Modeling Algorithm - Features

Features

特征

This library contained in BRepFeat package is necessary for creation and manipulation of form and mechanical features that go beyond the classical boundary representation of shapes. In that sense, BRepFeat is an extension of BRepBuilderAPI package.
包含在 BRepFeat 包中的该库,用于创建和操作超出形状经典边界表示的形状特征和机械特征。从这个意义上讲,BRepFeatBRepBuilderAPI 包的扩展。

Form Features

形状特征

The form features are depressions or protrusions including the following types:
形状特征是指凹坑或凸起,包括以下类型:

  • Cylinder;
    圆柱体;
  • Draft Prism;
    拔模棱柱;
  • Prism;
    棱柱;
  • Revolved feature;
    旋转特征;
  • Pipe.
    管道。

Depending on whether you wish to make a depression or a protrusion, you can choose either to remove matter (Boolean cut: Fuse equal to 0) or to add it (Boolean fusion: Fuse equal to 1).
根据需要创建凹坑或凸起,可选择去除材料(布尔切割:Fuse等于0)或添加材料(布尔融合:Fuse等于1)。

The semantics of form feature creation is based on the construction of shapes:
形状特征创建的语义基于以下形状构造方式:

  • for a certain length in a certain direction;
    在特定方向上延伸特定长度;
  • up to the limiting face;
    延伸至限制面;
  • from the limiting face at a height;
    从限制面起按高度延伸;
  • above and/or below a plane.
    在平面上方和/或下方。

The shape defining the construction of a feature can be either a supporting edge or a concerned area of a face.
定义特征构造的形状可以是支撑边或面的相关区域。

In case of supporting edge, this contour can be attached to a face of the basis shape by binding. When the contour is bound to this face, the information that the contour will slide on the face becomes available to the relevant class methods. In case of the concerned area of a face, you can, for example, cut it out and move it at a different height, which defines the limiting face of a protrusion or depression.

Topological definition with local operations of this sort makes calculations simpler and faster than a global operation. The latter would entail a second phase of removing unwanted matter to get the same result.

The Form from BRepFeat package is a deferred class used as a root for form features. It inherits MakeShape from BRepBuilderAPI and provides implementation of methods keep track of all sub-shapes.

在支撑边的情况下,该轮廓可通过绑定方式附着到基础形状的某个面上。当此轮廓绑定到该面时,“轮廓将在面上滑动” 的信息便可供相关类方法使用。对于面的相关区域,例如可将其切割出来并在不同高度移动,这定义了凸起或凹陷的限制面。

这种通过局部操作进行的拓扑定义,使得计算相比全局操作更为简单且快速。后者需要通过第二阶段去除多余部分才能获得相同结果。

BRepFeat 包中的 Form 是一个延迟类,用作形状特征的根类。它从 BRepBuilderAPI 继承了 MakeShape,并提供了用于跟踪所有子形状的方法实现。

Prism

The class BRepFeat_MakePrism is used to build a prism interacting with a shape. It is created or initialized from
BRepFeat_MakePrism 类用于构建与形状交互的棱柱体。其创建或初始化基于以下参数:

  • a shape (the basic shape),
    一个形状(基础形状),
  • the base of the prism,
    棱柱的底面,
  • a face (the face of sketch on which the base has been defined and used to determine whether the base has been defined on the basic shape or not),
    一个面(草图所在的面,底面在此面上定义,用于判断底面是否定义在基础形状上),
  • a direction,
    一个方向,
  • a Boolean indicating the type of operation (fusion=protrusion or cut=depression) on the basic shape,
    一个布尔值,指示对基础形状执行的操作类型(融合=凸起或切割=凹陷),
  • another Boolean indicating if the self-intersections have to be found (not used in every case).
    另一个布尔值,指示是否需要查找自相交(非所有情况均使用)。

There are six Perform methods:
共有六种 Perform 方法:

MethodDescription
Perform(Height)生成的棱柱具有给定的长度。
Perform(Until)棱柱定义于底面位置与给定面之间。
Perform(From, Until)棱柱定义于两个面 From 和 Until 之间。
PerformUntilEnd()棱柱为半无限延伸,由底面的实际位置限制。
PerformFromEnd(Until)棱柱为半无限延伸,由面 Until 限制。
PerformThruAll()棱柱为无限延伸。若为凹陷操作,结果类似用无限棱柱切割;若为凸起操作,结果不保留无限部分。

Note that Add method can be used before Perform methods to indicate that a face generated by an edge slides onto a face of the base shape.
注意:可在调用 Perform 方法前使用 Add 方法,用于指示边生成的面在基础形状的面上滑动。

代码示例

以下代码执行凸起操作(即将形状的面转换为棱柱):

TopoDS_Shape Sbase = ...;  // 初始形状  
TopoDS_Face Fbase = ....; // 棱柱底面  gp_Dir Extrusion (.,.,.);  //  extrusion 方向  // 传入空面作为草图面  
BRepFeat_MakePrism thePrism(Sbase, Fbase, TopoDS_Face(),  Extrusion, Standard_True, Standard_True);  thePrism.Perform(100.);  // 执行高度为100的棱柱操作  
if (thePrism.IsDone()) {  TopoDS_Shape theResult = thePrism;  // 后续处理  ... 
}

在这里插入图片描述
Fusion with MakePrism
使用 MakePrism 进行融合操作

在这里插入图片描述

Creating a prism between two faces with Perform()
通过 Perform() 方法在两个面之间创建棱柱体

Draft Prism

拔模棱柱

The class BRepFeat_MakeDPrism is used to build draft prism topologies interacting with a basis shape. These can be depressions or protrusions. A class object is created or initialized from:
BRepFeat_MakeDPrism 类用于构建与基础形状交互的拔模棱柱拓扑结构,可实现凹陷或凸起特征。类对象通过以下参数创建或初始化:

  • a shape (basic shape),
    一个形状(基础形状),
  • the base of the prism,
    棱柱的底面,
  • a face (face of sketch on which the base has been defined and used to determine whether the base has been defined on the basic shape or not),
    一个面(草图所在的面,底面在此面上定义,用于判断底面是否定义在基础形状上),
  • an angle,
    一个角度,
  • a Boolean indicating the type of operation (fusion=protrusion or cut=depression) on the basic shape,
    一个布尔值,指示对基础形状执行的操作类型(融合=凸起或切割=凹陷),
  • another Boolean indicating if self-intersections have to be found (not used in every case).
    另一个布尔值,指示是否需要查找自相交(非所有情况均使用)。

Evidently, the input data for MakeDPrism are the same as for MakePrism except for a new parameter Angle and a missing parameter Direction: the direction of the prism generation is determined automatically as the normal to the base of the prism. The semantics of draft prism feature creation is based on the construction of shapes:
显然,除新增参数 Angle 和移除参数 Direction 外,MakeDPrism 的输入数据与 MakePrism 一致。棱柱生成方向自动确定为底面的法线方向。拔模棱柱特征的创建语义基于以下形状构造方式:

  • along a length
    沿指定长度
  • up to a limiting face
    延伸至限制面
  • from a limiting face to a height
    从限制面到指定高度

The shape defining construction of the draft prism feature can be either the supporting edge or the concerned area of a face.
拔模棱柱特征的形状定义方式包括支撑边或面的相关区域:

In case of the supporting edge, this contour can be attached to a face of the basis shape by binding. When the contour is bound to this face, the information that the contour will slide on the face becomes available to the relevant class methods.
当使用支撑边时,轮廓可通过绑定附加到基础形状的面上。当轮廓绑定到该面后,相关类方法将获取“轮廓在面上滑动”的信息。

In case of the concerned area of a face, it is possible to cut it out and move it to a different height, which will define the limiting face of a protrusion or depression direction.
当使用面的相关区域时,可将其切割并移动到不同高度,从而定义凸起或凹陷方向的限制面。

The Perform methods are the same as for MakePrism.
Perform 方法与 MakePrism 完全一致。

代码示例:创建 tapered prism(锥形棱柱)

// 初始化基础形状(创建长方体)
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.); // 遍历获取目标面(此处通过Explorer获取第5个面)
TopExp_Explorer Ex; 
Ex.Init(S, TopAbs_FACE); 
Ex.Next(); Ex.Next(); Ex.Next(); Ex.Next(); Ex.Next(); 
TopoDS_Face F = TopoDS::Face(Ex.Current()); // 提取面的几何曲面
Handle(Geom_Surface) surf = BRep_Tool::Surface(F); // 定义2D圆轮廓(圆心(200,130),半径50,X轴方向)
gp_Circ2d c(gp_Ax2d(gp_Pnt2d(200., 130.), gp_Dir2d(1., 0.)), 50.); // 构建2D轮廓线(半圆+半圆闭合)
BRepBuilderAPI_MakeWire MW; 
Handle(Geom2d_Curve) aline = new Geom2d_Circle(c); 
MW.Add(BRepBuilderAPI_MakeEdge(aline, surf, 0., PI)); 
MW.Add(BRepBuilderAPI_MakeEdge(aline, surf, PI, 2.*PI)); // 基于曲面和轮廓构建面
BRepBuilderAPI_MakeFace MKF; 
MKF.Init(surf, Standard_False); 
MKF.Add(MW.Wire()); 
TopoDS_Face FP = MKF.Face(); 
BRepLib::BuildCurves3d(FP); // 创建拔模棱柱操作(参数:基础形状、底面、草图面、角度10°、凸起操作、启用自相交检测)
BRepFeat_MakeDPrism MKDP (S, FP, F, 10*PI/180, Standard_True, Standard_True); 
MKDP.Perform(200);  // 执行高度为200的拔模操作
TopoDS_Shape res1 = MKDP.Shape();  // 获取结果形状

在这里插入图片描述

Revolution

旋转特征

The class BRepFeat_MakeRevol is used to build a revolution interacting with a shape. It is created or initialized from:
BRepFeat_MakeRevol 类用于构建与形状交互的旋转特征。其创建或初始化参数如下:

  • a shape (the basic shape,)
    一个形状(基础形状),
  • the base of the revolution,
    旋转的底面,
  • a face (the face of sketch on which the base has been defined and used to determine whether the base has been defined on the basic shape or not),
    一个面(草图所在的面,底面在此面上定义,用于判断底面是否定义在基础形状上),
  • an axis of revolution,
    旋转轴,
  • a boolean indicating the type of operation (fusion=protrusion or cut=depression) on the basic shape,
    一个布尔值,指示对基础形状执行的操作类型(融合=凸起或切割=凹陷),
  • another boolean indicating whether the self-intersections have to be found (not used in every case).
    另一个布尔值,指示是否需要查找自相交(非所有情况均使用)。

Perform 方法

There are four Perform methods:
共有四种 Perform 方法:

MethodDescription
Perform(Angle)生成指定角度大小的旋转特征。
Perform(Until)旋转范围定义为从底面当前位置到给定面之间。
Perform(From, Until)旋转范围定义为两个面 From 和 Until 之间。
PerformThruAll()结果类似于 Perform(2*PI),即完整旋转一周。

Note that Add method can be used before Perform methods to indicate that a face generated by an edge slides onto a face of the base shape.
注意:可在调用 Perform 方法前使用 Add 方法,用于指示边生成的面在基础形状的面上滑动。

代码示例:旋转操作(受限面限制)

TopoDS_Shape Sbase = ...;  // 初始形状  
TopoDS_Face Frevol = ....; // 旋转底面  
TopoDS_Face FUntil = ....; // 限制旋转的面  gp_Dir RevolDir (.,.,.);  // 旋转方向  
gp_Ax1 RevolAx(gp_Pnt(.,.,.), RevolDir);  // 旋转轴  // 传入空面作为草图面  
BRepFeat_MakeRevol theRevol(Sbase, Frevol, TopoDS_Face(), RevolAx, Standard_True, Standard_True);  theRevol.Perform(FUntil);  // 执行旋转直到FUntil面  
if (theRevol.IsDone()) {  TopoDS_Shape theResult = theRevol;  // 后续处理  ... 
}

Pipe

管道特征

The class BRepFeat_MakePipe constructs compound shapes with pipe features: depressions or protrusions. A class object is created or initialized from:
BRepFeat_MakePipe 类用于构建带有管道特征的复合形状(凹陷或凸起)。其创建或初始化参数如下:

  • a shape (basic shape),
    一个形状(基础形状),
  • a base face (profile of the pipe)
    一个底面(管道截面轮廓),
  • a face (face of sketch on which the base has been defined and used to determine whether the base has been defined on the basic shape or not),
    一个面(草图所在的面,底面在此面上定义,用于判断底面是否定义在基础形状上),
  • a spine wire
    一条路径线(管道中心线),
  • a Boolean indicating the type of operation (fusion=protrusion or cut=depression) on the basic shape,
    一个布尔值,指示对基础形状执行的操作类型(融合=凸起或切割=凹陷),
  • another Boolean indicating if self-intersections have to be found (not used in every case).
    另一个布尔值,指示是否需要查找自相交(非所有情况均使用)。

Perform 方法

There are three Perform methods:
共有三种 Perform 方法:

MethodDescription
Perform()管道沿整个路径线(中心线)定义。
Perform(Until)管道沿路径延伸直到给定面。
Perform(From, Until)管道定义在两个面 From 和 Until 之间。

代码示例:创建管道特征

// 创建基础形状(长方体)
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.); // 遍历获取目标面(第2个面)
TopExp_Explorer Ex; 
Ex.Init(S, TopAbs_FACE); 
Ex.Next(); Ex.Next(); 
TopoDS_Face F1 = TopoDS::Face(Ex.Current()); 
Handle(Geom_Surface) surf = BRep_Tool::Surface(F1); // 构建管道截面轮廓(三角形)
BRepBuilderAPI_MakeWire MW1; 
gp_Pnt2d p1, p2; // 第一条边
p1 = gp_Pnt2d(100., 100.); 
p2 = gp_Pnt2d(200., 100.); 
Handle(Geom2d_Line) aline = GCE2d_MakeLine(p1, p2).Value(); 
MW1.Add(BRepBuilderAPI_MakeEdge(aline, surf, 0., p1.Distance(p2))); // 第二条边
p1 = p2; 
p2 = gp_Pnt2d(150., 200.); 
aline = GCE2d_MakeLine(p1, p2).Value(); 
MW1.Add(BRepBuilderAPI_MakeEdge(aline, surf, 0., p1.Distance(p2))); // 第三条边(闭合三角形)
p1 = p2; 
p2 = gp_Pnt2d(100., 100.); 
aline = GCE2d_MakeLine(p1, p2).Value(); 
MW1.Add(BRepBuilderAPI_MakeEdge(aline, surf, 0., p1.Distance(p2))); // 基于曲面和轮廓构建面
BRepBuilderAPI_MakeFace MKF1; 
MKF1.Init(surf, Standard_False); 
MKF1.Add(MW1.Wire()); 
TopoDS_Face FP = MKF1.Face(); 
BRepLib::BuildCurves3d(FP); // 定义管道路径线(贝塞尔曲线)
TColgp_Array1OfPnt CurvePoles(1, 3); 
gp_Pnt pt = gp_Pnt(150., 0., 150.); 
CurvePoles(1) = pt; 
pt = gp_Pnt(200., 100., 150.); 
CurvePoles(2) = pt; 
pt = gp_Pnt(150., 200., 150.); 
CurvePoles(3) = pt; Handle(Geom_BezierCurve) curve = new Geom_BezierCurve(CurvePoles); 
TopoDS_Edge E = BRepBuilderAPI_MakeEdge(curve); 
TopoDS_Wire W = BRepBuilderAPI_MakeWire(E); // 创建管道特征(参数:基础形状、截面轮廓、草图面、路径线、切割操作、启用自相交检测)
BRepFeat_MakePipe MKPipe (S, FP, F1, W, Standard_False, Standard_True); 
MKPipe.Perform();  // 执行管道操作
TopoDS_Shape res1 = MKPipe.Shape();  // 获取结果形状

在这里插入图片描述

Mechanical Features

机械特征

Mechanical features include ribs, protrusions and grooves (or slots), depressions along planar (linear) surfaces or revolution surfaces.
机械特征包括筋、凸起、凹槽(或槽)以及沿平面(线性)表面或旋转表面的凹陷。

The semantics of mechanical features is built around giving thickness to a contour. This thickness can either be symmetrical – on one side of the contour – or dissymmetrical – on both sides. As in the semantics of form features, the thickness is defined by construction of shapes in specific contexts.
机械特征的语义核心是为轮廓赋予厚度。厚度可以是对称的(位于轮廓一侧)或不对称的(位于两侧)。与形状特征类似,厚度通过在特定上下文中构造形状来定义。

The development contexts differ, however, in the case of mechanical features. Here they include extrusion:
然而,机械特征的构建上下文有所不同,包括以下拉伸方式:

  • to a limiting face of the basis shape;
    到基础形状的限制面;
  • to or from a limiting plane;
    到或从限制平面;
  • to a height.
    到指定高度。

类初始化参数

A class object is created or initialized from:
类对象通过以下参数创建或初始化:

  • a shape (basic shape);
    一个形状(基础形状);
  • a wire (base of rib or groove);
    一条线(筋或槽的基础轮廓);
  • a plane (plane of the wire);
    一个平面(轮廓所在的平面);
  • direction1 (a vector along which thickness will be built up);
    方向1(厚度增加的方向向量);
  • direction2 (vector opposite to the previous one along which thickness will be built up, may be null);
    方向2(与方向1相反的方向向量,厚度增加方向,可为空);
  • a Boolean indicating the type of operation (fusion=rib or cut=groove) on the basic shape;
    一个布尔值,指示对基础形状执行的操作类型(融合=筋或切割=槽);
  • another Boolean indicating if self-intersections have to be found (not used in every case).
    另一个布尔值,指示是否需要查找自相交(非所有情况均使用)。

Linear Form

线性形状

Linear form is implemented in MakeLinearForm class, which creates a rib or a groove along a planar surface. There is one Perform() method, which performs a prism from the wire along the direction1 and direction2 interacting with base shape Sbase. The height of the prism is Magnitude(Direction1)+Magnitude(direction2).
线性形状由 MakeLinearForm 类实现,用于沿平面创建筋或槽。该类有一个 Perform() 方法,沿 direction1 和 direction2 方向从轮廓线创建棱柱,并与基础形状 Sbase 交互。棱柱高度为 Direction1 长度与 Direction2 长度之和。

代码示例:创建筋特征

// 构建基础轮廓线(六边形)
BRepBuilderAPI_MakeWire mkw; 
gp_Pnt p1 = gp_Pnt(0., 0., 0.); 
gp_Pnt p2 = gp_Pnt(200., 0., 0.); 
mkw.Add(BRepBuilderAPI_MakeEdge(p1, p2)); p1 = p2; 
p2 = gp_Pnt(200., 0., 50.); 
mkw.Add(BRepBuilderAPI_MakeEdge(p1, p2)); p1 = p2; 
p2 = gp_Pnt(50., 0., 50.); 
mkw.Add(BRepBuilderAPI_MakeEdge(p1, p2)); p1 = p2; 
p2 = gp_Pnt(50., 0., 200.); 
mkw.Add(BRepBuilderAPI_MakeEdge(p1, p2)); p1 = p2; 
p2 = gp_Pnt(0., 0., 200.); 
mkw.Add(BRepBuilderAPI_MakeEdge(p1, p2)); p1 = p2; 
mkw.Add(BRepBuilderAPI_MakeEdge(p2, gp_Pnt(0., 0., 0.))); // 基于轮廓创建基础形状(拉伸为棱柱)
TopoDS_Shape S = BRepBuilderAPI_MakePrism(BRepBuilderAPI_MakeFace(mkw.Wire()), gp_Vec(gp_Pnt(0., 0., 0.), gp_Pnt(0., 100., 0.))
); // 定义筋的轮廓线(斜线段)
TopoDS_Wire W = BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(gp_Pnt(50., 45., 100.), gp_Pnt(100., 45., 50.))
); // 定义轮廓所在平面
Handle(Geom_Plane) aplane = new Geom_Plane(gp_Pnt(0., 45., 0.), gp_Vec(0., 1., 0.)
); // 创建线性形状特征(参数:基础形状、轮廓线、平面、方向1、方向2、操作类型、自相交检测)
BRepFeat_MakeLinearForm aform(S, W, aplane, gp_Dir(0., 5., 0.),  // 正向厚度方向(Y轴正方向)gp_Dir(0., -3., 0.), // 负向厚度方向(Y轴负方向)1, Standard_True     // 操作类型:融合(创建筋)
); aform.Perform();  // 执行操作
TopoDS_Shape res = aform.Shape();  // 获取结果形状

在这里插入图片描述

Gluer

粘合器

The class BRepFeat_Gluer allows gluing two solids along faces. The contact faces of the glued shape must not have parts outside the contact faces of the basic shape. Upon completion the algorithm gives the glued shape with cut out parts of faces inside the shape.
BRepFeat_Gluer 类用于沿面粘合两个实体。被粘合形状的接触面不得超出基础形状的接触面范围。算法执行完毕后,粘合形状会剪切掉内部的面部分。

The class is created or initialized from two shapes: the “glued” shape and the basic shape (on which the other shape is glued). Two Bind methods are used to bind a face of the glued shape to a face of the basic shape and an edge of the glued shape to an edge of the basic shape.
该类通过两个形状创建或初始化:“被粘合”形状和基础形状(另一个形状粘合到基础形状上)。使用两种 Bind 方法将被粘合形状的面绑定到基础形状的面,以及将被粘合形状的边绑定到基础形状的边。

Note that every face and edge has to be bounded, if two edges of two glued faces are coincident they must be explicitly bounded.
请注意,每个面和边必须是有界的;如果两个粘合面的边重合,必须显式界定。

代码示例:粘合两个形状

TopoDS_Shape Sbase = ...; // 基础形状 
TopoDS_Shape Sglued = ...; // 被粘合形状 TopTools_ListOfShape Lfbase; 
TopTools_ListOfShape Lfglued; 
// 确定粘合面 
... BRepFeat_Gluer theGlue(Sglued, Sbase); 
TopTools_ListIteratorOfListOfShape itlb(Lfbase); 
TopTools_ListIteratorOfListOfShape itlg(Lfglued); 
for (; itlb.More(); itlb.Next(), itlg.Next()) { const TopoDS_Face& f1 = TopoDS::Face(itlg.Value()); const TopoDS_Face& f2 = TopoDS::Face(itlb.Value()); theGlue.Bind(f1, f2); // 绑定面// 例如,使用LocOpe中的FindEdges类确定重合边LocOpe_FindEdge fined(f1, f2); for (fined.InitIterator(); fined.More(); fined.Next()) { theGlue.Bind(fined.EdgeFrom(), fined.EdgeTo()); // 绑定边} 
} 
theGlue.Build(); // 执行粘合
if (theGlue.IsDone()) { TopoDS_Shape theResult = theGlue; ... 
}

Split Shape

形状分割

The class BRepFeat_SplitShape is used to split faces of a shape into wires or edges. The shape containing the new entities is rebuilt, sharing the unmodified ones.
BRepFeat_SplitShape 类用于将形状的面分割为线框或边。包含新实体的形状会被重建,并共享未修改的实体。

The class is created or initialized from a shape (the basic shape). Three Add methods are available:
该类通过一个形状(基础形状)创建或初始化,提供三种 Add 方法:

  • Add(Wire, Face) – adds a new wire on a face of the basic shape.
    Add(线框, 面) – 在基础形状的面上添加新线框。
  • Add(Edge, Face) – adds a new edge on a face of the basic shape.
    Add(边, 面) – 在基础形状的面上添加新边。
  • Add(EdgeNew, EdgeOld) – adds a new edge on an existing one (the old edge must contain the new edge).
    Add(新边, 旧边) – 在现有边上添加新边(旧边必须包含新边)。

Note: The added wires and edges must define closed wires on faces or wires located between two existing edges. Existing edges must not be intersected.
注意:添加的线框和边必须在面上定义闭合线框,或位于两个现有边之间的线框。现有边不得相交。

代码示例:分割面

TopoDS_Shape Sbase = ...; // 基础形状 
TopoDS_Face Fsplit = ...; // Sbase的面 
TopoDS_Wire Wsplit = ...; // 包含在Fsplit中的新线框 BRepFeat_SplitShape Spls(Sbase); 
Spls.Add(Wsplit, Fsplit); // 添加线框到面
TopoDS_Shape theResult = Spls; 
...

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/pingmian/85627.shtml
繁体地址,请注明出处:http://hk.pswp.cn/pingmian/85627.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【前端AI实践】DeepSeek:开源大模型的使用让开发过程不再抓头发

有时候你可能正对着屏幕发呆,不知道怎么下手一个 Vue 的流式请求功能。这时候,DeepSeek 就像是你的“编程外挂”,帮你把模糊的需求变成清晰的代码。 下面我们就以几个常见的开发场景为例,看看 DeepSeek 能帮我们做点啥。 解答技…

SAP S/4HANA 的“Smart Core”:在现实与理想之间实现敏捷扩展

摘要: 在 SAP S/4HANA 的实施过程中,“Clean Core”(干净核心)已成为热门话题,指的是通过简化和优化系统架构,减少技术债务、提升性能并增强可升级性。尽管这是 SAP 推动云转型的核心理念之一,…

Python 量化金融与算法交易实战指南

https://www.python.org/static/community_logos/python-logo-master-v3-TM.png 金融数据获取与处理 使用yfinance获取市场数据 python 复制 下载 import yfinance as yf import pandas as pd# 下载苹果公司股票数据 aapl yf.Ticker("AAPL") hist aapl.histo…

【StarRocks系列】join查询优化

目录 Join 类型 和 Join 策略 1. Join 类型(Join Type) 2. Join 策略(Join Strategy) 分布式 Join 策略 (核心) 1. Colocate Join (本地 Join - 最优): 2. Bucket Shuffle Join: 3. Broadcast Join (复制广播): 4. Shuffl…

【论文解读】ZeroSearch: 零API成本激活大模型Web搜索

1st author: Hao Sun 孙浩 - PhD Candidate Peking University - Homepage paper: [2505.04588] ZeroSearch: Incentivize the Search Capability of LLMs without Searching code: Alibaba-NLP/ZeroSearch: ZeroSearch: Incentivize the Search Capability of LLMs without…

JAVA网络编程中HTTP客户端(HttpURLConnection、Apache HttpClient)

HTTP 客户端是 Java 中实现网络请求的核心工具,主要用于与 Web 服务器交互(如获取网页、提交表单、调用 REST API 等)。Java 生态中有两种主流的 HTTP 客户端实现:​​HttpURLConnection(JDK 原生)​​ 和 ​​Apache HttpClient(第三方库)​​。以下是两者的详细解析、…

C# Process.Start多个参数传递及各个参数之间的空格处理

最近做一个软件集成的事情,有多个之前做的软件,集成到一起自己用,使用了 Process.Start(“*.exe”)的方式,然而遇到了传递参数的问题。 这里汇总后的程序叫main.exe,要汇总的软件之一是pro1.…

【Python】Excel表格操作:ISBN转条形码

一、效果 原始文件: 输出文件: 二、代码 import os import logging from openpyxl import load_workbook from openpyxl.drawing.image import Image as ExcelImage from barcode import EAN13 from barcode.writer import ImageWriterlogging.basicCo…

【Fargo】mediasoup发送2:码率分配、传输基类设计及WebRtcTransport原理

Fargo 使用了mediasoup的代码,搬运了他的架构架构精妙,但是似乎是为了sfu而生,【Fargo】mediasoup发送1:控制与数据分离的分层设计和原理我本地用来发送测试,因此需要进一步梳理: 通过分析这段代码,我来详细解释: 一、sfu 需要码率级别的分配控制 1. DistributeAvail…

矩阵置零C++

给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 思路: 1、让首行首列记录哪一行哪一列有0 2、于是可以直接遍历非首行首列的元素,若该元素对应的首行首列为0,说明…

大内存对电脑性能有哪些提升

在科技飞速发展的今天,电脑已经成为我们生活和工作中不可或缺的伙伴。无论是日常办公、追剧娱乐,还是进行复杂的游戏和专业设计,电脑的性能都至关重要。而在影响电脑性能的众多因素中,内存大小常常被人们忽视。 多任务处理更流畅…

【StarRocks系列】Update语句

目录 简要流程 详细流程 1. UPDATE 语句执行流程 2. 如何更新表的数据 3. 是否支持事务 总结关键点 简要流程 前端处理(FE): 解析 SQL 并验证主键条件生成包含主键列表和新值的更新计划按主键哈希分发到对应 BE 后端执行&#xff08…

计算机三级Linux应用与开发

第 1 章 计算机体系结构与操作系统 1.1 计算科学与计算机系统 冯诺依曼体系的结构要点: 计算机数制采用二进制,程序指令和数据统一存储,计算机应按照程序顺序执行。按照冯诺依曼结构设计的计算机由 控制器,运算器,存…

Web攻防-XSS跨站Cookie盗取数据包提交网络钓鱼BEEF项目XSS平台危害利用

知识点: 1、Web攻防-XSS跨站-手工代码&框架工具&在线平台 2、Web攻防-XSS跨站-Cookie盗取&数据提交&网络钓鱼 演示案例-WEB攻防-XSS跨站-Cookie盗取&数据提交&网络钓鱼&Beef工具 1、XSS跨站-攻击利用-凭据盗取 条件:无防…

自力更生式养老VS三大新型养老:在时代裂变中重构银发生存法则

在岁月长河中,父母曾为子女遮风挡雨,当他们步入暮年,养老问题成为家庭与社会共同关注的焦点。 “父母的养老终究是自力更生”,这句话道出了养老的本质内核。 然而,在自力更生的基础上,选择合适的养老方式…

计算机网络学习笔记:Wireshark观察TCP通信

文章目录 前言一、前置准备二、三报文握手过程抓包2.1、第一次握手2.2、第二次握手2.3、第三次握手 三、通信过程抓包3.1、报文 44379 – 客户端发数据(PSH, ACK)3.2、 报文 44380 – 服务端确认收到数据(ACK)3.3、报文 44469 – …

在Linux中,Iptables能做什么?

概述 背景说明 在运维工作中,Iptables是一个不可或缺的工具,它提供了强大的网络流量控制和管理能力。 问题呈现 iptables是一个不可获取的工具,你对其了解多少?该工具你是否真的会用?详细功能对应的应用场景你是否…

Linux——linux的基本命令

目录 一、linux的目录结构 二、绝对路径和相对路径 三、文件类型(linux下所有东西都可看作文件) 四、文件的权限 五、文件权限的修改(chmod) 六、linux常用的命令 七、文件查看命令 八、文件编辑命令 九、文件压缩与解压…

智慧水利数字孪生解决方案:百川孪生智领千行,100+标杆案例赋能智慧水利全域升级

在数字技术革命与产业变革深度交织的浪潮下,智慧水利作为保障国家水安全、推动水利高质量发展的核心载体,正以数字孪生技术为引擎,驱动水利行业从“经验驱动”向“数据驱动”转型。 山东融谷作为智慧水利数字孪生领域的创新实践者&#xff0c…

深入解析ID3算法:信息熵驱动的决策树构建基石

本文来自「大千AI助手」技术实战系列,专注用真话讲技术,拒绝过度包装。 ID3(Iterative Dichotomiser 3) 是机器学习史上的里程碑算法,由Ross Quinlan于1986年提出。它首次将信息论引入决策树构建,奠定了现代…