Hello, maybe this isn't the right place to write this but I currently face a very weird issue/bug and I think it has to do with the OpenCASCADE kernel modeling, but I would like for someone else to confirm that maybe using another design tool. I am creating 2 parts and 1 hole: I want to fuse part 1
There is a shape (.brep is attached) made of a torus surface and four 1-degree B-spline p-curves. 3d-curves generated by BRepLib::BuildCurve3d. Despite the fact that these p-curves are, in fact, iso-curves, the generated 3d curves are also B-splines. The rendering (tesselation) quality of this shape
Hi, I'm encountering an issue with `BRepBuilderAPI_GTransform` producing an invalid solid (negative volume, broken topology) when applying a non-uniform XY scale to a valid input solid. This is with **OCCT 7.8.1** via FreeCAD 1.0.2. ## Input - Valid solid (BRepCheck_Analyzer passes), volume = 8055 m
Hi, I have a closed 2D polygon data structure consisting of straight lines and arcs. Basically it looks like this: Start at (10, 20) Line to (30, 40) Arc to (50, 60) with 45° angle ... Line to (10, 20) Now I need to build a 3D shape by extruding this polygon in a reliable way. I already managed to d
Hello,my question like this: //I have an old top level shape TopoDS_Shape oldTopShape=.....;//top level shape //create a face index map TopTools_IndexedMapOfShape shapeIndexMap; TopExp::MapShapes(oldTopShape, TopAbs_FACE, shapeIndexMap);//used the oldTopShape here TopoDS_Face oldFace=.....;//belongs
Hello all, I am dealing with non-regular boolean operation using the tool BOPAlgo_Cellsbuilder class. I found that in some situations the boolean operations will go wrong when dealing with complex shapes that have tiny parts. For example, I built 3 cones and tried to build a single branch with them
Hello! We are using BOPAlgo_Splitter to split a solid with a plane. The results are correct, for the special case the result is a compound of 3 solids. I want to logically group the results, e.g. in the attached image the red parts should be one shape (compound) and the orange shape should be one sh
I'm building an app with Rust and opencascade bindings, and I'm having an issue if I make a compound with faces and "extrude" it (calls BRepPrimAPI_MakePrism with the compound shape) it results in negative normals on each face except one. I know the normals are negative as if I invert the normals in
Hello, The ShapeUpgrade_UnifySameDomain build gives me an error for the attached brep file. Is my input invalid? Or is this a bug in the OCCT? Also, is there some kind of validation I can do before unifying to prevent crashes? Exception thrown at 0x00007FF8920CC77C (TKG2d.dll) in application.exe: 0x
Good afternoon, I am trying to stretch a topods_face (plane), but the BRepBuilderAPI_GTransform crashes: Microsoft C++ exception: Standard_ConstructionError error message: Geom_TrimmedCurve::U1 == U2 gp_Vec dir(0, -1, -0); gp_Pnt locOnPlane(800, 625, 183); gp_Ax2 xdir(locOnPlane, dir.Reversed()); do
I using OCC 7.9.2 in a development version of FreeCAD 1.1 and when importing a STEP file the code goes into an infinite loop in GCPnts_TangentialDeflection::PerformCurve<Adaptor3d_Curve>(const Adaptor3d_Curve & theC) Looking at the code you can see the code has a loop while (MorePoints) { // do stuf
Hello everyone, Goal: I want to generate a layer of constant thickness around lower root area of a tooth geometry (using OpenCascade through Gmsh), something like: Input: tooth volume Output: tooth volume + outer offset shell The upper crown region should remain untouched; The shell should only wrap
I'm trying to make a conical surface bounded by two lines and a circular arc. Here is a sample code double h = 20.0; double a = 60.0 * (M_PI / 180.0); double dh = h * tan(a / 1.0); double r = dh; gp_Dir aDir(0.0, 0.0, 1.0); gp_Pnt aPnt0(0.0, 0, 0.0 ); gp_Pnt aPnt1(dh, 0, aPnt0.Z() + h); gp_Pnt aPnt2
Hello everyone, I am trying to compute the bounding box of a TopoDS_Shape, but I need the box to be expressed in a specific local coordinate system, not in the global one. For example, I have a transformation (represented by a gp_Ax2 or a gp_Trsf) that defines the local coordinate system in which I
Hi, I'd like to remove a face restriction in one coordinate only: e.g. a half-cylindrical face would become infinite in its axial coordinate but still limited to the half circle in the other. Note the algo shouldn't be limited to cylindrical faces. I have this code TopoDS_Face face; //[...] BRepAdap
Suppose I import the step file in the attached image. You can see I have two cylindrical faces selected. If I call the following code Handle(Geom_CylindricalSurface) firstCylinder = ... Handle(Geom_CylindricalSurface) secondCylinder = ... gp_Ax1 axis1 = firstCylinder->Cylinder().Axis(); gp_Ax1 axis2
I am using the following code - BRep_ListIteratorOfListOfCurveRepresentation itcr; Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) & edge.TShape()); const TopLoc_Location& Eloc = edge.Location(); const BRep_ListOfCurveRepresentation& aLCR = TE->Curves(); TopoDS_Vertex v1a, v1b; TopExp::Vertices(edg
Hi, I want to calculate intersections between a shape and parallel planes using BRepAlgoAPI_Section. As a result I want to get all intersection edges. This works correctly in most cases. Just in one case one edge is missing. The shape is not a solid, it consists of several (trimmed) faces, imported
Is it possible to convert few sequential splines (curves) on the surface edge info one resulting spline (curve)? How to insert new resulting spline instead of sequence of spline in the CAD model? Thank you in advance.
Hello guys. I recently met a problem when using the BRepBuilderAPI_MakeFace. I was trying to project a planar sheet to a surface of revolution to create a small surface on the surface. I firstly decomposed the planar sheet into edges and then projected them to the surface, after this process I got a
Hi, I want to project a wire into a cylinderical surface. I tried 3 ways: BRepOffsetAPI_NormalProjection BRepAlgo_NormalProjection BRepProj_Projection (1) and (2) Using BRepOffsetAPI_NormalProjection and BRepAlgo_NormalProjection the resulting wires appears to be scaled down in the width but not the
Hello, I try to find distance between Vertex and Sphere using class BRepExtrema_DistanceSS . However, it does not work. Here is my code #include <BRepExtrema_DistanceSS.hxx> #include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBndLib.hxx> #include <Bnd_Box.hxx> #include <BRepPrimAPI_MakeSphere.hxx
Hi, ive been composing some external BREP into OCC code to represent the same shapes. I am stuck on trimming BSpline surfaces, I can cut inner holes but any trim that shares edges with the natural boundary of the bspline surface I have not had success. Is there a good source on doing this? All the n
I have a valid BSpline nurbs surface, which I can make into a face with no trimming and will be properly displayed. I also have a wire which I can use successfully to trim the surface to a face which is the complement (inversion) of the face I want to produce: outer_wire = topods.Wire(outer_wire); o
I have aligned the section plane along the axis and am attempting to split the model in half as shown in the first image: Viewer_Model.jpg. My goal is to obtain the section view from this. I was able to achieve this using the BRepAlgoAPI_Section class. After performing the sectioning, I retrieve the
Hello, I would like to calculate the intersection of a polygon in a plane with a plane and find the resulting polygons, and I need to perform this calculation more than 150,000 times. I used the BRep APIs, but the calculation was too slow. So now I am using geometric APIs (GeomAPI_IntCS) to find t
Hi, I am trying to compute the intersection between a shell and a plane with OCCT 7.9 . I tested two approaches: Using BRepAlgoAPI_Section Using GeomAPI_IntSS with the plane surface Both methods were applied to the same shell with the same plane. With BRepAlgoAPI_Section , the resulting section edge
Hello everyone, I urgently need help. I need to create a 3D model from 4 different profiles (TopoDS_Wire). These profiles can vary slightly—for example, one profile may be longer than another. So far, I have managed to create a wireframe model that ensures the final model will be continuous by contr
Hi all, I'm trying to build a pipe with consecutive line segments as the spine, and a circle as the profile with BRepFill_PipeShell . The transition mode is BRepFill_Right . Following is the code snippet std::vector<gp_Pnt> pnts = { {-11.632049,994.694902,48.628134}, {10.065155,966.861115,-9.835286}
I have been investigating OpenCascade for non-manifold boolean operations. I have a couple cases that I'm struggling to get working and would appreciate any advice on how to accomplish what I want or a clearer explanation of OpenCascade's capabilities. I've read https://dev.opencascade.org/content/n
The ShapeUpgrade_UnifySameDomain does not work properly, but after saving the shape as a STEP file and then re-reading it back in, ShapeUpgrade_UnifySameDomain produces good results. The shape was obtained by using BOPAlgo_Splitter on several faces and a solid. Is there any issue with this shape? (W
Hi all, I've been using pythonOCC for about a year now. Currently, I am shooting rays (Gp_Lin) in directions around the face center of a face and want to compute the intersection point with the rest of the shape. However, I am noticing an incredibly long runtime if the shape has a lot of GeomAbs_Cyl
hi, I'm working on a Shaded with Edges version for displaying STL files in my program, but with sharp edges. My goal is to achieve edge display similar to CAD Assistant. I'm using the Open3D library, but my results aren't satisfactory. CAD Assistant - do you know how this is done? Maybe it uses an o
Hello, a surface has a parametrization x = x(u,v) y = y(u,v) z = z(u,v) The position of P on the surface S is (P-O) = x e_i + y e_y + k e_z in which e_i, e_j, e_k are the direction vectors in (O,x,y,z). The first fundamental form describing the metric of S is the square maxtrix E F F G in which E =
Hola~ I have a TopoDS_Solid. I have a starting and ending location. I want to connect (word I would use is extrude) along a linear path between the start and end point of the solid. The sweep (and friends) all have exceptions so they do not work on solids. What is the right way to extrude a solid al
Does "solid" in OCC correspond to "body"? If I traverse the Solids under a Shape, and then iterate through the Faces within each Solid, will that give me all the Faces? I tried doing this, but the Faces I obtained were only a subset.
I dont know where W(t) data come from. When Gauss Point Number is 20, They are as following from book: GaussPoint = [0.076526521133497338312 0.2277858511416450682 0.37370608871541954876 0.5108670019508271265 0.63605368072651502498 0.74633190646015079572 0.83911697182221878233 0.91223442825132594614
I'd like to write some regression tests for my shape generation code. The idea is to read a gold standard BRep file and compare it to what the test code generates. I know that TopoDS_Shape::IsEqual simply compares the underlying TShape pointers for identity. Is there a method which compares two Topo
OBJ files do not contain BRep data; instead, they represent tessellated geometric data consisting of triangular information. I want to enable HLR mode for this, but when I run it, I get all the edges from the triangles. (First picture in Image "Sewing_before_after.jpg") To create a face from the tri
I have a question relating to computation of bezier curves - rather showing my ignorance of maths I'm afraid... I'm working in 2D with points and bezier curves. I want the user to be able to insert a new point into an existing bezier curve - thus creating two curves which accurately mirror the shape
Hello. I have some 2d bspline and I need to make it longer to a certain parameter value (for example, extend the start to -8, with a StartParameter value of 0). I tried to use the "Segment" method, but when it works, an exception occurs when executing InsertKnots if you specify parameters outside th
I create 2D shapes defined as TopoDS_Face, created from points and BezierCurves. All is well in my happy little 2D world... But, I now have need to *bend* these 2D faces, in a single axis, from 90-360degrees. To explain, imagine a 2D rectangle bending around to create a pipe/cylinder shape (but not
I make a shape by BRepPrimAPI_MakeSphere,then perform my HLRProject function.The result is empty,no edge or vertex.Why?What should i do in HLRProject() function? TopoDS_Shape HLRProject(const TopoDS_Shape& shape, const gp_Ax2& viewingDir) { if (shape.IsNull()) return TopoDS_Shape(); Handle(HLRBRep_A
Hi Guys, I was taught in school that the inside region of the polygon is always on the left hand of the edge. But after tracing many cases from different .iges files in OCC, I find that's not true. I mean the algorithm in BRepTopAdaptor_FClass2d doesn't suppose the left hand theory. Is my observatio
In the Open Cascade, the Boolean operation Class need to input Topods_Shape. However the TopoDS_Shape doesn't contain color information. If the two topoDS_shape have differnt color, Can OCC keep the color after boolean operation? For example, I want to do boolean union of a red box and a green box.
A bit of context I am trying to do a common operation between a solid that I constructed from a list of triangles and a box. The solid represents a staircase. It is generated in another app, meaning I only have access to its list of triangles. The following c++ code generates the staircase as an OCC
Hello everyone! When tessellating shapes with BRepMesh_IncrementalMesh we noticed that fillets on cylindrical or rounded solids have strange artifacts (see screenshots). This problem does not arise for rectangular base shapes (see last screenshot). We have tried several parameter combinations for De
Hello, My application is performing ray/shape intersections computation using triangles and Octree to sort shape faces/triangles. It is pretty fast but I need to implement an alternative that provide more precision, so I try to use OpenCascade objects. TopoDS_Face bounds are stored in an Octree to q
Hello, I am new to OCCT and struggle to find information on a possibly trivial problem. I think I managed to use GeomFill_Pipe to sweep between two circles of different radii along a parabolic path (in pyOCCT). Now I would like to convert this surface (it is a surface, right?) to a solid in order to
I am attaching 3d shape for which BRepBndLib::AddClose is crashing with following callstack - My code - Standard_Real xMin, yMin, zMin, xMax, yMax, zMax; Bnd_Box bndBox; BRepBndLib::AddClose(shape, bndBox); Crash callstack:- ntdll.dll!00007fffc59e9d88() Unknown ntdll.dll!00007fffc59831f2() Unknown n
I make a TopoDS_Shape S, i.e. a cube.Then I write It on disk, by using BinTools. Finally I reload it from disk, and obtain S_reloaded. Is the returning value of S.IsEqual(S_reloaded) true or false? Grazie Author
In Gmsh I create one point and apply a translate operation 10000 times. It takes 15 GB memory and 20 seconds. The Gmsh-5-lines script is attached (extension is changed from .geo to .txt). Gmsh 4.13.1 (OCC 7.7.2), Windows 10. Would you clarify, please, is it a problem of OpenCascade or Gmsh? Thank yo
Hello everyone and OCC team, The following script reproduces an issue while using Gmsh (please, follow the "FIXME" tag). It is a .geo file, so just change the extension to .geo. For a specific aspect ratio (see Dw = 0.001, line 12) of two geometry entities (i.e., a very tiny wellbore/cylinder within