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

Showing 60 discussions, ordered by the latest archived activity.

[PATCH 23/25] Add missing || defined(__Message_DLL)

Fixes warnings like : local symbol 'name' imported in this case there was missing a case in the ifdef for __Standard_API, so a bunch of HashCode functions were wrongly imported. Contributed by: QbProg

0 replies1 file

[PATCH 21/25] Remove unused local variables

Fixes warnings like : unused local variable 'name' or 'name' initialized but never used The 'a' variable in OSD_MAllocHook.cxx was introduced only to enable inserting a breakpoint -> compiled in DEBUG mode only. Contributed by: QbProg, Thomas Paviot, Author Depends on: 01-remove-__try-__finally.patc

0 replies1 file

[PATCH 15/25] Add parentheses around logical operators

GCC emits warnings like: src/IntTools/IntTools_FClass2d.cxx: In member function ‘TopAbs_State IntTools_FClass2d::Perform(const gp_Pnt2d&, Standard_Boolean) const’: src/IntTools/IntTools_FClass2d.cxx:627:43: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] Contributed

0 replies1 file

[PATCH 12/25] Fix multiline comment

Fix GCC warning: src/LDOM/LDOM_CharReference.cxx:275:0 Multi-line comment Contributed by: Thomas Paviot

0 replies1 file

Sphere representation problem

Hi, I want to use openCascade to export 3D scenes in STEP and IGES formats. One of my base item is a sphere but it makes a runtime error when i try to export one. My base object representation is an array of vertices, 3 following vertices are a face, the next 3 too etc. I convert it in a list of Top

2 replies

Point Cloud with color

Hi, I have rendered a Point cloud succesfully by subclassing AIS_InteractiveObject. thanks to the guidance in this thread : http://www.opencascade.org/org/forum/thread_1125/ I cant find anywhere, how to assing unique colors to each marker in the MarkerSet. Any Ideas of how to show unique colors on t

6 replies2 files

[PATCH 10/25] Fix initialization order

Fix GCC warnings like: In file included from src/NCollection/NCollection_BaseVector.cxx:6:0: inc/NCollection_BaseVector.hxx: In constructor ‘NCollection_BaseVector::MemBlock::MemBlock(NCollection_BaseAllocator*)’: inc/NCollection_BaseVector.hxx:65:36: warning: ‘NCollection_BaseVector::MemBlock

0 replies1 file

[PATCH 09/25] Implicit conversion from wider type

Fixes warnings like 'conversion' conversion from 'type1' to 'type2', possible loss of data DecimalPoint is a char type instead of Integer, see Units_UnitsDictionary.cxx In OSD_WNT_1.cxx, clamped dialog size instead of direct casting which could result in loss of data (i.e. wrong dialog size). In Geo

0 replies1 file

[PATCH 07/25] Fix printf format specifier

Fixed format %d expects type int but argument XX is long unsigned int Fix printf format specifier for size_t arguments. There is no standard, MSVC defines %I and GCC %z. Moreover, it is long on 64bit machines and int otherwise. Contributed by: Thomas Paviot, Author

0 replies1 file

[PATCH 04/25] Replace 'char*' by 'const char*' when possible

gcc 4.3 print this warning: deprecated conversion from string constant to ‘char*’ Contributed by: QbProg, Author, Thomas Paviot, Hugues Delorme Depends on: 03-remove-declared-but-not-defined-functions.patch

0 replies1 file

[PATCH 02/25] Remove extra token after #endif

Remove extra token after #endif Reported by Clang compiler: src/OSD/OSD_FontMgr.cxx:136:8: warning: extra tokens at end of #endif directive [-Wextra-tokens] Contributed by: Author

0 replies1 file

[PATCH 01/25] Remove __finally/__leave code

Remove all __finally/__leave code, changed to a more portable control flow. Just three functions in WNT_*.cxx were too complex to change, so goto's were used there. Contributed by: QbProg

0 replies1 file

An example of the bug for Extrema_ExtPS fix.

During solving a bug, I notice that in point Extrema code, tolerance check isn't carried over to details, thus boundary points often can't be found in the U V space. I have following patches to correct it. http://homepages.cae.wisc.edu/~janeh/OCC/patch6.3.html Please also see http://homepages.cae.wi

1 reply

[BUG] Suspect boolean operators in C++ sources

Compiler warnings suggest that there may be problems with those 3 files (OCT 6.5.1): ros/src/BRepOffset/BRepOffset_Inter2d.cxx ros/src/TNaming/TNaming_Localizer.cxx ros/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx Patches below show how operators are interpreted by compiler, these are not su

3 replies

problem in adding a command by Draw_InitAppli with OCC651

