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

Showing 60 discussions, ordered by the latest archived activity.

How can i display shape?

Hi, I have a question. I know that equation's coefficient value in case of planes.(A, B, C, D) How can i display that solid consist of planes ? If planes are infinite planes then how can i check the intersection between plane and plane ? Thanks in advance.

1 reply

problem with Approx_Curve3d

Hello I have created a wire from a list of unsorted edges. Then i want to convert the wire into a Geom_Curve by using Approx_Curve3d. But the result ist only a part of the wire. I have used Approx_Curve3d before and it worked well, so i think there might be a problem with the wire. But I don´t know

1 reply

How to insert a seam into a soid without seam

I have such solids without any seams, for example, a cylinder only have two ring edges. I think such topology is not allowed in OpenCascade. I will very appreciate it if anyone could tell me how to insert a seam into such soids. Thanks. Sun

2 replies

Read names from iges file by OCAF

Hi All, I have an iges file exported from CATIA. It contains only four curves. In CATIA, they are named as "DB_71", "DB_72", "DB_73" and "DB_74". When I read this file using OCAF, I get four names as "DB_71 (0)", "DB_72 (0)", "DB_73 (0)", "DB_74 (0)", I just want to know what's the "(0)" meaning, ca

6 replies2 files

Is this a known problem of OCCT?

I created two BREPs (e.g. one sphere, one box), and part of them are overlapped. When I move the mouse over the overlapped part, sometimes the BREP in front was highlighted, which is expected, BUT sometimes the BREP in the back was highlighted. Does anyone experience similar problem? Is it a known b

6 replies

get the type of doc stored in TDocStd_Application

