Thanks @Sean I will look on to that.
Sorry I was in a online class.
Sean said:
Thusal Ranawaka Your script is coming along fantastically. If you rename the file to something meaningful like "primitives.tcl" and include a header on the file (you can run "sh/header.sh pd primitives.tcl" to mark it as public domain for example), it's probably in good enough shape to get added to the main repository as an integration test.
@Sean Glad to hear.
Sean said:
You might also want to check the "top" and "left" views to see how they objects are positioned with respect to each other. They're not presently on a ground plane, all sort of positioned randomly in space. Might look better to put them into a grid or have them all on a flat plane.
@Sean Yeah. I thought that too. I will change the XYZ values and try my best to place them in a flat plane.
@Sean I saw this on BRL-CAD facebook page. This is what you call a flat plane know? Facebook-Personal-Microsoft-Edge-6_9_2020-8_40_51-PM.png
Yeah, it could be like that, or it could be totally different.
here's another version: https://brlcad.org/gallery/picture.php?/5/category/1
and an even older one: https://brlcad.org/gallery/picture.php?/14/category/2
a more recent one done by a student but now also incomplete: https://pdfs.semanticscholar.org/8870/da90ee803a7a21d6d0c16ec174fc2dc8b70f.pdf
It might give you some ideas to work with for the layout.
That said, I think the focus should more be on making sure first that there's an example of every single entity type first. The layout and rendering effects to make it look beautiful can come later.
Yeah.
Sean said:
Thusal Ranawaka Your script is coming along fantastically. If you rename the file to something meaningful like "primitives.tcl" and include a header on the file (you can run "sh/header.sh pd primitives.tcl" to mark it as public domain for example), it's probably in good enough shape to get added to the main repository as an integration test.
@Sean I renamed the myscript file as Primitives.tcl but I don't know how to include a header on the file, like where should I type it. I tried it on MGED Command Window, but it shows an error.
@Thusal Ranawaka I showed you the command you can run: sh/header.sh pd primitives.tcl
Presuming you're on Linux, that will put the header on for you. That said, if you're on Windows, you can just type a simple header like this:
# P R I M I T I V E S . T C L
# BRL-CAD
#
# Published in 2020 by Thusal Ranawaka.
# This work is in the public domain.
#
###
Sean said:
Presuming you're on Linux, that will put the header on for you. That said, if you're on Windows, you can just type a simple header like this:
# P R I M I T I V E S . T C L # BRL-CAD # # Published in 2020 by Thusal Ranawaka. # This work is in the public domain. # ###
It worked. @Sean
Sean said:
Thusal Ranawaka I showed you the command you can run: sh/header.sh pd primitives.tcl
This didn't work. It says Error: Invalid command name "sh/header.sh"
.
Anyways, I don't need it anymore. Because I typed the header that you gave me.
@Thusal Ranawaka how many entity types remain now?
Hi, @Sean I did 22 objects, and about 10 or 15 left because some objects aren't declared in the create tab in mged. :grinning_face_with_smiling_eyes: Also, have a look at primitives.tcl.txt
None of the more interesting / advanced entities are on the Create tab (except sketch).
@Sean Need help!!!!!!!!!!!!!!!!
I converted .pix to .bw.
@Sean No errors occured.
Then I converted it into .dsp.
But the file was 0 bytes.
(deleted)
This is the one I used, cv huc nu16 thusal.bw thusal.dsp
Look at the image.png
And the MGED Command Window, image.png
@Sean Since you are working on my DSP issue, I finished NMG, Sketch and Half. :sunglasses:
Take a look, primitives.tcl.txt
Thusal Ranawaka said:
I converted .pix to .bw.
@Sean Did you look at it?
@Thusal Ranawaka your first pix-bw is wrong
you didn't specify the size.
@Sean Why?
default size is 512x512
oh
Mine is 400x400
ergo, your first pix-bw is wrong
bbiab
Sean said:
bbiab
What is this?
be back in a bit
did you get it working?
Still trying.
@Sean So, I have to convert pix-bw again?
The command should be like this, pix-bw -w400 -n400 thusal.pix > thusal.bw
?
what does the usage say?
Wait a sec.
It worked.
Now bw-dsp.
@Sean Is this the command, cv huc nu16 thusal.bw thusal.dsp
you're following the tutorial right?
Still the dsp file 0 bytes.
Sean said:
you're following the tutorial right?
Righto
I don't know what's the problem.
The DSP file is 0 bytes.
make sure the bw worked
It worked.
how do you know it worked?
Created a .bw file with 156 kilobytes.
again, how do you know that's correct?
No errors occured.
a lack of errors doesn't mean it worked
So, it should respond?
I didn't say that
Have a look.
you're just assuming that because it didn't say anything that it worked, and that's not necessarily a valid assumption
you should check that it worked
I looked, that's not checking anything
Hmm.
how can you check that it worked?
Try this command. bw-fb -w400 -n400 thusal.bw
right .. it's an image, so look at it -- does it display?
by the way, -s400 is a shorter alternative to -n400 -w400
When I enter that command the display, pops for a less than second and goes away.
well that error is saying it couldn't read thusal.bw because it had 0 bytes
Yes
Yes
But whats the problem with my .bw file
But whats the problem with my .bw file
Thusal Ranawaka said:
Yes
Zulip's weird bug. :ladybug:
I don't know -- revisit the command where you made the .bw file -- you either didn't do something right there or you did it write and later wiped out the file trying things
you have to be more methodical, make sure each step completed successfully, not assuming anything
Yes.
Will try it from the begining
you make sure the png is correct, so make sure again and then start from there
actually, I think you make sure the pix was correct, so you could start there
pix was correct
I displayed it
It worked
Problem with .bw
Step one, The .pix file, image.png
okay, so next check pix-bw usage -- what does it say
Step two, The .bw file, image.png
I said check the usage. you did not check the usage. you ran it.
what's the usage?
:oh_no:
do you not know how to check usage?
better!
Sean said:
do you not know how to check usage?
Sure. :rage: :grinning_face_with_smiling_eyes:
so see anything you might have specified wrong? or didn't specify?
Yes.
Might try -o instead of >
you could try that, but > is in the usage, so that should be right
Yes.
also looks like input can just be listed or can be redirected, so that looks specified correctly
so then perhaps it's something you didn't specify...
what are any of the options you didn't specify?
@Sean I didn't specify, -s -e -R -G -B
more than that -- you didn't specify any options
Also, -w and -n
so think about that
what are -n and -w or -s required? when are they not required?
Will try with -w and -n
don't try, understand first ...
Okay.
when are they required?
What do you mean?
I mean when must you specify -n -w or -s ?
and when do you not need to?
When converting a file. :thinking:
not exactly
have you read the manual page for any of these commands?
you don't need to, I'm just wondering
Uh... No
I don't know if it runs on windows -- try running "brlman pix-fb"
if that doesn't work, run "man pix-fb" in mged
The first command ran, No errors, No replies.
did it display a window?
No
try the second one in mged
Do I have to change the directory in MGED.
I ran, errors
Error: couldn't find manual page "pix-fb"
okay, then will revisit that later
so back to the options
do you remember why you specified -n and -w on pix-fb?
Yeah. The dimensions of the image.
but why?
that's what
To display the whole pix.
but why did you need to say -n400 ?
why did that make it display the pix?
Because it's the height of pix.
but you didn't have to specify a height on png-pix ..
why?
Uh...............
Because it automatically converts with the correct dimensions?
yes! and how do you think png-pix knows the correct dimensions?
Uh.... The Code.
nope
I have no idea. Feel like a nerd. :nerd:
png-pix knows... because the png file knows
Its dimensions
the size of the image is embedded into the png file itsel
right, the dimensions are encoded into it
that's because it's a complex format, lots of options, a data header, encoding options, and much more ... but the important part to realize is that the PNG file itself holds dimension inormation
Hmm
So, I don't have to specify -n and -w?
the PIX and BW formats are fundamental simple streams of bytes, some image programs call them "raw" images
ohhh
these raw images have no header, no size information, nothing. they are just a stream of pixel values
Yep
so you ALWAYS have to specify their size when working with them
Oh
because the tools have no way of knowing
the image doesn't know
Yes
so back to your pix-bw conversion... what did you do wrong?
I didn't specify the dimensions.
bingo.
Do I have to do it in the .pix too?
so try that, then verify the bw with bw-fb
Thusal Ranawaka said:
Do I have to do it in the .pix too?
what?
Sean said:
Thusal Ranawaka said:
Do I have to do it in the .pix too?
what?
Do I need to specify in dimensions in png-pix, too?
well did you?
No
why?
Never mind, I will try pix-bw first. See if that works
ooof.. if you don't understand this, then you're likely to continue to have problems
why didn't you need to speciy dimensions with png-pix?
you just said the right answer 5 minutes ago...
or I said it I suppose
okay, I'm going to rest then. good luck.
the answer was that you don't need to specify with png-pix because the png image has dimension in it and it's the input, so the tool knows how big the image is when writing out the pix output.
Sean said:
you just said the right answer 5 minutes ago...
:nerd:
Sean said:
okay, I'm going to rest then. good luck.
Good Night! :goodnight:
@Sean So, the correct command should be like this, pix-bw -w400 -n400 thusal.pix > thusal.bw
@Sean Good Morning! :sunrise: Bad News, I did exactly what you said, specified the dimensions. But it didn't work when I ran bw-fb. A windows just pops-up and goes away.
@Thusal Ranawaka post your bw image here, I can inspect it
Sean said:
Thusal Ranawaka post your bw image here, I can inspect it
@Sean I can't inspect the image, it just pops up and goes.
or You mean the converted .bw file?
yes, and the pix
@Sean thusal.bw
So it created your .bw file correctly...
Screen-Shot-2020-07-24-at-9.14.17-PM.png
Yep
that's bw-pix run here
er bw-fb I mean
Sean said:
Is this the .bw file?
yep
Wow
In my PC, it just pops up
less than a millisceond
what operating system?
Windows?
WINDOWS
and you ran: bw-fb -s400 thusal.bw
Yes
did it display any message?
No
Even bw-fb -w400 -n400 thusal.bw
did you run it on the Windows command prompt or mged?
Command Prompt. :rage:
okay good, just checking
try bw-fb -s400 -F/dev/wgll thusal.bw
Still the same.
Pops up and goes
Got a message called, bw-fb: read got 0, s/b 160000
hm, so you must have found some bug in bw-fb on Windows
Yeah. :sunglasses:
@Sean So.....
doesn't matter -- the bw is correct, so what's the next step?
bw-dsp
But everytime I convert bw-dsp
The file is 0 bytes
there is no bw-dsp tool...
What?
show me the command you're trying to rn
run
Sean said:
there is no bw-dsp tool...
Sorry, my bad
@Sean cv huc nu16 thusal.bw thusal.dsp
try svn huc nus < thusal.bw > thusal.dsp
@Sean 'svn' is not recognized as an internal or external command,
operable program or batch file.
bah, cv
typo
Still 0 bytes
I think I see what the problem is. Known issue on windows. A lot of the command-line tools haven't been ported properly to Windows.
Hmm
Did you do any coding tasks for GCI?
Yes.
did you compile BRL-CAD?
No.
It's beginner task
At that time, I already completed 2 beginner tasks
So if you want to really get into coding, you could totally fix these bugs. They're pretty simple, but you'll have to follow the compilation instructions and get that working first.
The problem is there's code that opens the input/output files. This code is usually a call to open() or another function called fopen().
oh
When you open a file with code, you have to specify how to open the file -- for example whether you're only reading the file or whether you're going to read-and-write to the file.
That's sufficient for Linux and Mac, but on Windows, you ALSO have to tell it when the files are binary files.
I really love to work on a ACTUAL coding, but I am still a newbie to coding.
We've done that for a lot of tools, but there are hundreds of calls that need to be updated. That's the case with bw-fb and cv, why they're not working.
Hmm
But I can work on it. If you help me.
@Sean It's good for my knowledge and I can do some actual contributing to open source (mean BRL-CAD). :mortar_board:
that'd be great
So, Do I have to skip DSP in primitives.tcl
so you'll have some homework, compile brl-cad. there are instructions on the wiki
no, here
Okay
Boom! You made it.
use the 'bo' command to import it into the .g file, then you should be able to create a dsp that references it.
similar with the bw, you can create an ebm
Okay
here's build steps: https://brlcad.org/wiki/Building_from_SVN
So, I have to download TortoiseSVN?
I uninstalled it 2 days ago.
heh
But I have some problems with the network. My Wi-Fi quota exceeded about a week ago. When it's exceeded the usual speed is 100Mbps, but now 64Kbps. :sad:
any svn client will work
Sean said:
use the 'bo' command to import it into the .g file, then you should be able to create a dsp that references it.
bo command?
I just checked the usage
the bo command doesn't work
I tried it in MGED
how'd you try to use it?
bo thusal.dsp -o thusal.g
It's wrong
The correct command?
well you said you checked usage, you see that there's a type parameter?
Yes
you need to tell it that the file is unsigned 16-bit data
So..
bo {-i major_type minor_type | -o} dest source
try "u S"
Is this correct, bo u S thusal.dsp -o thusal.g ?
nope
then?
bo -i u S thusal.data thusal.dsp
Cannot stat input file (thusal.dsp)
Error: Error creating thusal.data
you got to be able to figure some of this out on your own...
that's a pretty basic error, do you not understand what it means?
It can't find the DSP file?
yep
so it's not in whatever default directory it's looking... so ...
I can't concentrate, I am on an online class
I tried cd
but shows me errors
I'm going to let you try this for a while. you can run "man bo" in mged to read more help, but this is something you should be able to figure out
It worked
The bo command worked
So, it creates a .g file?
Tried it in both ways.
both?
bo command and in thusal1.s dsp f thusal.dsp 400 400 0 ad 1 0.005
looks like you created a dsp
What?
try different height values
You mean ae 270 90 ?
no, different dsp heights
I tried **in thusal1.s dsp f thusal.dsp 400 400 0 ad 1 0.005**
first, might try in thusal1.s dsp f thusal.dsp 400 300 0 ad 1 0.005
whaaat?
I'm guessing you have no idea what all that means
just type "in" and follow the prompts
I typed in
hit enter
did it
In mged
then
then answer the prompts
they are identical to the long lines you typed, but they're interactive
the prompts will help you understand what the values mean
Is this correct? image.png
I don't know what you mean by correct
Is this the process?
You said to me to type 'in'
yes, you are answering 'in' command prompts ...
So, I am following the prompts
@Sean It asks, Normal Interpolation? 0=no 1=yes:
Answer?
I don't know what Interpolation means.
just give it the same answer you gave when you did it without prompts
@Sean Interpolation = -i ?
you never specified "-i" in the unprompted version
No
Sean said:
just give it the same answer you gave when you did it without prompts
What do you mean? @Sean
you ran the 'in' command before, yes?
you've first ran it without prompts. you just copy-pasted it from the wiki.
Yes.
Then?
running it with prompts is identical.....
Okay
the responses are identical, it just explains them to you between each response
@Sean So, I never specified any Interpolations?
I created it.
@Sean Have a look, image.png
you told it to read from a file. the whole point of the 'bo' command was so that it'd read from an object instead
thusal.s
i mean, it's not wrong -- it's just not what you were working on
you can make dsp that read from a file too -- that also works -- but that means you have to copy the data file around with the .g file. if you import it as an object, you don't need to do that.
you can run "kill dsp" and then up-arrow to edit the 'in' command you just did to replace the 'f'ile response with an 'o'bject response
@Sean Shows some errors,
db_lookup(thusal.dsp) failed: thusal.dsp does not exist
Cannot retrieve DSP data from object "thusal.dsp"
rt_dsp_import4(4420) 'thusal.dsp' unable to load displacement map data
rt_db_external5_to_internal5(dsp): import failure
db_recurse() rt_db_get_internal(dsp) FAIL
Used this command, in dsp dsp o thusal.dsp 400 400 1 ad 1 0.05
Should it be in dsp dsp o thusal.s 400 400 1 ad 1 0.05
?
@Sean I think I did it correct this time, in dsp dsp o thusal.data 400 400 1 ad 1 0.05
It worked without errors.
l thusal.data
run "l thusal.data"
So, it's success?
thusal.data: uniform-array binary object (BINUNIF)
160000 unsigned 16-bit ints
excellent
It created a BINUNIF.
so yes, you imported the dsp data correctly, and created an object called dsp that is using that data object
so now back to the original goal ... make the dsp taller
Now I have to add in dsp dsp o thusal.data 400 400 1 ad 1 0.05
command to Primitives.tcl
which I think you did, from 0.005 to 0.05 ?
what's that look like?
Righto
Righto
(deleted)
(deleted)
(deleted)
Sean said:
which I think you did, from 0.005 to 0.05 ?
Yes.
So, now I have to add this in dsp dsp o thusal.data 400 400 1 ad 1 0.05
command to Primitives.tcl?
what's that dsp look like?
Pretty Nice.
did you rotate it?
No.
rather ... try rotating it
see what it really looks like in 3d
what's it look like at ae 35 25?
Looks like a ancient fossil.
Excellent!
now the reason for the big square is because your image background was not actually black, but just a dark gray
try this dsp:
all you need to do is the bo command to import it again
Okay.
So, you removed the background?
@Sean Boom! Look at that, image.png
@Sean Boom! Look at that, image.png
that looks better
@Sean So, now?
Should I add it to the Primitives.tcl?
sure
So, I should add in dsp dsp o thusal.data 400 400 1 ad 1 0.05
Added.
Do I need to add 'bo' command too?
Otherwise it doesn't work
@Sean Have a look, primitives.tcl.txt
See if there are any errors.
Now it's time for extrude
@Sean EBM image.png
@Sean Today's update of Primitives.tcl, did DSP, EBM, part and extrude.
Check primitives.tcl.txt
Did you try your logo as an ebm? little different than dsp
@Sean Uh...Yeah. But it creates a cube-like square when I drew it in mged.
@Sean Not the skeleton.
that's because your background isn't black
How should I fix it?
you have no zero values
you can paint the background black
you can use one of our tools to threshold the image
bwthresh 50 < img.bw > img2.bw
Sean said:
@Sean In Command Prompt?
I tried but the file was 0 bytes.
what was your command?
bwthresh 50 < thusal.bw > thusal.bw
First command, png-bw thusal.png > thusal.bw
Second command, bwthresh 50 < thusal.bw > thusal.bw
gah, you can't do that
you can't input from and output to the exact same file -- it'll just wipe it out
so you need to recreate the bw file again
then try creating a NEW bw file with bwthresh
@Sean Sorry, it's typo
@Sean This is what I tried, bwthresh 50 < thusal.bw > thusal2.bw
okay, hm.
well, you can just paint the background 0,0,0
Using mged?
no, using any basic paint program
Okay
(on the original png, the reconvert to bw)
@Sean Sorry, I didn't get any time to work on ESP. Because I had some personal stuff to do.
And trying to assign a black color to the background.
@Sean Is it look better now? thusal1.png
Now it's black, eh?
@Sean :heart_eyes: image.png
@Sean Is there is a command that you can draw all the objects in a database?
The objects that you created.
@Sean Is this Datum correct or do I need to modify more?
in datum datum plane 0 0 0 0 1 0
Thusal Ranawaka said:
Sean Sorry, I didn't get any time to work on ESP. Because I had some personal stuff to do.
How DARE you have personal stuff .... haha
Thusal Ranawaka said:
Sean Is this Datum correct or do I need to modify more?
I would suggest creating a more complex datum that is three planes (for X Y and Z), three lines (for -X, -Y, and -Z), and one point at the origin.
Sean said:
Thusal Ranawaka said:
Sean Sorry, I didn't get any time to work on ESP. Because I had some personal stuff to do.
How DARE you have personal stuff .... haha
Sorry, I have some problems with English, sometimes. :happy: Actually, I went to our relatives' house yesterday, played cricket all day long and had some fun after lockdown and today I had some classes and felt very tired.
Thusal Ranawaka said:
Sean Is there is a command that you can draw all the objects in a database?
If you have not created combinations, then you can use globbing (e.g., "draw *"). However, the better way is to create a combination of all the objects, then you just draw that. Running the "tops" command will show the top combinations (i.e., combinations that aren't referenced by any other combinations).
Hmm
If you can create one of every object type, we can integrate it into the repository as a testing example.
(deleted)
in grip grip 1 0.5 0.0100 1 0 0 2.30 Just finished grip
@Sean in hyp hyp 0 0 0 0 0 3 0 1.5 0 0.75 0.4 Finished hyp
@Sean I think I created all the objects, that you can create using the make command except bot and datum.
bot and datum are harder to make.
@Thusal Ranawaka For BoT, you could create an NMG, https://brlcad.org/wiki/NMG
and then convert the nmg to bot with the facetize command
Okay.
I just want to scale my DSP as it was very big.
But need some help.
alternatively, can import a simple bot model using any of the converters
like teapot
This is the difference between before I scale and after I scaled.
But how should I add this command to primitives.
it sounds like you need to learn how to do command-line transformations
the most simple way would be to use the sed + tra/sca/rot + accept commands
I know how to use tra sed and most of the commands
Sean said:
the most simple way would be to use the sed + tra/sca/rot + accept commands
So, it's sca
That's all I need.
Thanks @Sean
look at regress/mged/tra_edit.mged for an example
Thusal Ranawaka said:
Sean said:
the most simple way would be to use the sed + tra/sca/rot + accept commands
So, it's sca
I used scale command that's why I was stuck.
one is absolute, the other is relative
sca example: regress/mged/sca_edit.mged
Alright
@starseeker what's the status of regress/mged .. is it running both the tcl and shell script tests?
@Sean I used the sca command, but the size of ebm didn't change.
I believe regress/mged is running both, yes
great
The regress-mged test runs the old shell test, and the regress-mged-<cmd> tests run the others.
The latter run in parallel now - I think I got that working relatively recently
You can see.
I have used sed and sca commands, but it didn't change.
@Sean Aligning the objects, until you replies.
(deleted)
@Thusal Ranawaka I really hate repeating info that was provided.. did you look at the examples?
regress/mged/sca.edit?
...
It's at the SVN repo?
So then you definitely didn't look at the example!
that becomes very frustrating for me, because it makes me repeat myself and wastes both of our time.
I couldn't find it, that's why.
Found it. :rage:
The sca command only largens the object, not decreses.
@Sean The update of Primitives.tcl, primitives.tcl.txt :rage:
Thusal Ranawaka said:
The sca command only largens the object, not decreses.
This is not true.
it's a scaling factor
10 will make an object 10 times bigger. what factor would make it half as big?
I used '-' mark to decrease, but didn't work.
that's not what you learned in school
ever
this isn't addition and subtraction, it's scaling, multiplication
/ is this correct
division
10 times what factor equals 20 ?
2?
yes
10 times what factor equals 5 ?
4
10 times 4 is 40
so no
0.5
sorry
?
10 times 0.5 is 5, yes
0.5 is the factor that makes 10 half as large as it was
makes smaller
i.e., makes it smaller, yes
Have to scale 0.025 times from the actual scale to make it to the correct size.
or maybe even smaller
I set it to 0.00125
@Sean , I downloaded the new version of BRL-CAD 7.30.8, I had 7.26.0. But instead making things easier, it's now harder.
What is this? image.png
Looks like you started mged without a database, and then you opened a read-only one (probably one from the example databases).
I opened mged just like normal and then went to open section and opened a database
Trying re-installing BRL-CAD on a different path.
Thusal Ranawaka said:
Trying re-installing BRL-CAD on a different path.
Why? It works as expected.
Yeah, I had some more couple of issues as well, but I think I know the answer for them.
Thusal Ranawaka said:
I opened mged just like normal...
This is the first error message: You started mged without giving it a database. This is the usual behavior when starting it from the app icon.
...and then went to open section and opened a database
Obviously a read-only one.
Daniel Rossberg said:
Thusal Ranawaka said:
I opened mged just like normal...
This is the first error message: You started mged without giving it a database. This is the usual behavior when starting it from the app icon.
...and then went to open section and opened a database
Obviously a read-only one.
So, it's a change in the new version?
Daniel Rossberg said:
Thusal Ranawaka said:
I opened mged just like normal...
This is the first error message: You started mged without giving it a database. This is the usual behavior when starting it from the app icon.
...and then went to open section and opened a database
Obviously a read-only one.
No, It's not a read-only one, that is the database that I been working on Primitives.tcl.
Thusal Ranawaka said:
So, it's a change in the new version?
No, same as before.
The difference may be that the old version was installed without admin rights in your user folder and you could write all installed files this way.
Daniel Rossberg said:
No, same as before.
The difference may be that the old version was installed without admin rights in your user folder and you could write all installed files this way.
I don't remember, Yeah, I didn't install it. I took the Zip file from sourceforge
Then extracted it. It worked perfectly.
Which zip file?
There's a .zip file in BRL-CAD Source, I think.
I can't find one: https://sourceforge.net/projects/brlcad/files/BRL-CAD%20for%20Windows/7.26.0/
But I tried it now. Set .g files to open in mged. And worked.
Daniel Rossberg said:
I can't find one: https://sourceforge.net/projects/brlcad/files/BRL-CAD%20for%20Windows/7.26.0/
I do not recall very much, will show you.
If I remember correctly, the old version installed the program in your personal folder if it was started without admin privileges.
Yes. I think.
Thusal Ranawaka said:
Daniel Rossberg said:
I can't find one: https://sourceforge.net/projects/brlcad/files/BRL-CAD%20for%20Windows/7.26.0/
I do not recall very much, will show you.
This is it, https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/7.26.0/
Anyways, 7.30.8 worked. The Graphics Window turns to a dark blue color when you open a database. LOL :grinning_face_with_smiling_eyes:
Thusal Ranawaka said:
Anyways, 7.30.8 worked. The Graphics Window turns to a dark blue color when you open a database. LOL :grinning_face_with_smiling_eyes:
It didn't happen on 7.26.0.
Thusal Ranawaka said:
This is it, https://sourceforge.net/projects/brlcad/files/BRL-CAD%20Source/7.26.0/
This are the sources(?)
Yeah.
Did you compiled it from sources?
I think that's where I get BRL-CAD 7.26.0
Daniel Rossberg said:
Did you compiled it from sources?
Nope
Sean said:
Thusal Ranawaka For BoT, you could create an NMG, https://brlcad.org/wiki/NMG
and then convert the nmg to bot with the facetize command
@Sean I did NMG, but I am not fancy with that facetize command. Looking on to the wikis'
@Sean @Daniel Rossberg Completed and Uncompleted objects of Primitives.tcl.txt (According to info that I have and from the wiki)
Arbitary,
Ellipsoids
Cones and Cylinders
Derived from 2D
(Uncompleted)
Other Solids
(Uncompleted)
Other
(Uncompleted)
Altogether 31 objects completed, 10 uncompleted.
Thusal Ranawaka said:
Altogether 31 objects completed, 10 uncompleted.
nice
@Sean Aligned the objects. primitives.tcl.txt
@Sean Almost all the objects that you create using in
command has been completed.
(deleted)
But last few objects are very hard.
Need help in bot
.
Only 9 objects remain, I think.
@Sean Is this command correct? facetize nmg bot
. It ran, with no errors. Just wanted to know, is these are the right steps.
Thusal Ranawaka said:
Altogether 31 objects completed, 10 uncompleted.
You're getting close! Once you get those remaining, we can start talking about organizing the layout. This will make a very useful regression test too.
Yes.
Did you figure out the bot?
Uh... I sent you a msg.
Thusal Ranawaka said:
Thusal Ranawaka said:
Sean Is this command correct?
facetize nmg bot
. It ran, with no errors. Just wanted to know, is these are the right steps.
This.
that's not enough information to answer the question
what is the usage for facetize?
Usage: facetize [ -nmhT | [--NMG] [--CM] [--SPSR] ] [old_obj1 | new_obj] [old_obj* ...] [old_objN | new_obj]
Options:
-h, --help Print help and exit
-v, --verbose Verbose output (multiple flags increase verbosity)
-q, --quiet Suppress all output (overrides verbose flag)
--NMG Use the standard libnmg boolean mesh evaluation
to create output (Default)
--CM Use the Continuation Method to sample the object
and create output
--SPSR Use raytraced points and SPSR to create output -
run -h --SPSR to see more options for this mode
-n, --NMG Create an N-Manifold Geometry (NMG) object
(default is to create a triangular BoT mesh)
--TNURB Create TNURB faces rather than planar
approximations (experimental)
-T, --triangles Generate a NMG solid using only triangles (BoTs,
the default output, can only use triangles - this
option mimics that behavior for NMG output.)
-r, --regions For combs, walk the trees and create new copies
of the hierarchies with each region replaced by a
facetized evaluation of that region. (Default is
to create one facetized object for all specified
inputs.)
--resume Resume an interrupted conversion (region mode
only)
--retry When resuming an interrupted conversion, re-try
operations that previously failed (default is to
not repeat previous attempts with
already-attempted methods.)
--in-place Alter the existing tree/object to reference the
facetized object. May only specify one input
object with this mode, and no output name.
(Warning: this option changes pre-existing
geometry!)
-F #, --feature-scale # Percentage of the average thickness observed by
the raytracer to use for a targeted feature size.
Defaults to 0.15, overridden by --feature-size
option
--feature-size # Explicit feature length to try for sampling based
methods - overrides feature-scale.
--decimation-feature-size # Initial feature length to try for decimation in
sampling based methods. By default, this value is
set to 1.5x the feature size.
--max-time # Maximum time to spend per processing step (in
seconds). Default is 30. Zero means either the
default (for routines which could run
indefinitely) or run to completion (if there is a
theoretical termination point for the algorithm)
- be careful of specifying zero because it is
quite easy to produce extremely long runs!.
--max-pnts # Maximum number of pnts to use when applying ray
sampling methods.
-B EXPERIMENTAL: non-overlapping facetization to BoT
objects of union-only brep comb tree.
-t #, --threshold # EXPERIMENTAL: max ovlp threshold length.
bingo, yes
Okay.
But the command that I have sent you ran without errors and it created a bot.
yet you're still asking me if it's right.. :)
I'm asking you if it's right -- how can you know?
Sean said:
I'm asking you if it's right -- how can you know?
If it's run with no errors and if creates an output.
you look at the usage and see if you specified the right params -- you did. the usage seems to say that it could be "facetize old new" or "facetize new old" ... which would imply what you ran was correct in form
so the only thing you'd need to make sure is that old is valid and new didn't exist prior
Sean said:
so the only thing you'd need to make sure is that old is valid and new didn't exist prior
Yes
not seeing an error displayed is not a good test
you want to inspect the output
you say it created a bot object
is that bot object correct?
does it have triangle(s) in it?
Will check it.
Do you know the command for inspecting objects?
Will check it.
how are you going to check it?
(deleted)
(deleted)
Sean said:
how are you going to check it?
l bot
yes, the 'l' command lists an object's contents
So,
great! so looks like you answered your question.
the other check you could do would be to make sure it renders with rt as expected
(deleted)
(deleted)
6 vertices, 8 faces ... a face is a triangle for bots
so 8 triangles
Sean said:
the other check you could do would be to make sure it renders with rt as expected
So, just run rt
B bot ; rt
ae 35 25 ; rt
So, it completes bot
, 8 objects remains.
It's a rather boring bot
but it's a bot!
Sean said:
It's a rather boring bot
:grinning:
@Sean image.png
What do you think?
Thusal Ranawaka said:
Sean Daniel Rossberg Completed and Uncompleted objects of Primitives.tcl.txt (According to info that I have and from the wiki)
Arbitary,
- arb4
- arb5
- arb6
- arb7
- arb8
- rpp
- arbn
Ellipsoids
- ell
- ell1
- sph
- ehy
- epa
Cones and Cylinders
- tgc
- rcc
- rec
- rhc
- rpc
- tec
- trc
Derived from 2D
- extrude
- dsp
- ebm
(Uncompleted)
- revolve
- hf
Other Solids
- tor
- eto
- part
- nmg
- ars
- metaball
(Uncompleted)
- pipe
- brep
- spline
- vol
- bot
- poly
Other
- sketch
- half
- grip
(Uncompleted)
- annot
- binunif
- submodel
@Sean Is there an object missing? Just to be sure.
@Sean Altogether, there are 40 primitives in total? or even more or less?
Thusal Ranawaka said:
Sean Altogether, there are 40 primitives in total? or even more or less?
I believe we're up to 42 distinct object types.
oh
you can find a listing of them in src/librt/primitives/table.cpp
So, I think 33 objects completed, I believe.
Saw it.
A .cpp file
There is a code for each object.
@Sean Trying to make 'vol'
@Sean But can't figure out how to make it, because both make and in commands are unusable for this command.
@Sean I saw a list of 42 objects at the table.cpp, but they declared 'arb' as a collection (because arb contains arb4, arb5, arb6, arb7, arb8). So, it means it adds 3 more objects do the list. So, altogether there should be 45 objects in Primitives.tcl?
Thusal Ranawaka said:
Sean But can't figure out how to make it, because both make and in commands are unusable for this command.
Their creation is almost identical to EBM. Did you read the wiki page?
Sean said:
Thusal Ranawaka said:
Sean But can't figure out how to make it, because both make and in commands are unusable for this command.
Their creation is almost identical to EBM. Did you read the wiki page?
Yes. But I couldn't understand the documentation.
I will look on to it again.
Listing the objects.
Thusal Ranawaka said:
Sean I saw a list of 42 objects at the table.cpp, but they declared 'arb' as a collection (because arb contains arb4, arb5, arb6, arb7, arb8). So, it means it adds 3 more objects do the list. So, altogether there should be 45 objects in Primitives.tcl?
Internally, they are all identical, but yes -- if you were counting them as separate objects, then instead of 42 objects, that would imply 46 objects
Sean said:
Thusal Ranawaka said:
Sean I saw a list of 42 objects at the table.cpp, but they declared 'arb' as a collection (because arb contains arb4, arb5, arb6, arb7, arb8). So, it means it adds 3 more objects do the list. So, altogether there should be 45 objects in Primitives.tcl?
Internally, they are all identical, but yes -- if you were counting them as separate objects, then instead of 42 objects, that would imply 46 objects
:grinning_face_with_smiling_eyes:
I need to download the .tar.gz file to work on VOL.
@Sean But, where do I type that commands?
I don't know what tar.gz you are referring to, but it is definitely not required in a general sense
what is required is a volumetric data set
http://graphics.stanford.edu/data/voldata/CThead.tar.gz
this can be created by hand, it can be created with images, it can be terrain data downloaded from the web, it can be ...
Images?
So, we can use .png?
certainly
tar -zxvf thusal.png -C scanslices
did you actually read the wiki page to UNDERSTAND it, or are you just trying to reproduce the same steps
if you create the exact same VOL as the wiki page, that is not as helpful as creating something different
that goes for all objects
oh
Thusal Ranawaka said:
tar -zxvf thusal.png -C scanslices
This makes absolutely no sense.
a png file is not an input to the tar commnad
So, png?
I don't think you're considering what each of those commands are doing, or what the wiki page explained
png -zxvf thusal.png -C scanslices
o.O
dude, you're just guessing randomly now...
:expressionless:
you need to understand what the commands are doing
read their manual pages if you need to
Sean said:
you need to understand what the commands are doing
Give me a minute.
start with understanding "what is a VOL"?
then think about how one might represent data for that kind of object
then the steps you are seeing might make more sense to you
Going through the wiki.
Found the usage of 'in' command
You learned about the 'in' command several days ago... it has an interactive mode that literally explains each input one at a time for ALL object
Yes.
so you shouldn't even need to see the example at the bottom of the VOL wiki page ... because you can just type 'in' and see it yourself
that's the case for all of the object types that you still need to make
so ... what is a VOL?
Voxel?
Looking on to the prompts
Asks for file contains voxel data.
So, .bw or .dsp file works?
forget about the 'in' command if you don't yet understand what a VOL is....
what is a voxel?
Three-dimensional grid of cells
The definition of voxel looks similar to that of a point but in 3d
Thusal Ranawaka said:
Three-dimensional grid of cells
yes, good!
do you understand what a 3d grid of cells looks like?
Think so.
ever played minecraft?
Bingo
a minecraft world is a 3d grid of cells
Sean said:
ever played minecraft?
No, I have seen it.
Like this?
heh
Yea minecraft is a perfect example for 3d grid of cells/blocks
well that's certainly something obviously derived from your ebm data file
Where each block is a voxel
3d grid cell = voxel
Sean said:
well that's certainly something obviously derived from your ebm data file
Yes.
an ebm also contains voxel data, but for just one "layer" ... one elevation ... one slice. i.e., it's a single layer of 2d data that is presented as voxels
So, it's need to be 3D
a vol is that same concept, but generalized to more than one slic
you can have any number of "layers" in your data
you can have 1 layer, in which case it's basically the same as ebm
or you could have thousands of layers like a minecraft world
Yeah.
So, the EBM data represents only 2 layers and what should I do to get more than 2 layers, more voxel data?
Thusal Ranawaka said:
In this case, I got some warnings as well.
Thusal Ranawaka said:
So, the EBM data represents only 2 layers and what should I do to get more than 2 layers, more voxel data?
No, EBM is only ONE layer ... it's 2-dimensional data (width x height)
@Sean
EBM = one layer
So VOL = stacked EBMs?
yeah, VOL = stacked EBMs
@Thusal Ranawaka check out this picture: Voxel-doing-Layer1.jpg
in that picture, you see four images
Yes
So, a stack of images created a VOL
you hopefully see that you could take each one of those four pictures and make 4 EBMs
yes?
Okay.
those four images could be four separate png files or four jpg files or four gif files for example
and you already learned how you can turn a png into a bw and make an ebm, yes?
And you have to change the threshold value in each image.
Sean said:
and you already learned how you can turn a png into a bw and make an ebm, yes?
Yes.
great ... so now say you did that four times, you have 4 bwfiles
that's essentially VOL data
if you combined those 4 images into 1 file, you have a voxel data file
Okay.
a voxel data file with 4 layers
are you just saying okay or do you understand? :)
Divide you profile photo into parts according to their position and then make each part an EBM
Then make that a vol
Make the left arm one part, body another part and the other arm one part
Alright
i'm not sure that's a good example to work with, there is only one layer of data in a single photo
if you chop it up into sections, they're going to get stacked one on top of the other, and that won't make much sense
That's actually true
Yes
So, I will try the image that you sent. (Sean)
that's why you need to create or import multiple slices of data (multiple images)
@Thusal Ranawaka I suggest you create your own images
That might be a great idea.
you could make four images that are 16 x 16 pixels in size ... paint something different into each one
but not just different, make them layers of something you know
what's something simple you'd like to make in 3D?
Uh... Tea Cup
Tea cup is a complex one to make using vol at least
excellent, cause that's a good example I just found. try to make this:
how many layers do you see?
4
no
5
yes, there are 5
and what are the dimensions of the top layer?
that is, if you wanted to make an ebm of the top layer, how big would that image need to be in pixels?
246x0?
o.O
no
:face_palm: don't look at the file name
that wouldn't b an image
look at the picture -- why did you say 5 layers?
4 sides and the layer of handle
ahh, so no that's not right
They are not layers but different sections of the cup in that image
see the gray blocks on the bottom
that's one layer
Think according to minecraft
then there are three green layers
what's the top layer?
Sumagna Das said:
Think according to minecraft
I haven't played Minecraft.
so just focus on what you see in that picture
There is a blue top layer?
excellent
yes
on an online class
so imagine that blue top layer in an image by itself
imagine all the layers in separate images
how many images would you have?
:thinking:
Thusal Ranawaka said:
on an online class
this is more interesting than your class ;)
Sean said:
Thusal Ranawaka said:
on an online class
this is more interesting than your class ;)
That's why I am chatting with you.
Sean said:
how many images would you have?
5 images?
correct!
how many blocks do you see on the top layer?
5 layers = 5 images
correct
so how many blue blocks do you see
12 blocks
good
so now think of those blocks being pixels in an image
5x5x5?
how many blocks wide is that top layer of blocks
3blocks a side?
no, you must consider the entire width
12 BLOCKS
But how do I know the width?
no, that's the total number of blocks, not how wide they are arranged
Don't know.
0?
have you used a pixel editor before?
I know pixels.
Not an editor.
go to https://www.piskelapp.com and draw the top layer
(just click on Create Sprite)
EXCELLENT! well done!
so now look at what you drew ... how wide is it?
how many pixels wide
32x32
that is the width of the canvas you were drawing onto, but you didn't draw something 32 pixels wide
how big is the thing YOU drew
how wide
5 blocks
YES
it's 5 blocks wide
aka 5 pixels wide in a 2d image ...
aka 5 voxels with in 3d
I couldn't understand what did you mean by 'How wide...' whole time. :face_palm:
so now see if you can add to what you have there, and draw the second layer
Thusal Ranawaka said:
I couldn't understand what did you mean by 'How wide...' whole time. :face_palm:
Since you understand now, is there a better way to ask the question?
Not at all. :happy:
This is actually really outstanding material for making a simple tutorial... I love this little cup.
The problem is with my English.
no worries, you're making progress
see if you can draw the next layer
okay
success?
confusion?
Sorry, I was eating while chatting with you.
(deleted)
Correct?
close, but not correct
What's the problem?
Sorry
the problem is that's not the same as the second layer
how many voxels did you say you counted on the first/top layer?
5 voxels
no, not how wide
how many
how many total
12 voxels
right
how many voxels do you count on the second layer?
14 voxels?
good! yes!
now count how many pixels you drew
Because of the handle
Sean said:
now count how many pixels you drew
Yeah, one voxel missing in the handle.
bingo
That's a mistake
yep
So, now the 3rd layer?
that was the only mistake
no
you're still learning
so now tell me how wide is what you drew?
how many pixels wide?
7 pixels?
wide is left and right, tall is up and down
5 pixels?
yes, same as the first layer
okay
how many pixels tall
Only the 2nd layer?
yes
(deleted)
you're confusing pixels with voxels
1 pixel = 1 voxel
in the image you just drew for the second layer, how wide is it in pixels and how tall is it in pixels
5px wide 1px tall
the word "tall" is confusing you
we're talking about a 2D context
what was the width and height of the first layer?
5px x 7px
those 12 pixels you drew .. how wide are they in X and how tall are they in Y? we are not talking at all about Z
Thusal Ranawaka said:
5px x 7px
which layer are you describing?
Sean said:
Thusal Ranawaka said:
5px x 7px
which layer are you describing?
2nd layer
okay, great
so the width is 5 and the height is 7
(in 2D)
Yes
X=5, Y=7 .. width=5, height=7
those are the dimensions of the second layer
what are the dimensions of the first layer?
5 x 5
great
so now lets bring this home
are there any layers in that cup bigger than width=5 or height=7 ?
Nope
excellent
:grinning_face_with_smiling_eyes:
so that's VERY IMPORTANT ...
the maximal dimensions of all layers is 5x7
yes.
when you make volumetric data, ALL layers must be the same size
all layers must have the same dimensions as your biggest layer
so what layer size is your VOL going to have?
Okay.
what layer dimensions do you need to use?
5 x 7
WOOT! he's getting it!
yes
so now lets set that up in the pixel editor
:big_smile:
click the Resize tab on the right size
find where it says "Maintain aspect ratio" and uncheck that box
then set width and height to your layer dimensions
Did it.
screenshot?
excellent
so now, erase that one pixel
oh, It's the cursor. :grinning:
oh okay, next set your color to black
done
actully, sorry, lets use black and white
white for background?
fill all pixels with black, and then draw the first layer in white
white foreground, black background
color all pixels
then simply draw the first layer (white on black), click the Export button on the right when you're done, and save it as a PNG
post the png here when it's done
then repeat the process for layers 2, 3, 4, and 5!
that looks perfect
four more to go
good!
notice how layers 2 and 4 are identical. you could have just made a copy of the file.
Sean said:
notice how layers 2 and 4 are identical. you could have just made a copy of the file.
Yes.
you sure?
you sure about layer 5?
Sean said:
you sure?
Yes.
The bottom layer must be filled.
that is true
that's not the mistake
Sean said:
that's not the mistake
Sorry
Saw it.
now you have your 5 voxel layers in separate images
Yes
If we had implemented png support for VOL, that would be sufficient
but just like EBM, you now need to convert that image data into a format that VOL wants
.bw
yes, very good
I think you're starting to understand
I think so.
so convert each png into a 5x7 .bw file (remember the default is 512x512 which is NOT what you want)
Yes
once you have your 5 bw files, you need to combine them into a single file. since bw files are simple raw binary files, you can combine them with: copy /b layer1.bw + layer2.bw + layer3.bw + layer4.bw + layer5.bw all_layers.bw
and finally with that all_layrs.bw file, you can create your VOL with with 'in' command interactively
since you drew your voxels using black and white colors, those colors intensity on a scale of 0 to 255 are white=255 and black=0. so when it asks you for the threshold, you just want the minimum to be greater than the background color intensity, and you want the maximum to be equal to or greater than your foreground color's intensity.
(deleted)
(deleted)
You said that you have to set the size
512x512 default
But I tried to set the sizes using -w and -n but shows errors
Did them.
Thusal Ranawaka said:
But I tried to set the sizes using -w and -n but shows errors
I don't see any errors
Thusal Ranawaka said:
Is this correct?
what do you think is an error?
No, I wanted to know, did I converted them correctly? Forget about the error that I said before.
no, you're not thinking for yourself
what do you think is an error?
what DID you think was an error
What do you mean?
you said you tried setting the sizes but you got errors. what errors did you think you got?
the screenshot you provided does not show you trying to set the sizes
This, image.png
Ahah! much better
so yes, then it displayed usage -- do you see -n or -w options in the usage?
No.
I saw my mistake.
Well my question is, why do you think there are no -n or -w options?
Many tools have them, why doesn't png-bw have them?
hint: bw-png has them, but not png-bw
Because png has its dimensions
More file data
png has its dimensions, YES! excellent, you remembered
bw is just data, so it does not have any dimensions
Yep
or rather, it doesn't know what they are
You told me.
glad you remembered, it's important to be very aware of what data you are working with
:grinning_face_with_smiling_eyes:
because the last bit is to understand the data format that VOL wants -- it wants raw unsigned char data, which is exactly what .bw data is too
8-bit unsigned character data
Okay, I am on 'in' command now.
so continue and see
you combined them?
Yes
in vol vol all_layers.bw 5 7 0 1 255 1 1 0
I think it's wrong.
that doesn't look right at a quick glance
Shows some errors
did you do it interactively?
Yes
Sean said:
did you do it interactively?
Interactive??
try again, but only enter one number at a time
dude, this is like the third time.... the in command can be run as one long line like that or it can be run interactively
interactively, it prompts you for each number with a description
I ran interactively
you didn't do what I said
"try again, but only enter one number at a time"
Alright
No luck
I entered one number at a time.
But errors
heh
the point of entering one at a time isn't to get a different result
if you don't change the inputs, it's not going to change the result
I changed it
it's the same as typing it all out as one line
the point is to think about each prompt, think what it's asking for
I know
Yes
okay, so then walk me through each prompt and explain your answer to me
Alright
Enter X, Y, Z dimensions of file (number of cells)
5 7 0?
explain
It asks the dimensions of the bw file.
dimensions of the data in the bw file, yes
continue explaining...
explain those three numbers
X means width
Y means height (from the top view)
correct and correct
and Z means height, but to make it 3D
Vertical
explain your choice of values
X=5 Y=7 and Z=0
that's not explaining, that's just saying them
why 5, why 7, why 0
the prompt is asking you how many values you have in that data file ... i.e., how many voxels there are and the shape of that voxel data set
Yes
It asks dimensions of your bw file.
So, my values are corect?
DUDE
you've still not explained the valus
why 5?
Because 5 is the width of the bw file.
no
Then?
think and try again
3?
why 3?
i'm not asking you for different values
i'm asking why that value
5 is for the X value, which is the width of the layer bw file.
CORRECT :)
that's what I'm getting at
these numbers aren't coming from nothing
they mean something
That's what I am saying for the whole time. ;)
no it's not
Whatever
you said it's the width of the bw file
:smile:
which is a different statement
Okay
Then Y?
layer1.bw and all_layers.bw are two very different things
the .bw is probably confusing you
Hmm
instead of all_layers.bw, think of it as being all_layers.data
Okay
because you took a bunch of .bw files and COMBINED them...
Yeah
so the result is a file with a lot of bw data in it, but you have to be careful in thinking of it in dimensional terms
because the dimensional terms refer to the DATA inside the file
Yep
how much data was in layer1.bw ?
how many voxel cells did that describe?
(deleted)
wrong answer, I did not ask how big the file was -- though in fairness the first question does open up that ambiguity. I clarified in the second rephrasing
Sean said:
how much data was in layer1.bw ?
Needs more explanation.
how many voxel positions are described in the layer1.bw file?
2, I think
no
X and Y
that's dimensions, not positions
positions are all the places you could click in the image editor. it's the number of cells.
oh
12 voxels
that's how many voxels you colored white
that's not how many voxels were described
you described many more with the color black
So, 5x7 = 35 voxels?
yes
that's how many voxels are described in the layer1.bw file
12 of them are "on" and the rest are "off"
Yes
i.e., 12 are solid and the rest are air/nothing
Hmm
each is represented by an unsigned number
a value
Okay
okay, so how many voxels are in all_layers.data ?
35x5 = 175?
175 voxels
excellent!
why 35x5?
Because there are 35 voxels in each layer (Some are on, Some are off), altogether there are 5 layers to complete the cup. So, 35 voxels in 1 layer and voxels in 5 layers equal to 175 voxels.
outstanding, that's is absolutely all correct
:grinning_face_with_smiling_eyes:
so now back to the 'in' command prompt and what it's asking you. it's asking you how many data values are in the file. how many voxels.
Enter X, Y, Z dimensions of file (number of cells)?
Sean said:
so now back to the 'in' command prompt and what it's asking you. it's asking you how many data values are in the file. how many voxels.
Hmm
cells == voxels
So, the answer should be 175?
It asks an XYZ value, so, I can't just define 175?
175 does not describe the shape of the volume
it merely describes the total number of cells
Yes
It asks, Enter X, Y, Z dimensions of file (number of cells):
if I told you there were 200 voxels, can you tell me the dimensions of the first layer?
(deleted)
Yes. You have to calculate
how??
By dividing 200 by 5 and then...
40
you misunderstand
Yes
We can't do it, know?
Thusal Ranawaka said:
It asks an XYZ value, so, I can't just define 175?
if all you input was 175 ... how will it know what the layer dimensions are?
I'm responding to this specific question
why can't you just input 175
Because it's asking for the dimensions of all_layers.data
if you input 175, how is the software to know how many layers there are or how many voxels per layer?
Sean said:
if you input 175, how is the software to know how many layers there are or how many voxels per layer?
Don't know.
that's because it's impossible
Hmm
think of this another way
say I have an image
Okay
and I tell you it's got 1200 pixels in that image
what are the dimensions of the image?
How could I know?
that's what I'm asking you
It can get multiple answers
exactly
So?
and that's the exact same reason why inputting 175 voxels would not be enough information
there are multiple answers possible
Yes.
so back to what it's asking you
Okay.
it's asking you how many voxels are in the data file ... and it wants three numbers
I have to hurry because my parents are asleep.
X x Y x Z = 175
oh
5 x 7 x 0 = 0
5 x 7 x 5.
BOOM! BABY
Thusal Ranawaka said:
now thats what a cup in minecraft would look like :yum: but thats nice
HA HA
Got to go
run rt
that's just the wireframe
render it
rotate it upside down
run rt again
what happened to the middle?
Sean said:
rotate it upside down
that might be the reason
he combined the layers as 1,2,3,4,5 top-to-bottom (4th quadrant), but vol is expecting the data in bottom-to-top order (1st quadrant)
so it's flipped upside down
TA-DA!
beautiful
there's the cup
:grinning_face_with_smiling_eyes:
Thank you very much for your time @Sean
Bye!
That's enough torture for one day. Well done @Thusal Ranawaka !
@Sean primitives.tcl.txt :worried:
I will complete rest of the objects and the tutorial as soon as possible.
awesome @Thusal Ranawaka !
why the sad face?
Sean said:
why the sad face?
Because I failed to complete all the objects over 4 months, I think.
Time isn't relevant to me so long as progress keeps getting made. It only matters if you quit!
This is in sound enough state that you could add it to our regression suite as a new test if you're interested in submitting your first code formally.
:+1:
Just entails downloading from SVN if you hadn't yet, compiling, and then a few edits in the regress/ directory to add your script as a new test.
Alright.
I will complete the rest asap
Happy to see something that I did in the BRL-CAD repo at last.
:grinning_face_with_smiling_eyes::grinning_face_with_smiling_eyes:
@Sean Trying to make Revolve primitive.
excellent
find the wiki page?
@Sean Yes. Couldn't understand a word it says and the documentation is incomplete, I think. :)
oh, sorry -- I didn't realize that it's currently a development implementation page
Revolve is nearly identical to extrude: https://brlcad.org/wiki/Extrude
create a Sketch, and for revolve it can be even more simple like a line, an arc, and a line:
____
\
|
____/
Then you revolve that and it'll make geometry.
@Sean I couldn't believe myself, I already created it before. :face_palm:
@Sean What happened to hf?
And poly?
The stated primitives might have more features than the deprecated ones
Hf was replaced with dsp, poly was replaced by BoT
So two primitives will deducted from 42 primitives.
I suppose. I mean it would be good to include them in a testing set just so we can make sure they're not horribly broken, but not critically important.
@Sean How do I do that?
@Thusal Ranawaka I wouldn't worry about them. Best to just focus on the ones remaining that can be created (or the tutorial.... any updates?)
Um... Making some updates in the Primitives.tcl
@Sean Going to make Sub Model
great. bugs seem to creep into submodel because we don't test it at all, so please do report any issues or funny behavior
@Sean All the primitives are done. Except brep, poly, hf, and spline :tada:
Have a look, primitives.tcl.txt
@Sean Any comments on primitives.tcl? :thinking:
@Thusal Ranawaka past 7 days have been nuts, but yes! Did you actually make that grip functional? impressed you figured it out even if it's not... rigging in brl-cad is not exactly extensively documented!
I think so.
really? how do you know it's functional? :)
@Sean I input values to grip and it worked.
It worked fine.
As you said earlier, May I add rendering effects to primitives?
I almost forgot it. :sweat_smile:
well that just means it created the grip object. that doesn't mean the grip works. :)
a grip is for articulating geometry. you know, like grabbing a rigging structure on a skeleton to move hands/feet/arms/doors/hinges/etc
Thusal Ranawaka said:
As you said earlier, May I add rendering effects to primitives?
rendering effects will be great, but first what's the status of the entities. which ones were you unable to create?
once they're all created, the next step will be to create a layout that displays them all in some sensible manner.
then rendering effects
Sean said:
well that just means it created the grip object. that doesn't mean the grip works. :)
a grip is for articulating geometry. you know, like grabbing a rigging structure on a skeleton to move hands/feet/arms/doors/hinges/etc
@Sean So, how do I check that?
I need help with grip, I can't understand what you said exactly.
Back to work again!
@Sean Hey, so, I just moved all data to my new laptop. So, when I load the primitives.tcl, it shows that thusal.dsp is failing.
And some others too.
Oh no, @Sean I think some of my .g files are corrupted during the data transferring process like the VOL, DSP etc.
I have to remake them all.
Oh..., I think the directory is not in the correct path.
@Thusal Ranawaka The objects in your .g file refer to a file (thusal.dsp) that is not located where it was before, so it can't find it.
if you run the "l" command on the vol or dsp, you can see what that file name is and make sure it's in the same directory as the .g file.
@Sean Found the problem, it can't find the y.bw file in case of the DSP. As you said...
But the solution for this is changing the directory. Using cd
command.
So, here's the report
Where is MGED? : C:\Users\Thusal Ranawaka\OneDrive\Documents\brlcad\build\Debug\bin
Where is the y.bw
file? : C:\Users\Thusal Ranawaka\OneDrive\Documents\db
So, when I try to change the directory, here's what's happening,
First, the directory changes to Documents
But it doesn't change to db
folder.
image.png
At a glance, I would say you're wrong about C:\Users\Thusal Ranawaka\OneDrive\Documents\db ....
oh
Last updated: Jan 09 2025 at 00:46 UTC