DiscussionsIssue archiveDraw Harness and Samples

Forum archive

Draw Harness and Samples

Technical discussions preserved from the public OCCT community forum.

Topics
160
Replies
470
Files
75

Discussions

Page 2 of 3

Showing 60 discussions, ordered by the latest archived activity.

Need of short C++ OpenCascade example

Dear All It is very sad as well as unfortunate that there is hardly help for newcomers to OpenCascade. I tried various places to learn OpenCascade but could not start due to lack of atleast one simple short example that can be properly compiled to see OpenCascade working with C++. Can any of you pro

13 replies1 file

MeshVS_TextPrsBuilder

I used "meshtext”command in Draw, doesn't it work? Are there special requirements for this command " Exampe: pload ALL vinit meshfromstl m *.stl vsetdispmode m 2 meshtext m

3 replies

WriteVrml works only after XDisplay

I am trying to export VRML with Draw using WriteVrml. It works but only after I use XDisplay to render the document on the view. Without, the VRML is generated but only has a header and no geometry content: Draw[25]> pwd C:/OpenCASCADE-7.4.0-vc14-64/opencascade-7.4.0/data/step Draw[28]> ReadStep D s

6 replies

WriteVrml wireframe representation

I would like to get wireframe representation with WriteVrml on the Doc level similar to writevrml on the shape level. draw help mentions an option for that but I am not sure if it is actually implemented. Is it supposed to work ? I think incmesh necessarily tesselates all edges as well but perhaps t

5 replies2 files

Primitive (Triangles) does not appear on AIS Context

Hello. I am trying to display triangles () on a created AIS Context and still cannot see the rendering unfortunately. here is how I implemented the Graphic3d_Group: // Graphic 3D Environment Settings StructMng = gcnew NCollection_Haft<Handle(Graphic3d_StructureManager)>(myAISContext()->MainPrsMgr()-

1 reply

Display a Graphic3d_ArrayOfTriangles

Hi, I have a set of triangles with color in a structure Graphic3d_ArrayOfTriangles and would like to display it in an AIS_InteractiveContext. But my problem is : I don't know how to convert Graphic3d_ArrayOfTriangles into an AIS_InteractiveObject. Is anyone have a solution ? Thanks in advance, Autho

2 replies

use AIS_PointCloud display

HI, I want to display a colored cylinder(points cloud) section by section. I used AIS_PointCloud to show the clound,but cann't show, who tell me or share code to me ,thanks. Handle_AIS_ InteractiveContext m_ AISContext; Handle(Graphic3d_ArrayOfPoints) aPoints = new Graphic3d_ArrayOfPoints (2000, Sta

1 reply

How to read a big iges file faster?

Hi, I import an iges file about 30M by CAD Assistant,it cost about one minute! I use the below code to import iges,it is slow! pload ALL vclear vinit View1 ReadIges D E:/model/3001/3001.igs XDisplay -dispMode 1 D vfit I want to know, What's the difference between the two methods?

2 replies

Creating Solid

Hi everyone, I was exploring open cascade as a student I am interested on 3d and open cascade hooked up my attention...but I tried to create solid from faces to shell then make a solid from shell... When I export the solid to brep its same with shell, just hollow inside...I was expecting it to be fi

2 replies1 file

C# WPF SAMPLE Problem

Hello. I'm a Korean user using OCC. I've been using mfc so far and now I want to move on to c # (wpf). But when I run sample and continue to press new on wpf sample System.IO.FileNotFoundException HResult = 0x8007007E Message = Cannot load file or assembly 'OCCTProxy.dll' or one of its dependent fil

4 replies

Viewer3d: Texture always black

Hi to All, I've compiled from source OCCT 7.4.0 and all its examples, but I really don't understand why the texture in the Viewer3D example is not correctly displayed. Have a look at the attached image. Can anyone tell me why the texture isn't displayed? Thanks in advance, any help would be apprecia

1 reply1 file

Draw Performance issue TopoDS_Shell vs. TopoDS_Face

Hi Everyone! I have a performance issue with a big model. In model i have ~100000 TopoDS_Face and for each face i have an TopoDS_Shell. When i wan't to Orbit or Pan the view the frame rate is dropping to very low. When I create same likely model but with only one TopoDS_Shell and same amount of face

6 replies

Can't find directory for samples

Hey, I'm new to OCCT and trying to get it starting for me. I successfully installed it and was able to run DRAW.EXE after copying some .dlls to the executables directory. After trying the first steps like showing "axo" and some simple shapes like the "box" and the "cylinder" i tried to open some sam

1 reply

Getting angles made by axis of cylinder with X,Y and Z axis

