Jump to content

Recommended Posts

Posted (edited)

Hello
my friends please help me to find a lisp calculate both area perimeter and weight you find example attached.

essai.dwg

Edited by anouar
perimeter
  • anouar changed the title to lisp : area /perimeter/poids
Posted (edited)

Bonjour @anouar

 

The example of drawing you give us is complicated to do what you ask. Indeed, a circle in another is not a trivial example to calculate the perimeter.
You still work with this shape?
For area: no worries.
For weight: no worries.
For the perimeter: almost impossible.

 

Amicalement

Edited by didier-acadlabs
Posted (edited)

Looks like a pdf import, the "Circle/pline" are not correct size. The values displayed do not match the 2 circles etc ?? 

 

Please show the area as say a hatch and point to perimeter.

 

Welcome aboard.

Edited by BIGAL
Posted
15 hours ago, didier-acadlabs said:

Bonjour@anouar

 

L'exemple de dessin que vous nous donnez est compliqué à faire ce que vous demandez. En effet, un cercle dans un autre n'est pas un exemple trivial pour calculer le périmètre.
Vous travaillez toujours avec cette forme ?
Pour l'aire : pas de soucis.
Pour le poids : pas de soucis.
Pour le périmètre : quasi impossible.

 

Amicalement

hello no I work on aluminum profiles of different shapes each time I have to calculate the surface and the perimeter and the weight of an object after subtraction attached another form please help me
I have a lisp which is good but does not calculate the weight by the formula (surface * 2.7) / 1000 also is not applicable on the object that is to say after subtract

essai 2.dwg Polylin Area & Length FA.LSP

Posted

Let's see.
I don't quite understand what you need.
Let me see if I get it right: do you need a few more lines of text where "Weight = [result of: (area * 2.7) / 1000]" appears?

Posted

Bonjour @anouar

 

I don't know if you are interested in my proposition, but it is certain I made a mistake in.
I forgot to divide by 1000 for the calculation of the weight.
Are you able to fix the problem ? Or do you need help ?

 

2025-02-19_11-13-35.PNG.0ef12024f56965860773ef77bef3dba7.PNG

 

Amicalement

Posted

@didier-acadlabs I think there is a small problem with that: the result of the operation should be displayed highlighted as the area and perimeter

Posted

Bonjour @GLAVCVS

 

I don't understand your message.

Where is the "small" problem ?

Have you read my solution? If this is the case, you understand that this line I correct is part of a general (setq)

 

Amicalement

Posted (edited)

In Anouar's code, numerical calculations are shown in highlighting.

If this is important, you may need to change something in your code.

 

4 minutes ago, GLAVCVS said:

 

Edited by GLAVCVS
Posted

Bonjour @GLAVCVS

 

Yes, it is the case, but the fields are only interesting when it is possible to modify the entity and therefore change the value of the field.
With the calculation of weight, it becomes more complicated.
So I made the choice to work with text and not with fields.
Because regions are not entities that can be easily modified.

I am waiting for the answer of @anouar He will say whether it is correct or not.

 

Amicalement

Posted

"With the calculation of weight, it becomes more complicated." Fields can have formulas so you can get area and * weight.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...