POST
|
Thanks @Mateo_Neira , I see, tricky problem. I do not have a solution for you but 2 different approaches that are maybe worth to try out: You could use your recursion to only split the perimeter first, i.e. using splitAndSetbackPerimeter with a setback distance of 0. Such that each edge is split at 35% of its length. Secondly, insert a hole. And finally, setback only even (or odd) edges. You could perform splitAndSetbackPerimeter only once on all edges (without recursion) using absolute distances that you pre-compute beforehand. However, then you will need to write separate splitAndSetbackPerimeter statements, each one written for a different number of edges. Best, Martin
... View more
04-12-2023
10:37 AM
|
0
|
0
|
1016
|
POST
|
Hi @Mateo_Neira The only way I can think of is to add edge indices as edge attributes on the initial shape and reconstruct them using edge attribute functions after the setback. However, this requires a manual pre-process for adding edge attributes. Also note that setbacks usually change the topology (for example the outline could be reduced to 3 edges instead of 4 as a result of the setback) such that there might not be 1:1 mapping to the original edge indices. Can you elaborate more on why you need to have a connection to the original edge indices? Maybe there is a different approach to your problem. Your example code only focuses on applying different distances to different selectors which is still possible. Best, Martin
... View more
04-11-2023
07:40 AM
|
0
|
2
|
1064
|
POST
|
Hi @Mateo_Neira Unfortunately this is a bug: A setback operation will change the edge indices in an unpredictable manner. This only happens on shapes with holes as it is the case after your first setback operation. We added this issue to our backlog. Thank you for reporting! Setbacks on shapes without holes do no change the edge indices. Selectors (for example street selectors) are not affected and can be used to assign distances or perform a mapping to an array (like you do). Best, Martin
... View more
04-11-2023
06:51 AM
|
0
|
1
|
1077
|
POST
|
Its a parameterized rule. See Online Manual. So "nonPlanarHeight" in rule definition Extrude(nonPlanarHeight) --> is just a self-chosen parameter name. Relevant is only that it is called with scope.y Extrude(scope.sy) Because in this use case scope.y equals the height of a non-planar shape, it makes sense to give the parameter this name.
... View more
10-17-2018
08:26 AM
|
0
|
1
|
1222
|
POST
|
Happy it worked for you. We're trying to limit the available parameters and the amount of operations if a goal can also be achieved by a combination of several simpler operations & functions.
... View more
10-16-2018
07:40 AM
|
0
|
0
|
1222
|
POST
|
You are applying the split along the y extent which starts at the lowest y coordinate. The orange ground floor has a height of 3, but because the initial shape is non-planar the height is lower at some vertices. Here is a modification to you rule. Lot-->
alignScopeToAxes(y)
Extrude(scope.sy)
Extrude(nonPlanarHeight) -->
extrude(world.up.flatTop, height + nonPlanarHeight)
Building(nonPlanarHeight)
Building(nonPlanarHeight) -->
split(y) { nonPlanarHeight : Basement | { ~floorheight : Floor. }* }
Basement --> color("#fc824e")
... View more
10-16-2018
03:05 AM
|
1
|
5
|
1222
|
POST
|
Hi Jafar! You could add the current geometry height to the extrusion height. For example Lot --> extrude(world.up.flatTop, myHeight + geometry.height) or Lot --> alignScopeToAxes(y)
extrude(world.up.flatTop, myHeight + scope.sy)
Hope that helps!
... View more
10-16-2018
01:39 AM
|
0
|
7
|
1222
|
Title | Kudos | Posted |
---|---|---|
1 | 10-16-2018 03:05 AM |
Online Status |
Offline
|
Date Last Visited |
07-18-2023
05:52 PM
|