ObjectARX

ObjectARX

Reply
Contributor
vianova.th
Posts: 23
Registered: ‎09-16-2011
Message 1 of 7 (203 Views)

AcDb3dSolid::createSweptSolid give back different result..

203 Views, 6 Replies
09-04-2012 10:40 AM

Hello,

 

I have question about Sweep result.. from these

- create circle in XY plane and use top point of circle as base point

- create simple 3D line as path

- use AcDb3dSolid::createSweptSolid()

The point is

A. if the 3D line is from (0,0,100) to (10,10,100) then TOP of pipe is at level 100

BUT

B. if the 3D line is (0,0,100) to (-10,-10,100) then BOTTOM of pipe is at level 100

 

if I would like to get B with TOP of pipe at level 100, how to do that?  path have to create that way can't change.. I'm asking for Swept Options (or some technics)

 

Please help..

 

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 2 of 7 (202 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-04-2012 10:58 AM in reply to: vianova.th

Make sure your path starts on the circle.

--
Owen Wengerd
ManuSoft
Contributor
vianova.th
Posts: 23
Registered: ‎09-16-2011
Message 3 of 7 (194 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-04-2012 04:46 PM in reply to: owenwengerd

Hello Owen, thank for your reply. BUT your advise can't be done in my case.. I alway have the section in 2D (XY Plane) but the path is in 3D Space (also far away).. Give some more advise please..

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 4 of 7 (192 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-04-2012 05:27 PM in reply to: vianova.th

You need to either create the section in the correct position and orientation, or more likely, transform it after it is created.

--
Owen Wengerd
ManuSoft
Contributor
vianova.th
Posts: 23
Registered: ‎09-16-2011
Message 5 of 7 (173 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-05-2012 10:03 AM in reply to: owenwengerd

"transform it after it is created" is the key here.. thanks again 

Contributor
vianova.th
Posts: 23
Registered: ‎09-16-2011
Message 6 of 7 (164 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-07-2012 03:39 AM in reply to: vianova.th

Hi,

 

I thought that 'transform the profile to perpendicular with the start of path' is all I need.. BUT no!!

I create the red circle and white 3d polyline in the code, then doing 3D rotate and translate the circle to the start of 3D polyline.. It seem to work for most of the case I tested.. but some are not..

(margenta lines are just draw manually to check if the input circle is twist or not, they are not)

IF I do the Sweep command in ACAD for this drawing, it give ok result.. But if I do by arx, it give the green pipe as in the picture.. which options I missing ?

Thanks again in advance..

SweepResult2.PNG

 

Contributor
vianova.th
Posts: 23
Registered: ‎09-16-2011
Message 7 of 7 (155 Views)

Re: AcDb3dSolid::createSweptSolid give back different result..

09-09-2012 08:12 PM in reply to: vianova.th

It's mistake in the code... after change the concept of process by adding transforming section to the path.. I forget to re-set on SweepOptions..:smileyembarrassed:

So, confirm that transform section to perpendicular with start of path is really help..:smileyhappy:

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.