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 1 of 3

Showing 60 discussions, ordered by the latest archived activity.

Can't use DRAW

I have successfully built OCCT using Cmake, VS Code and Fedora linux 42, but when I try to run draw.sh, I get this error: “couldn't read file ‘/home/winet/Documents/OCCT/build/src/DrawResources/DrawDefault’: no such file or directory”. The problem is that I built OCCT with the “BUILD_RESOURCES” flag

4 replies

C# - WPF Sample Build Error

To be able to build the sample code, I added OpenCascade headers as additional include directories to OCCTProxy project like in attached photo 1. Afterwards, I added path of the opencascade .lib files to OCCTProxy project as additional library directories like in attached photo 2 . Finally, I added

4 replies4 files

bzsmooth command format help

Hi, I'm trying to use this command in Draw and I can't work out the format. I see the help info: Draw: > help bzsmooth bzsmooth : bzsmooth cname tol degree option [fic] and from GeomliteTest_ApproxCommands I can see that there are 3 methods/options: -GR, -PR and (unnamed? possibly -VA) method 3. Is

3 replies1 file

Creating a face and adding an internal loop to make a hole

Hello, I was hoping some one might be able to provide an example of how to add internal edges to a face. currently I am using mkplane to generate a face from a wire. Is there there a way to add more wires to the face directly in the draw environment? Specifically looking to add internal loops to the

1 reply1 file

How to access global variables in a proc function loaded with the source command?

Hello, I have been experimenting with the DRAW environment and was attempting to use a proc call. The proc is stored in a file that i am importing with the source command. I think my understanding of the upvar command is somehow flawed. Thanks for any help or hints that point in the right direction.

2 replies1 file

Edge order when creating wires

Hello, I was wondering if there was any way in the draw test harness to build a wire with out the edges being in the correct order and ith out the need to reverse some edges. point sketch1_p0 0 0 vertex sketch1_p0 sketch1_p0 point sketch1_p1 58.6605 15.1459 vertex sketch1_p1 sketch1_p1 point sketch1

1 reply2 files

3D view update

I have two computers running System76's Pop!_OS; a desktop machine with nvidia graphics and a laptop with intel xe graphics. On the desktop machine, draw works ok; but, on the laptop, every time I issue a 3D draw command (vinit, vdisplay, vsetdispmode, etc.) the terminal window hangs until I move th

2 replies

DRAW - Children of shape - strange behavior

Hello All, I have a document imported from a step file, it's Xdump looks like this: Draw[19]> Xdump frame ASSEMBLY COMPOUND 0:1:1:1 "HR BEFESTIGUNG" INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "0000_0000_000_00_--_R---_---_0_REF.1" INSTANCE COMPOUND 0:1:1:1:2 (refers to 0:1:1:3) "1209_1002_400_0

0 replies

WebGL sample compilation

Hi Im trying to build. WebGL sample. I managed to build FreeType and OCCT libraries using emsdk, but I cant build sample itself. While configuring this sample in Cmake-gui I have error message. (both windows ans linux) CMake Error at CMakeLists.txt:33 (find_package): Could not find a package configu

37 replies3 files

WebGL missing fonts

I complied the webgl samples successfully, but when I run it with the vs code live server, the console printed as below. occt-webgl-sample.js:1001 Font_FontMgr, error: unable to find any font! occt-webgl-sample.js:1001 TKOpenGl | Type: Error | ID: 0 | Severity: High | Message: Font 'Courier' is not

0 replies

Lost shape after fuse operation

When I fuse multiple shapes with "bbop result 1". It often loses shape. bclearobjects bcleartools baddobjects e734Hole baddtools e735Hole e697 e689 e699 e703 e712 e723 e728 e736 e738 bfillds bbop shell-sub-union 1 e728 shape is missing in shell-sub-union.

6 replies2 files

cad with Visual Studio C#

Hello, I am a beginner and would like to learn how to program CAD software. now for the start. 1) how do I insert the panel? 2) how to make my one line and polygon line draw. I hope someone can help me or where I can find a simple example. thanks in advance

0 replies

