Author Topic: Normals calculated within Lisp  (Read 1561 times)

0 Members and 1 Guest are viewing this topic.

S.Langhammer

  • Guest
Normals calculated within Lisp
« on: February 01, 2013, 05:45:26 AM »
Hello again!
With a lot of help I finally managed to fetch all entities and sub-entities from a drawing I Need. HURRAY!
Well now comes the next tricky part:
I need to find the normal vectors from arcs circles and ellipses, to determine how they are positioned in a 3D space.
I know AutoCAD has a commans named "nor" to get this information, but I'm bound to BricsCAD so this is not an Option.

Might anyone know a way to get the normals from ellipses, circles and arcs? Or maybe just a more or less intelligent way to eget 2 points on the lines of arcs, circles and ellipses? I mean I do get a center point from each of those, if i had 2 more points on the line of the arc/ellips/circle i could just pass all 3 to a file and calculate the normal vector within the Delphi program, thats reads the exported information at the end.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Normals calculated within Lisp
« Reply #1 on: February 01, 2013, 07:08:56 AM »
DXF Group 210 stores the WCS unit normal vector for planar objects and is used to calculate the OCS for the entity (via the Arbitrary Axis Algorithm); alternatively, you can calculate the normal vector by calculating the vector cross-product of two vectors spanned by three points defining the entity.

S.Langhammer

  • Guest
Re: Normals calculated within Lisp
« Reply #2 on: February 06, 2013, 04:34:07 AM »
Thanks,
I red on autodesk.com that the dxf group code 210 is the extrusion direction, but the translation my dictionary gave me didn't actually fit the topic.