Hi, I am new to opencascade and my knowledge on vectors have gotten rustic. Cylinders are constructed using BRepPrimAPI_MakeCylinder, with gp_Ax2, radius and height. BRepPrimAPI_MakeCylinder(const gp_Ax2&Axes, const Standard_Real R, const Standard_Real H) gp_Ax2 is obtained from gp_Pnt and gp_Dir. I

1 reply

Colorful model

I have many 3D models. I want tp give different color to Neighboring model,so that I can distinguish them。 I see V3d_ColorScale.hxx in OpenCASCADE6.9.0,but,it did't emerge in OpenCASCADE7.3.0. How can I deal with it?

3 replies

Data Visualization on a surface

I want to demonstrate a temperature distribution on a Geom_BSplineSurface as shown in the attachment in Opencascade documentation https://www.opencascade.com/content/visualization . I have data stored in a 2D vector for each coordinate in uv frame. Please let me know if anyone managed to do this usi

1 reply1 file

No display in DRAW (VC10) only in optimized mode

Hi, I recompiled OCCT7.3.0 under Windows with VC 10 and everything's fine in debug mode. However when I switch to "Release" in the configuration manager under VC10, DRAW complains even for a very simple script generating a cylinder at the moment when we display it: Draw[1]> pload ALL 1 Draw[2]> pcyl

6 replies

tessellated solid to TopoDS_Shape

Hi, I need to perform boolean operations on tessellated solids. I am trying to convert each of the tessellated solids into TopoDS_Shape(using BRepBuilder) and perform the boolean operations using opencascade(BRepAlgo_BooleanOperation). This works, but the process of constructing faces for each trian

1 reply

Prs3d_TOH_PolyAlgo vs Prs3d_TOH_Algo

Hi. I try to use both algorithms for hidden line removal for wireframe: Prs3d_TOH_PolyAlgo and Prs3d_TOH_Algo. Why is the result of Prs3d_TOH_PolyAlgo worse than the result of Prs3d_TOH_Algo? Please see the results in the attached files. Thanks. TopTools_SequenceOfShape MyShapeArray; TopoDS_Shape Bo

1 reply1 file

CSharp sample gives AccessViolationException

I am running VS2010 Pro with Windows 7 Pro 64-bit, with version 6.7.0 of OpenCascade. I rebuilt the OCCT libraries in debug mode, win32. No reported problems during the lengthy rebuild. Then I rebuilt the CSharp sample solution, excluding the WPF project. In order to do this, I had to change the .NE

4 replies

Guide to compilation of make bottle tutorial in Linux (Ubuntu 12.10)

Since i had a lot of problems in compilation of bottle tutorial, i sent this guide. 1) Make a new directory such as "BottleTutorial" 2) Copy the attached bottle.pro into it. 3) Copy the tutorial files in a subdirectory named "src". The file names are: ApplicationCommon.cxx ApplicationCommon.h Applic

4 replies3 files

OpenCascade in web

Hi, I was checking if i can use OCCT for web application. i found " https://www.opencascade.com/content/occt-new-3d-webgl " but not sure how to write sample application to do so. can somebody help me with this? Thanks Author

3 replies

Convert stp to png with command line

Hello, I need to convert files step / stp to PNG. The transformation has to be in command line. Is it possible? Thanks you very much,

1 reply

error after the installation of draw (test harness application)

Greetings, I'm recently starting on working in a CAD project so I need to test some things on the draw (test harness application) to understand how those things works specially OCAF, but after I install it, in the terminal (I use linux by the way) it shows me this error: can't read "::env(CASROOT)":

1 reply

How to use Handle in a managed ref class

Hi, I need to have a reference to an Handle in a managed ref class and set it from a derived class, with a derived Handle type. with an old OCC version I could do this as shown in the sample code below. Now how it's possible to do this with the new implementation of Handle ? public ref class MyBaseC

1 reply

How to speed up import of IGES data.

Hi, I am trying to import IGES data using IGESControl_Reader. The problem is that it may take 5 minutes or more to load IGES data of 3MB. Please let me know if there is a setting to speed up the import of IGES data. I've already tried the following: - importing only visible entities by IGESControl_R

1 reply

Visualization with Qt - What is wrong in my code ?

Hello, I'm new to OpenCascade, I need help in viewing an object in a qt widget, below you can see the code for that, it is very basic, the bottle was created as in the tutorial (I think it is the only Real tutorial for openCascade). So, what's wrong in my code? #include <QtCore> #include <QtGui> #in

5 replies2 files

OCCTProxy could not found

Hi Everyone I am new to openCASCADE. I am using Windows 10(64bit), Visual Studio 2013 and installed Opencascade-7.0.0 I try to build sample/Csharp/WinForms case and got the error "The referenced component 'OCCTProxy' could not be found". To encounter this error I add reference OCCTProxy.dll from "sa

1 reply1 file

Beginner: how to show bottle from example?

Hello! I'm beginner and this is question: What is the right way to display bottle from example: http://www.sofa.de/OCasDotNet/Bottle.htm ? How should I create GUI? Is there any standart or ready GUI, as in C++ tutorial?

6 replies

I want to start development with C# and OPENCASCADE API

Hi, i'm bignnner at OPENCASCADE i want to develop C# program with OPENCASCADE API i already installed OPENCASCADE but i don't know what is these api. perhaps, i think OCCTProxy.dll is OPENCASCADE API. is this right? I found this at "C:\OpenCASCADE6.9.1-vc10-64\opencascade-6.9.1\samples\CSharp\win64\

6 replies

access Objects of TObj_Model

Hi, I guess I don't have much experience with Opencascade. I have started a program, in which I can draw the bottle tutorial. Now I would like to show the objects (in my case only the bottle) in a tree product structure. I am trying to access all the objects doing this: Handle(TObj_ObjectIterator) o

3 replies

Accessing tessellated data of standalone Edge displayed by AIS_Shape

Hi guys, I know that there's BRep_Tool:Triangulation that can be used to access tessellated triangular data of a face. But how can I access the tessellated segments of a standalone Edge which is displayed by an AIS_Shape? In attachment image: I have a rendered Arc (using AIS_Shape), I would like to

3 replies1 file

Create a part of a cone with a wire

Hi everyone, I'm trying to build a conical surface limited by a wire. However, I only manage to get the full conical surface, as shown in the picture. What I want to get is only a part of a cone, between the red and the blue edge (the smaller part, as these edges divide the cone in two unequal parts

9 replies2 files

DRAWEXE Commandline arguments

Hi, i want to start the DRAWEXE with a given command. In my case it´s "testgrid" to start all the tests directly. I found a commandline option "-c" here . If I start the DRAWEXE with this option I get an results folder with a new testresult folder and empty subfolders for my testgroups. The DRAWEXE

2 replies

Visualization

Greetings, I'm trying to visualize a BSpline I've generated using OCCT. My code is: /// Displaying OCCT BSpline std::string fileName="AH82150F_processed.dat"; Standard_Integer num_coordinates = 97; // Number of coordinates Hydrofoil f(fileName, num_coordinates, 5, CLOCKWISE_LE); TopoDS_Edge bspline

4 replies1 file

Drawing and Hidden Line Removal

Hi all. I'd like to develop program using OCC, based on HLR sample project. The objective is : show given object with visible part with shading and hidden part with transparent. I attatch a picture that explains my topic. example : I load two models : pipe and plate. with given camera pose, half of

1 reply1 file

Surface intersections

Hi, I've a problem about the intersection between two surfaces. The first is trimmed while the second is untrimmed. I use the BRepAlgoAPI_Section to intersect the two surfaces and obtain the intersection edges (in my case only one): This is my code, here I make the intersection: TopoDS_Face trimface

1 reply1 file

QGlWidget and OCCT Iges entities

Hi everybody, I'm new in the forum and I'm starting to use OpenCascade to read IGES files. I'm using Qt library with a QGlWidget area in wich I draw my geometric entities like lines and surfaces with the basic OpenGl functions (GL_LINES, GL_LINE_LOOP..). I've this question: Is it possible to draw th

2 replies

Qt5/Qml UI in windows application

Hello, i'm developing a Windows desktop application and I'd like to write UI with Qt5/Qml. Unfortunately, the only example provided by OpenCascade with Qt is for an Android app. I'm sure that is possible, because I think that CAD Assistant is developed with Qt5/Qml. Can someone provide an example to

5 replies

AndroidQt viewer shows shape's color

Hello, I have compiled this sample and it could work now.The problem is ,all the shapes' color was Quantity_Color(1.0, 0.73, 0.2, Quantity_TOC_RGB),which set by aShapePrs in your code after I imported an iges file. I tried the IGESCAFControl_Reader like this: IGESCAFControl_Reader Reader;//(XSDRAW::

3 replies

Import Assembly STEP file

Dear Forum Readers, I am Import STEP file using OpenCascade 7.0.0 mfcsample. Import from "File → Import → STEP", the displayed form is incorrect. Combining parts makes it impossible to correctly import STEP data in the form of an assembly. Can we not Import assembly files? Any help would be highly a

4 replies2 files

Opencascade Android library issue