How to build a Shape with screw threads?

Hi: I wang to make a Shape with screw threads by Opencascade,just like the attached file shows. Would you please give me a C++ example code? Best Regards Author

2 replies1 file

(samples) Tutorial GUI: 1. Shows No Icons, 2. > MNU_NEW Reports Errors;

Greetings to Open CASCADE Forum from an OCCT newbie ... Operating Environment: Linux Debian 9 OpenCASCADE-7.3.0 (built from source using cmake-gui & make) Open CASCADE Tutorial (built from source using Code::Blocks: 0 errors, 0 warnings) Debian Packages Installed as OCCT prerequisites:: apt-get inst

3 replies14 files

How to draw quadrangular pyramid?

Hi: I want to draw a quadrangular pyramid by OCC in MFC C++ environment.could you give me any idear? thanks Author.Jiang

0 replies

Weird memory issue with WebGL sample

Hello, I am facing a weird issue with the WebGL sample. First off, I have modified the sample as my goal is to load a STEP file into the web viewer. The problem I am having does not occur when I build the sample as is and load a .brep file. Specifically, the issue I am having is that i get Chromes S

2 replies

Looking for guidance to view3d for STL Mesh

I am looking for some help in STL mesh in 3d view. for iges and step it is all working good in v3dviewer, but mesh mode is not supported. Kindly give me some clues on how can I implement a 3d viewer for STL files.? Any help is highly appreciated.

0 replies

Reg: OCCTProxy.dll not found

I am new to Opencascade. I have downloaded opencascade 6.7.0 & have build the entire library in visual studio 2010. All the library file are now built in 'C:\OpenCASCADE6.7.0\opencascade-6.7.0\win32\vc10\libd' folder. Besides this the win32 has also has vc9 folder which has built in libraries which

11 replies2 files

OCCTProxy (CSharp) Build

Opening: https://github.com/Open-Cascade-SAS/OCCT-samples-csharp opened tag V7_6_0 Imported into Visual Studio, Added additional Include directories Added Additional Dependencies Added Additional Library Dependencies After this I build the OCCTProxy to test the dependency however it seems that it re

1 reply1 file

libTKJniSample.so missing in Android3D Viewer

When building the OCC sample jinitviwer for android, available in "opencascade-7.6.0", the build fails and I am confronted with the following error message, telling "libTKJniSample.so" is missing: Build command failed. Error while executing process C:\Users\MASTER\AppData\Local\Android\Sdk\cmake\3.1

0 replies

Is it possible to use Font_BRepFont in wasm?

Hello. Now I'm testing webgl build (emscripten wasm). But It seems that there is no available font. Font_FontMgr::GetInstance()->InitFontDataBase(); Font_NListOfSystemFont fontList = Font_FontMgr::GetInstance()->GetAvailableFonts(); printf("Start Listing..\n"); for (const auto& font : fontList) { pr

1 reply

Some MeshVS commands not supported in Draw Test Harness

When testing MeshVS (Mesh Visualization Service) component with Draw Test Harness, I find meshdispmode command and meshselmode command are not supported. However, both commands are listed in occt_test_harness.pdf. I searched a very old topic which was similar to my concern. It seemed meshselmode com

6 replies3 files

VIS Viewer and colors

I was very pleased to find in DRAW the VIS Viewer commands. If I understand well it integrates VTK to speed up the displaying functionalities. Some functions are really useful however I haven't found so far in DRAW based on OCC 7.3 how to change the color of a shape?

3 replies

Draw really slow

I run DRAW on Linux with an open cascade 7.4 Even a very small script like: cd CPP/OCCT-7.4.0-Debian90-64-opt/bin ./draw.sh Hint: use "pload ALL" command to load standard commands Draw[1]> Draw[2]> pload ALL 1 Draw[3]> vinit Driver1/Viewer1/View1 Draw[4]> vertex v0 -3 -2.00116 1.03375 Draw[5]> vdisp

6 replies

Run the sample in the user guides on the VS2019, but ALWAYS get exception.

