Jump to content

ObjectARX from the beginning, the guantlet is thrown.


Recommended Posts

Posted

1990 seems to have been a good year. I had that book too but unfortunately a leaky ceiling ruined it along with some of my earlier versions of AutoCAD manuals. Wish I could have salvaged them.

 

In any event, either I am younger than I look or you are older than you look. LOL

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    30

  • ReMark

    13

  • SEANT

    8

  • Freerefill

    8

Top Posters In This Topic

Posted Images

Posted
1990 seems to have been a good year. I had that book too but unfortunately a leaky ceiling ruined it along with some of my earlier versions of AutoCAD manuals. Wish I could have salvaged them.

 

In any event, either I am younger than I look or you are older than you look. LOL

 

Well, that book was published when I was 1 year old.. :P

 

I got hold of it when I was digging through an old cupboard at my old job... believe it or not, they were going to throw it out!

Posted

We have a budding archeologist in our midst. Nice save.

 

I think, given the command of programming you have, that 1 year's old is when you started reading up on LISP!

Posted
We have a budding archeologist in our midst. Nice save.

 

I think, given the command of programming you have, that 1 year's old is when you started reading up on LISP!

 

Thanks Mark,

 

But I still consider myself a beginner compared to the folks over at theSwamp... mind-blowing stuff

Posted

Listen, lad. I built this kingdom up from nothing. When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands.

Posted
Listen, lad. I built this kingdom up from nothing. When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands.

 

Thats quite an analogy Buzzard :D

 

Thanls :)

Posted

Lee,

 

Not mine.

Thats a scene from Monty Python and the Holy Grail about Swamp Castle.

Posted

She's got huge........ tracks of land..

 

EDIT: That's all I'm gonna do, because I could go home and get my two coconut halves (yes, I did buy a coconut specifically for that reason) and recite the movie front to back, which wouldn't have anything to do with LISP. :P

Posted

I don't want any of that, I just want to sing.

Posted

*twitch twitch*

 

No.. must.. respect.. internet.. forum..

 

must.. have.. good.. netiquette..

 

must.. not.. derail.. topic.. for.. Monty Python..

 

must.. stop.. speaking.. in.. fragments..

Posted

Sorry about that. I had to fix the above link pasting error.

Posted
Initial Challenge:

 

Here’s a starter project that isn’t that far removed from “Hello World.”

 

Create a C++ Command Prompt program to calculate the volume of a Pipe Arc segment.

 

Input: Pipe radius, Pipe Arc Radius at Centerline, Angle of Arc in Degrees between 0 and 360.

 

Return: Volume of Pipe

 

 

My friend, nice but you forgot the pause at the end so people can read the area.

Also put a couple of notes on it

hope you dont mind

 

 

#include <iostream>
#include <cmath>
using namespace std;

int main() 
{ 
// This declares them so they can be used.
// Aswell as that type of number it will be "double" = real "0.00"
double pi = 4.0 * atan(1.0);
double pipeRad;
double profileArea;
double bendRad;
double angInDegrees;
double angInRads;
double vol;

//count is similar to princ. cin is will save the input to that value
// similar to (setq piperade (getreal "\nEnter pipe radius :"
cout << "Enter Pipe Radius: ";
cin >> pipeRad;
// simple calc setting the thing to profile area
// similar to (setq profilearea (* (* piperad piperad) pi))
profileArea = pow(pipeRad, 2.0) * pi;
//Same as above
// (setq bendrad (getreal "\n Enter Bend radius at pipe centerline : ")
cout << "Enter Bend Radius at Pipe centerline: ";
cin >> bendRad;
// A simle if statement
// Notice you dont need progn
if (bendRad < pipeRad)
{
cout << "Inproper Bend Radius - Self intersecting Pipe!";
return 0;
}
//Same as above
// (setq angindegrees (getreal "\nEnter Degrees of Pipe arc [0 < Degrees < 360]: " : ")
cout << "Enter Degrees of Pipe arc [0 < Degrees < 360]: ";
cin >> angInDegrees;
// Normal if statement
if (angInDegrees < 0.0 || angInDegrees > 360.0)
{
cout << "Inproper Angle Value!";
return 0;
}
//simple calc same as above
angInRads = angInDegrees * pi / 180.0;
vol = angInRads * bendRad * profileArea;
//you can put mulitble things to the screan
// Simimlar to (princ (strcat "\nVolume of the pipe arc is :" vol ")) (princ)
cout << "Volume of the Pipe Arc is: "
[color=red]<< vol[/color]
[color=red]<< "\n";[/color]
// This pauses the console so things can be read
[color=red]system("PAUSE");[/color]
return 0;
}

Posted

Nice additional comments. That will help the Lisp to C++ transition.

 

With regard to the pause; I intended this as a command prompt app (i.e., not necessarily a VS console app) which stays fixed. Good heads up for those running this via the VS environment.

Command.jpg

Posted

Ahh i see, Im useing dev-C++

So it makes it an exe to run..

 

Have you done the thing on pointers?

Im not understanding the point of them... Which is reducing my understandablity of them

 

flower

Posted

I am studying those now. In fact, I was giving thought on how to incorporate the need for Pointers in another Cad”centric” challenge.

 

I certainly appreciate the concept of the pointer when passing parameters by reference. I can also see how they complement array processing. I imagine those two things alone are not the full extent of their usefulness. I’d guess their full power comes into play when optimizing how a program manages memory.

Posted

Thats my point....

I have no idear....

 

Im really just not getting the point of them, and why they are needed.

And again not sure why people use them with array,.

But that could also because ive being reading snippets not a code that uses it...yet.

 

I look forward to the next example...

Posted

Optimizing code is slowly being phased out. Computers nowadays are becoming incredibly powerful, and the difference between a short and a double long is becoming moot. Some day, those who don't get the point of why they're needed simply won't have to, as they won't be needed.

 

Back in the day, however, when a computers memory was small enough that you could keep track of each bit on paper (literally, in some cases), knowing exactly where a certain sequence information started was incredibly convenient.

Posted
Optimizing code is slowly being phased out. Computers nowadays are becoming incredibly powerful, and the difference between a short and a double long is becoming moot. Some day, those who don't get the point of why they're needed simply won't have to, as they won't be needed.

 

Back in the day, however, when a computers memory was small enough that you could keep track of each bit on paper (literally, in some cases), knowing exactly where a certain sequence information started was incredibly convenient.

 

 

I tend to agree with that sentiment, especially for the size and complexity of the code I’d be likely to create.

 

However, I do think optimization will continue to play a role in application size projects as software bloat negates hardware improvements. Some of the later features in AutoCAD seem to support that notion. The modeless Layer Properties Manager (written with the more modern .NET WPF – to avoid the need of more direct code optimization) suffers a performance hit. Not a huge problem, necessarily, but a noticeable hit nonetheless.

Posted

Actually optimizing code never becomes mute. It may not be as nessesary with PCs, but C++ is not just used to program PCs. Get an 8bit microcontroler with 4K ROM and 128bytes of RAM. You may well find optimization nessesary. In fact it might be so nessesary that you end up coding in assembly in places to achive that efficiency. Now that's fun :P

 

Shawndoe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...