3D rectangle using C#

3D rectangle using C#

Anonymous
Not applicable
2,745 Views
8 Replies
Message 1 of 9

3D rectangle using C#

Anonymous
Not applicable

Need to implement pipelining concept but want to use 3D rectangle instead of pipes and that should work similar to that of pipelining as that repeat set of pipes and joints on line path given by user while run a C# command in AutoCAD after loading a library of C#.

 

Also instead of albos in pipelining ,over here a angular 3D rectangle should be developed i.e. angular rectangle.

 

Need a C# code to do all this. Or ideas that how it can be done?

 

Please Help As soon as possible.

 

Thanks in advance.

 

0 Likes
2,746 Views
8 Replies
Replies (8)
Message 2 of 9

hgasty1001
Advisor
Advisor

Hi,

 

There is no such thing as a 3D Rectangle in AutoCAD, so, you need to explain in more detail your aim, also there is no "pipes" ("albos" ??) in AutoCAD. A drawing or image would help a lot to understand when the written language it's not enough.

 

Gaston Nunez

0 Likes
Message 3 of 9

Anonymous
Not applicable

Hi

 

 

 

I was willing to built a 3D path with 3D rectangles and use angled 3D rectangle similar as that of image built in attachment.

 

Kindly find the attachment, in attachment case a line is drawn and then we use to run a command and selecting start and end point of line.

 

That will automatically built cylinders over that line path and at breakpoint that use a specific angular cylinder.

 

Same is to be built for rectangles.

0 Likes
Message 4 of 9

hgasty1001
Advisor
Advisor

Hi,

 

If understand correctly you need to swept (or extrude along a path) a solid, the path being a 3dPoly with straight angles in each corner, to do that you can base your coding on the one in the next link: Sweeping a Solid

 

Gaston Nunez

0 Likes
Message 5 of 9

Anonymous
Not applicable

Hi

 

 

I actually wish to show break points also in between the path. It will be like a part of specific size will be there and that will be repeated again and again. At the end the space left will be occupied automatically for that space.

0 Likes
Message 6 of 9

BKSpurgeon
Collaborator
Collaborator

Yes please refer to the blog post referenced by my learned colleague - that is very good.

 

In response to your questions:


 

I actually wish to show break points also in between the path. It will be like a part of specific size will be there and that will be repeated again and again. 


 

Then create a series of lines which are dashed/dotted to your length specifications and use the above code to iterate through them to create the spaces required.


 

At the end the space left will be occupied automatically for that space.


 

The same principle applies. Draw the lines where you want to sweep and omit it where you don't want to sweep.

 

 

hope this helps.

 

 

 

 

0 Likes
Message 7 of 9

Anonymous
Not applicable

Hi

 

 Is there any way by which you can show me it through a video.

 

That will be much clear for me.

 

Thanks

0 Likes
Message 8 of 9

hgasty1001
Advisor
Advisor

Hi,

 

Post your code so far and a picture of the results in Autocad. Also try to understand how to draw, in plain Autocad, the intended geometry in your problem. Youtube can help you.

 

Gaston Nunez

 

 

0 Likes
Message 9 of 9

BKSpurgeon
Collaborator
Collaborator

If I were to do a video i would state the following:

 

  • Select the lines

how to select objects:

 

http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-CBECEDCF-3B4E-4DF3-99A0-47103D10DADD...

 

Since you want only lines then apply a selection filter for lines:

 

http://through-the-interface.typepad.com/through_the_interface/2008/07/conditional-sel.html

 

 

  • then save the lines in a collection container. e.g. List<Line>
  • iterate through the lines. e.g. for each Line ln in ListOfLines
  • and apply the Kean Walmsley code to each line.

 

the above words are shorter and clearer than a 1000 videos.

 

If you're still having issues then please follow the advice of my learned brother Mr Gaston - post what you have and then we can work through it.

 

 

 

 

 

0 Likes