some talking before Hi, guys! Glad you have seen this post! I'm really new to the OCCT, and I get a problem. I am learning the OCCT, and I try to run the sample code in my PC. Tried , failed , sad. Could anyone help me with this annoying issue? main context Here's my code, its almost the same as the

2 replies

NbMsaaSamples in WebGL

Dear All, I'm searching the way to enable MSAA in WebGL. And I found that NbMsaaSamples works on the OCCT 7.7 (dev) at this article : https://dev.opencascade.org/content/usage-problem-anti-aliasing-webassembly So, I cloned the latest OCCT from Github ( https://github.com/Open-Cascade-SAS/OCCT ) I as

3 replies

Docker image for web assembly sample

Hello everyone I have created a docker image of wasm sample. You can check it from following link. https://hub.docker.com/r/okanpin/opencascade_wasm_sample I think it is important to do that in every distribution. Docker files can be good guide lines to run source code. Please notify me any opinion

3 replies

WebGL Line width seems not to work.

Hi, I'm learning the WebGL Sample. When I test the sample program, It looks that the Line width seems not to work. It draws always with 1.0 thickness. I tested the following. - aisShape->SetWidth(4.0) : Not Work - Handle(Prs3d_LineAspect) aspect = new Prs3d_LineAspect(Quantity_NOC_VIOLETRED3, Aspect

1 reply

A puzzle about Sewing

box b 0 0 0 1 2 3 proc test {shape} { sewing s $shape } test $b Failed to run. 'sewing' doesn't seem to get the parameters.

1 reply

Qt6 + QML / OpenCascade 7.6 Problem

