Search results

  1. jianbaoxia

    Speeding up the surface-to-surface intersection

    OCC's surface-to-surface intersection algorithm seems a bit slow. I'm planning to work on speeding up the surface-to-surface intersection calculations. I was wondering if anyone has any suggestions. The main focus will be on cases where two NURBS surfaces intersect. o_O
  2. jianbaoxia

    Unexpectedly, some points of the TopoDS_Face are not on its Geom_Surface.

    Today I encountered a very strange situation that confuses me whether it is a flaw in OCCT or an issue with my usage. Next, I will do my best to describe this situation clearly and provide a demo. It starts like this: I have a TopoDS_Face `face_origin`, and I intend to generate a wire using...
  3. jianbaoxia

    Creating an OBB using BRepBndLib::AddOBB() yields poor results.

    Hi Bros, I'm JianBaoXia.;) As title, I attempted to use BRepBndLib::AddOBB() to generate an OBB for four points that are not coplanar, but the results were confusing. Am I using it incorrectly? There is my demo: bool WriteStepFile(const TopoDS_Shape& shape, const std::string& filepath) {...
  4. jianbaoxia

    Error when build triangle meshes

    Hello everyone, I'm JianBaoXia. Today I attempted to triangulate a B-spline surface, but the results were not satisfactory. The outcome is shown in the image below: It is evident that triangulation seems to fail in regions with high curvature. I am unsure if this is a limitation of the OCCT...
  5. jianbaoxia

    Using gradient descent algorithm to find the lowest point on a surface.

    Hello, I‘m JianBaoxia. I'm trying to find the lowest point (the point with the minimum z-coordinate) on a surface. It seems that directly traversing all (u, v) coordinates uniformly may not guarantee accuracy and efficiency. So, I'm attempting to use the gradient descent algorithm to find...
  6. jianbaoxia

    This is a forum thread about building and using BVH(Bounding Volume Hierarchy) in OCCT.

    I recently read some articles about constructing BVH and can't wait to implement it myself. In lesson 17 on Quoar, I found the code for constructing BVH and calculating the intersection points of rays and triangles using the BVH_PrimitiveSet class in OCCT. This is exactly the code I want to...
  7. jianbaoxia

    Compilation issue: Unable to find "freetype.dll".

    Hi Bro, I'm JianBaoxia. I ran into a problem while compiling, but actually I had successfully compiled the OCCT environment following Quaoar's lessons 0, 1, and 5, and learned how to configure the relevant header files and libraries, which allowed me to successfully get started with OCCT...
  8. jianbaoxia

    Maybe there is a bug on Handle(Geom_Curve)->value()? Hope I am wrong T.T

    Hi Bros, I'm JianBaoxia. Today, while using Handle(Geom_Curve)->value() to obtain some points on a B-spline curve, I encountered some strange phenomena. Therefore, I couldn't wait to discuss and share with you. To illustrate the problem, I wrote a simple demo, which is as follows: I read...
  9. jianbaoxia

    Failed of BRepOffsetAPI_MakeOffset to offset the Bspline curve

    Hi Bros, I'm jianbaoxia. Today, I get a plane, and it's bound is a bspline curve, I try to fill the plane with tool path. So I try to offset the bound edge, and I write a demo to fill a plane with BRepOffsetAPI_MakeOffset , it works, as show: However, the same way doesn't work for bspline...
  10. jianbaoxia

    Fail to transfrom a wire to a bspline curve.

    Hi Bros, I'm JianBaoxia. I get a .step file, it's a wire and consist of several TopoDS_Edges. First I try to sort the edges, and build it as a wire. o_O I use "ShapeAnalysis_WireOrder", and it failed and give the status"some edges are reversed, but no gaps remain". Then I try another way to get...
  11. jianbaoxia

    How to get the u bound of an edge?

    Hi Bros, I'm JianBaoxia. Today I get a wire, and try to transform the wire to be a bspline curve. First I call to mind is "GeomAPI_PointsToBSpline (const TColgp_Array1OfPnt &Points, const Standard_Integer DegMin=3, const Standard_Integer DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2...
  12. jianbaoxia

    Something wrong when use BRepBuilderAPI_MakeFace to build a face through a face and wire.

    Hi Bros, I'm JianBaoxia. After I finally the wire build with you help yestoday, I keep try to use it to build a TopoDS_Face, however, there seems get something wrong without error raise. I get a TopoDS_Face from file "cylFaceForCut.step"(Fig 1), and get TopoDS_Wire from file "wire.step"(Fig 2)...
  13. jianbaoxia

    How to reverse the TopoDS_Edge, the TopoDS_Edge. Reversed() seems don't work.

    Hi Bros, I'm JianBaoxia. I try to connect some edges to become a closed wire today. I use "ShapeAnalysis_WireOrder" to sort the edges, and some edges should be reversed. The edges are "TopoDS_Edge", so I use the TopoDS_Edge.Reversed(). However, it seems something beyond my expection. The...
  14. jianbaoxia

    How to extend face on OCCT?

    Hi Bros! I try to extend some faces, as show blow: I try to extend all the gray faces to the green face, in CAD sofeware, it's a commonly used function, however, I have no idea how to do it through OCCT. May be GeomLib :: ExtendSurfByLength() can work, I try to use it now. Can I get suggestions...
  15. jianbaoxia

    Can OCCT sweep along two path?

    Hi Bros, I'm JianBaoXia, Today I try to sweep a profile(actually a line) along two path(actually two BSplin curve), this type face is common in industry. I can use BRepPrimAPI_MakePrism to sweep along a path easy in OCCT, however, it seems hard to see the use of sweep along two path.
  16. jianbaoxia

    Is there have a easy way to check whether a point on the face, BRepClass_FaceClassifier.State() seems doesn't work.

    Hi Bros, I'm JianBaoXia. Today I try to check whether a point on a face. I use the BRepClass_FaceClassifier.State() first, and faild. Then I try to compute the short distance between point and face, and check if the distance shorter than the tolerance. It seem I make it success. However, I...
  17. jianbaoxia

    Some strange question when using GeomAPI_Interpolate to create a constrained BSpline curve

    Hi Bros, I'm JianBapXia. Today I use a set of points and to create a constrained BSpline curve through GeomAPI_Interpolate. The points look likes below: I get two problems. 1、The curve I create didn't pass the first point, as show: 2、The end point is point_21, however, the path between...
  18. jianbaoxia

    How to make edge smooth?

    Hi Bros, I'm JianBaoXia. Today I write a demo of create a helix edge, I do it both in Draw and BRepBuilderAPI_MakeEdge. However, the helix create in helix is smooth, and another helix create by my code is not, look likes below: I'm looking the code of tcl, I must ignore something. However, I...
  19. jianbaoxia

    How to trim a Curve with two point on it?

    Hi Bros, I'm JianBaoXia. I get a BSpline curve, and two point on it. I want to trim the curve and get the segment of the curve between the two points. I try to do it through Geom_TrimmedCurve, however, it needs convert the two points to parameter values U1 and U2. In surface I know xyz can...
  20. jianbaoxia

    How to get the curve between two point on the surface?

    Hi Bros, I'm JianBaoxia. I get a BSPline surface, and points on the face, I want to get the curve between two points on the face. I look for answer several days, but didn't success. It's my honor to get your help. The curves I want look like below:
Top