3D Framework
Overview
Framework Customer Story
CIMdata e-Book
CAD Utilities
Validate
Revision
View/Convert
Customer Stories
CAD Data Risks Whitepaper
Focus: Aerospace
KeyCreator CAD
Meet KeyCreator
What Is Direct Modeling
KeyCreator Reviews
KeyCreator Customer Stories
Focus: Drafting
Schools & Students
CKD Viewer
About
Company
International Resellers
All Customer Stories
Referral Program
Partners
News
Blog
Webinars
Contact
Store
Revision/Validate
View/Convert
KeyCreator CAD
Shopping Cart
Support
Login
Software
Users
Submit Request
Remote Assist
Forum
Kubotek University
Help
Kubotek Forum
KeyCreator CAD & CKD Viewer
Technical discussion of CAD/CAM and integrated partner products
Subscribe to post
Soli
-
(3/13/2021 4:42:56 AM)
RE:Verify Mass Properties
Ram, Hello
Thank you for your help.
This function can be very valuable for me.
But something went wrong with it.
The "adCentersOfMass" parameters only, are returned.
Others give an error.
I tried this code:
------------------------------------------------
clear hEnt
HENTITY hEnt
:start
int nSelFlag = 0
Int nSelParent = 1
Int bSelRefEnts = 0
Int bAccept = 1
bActiveInstFlag = 1
GetEnt "Select entity", hEnt, , nSelFlag, nSelParent, bSelRefEnts, , bAccept, bActiveInstFlag
if (@key == -3)
exit
Double adVolumes[1]
Double adMasses[1]
Double adSurfAreas[1]
Double adCentersOfMass[3]
VerifyMassProperties hEnt , , , , , 1, adVolumes, adMasses, adSurfAreas, , adCentersOfMass
notestate
pause "%d %d %d " , adCentersOfMass[0] ,adCentersOfMass[1],adCentersOfMass[2]
pause "%d " , adMasses
goto start
----------------------------------------------------
I recorded the function Verify>Mass Properties:
----------------------------------------------
// Begin Macro Record
// This Macro is intended to be a Macro Script
// (0xA5A5) Compute mass properties of a body
MASKENTITY 32
MASKENTITY 52
MASKENTITY 41
MASKENTITY 26
Clear aBodies
HEntity aBodies[1] = { 49566 }
Clear aGenSelLevels
HLevel aGenSelLevels[0]
clear aCoM
double aCoM[3]
VerifyMassProperties aBodies,,,,,,,,,,aCoM
NoteState
MASKENTITY 32
MASKENTITY 52
MASKENTITY 41
MASKENTITY 26
// End Macro Record
----------------------------------------------------
The same, only, center of mass parameters are returned.
Can you check, please?
Thanks
E-mail:
Given e-mail is not valid
Please enter an e-mail. E-mail is required.
Login