.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Acces Hatch Angle and origins (vb.net)

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
AdriDicri
739 Views, 2 Replies

Acces Hatch Angle and origins (vb.net)

Hello everyone !

 

(First thing, my english is bad, french is my mother tongue)

 

I'm a vb.net developer and i've a project to do for my job (my compagny is building laser machines)

So i have to use autocad for drawing and, inside autocad, add a vb.net project to transfer all coordinates to a laser.

There's no problem for the most of object, but i've some difficulties with the hatch.

 

I explain.

 

I can get the coordinates for hatching with the " . explose " (it gave me lines and after that, i can have all the points x and y)

But i need to "Rotate the hatch" (for making some sorts of holes in metal by example)

(Ex : Hatch angle start at 0 degrees, then 45, then 90, etc... etc...)

 

How can i rotate this hatch in vb.net ? (The hatch must not change on the autocad screen, so i use a clone for getting lines)

I've find a method for getting the pattern angle (ex : MyHatch.patternAngle) but it returns me strange angle (like 0,00812 etc...)

 

And a other problem is that the origins of hatch angle seems based on 0,0 (so, when i change angle, it change from 0,0 and not the center of the Hatch)

 

Can someone help me with this?

 

(Once again, sorry for  my bad english)

 

Thanks a lot !

 

 

 

2 REPLIES 2
Message 2 of 3
Alfred.NESWADBA
in reply to: AdriDicri

Hi,

 

>> but it returns me strange angle

internally in AutoCAD angles are measured based on Math.PI, so you don't put in 90 for a square-angle but Math.PI/2.0 (which gives 1.57 ==> and so the angle-values looks quite small.

 

>> And a other problem is that the origins of hatch angle seems based on 0,0

Do not get confused with that "origin", there is a difference between "rotate an object" (there the rotation-base is important) and the "hatch-rotation" where the hatch-basepoint is not as important because the hatch-lines duplicates themselves to be visible within the hatch-boundary. Modifying the hatch-angle does NOT rotate the complete object (hatch and boundary) around the base-point!

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 3
AdriDicri
in reply to: Alfred.NESWADBA

Great ! Tanks for your help, it works perfectly

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost