[GSOC2015][STEPViewer Project Progress]

49 views
Skip to first unread message

Milinda Fernando

unread,
Jun 21, 2015, 12:03:05 AM6/21/15
to scl...@googlegroups.com
Dear Charlie,

I am writing this to inform about my progress in the STEPViewer project. I have created a sample GUI for the STEPViewer and for the display manager I have tried my best to use BRLCAD libdm. But I could not initialize a proper libdm window. So I decided to go with OpenGL window embedded in a Qt main window. I have implemented the rotation and zooming functionality to the viewer. You can find the latest code for the project from [1]. My development blogs can be found in [2].

The most important part of the project is to visualize a STEP file in the OpenGL view (display manager window).  For that I have converted the .step file to .g file using STEP2G converter. The next task is to display the .g file in the OpenGL view. For that I need to extract triangle details from the .g file. I refereed to some librt code. What I found was if you can read the .g file to rt_brep_internal structure then you can browse the brep triangles which needs to visualize the model in OpenGL. Am I going in the right direction? How can I visualize .g file in openGL view. ? Any example codes that I should look at ? Any help regarding this is really appreciated. 

The plan (As Sean mentioned) is if this is working we can make the STEP2G conversion to stop at the serialized binary data so that the conversion is in the memory and then visualize it. 

Charlie Stirk

unread,
Jun 22, 2015, 1:03:54 PM6/22/15
to Scl Dev
Hi Milinda,
Your questions involve internal BRL-CAD capability which I am not familiar with, so BRL-CAD developers like Sean are better placed to answer them.  
Regards, Charlie

--
You received this message because you are subscribed to the Google Groups "STEPcode - Developers Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scl-dev+u...@googlegroups.com.
To post to this group, send email to scl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scl-dev/5244d6dc-451d-469c-872d-0790df0e4f67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Milinda Fernando

unread,
Jun 23, 2015, 10:53:03 AM6/23/15
to scl...@googlegroups.com
Hello Charlie,

As Sean has mentioned I have converted .step to .g and read the .g file iterated the edges of the .g file and visualized it in the OpenGL view. Now we have a wire frame like view in the OpenGL viewer[1][2][3]. (see the links for the images). In my point of view I think we have 2 main tasks.
  • To modify the STEP2G lib to stop at memory residing binary format (format 3)
  • To construct the solid model form the brep elements. Do we have some shortcut to his. ? Like we get brlcad solid and convert to OpenGL solid type. Any suggestions ? 
Any suggestions on what to proceed with ?

Charlie Stirk

unread,
Jun 23, 2015, 2:03:26 PM6/23/15
to Scl Dev
Hi Milinda,

These screenshots look like wireframe geometry.   STEP files can contain different shape representations for geometry, with or without topology, like wireframes or surfaces.   STEP files can also contain advanced or faceted b-rep.   
There is also a newer lightweight tesselated representation in STEP.   

Please post the STEP files you are using, and inspect them to see what kind of geometry they contain.   Here is a good library of different STEP files with different types of geometry.   

Constructing solid geometry from wireframe geometry is something that I think is outside the scope of a STEP viewer.   

Regards, Charlie

--
You received this message because you are subscribed to the Google Groups "STEPcode - Developers Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scl-dev+u...@googlegroups.com.
To post to this group, send email to scl...@googlegroups.com.

Milinda Fernando

unread,
Jun 28, 2015, 3:46:18 AM6/28/15
to Charlie Stirk, scl...@googlegroups.com, Christopher Sean Morrison, brlcad...@lists.sourceforge.net
Hello Charlie,

>>Milinda, did you get this email?

Yes I got this email. But I haven't enable the daily updates from the stepcode dev group. (Now I have enabled it). So I didn't see the email until now. Really sorry about that. 

>> Please post the STEP files you are using, and inspect them to see what kind of geometry they contain
Sure I will post the step files that I am using. I have pushed the step files that I am using to my code repository[1]

Let me summarize you on what I am currently doing. Currently I am using step2g converter to convert the .step file to .g file. Then I read the .g file using db_open which returns the db_i* structure. Then I convert this db_i* to rt_brep_internal* structure which can be used to get ON_Brep* structure which means the boundary representation of the geometry. What you see in the photos that I sent you is, I iterate each edge in the ON_Brep* structure and draw each edge in the OpenGL viewer. Currently I am modifying the step2g code in order to make a statically linked library and I want to stop the conversion from .step to .g file. Instead of that I want to convert . step file to binary file which resides in the memory. Currently I have studies the STEPWrapper::convert method and I think we can stop it from ON_Brep* structure. The only problem is when I compile the edited step2g converter it mentions that SCHEMA_NAMESPACE is not defined. I don't know where it is defined. Can you please help me with this? 

>> Constructing solid geometry from wireframe geometry is something that I think is outside the scope of a STEP viewer.
Okay. Then can you please explain me how we are going to get the solid which can be rendered in OpenGL viewer (without libdm) from the ON_Brep structure. ? 


Thank You. 


2015-06-28 12:46 GMT+05:30 Charlie Stirk <cha...@costvision.com>:
Milinda, did you get this email?   Regards, Charlie



--
Milinda Fernando.
Undergraduate Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka.

Charlie Stirk

unread,
Jun 29, 2015, 2:23:16 PM6/29/15
to BRL-CAD Developer Mailing List, Scl Dev, Christopher Sean Morrison
Hi Milinda,
Thanks for the link to the files and the description of your process.   On inspection, the STEP files contain advanced BREP geometry.   Your description of your process indicates that you are drawing the edges in the BREP.   So it looks like wireframe geometry when displayed since you are only drawing the edges, but not the faces/surfaces that would be needed to view a solid.   I understand some of STEP, but not the internal workings of BRL-CAD or OpenGL.   Your questions will have to be addressed by other mentors.   
Regards, Charlie

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
BRL-CAD Developer mailing list
brlcad...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel


Clifford Yapp

unread,
Jun 30, 2015, 7:23:53 AM6/30/15
to scl...@googlegroups.com
On Sun, Jun 28, 2015 at 3:46 AM, Milinda Fernando <mili...@gmail.com> wrote:

> The only problem is when I compile the edited step2g
> converter it mentions that SCHEMA_NAMESPACE is not defined. I don't know
> where it is defined. Can you please help me with this?

The definition of SCHEMA_NAMESPACE is handled in
src/conv/step/ap_schema.h, per defines controlled by CMake settings.

Cliff
Reply all
Reply to author
Forward
0 new messages