Jump to content
Developer Wiki and Function Reference Links ×

3D Control Point


twk

Recommended Posts

  • Vectorworks, Inc Employee

This has been a LONG running wish of mine.

Kevin is right. You can create 3D control point via SDK and you can also constrain their motion (when moving them) along a predefined vector. From what I understand, the cone object uses that functionality. We REALLY need this and other 3D PIO types (3D line, 3D poly, rectangular extrude) for Vectorscript/Python. This would be a HUGE leap forward. All existing Vectorscript/Python PIOs have no 3D interface. This is very constraining in today's 3D BIM world.

Link to comment

We REALLY need this and other 3D PIO types (3D line, 3D poly, rectangular extrude) for Vectorscript/Python. This would be a HUGE leap forward. All existing Vectorscript/Python PIOs have no 3D interface.

While I agree that VS needs tools to let users interact with PIOs in 3D, I disagree with the first statement that it lacks certain 3D types. 3D polys and extrudes are supported and while a 3D line is not a defined type, you can certainly create one with a 3D poly.

The attached image of a traffic signal shows different objects made entirely of extrudes and extrudes along paths of various shapes.

Link to comment
  • Vectorworks, Inc Employee

Miguel,

You're right. I spoke too quickly(and thought too slow). It's really the need to have more 3D interaction and 3D control points. I've done quite a few custom plug-ins where those abilities would've made them far less cumbersome to use. The 3D interface for solids has gotten SO much better over the years. It would be awesome to see this carried over to PIOs.

Vlado, if you're listening: I know, I know... The SDK... ;-)

Link to comment

Great to see input from the pro's on this. Matt when you talk about the SDK are you talking about C++? And also while on languages, with implementation of python based scripts, can anyone see major advantages of using python over vectorscript? (as i am just delving into scripting using vectorscript at the moment) Is it worth ditching vectorscript and concentrating solely on the python language?

Link to comment
  • Vectorworks, Inc Employee

Hi Tui,

Yes. The SDK uses C++.

The advantages of Python over Vectorscript is that it is a widely used language with many resources (documentation, example code, libraries, etc) available. Even more advantageous is that you're running full blown Python from VW. This allows you to do anything that Python can do outside the confines of VW. This means Python has access to many more abilities than Vectorscript does. That all said, I have yet to make the leap to Python myself. So I may not be the best person for recommending how one should start. Maybe some of the early adopters of Python VW scripting will chime in.

Link to comment

Python is, as Matt explained, a more complete language that can make calls to the operating system while Vectorscript is confined to the VW document. The other advantage is that it supports object oriented programming, which is the major concept introduced by C++ and used by newer languages such as java.

This means that if the ultimate goal is to create plugins with the SDK, python would be ideal to prototype and debug the basic code since the conversion to C++ would be much easier.

To me the greatest drawback to program in python is that there is no reliable way to debug the code other than writing out operation results. The recommended method to use an external program to debug did not work form me and it is the reason I have not gone beyond running the examples provided.

You would probably see more development if there was better documentation for all the supported languages including the SDK.

Link to comment

re the Python debugger: try following the instructions on the developer wiki, but use LiClipse as your IDE. It comes pre-configured for Python and was much easier to get going. I also found you can really start the debugger listener once per VW session. You can have the debugger ignore breakpoints, but you shouldn't stop it completely.

I think the way Python runs and compiles, even if VW provided a built-in Python debugger, it would still need to launch it as an external app.

re the advantages of Python: Vectorscript is a proprietary version of PASCAL. Not only is PASCAL an outdated language, but the compiler itself must be written and maintained by NV's engineers. Python is developed externally, in current development, and is open source, so it can have a lot of features and updates without taking any resources away from Vectorworks's development. For example, Python has an array of built-in date functions, instantly enhancing VS's date capabilities.

I'm finding that a Python based script needs far fewer lines of code, mostly due to no longer needing to declare variables and to Pythons iteration capabilities. Also, Python is really great at manipulating text and data.

-Josh

Link to comment

Thanks for the points on Python vs Vectorscript, as I have just gotten a handle on vectorscipt, I'm starting to wonder if it's worth staying this course. I've created a couple of PIO's using vectorscript, mainly parametric objects controlled through the OIP, but have yet to tap into the area of listing document resources (symbols/hatches/text styles/classes/layers/sheet layers, etc)..which is where I'm wanting to be headed.

Seeing that python in VW still has similar vectorscript procedures/functions (mainly info from drawing elements - slab depth, roof pitch, sheet numbers/layer names etc). I guess the jump to python may have to be the route to take if we're to keep up. Do you think this is a sound statement?

Link to comment
Seeing that python in VW still has similar vectorscript procedures/functions (mainly info from drawing elements - slab depth, roof pitch, sheet numbers/layer names etc). I guess the jump to python may have to be the route to take if we're to keep up. Do you think this is a sound statement?

I would jump into Python rather than dive deeper into VS. You will find many resources on the language itself, and the API is essentially the same. The PIO structure has a lightly different flow translating from one language to another, but if your PIOs are not yet dealing with events or states, you won't see too much difference.

Two caveats:

Plug-ins written with Python will only be compatible with VW 2014 and higher. That's actually true in general for plug-ins, so you want to code using the lowest version you want to support.

This is version 1 of Python support, so you may run into an occasional bug.

-Josh

Link to comment

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
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...