Author Topic: Geometric Center is not proper  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

civil.eng

  • Newt
  • Posts: 66
Geometric Center is not proper
« on: August 16, 2021, 09:37:40 AM »
Hi all,
I have a weird problem with some polygons in cad, Geometric Center is not accurate in the attached file.
I also checked polygons out with LM:PolyCentroid function and the function shows center wrong too.

Does someone tell me what the problem is?

mhupp

  • Bull Frog
  • Posts: 250
Re: Geometric Center is not proper
« Reply #1 on: August 16, 2021, 10:34:54 AM »
How are you generating those points? Red is what I'm coming up with for geo center.

I have these settings load every time i open a drawing. maybe check out the one about polylines

Code: [Select]
(setvar 'INSUNITS 1)        ; Sets the Drawing units to inches
(setvar 'THICKNESS 0)     ; Sets THICKNESS TO 0
(setvar 'CECOLOR "BYLAYER") ; Sets color property to "BYLAYER."
(setvar 'CELTYPE "BYLAYER") ; Sets linetype property to "BYLAYER."
(setvar 'CELWEIGHT -1)      ; Sets the lineweight to "BYLAYER."
(setvar 'CELTSCALE 1)       ; Sets the LTScale of new objects to 1.
(setvar 'plinetype 2)       ; convents all 2D polylines to optimized polylines 
(setvar 'auprec 4)        ; angular unit percision 0.0000
(setvar 'luprec 4)        ; linear unit percision 0.0000
(setvar 'selectionmodes 0)  ; Set Selection mode to 0
(setvar 'lunits 2)        ; Set Linear units to Decimal
(setvar 'perspective 0)   ; Turn off Perspective view in current viewport
(setvar 'saveformat 8)    ; Set save to 2010 DXF
« Last Edit: August 16, 2021, 10:39:29 AM by mhupp »

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Geometric Center is not proper
« Reply #2 on: August 16, 2021, 11:41:55 AM »
Work for me:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

d2010

  • Bull Frog
  • Posts: 323
Re: Geometric Center is not proper
« Reply #3 on: August 16, 2021, 01:42:39 PM »
I have a weird problem with some polygons in cad, Geometric Center is not accurate in the attached file.
Does someone tell me what the problem is?
In my source bellow work fine. I use LeeMac_Centroid have no bugError.
You always, you keep the "Osmode"=207, otherwise the programe.lsp
                (rtFail  "pp_civileng_leecentroid_autoexec_jcpin25.lsp")
You found the sourceEncrypted, here on nextLine
(Click Here,Click Here)
If you need the source'NativeDef (not protected in ascii.lisp) (Not jc_pin25)
--> then  you replay here.
« Last Edit: August 18, 2021, 01:27:36 AM by d2010 »

civil.eng

  • Newt
  • Posts: 66
Re: Geometric Center is not proper
« Reply #4 on: August 17, 2021, 03:00:44 PM »
Thank you guys, I think it's a bug because the problem only happens on Autocad 2017 and Autocad 2019, have you guys checked it on the versions?