Say I have a few subclass of TDocStd_Document, then use TDocStd_Application::NewDocument() to add instances of those subclasses. (I've subclassed TDocStd_Application as well): Handle_FooDoc fooDoc; myApp->NewDocument("foo", fooDoc); Handle_BarDoc barDoc; myApp->NewDocument("bar", barDoc); I then ite

3 replies1 file

Algorithmic error in BRepFill_CompatibleWires

Hello, I found a severe error in BRepFill_CompatibleWires::SameNumberByPolarMethod. The algorithm uses two variables scal1 and scal2 in order to determine the correct orientation of an edge. Both variables take the value of some dot product, which means they can be negative, but this case is not con

7 replies

CNC simulation

Hi, I'm going to develop a cnc simulator for my cnc machine. I don't want to simulate the G-Codes, instead, I want to simulate by getting the x,y,z position of the milling tool. The simulation should be 3D and the user should be able to rotate and zoom during the simulation. For this, i have decided

8 replies

How to save multiple shapes?

Hi If I have shape1, shape2, shapeN, how I can I put all these shapes into a shape (say shape_all) so that I can use BRepTools::Write(shape_all,"filename") to save all the shapes. Thanks. Sean

3 replies

Bug in IntTools_FClass2d

At IntTools_FClass2d.cxx:99, Umin = RealLast(). Real_Last() returns DBL_MAX. On my system this is 1.7976931348623157e+308. At some point, it should get changed to a lower value, but apparently this doesn't always happen (note the value of Umin when I print it): Program received signal SIGINT, Interr

15 replies4 files

Bug in GCPnts_AbscissaPoint??

Hello Is it possible that there might be in bug in GCPnts_AbscissaPoint? I try to compute points on a Wire with certain distances The results are correct till U is near the LastParameter. Then results are incorrect. Is there an alternative? I tried BRepAdaptor_CompCurve with incorrect results too. R

1 reply

FitAll and infinite line

Hi I have small program to draw different, simple shapes. I wanted to implement drawind infinite (or half-infinite) lines (Geom_Line->GeomAdaptor_Curve) as helpers and everything works OK except FitAll() method from V3d_Viewer class. When i call it, it fits my infinite line on screen, but with huge

1 reply

How to decide the type of a curve?

How to decide which type is the curve, such as Geom_Curve object? Is it a circle, line, bspline or other types? How to decide?

1 reply

How to deinitialize OCCT

I am developing a Delphi application using a OCCT through a wrapper DLL with c-style exports. While this approach works reasonably well, i have some issues with deinitializing the OCCT-Modules. The application ( a construction/calculation suite for architectural engineering) is using OCCT for modeli

2 replies

Is it possible to display AIS objects from a thread?

I'm using several threads to speed up my app. When I try to display an AIS_Shape from one of the threads, it crashes. I'm using MMGT_OPT=0 and I call Standard::SetReentrant (Standard_True); before starting any threads. Is this unsupported, or am I doing something wrong? using OCC 6.3.0 on amd64. app

9 replies

About Distance between a plant and a line

hi everyone £¬ i want to compute the distance between a plant and a line ///////////////////////// gp_Ax1 axis = GetAxis(aface1); gp_Lin line1=gp_Lin(axis); TopLoc_Location loc; Handle(Geom_Surface) theSurf2 = BRep_Tool::Surface(aface2, loc); GeomAdaptor_Surface theAdaptSurf2(theSurf2); gp_Pln thePl

2 replies

cannot debug OCC files

I am a OCC newer and just build OCC successfully based on Mike's introduction " http://www.opencascade.org/org/forum/thread_14581/ ". Then I was able to build and run turorial. BUT, the OCC functions(ie,GCE2d_MakeSegment) cannot be stepped in. All library files and dlls have been created in "openCAS

4 replies

Hiding Objects

Hi: How can I get or search hiding objects? thanks a lot. Best regards, Shawn

4 replies

Building faces from TopoDS_Compounds and TopoDS_Edges

Hello, i am working on a small CAD importer. I have the XCAF doc of the file and while browsing the shapes, I'm getting lots of TopoDS_Faces which i know how to translate. Other than TopoDS_Faces in the document there are a number of Compounds grouping inside other compounds or edges. I'd like to co

2 replies

reading a DXF file and retrieving all relevant informations

Hello OpenCascade users, my name is Enrico and I am working on a small DXF file converter. Since OpenCascade has a nice DXF module I am giving a look at it. Unfortunately I am very little proficient with OCC and I am getting a little lost here. I hope that someone may shed some light on a couple of

1 reply

OCAF OnNewDocument() problem

I have changed a MDI OCAF program to a SDI OCAF program, very things are OK, but when I click the new document button ,the program is collapse. In the OnNewDocument(),it only have: Handle_OcafApplication appli= ((CXXXApp *)AfxGetApp())->GetOCAFApp(), and appli->NewDocument("yyy", OCAFDoc),just as th

1 reply

Problem with BRepOffsetAPI_MakeFilling

Hi to all, i've a strange problem with BRepOffsetAPI_MakeFilling. I want to create a face from a wire. the wire has 4 edges of which 2 are segment and 2 are arc od circle. The wire is like a contourn of a cylinder. THe problem is that...when the lenght of the arcs is less than πr the algorithm works

1 reply

eomAPI_ProjectPointOnSurf is very slow

Hello, I'm seeking the points of a shape that is very close to a surface from which I want to build another form. For this reason I made this piece of code. for (TopExp_Explorer ex1(aShape->Shape(),TopAbs_VERTEX) ; ex1.More(); ex1.Next()) { TopoDS_Vertex V =TopoDS::Vertex(ex1.Current()); P = BRep_To

9 replies

Is it a bug of IGES reading a long string in head segment.

Hi All, I find a strange iges file. I read it in other three CAD/CAE softwares, and find the model sizes are all about 270. But I read it in my software using OCC, the model size is about 6000. Yes, most of these problems are caused by different unit reading. But I find it's not in this case. I debu

4 replies1 file

Status of new OpenCascade release

Any news on the next release of OpenCascade? http://www.opencascade.org/org/forum/thread_18847/ Kind regards, Author

3 replies

Computing a NURBS derivative curve

Hi, I was wondering if OCC has a function to compute at least the first derivative curve (aka hodograph) of a NURBS curve? After hunting around web and source, I wasn't able to find the relevant code(s). Thanks, Author

4 replies

BRepMesh_FastDiscret doesn’t triangulate holes

Hi everybody, I have a problem using BRepMesh_FastDiscret: I create a face with a hole inside which I wanna triangulate. Therefore I create first the outer face by a surf: TColgp_Array2OfPnt array_2d(1, 2, 1, 2); array_2d.SetValue(1,1, list_boundary_points_occ[0]); array_2d.SetValue(1,2, list_bounda

7 replies2 files

how to fix missing face from BRepOffsetAPI_MakePipeShell?

I'm making solids with BRepOffsetAPI_MakePipeShell, and sometimes one face is not present. I've tried to check the resulting shape, but BRepCheck_Analyzer reports that it is good, and it fuses with solids without problems. It has mass, which makes me think that the face is invisible - but I cannot s

3 replies2 files

Can two separate solids be in one CompSolid?

Hi, I am trying to distinguish Solids from a Compound, and group the solids in some shape, I am thinking using CompSolid. I know in theory, CompSolid should contain solids sharing surfaces, but can I put two solids in different location, which are not touching, into one CompSolid? Is there any drawb

3 replies

Create a geometry for Gmsh

I have a file.igs and I would to create the geometry for Gmsh. How can create it?

8 replies1 file

AIS_Textured object with contour - lines

Hi Guys ! Some time ago I'm find function which I may to show my textured objects with lines. It's was like ...PrsManager.... or TextureManager -> show lines on textured object. But now I can't found this. Maybe anybody know how I can show contour lines on a Textured shape

2 replies

The OpenCascade Qt Project

Hi guys, does anybody have the OpenCascade sources with Qt pro ? I think that is cool idea to use Qt project without ./configure and ./make under Linux and without *.dsp or *.VCPROJ under Windows. Or I'm wrong ?

2 replies

join two faces

Hello, In need to know how to join to TopoDS_Face or Geom_Surface to one single Face. The question was asked several times, but no satisfying answer Thanks! Author

1 reply

UNDO after Remove

Hi All, I'm having some troubles to get the original shape after a Deletion process (BRep_Builder::Remove) and using TDocStd_Document::Undo(). Below is my code ( consider aShape a squared Wire(4 edges), and aEdge is one its Edges ): Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplica

1 reply

Can a wire cut a cap out of a sphere?

Hello! According to the modelling data user guide, it should be possible to create a face from a surface and a wire. The wire is supposed to bound the face. If the wire is not embedded in the surface, it will be projected onto the surface. This is the theory. In practice, I have not been able to cut

2 replies

Couldn't get the modified Face by BRepFilletAPI_MakeFillet::Modified

Hello, everybody: I couldn't get the modified Face by BRepFilletAPI_MakeFillet::Modified(), so I couldn't trace the Face evolution. I use TopExp_Exlorer to iterate all the face of shape, the use each TopoDS_Face as parameter to call Modified, but each calling return a null list. In other words, I co

3 replies

how to convert step model to cascade shape?

In my project, i construct the step model step by step use the api, when the construct process is finished, i need to transfer this model to cascade shape, the following is my code which used to transfer,but the result shape is null. //create the session Handle(XSControl_WorkSession) xws = new XSCon

1 reply

Open Cascade and Qt conflict ob 64bit Linux

I compiled the Qt Import-Export Example for 64bit Linux (Debian Lenny), but unfortunately I noticed that the IGES import became very unstable. I use Qt 4.4 and OCC 6.3.0. The import of almost all IGES files crashes the application or the geometry will be damaged. I used the _OCC64 option for the com

1 reply

Change tolerance for detecting geometry types.

Hello! Is there a way to change the tolerance to detect Circles? I'm using 'GeomAbs_CurveType curveType = aAdaptedCurve.GetType()' to see if an edge is a straight line, circle, and so on. But some of my circles are not detected and marked as BSplineCurve. when using IGES files, my code fails to dete

3 replies

Common faces saved in brep files

I'm looking at an example of two boxes side by side, the common face being shared between the two boxes (i.e. IsSame() returns true, which means that they are exactly the same memory object). However, when written into a brep file (the two are part of a Compound), that common face is written twice (

1 reply

July 2010 Status of C# Wrapper Capabilities?

I will embark on a new initiative this week to learn how to write something in Microsoft C++. Perhaps I can do it. But what I really would like is success with a C# Wrapper library. All I initally need to do is to interpret IGES files to obtain some geometric data from them. The wrappers included wi

4 replies

compound made up of 2 solids, shared face

I create 2 adjacent boxes (solids) then create a compound containing those 2 solids using a Builder and Add. When i do a faceMap, I get 12 faces, shouldn't i get 11 faces, one being shared by the 2 solids ? Do you need to tell OCC that the face is supposed to be shared ? How does that work ?

5 replies

Memory clean after texturize

Hi guys ! I have problem after I'm clean textured objects. I'm create the textured shape with next: Handle(AIS_TexturedShape) aTShape = new AIS_TexturedShape(aShape); aTShape->SetTextureFileName(aTFileName); aTShape->SetTextureMapOn(); //Âêëþ÷àåò mapping aTShape->SetTextureScale(Standard_True, toSca

21 replies

TopoDS_Shape from AISContext

Hi! Im trying to work with ImportExport mfc example. I want to import a Step model a then for example use TopExp_Explorer to find all vectres. In the ImportExport example when im importing step file the CImportExport::ReadStep() function is called and all i have is the object in myAISContext. How ca

4 replies

Picking preciesion

I implemented my own Picking as the automatic Hilighting was not suitable for my needs. I do something like this: Handle(StdSelect_ViewerSelector3d) selector = myAISContext->MainSelector(); selector->Pick(x, y, theView); selector->Init(); if(selector->NbPicked() > 0)//selector->More()) { . if(select

2 replies

QT and OCC

Hello, I'm beginner of Open CasCade...( and English too...:) ) I'll try to integrate the QT GUI and OCC. I studied Open Cascad Visualization part and analyze Tutorial source code, QT sample source code, search forum... but i can't find that how the visualize the model in program with QT GUI so... pl

2 replies

stablity/usability of OCCT in 64bits on Windows 7

Hi, I'm considering doing some 64bits dev on Windows 7. Is one of you using OCCT in 64bits ? Does it work good ? is it stable ? Can you share your experience ? Thanks, Author

3 replies

Java: Can display in a JFrame but get black screen in a JDialog

Working off of the Java samples I'm able to load and display CAD files within a JFrame but I get just a black screen when I try to do the same exact thing using the same code within a JDialog. It still tells me the number of loaded entities after loading the file and when I click and drag on the pan

2 replies

Default coordinate system

Hi everybody, could anybody tell me how I might change the default coordinate system to another (eg. Y pointing upwards, Z beeing depth)? Thanks for your help! rh

1 reply

Create a face from a triangle strip

Hi, I have a triangle strip (non-planar, form a cone shape), how to create a single face from it? I have tried "BRepFill_Filling", but didn't work for me. Thanks for any advices. Author

2 replies

Is it possible to modify the Hilighting of Objects?

Hi all, I would like to use another form of hilighting my selected objects. Since my Objects have quite a lot of edges, i would like to stop drawing contour lines of all edges. The reason for this is the way my objects are displayerd when zoomed away: the Objects base colors are almost invisible sin

4 replies

Extracting common faces and rebuilding the shapes for meshing

I'm trying to build some 3d models for export to a 3D meshing program and I'm having some issues with the modeling of adjacent volumes. Here is the problem. I'm looking at a very simple example, imagine a cube A of size (1,1,1) sitting on top of cube B of size (3,3,3), aligned vertically. I want to

7 replies1 file

Build a BREP from array of Vertices

If I already have an array of Vertices, and an array of indices into Vertices array (for faces), which API could I use to build a BREP or SHELL? Thanks a lot, Author

7 replies

Matching two solids

I'm trying to use OCC to build 3D models that will be meshed and then simulated in a thermal solver. The program is building some solids (each solid having an associated material -- e.g. copper, aluminum, insulator, etc.); then, common faces are extracted and these solids are good for meshing. The p

2 replies

Trouble with aspect ratio in multiple windows

I have an application capable of opening multiple Windows, each of them with an individual Context and viewer. While i believed them to be totally disjoint, they show some odd behaviour when of different size: When hovering the mouse over a currently not focussed window, the width and heigth of that

2 replies1 file

Center of gravity (API)

I've been looking for some API method to obtain the center of gravity for a solid, but could not find anything. In Draw, for a box, whenever I get the properties of a solid, the center of gravity is displayed: Draw[5]> vprops b Mass : 1 Center of gravity : X = 0.5 Y = 0.5 Z = 0.5 Matrix of Inertia :

3 replies

Anyone Interested In (and capable of) a Quick OpenCascade Assignment?

If this is an inappropriate post, I apologize. I gave this a couple of weeks valiant effort. But I was unsuccessful with the wrapper projects (which for some reason neglect IGES_Control), and I'm apparently too old for C++. All I need is a component (hopefully callable from C#) that will read an ige

3 replies