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 2 of 90

Showing 60 discussions, ordered by the latest archived activity.

Show different colors of face's front and back sides

Hi gentlemen, I have some VERY OLD codes to show faces's front and back sides in different colors. The codes like : aPrs = new Prs3d_Presentation(myAISContext->CurrentViewer()->Viewer()); Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(aPrs); Handle(Graphic3d_AspectFillArea3d) myFillAspec

4 replies6 files

Confused about shells

Hi, I'm confused about what a shell is exactly. The documentation tells me that BRepBuilderAPI_MakeShell can be used to make a shell from a set of faces. But when I look at the constructor for MakeShell it asks for a surface not a face and it looks like it just wants one surface. Do I some how make

6 replies

Ray casting in code (not in 3D viewer)

Hello community. We actually implemented an algorithm to compute all hits performed by a vector (sun direction) to a satellite model converted in the OpenCascade format. To do so, in fact, we produce a huge grid a rays (sized accordingly to the model bouding box). Then, for each CAD object, we retri

2 replies1 file

Slice Model in Z Dimension or generate Point Cloud

Hi! I would like to achieve the following: 1. Read a STEP-File(already working) 2. Slice the Model in Z Dimension in 0.5mm parts and get several "2D Layouts" How could I achieve that? How could I e.g generate a Point Cloud or are there better options to achieve my goal? Thanks

0 replies

Periodic Parameter Range on Surface of Revolution

I have an issue hopefully someone might be able to help me with. I'm importing an IGES file that has trimmed patches from surface of revolutions (which represent fillets on the full geometry). The issue is that the parameter ranges are incorrect. The surface should be bounded by the red spheres in t

0 replies4 files

OCCT.Net

Apologies if this topic has been covered before. I'm a developer for a small company and am currently working on a GUI for a CNC machine we are building for a customer. The company would like to use WPF to create the app but I've been thus far unable to find a C# wrapper for the OCCT library. I was

10 replies

Commercial components - get in contact

I have been trying to get in contact with Open Cascade client service to get information about the commercial components. I have tried to use the web contact form and have also tried to use the client service email address, but have this far received no response. We need to proceed with our evaluati

4 replies

Fails to build project

Hello, im new to OCCT and was trying to follow the bottle tutorial. However im failing at building the project (with both make, and VS code), even though im not that far into the tutorial. Any idea what is wrong? Thanks! This is my CMakeLists.txt: " cmake_minimum_required(VERSION 3.20) project(Bottl

4 replies1 file

missing TKRBep.dll in my own project

Hi friend, I create my own project Open cascade with ms 2010. but when i run it,it has a error. My code : // ReadStepFile.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include #include //#include //#include //#include Standard_Integer _tmain() {

6 replies

How to handle a try and catch to handle Standard_Failure?

