anouar Posted Monday at 02:50 PM Posted Monday at 02:50 PM (edited) Hello my friends please help me to find a lisp calculate both area perimeter and weight you find example attached. essai.dwg Edited Monday at 02:51 PM by anouar perimeter Quote
didier-acadlabs Posted Monday at 04:36 PM Posted Monday at 04:36 PM (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 Monday at 04:37 PM by didier-acadlabs Quote
BIGAL Posted Monday at 09:40 PM Posted Monday at 09:40 PM (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 Monday at 09:41 PM by BIGAL Quote
anouar Posted Tuesday at 08:16 AM Author Posted Tuesday at 08:16 AM 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 Quote
didier-acadlabs Posted Tuesday at 02:30 PM Posted Tuesday at 02:30 PM Bonjour @anouar Here is what I propose Amicalement Anouar-CadTutor.lsp Quote
GLAVCVS Posted Tuesday at 06:00 PM Posted Tuesday at 06:00 PM 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? Quote
didier-acadlabs Posted yesterday at 10:16 AM Posted yesterday at 10:16 AM 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 ? Amicalement Quote
GLAVCVS Posted yesterday at 10:22 AM Posted yesterday at 10:22 AM @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 Quote
didier-acadlabs Posted yesterday at 10:34 AM Posted yesterday at 10:34 AM 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 Quote
GLAVCVS Posted yesterday at 11:07 AM Posted yesterday at 11:07 AM (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: @ didier-acadlabs Edited yesterday at 11:09 AM by GLAVCVS Quote
didier-acadlabs Posted yesterday at 11:15 AM Posted yesterday at 11:15 AM 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 Quote
BIGAL Posted 20 hours ago Posted 20 hours ago "With the calculation of weight, it becomes more complicated." Fields can have formulas so you can get area and * weight. Quote
Recommended Posts
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.