DiscussionsIssue archiveOther usage issues

Forum archive

Other usage issues

Technical discussions preserved from the public OCCT community forum.

Topics
5,359
Replies
16,480
Files
825

Discussions

Page 1 of 90

Showing 60 discussions, ordered by the latest archived activity.

How can I extract Name of Label with python?

Hi all, I am using the lastest version of pythonocc-core. I just want to extract the name of shape / label and print it out: # Get all labels containing shapes labels = TDF_LabelSequence() shape_tool.GetFreeShapes(labels) # Iterate through all labels and print their names for i in range(labels.Lengt

10 replies

modify the transform of sub assembly to its parent level

problem I'm trying to modify the transform of sub assembly to its parent level using XCAFDoc_Location::Set() method. The problem is when I export the model to step and read it again, I find the location doesn't change. I have tried to solve is, using shape_tool->UpdateAssemblies() or doc->Recompute(

1 reply1 file

Convert STEP file to BREP format in using JS library

I'm working on a system that should take a user uploaded STEP file and return the BREP representation. When I read the file using ReadStepFile, the output object seems to only have a mesh array, and a brep_faces array that just shows hashes, not actual BREP data. Is there a way to get the raw brep d

1 reply1 file

Crash in GeomAPI_ExtremaCurveCurve

hello, there is a crash in finding extremas of two co-central arc edges: edge1: start point: 0,8,0 end point: -8,0,0 centre: 0,0,0 axis dir: 0,0,1 edge2: start point: 0,4,0 end point: -4,0,0 centre: 0,0,0 axis dir: 0,0,1 //--------------------------------------- double d_tmin1, d_tmax1; double d_tmi

1 reply

Line tangent to 3d curve at point

Hi, How can I find the tangent of a 3d curve at a point? Like this http://upload.wikimedia.org/wikipedia/commons/2/2d/Bezier_2_big.gif GeomAPI_Interpolate seems promising thanks

6 replies

Build TopoDS_Shape from triangulation

Hello, I know how to get the Poly_Triangulation from a given TopoDS_Shape ; but is it possible to do the inverse : build a TopoDS_Shape from a given Poly_Triangulation ? Thank in advance Bruno

12 replies

Cannot Select Cylindrical Face with `MoveTo` in AIS_InteractiveContext

Hi everyone, I am currently facing an issue when trying to pick a cylindrical face from a CAD model using OpenCascade. I am using the following call: m_aisContext->MoveTo(point.x, point.y, m_v3dView, false, true); This leads into: AIS_StatusOfDetection AIS_InteractiveContext::MoveTo( const Standard_

1 reply3 files

SelectRectangle cannot pick Bnd_Box with negative coordinates along the Z-axis

AIS_InteractiveContext::SelectRectangle(_min, _max, _view, AIS_SelectionScheme_Replace) I try to rect select on X-Y plain using SelectRectangle, _min and _max are converted from World location. I cannot select object whose Bnd_Box has negative coordinates along the Z-axis. For example object boundin

1 reply

MakePrism generating incomplete shape

I have the following C++ code. It generates with three of the four side faces and no top or bottom. Any thoughts on what is wrong here? TopoDS_Shape MakeShape(); int main() { const char * filename = "/home/mwu/src/occtest_native/build/myshape.stl"; TopoDS_Shape shape = MakeShape(); StlAPI_Writer stl

1 reply1 file

Need advice from experienced users please

Hi I am very new to OCCT. I am currently busy with an online coarse to give the basic background on OCCT. I want to create a simple CAM program that will load a STEP file and do the following work. 1) Load the STEP model. This will be a hollow cylinder or pipe. The pipe has some holes at any entry a

0 replies

math_Matrix::Multiply() seems to be wrong

Hi all, it seems that method math_Matrix::Multiply(const math_Matrix& Right) is wrong. In the following code, when I = 0, J2 = 0, the code "Array(I, J2) = Som;" sets Array(0, 0) to Som, but then Array(0,0) is reused to compute the final elements in position Array(0,1), Array(0,2), ... Array(0,Right.

3 replies1 file

Cut operation usage

Dear all, We develop 3D modeler that allows to hollow one shape by several shapes. The shapes are designed thanks to BRepPrimAPI (box, cylinder, sphere,...) and the cut performed thanks to BRepAlgoAPI_Cut We encounter sometimes some issue during the cut operation, the resulting shape does not match

6 replies

The end points of Edge and its curve are different.

Hi, 1.I use follow code to get the end points of edge, // gp_Pnt startPnt1 = BRep_Tool::Pnt(TopExp::FirstVertex(edge, Standard_True)); gp_Pnt endPnt1 = BRep_Tool::Pnt(TopExp::LastVertex (edge, Standard_True)); The result is, startPnt1: {x=99.074021934389805 y=53.997534062546201 z=-45.442753877454102

2 replies2 files

BRepExtrema_DistShapeShape vs BRepExtrema_ExtFP

The above classes behave differently when computing a minimum distance between a vertex and a face. BRepExtrema_DistShapeShape always finds at least one closes point. However, BRepExtrema_ExtFP reports no solutions in some cases. From online documentation is not clear what is the expected behavior o

0 replies

Issues with STEPControl_Reader with Japanese Characters in them

Hello! I'm having trouble with OCC version 7.8 with reading STEP files, specifically with reading folder paths with Japanese characters in them. For example if I have the following C++ code snippet: CString file = "C:\Users\jgregory\Desktop\新しいフォルダー\stepfile.stp" Standard_CString FileName = (Standar

6 replies
0 replies

How to access sketch line data from IGS

Hi, I got this conversor set up from IGS to OBJ. It works fine for the conversion, but I'm having trouble getting acces to a few sketch lines from the IGS. I know that Faces are shapeType 4 as TopAbs_FACE but I dont know which one is for the sketch lines. Debugging I've seen its index 0 so I'm assum

0 replies2 files

BRepOffsetAPI_MakePipeShell create a twisted pipe

Hello, I'm contributing to the FreeCAD project and I came across a strange behavior with BRepOffsetAPI_MakePipeShell . It seems that in some circumstances the created pipe (using the BRepOffsetAPI_MakePipeShell API) is twisted. As shown below in the image twisted.png , the pipe appears to be self in

0 replies4 files

How to force OCC use desktop OpenGL?

Hello,I have an occ view embedded in a qt app with configuation like this: Ubuntu 24.04 OCC 7.8.1 QT 6.4.2 and it works fine under Windows like attached picture:works fine under windows.png, but under ubuntu, all QT UI got messed up like attached pictures: messed_up_under_ubuntu.png; and at the same

2 replies2 files

Open CASCADE as a Service?

Hi, want to start the development of a .NET micro server that creates parametric geometries on demand, using Open CASCADE. So one question first: is it possible to run the Open CASCADE libraries in multiple instances, as required for such a micro service? Thx ia, Ekki

6 replies

Retaining relationships between TopoDS_Shape and TopoDS_Edge's

Hello, I have been struggling with a problem for a while regarding retaining relationship between a TopoDS_Shape and its corresponding TopoDS_Edge's, after I have extracted the edges from the shape through explore. If I convert the shape and the edges to BREP's and then convert them back to Shape an

3 replies

Open CASCADE turns 25!

It was December 7, 1999, 25 years ago when Matra Datavision released OpenCASCADE in source code. A move that required vision, leap of faith and political will of those who were in charge. I am thankful for being part of this story, before, during and after that moment. This product triggered my prof

1 reply

Unresponsive application

Hello everyone, I am encountering a problem where my application becomes unresponsive when using a popup with an `OCCTQtViewer` widget. Here's how to reproduce the issue: 1. On the main page, there is a button that opens a subpage. 2. On the subpage, there is another button that opens a popup contai

0 replies2 files

App freeze problem

Hello everyone, I am encountering a problem where my application becomes unresponsive when using a popup with an `OCCTQtViewer` widget. Here's how to reproduce the issue: 1. On the main page, there is a button that opens a subpage. 2. On the subpage, there is another button that opens a popup contai

0 replies2 files

Using multiple threads with IntCurvesFace_ShapeIntersector in OCCT7.7.2

For example, I have 10 TopoDS_Faces and 100 Geom_Curve, and I need to calculate the intersection of each face and each line, 10*100=1000 times, which will take a lot of time. So I expect multiple threads to compute the intersection of each surface and curve in parallel. However, the actual calculati

2 replies

Application architecture questions

Hello everyone, i've got few questions about implementing application. Using Qt and OpenCASCADE. I've found out there is class TDocStd_Application , should i use it to control every process in my app or i should use inherited classes(if yes, which one)? Because i checked source code of FreeCAD , the

3 replies

Error occurs when using ShapeUpgrade_UnifySameDomain

I have some STEP files in which all cylindrical faces are split into two and I tried ShapeUpgrade_UnifySameDomain to merge them, most of these files were processed successfully but some failed. Here is the error info:Standard_ConstructionErrorgp_Dir::Crossed() - result vector has zero norm raised fr

0 replies1 file

dev.opencascade.org 404 not found

Hello, I noticed that the class documentation website does not work. e.g.: https://dev.opencascade.org/doc/refman/html/classgp___ax3.html gives a 404 not found. Could you look into this? Thanks, Author

3 replies

Silhouette of Solid

Hello, I'm trying to get the silhouette or outline of a solid when looked at from above. The image tries to illustrate this. I've looked into HRL_Algo and HLRBRep_HLRToShape but no filter grabs just the silhouette of the shape (including HLRBRep_HLRToShape::OutLineVCompound). I've tried some other s

0 replies1 file

Proper way to define BRep edges from line segments projected to a surface?

I have tried many different methods of creating a shell-based B-Rep consisting of faces bounded by polylines with endpoints already on the surface. The only thing I need to do, I think, is define curve geometry that adheres to the surface, and provide it to `BRepBuilderAPI_MakeEdge(curve, start_pt,

0 replies

BRepOffsetAPI_ThruSections with a set of TopoDS_Face with holes

How does one call BRepOffsetAPI_ThruSections with a set of TopoDS_Face that are simple shapes, but with holes in them? My code works well running BRepOffsetAPI_ThruSections twice, with the outside shapes first, and then the inside shapes later and boolean the two together. But I want to test is runn

0 replies1 file

Calculating the attribute of a edge

I have a big problem in my master thesis project unsing OpenCascade: I don't know hot to calculate the attribute of a edge (convex or concave). This is the definiton of my problem: Input: Two neighbor faces (they share a common edge) Output: Are convex or concave? In OpenCascade it is easy to make s

5 replies

Multi-secions surface in OCC

Hello guys! I want to build a surface through a couple of guide curves (green ones in picture) and section curves (red ones in picture). For those who are fimiliar with CATIA, there it is called Multi-sections surface. I looked through the BRepOffsetAPI package, but didn't find a class which satisfi

8 replies1 file

Counting holes/tunnels

Hi, I need to count the holes from a 3D mode. For now, I've tried counting inner wires for each face using "TopExp_Explorer explorer(shape, TopAbs_WIRE);", but I need more than this because sometimes 2 holes form a tunnel. In this case I'd need to avoid double counting inner wires. How would I check

5 replies1 file

split an edge that's part of a solid with ReShape

Hi all: I am trying to split 1 edge of a solid box and somehow have the shapes updated so that I end up with a new box that has 13 edges instead of 12. I have included the code which basically shows how I am using BRepTools_Reshape. The sub-shapes are not updated correctly. What am I missing? I am d

4 replies1 file

c# wrapper

Hi In response to your customer service, I sent an email on May 20, 2024 to request a demo of the C# wrapper tool to understand how to use it. I received no response from your customer service, could you address this request ? Regards

1 reply

Fixing the tolerances inside a shape

Hello, is there a way to recompute the tolerances of a shape and its subshapes, without doing a compleate repairing? I need an algorithm which sets the tolerances of vertexes and edges to as small a value as is enough to cover the gaps. My problem is the following. I often have faces or solids which

5 replies

OCAF Shape Attributes

Hi Everybody! Where can i find some information on Shape Attributes? The doc in Application Framework User $ Guide is not enought clear for me... Is there an exemple somewhere? Here a description on what i want to do: Suppose a have three solid shapes.The third one is the intersection of the others:

5 replies

Contact Opencascade commercial side

Hi, I would like to get in touch with the commercial side of opencascade. I contact them via email, via the contact us formulary and other forms in their website, but I did not have any answer. Does anyone know how I can get in touch with them? I would like to have more information about OCCT traini

2 replies

step file reader

hello, is there a way how to disable shape fixing in step file reader? best regards, Author

1 reply

Fillet problem

hello all, I'm having a problem with BRepFilletAPI_MakeFillet.I have a Data for Real Case bug5495.zip in Files.Real Case is a Step. I want to select the highlighted edge as shown in the image bug5495-1.png and round the corner with a radius of 10. So far the rounded corners I get are shown in the fi

0 replies3 files

CAD Assistant FixShape Flags

Hello, please we would like to know which are the exact FixShape flags used in CAD Assistant. https://dev.opencascade.org/doc/occt-7.6.0/overview/html/occt_user_guide... Turns out we are trying to match the same import behavior and we expect to be able to know this information. Please, let us know t

3 replies3 files

How to combine a set of shapes into one shape

Hello guys, I want to export a Model to a STEP file. The model is consisted of several TopoDS_Shapes. How can I combine these shapes into one shape so that the STEP file opened as one model, not as many pieces? Waiting for your answer...

7 replies1 file

Compute Signed Distance Function For Point Cloud

Disclaimer: I have never worked with OCC before and want to asses if what I want to do can be done with OCC. I am not asking for someone to do the work for me ;) I am working with an in-house Finite Element code, written in Fortran (with existing interfaces to other C/C++ libs). I am looking for a t

0 replies

Issue with conical surfaces?

Attached you can find two STEP files exported from the same SolidWorks model. example_split-periodical-surfaces.STEP is exported with the option “Split periodical surfaces” set. example_nosplit-periodical-surfaces.STEP is exported with the option “Split periodical surfaces” unset. The option makes a

14 replies6 files

How to use the NCollection_Haft variables in other DLL

Dear friends! I create the New C++/CLI project which reference the OCCTProxy.dll( NCollection_Haft variables are there) and export the file names TEST.dll, and I want to use the NCollection_Haft variables(e.g "NCollection_Haft<Handle(AIS_InteractiveContext)> myAISContext;") in the TEST.dll. When I b

1 reply

Failed to do the intersection operation

I use the occ to do the intersection operation, but it fails. I also test it using FreeCAD, and it fails, too. Would anyone help me? The attachment is the two parts. Archived image: external image

0 replies3 files

Create any part with ChatGPT and OCCT without a CAD System

Dear Users and Developers, With the advent and success of LLM's like ChatGPT, BARD and numerous others it is now also possible to model 3D parts with these systems and OCCT, without using a classical CAD system. See my article here for a first intro: https://www.hackster.io/trisolarian/design-any-pa

1 reply

offset problem

hello all, I'm having a problem with BRepOffsetAPI_MakeOffset. Any ideas why this is crashing : TopoDS_Wire *s2; s2 = TopoDS::Wire(GetShape("Contour",ic)); BRepOffsetAPI_MakeOffset mkOffset(*s2) mkOffset.Perform(dist); GetShape returns a TopoDS_Shape (a wire) , dist is a real (0.001) an ic is an int

6 replies

Webassembly performance degradation

When I compiled the code into WASM, I found a significant performance degradation. This is five times less than native c++ code. I suspect there are several reasons: 1. Webassembly VM 2. Multithreading doesn't work 3. Virtual file system ? Any suggestions for improving performance?

2 replies

Crash in TKDraw::~Draw_Interpretor::Tcl_Exit

Hello, i have converted my project to OCC 6.7.1. It has worked well with OCC 6.5.5 Now i have a crash if my program is closed. Here is the Call Stack: > TKDraw.dll!Tcl_ExternalToUtfDString(Tcl_Encoding_ * encoding, const char * src, int srcLen, Tcl_DString * dstPtr) Line 1128 + 0xd bytes C TKDraw.dl

12 replies

'Standard_ShortReal.hxx': No such file or directory

Hi all When ever I compile any sample programme the following error occurs, fatal error C1083: Cannot open include file: 'Standard_ShortReal.hxx': No such file or directory Error executing cl.exe. Please help me removing this error. Siddhartha

8 replies

fillets on a "cube"

I would like to create fillets that are "eating" the involved face(s). See my basic test on Draw # make prism polyline f 0 0 0 100 0 0 100 100 0 0 100 0 0 0 0 mkplane f f prism p f 0 0 200 # make fillets explode p e blend b1 p 50 p_1 50 p_8 I noticed that I can fillet up to 49.9999... Is there a way

8 replies

part number is missing inside the shape's information

Hello, I'm reading the shapes information from a stp file and I'm trying to find the "part number" (or "product number", the identification code of a part or an assemlby) but the part/product name is what i get (the nomenclature string). I can see that if the .stp file contain, for a given product,

2 replies2 files

How to transforme a TopoDS_Shape into a TopoDS_Edge

Hello, I want to convert a TopoDS_Shape into a TopoDS_Edge. So I use the following instructions : Handle (TopoDS_TEdge) newEdge= Handle (TopoDS_TEdge) :: DownCast (oldShape); or Handle (PTopoDS_TEdge) newEdge= Handle (PTopoDS_TEdge) :: DownCast (oldShape); or Handle (PTopoDS_TEdge1) newEdge= Handle

4 replies