-
Posts
2,434 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by _c_
-
-
@BillW, thank you so much for the library files, precious stuff you have there.
-
And thinking better: items within Python's tuples are immutable. The routines can thus only return a new tuple.
So I see these options:
- var v = ( x, y, z ) if a vector variable is preloaded with a third item, return a new tuple whose var[2] has the preloaded var[2] value
- var v = ( x, y ) if not, return a tuple in the form ( x, y, 0 )
- 1
-
Yes, I experimented extensively and added various notes and will add more in these days, hopefully this will help other Python novices.
I kept on trying to fetch vectorial data and getting abstruse nonsense values.
The loss was due the fact that, in spite proper 3-dimensional inits:
- both routines GetPolyPt and GetPolyLineVertex return 2-dimensional tuples, shortening if longer.
- vector routines expect 3-dimensional tuples or return gibberish
I think that both GetPolyPt and GetPolyLineVertex should simply set the first two items and leave the third alone. It does feel wrong, when an item is deleted from a tuple.
There are scenarios where a z value is preloaded.
But as always is rather a matter of finding an acceptable workaround (and documenting the problem), which in this case was easy.
As a principle all problems I am having in Python are due to the way vectors are accessed, manipulated and resolved. So, that overcome, all will be well.
p = vs.GetPolyPt( polyHandle, vtx1 ) # sets a tuple with 2 items in the form ( 0, 0 ) ang = vs.Vec2Ang( (p[0], p[1], 0) ) # make sure that there is a z coordinate or vs.Vec2Ang will fail, if p has only 2 items (VS Python only, Pascal OK ) # alternatively if len(p) == 2: p += (0,) # add a 3rd item to the tuple ang = vs.Vec2Ang( p ) # returns angle # FAILURE EXAMPLES: # ang = vs.Vec2Ang( p ) # always returns 90 # ang = vs.Vec2Ang( (p[0], p[1]) ) # always returns 90
https://developer.vectorworks.net/index.php/VS:Vec2Ang
https://developer.vectorworks.net/index.php/VS:GetPolyPt
https://developer.vectorworks.net/index.php/VS:GetPolylineVertex
-
Ciao @twkyes, but it shouldn't shorten p, this is the main problem. I am trying to use the vector routines and they need -contrary to the pascal version- to have a third slot set.
-
It is good that I am a person with lots of patience and a good measure of endurance... after I don't really know how many days of early morning trials I finally managed to discover the reason of some heavy quirks in my [never ending] ramp project in Python, my current baby.
And here they are, for you NOT to go through the same:
- vs.GetPolyPt and vs.GetPolylineVertex return a bidimensional tuple
- If you passed some z values before in the third slot, you'll loose them
- expected: set items 0 and 1, leave 2 as it is. Certainly not shorten the tuple!
The fact that these routines kill the third item is also bad for usage in the vs vector routines, such as vs.Vec2Ang, which expect a 3-items tuple.
Is this a bug or expected behaviour in Python?
Try this:
# test GetPolyPt p = (0, 0, 0) vs.AlrtDialog( 'init tuple: ' + str(len(p)) ) # 3 items p = vs.GetPolyPt(vs.FSActLayer(), 1) vs.AlrtDialog( 'after GetPolyPt: ' + str(len(p)) ) # 2 items?!? # test GetPolylineVertex p = (0, 0, 0) vs.AlrtDialog( 'init tuple: ' + str(len(p)) ) # 3 items p, vertexType, arcRadius = vs.GetPolylineVertex(vs.FSActLayer(), 1) vs.AlrtDialog( 'after GetPolylineVertex: ' + str(len(p)) ) # 2 items?!?
-
Hello,
I'd like to collect and study some valid third party Python libraries for Vectors, what do you use?
So far I tested:
- the one in this example: https://developer.vectorworks.net/index.php/Python_Sample_2D_Path_Object: mind that the __div__ defs are obsolete. This looks like a reduced version of something else
- McLeonards: https://gist.github.com/mcleonard/5351452
-
Pygame 3D vectors: https://www.pygame.org/wiki/3DVectorClass?parent=CookBook. I am on this one now
thank you
_c_
- 1
-
-
Like many before me, I am struggling to get any kind of User Interaction work in custom plug-ins. This is Vectorscript-Python only, Vectorscript-Pascal works flawlessly.
This affects routines like vs.GetPt, vs.GetPtLn, vs.GetPickObjectInfo, vs.TrackObjectN, etc.: there is no way to set global vars, and most attempts crash VW.
I read over and over all posts in the present list, I cannot get it done.
I am fairly new to Python, so first of all I ask: is anyone aware of a way to get above mentioned routines work in custom plug-ins?
If yes, please let me know how. Otherwise, I'd like to file bug reports. Hopefully we can get a fix at one point, since this problem is recorded since Python was introduced in VW.
There are two things discouraging users to switch from Pascal to Python: lack of user interaction support and weak code encryption.
If we could resolve the first it would be great.
Please @K.Lalkovski, can you help us there?
Thank you
_c_
-
3 hours ago, shorter said:
You only need to model to 1:100 to coordinate models with consultants.
Are we now in for a sterile discussion?
Others [for example us] might need it, I am afraid.
We speak about generated sections or elevations from shipped objects. That's something particular, different than coordinating models. That's standard plans and sections, no matter how you get them, they must comply to the environment they are to be used into.
[deleted. This is indeed so useless]
-
20 hours ago, shorter said:
@_c_ simple… you don’t. Multiple buildings should not be exported as a single ifc. Models should only contain one building and exported separately. Standard clause in all BEPs I have ever seen.
si, exactly.
I was referring to this discussion, where I indeed said "it cannot be done":
- 2
-
@Christiaan said I said it cannot be done.
You said " you bet".
I felt unjustly accused!
Where did I say that issuing plans and sections in VW cannot be done?
That's the one thing VW does better than any other app, I do have quite a problem with the objects generating above mentioned plans and sections, so do you -both- and any architect in this list, BTW.
😋
-
11 hours ago, Christiaan said:
@_c_ doesn't think it can be done!
?
Issuing correct IFC for multiple buildings from a singular file: how can it be done, so that the singular buildings are properly issued?
I don't know how.
Issuing plans and sections?
That can be done.
-
7 hours ago, zoomer said:
And another question,
where could I set IFC Buildings in VW ?
As like Zeno,
I basically have 2 separate Buildings in my single File.
And as their Stories differ, I have duplicate Layers for each Building.
(And even 2 of them per Story for each Building)
Which makes it a bit tedious to switch visibilities.
Even if I create a Story+(no Levels)+Layer Setup.
It would export both Story Sets as a single Building which would not help much.
(Maybe I could organize (manually or automaticallyby AI) all IFC Site/Building/Level
much easier in Bricscad, when without VW's information)
Ciao Zoomer, I don't think that you can: VW sees the document as a building. Also, you get into quite a construction for the IFC Export dialog: this does allow to export what's visible, but doesn't allow to store configurations, so you would have either to map very very carefully the storey names or re-list the needed levels in there each time.
- 2
-
11 hours ago, halfcoupler said:
Ok, so we all make a demonstration march to Lörrach ? 😆
Yes! LOL
11 hours ago, halfcoupler said:German support told me, serial numbers for VW2022 with dongle can't be generated at all ? So this is wrong ?
Yes, this is wrong: there is support for the dongle in the main application. I have two licences for VW International version, which is exactly the USA version, only much more expensive. There is no reason whatsoever to limit them.
- 1
-
Because, as a free lance BIM whatsoever, I could go to any office, plug my own dongle, swap the number and work for them. Now I cannot.
Because, as dongle user I could use it across ALL versions from the very beginning of the dongle age, and I did: I have machines for most versions, I can develop, recover your file forensically, do anything with VW like no-one out there. Now I can't: only 3 versions supported.
Because, when on holiday in the remotest spot of the Italian Maremma, without even cell coverage, I could dive deep into whatever programming dream of mine. Now I can't, you have deinstall here and there first. Or you might be blocked.
Because, as I have been using the E-version as beta tester for the last 13 years as well, and can tell you that all the totally cool-free-fancy stuff above mentioned simply isn't possible any longer
And finally, because this limit is only in Germany: VW DIDN'T stop dongle support, only our otherwise much esteemed distributor did.
They do a lot of good things. This is BAD.
- 4
-
Time to sell both my licences, then.😡
-
- Popular Post
- Popular Post
I am following with big interest a certain Dion Moult, who's involved into that. He's regular contributor at BulidingSmart forum. His posts are a wealth of knowledge.
I certainly also want to try BlenderBIM as soon as I have some time. And no, time involved into OpenSource is always good time.
- 6
-
Ciao Jeff, no. The wacom is more than Ipad + pen, even if the new apple pen 2 does have a very high quality. The size of the display is very large, the customisation nearly boundless. I could go on.
Yes, it is plain luxus, but whatever...
-
This is insane. I bought the new Wacom Intuos Pro tablet: it turns even Windows into an iPad 😍: it's a touch pad!
I will buy the new 3D pen soon, it wasn't immediately available, let's see how it works.
-
You press the space bar, and while this is kept pressed, you can zoom in/out, do a number of other things, then release the space bar and continue rotation or anything.
- 3
-
If you map zoom in to C and zoom out to V, then you can either
- double-c or double-v --> you zoom by factor, I think OR
- draw a marquee which will be zoomed in/out, if the first mode is activated
that's the mode I prefer. It brings you just the right zoom on the right object.
- 2
-
On 7/2/2021 at 9:10 PM, zoomer said:
I miss a Scroll Wheel, for those few Apps like VW, that don't offer missing-Scroll-Wheel
key+button alternatives for Zooming.
.....
But if I would get the 3rd button, I think it would not work to enhance VW Zooming
because I already tried to assign any driver function to one of my regular 2 buttons.
But @_c_,
what usage for the 3rd button did you have in mind ?
Like you, I also sometimes miss the scroll wheel, but not in VW, where I always used the old keys C and V for zoom in and out. It is preciser, faster than the scroll wheel and far less taxing on the graphic card. Having a third button should help assigning them.
These days I am nearly exclusively on Solibri and a third button is good there. Solibri is rather difficult as of the views, compels you to zoom in over and over again, and there is no customisation of the keys AND there are one thousand key variants for the tiniest actions.
-
Did anybody try the new Wacom Intuos Pro 3D pen? I am tempted.
They ditched the "eraser" on the back and added a third button in the thumb area. So now full fledged 3-buttons mouse value.
- 1
-
It will be such fun!
Vectorscript is very rewarding, it will give you power and endless brainfood.
I bring Vectorscript code 'problems' for my long runs. There is nothing better for forgetting yourself for a couple of hours.
- 1
The best vector includes out there
in Python Scripting
Posted
Don't worry Jayme, and thank you for the hint: I will give a look to them as well. I just want to find all the problems with the vector stuff, then I am looking forward to expand to new themes.