Geometry unexpected behavior

dynamo

#1

Can anyone explain that? Whether i’m getting crazy or this is a bug.

I’m working with Dynamo Core 1.3.2.2480 and Dynamo Studio 1.3.0.946 and Geometry Working Range Extra Large

Can anyone explain this? Either I’m going crazy or this seems to be a bug.

dyn file attached.

viab-GenBuilding-v01-sendBug.dyn (16.6 KB)


#2

Your working range is too large for that degree of control - set it to any level other than extra large and it should will work fine.

If you scale up the points (multiple values by 10) it will also work fine.

Switching the working range basically tells the tool to ignore that degree of precision, and then you attempted to draw beyond that degree of precision.

Also, you may want to revisit your code block - not all properties will have exactly 4 sides so you’ll have to iterate over 3, 4, 5 and X sided items. I once used two select nodes - on for front property lines, and one for rear property lines to accomplish a similar exercise to find maximum envelope. Those were offset by the front/rear setback, while the others were offset by the side setback.

I never came up with a solution for a site with an oblique angle though (try you script on a hexagon offsets of front=10, side=5, rear = 30 and you’ll see what I mean by this).

Projecting might solve it but I can see an issue where it would create as many issues as it solves. And extending the curve has similar problems.

Here’s a version of the design script to iterate over any list of curves. I have a standard and a reversed offset incase the original site was drawn counter-clockwise.

frontoff;
sideoff;
rearoff;

site;

sideoffs =
	List.OfRepeatedItem(sideoff,List.Count(site));
norearoff =
	List.ReplaceItemAtIndex(sideoffs,frontindex,frontoff);
alloffs =
	List.ReplaceItemAtIndex(norearoff,rearindex,rearoff);

PositiveOffsetsite =
	Autodesk.Geometry.Translate(
		site,
		Autodesk.Geometry.Curve.CoordinateSystemAtParameter(
			site,
			0.5
		).XAxis,
		alloffs
	);

NegativeOffsetSite =
	Autodesk.Geometry.Translate(
		site,
		Vector.Reverse(Autodesk.Geometry.Curve.CoordinateSystemAtParameter(
			site,
			0.5
		).XAxis),
		alloffs
	);