I am trying to build an Android application on Opencascade with the help of below url. http://www.opencascade.com/doc/occt-7.0.0/overview/html/samples_java_android_occt.html Everything works fine except I am stuck in below errors : 07-12 17:13:09.711: E/occtJniViewer(16333): Error: native library "g

2 replies

OCCT on Android (preferably using android-studio)

I tried running the following 2 examples of OCCT for Android: 1. http://www.opencascade.com/doc/occt-7.0.0/overview/html/samples_java_and... 2. https://www.opencascade.com/doc/occt-7.0.0/overview/html/samples_qml_and... Unfortunately these guides weren't easy to understand and follow (even though lo

1 reply

Qt Bottle Tutorial - Linux display issue

Hello, I have OCC7.0.0 and Qt5.7.0. The bottle tutorial in samples/qt/Tutorial builds and runs, but when I resize the graphics window with the mouse curser, the graphic window display starts to shrink until I use the maximize button, then it stops. If I resize the main window when the graphic window

7 replies1 file

QT Sample crashed at myView->SetWindow (hWnd);

Hello, I just switched to Qt5.5.0 and OCC6.9.1 I tried to start the Qt example, given at samples directory: The application start, but if the View is created, it crashed at the following lines: if ( myView.IsNull() ) myView = myContext->CurrentViewer()->CreateView(); Aspect_Handle aWindowHandle = (A

10 replies

error with opencascade 6.9.0 and gtkmm2.4

In a win32 app. when i try to add a oc viewer in a gtk drawing area....the app crashes when i do: m_cadModelView->SetWindow(Handle(Aspect_Window)(m_cadModelWindow)); Any idea about this?

1 reply

JniViewer sample project for android

I tried to run OCCT Android jniviewer project. But i had a probleom about '.so' files. when I call ndk-build command, the error occured. I think that the .so files is needed for every library but I couldn't find it do i need to make all .so files?(ex. Freetype, FreeImage, TKernal etc...) please give

1 reply1 file

Understanding WNT_Window, minimal working example in windows using IUP or GTK+ 3

Hi, I've been doing some research on minimal widget toolkits and I have landed on gtk+ 3.0 and IUP ( http://webserver2.tecgraf.puc-rio.br/iup/ ) The thing that has me baffled is how exactly opencascade gets to draw in an embedded widget. According to the docs, setting up a viewer for 6.9.1 goes somt

1 reply

Tooltip on an Object

Hi, I am working on QT & opencascade where opencascade models are executed using QT. In my work i need a tooltip on an object whenever a mouse over event occurs on it. I have seen an example of QToolTip which does that in QT but I am unable to replicate the same on opencascade model. Your help is mo

6 replies1 file

Translate a geometry in GSMH

Hi! I made some geometries in Rhinoceros, with the 90 days version. My license expired and I can´t modificate these geometries. I want to translate this with GMSH using a string. Can someone help me to realised this???

2 replies

A mimimal example Cascade & 3D viewer (V3d_Viewer)

Data in class or global data: Handle_Graphic3d_WNTGraphicDevice myGraphicDevice; Handle_V3d_Viewer myViewer; Handle_AIS_InteractiveContext myAISContext; Handle_V3d_View myView; Handle_WNT_WClass myWClass; Handle(WNT_Window) aWNTWindow; Code of 3D view initialization: myGraphicDevice = new Graphic3d_

3 replies

progress bar indicator reading iges/step

Hi The commands igesread and stepread are executed for reading iges/step files. The test harness application does not show the 'progress bar' but the underlying implementation of code shows use of progress bar for reading/loading/translating. Why does it now show ? regards PG

2 replies

curve interpolation

Please, someone could explain to me how to build an interpolated curve to a serie of points? Thank you in advance!

1 reply

Z-fighting problem??

Hello. I am searching evidence about Z-fighting of OpenCASCADE. As you know, this is difficult item of Modeling tools. To this problem(Z-fighting), do you have some way?? If not, Does OpenCASCADE have the solutions for this?? Thanks, Edward Cho.

1 reply

How To Get Tessellated triangles from TopoDS_Face?

Hi, I'm quite novice for OpenCascade. I'd like to get 3D vertices and triangle sequences for the purpose of shaded face rendering. I am using my own OpenGL VBO renderer, so the only thing I need is vertices and triangles for a certain face. I found "Poly_Triangulation" data structure and "BRepTools:

1 reply

Draw list all created shapes

Hi, Is there a command in Draw to list all the previously created TopoDS_Shape ? Best regards,

1 reply

Shader Implementation with OpenCascade

Hello, I want to write code to sphere drawing by using shaders and bump mapping technique. But I could not find any examples to guide me. Could anyone help me about that? Thanks, Author

2 replies