How to handle a try and catch to handle Standard_Failure? try { //some OCC code... } catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught(); PyErr_SetString(PartExceptionOCCError, e->GetMessageString()); } It seems that Standard_Failure::Caught(); does not longer exist? sh

3 replies

Error with Step Export of offset ellipse

Hi people. I have a problem with exporting the offset ellipse, BSpline to the step, during the Transfer it gives an error. I use these steps. I use gp_Ellipse to create an Ellipse gpEllipse = gp_Elips_2(gpAx, minorRadius, majorRadius); makeOffset = BRepOffsetAPI_MakeOffset_2(gpEllipse.getFace(), Geo

2 replies

Creating One face from a group of faces that share edges

I'm having some trouble trying to generate a singular TopoDS_Face from a group of TopoDS_Faces that dont neccessarily share the same plane or domain, but share at least an edge. By sharing edges I mean if we have TopoDS_Face S1 and TopoDS_Face S2, where S1 contains edges e1,e2,e3,e4 and S2 contains

0 replies

a link problem about the usage of BOPTools_AlgoTools3D

Dear all, I've encounter a linker problem LNK2001 when using BOPTools_AlgoTools3D::GetNormalToSurface. unresolved external symbol "public: static bool __cdecl BOPTools_AlgoTools3D::GetNormalToSurface(class opencascade::handle<class Geom_Surface> const &,double,double,class gp_Dir &)" (?GetNormalToSu

2 replies

Overlapping detection using Common operation

I had a quite unpleasant surprise today when trying to get an algorithm to detect overlapping working. Volume overlapping was quite straight forward: just call Common with a Solid and a Compound of all other Solids you want to check. To detect area overlapping I used Shells instead, but the first is

7 replies

Finding the common edges of two surfaces

How to do this with OpenCascade? If there is no built-in tool, then I have to iterate over the edges of the surfaces and do some edge-based comparison. How to check the equality of twotwo topological edges? Thanks.

5 replies

How to find out overlapping faces in Opencascade?

Hi all, I am working with Boolean operations of two solids. After the resultant geometry, i need to find out whether there is any existing faces, edges and vertices in the resultant geometry which are already there in the existing two solids. I tried CheckOverlapping function for overlapping edges a

6 replies

Problem with MapShapesAndAncestors

Hello again, The attached file shows a model with 2 faces highlighted (Face1.jpg and Face2.jpg), and the edge that these faces share (Edge.jpg). These pictures are here to show that OCCT is correctly detecting faces and edges on that model. I need to check all edges of the model for their concavity,

5 replies1 file

How to change AIS_Point Selected Color?

I copied AIS_ The code for Point rewritten this function to add color, but it failed。。。。。。。 void AIS_SketchPoint::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode) { aPresentation->SetInfiniteS

1 reply1 file

Convert STEP 242 to STEP 214

I have a CAD file. I exported it in STEP 214 and STP 242. When open with this both files with: from OCC.Core.STEPControl import STEPControl_Reader from OCC.Core.StlAPI import StlAPI_Writer input_file = r"step.STP" step_reader = STEPControl_Reader() step_reader.ReadFile( input_file ) step_reader.Tran

3 replies

Getting object coordinates (in the same way they are given with gp_Pnt class)

Hi, I am trying to retrieve the X and Y coordinates of the objects clicked or hovered in an OpenGLWidget. I get X and Y positions of clicked objects but their values are not compatible with the values that they are put into the widget with for example gp_Pnt X and Y coordinates. How can I get(or con

0 replies

Get the solid, faces, edges, and vertices from this STEP file id

How can I get the solid, faces, edges, and vertices from this STEP file id: #28=TRIANGULATED_FACE('',#26,10,((-1000.,-0.,-0.)),$,(),((10,9,8),(10,8,7),(10,7,6),(10,6,5),(10,5,4),(10,4,3),(10,3,2),(10, 2,1))); Thanks in advance.

1 reply

Length of Geom2d_Curve

Hello, I need the (approximated) length of a 2d curve. This is of course simple for lines and circular arcs, but quite difficult for general curves (arcs of ellipses, BSplines etc.). Does anybody know in which package I should look for an appropriate algorithm (I didn't find anything in Geom2dAPI).

3 replies

How to get technical support

Hello. I am new to OPENCASDDE. I have sent technical inquiries to OPENCASDDE from [Contact us] several times, but I have not received a reply. I am also registered for technical support, but how should I contact OPENCASDDE? If anyone knows how to contact me, please let me know. Thank you very much.

5 replies

BRepBuilderAPI_MakeFace precision

Is there any way to set the planar tolerance for BRepBuilderAPI_MakeFace()? I would like to be able to alter the tolerance for what is considered on and off the plane? BRepBuilderAPI::Precision(Standard_Real xx) does not seem to do the trick. Author

10 replies2 files

Adding a sub-shape to selection in local context

Hello, I have an AIS_InteractiveContext. In this context , I have an AIS_Shape. I open a local context in face selection mode. I want in c++ add a face from my object to the current selected list. How to do that ? I have seen the function : AIS_InteractiveContext::AddOrRemoveSelected ( me:mutable ;

10 replies

CADRays not showing any texture

My problem is I am opening CADRays, I am importing a STEP file and I am trying to add texture on it but CADRays doesn't shows my textures. I tried different images but no one works. Can somebody help?

0 replies

Android JniViewer Sample running error

Build command failed. Error while executing process D:\Android\sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C E:\SvnLocalProjects\occt\install20230504V1\share\opencascade\samples\java\jniviewer\app\.cxx\cmake\release\arm64-v8a TKJniSample} ninja: Entering directory `E:\SvnLocalProjects\oc

0 replies

Building C interfaces for classes in OpenCASCADE

I am trying to build C interfaces for classes in OpenCASCADE for use in Pharo ( https://pharo.org/ ) for a school project. The reason for using the C interfaces is because Pharo can only communicate with other languages via uFFI (unified Foreign Function Interface) ( https://books.pharo.org/booklet-

3 replies

Removing a part from an assembly

Hello, I am writing a program that is supposed to read a Step file of an assembly, remove a part from that assembly and then write separate Step files for the removed part and the original assembly but with that part removed. I use the following code snippet to remove the part from the original asse

3 replies

Opencascade read step file surface information

Background I am using Opencascade to read the curve and surface geometric information in the step file, such as the following code: bool HighOrder::FileIO_3D::read_step(std::string & stepFile) { STEPControl_Controller::Init(); STEPControl_Reader reader; Standard_Integer status = reader.ReadFile(step

0 replies

BRepAlgoAPI_Fuse returns a wrong result

I've made a prism by BRepPrimAPI_MakePrism with a circle face as base shape. It should be a cylinder. (see p1.png) And I've made a solid pipe by BRepOffsetAPI_MakePipeShell, with a ellipse to call BRepOffsetAPI_MakePipeShell::Add and a B spline curve as spine. (see p2.png) Then I use BRepAlgoAPI_Fus

0 replies3 files

Compilation fails when smart pointer is set to static in a class

I hope that only static members are used in this tool class, instead of repeatedly initializing new objects. Compilation fails after adding static Handle(XCAFApp_Application) aXDEApp as below: #include "XCAFDoc_DocumentTool.hxx" #include "XCAFApp_Application.hxx" #include "XCAFDoc_ShapeTool.hxx" #in

1 reply

New Bug Report Form

I just took a look at the bug report form to find any unfixed bugs. No matter what I put in the form, nothing came up. Is there nothing in the database yet, or is there some trick to getting a listing of known bugs?

5 replies

Using Qt to build OpenCasCade project in linux environment

Is there an OpenCasCade sample project established using Qt in linux system? Or how to use Qt to build a new project under linux system. I have tried many methods to no avail, which makes me very upset.

0 replies

Using Qt to build OpenCasCade project in linux environment

Is there an OpenCasCade sample project established using Qt in linux system? Or how to use Qt to build a new project under linux system. I have tried many methods to no avail, which makes me very upset.

0 replies

3rdparty hard-coded paths when building against OpenCascade

I'm trying to build a project based on OpenCascade 7.7.0(installed from Download center) using CMake For the sake of find_package(OpenCASCADE) the OpenCASCADE_DIR cmake variable was set to the path containing file OpenCASCADEConfig.cmake eg something like D:\mybasepath\OpenCASCADE-7.7.0-vc14-64\open

1 reply

How to find a point on an hyperbola from a nearby point?

Working on FreeCAD. In the sketcher I'm making the snapping feature for hyperbolas curves. There is an hyperbola, the user put the mouse pointer close to it (point A). So A is close to the hyperbola, but not exactly on it. I need to calculate the coordinates of the point B which is on the hyperbola.

0 replies1 file

Creating lines, arcs, curves from Edges

Hi, I am new to OCC, so go easy on me. I am using TopExp_Explorer to iterate through the Edges of my shape(s) and what I need to know is what is the best way to obtain the geometry for each edge. In other words, the best way to convert the Edge to an appropriate segment, line, arc, circle, etc. Any

4 replies

Serialization of TopoDs_Shape

Dear all, We develop a 3D software linked to OCC v6.9 and we would like to use the v7.1 last release now. We notice a big gap for the serialize issue between the two versions : In the v6.9, we could directly serialize a TopoDs_Shape in a binary file just like that : Writing method : void CBRepGeomet

3 replies

IGESCAFControl_Reader will not transfer the names of the sub-shapes

Hi, I've been messing with reading geometries and their names/colors. I noticed that IGESCAFControl will not transfer the names of sub-shapes, which is exactly what I am trying to do. IGESCAFControl_Reader::Transfer (around line 247 to 253) reads: if(IsColor) { CTool->AddColor(col); IsFound = STool-

2 replies

Adding multiple consecutive lines and arcs to a collection / list

Hello! I like to put a beginner question: From a numerical file I want to create a list / a collection, consisting of lines and arcs - possible of type gp_Lin and gp_Circ, created one after another as a chain / polyline. The lines read are of several categories (different color) but the arcs have th

0 replies

Non Responsive

Hi there, We have been trying to contact the OpenCascade support and sales team and receive no reply. Does anyone have any information or similar experience and know how to contact?

1 reply

Getting vertex position problem in step file without mouse click.

Hi, I have imported step file and I would like to find vertex position that it shown in preview (yellow). I have tried to get massless compounds includes vertices within all shapes. This method works in 3d_detailed step file, but it doesn't work in TO4_HD_D16. These vertices just in a compound that'

2 replies6 files

A possible bug in IntTools_FaceFace for a plane and a face with a circle surface

Hi, I would like to find the intersection curves on a shape with a rectangular plane. There are several possible options. I used IntTools_FaceFace to generate the intersection curves on the shape. When faces of the shape are circular (rather than rectangular) faces, results are wrong, as shown in th

0 replies1 file

How can I find the theory of TopOpeBRep_ShapeIntersector?

Now I am using TopOpeBRep_ShapeIntersector to get the intersection of two faces and it has good performance.However I need to write a document to introduce this algorithm, so I want to now where can I find the theory of TopOpeBRep_ShapeIntersector? Thanks in advance!

0 replies

opencascade::handle undefined behavior

Hi everyone, I came across the piece of code in opencascade::handle class that looks as follows: template <class T2, typename = typename std::enable_if<is_base_but_not_same<T2, T>::value>::type> operator const handle<T2>& () const { return reinterpret_cast<const handle<T2>&>(*this); } I believe this

0 replies

Does opencascad(OCCT) itself support cell picking like CAD Assistant?

As we can see: [![cad assistant cell picking][1]][1] [1]: https://i.stack.imgur.com/6Lqnr.png Within the OCCT based CAD Assistant,user can mouse over a single cell to get it's detailed information and highlight it,question are? 1,Does OCCT itself support this operation? 2,If yes,any example or tips

0 replies

Broken code example in 7.7 (and 7.6) documentation

Hello, at the beginning I must add that I am almost completely green in the subject of OCCT - I have barely started to chew through the examples and tutorials. I stumbled upon the following problem. Example shown in documentation for 7.7 (and 7.6) - "Surface generated from four curves and a point" -

0 replies

Replacement of TCollection classes by NCollection templates

Hello, I am migrating from OCC 6.9 to 7.6. In the 7.0.0 Release note I have seen that TCollection classes have been replaced by NCollection templates. Unfortunately the Upgrade Guide link does not work: https://dev.opencascade.org/doc/overview/html/occt_dev_guides__upgrade.html Can anyone tells me h

2 replies

I'd like to get analysis results.

Hello I am now working on reading the Step (.step) format and printing data. Relative Coordinates(X,Y,Z) , Real Coordinates(X,Y,Z) , standard data, arc length , Transfer Length, Bending angle, angle of rotation datas I'd like to print out

1 reply

rect offset failed ,so sample,but error

thanks all,"rect.brep" is a 4 bspline‘s wire,offset by BRepOffsetAPI_MakeOffset (0.002, GeomAbs_Intersection,false) is failed,tested at ver 6.8 and 7.4, omg

0 replies1 file

Measuring the angle between a flat surface and a cylindrical surface

Hello Everybody, I need to measure the angle between a flat surface and a cylindrical surface with opencascade. For example for holes. When i try to use Angle_dimension, all times return 0. Maybe someone know how to do it. Thank you in advance

0 replies

how to get material, centroid in ACIS

Hello I am now working on converting data by reading ACIS (.sat) format. This is the first time related to opencascade, so it is difficult to find a way to check the data that can be checked on the cad assistant. The shpe-related data was imported, but in the case of material and centroid, they do n

0 replies2 files

Make a Face from TopoDS_Shape

Hi all, I want to make a face from a TopoDS_Shape as in following code. TopTools_ListOfShape list; list = prism.Generated(ftop); TopoDS_Shape SolidTopFace = list.First(); I want to convert SolidTopFace in to TopoDS_Face in order to display it. How can I do this?

3 replies

IntTools_EdgeEdge for 3d curve intersection

To find 3d curve intersections, instead of GeomAPI_ExtremaCurveCurve, I am testing IntTools_EdgeEdge (after creating two edges from the curves). It was made for boolean operations, so it finds both intersection points and overlap spans, which are both considered "common parts". Has anyone tried it i

2 replies