Hello, since 1996, I used to add a command as follows : static Standard_Integer MyLine( Draw_Interpretor& d, Standard_Integer argc, char argv **a ) { .... } void Draw_InitAppli ( Draw_Interpretor& theCommands ) { Draw::Commands ( theCommands ) ; GeometryTest::AllCommands ( theCommands ) ; BRepTest::

1 reply

ocaf problem with selection

Hi. I make a ocaf document and successly activate. But problems has come. I can't select the object. Of course, i added the TNaming_NamingShape using TNaming_Builder. below code is my procedure. Handle(TDocStd_Document) D = GetOcafDoc(); D->NewCommand(); AS2D_Command TSC(D->Main()); CString CCount;

1 reply

Region selection of solids and faces

What's the best way to implement screen selection (e.g. a rectangular region) of shapes? I have a path and a vector, defining the area selected and the view Z direction, and I want to determine if a given solid, face, edge, or vertex falls into this region. Creating a solid from the path and vector

1 reply

Lighting when coloring by element and or nodes

When using the mesh class and coloring elements using Handle(MeshVS_ElementalColorPrsBuilder) aBuilder = new MeshVS_ElementalColorPrsBuilder( aMesh, MeshVS_DMF_ElementalColorDataPrs | MeshVS_DMF_OCCMask ); or nodes using Handle(MeshVS_NodalColorPrsBuilder) aBuilder = new MeshVS_NodalColorPrsBuilder(

4 replies

OCC 6.5.1 regression inside BRepExtrema_DistShapeShape

Dear OCC Team, Please, find complete explanation and correction in enclosed file OCC Version : 6.5.1 OS : All platforms Package : Modeling Algorithms\TKTopAlgo.dll Source \OpenCASCADE6.5.1\ros\src\BRepExtrema\BRepExtrema_DistanceSS.cxx Thanks you for delivering full source code. Simple Bugs can be f

2 replies1 file

How to get the TopoDS_Shape from a existing AIS_Shape?

I already have a AIS_Shape which is moving a little every 100ms.I need to get the location of the changed AIS_Shape in TopoDS_Shape to do the BRepAlgoAPI_Cut() function. So,how can I get the TopoDS_Shape from a existing AIS_Shape?

1 reply

Extrema_CurveTool bug + patch

In the Extrema_CurveTool adaptor, a wrong function was called inside the Extrema_CurveTool::IsRational (Degree () instead of IsRational ()) see the patch

1 reply1 file

where is DFBrowser

I serched DFBrowser that was in opencascade 6.3 but now I can't not find it in opencascade 6.5 anybody know where is DFBrowser.dll (that used in drawexe) and how to connect with this to drawexe

3 replies

IGES Import from String

Hello, In my project I get a XML-File with a section were IGES-Surfaces stand in (see the attached file). The section doesn't contain the header (no "G" and "S" letters). Is it possible to read in the "D" and "P" data? The onliest method I found is the IGESControl_Reader. But the reader reads only i

1 reply1 file

Trimming a surface with a wire

I am building a surface from a wire using GeomPlate_BuildSurface. I add all the edges from the wire as curve constraints, and get back a bspline surface using GeomPlate_MakeApprox. I now have a bspline which passes through the curves, but I need to trim the surface with the wire. Can I use BRepFeat_

2 replies

Creating a TopoDS_Face from non-planar wires or edges

Hello, I am currently trying to make a TopoDS_Face from edges. I have a TopoDS_Shape and extract a layer or slice to form a new TopoDS_Shape. From there I need to convert it to a TopoDS_Face. I have tried extracting the edges via TopExp_Explorer, making the edges into wires via BRepBuilderAPI_MakeWi

2 replies1 file

How I found the right lib?

Hello, I can include the header-files and I know where are the libs. Futhermore I know which header I need. But how can I found out which lib I have to link? I try to make the "Getting started" example. So I have to found the lib for the "Geom_CartesianPoint"-struct. (I use Ubuntu and OCC 6.3.0) Tha

1 reply

Open Cascade official support for C#?

I am new to OCC. I would prefer to develop in C# as I have more experience in it than C++. I have loaded the Import/Export C# sample project that comes with the OCC install into VC 2008 and that compiles fine. I see that it includes a unit OCC that creates a file OCC.dll that has about 60 methods in

1 reply

TopoDS_Shape as a map key?

I have code that looks like: std::map shmap; shmap[myshape] = "have a nice day"; but I get a compilation error: /usr/include/c++/4.5/bits/stl_function.h:230:22: error: no match for 'operator Is there a way to use a TopoDS_Shape as a stl::map key? Alternately, is there a way I can get a unique id (st

4 replies

Bug | BRepTools_ShapeSet.WriteToString does not serialize TopoDS.Location

The subject sums it up; when serializing a TopoDS_Shape with the BRepTools_ShapeSet class, the "Location" attribute is not transferred properly. Expressed in pythonocc: boxA = make_cube(1,1,1) boxB = copy.deepcopy(translate_topods_from_vector(make_cube(1,1,1), gp_Vec(10,0,0))) for i,j in zip(Topo(bo

1 reply

Parallel Processing and Open Cascade

I need to add parallel processing to my open cascade project. I started this using openMP but I am getting a run time exception. After some searching on the forum I found that openMP support is less in opencascade. Then I thought of adding TBB where I can use multi threading. But I have no idea wher

2 replies

[BUG][PATCH] Missing parentheses around trigraph operator ?:

Hello, A thorough review of compiler warnings emitted when building OpenCascade exhibits bugs in the following files: ros/src/Aspect/Aspect_MarkMapEntry.cxx ros/src/Aspect/Aspect_TypeMapEntry.cxx ros/src/Aspect/Aspect_WidthMapEntry.cxx ros/src/TDataStd/TDataStd_ExtStringArray.cxx ros/src/TDataStd/TD

1 reply1 file

Stupid ld error

I keep having these errors while a "make install" process in OpenCascade. I am really stuck and can not identify the problem... http://www.sudrap.org/paste/text/18367/

7 replies

Edit Predefined Macros

Hi I wanted to edit some predefined macros specified by OpenCASCADE like the $targetpath$, $targetdir$ etc. Where can I edit them?? Regards Author

2 replies

Convex Edge of a Polyhedron

Is there any method to see if an edge (of a polyhedron) is concave or convex? I know there is a convex() method in TopoDS_Edge but it is not working correctly!

1 reply

step reading problem

I'm currently using STEPControl_Reader in order to read the attached STEP file but what I'm obtaining from the conversion is just an empty root compound. Other CAD systems like Solid Works manage to open it even if they recognize some errors in the file. Is there anybody that knows how to force the

2 replies1 file

meshVS Shadows

I am using meshVS, with MeshVS_ElementalColorPrsBuilder (to color each element separately. I also have the element edges off. Everything is working great, but there are no shadows, so it doesn't look 3D. (I forget the name for this view, but I know it is normally optionally available) Does anyone kn

1 reply

Edge Concavity or Convexity

Hi, Is there an easy way to know if an edge (of a solid) is Convex or Concave in Opencascade? Is there any function for that?

10 replies

mesh from points

Hello I have a cloud of points and i want to create a mesh of these points. Is there any posibility to do this in OCC? regards Author

2 replies

Increase Memory of opencascade project

Hi all, My opencascade project is built in visual c++ environment. My problem is that when I try to run the program there is an error as, "Fatal Error in graphic initialization." Can I use a bat file and set the memory allocation using it and how? Please help me. Thanks, Author.

1 reply

Trihedron

Hi I created a trihedron using the code Handle(AIS_Trihedron) aTrihedron; Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); aTrihedron=new AIS_Trihedron(aTrihedronAxis); m_AISContext->Display(aTrihedron); Now the trihedron is displayed at the (0,0,0) point. I want this t

1 reply

TopoDS_Face Triangulation Problem

Hello, here is my code; Standard_Real UMin,UMax,VMin,VMax; gp_Pnt aPnt1(0, 0, 0); gp_Pnt aPnt2(1, 0, 0); gp_Pnt aPnt3(0, 1, 0); gp_Pnt aPnt4(1, 1, 1); Handle(Geom_TrimmedCurve) aSegment1= GC_MakeSegment(aPnt1 , aPnt2); Handle(Geom_TrimmedCurve) aSegment2= GC_MakeSegment(aPnt3 , aPnt4); TopoDS_Edge a

2 replies

How to select object one by one

Hello, I'm trying to write codes to realize boolean operations among objects. I could create objects, the problem is how to select those created objects one by one, such that I could do boolean operation next. Could anyone give me any advices? Thanks in advance for your kind help! Helen

3 replies

Euler Operators

Does OCC have the capacity of editing a polyhedron model by adding or deleting vertices, edges and faces to create a new polyhedron?

2 replies

finding tangents of geomsurface

hi, sorry for asking too much. i googled but not found. is there a built-in way to find tangents(tangent planes) or normals those help us to find tangents of the geom_surface class or tangents of any object that is used to declare surfaces? thanks

15 replies

Unable to Set IGES Translation Parameters

I'm trying to set the author, company, and product parameters using the following code: IGESControl_Writer writer; Interface_Static::SetCVal("write.iges.header.company", "MyCompany"); Interface_Static::SetCVal("write.iges.header.product", "MyProduct"); Interface_Static::SetCVal("write.iges.header.au

7 replies

How to create a TopoDS_Shape

Hello, I am developing a modeller in Java using Java3D and I need to add a function to export models as an Iges or a Step file. My representation, which is those of Java3D, describe an object with a table of points. A group of three points represent a face. I am using occJava, a wrapper on OpenCasca

4 replies

Exe works in Debug mode but crashes on running directly

Hi I have some problems with running a .exe file of a mfc sample directly. When I use the 'Start Debugging' option everything works fine. But when I try to open the .exe from the folder directly, it opens, but clicking on a button it crashes. Does anyone have some idea about this? Thanks Regards Aut

2 replies

Showing Results

Before switching our 3D viewing to Opencascade we used a standard OpenGL library. For results we drew close to 100,000 quads of various colors and it management with only minor fatigue. We made a switch to Opencascade for the obvious benifits offered a few years back, but have not been able to print

7 replies