I'm trying to build an application using Qt 6.2.3 with QML and OpenCascade 7.6. I encountered a problem of program crashing just after the start. After several debugging sessions I found that the problem is related with OpenGL as attempts to get current OpenGL context and device weren't succesful (w

4 replies

WebGL sample not showing objects

Not sure how best to describe, and I fear I've done something stupid, but after successfully building and running the webgl sample once, I now no longer manage to run it correctly: the view remains black, nothing is shown within - no text, no brep, and not the cube on the right! The console output s

1 reply

Use “explode” more gracefully?

Can DRAWEXE implement an iterator similar to TopExp_Explorer? "explode" command cannot explode through an unknown shape Is there an example?

2 replies

Display Step color in context

Hi, I would like to load a step with color and display it in the context. But I don't know how to put them in the context. I Use STEPCAFControl_Reader in order to read the color in the inputted step but nothing appear : STEPCAFControl_Reader caf_reader; caf_reader.SetColorMode (true); caf_reader.Set

3 replies

System.IO.FileNotFoundException

Hi, I have converted the C# Sample project to Visual Studio 2019. When I run the project I get the following error. Any idea? System.IO.FileNotFoundException: 'Could not load file or assembly 'OCCTProxy.dll' or one of its dependencies. The specified module could not be found.' Regards, Author

8 replies

tkernel.lib : solved

Hi I am new to opencascade and getting this error when I try to compile the csharp sample solution : error LNK1104: cannot open file 'TKernel.lib' Pl guide how to resolve this. Thanks in advance. --- I have resolved it myself. In OCCTProxy project properties -> Linker -> General -> Additional Librar

0 replies

Decreasing display time for a large amount of surfaces

Dear developers and users, I have information of a shape in slices that I need to display. The amount of slices can go up to 10k. The way I am doing it now is to represent each slice as a face and build a compound shape with these slices. The compound is added to an AIS_Shape and added to the Contex

13 replies1 file

Shape cut by a surface

Hello Users, I'd like to model a cylinder in which both ends are portion of spherical surface. Is it possible tu cut a cylinder shape with a spherical surface to get that result ? Thanks for your help ! Author

1 reply

SELECTION OF OBJECTS

Hi, ı have a problem with selection of objects and highlighting them. For selection in a mode ı do the following code myContext->Deactivate(shapes[i].shape); myContext->Activate(shapes[i].shape, mode); myContext->MoveTo(x, y, myView, true); myContext->Select(); When i choose a mode for example Verte

5 replies

how to get data from iges files?

I need to implement the following approach in my application - load IGES file, get tessellation and some other data for every element: - vertices and faces, - lines, - circles, - object name, - object color. How to get the coordinate value of each graphic element? For example, the start and end coor

0 replies

GLTF and GLB import in open cascade

Hello, I would like to evaluate the import for some gltf and glb files in open cascade. I saw that in TKRWMesh module there is an interface for reading gltf (not sure if glb is suported). Is there any example in open cascade sources of its usage? Can you provide some code snippet for that? Looking a

3 replies

OpenCascade 7.4 Qt 5.15 Visualization

I am attempting to create a Qt application in C++ which incorporates a 3D OCC visualization. I am new to OpenCascade and Qt and would like to put the visualization in a frame or widget, so that I can incorprate it into a layout. Does anyone know what I can do to get a simple 3D visualization to work

2 replies

Making a floor

I would like to add a floor having, with alternating black and white tiles, so basically showing like a chess board. Input parameters are tile size and number of tiles in each direction. I was thinking of creating a mesh (BRepMeshData_Model ) and use BRepBuilderAPI_MakeFace with AddFace? How can I s

1 reply

Compiling a program with GCC, Windows

I want to compile this simple program. // STEP Read Methods #include <STEPControl_Reader.hxx> #include <TopoDS_Shape.hxx> // STL Read & Write Methods #include <StlAPI_Writer.hxx> #include <BRepMesh_IncrementalMesh.hxx> #include <iostream> int step2stl(char *in, char *out) { // Read from STEP STEPCon

1 reply

Need of C/C++ simple example for OpenCascade Programming

Hello I am using FreeCAD source file to learn about FreeCAD. There In the AppPartpy.cpp File i saw a function name Makebox(). In that function, BRepPrimAPI_MakeBox mkBox(gp_Ax2(p,d), length, width, height); TopoDS_Shape ResultShape = mkBox.Shape(); Do anyone have full example with all the header fil

1 reply

where can i download the locate_data_file referenced by the tests

Hello everyone, I do not know where I can download the locate_data_file file referenced in the test example under the occt7.4.0 tests folder. For example, the following locate_data_file CCH_001_ahdb.rle file.Thank you all restore [locate_data_file CCH_001_ahdb.rle] a sewing result $ tol a checkmaxto

2 replies

about csharp wrapper

hello,I'm new guy. I find open cascade have a csharp wrapper . I want to know Does it have all the functions in c++. because I don't want to study c++.

1 reply

Surface roughness/ bumpy surface with Open Cascade

Hi everyone, I am trying to make a surface roughness from a surface( TopoDS_Face / or Geom_Surface ). Is there any idea where should I start? Thank you very much, I really appreciate your help!

7 replies2 files

Sample\MFC exe files cannot be run from windows explorer

Following the previous thread ( https://dev.opencascade.org/index.php?q=node/1284 ), i was able to compile the Sample\MFC projects. It goes well after following the fix in previous thread. The issue is that executables (.exe files)(all of them) cannot be independent run from windows explorer or term

3 replies

Missing Graphic3d_WNTGraphicDevice.hxx in source code Opencascade version 7.2/7.3

While building Sample projects from the path opencascade-7.3.0\samples\mfc\occtdemo, compilation error shows the following message: 'Cannot open include file: 'Graphic3d_WNTGraphicDevice.hxx': No such file or directory OCCDemo_Presentation.cpp' This header file is included in StdAfx file, which is p

6 replies

How to use Open Cascade in ASP.NET MVC or Blazor

Hello everybody, can you use Open Cascade in ASP.NET MVC or Blazor projects? If so, who has an example of this? If not, what other options are there to use Open Cascade in web programming? Many thanks in advance. Author

5 replies

OpenCASCADE problem with DRAW!

I installed OpenCASCADE DRAWEXE test hardness today and try to start with the example given at OpenCASCADE site! I started as follow Draw[1]> Draw[2]> av2d Draw[3]> circle c 0 0 1 0 5 invalid command name "circle" I got this error, invalid command name "circle". Can anybody tell me the reason! I am

2 replies