Greetings!
I am junior year undergrad. I started to explore brl-cad as its projects matched with my interests. I am currently working on building a ray tracing software (using C++) for radiative heat transfer purpose using Monte Carlo Methods. In that I am using IGES files for building geometry.
I followed this (https://brlcad.org/wiki/Deuces#Getting_Started) link to get started with brl-cad. I am facing a problem with VirtualBox. Screenshot-131.png
It is instructing to disable hardware virtualization as host system doesn't support it. I unchecked the "enable-box", but I am unable to update this setting. I am not familiar with VirtualBox, can anybody please guide?
hello @ANUJ MITTAL and welcome! what brings you to brl-cad?
I think the issue with virtualbox is that you have to shut down the virtual machine before you can change settings
that or you need to change Legacy to something else like off
Hi @Sean
I came across brl-cad a while ago when I was looking for open source ray tracing + cad software.
I came to know that it is among the gsoc organizations and its projects are similar to my ongoing projects.
I am excited to contribute something to brl-cad as good open-source ray-tracing + cad software are actually required by the community.
@ANUJ MITTAL what's your ray tracing background?
I used ray-tracing mostly for heat transfer calculations rather than computer graphics.
Initially I used TracePro at a laboratory where I was an intern.
I do not have that software at my university. So I decided to write a code myself for those calculations.
I have a decent knowledge of Monte Carlo methods and mathematics required for ray-tracing.
Also, the code I am writing is able to read data from IGES files. I have successfully imported NURBS data from IGES, in the sense that I can create a surface grid for calculations.
heat transfer? do tell me ...
s/me/more/
we have a pretty extensive iges converter in brl-cad, but it hasn't been updated in over 10 years. it's mostly useful for importing polygonal iges models, though in theory it imports nurbs geometries too
code is in src/conv/iges if you want to take a look
I am from mechanical engineering background.
We do not have formulae to calculate heat transfer through radiation from non standard surfaces like a solar reflector or complex shaped mirrors. So we trace the rays by giving them some energy value and calculate how and how many rays fall on target surface
that sounds a LOT like a tool we used to have in brl-cad called "rttherm" which did thermal energy transfer calculations
we finally deleted it a couple years ago because we had no users or customers for it, decided to focus more on our core capabilities
Oh!
I think people mostly develop their own programs because open-source is not yet popular in this domain and every one have their different requirements. Moreover, software like TracePro are too expensive for many researchers.
Sean said:
I think the issue with virtualbox is that you have to shut down the virtual machine before you can change settings
Thanks @Sean
I am now able to see the codes.
This (https://2nwiki.2n.cz/pages/viewpage.action?pageId=75202968) link provided the steps to enable virtualization.
HI @Sean
I looked at the IGES codes
many header files were missing.
How shall I move forward?
Meanwhile I will continue exploring deuces
ANUJ MITTAL said:
many header files were missing.
??? Which headers?
@Daniel Rossberg
common.h
and others in main.c
Now i am looking at n_main.cpp
common.h is used in that as well
Well, common.h is a very common header, which can be found right in the include directory.
oh, I am sorry
I was looking in src only
If you are using GNU makefiles, it isn't always obvious from where it reads the files.
A typical pattern is that every BRL-CAD source reads header files from the include directory and includes common.h from there. common.h is the common include for the BRL-CAD sources, which contains some basic declarations.
In src/other are sources from other projects, which are necessary for building BRL-CAD. These usually don't know about the include directory and common.h.
Sorry to bug you all again.
I am new to using VirtualBox. I am unable to update cmake even though VM is connected to internet.
Is there a way to transfer files to my PC?
I am using windows10
@ANUJ MITTAL
Sure, you can compile and run the BRL-CAD programs with Visual Studio on Windows. To do this, you need to install Subversion for downloading the source code (e.g. TortoiseSVN), MS Visual Studio at least in version 2017 (e.g. the Visual Studio 2019 Community edition), and CMake.
There is an issue with Visual Studio 2019: https://brlcad.zulipchat.com/#narrow/stream/104062-general/topic/general/near/186695851. Maybe, I'll commit the patch and wait if someone with Visual Studio 2017 complains.
To update the programs in the Linux VM, you had to upgrade the Distribution there.
On the other hand, you could think about setting up a dual boot configuration on your computer with Windows and Linux.
@Daniel Rossberg
Thanks! I will look into it
@ANUJ MITTAL how goes compilation?
I downloaded the files through SVN and compiled them.
But I didn't go any further. I will do it this weekend.
Install the programs by building the CMakePredefinedTargets/INSTALL project and run mged or archer. You can set the installation directory with CMake (CMAKE_INSTALL_PREFIX), such that you don't need administrator privileges to do this.
Hi @Daniel Rossberg
I needed some help. I installed Ubuntu and compiled files downloaded from SVN.
I installed it using: make DESTDIR=<path> install
In the usr/brlcad/dev-7.30.5/bin, all files are in this (application/x-sharedlib) format.
I tried to find solutions. Some suggestions were to make .desktop file. It didn't work.
When I try running it, it runs like this Screenshot-from-2020-02-29-22-27-28.png
What to do next?
make benchmark worked, make regress failed for test 1 nirt
Screenshot-from-2020-02-29-22-40-01.png [Screenshot-from-2020-02-29-22-40-01.png]
First the good news: It looks like the build and installation were successful.
But, it wasn't build with X Window support. That's why there are no GUI elements available, but only the command line. At the end of the CMake configuration an overview of the modules which will be build is printed. This looks like
Compile Tcl ........................: ON Compile Tk .........................: ON Compile Itcl/Itk ...................: ON Compile Iwidgets ...................: ON Compile Tkhtml .....................: ON Compile tkpng ......................: ON Compile Tktable ....................: ON Compile libpng .....................: OFF Compile libregex ...................: OFF Compile zlib .......................: OFF Compile termlib ....................: OFF Compile Utah Raster Toolkit ........: ON Compile openNURBS ..................: ON Compile STEPcode....................: ON OpenGL support (optional) ..........: ON X11 support (optional) .............: ON Qt support (optional) ..............: OFF Run-time debuggability (optional) ..: ON Build 32/64-bit release ............: 64BIT (Auto) Build optimized release ............: OFF Build static libraries .............: ON Build dynamic libraries ............: ON Install example geometry models ....: ON Generate extra docs ................: ON (html/man)
To activate the X11 support, you need to install the xorg development packages. See https://brlcad.org/wiki/Compiling.
Thanks a lot @Daniel Rossberg
I was initially following this https://brlcad.org/wiki/Building_from_SVN
both archer and mged are successfully running now
I think I should spend time on the deuces problem set to get familiarize with the code.
Do you all have any better path to follow?
@ANUJ MITTAL What/Which Deuces problem?
For getting familiarized with the code, it helps to identify an interest or goal. You mentioned heat transfer functions, so that already suggests a number of areas. You of course also mentioned iges, which is an endless set of possibilities.
HI @Sean
Sorry for the late reply.
I am very much familiar with the way an IGES format file works.
I am using ray-tracing for heat transfer without any graphical outputs. So although I know concepts of ray-tracing, I am still unskilled in OpenGL and libraries like glew, glut, etc.
But I am very much interested to work in these two fields (geometry and ray-tracing related problems) and want to learn more in ray-tracing specifically.
Can you suggest some problems to start working on?
@ANUJ MITTAL sure, you could:
And that's just the ones related to IGES.
There are hundreds of issues listed in our TODO and BUGS files that would be great for getting started. Unfortunately they're not sorted by time or complexity and some are 2 hour and some are 2 month tasks, but spending 5 minutes reading through and trying to work on the first one that sounds easy enough to you would be good too.
Great!!
The most important aspect is actually contributing something useful that makes things better. Even tiny features are helpful. It's putting in the time and effort to polish it up (don't expect someone else will polish your mess ;)
Can we import IGES file in mged? There's a library but I couldn't understand how it works.
add_executable is commented in CMakeLists.txt in IGES dir and BRLCAD_ADDEXEC is used. I am new to CMake and I couldn't understand what does BRLCAD_ADDEXEC do.
I went through about 1/5 of TODO file. I understood some of the tasks but I need little time to understand the source code and how these libraries work.
Few tasks that I can undertake:
bullet integration - need to expose restitution as an
object parameter so we can configure behavior:
http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?p=&f=&t=3248
coverage test the iges-g importer (i.e., create an iges file with at least on of every entity, create a little test program that reports how many of the entities import successfully)
There are other tasks where I understood 'What' but don't know 'How', yet.
I am referring the 'Introduction to MGED' guide to explore various functionalities of these libs.
Is a guide available for archer as well?
I observed that working on many projects needed deep understanding of CMake. I started learning the basics through the official tutorial https://cmake.org/cmake/help/latest/guide/tutorial/index.html#cmake-tutorial.
But more knowledge is required it seems. Is there a better way?
Also, I am impressed by the concept of mged. I am from mechanical engg background and geometry creation through command line makes our work too easy and saves a lot of time. :)
ANUJ MITTAL said:
add_executable is commented in CMakeLists.txt in IGES dir and BRLCAD_ADDEXEC is used. I am new to CMake and I couldn't understand what does BRLCAD_ADDEXEC do.
BRL-CAD defines some own CMake funktions. BRLCAD_ADDEXEC() is one of them. You can find their declarations in the misc/CMake directory. BRLCAD_ADDEXEC() is declared in BRLCAD_Targets.cmake and is mainly a wrapper for add_executable() with some additional (standard BRL-CAD) settings.
Thanks!
ANUJ MITTAL said:
I am referring the 'Introduction to MGED' guide to explore various functionalities of these libs.
Is a guide available for archer as well?
The tutorials are mainly valid for archer as well. You have to type the commands in the archer command window.
Okay
ANUJ MITTAL said:
Can we import IGES file in mged? There's a library but I couldn't understand how it works.
I tried importing IGES file as MGED and exporting MGED as IGES using iges-g and g-iges respectively.
I get "invalid command name" in both cases.
What could be the issue here?
@ANUJ MITTAL it sounds like you're probably trying to run them from the mged command prompt instead of your system command prompt. You don't run iges-g and g-iges inside mged. They're run externally like mged.
where is ft_curve() defined :joy: :joy: I think not defined , so does it means that RT_CURVATURE not doing anything in hit function ?
ft_curve
isn't a function but a pointer to a function. RT_CURVATURE
checks if this pointer is not NULL, and calls the function it points to then. Possible candidates for these functions are the ~_curve() functions defined in the src/librt/primitives subdirectories.
Daniel Rossberg said:
ft_curve
isn't a function but a pointer to a function.RT_CURVATURE
checks if this pointer is not NULL, and calls the function it points to then. Possible candidates for these functions are the ~_curve() functions defined in the src/librt/primitives subdirectories.
I think 7.28 not have any, could not find in librt build project or another library. What is the point of curvature of point calculation ? Why need?
@scorp08 the curve callbacks are in 7.28 (they go way way back to the beginning of rt)
you're probably just not looking for the right thing or didn't understand what daniel explained perhaps.
An example of the callbacks are in each of the primitive implementation folders like src/librt/primitives/ell/ell.c has an rt_ell_curve() function. That's the 'ell' primitive's ft_curve callback. That callback is registered in src/librt/primitives/table.cpp in the entry where all 'ell' callbacks are listed. So when something calls ft_curve() on an ell object, it calls the rt_ell_curve() function.
as for the point, the curvature callback is defined per object and is a value at a given hit point indicating what the surface is like there.
from include/rt/hit.h it elaborates:
/**
* Information about curvature of the surface at a hit point. The
* principal direction pdir has unit length and principal curvature
* c1. |c1| <= |c2|, i.e. c1 is the most nearly flat principle
* curvature. A POSITIVE curvature indicates that the surface bends
* TOWARD the (outward pointing) normal vector at that point. c1 and
* c2 are the inverse radii of curvature. The other principle
* direction is implied: pdir2 = normal x pdir1.
*/
Sean said:
you're probably just not looking for the right thing or didn't understand what daniel explained perhaps.
Oh, but when I type _curve or ~_curve and seached in vs2017 , rt_ell_curve not shown but there are some other functions shown. Why vs2017 search like this, need to do a setting??
@scorp08 I imagine visual studio is doing a symbol search, not a substring search. I don't know if there's a setting to change that. I typically use "grep" on mac/linux/bsd, not visual studio, for things like that.
We provide https://brlcad.org/docs/api/ but that's ONLY for public api and rt_ell_curve is not public api, it's implementation.
Last updated: Jan 09 2025 at 00:46 UTC