We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

How to get shape of selection used for 3DFilter after filterd?

HKM
Contributor

3DfilterShape.jpg

19 REPLIES 19
HKM
Contributor

note)
Windows10
Archicad26
API Development Kit 26.3000
Visuial Studio 2019

Laszlo Nagy
Community Admin
Community Admin

Can you upload a better quality and higher resolution screenshot? It is hard to see what it shows.

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27

Made it an attached file.
Please confirm.

 

3DfilterShape.jpg

LChen
Graphisoft
Graphisoft

Hi,

If you'd like to get the shape of model in 3D window, you can try 3D Manager functions to get the 3D polygon data.

(ex: ACAPI_3D_GetComponent())

You can find Example code in API Kit (3D_Test.c).

 

HTH

Ralph Wessel
Mentor

It looks like you need the geometry of the element as it appears in the 3D window rather than the geometry of the original element (without cropping). If so, you want to look at the documentation for the ModelAccess API. This provides access to the 3D bodies displayed in the 3D view. The documentation for ACAPI_ModelAccess_GetComponent includes a small code snippet that should help you get started. Once you have the body of the target element, you can extract faces, vertices, surfaces etc for a full 3D description.

Ralph Wessel BArch
Software Engineer Speckle Systems

Thank you for your answer.
But what I want to know is not the shape of the clopped object, but the shape of the clopping.

Ralph Wessel
Mentor

Do you want the shape of the 2D marquee the user drew?

Ralph Wessel BArch
Software Engineer Speckle Systems

That's right.
It is the shape of (3) in the image I presented.

Note)
At this point, the selected shape drawn by the user will be erased.

Ralph Wessel
Mentor

Use ACAPI_Selection_Get to populate a API_SelectionInfo structure. API_SelectionInfo.marquee will contain the coordinates of the selection polyline

Ralph Wessel BArch
Software Engineer Speckle Systems

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!